Guest User

Update GM DOF2

a guest
Aug 30th, 2018
1,339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.30 KB | None | 0 0
  1. #include <a_samp>
  2. #include <DOF2>
  3. #include <foreach>
  4. #include <sscanf2>
  5. #include <Pawn.CMD>
  6.  
  7. // CORES
  8.  
  9. #define Branco 0xFFFFFFAA
  10. #define Amarelo 0xFFFF00AA
  11. #define Ciano 0x00FFFFAA
  12. #define Blue 0x0000FFAA
  13. #define Rosa 0xFF00FFAA
  14. #define Verde 0x00FF00AA
  15. #define Vermelho 0xFF0000AA
  16. #define Azul 0x1E90FFAA
  17.  
  18. // DEFINES
  19.  
  20. #define CONTAS "Contas/%s.ini"
  21.  
  22. // DIALOGS
  23.  
  24. #define DIALOG_REGISTRO 1
  25. #define DIALOG_LOGIN 2
  26. #define DIALOG_SEXO 3
  27. #define DIALOG_LOCALSPAWN 4
  28. #define DIALOG_ABASTECER 5
  29. #define DIALOG_GASOLINA 6
  30. #define DIALOG_BANCO 7
  31. #define DIALOG_SAQUE 8
  32. #define DIALOG_DEPOSITO 9
  33. #define DIALOG_SALDO 10
  34.  
  35. // SEXO - REGISTRO
  36.  
  37. #define MASCULINO 1
  38. #define FEMININO 2
  39.  
  40. // ENUNS
  41.  
  42. enum PlayerInfo
  43. {
  44. Nome[24],
  45. Level,
  46. Logou,
  47. Procurado,
  48. Skin,
  49. Sexo,
  50. SenhaErrada,
  51. InteriorID,
  52. Admin,
  53. Gasolina,
  54. SaldoBanco,
  55. bool:ContaBanco,
  56. bool:Logado
  57. };
  58.  
  59. // NEWS
  60.  
  61. new Text:TextVelocimetro[5];
  62. new Player[MAX_PLAYERS][PlayerInfo];
  63. new PlayerText:TextPlayerVelocimetro[4][MAX_PLAYERS];
  64. new PlayerVelocimetroTimer[MAX_PLAYERS];
  65.  
  66. new bool:PlayerVelocimetro[MAX_PLAYERS];
  67.  
  68. // FORWARD
  69.  
  70. forward UpdatePlayerVelocimetro(playerid);
  71. forward Combustivel();
  72.  
  73. main()
  74. {
  75. print("\nGM Carregada com sucesso!\n\n");
  76. }
  77.  
  78. new VehicleNames[212][] =
  79. {
  80. {"Landstalker"}, {"Bravura"}, {"Buffalo"}, {"Linerunner"}, {"Perrenial"}, {"Sentinel"}, {"Dumper"},
  81. {"Firetruck"}, {"Trashmaster"}, {"Stretch"}, {"Manana"}, {"Infernus"}, {"Voodoo"}, {"Pony"}, {"Mule"},
  82. {"Cheetah"}, {"Ambulance"}, {"Leviathan"}, {"Moonbeam"}, {"Esperanto"}, {"Taxi"}, {"Washington"},
  83. {"Bobcat"}, {"Mr Whoopee"}, {"BF Injection"}, {"Hunter"}, {"Premier"}, {"Enforcer"}, {"Securicar"},
  84. {"Banshee"}, {"Predator"}, {"Bus"}, {"Rhino"}, {"Barracks"}, {"Hotknife"}, {"Trailer 1"}, {"Previon"},
  85. {"Coach"}, {"Cabbie"}, {"Stallion"}, {"Rumpo"}, {"RC Bandit"}, {"Romero"}, {"Packer"}, {"Monster"},
  86. {"Admiral"}, {"Squalo"}, {"Seasparrow"}, {"Pizzaboy"}, {"Tram"}, {"Trailer 2"}, {"Turismo"},
  87. {"Speeder"}, {"Reefer"}, {"Tropic"}, {"Flatbed"}, {"Yankee"}, {"Caddy"}, {"Solair"}, {"Berkley's RC Van"},
  88. {"Skimmer"}, {"PCJ-600"}, {"Faggio"}, {"Freeway"}, {"RC Baron"}, {"RC Raider"}, {"Glendale"}, {"Oceanic"},
  89. {"Sanchez"}, {"Sparrow"}, {"Patriot"}, {"Quad"}, {"Coastguard"}, {"Dinghy"}, {"Hermes"}, {"Sabre"},
  90. {"Rustler"}, {"ZR-350"}, {"Walton"}, {"Regina"}, {"Comet"}, {"BMX"}, {"Burrito"}, {"Camper"}, {"Marquis"},
  91. {"Baggage"}, {"Dozer"}, {"Maverick"}, {"News Chopper"}, {"Rancher"}, {"FBI Rancher"}, {"Virgo"}, {"Greenwood"},
  92. {"Jetmax"}, {"Hotring"}, {"Sandking"}, {"Blista Compact"}, {"Police Maverick"}, {"Boxville"}, {"Benson"},
  93. {"Mesa"}, {"RC Goblin"}, {"Hotring Racer A"}, {"Hotring Racer B"}, {"Bloodring Banger"}, {"Rancher"},
  94. {"Super GT"}, {"Elegant"}, {"Journey"}, {"Bike"}, {"Mountain Bike"}, {"Beagle"}, {"Cropdust"}, {"Stunt"},
  95. {"Tanker"}, {"Roadtrain"}, {"Nebula"}, {"Majestic"}, {"Buccaneer"}, {"Shamal"}, {"Hydra"}, {"FCR-900"},
  96. {"NRG-500"}, {"HPV1000"}, {"Cement Truck"}, {"Tow Truck"}, {"Fortune"}, {"Cadrona"}, {"FBI Truck"},
  97. {"Willard"}, {"Forklift"}, {"Tractor"}, {"Combine"}, {"Feltzer"}, {"Remington"}, {"Slamvan"},
  98. {"Blade"}, {"Freight"}, {"Streak"}, {"Vortex"}, {"Vincent"}, {"Bullet"}, {"Clover"}, {"Sadler"},
  99. {"Firetruck LA"}, {"Hustler"}, {"Intruder"}, {"Primo"}, {"Cargobob"}, {"Tampa"}, {"Sunrise"}, {"Merit"},
  100. {"Utility"}, {"Nevada"}, {"Yosemite"}, {"Windsor"}, {"Monster A"}, {"Monster B"}, {"Uranus"}, {"Jester"},
  101. {"Sultan"}, {"Stratum"}, {"Elegy"}, {"Raindance"}, {"RC Tiger"}, {"Flash"}, {"Tahoma"}, {"Savanna"},
  102. {"Bandito"}, {"Freight Flat"}, {"Streak Carriage"}, {"Kart"}, {"Mower"}, {"Duneride"}, {"Sweeper"},
  103. {"Broadway"}, {"Tornado"}, {"AT-400"}, {"DFT-30"}, {"Huntley"}, {"Stafford"}, {"BF-400"}, {"Newsvan"},
  104. {"Tug"}, {"Trailer 3"}, {"Emperor"}, {"Wayfarer"}, {"Euros"}, {"Hotdog"}, {"Club"}, {"Freight Carriage"},
  105. {"Trailer 3"}, {"Andromada"}, {"Dodo"}, {"RC Cam"}, {"Launch"}, {"Police Car (LSPD)"}, {"Police Car (SFPD)"},
  106. {"Police Car (LVPD)"}, {"Police Ranger"}, {"Picador"}, {"S.W.A.T. Van"}, {"Alpha"}, {"Phoenix"}, {"Glendale"},
  107. {"Sadler"}, {"Luggage Trailer A"}, {"Luggage Trailer B"}, {"Stair Trailer"}, {"Boxville"}, {"Farm Plow"},
  108. {"Utility Trailer"}
  109. };
  110.  
  111. public OnGameModeInit()
  112. {
  113. SetGameModeText("Base RPG - DOF2");
  114.  
  115. UsePlayerPedAnims();
  116. EnableStuntBonusForAll(0);
  117. DisableInteriorEnterExits();
  118.  
  119. // SETTIMERS
  120.  
  121. SetTimer("Gasolina", 50000, true);
  122.  
  123. // TEXTLABEL
  124.  
  125. Create3DTextLabel("Aperte {00FFFF}Y {696969}para acessar o caixa", 0x696969AA, 1722.2161, -1625.3401, 20.2117, 50.0, 0);
  126.  
  127. // PICKUP
  128.  
  129. CreatePickup(1274, 1, 1722.2161, -1625.3401, 20.2117);
  130.  
  131. // TEXTDRAW
  132.  
  133. LoadTextDraws();
  134. return 1;
  135. }
  136.  
  137. public OnGameModeExit()
  138. {
  139. DOF2::Exit();
  140. return 1;
  141. }
  142.  
  143. public OnPlayerRequestClass(playerid, classid)
  144. {
  145. if(DOF2::FileExists(Conta(playerid)))
  146. {
  147. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "LOGIN", "Digite sua senha para Logar-se.", "Logar", "Sair");
  148. }
  149. if(!DOF2::FileExists(Conta(playerid)))
  150. {
  151. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "REGISTRO", "Digite uma senha para Registrar-se.", "Registrar", "Sair");
  152. }
  153. return 1;
  154. }
  155.  
  156. public OnPlayerConnect(playerid)
  157. {
  158. // Velocimetro
  159.  
  160. PlayerVelocimetro[playerid] = false;
  161.  
  162. TextPlayerVelocimetro[0][playerid] = CreatePlayerTextDraw(playerid,615.000000, 385.000000, "Nenhum");
  163. PlayerTextDrawAlignment(playerid, TextPlayerVelocimetro[0][playerid], 3);
  164. PlayerTextDrawBackgroundColor(playerid, TextPlayerVelocimetro[0][playerid], 0);
  165. PlayerTextDrawFont(playerid, TextPlayerVelocimetro[0][playerid], 1);
  166. PlayerTextDrawLetterSize(playerid, TextPlayerVelocimetro[0][playerid], 0.330000, 1.299999);
  167. PlayerTextDrawColor(playerid, TextPlayerVelocimetro[0][playerid], -156);
  168. PlayerTextDrawSetOutline(playerid, TextPlayerVelocimetro[0][playerid], 0);
  169. PlayerTextDrawSetProportional(playerid, TextPlayerVelocimetro[0][playerid], 1);
  170. PlayerTextDrawSetShadow(playerid, TextPlayerVelocimetro[0][playerid], 1);
  171. PlayerTextDrawSetSelectable(playerid, TextPlayerVelocimetro[0][playerid], 0);
  172.  
  173. TextPlayerVelocimetro[1][playerid] = CreatePlayerTextDraw(playerid,615.000000, 399.000000, "KM/H");
  174. PlayerTextDrawAlignment(playerid, TextPlayerVelocimetro[1][playerid], 3);
  175. PlayerTextDrawBackgroundColor(playerid, TextPlayerVelocimetro[1][playerid], 0);
  176. PlayerTextDrawFont(playerid, TextPlayerVelocimetro[1][playerid], 2);
  177. PlayerTextDrawLetterSize(playerid, TextPlayerVelocimetro[1][playerid], 0.250000, 1.299999);
  178. PlayerTextDrawColor(playerid, TextPlayerVelocimetro[1][playerid], -156);
  179. PlayerTextDrawSetOutline(playerid, TextPlayerVelocimetro[1][playerid], 0);
  180. PlayerTextDrawSetProportional(playerid, TextPlayerVelocimetro[1][playerid], 1);
  181. PlayerTextDrawSetShadow(playerid, TextPlayerVelocimetro[1][playerid], 1);
  182. PlayerTextDrawSetSelectable(playerid, TextPlayerVelocimetro[1][playerid], 0);
  183.  
  184. TextPlayerVelocimetro[2][playerid] = CreatePlayerTextDraw(playerid,615.000000, 413.000000, "0 Litros");
  185. PlayerTextDrawAlignment(playerid, TextPlayerVelocimetro[2][playerid], 3);
  186. PlayerTextDrawBackgroundColor(playerid, TextPlayerVelocimetro[2][playerid], 0);
  187. PlayerTextDrawFont(playerid, TextPlayerVelocimetro[2][playerid], 2);
  188. PlayerTextDrawLetterSize(playerid, TextPlayerVelocimetro[2][playerid], 0.250000, 1.299999);
  189. PlayerTextDrawColor(playerid, TextPlayerVelocimetro[2][playerid], -156);
  190. PlayerTextDrawSetOutline(playerid, TextPlayerVelocimetro[2][playerid], 0);
  191. PlayerTextDrawSetProportional(playerid, TextPlayerVelocimetro[2][playerid], 1);
  192. PlayerTextDrawSetShadow(playerid, TextPlayerVelocimetro[2][playerid], 1);
  193. PlayerTextDrawSetSelectable(playerid, TextPlayerVelocimetro[2][playerid], 0);
  194.  
  195. TextPlayerVelocimetro[3][playerid] = CreatePlayerTextDraw(playerid,615.000000, 427.000000, "0%");
  196. PlayerTextDrawAlignment(playerid, TextPlayerVelocimetro[3][playerid], 3);
  197. PlayerTextDrawBackgroundColor(playerid, TextPlayerVelocimetro[3][playerid], 0);
  198. PlayerTextDrawFont(playerid, TextPlayerVelocimetro[3][playerid], 2);
  199. PlayerTextDrawLetterSize(playerid, TextPlayerVelocimetro[3][playerid], 0.250000, 1.299999);
  200. PlayerTextDrawColor(playerid, TextPlayerVelocimetro[3][playerid], -156);
  201. PlayerTextDrawSetOutline(playerid, TextPlayerVelocimetro[3][playerid], 0);
  202. PlayerTextDrawSetProportional(playerid, TextPlayerVelocimetro[3][playerid], 1);
  203. PlayerTextDrawSetShadow(playerid, TextPlayerVelocimetro[3][playerid], 1);
  204. PlayerTextDrawSetSelectable(playerid, TextPlayerVelocimetro[3][playerid], 0);
  205. return 1;
  206. }
  207.  
  208. public OnPlayerDisconnect(playerid, reason)
  209. {
  210. if(PlayerVelocimetro[playerid])
  211. {
  212. KillTimer(PlayerVelocimetroTimer[playerid]);
  213. }
  214. SalvarConta(playerid);
  215. return 1;
  216. }
  217.  
  218. public OnPlayerSpawn(playerid)
  219. {
  220. return 1;
  221. }
  222.  
  223. public OnPlayerDeath(playerid, killerid, reason)
  224. {
  225. return 1;
  226. }
  227.  
  228. public OnVehicleSpawn(vehicleid)
  229. {
  230. return 1;
  231. }
  232.  
  233. public OnVehicleDeath(vehicleid, killerid)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnPlayerText(playerid, text[])
  239. {
  240. new string[150];
  241.  
  242. if(Player[playerid][Admin] == 1)
  243. {
  244. format(string, sizeof(string), "{FFFFFF}[%d:{FF0000}AJD{FFFFFF}] %s", playerid, text);
  245. SendPlayerMessageToAll(playerid, string);
  246. return 0;
  247. }
  248. if(Player[playerid][Admin] == 2)
  249. {
  250. format(string, sizeof(string), "{FFFFFF}[%d:{0000FF}Mod{FFFFFF}] %s", playerid, text);
  251. SendPlayerMessageToAll(playerid, string);
  252. return 0;
  253. }
  254. if(Player[playerid][Admin] == 3)
  255. {
  256. format(string, sizeof(string), "{FFFFFF}[%d:{00FFFF}Admin{FFFFFF}] %s", playerid, text);
  257. SendPlayerMessageToAll(playerid, string);
  258. return 0;
  259. }
  260. format(string, sizeof(string), "{FFFFFF}[ %d ] %s", playerid, text);
  261. SendPlayerMessageToAll(playerid, string);
  262. return 0;
  263. }
  264.  
  265. public OnPlayerCommandText(playerid, cmdtext[])
  266. {
  267. return 0;
  268. }
  269.  
  270. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  271. {
  272. if(Player[playerid][Gasolina] <= 0)
  273. {
  274. ClearAnimations(playerid);
  275. SendClientMessage(playerid, Vermelho, "| INFO | Você não tem gasolina para dirigir este veículo!");
  276. }
  277. return 1;
  278. }
  279.  
  280. public OnPlayerExitVehicle(playerid, vehicleid)
  281. {
  282. return 1;
  283. }
  284.  
  285. public OnPlayerStateChange(playerid, newstate, oldstate)
  286. {
  287. if(newstate == PLAYER_STATE_DRIVER)
  288. {
  289. if(Player[playerid][Gasolina] <= 0)
  290. {
  291. ClearAnimations(playerid);
  292. SendClientMessage(playerid, Vermelho, "| INFO | Você não tem gasolina para dirigir este veículo!");
  293. }
  294. }
  295. if(newstate == PLAYER_STATE_DRIVER)
  296. {
  297. ShowPlayerVelocimetro(playerid);
  298. }
  299. else
  300. {
  301. HidePlayerVelocimetro(playerid);
  302. }
  303. return 1;
  304. }
  305.  
  306. public OnPlayerEnterCheckpoint(playerid)
  307. {
  308. return 1;
  309. }
  310.  
  311. public OnPlayerLeaveCheckpoint(playerid)
  312. {
  313. return 1;
  314. }
  315.  
  316. public OnPlayerEnterRaceCheckpoint(playerid)
  317. {
  318. return 1;
  319. }
  320.  
  321. public OnPlayerLeaveRaceCheckpoint(playerid)
  322. {
  323. return 1;
  324. }
  325.  
  326. public OnRconCommand(cmd[])
  327. {
  328. return 1;
  329. }
  330.  
  331. public OnPlayerRequestSpawn(playerid)
  332. {
  333. return 1;
  334. }
  335.  
  336. public OnObjectMoved(objectid)
  337. {
  338. return 1;
  339. }
  340.  
  341. public OnPlayerObjectMoved(playerid, objectid)
  342. {
  343. return 1;
  344. }
  345.  
  346. public OnPlayerPickUpPickup(playerid, pickupid)
  347. {
  348. return 1;
  349. }
  350.  
  351. public OnVehicleMod(playerid, vehicleid, componentid)
  352. {
  353. return 1;
  354. }
  355.  
  356. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  357. {
  358. return 1;
  359. }
  360.  
  361. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  362. {
  363. return 1;
  364. }
  365.  
  366. public OnPlayerSelectedMenuRow(playerid, row)
  367. {
  368. return 1;
  369. }
  370.  
  371. public OnPlayerExitedMenu(playerid)
  372. {
  373. return 1;
  374. }
  375.  
  376. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  377. {
  378. return 1;
  379. }
  380.  
  381. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  382. {
  383. if(newkeys == KEY_YES) // Aperta 'Y'
  384. {
  385. if(IsPlayerInRangeOfPoint(playerid, 1.0, 1722.2161, -1625.3401, 20.2117)) // Local Caixa
  386. {
  387. ShowPlayerDialog(playerid, DIALOG_BANCO, DIALOG_STYLE_LIST, "Banco", "Abrir Conta\nSacar\nDepositar\nSaldo", "Selecionar", "Fechar");
  388. }
  389. }
  390. return 1;
  391. }
  392.  
  393. public OnRconLoginAttempt(ip[], password[], success)
  394. {
  395. return 1;
  396. }
  397.  
  398. public OnPlayerUpdate(playerid)
  399. {
  400. return 1;
  401. }
  402.  
  403. public OnPlayerStreamIn(playerid, forplayerid)
  404. {
  405. return 1;
  406. }
  407.  
  408. public OnPlayerStreamOut(playerid, forplayerid)
  409. {
  410. return 1;
  411. }
  412.  
  413. public OnVehicleStreamIn(vehicleid, forplayerid)
  414. {
  415. return 1;
  416. }
  417.  
  418. public OnVehicleStreamOut(vehicleid, forplayerid)
  419. {
  420. return 1;
  421. }
  422.  
  423. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  424. {
  425. if(dialogid == DIALOG_LOGIN)
  426. {
  427. if(!response) return Kick(playerid);
  428.  
  429. if(!strlen(inputtext))
  430. {
  431. SendClientMessage(playerid, Vermelho, "| ERRO | Digite sua senha para Logar-se.");
  432. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "LOGIN", "Digite sua senha para Logar-se.", "Logar", "Sair");
  433. return 1;
  434. }
  435. if(strcmp(inputtext, DOF2::GetString(Conta(playerid), "Senha"), true) == 0)
  436. {
  437. CarregarConta(playerid);
  438. SendClientMessage(playerid, Azul, "| INFO | Logado(a) com sucesso!");
  439. }
  440. else
  441. {
  442. new string[32];
  443.  
  444. Player[playerid][SenhaErrada]++;
  445. if(Player[playerid][SenhaErrada] == 3) Kick(playerid);
  446.  
  447. format(string, sizeof(string), "| ERRO | Senha Errada (%d/3)", Player[playerid][SenhaErrada]);
  448. SendClientMessage(playerid, Vermelho, string);
  449.  
  450. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "LOGIN", "Digite sua senha para Logar-se.", "Logar", "Sair");
  451. }
  452. return 1;
  453. }
  454. if(dialogid == DIALOG_REGISTRO)
  455. {
  456. if(!response) return Kick(playerid);
  457.  
  458. if(strlen(inputtext) < 4 || strlen(inputtext) > 20)
  459. {
  460. SendClientMessage(playerid, Vermelho, "| ERRO | Digite uma senha entre 4 á 20 caracteres.");
  461. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "REGISTRO", "Digite uma senha para Registrar-se.", "Registrar", "Sair");
  462. return 1;
  463. }
  464. DOF2::CreateFile(Conta(playerid));
  465.  
  466. DOF2::SetString(Conta(playerid), "Senha", inputtext);
  467. DOF2::SetInt(Conta(playerid), "Dinheiro", 0);
  468. DOF2::SetInt(Conta(playerid), "Procurado", 0);
  469. DOF2::SetInt(Conta(playerid), "Level", 0);
  470. DOF2::SetInt(Conta(playerid), "Skin", 0);
  471. DOF2::SetInt(Conta(playerid), "Logou", 0);
  472. DOF2::SetInt(Conta(playerid), "Sexo", 0);
  473. DOF2::SetInt(Conta(playerid), "Admin", 0);
  474. DOF2::SetInt(Conta(playerid), "InteriorID", 0);
  475.  
  476. DOF2::SaveFile();
  477.  
  478. Player[playerid][Gasolina] = 30;
  479. Player[playerid][SaldoBanco] = 0;
  480. Player[playerid][ContaBanco] = false;
  481.  
  482. GivePlayerMoney(playerid, 5000);
  483. SendClientMessage(playerid, Azul, "| INFO | Registrado(a) com sucesso!");
  484.  
  485. ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_MSGBOX, "SEXO", "Escolha seu sexo abaixo:", "Masculino", "Feminino");
  486. return 1;
  487. }
  488. if(dialogid == DIALOG_SEXO)
  489. {
  490. if(response)
  491. {
  492. SetSpawnInfo(playerid, 0, 26, 1721.9768, -1608.3345, 13.5469, 360.0000, 0, 0, 0, 0, 0, 0);
  493.  
  494. Player[playerid][Sexo] = MASCULINO;
  495. Player[playerid][Logado] = true;
  496. SpawnPlayer(playerid);
  497. }
  498. else
  499. {
  500. SetSpawnInfo(playerid, 0, 41, 1721.9768, -1608.3345, 13.5469, 360.0000, 0, 0, 0, 0, 0, 0);
  501.  
  502. Player[playerid][Sexo] = FEMININO;
  503. Player[playerid][Logado] = true;
  504. SpawnPlayer(playerid);
  505. }
  506. return 1;
  507. }
  508. if(dialogid == DIALOG_LOCALSPAWN)
  509. {
  510. if(!response) return Kick(playerid);
  511.  
  512. if(listitem == 0)
  513. {
  514. SetSpawnInfo(playerid, 0, Player[playerid][Skin], DOF2::GetFloat(Conta(playerid), "X"), DOF2::GetFloat(Conta(playerid), "Y"), DOF2::GetFloat(Conta(playerid), "Z"), DOF2::GetFloat(Conta(playerid), "A"), 0, 0, 0, 0, 0, 0);
  515. SetPlayerInterior(playerid, Player[playerid][InteriorID]);
  516. Player[playerid][Logado] = true;
  517. SpawnPlayer(playerid);
  518. }
  519. return 1;
  520. }
  521. if(dialogid == DIALOG_ABASTECER)
  522. {
  523. if(response)
  524. {
  525. if(listitem == 0)
  526. {
  527. ShowPlayerDialog(playerid, DIALOG_GASOLINA, DIALOG_STYLE_INPUT, "Gasolina", "{FFFFFF}O Preço da gasolina está {008000}$3.00 {FFFFFF}o Litro!\n\n{FFFFFF}Digite a quantia de gasolina que deseja colocar:", "Abastecer", "Fechar");
  528. }
  529. }
  530. return 1;
  531. }
  532. if(dialogid == DIALOG_GASOLINA)
  533. {
  534. if(response)
  535. {
  536. new string[70], Quantidade = strval(inputtext), Quantia = Quantidade*floatround(3.0);
  537.  
  538. if(Quantidade > 100 || Quantidade <= 0) return SendClientMessage(playerid, Vermelho, "| ERRO | Quantidade Inválida!");
  539. if(GetPlayerMoney(playerid) < Quantia) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem dinheiro suficiente!");
  540.  
  541. format(string, sizeof(string), "| INFO | Você colocou %d Litros de Gasolina por {008000}$%d", Quantidade, Quantia);
  542. SendClientMessage(playerid, Azul, string);
  543.  
  544. Player[playerid][Gasolina] += Quantidade;
  545. GivePlayerMoney(playerid, - Quantia);
  546. }
  547. return 1;
  548. }
  549. if(dialogid == DIALOG_BANCO)
  550. {
  551. if(response)
  552. {
  553. if(listitem == 0)
  554. {
  555. if(Player[playerid][ContaBanco] == true) return SendClientMessage(playerid, Vermelho, "| ERRO | Você já tem uma Conta Bancária!");
  556.  
  557. SendClientMessage(playerid, Azul, "| INFO | Você abriu uma conta Bancária com sucesso! Seu saldo atual é de {008000}$100");
  558. GivePlayerMoney(playerid, -100);
  559. Player[playerid][SaldoBanco] = 100;
  560. Player[playerid][ContaBanco] = true;
  561. }
  562. if(listitem == 1)
  563. {
  564. if(Player[playerid][ContaBanco] == false) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem uma Conta Bancária!");
  565.  
  566. ShowPlayerDialog(playerid, DIALOG_SAQUE, DIALOG_STYLE_INPUT, "Saque", "Digite uma quantia que deseja sacar:", "Sacar", "Fechar");
  567. }
  568. if(listitem == 2)
  569. {
  570. if(Player[playerid][ContaBanco] == false) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem uma Conta Bancária!");
  571.  
  572. ShowPlayerDialog(playerid, DIALOG_DEPOSITO, DIALOG_STYLE_INPUT, "Deposito", "Digite uma quantia que deseja depositar:", "Depositar", "Fechar");
  573. }
  574. if(listitem == 3)
  575. {
  576. if(Player[playerid][ContaBanco] == false) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem uma Conta Bancária!");
  577.  
  578. new string[128];
  579. format(string, sizeof(string), "| INFO | Seu saldo atual é de {008000}$%d", Player[playerid][SaldoBanco]);
  580. SendClientMessage(playerid, Azul, string);
  581. }
  582. }
  583. }
  584. if(dialogid == DIALOG_SAQUE)
  585. {
  586. if(response)
  587. {
  588. if(!strval(inputtext)) return SendClientMessage(playerid, Vermelho, "| ERRO | Digite uma quantia apenas números!");
  589.  
  590. if(strval(inputtext) >= Player[playerid][SaldoBanco]) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem todo esse dinheiro!");
  591.  
  592. GivePlayerMoney(playerid, strval(inputtext));
  593. Player[playerid][SaldoBanco] -= strval(inputtext);
  594.  
  595. new string[128];
  596. format(string, sizeof(string), "| INFO | Você sacou {008000}$%d{1E90FF}. Agora seu Saldo Atual é de {008000}$%d", strval(inputtext), Player[playerid][SaldoBanco]);
  597. SendClientMessage(playerid, Azul, string);
  598. }
  599. }
  600. if(dialogid == DIALOG_DEPOSITO)
  601. {
  602. if(response)
  603. {
  604. if(!strval(inputtext)) return SendClientMessage(playerid, Vermelho, "| ERRO | Digite uma quantia apenas números!");
  605.  
  606. if(Player[playerid][SaldoBanco] >= strval(inputtext)) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem todo esse dinheiro!");
  607.  
  608. Player[playerid][SaldoBanco] += strval(inputtext);
  609. GivePlayerMoney(playerid, - strval(inputtext));
  610.  
  611. new string[128];
  612. format(string, sizeof(string), "| INFO | Você depositou {008000}$%d{1E90FF}. Agora seu Saldo Atual é de {008000}$%d", strval(inputtext), Player[playerid][SaldoBanco]);
  613. SendClientMessage(playerid, Azul, string);
  614. }
  615. }
  616. return 0;
  617. }
  618.  
  619. Float:GetVehicleHealthEx(vehicleid)
  620. {
  621. new Float:Health;
  622. GetVehicleHealth(vehicleid, Health);
  623.  
  624. if(Health > 900.0)
  625. {
  626. return Health / 10.0;
  627. }
  628. else return(Health / 10.0)-(24);
  629. }
  630.  
  631. public UpdatePlayerVelocimetro(playerid)
  632. {
  633. new VehicleID, string[64];
  634.  
  635. if((VehicleID = GetPlayerVehicleID(playerid)) != INVALID_VEHICLE_ID)
  636. {
  637. format(string, sizeof(string), "%02d KM/H", GetVehicleSpeed(VehicleID));
  638. PlayerTextDrawSetString(playerid, TextPlayerVelocimetro[1][playerid], string);
  639.  
  640. format(string, sizeof(string), "%.0f%", GetVehicleHealthEx(VehicleID));
  641. PlayerTextDrawSetString(playerid, TextPlayerVelocimetro[3][playerid], string);
  642.  
  643. format(string, sizeof(string), "%d Litros", Player[playerid][Gasolina]);
  644. PlayerTextDrawSetString(playerid, TextPlayerVelocimetro[2][playerid], string);
  645. }
  646. return 1;
  647. }
  648.  
  649. public Combustivel()
  650. {
  651. foreach(Player, i)
  652. {
  653. if(GetVehicleModel(GetPlayerVehicleID(i)) != 509 || GetVehicleModel(GetPlayerVehicleID(i)) != 510 || GetVehicleModel(GetPlayerVehicleID(i)) != 481)
  654. {
  655. GetPlayerState(i);
  656.  
  657. if(IsPlayerInAnyVehicle(i) == 1)
  658. {
  659. if(GetPlayerVehicleSeat(i) == 0)
  660. {
  661. Player[i][Gasolina]--;
  662. }
  663. }
  664. }
  665. }
  666. return 1;
  667. }
  668.  
  669. Conta(playerid)
  670. {
  671. new File[64];
  672. format(File, sizeof(File), CONTAS, Player[playerid][Nome]);
  673. return File;
  674. }
  675.  
  676. CarregarConta(playerid)
  677. {
  678. if(DOF2::FileExists(Conta(playerid)))
  679. {
  680. SetPlayerScore(playerid, Player[playerid][Level]);
  681. SetPlayerWantedLevel(playerid, Player[playerid][Procurado]);
  682. SetPlayerSkin(playerid, Player[playerid][Skin]);
  683.  
  684. GivePlayerMoney(playerid, DOF2::GetInt(Conta(playerid), "Dinheiro"));
  685. Player[playerid][Level] = DOF2::GetInt(Conta(playerid), "Level");
  686. Player[playerid][Procurado] = DOF2::GetInt(Conta(playerid), "Procurado");
  687. Player[playerid][Skin] = DOF2::GetInt(Conta(playerid), "Skin");
  688. Player[playerid][Logou] = DOF2::GetInt(Conta(playerid), "Logou");
  689. Player[playerid][Sexo] = DOF2::GetInt(Conta(playerid), "Sexo");
  690. Player[playerid][Admin] = DOF2::GetInt(Conta(playerid), "Admin");
  691. Player[playerid][Gasolina] = DOF2::GetInt(Conta(playerid), "Gasolina");
  692. Player[playerid][SaldoBanco] = DOF2::GetInt(Conta(playerid), "SaldoBancario");
  693. Player[playerid][ContaBanco] = DOF2::GetBool(Conta(playerid), "ContaBancaria");
  694.  
  695. Player[playerid][Logou]++;
  696.  
  697. ShowPlayerDialog(playerid, DIALOG_LOCALSPAWN, DIALOG_STYLE_LIST, "Local Spawn:", "Última Posição", "Selecionar", "Sair");
  698. }
  699. return 1;
  700. }
  701.  
  702. SalvarConta(playerid)
  703. {
  704. new Float:Pos[4];
  705. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  706. GetPlayerFacingAngle(playerid, Pos[3]);
  707.  
  708. if(DOF2::FileExists(Conta(playerid)))
  709. {
  710. DOF2::SetInt(Conta(playerid), "Dinheiro", GetPlayerMoney(playerid));
  711. DOF2::SetInt(Conta(playerid), "Level", Player[playerid][Level]);
  712. DOF2::SetInt(Conta(playerid), "Procurado", Player[playerid][Procurado]);
  713. DOF2::SetInt(Conta(playerid), "Skin", Player[playerid][Skin]);
  714. DOF2::SetInt(Conta(playerid), "InteriorID", Player[playerid][InteriorID]);
  715. DOF2::SetInt(Conta(playerid), "Logou", Player[playerid][Logou]);
  716. DOF2::SetInt(Conta(playerid), "Sexo", Player[playerid][Sexo]);
  717. DOF2::SetInt(Conta(playerid), "Admin", Player[playerid][Admin]);
  718. DOF2::SetInt(Conta(playerid), "Gasolina", Player[playerid][Gasolina]);
  719. DOF2::SetInt(Conta(playerid), "SaldoBancario", Player[playerid][SaldoBanco]);
  720. DOF2::SetBool(Conta(playerid), "ContaBancaria", Player[playerid][ContaBanco]);
  721. DOF2::SetFloat(Conta(playerid), "X", Pos[0]);
  722. DOF2::SetFloat(Conta(playerid), "Y", Pos[1]);
  723. DOF2::SetFloat(Conta(playerid), "Z", Pos[2]);
  724. DOF2::SetFloat(Conta(playerid), "A", Pos[3]);
  725.  
  726. DOF2::SaveFile();
  727.  
  728. Player[playerid][Logado] = false;
  729. }
  730. return 1;
  731. }
  732.  
  733. ShowPlayerVelocimetro(playerid)
  734. {
  735. if(PlayerVelocimetro[playerid])
  736. {
  737. return 0;
  738. }
  739. PlayerTextDrawSetString(playerid, TextPlayerVelocimetro[0][playerid], GetVehicleName(GetPlayerVehicleID(playerid)));
  740.  
  741. for( new text; text != 5; text++) TextDrawShowForPlayer(playerid, TextVelocimetro[text]);
  742. for( new text; text != 4; text++) PlayerTextDrawShow(playerid, TextPlayerVelocimetro[text][playerid]);
  743. PlayerVelocimetro[playerid] = true;
  744. PlayerVelocimetroTimer[playerid] = SetTimerEx("UpdatePlayerVelocimetro", 100, true, "i", playerid);
  745. return 1;
  746. }
  747.  
  748. HidePlayerVelocimetro(playerid)
  749. {
  750. if(!PlayerVelocimetro[playerid])
  751. {
  752. return 0;
  753. }
  754. for( new text; text != 5; text++) TextDrawHideForPlayer(playerid, TextVelocimetro[text]);
  755. for( new text; text != 4; text++) PlayerTextDrawHide(playerid, TextPlayerVelocimetro[text][playerid]);
  756. PlayerVelocimetro[playerid] = false;
  757. KillTimer(PlayerVelocimetroTimer[playerid]);
  758. return 1;
  759. }
  760.  
  761. GetVehicleName(VehicleID)
  762. {
  763. new ModeloID = GetVehicleModel(VehicleID);
  764. new NomeVeiculo[75];
  765.  
  766. if(ModeloID < 400 || ModeloID > 611)
  767. {
  768. strcat(NomeVeiculo, "Nenhum");
  769. return NomeVeiculo;
  770. }
  771. strcat(NomeVeiculo, VehicleNames[ModeloID - 400]);
  772. return NomeVeiculo;
  773. }
  774.  
  775. GetVehicleSpeed(VehicleID)
  776. {
  777. new Float:Pos[3];
  778. GetVehicleVelocity(VehicleID, Pos[0], Pos[1], Pos[2]);
  779. return floatround(floatsqroot(Pos[0] * Pos[0] + Pos[1] * Pos[1] + Pos[2] * Pos[2]) * 170.0);
  780. }
  781.  
  782. LoadTextDraws()
  783. {
  784. TextVelocimetro[0] = TextDrawCreate(379.000000, 378.000000, "i");
  785. TextDrawBackgroundColor(TextVelocimetro[0], 0);
  786. TextDrawFont(TextVelocimetro[0], 2);
  787. TextDrawLetterSize(TextVelocimetro[0], 28.800073, 2.600000);
  788. TextDrawColor(TextVelocimetro[0], 80);
  789. TextDrawSetOutline(TextVelocimetro[0], 0);
  790. TextDrawSetProportional(TextVelocimetro[0], 1);
  791. TextDrawSetShadow(TextVelocimetro[0], 1);
  792. TextDrawSetSelectable(TextVelocimetro[0], 0);
  793.  
  794. TextVelocimetro[1] = TextDrawCreate(379.000000, 392.000000, "i");
  795. TextDrawBackgroundColor(TextVelocimetro[1], 0);
  796. TextDrawFont(TextVelocimetro[1], 2);
  797. TextDrawLetterSize(TextVelocimetro[1], 28.800073, 2.600000);
  798. TextDrawColor(TextVelocimetro[1], 80);
  799. TextDrawSetOutline(TextVelocimetro[1], 0);
  800. TextDrawSetProportional(TextVelocimetro[1], 1);
  801. TextDrawSetShadow(TextVelocimetro[1], 1);
  802. TextDrawSetSelectable(TextVelocimetro[1], 0);
  803.  
  804. TextVelocimetro[2] = TextDrawCreate(379.000000, 406.000000, "i");
  805. TextDrawBackgroundColor(TextVelocimetro[2], 0);
  806. TextDrawFont(TextVelocimetro[2], 2);
  807. TextDrawLetterSize(TextVelocimetro[2], 28.800073, 2.600000);
  808. TextDrawColor(TextVelocimetro[2], 80);
  809. TextDrawSetOutline(TextVelocimetro[2], 0);
  810. TextDrawSetProportional(TextVelocimetro[2], 1);
  811. TextDrawSetShadow(TextVelocimetro[2], 1);
  812. TextDrawSetSelectable(TextVelocimetro[2], 0);
  813.  
  814. TextVelocimetro[3] = TextDrawCreate(379.000000, 420.000000, "i");
  815. TextDrawBackgroundColor(TextVelocimetro[3], 0);
  816. TextDrawFont(TextVelocimetro[3], 2);
  817. TextDrawLetterSize(TextVelocimetro[3], 28.800073, 2.600000);
  818. TextDrawColor(TextVelocimetro[3], 80);
  819. TextDrawSetOutline(TextVelocimetro[3], 0);
  820. TextDrawSetProportional(TextVelocimetro[3], 1);
  821. TextDrawSetShadow(TextVelocimetro[3], 1);
  822. TextDrawSetSelectable(TextVelocimetro[3], 0);
  823.  
  824. TextVelocimetro[4] = TextDrawCreate(531.000000, 387.000000, "Carro~n~~n~Velocidade~n~~n~Combustivel~n~~n~Lataria");
  825. TextDrawAlignment(TextVelocimetro[4], 3);
  826. TextDrawBackgroundColor(TextVelocimetro[4], 0);
  827. TextDrawFont(TextVelocimetro[4], 2);
  828. TextDrawLetterSize(TextVelocimetro[4], 0.210000, 0.799999);
  829. TextDrawColor(TextVelocimetro[4], -186);
  830. TextDrawSetOutline(TextVelocimetro[4], 0);
  831. TextDrawSetProportional(TextVelocimetro[4], 1);
  832. TextDrawSetShadow(TextVelocimetro[4], 1);
  833. TextDrawSetSelectable(TextVelocimetro[4], 0);
  834. return 1;
  835. }
  836.  
  837. CMD:abastecer(playerid, params[])
  838. {
  839. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não está em um veículo!");
  840. if(Player[playerid][Gasolina] >= 50) return SendClientMessage(playerid, Vermelho, "| ERRO | Você já tem muita Gasolina!");
  841. ShowPlayerDialog(playerid, DIALOG_ABASTECER, DIALOG_STYLE_LIST, "Abastecer", "Gasolina", "Selecionar", "Fechar");
  842. return 1;
  843. }
  844.  
  845. CMD:setadmin(playerid, params[])
  846. {
  847. new ID, Cargo, string[128];
  848.  
  849. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  850. if(sscanf(params, "ud", ID, Cargo)) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /SetAdmin [ID] [Cargo]");
  851. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  852. if(Cargo >= 4) return SendClientMessage(playerid, Vermelho, "| ERRO | Cargo Inválido!");
  853.  
  854. if(Cargo == 1)
  855. {
  856. Player[playerid][Admin] = 1;
  857. format(string, sizeof(string), "| INFO-SERVER | O(A) Rcon %s (%d) Promoveu o(a) jogador(a) %s (%d) para Ajudante!", Player[playerid][Nome], playerid, Player[ID][Nome], ID);
  858. SendClientMessageToAll(Azul, string);
  859. }
  860. if(Cargo == 2)
  861. {
  862. Player[playerid][Admin] = 2;
  863. format(string, sizeof(string), "| INFO-SERVER | O(A) Rcon %s (%d) Promoveu o(a) jogador(a) %s (%d) para Moderador(a)!", Player[playerid][Nome], playerid, Player[ID][Nome], ID);
  864. SendClientMessageToAll(Azul, string);
  865. }
  866. if(Cargo == 3)
  867. {
  868. Player[playerid][Admin] = 3;
  869. format(string, sizeof(string), "| INFO-SERVER | O(A) Rcon %s (%d) Promoveu o(a) jogador(a) %s (%d) para Administrador(a)!", Player[playerid][Nome], playerid, Player[ID][Nome], ID);
  870. SendClientMessageToAll(Azul, string);
  871. }
  872. if(Cargo == 0)
  873. {
  874. Player[playerid][Admin] = 0;
  875. format(string, sizeof(string), "| INFO-SERVER | O(A) Rcon %s (%d) Retirou o(a) jogador(a) %s (%d) da Staff!", Player[playerid][Nome], playerid, Player[ID][Nome], ID);
  876. SendClientMessageToAll(Azul, string);
  877. }
  878. return 1;
  879. }
  880. CMD:veh(playerid, params[])
  881. {
  882. new Veiculo, Modelo, Color[2], Float:Pos[4], string[70];
  883.  
  884. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  885. if(sscanf(params, "ddd", Modelo, Color[0], Color[1])) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /Veh [Modelo] [Color1] [Color2]");
  886. if(Modelo < 400 || Modelo > 611) return SendClientMessage(playerid, Vermelho, "| ERRO | Veículo Inválido!");
  887.  
  888. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  889. GetPlayerFacingAngle(playerid, Pos[3]);
  890.  
  891. Veiculo = CreateVehicle(Modelo, Pos[0], Pos[1], Pos[2], Pos[3], Color[0], Color[1], 0);
  892. PutPlayerInVehicle(playerid, Veiculo, 0);
  893.  
  894. format(string, sizeof(string), "| INFO | Você criou o Veículo ID: {FF0000}%d", Modelo);
  895. SendClientMessage(playerid, Azul, string);
  896. return 1;
  897. }
  898. CMD:dargrana(playerid, params[])
  899. {
  900. new ID, Grana, string[128];
  901.  
  902. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3)
  903. {
  904. if(sscanf(params, "ud", ID, Grana)) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /DarGrana [ID] [Grana]");
  905. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  906. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Deu para você {008000}$%d {1E90FF}de dinheiro!", Player[playerid][Nome], playerid, Grana);
  907. SendClientMessage(ID, Azul, string);
  908. GivePlayerMoney(ID, Grana);
  909. }
  910. else
  911. {
  912. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  913. }
  914. return 1;
  915. }
  916. CMD:dararma(playerid, params[])
  917. {
  918. new ID, Arma, Municao, string[128];
  919.  
  920. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3)
  921. {
  922. if(sscanf(params, "udd", ID, Arma, Municao)) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /DarArma [ID] [Arma] [Munição]");
  923. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  924. if(Municao < 0 || Municao > 9999) return SendClientMessage(playerid, Vermelho, "| ERRO | Munição Inválida!");
  925. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Gerou a arma ID: {FF0000}%d {1E90FF}com {FF0000}%d {1E90FF}Munições!", Player[playerid][Nome], playerid, Arma, Municao);
  926. SendClientMessage(ID, Azul, string);
  927. GivePlayerWeapon(ID, Arma, Municao);
  928. }
  929. else
  930. {
  931. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  932. }
  933. return 1;
  934. }
  935. CMD:setlevel(playerid, params[])
  936. {
  937. new ID, string[128];
  938.  
  939. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3)
  940. {
  941. if(sscanf(params, "ud", ID, Player[ID][Level])) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /SetLevel [ID] [Level]");
  942. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  943. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Setou seu level para {FF0000}%d", Player[playerid][Nome], playerid, Player[ID][Level]);
  944. SendClientMessage(ID, Azul, string);
  945. SetPlayerScore(ID, Player[ID][Level]);
  946. }
  947. else
  948. {
  949. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  950. }
  951. return 1;
  952. }
  953. CMD:setskin(playerid, params[])
  954. {
  955. new ID, string[128];
  956.  
  957. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3)
  958. {
  959. if(sscanf(params, "ud", ID, Player[ID][Skin])) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /SetSkin [ID] [Skin]");
  960. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  961. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Setou sua skin para {FF0000}%d", Player[playerid][Nome], playerid, Player[ID][Skin]);
  962. SendClientMessage(ID, Azul, string);
  963. SetPlayerScore(ID, Player[ID][Skin]);
  964. }
  965. else
  966. {
  967. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  968. }
  969. return 1;
  970. }
  971. CMD:resetargrana(playerid, params[])
  972. {
  973. new ID, string[128];
  974.  
  975. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3)
  976. {
  977. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /ResetarGrana [ID]");
  978. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  979. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Resetou seu dinheiro!", Player[playerid][Nome], playerid);
  980. SendClientMessage(ID, Azul, string);
  981. ResetPlayerMoney(ID);
  982. }
  983. else
  984. {
  985. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  986. }
  987. return 1;
  988. }
  989. CMD:desarmar(playerid, params[])
  990. {
  991. new ID, string[128];
  992.  
  993. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3)
  994. {
  995. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /Desarmar [ID]");
  996. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  997. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Desarmou você", Player[playerid][Nome], playerid);
  998. SendClientMessage(ID, Azul, string);
  999. ResetPlayerWeapons(ID);
  1000. }
  1001. else
  1002. {
  1003. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  1004. }
  1005. return 1;
  1006. }
  1007. CMD:congelar(playerid, params[])
  1008. {
  1009. new ID, string[128];
  1010.  
  1011. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3 || Player[playerid][Admin] == 2 || Player[playerid][Admin] == 1)
  1012. {
  1013. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /Congelar [ID]");
  1014. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  1015. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Congelou você!", Player[playerid][Nome], playerid);
  1016. SendClientMessage(ID, Azul, string);
  1017. TogglePlayerControllable(ID, 0);
  1018. }
  1019. else
  1020. {
  1021. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  1022. }
  1023. return 1;
  1024. }
  1025. CMD:descongelar(playerid, params[])
  1026. {
  1027. new ID, string[128];
  1028.  
  1029. if(IsPlayerAdmin(playerid) || Player[playerid][Admin] == 3 || Player[playerid][Admin] == 2 || Player[playerid][Admin] == 1)
  1030. {
  1031. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | Use: /Descongelar [ID]");
  1032. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, Vermelho, "| ERRO | ID Inválido!");
  1033. format(string, sizeof(string), "| INFO | O(A) Administrador(a) %s (%d) Descongelou você!", Player[playerid][Nome], playerid);
  1034. SendClientMessage(ID, Azul, string);
  1035. TogglePlayerControllable(ID, 1);
  1036. }
  1037. else
  1038. {
  1039. SendClientMessage(playerid, Vermelho, "| ERRO | Você não tem permissão!");
  1040. }
  1041. return 1;
  1042. }
Advertisement
Add Comment
Please, Sign In to add comment