Advertisement
LeonardoBradoks

Criando Sistema de Registro e Login com Ativação por Email

Oct 13th, 2018
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.63 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf2>
  3. #include <zcmd>
  4. #include <cpstream>
  5. #include <DOF2>
  6.  
  7. #define MAILER_URL "leonardobradoks.000webhostapp.com/sendmailer.php"
  8. #include <mailer>
  9.  
  10. /*-- definições de gangs --*/
  11. #define GANG_YAKUZA 1
  12. #define GANG_GROOVE_STREET 2
  13. #define GANG_BALLAS 3
  14.  
  15. /*-- definições de pastas --*/
  16. #define PASTA_CONTAS "Contas/%s.ini"
  17. #define EMAIL_SERVIDOR "leobradoks@outlook.com"
  18.  
  19. /*-- definições de menus --*/
  20. #define DIALOG_MENU_KIT 1001
  21. #define DIALOG_MULTAS 1002
  22. #define DIALOG_MENU_DETRAN 1003
  23. #define DIALOG_MENU_DETRAN_CONSULTAR 1004
  24. #define DIALOG_MENU_DETRAN_PAGARMULTAS 1005
  25. #define DIALOG_PAGAR_MULTAS 1006
  26. #define DIALOG_REGISTRO 1007
  27. #define DIALOG_LOGIN 1008
  28. #define DIALOG_EMAIL 1009
  29. #define DIALOG_RECUPERAR 1010
  30. #define DIALOG_RECUPERAR_CODIGO 1011
  31. #define DIALOG_ATIVAR_CONTA 1012
  32.  
  33. forward UpdateRadar();
  34. forward LiberarPlayerMulta(playerid);
  35.  
  36. enum pBradoks {
  37. pGang,
  38. bool:pMulta = false,
  39. pTimerMulta,
  40. pValorDaMulta,
  41. pIDdoVeiculo,
  42. pSenhaInvalida,
  43. pCodigoRecuperar,
  44. pCodigoAtivarConta,
  45. bool:pRegistroNaoConcluido
  46. }
  47. new PlayerBradoks[MAX_PLAYERS][pBradoks];
  48. new BRADOKS_VEHICLES = 1;
  49. new bool:Contagem[MAX_PLAYERS] = false;
  50.  
  51. new RankClassNames[][] = { /*-- 52 PATENTES --*/
  52. "Novato" , "Taifeiro 2ª Classe" , "Taifeiro 1ª Classe" , "Cabo" , "Sargento" ,
  53. "Terceiro-Sargento 1" , "Terceiro-Sargento 2" , "Terceiro-Sargento 3" , "Segundo-Sargento 1" , "Segundo-Sargento 2" ,
  54. "Segundo-Sargento 3" , "Segundo-Sargento 4" , "Primeiro-Sargento 1" , "Primeiro-Sargento 2" , "Primeiro-Sargento 3" ,
  55. "Primeiro-Sargento 4" , "Primeiro-Sargento 5" , "Segundo-Tenente 1" , "Segundo-Tenente 2" , "Segundo-Tenente 3" ,
  56. "Segundo-Tenente 4" , "Primeiro-Tenente 1" , "Primeiro-Tenente 2" , "Primeiro-Tenente 3" , "Primeiro-Tenente 4" ,
  57. "Primeiro-Tenente 5" , "Capitão 1" , "Capitão 2" , "Capitão 3" , "Capitão 4" ,
  58. "Capitão 5" , "Major 1" , "Major 2" , "Major 3" , "Major 4" ,
  59. "Major 5" , "Tenente-Coronel 1" , "Tenente-Coronel 2" , "Tenente-Coronel 3" , "Tenente-Coronel 4" ,
  60. "Tenente-Coronel 5" , "Coronel 1" , "Coronel 2" , "Coronel 3" , "Coronel 4" ,
  61. "Coronel 5" , "General de Brigada" , "General de Divisão" , "General de Exército" , "Marechal" ,
  62. "Herói de Guerra" , "Lendário"
  63. };
  64.  
  65. new RankClassColors[] = { /*-- 52 CORES --*/
  66. 0xFFFFFFAA, 0x400040AA, 0xC0C0C0AA, 0x408080AA, 0x808080AA,
  67. 0x808040AA, 0x808000AA, 0x000000AA, 0x400080AA, 0x8C008CAA,
  68. 0x000040AA, 0x000080AA, 0x004040AA, 0x004000AA, 0x804000AA,
  69. 0x400000AA, 0x8000FFAA, 0x800080AA, 0x0000A0AA, 0x0000FFAA,
  70. 0x008040AA, 0x008000AA, 0xFF8000AA, 0x800000AA, 0xFF0080AA,
  71. 0x800040AA, 0x8080FFAA, 0x004080AA, 0x008080AA, 0x00FF00AA,
  72. 0xFF8040AA, 0x804040AA, 0xFF00FFAA, 0x8080C0AA, 0x0080C0AA,
  73. 0x00FFFFAA, 0x00FF40AA, 0x80FF00AA, 0xFFFF00AA, 0xFF0000AA,
  74. 0xFF80FFAA, 0xFF80C0AA, 0x0080FFAA, 0x80FFFFAA, 0x00FF80AA,
  75. 0x80FF80AA, 0xFFFF80AA, 0xFF8080AA, 0xCC0066AA, 0xFF4242AA,
  76. 0xF90000AA, 0xDD0000AA
  77. };
  78.  
  79. enum vBradoks {
  80. vVeiculoIDX,
  81. vPlaca[9],
  82. vValorMulta,
  83. vTotalMultas,
  84. }
  85. new VeiculoBradoks[MAX_VEHICLES][vBradoks];
  86.  
  87. new PortaoHSLS[2],
  88. bool:PortaoHSLSEAberto = false,
  89. bool:PortaoHSLSDAberto = false;
  90.  
  91. enum pPickupID {
  92. pEntradaDetranSF,
  93. pSaidaDetranSF
  94. }
  95. new PickupBradoks[pPickupID];
  96.  
  97. enum pCheckID {
  98. pCheckDetranMenu
  99. }
  100. new CheckBradoks[pCheckID];
  101.  
  102. new VehicleNames[][] =
  103. {
  104. "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  105. "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  106. "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  107. "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  108. "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  109. "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  110. "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  111. "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  112. "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  113. "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  114. "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  115. "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  116. "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  117. "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  118. "Blista Compact", "Police Maverick", "Boxville", "Benson", "Mesa", "RC Goblin",
  119. "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  120. "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  121. "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  122. "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  123. "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  124. "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  125. "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  126. "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  127. "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
  128. "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  129. "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  130. "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  131. "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  132. "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  133. "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  134. "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
  135. "Tiller", "Utility Trailer"
  136. };
  137.  
  138. main()
  139. {
  140. print("\n----------------------------------");
  141. print(" Blank Gamemode by your name here");
  142. print("----------------------------------\n");
  143. }
  144.  
  145. public OnGameModeInit()
  146. {
  147. SetGameModeText("Blank Script");
  148. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  149. SetTimer("UpdateRadar", 400, true);
  150. DisableInteriorEnterExits();
  151.  
  152. VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX] = AddStaticVehicle(560,2038.6934,1319.2219,10.3783,179.8767,-1,-1); // Carro Público LV 1
  153. SetVehicleNumberPlateEx(VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX], "PUB-2018"); BRADOKS_VEHICLES ++;
  154. VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX] = AddStaticVehicle(565,2038.7120,1328.0275,10.3782,179.8766,-1,-1); // Carro Público LV 2
  155. SetVehicleNumberPlateEx(VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX], "PUB-2019"); BRADOKS_VEHICLES ++;
  156. VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX] = AddStaticVehicle(585,2038.7369,1339.4006,10.3782,179.8766,-1,-1); // Carro Público LV 3
  157. SetVehicleNumberPlateEx(VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX], "PUB-2020"); BRADOKS_VEHICLES ++;
  158. VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX] = AddStaticVehicle(565,2038.7646,1352.3700,10.3776,179.8763,-1,-1); // Carro Público LV 4
  159. SetVehicleNumberPlateEx(VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX], "PUB-2021"); BRADOKS_VEHICLES ++;
  160. VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX] = AddStaticVehicle(585,2038.7971,1367.3813,10.3779,179.8762,-1,-1); // Carro Público LV 5
  161. SetVehicleNumberPlateEx(VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX], "PUB-2022"); BRADOKS_VEHICLES ++;
  162. VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX] = AddStaticVehicle(560,2038.8286,1382.0822,10.3781,179.8761,-1,-1); // Carro Público LV 6
  163. SetVehicleNumberPlateEx(VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX], "PUB-2023"); BRADOKS_VEHICLES ++;
  164.  
  165.  
  166. /*-- PORTÕES DO HOSPITAL DE LS PRÓXIMO AO GROOVE STREET --*/
  167. PortaoHSLS[0] = CreateObject(2933,1999.9000000,-1442.5000000,14.3000000,0.0000000,0.0000000,316.0000000); //portão esquerdo p Original fechado
  168. PortaoHSLS[1] = CreateObject(2933,2005.6000000,-1448.0000000,14.3000000,0.0000000,0.0000000,315.9950000); //portão direito p Original fechado
  169.  
  170. /*-- RADARES --*/
  171. CreateObject(18880, 2055.10352, 1338.94104, 9.85640, 0.00000, 0.00000, 0.00000);
  172. CreateObject(18880, 2037.11914, 1338.99243, 9.85640, 0.00000, 0.00000, 0.00000);
  173. CreateObject(18880, 2077.61694, 1417.69373, 9.85640, 0.00000, 0.00000, -180.09801);
  174. CreateObject(18880, 2059.66455, 1417.75464, 9.85640, 0.00000, 0.00000, -180.09801);
  175.  
  176. /*-- PICKUPS --*/
  177. PickupBradoks[pEntradaDetranSF] = CreatePickup(19132, 1, 2364.3064,2377.5967,10.8203);
  178. PickupBradoks[pSaidaDetranSF] = CreatePickup(1318, 1, 390.2981,173.7916,1008.3828);
  179.  
  180. Create3DTextLabel("{FFD700}DETRAN\n{FFFFFF}De\n{2E8B57}San Fierro\n{FFFFFF}Aperte '{B22222}F{FFFFFF}' para Entrar", -1, 2364.3064,2377.5967,10.8203, 30.0, 0);
  181. Create3DTextLabel("{FFD700}DETRAN\n{FFFFFF}De\n{2E8B57}San Fierro\n{FFFFFF}Aperte '{B22222}F{FFFFFF}' para Sair", -1, 390.2981,173.7916,1008.3828, 30.0, 0);
  182. Create3DTextLabel("{FFD700}DETRAN\n{FFFFFF}De\n{2E8B57}San Fierro\n{FFFFFF}Consultas e Pagamentos de Multas", -1, 358.7964,178.6017,1008.3828, 20.0, 0);
  183.  
  184. CheckBradoks[pCheckDetranMenu] = CPS_AddCheckpoint(358.7964,178.6017,1008.3828, 1.0, 20);
  185. return 1;
  186. }
  187.  
  188. public OnGameModeExit()
  189. {
  190. DOF2_Exit();
  191. return 1;
  192. }
  193.  
  194. public OnPlayerRequestClass(playerid, classid)
  195. {
  196. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  197. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  198. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  199. new string[500];
  200. if(DOF2_FileExists(GetPlayerAccount(playerid))) {
  201. /*-- Login --*/
  202. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{FFFFFF}Status: {00FF00}Conta registrada\n\n{FFFFFF}Nick: {FF0000}%s\n{FFFFFF}Level: {FF0000}%d\n{FFFFFF}Patente: {FF0000}%s\n\n{ffbc59}* {FFFFFF}Insira sua senha para efetuar login! {ffbc59}*", GetPlayerNome(playerid), DOF2_GetInt(GetPlayerAccount(playerid), "Level"), DOF2_GetString(GetPlayerAccount(playerid), "Patente"));
  203. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[LBS] Sistema de Login", string, "Entrar", "Recuperar");
  204. } else {
  205. /*-- Registro --*/
  206. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{FFFFFF}Status: {FF0000}Conta não registrada\n\n{FFFFFF}Nick: {FF0000}%s\n\n{ffbc59}* {FFFFFF}Insira uma senha para registrar sua conta! {ffbc59}*", GetPlayerNome(playerid));
  207. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "[LBS] Sistema de Registro", string, "Registrar", "Sair");
  208. }
  209. return 1;
  210. }
  211.  
  212. public OnPlayerConnect(playerid)
  213. {
  214. SetPlayerMapIcon(playerid, 1, 2364.3064,2377.5967,10.8203, 24, 0, MAPICON_GLOBAL);
  215. return 1;
  216. }
  217.  
  218. public OnPlayerDisconnect(playerid, reason)
  219. {
  220. PlayerBradoks[playerid][pSenhaInvalida] = 0;
  221. PlayerBradoks[playerid][pCodigoRecuperar] = 0;
  222. PlayerBradoks[playerid][pCodigoAtivarConta] = 0;
  223. if(PlayerBradoks[playerid][pRegistroNaoConcluido] == true) { DOF2_RemoveFile(GetPlayerAccount(playerid)); }
  224. return 1;
  225. }
  226.  
  227. public OnPlayerSpawn(playerid)
  228. {
  229. new string[128];
  230. format(string, sizeof(string), "{4169E1}Olá {FFFFFF}%s {4169E1}seja bem vindo(a)%sPatente: {FFFFFF}%s", GetPlayerNome(playerid), GetPlayerScore(playerid) == 0 ? (" ") : (" novamente "), RankClassNames[GetPlayerPatente(playerid)]);
  231. SendClientMessage(playerid, -1, string);
  232. SetPlayerColor(playerid, RankClassColors[GetPlayerPatente(playerid)]);
  233. return 1;
  234. }
  235.  
  236. public OnPlayerDeath(playerid, killerid, reason)
  237. {
  238. return 1;
  239. }
  240.  
  241. public OnVehicleSpawn(vehicleid)
  242. {
  243. return 1;
  244. }
  245.  
  246. public OnVehicleDeath(vehicleid, killerid)
  247. {
  248. return 1;
  249. }
  250.  
  251. public OnPlayerText(playerid, text[])
  252. {
  253. return 1;
  254. }
  255.  
  256. public OnPlayerCommandText(playerid, cmdtext[])
  257. {
  258. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  259. {
  260. // Do something here
  261. return 1;
  262. }
  263. return 0;
  264. }
  265.  
  266. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  267. {
  268. return 1;
  269. }
  270.  
  271. public OnPlayerExitVehicle(playerid, vehicleid)
  272. {
  273. return 1;
  274. }
  275.  
  276. public OnPlayerStateChange(playerid, newstate, oldstate)
  277. {
  278.  
  279. return 1;
  280. }
  281.  
  282. public OnPlayerEnterCheckpoint(playerid)
  283. {
  284. if(CPS_IsPlayerInCheckpoint(playerid, CheckBradoks[pCheckDetranMenu])) {/*-- Checkpoint Detran Menu --*/
  285. ShowPlayerDialog(playerid, DIALOG_MENU_DETRAN, DIALOG_STYLE_LIST, "DETRAN - SF", "Consultar Multas\nPagar Multas", "Selecionar", "Fechar");
  286. }
  287. return 1;
  288. }
  289.  
  290. public OnPlayerLeaveCheckpoint(playerid)
  291. {
  292. return 1;
  293. }
  294.  
  295. public OnPlayerEnterRaceCheckpoint(playerid)
  296. {
  297. return 1;
  298. }
  299.  
  300. public OnPlayerLeaveRaceCheckpoint(playerid)
  301. {
  302. return 1;
  303. }
  304.  
  305. public OnRconCommand(cmd[])
  306. {
  307. return 1;
  308. }
  309.  
  310. public OnPlayerRequestSpawn(playerid)
  311. {
  312. return 1;
  313. }
  314.  
  315. public OnObjectMoved(objectid)
  316. {
  317. return 1;
  318. }
  319.  
  320. public OnPlayerObjectMoved(playerid, objectid)
  321. {
  322. return 1;
  323. }
  324.  
  325. public OnPlayerPickUpPickup(playerid, pickupid)
  326. {
  327. if(pickupid == PickupBradoks[pEntradaDetranSF]) {
  328. SendClientMessage(playerid, -1, "[ DETRAN SF ] {2F4F4F}Aperte {FFFFFF}'{2F4F4F}F{FFFFFF}' {2F4F4F}para entrar ou use: {FFFFFF}/entrar");
  329. }
  330. else if(pickupid == PickupBradoks[pSaidaDetranSF]) {
  331. SendClientMessage(playerid, -1, "[ DETRAN SF ] {2F4F4F}Aperte {FFFFFF}'{2F4F4F}F{FFFFFF}' {2F4F4F}para sair ou use: {FFFFFF}/sair");
  332. }
  333. return 1;
  334. }
  335.  
  336. public OnVehicleMod(playerid, vehicleid, componentid)
  337. {
  338. return 1;
  339. }
  340.  
  341. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  342. {
  343. return 1;
  344. }
  345.  
  346. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  347. {
  348. return 1;
  349. }
  350.  
  351. public OnPlayerSelectedMenuRow(playerid, row)
  352. {
  353. return 1;
  354. }
  355.  
  356. public OnPlayerExitedMenu(playerid)
  357. {
  358. return 1;
  359. }
  360.  
  361. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  362. {
  363. return 1;
  364. }
  365.  
  366. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  367. {
  368. if((newkeys == 2) && IsPlayerInAnyVehicle(playerid)) { /*-- Portão Esquerdo Abrindo --*/
  369. if(IsPlayerInRangeOfPoint(playerid, 6.0, 2001.5627,-1434.9376,14.0625) || IsPlayerInRangeOfPoint(playerid, 6.0, 1992.9233,-1442.9767,13.1851)) {
  370. if(PortaoHSLSEAberto == false) {
  371. MoveObject(PortaoHSLS[0], 1997.2000000,-1434.1000000,14.3000000, 5.0, 0.0000000,0.0000000,270.0000000);
  372. PortaoHSLSEAberto = true;
  373. } else { /*-- Portão Esquerdo Fechando --*/
  374. MoveObject(PortaoHSLS[0], 1999.9000000,-1442.5000000,14.3000000, 5.0, 0.0000000,0.0000000,316.0000000);
  375. PortaoHSLSEAberto = false;
  376. }
  377. } /*-- Portão Direito Abrindo --*/
  378. else if(IsPlayerInRangeOfPoint(playerid, 6.0, 2010.7794,-1446.5564,13.6373) || IsPlayerInRangeOfPoint(playerid, 6.0, 2001.3469,-1453.4921,13.2596)) {
  379. if(PortaoHSLSDAberto == false) {
  380. MoveObject(PortaoHSLS[1], 2012.8000000,-1450.8000000,14.3000000, 5.0, 0.0000000,0.0000000,359.9940000);
  381. PortaoHSLSDAberto = true;
  382. } else { /*-- Portão Direito Fechando --*/
  383. MoveObject(PortaoHSLS[1], 2005.6000000,-1448.0000000,14.3000000, 5.0, 0.0000000,0.0000000,315.9950000);
  384. PortaoHSLSDAberto = false;
  385. }
  386. }
  387. }
  388. if(newkeys == KEY_SECONDARY_ATTACK) {
  389. if(IsPlayerInRangeOfPoint(playerid, 3.0, 2364.3064,2377.5967,10.8203)) { /*-- Entrada Detran SF --*/
  390. SetPlayerInterior(playerid, 3);
  391. SetPlayerFacingAngle(playerid, 89.4206);
  392. SetPlayerPos(playerid, 387.3808,173.8342,1008.3828);
  393. }
  394. else if(IsPlayerInRangeOfPoint(playerid, 3.0, 390.2981,173.7916,1008.3828)) { /*-- Saida Detran SF --*/
  395. SetPlayerInterior(playerid, 0);
  396. SetPlayerFacingAngle(playerid, 90.4796);
  397. SetPlayerPos(playerid, 2361.9072,2377.7593,10.8203);
  398. }
  399. }
  400. return 1;
  401. }
  402.  
  403. public OnRconLoginAttempt(ip[], password[], success)
  404. {
  405. return 1;
  406. }
  407.  
  408. public OnPlayerUpdate(playerid)
  409. {
  410. return 1;
  411. }
  412.  
  413. public OnPlayerStreamIn(playerid, forplayerid)
  414. {
  415. return 1;
  416. }
  417.  
  418. public OnPlayerStreamOut(playerid, forplayerid)
  419. {
  420. return 1;
  421. }
  422.  
  423. public OnVehicleStreamIn(vehicleid, forplayerid)
  424. {
  425. return 1;
  426. }
  427.  
  428. public OnVehicleStreamOut(vehicleid, forplayerid)
  429. {
  430. return 1;
  431. }
  432.  
  433. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  434. {
  435. switch(dialogid) {
  436. case DIALOG_LOGIN: {
  437. new string[500];
  438. if(response) { /*-- BOTÃO DE ENTRAR --*/
  439. if(!strlen(inputtext)) {
  440. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não digitou sua senha para entrar na sua conta !");
  441. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{FFFFFF}Status: {00FF00}Conta registrada\n\n{FFFFFF}Nick: {FF0000}%s\n{FFFFFF}Level: {FF0000}%d\n{FFFFFF}Patente: {FF0000}%s\n\n{ffbc59}* {FFFFFF}Insira sua senha para efetuar login! {ffbc59}*", GetPlayerNome(playerid), DOF2_GetInt(GetPlayerAccount(playerid), "Level"), DOF2_GetString(GetPlayerAccount(playerid), "Patente"));
  442. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[LBS] Sistema de Login", string, "Entrar", "Recuperar");
  443. } else {
  444. if(strfind(inputtext, DOF2_GetString(GetPlayerAccount(playerid), "Senha"), true) != -1) {
  445. SendClientMessage(playerid, -1, "[•»] {ffbc59}Login efetuado com sucesso, tenha um bom jogo !");
  446. SpawnPlayer(playerid);
  447. return 1;
  448. } else {
  449. PlayerBradoks[playerid][pSenhaInvalida]++;
  450. if(PlayerBradoks[playerid][pSenhaInvalida] == 3) return Kick(playerid);
  451. format(string, sizeof(string), "[ ERRO ] {FF0000}Senha inválida ! tentativas [{FFFFFF}%d{FF0000}/{FFFFFF}3]", PlayerBradoks[playerid][pSenhaInvalida]);
  452. SendClientMessage(playerid, -1, string);
  453. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{FFFFFF}Status: {00FF00}Conta registrada\n\n{FFFFFF}Nick: {FF0000}%s\n{FFFFFF}Level: {FF0000}%d\n{FFFFFF}Patente: {FF0000}%s\n\n{ffbc59}* {FFFFFF}Insira sua senha para efetuar login! {ffbc59}*", GetPlayerNome(playerid), DOF2_GetInt(GetPlayerAccount(playerid), "Level"), DOF2_GetString(GetPlayerAccount(playerid), "Patente"));
  454. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[LBS] Sistema de Login", string, "Entrar", "Recuperar");
  455. }
  456. }
  457. } else { /*-- BOTÃO DE RECUPERAR --*/
  458. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o e-mail cadastrado na sua conta para prosseguir com a recuperação de acesso! {ffbc59}*");
  459. ShowPlayerDialog(playerid, DIALOG_RECUPERAR, DIALOG_STYLE_INPUT, "[LBS] Sistema de Recuperação de Acesso", string, "Recuperar", "Voltar");
  460. }
  461. return 1;
  462. }
  463. case DIALOG_REGISTRO: {
  464. if(response) { /*-- BOTÃO DE REGISTRAR --*/
  465. if(!strlen(inputtext)) {
  466. new string[500];
  467. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não digitou uma senha para registrar sua conta !");
  468. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{FFFFFF}Status: {FF0000}Conta não registrada\n\n{FFFFFF}Nick: {FF0000}%s\n\n{ffbc59}* {FFFFFF}Insira uma senha para registrar sua conta! {ffbc59}*", GetPlayerNome(playerid));
  469. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "[LBS] Sistema de Registro", string, "Registrar", "Sair");
  470. } else {
  471. DOF2_CreateFile(GetPlayerAccount(playerid));
  472. DOF2_SetString(GetPlayerAccount(playerid), "Nick", GetPlayerNome(playerid));
  473. DOF2_SetString(GetPlayerAccount(playerid), "Senha", inputtext);
  474. DOF2_SetInt(GetPlayerAccount(playerid), "Level", 0);
  475. DOF2_SetString(GetPlayerAccount(playerid), "Patente", "Novato");
  476. DOF2_SetInt(GetPlayerAccount(playerid), "Dinheiro", 5000);
  477. DOF2_SaveFile();
  478. PlayerBradoks[playerid][pRegistroNaoConcluido] = true;
  479. new string[500];
  480. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira um e-mail válido caso precise futuramente recuperar sua conta! {ffbc59}*");
  481. ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "[LBS] Sistema de Registro", string, "Registrar", "Sair");
  482. return 1;
  483. }
  484. } else { /*-- BOTÃO DE SAIR --*/
  485. Kick(playerid);
  486. }
  487. return 1;
  488. }
  489. case DIALOG_EMAIL: {
  490. if(response) { /*-- BOTÃO REGISTRAR EMAIL --*/
  491. new string[500];
  492. if(!strlen(inputtext)) {
  493. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não digitou um e-mail válido para caso precise recuperar sua conta !");
  494. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira um e-mail válido caso precise futuramente recuperar sua conta! {ffbc59}*");
  495. ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "[LBS] Sistema de Registro", string, "Registrar", "Sair");
  496. } else {
  497. DOF2_SetString(GetPlayerAccount(playerid), "Email", inputtext);
  498. DOF2_SaveFile();
  499. format(string, sizeof(string), "{FFFFFF}•{ffbc59}» {FFFFFF}Olá {ffbc59}%s {FFFFFF}sua conta foi registrada, porém não se esqueça que a sua senha é {ffbc59}%s", GetPlayerNome(playerid), DOF2_GetString(GetPlayerAccount(playerid), "Senha"));
  500. SendClientMessage(playerid, -1, string);
  501. format(string, sizeof(string), "{FFFFFF}•{ffbc59}» {FFFFFF}O e-mail cadastrado na conta é {ffbc59}%s", inputtext);
  502. SendClientMessage(playerid, -1, string);
  503. new value[5];
  504. for(new i = 0; i < 4; i++) value[i] = random(9);
  505. printf("%d%d%d%d", value[0], value[1], value[2], value[3]);
  506. format(PlayerBradoks[playerid][pCodigoAtivarConta], 50, "%d%d%d%d", value[0], value[1], value[2], value[3]);
  507. format(string, sizeof(string), "Ola %s seu codigo de ativacao de conta: %s", GetPlayerNome(playerid), PlayerBradoks[playerid][pCodigoAtivarConta]);
  508. SendMail(inputtext, EMAIL_SERVIDOR, "Brasil Leonardo Bradoks", "Ativacao de Conta", string);
  509. SendClientMessage(playerid, -1, "[•»] {ffbc59}Foram enviados para o email as informações para ativação da sua conta !");
  510. ShowPlayerDialog(playerid, DIALOG_ATIVAR_CONTA, DIALOG_STYLE_INPUT, "[LBS] Sistema de Ativação de Conta", "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o código enviado para o seu email para ativar sua conta! {ffbc59}*", "Confirmar", "Cancelar");
  511. }
  512. } else { /*-- BOTÃO SAIR --*/
  513. Kick(playerid);
  514. }
  515. return 1;
  516. }
  517. case DIALOG_ATIVAR_CONTA: {
  518. if(response) { /*-- BOTÃO CONFIRMAR --*/
  519. if(!strlen(inputtext)) {
  520. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}É necessário digitar o código informado no seu email !");
  521. ShowPlayerDialog(playerid, DIALOG_ATIVAR_CONTA, DIALOG_STYLE_INPUT, "[LBS] Sistema de Ativação de Conta", "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o código enviado para o seu email para ativar sua conta! {ffbc59}*", "Confirmar", "Cancelar");
  522. } else {
  523. if(strfind(PlayerBradoks[playerid][pCodigoAtivarConta], inputtext, true) != -1) {
  524. SendClientMessage(playerid, -1, "[•»] {ffbc59}Registro completo, tenha um bom jogo !");
  525. PlayerBradoks[playerid][pRegistroNaoConcluido] = false;
  526. SpawnPlayer(playerid);
  527. } else {
  528. SendClientMessage(playerid, -1, "[ ERRO ]{FF0000} O código digitado é inválido !");
  529. ShowPlayerDialog(playerid, DIALOG_ATIVAR_CONTA, DIALOG_STYLE_INPUT, "[LBS] Sistema de Ativação de Conta", "{FFFFFF}Seja bem-vindo(a) ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o código enviado para o seu email para ativar sua conta! {ffbc59}*", "Confirmar", "Cancelar");
  530. }
  531. }
  532. } else { /*-- BOTÃO CANCELAR --*/
  533. DOF2_RemoveFile(GetPlayerAccount(playerid));
  534. Kick(playerid);
  535. }
  536. return 1;
  537. }
  538. case DIALOG_RECUPERAR: {
  539. new string[500];
  540. if(response) { /*-- BOTÃO RECUPERAR --*/
  541. if(!strlen(inputtext)) {
  542. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não digitou um e-mail válido para recuperar sua conta !");
  543. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o e-mail cadastrado na sua conta para prosseguir com a recuperação de acesso! {ffbc59}*");
  544. ShowPlayerDialog(playerid, DIALOG_RECUPERAR, DIALOG_STYLE_INPUT, "[LBS] Sistema de Recuperação de Acesso", string, "Recuperar", "Voltar");
  545. } else {
  546. if(strcmp(DOF2_GetString(GetPlayerAccount(playerid), "Email"), inputtext, true) == 0) { /*-- INFORMAÇÕES CORRETAS --*/
  547. new value[5];
  548. for(new i = 0; i < 4; i++) value[i] = random(9);
  549. format(PlayerBradoks[playerid][pCodigoRecuperar], 50, "%d%d%d%d", value[0], value[1], value[2], value[3]);
  550. format(string, sizeof(string), "Ola %s seu codigo de acesso: %s", GetPlayerNome(playerid), PlayerBradoks[playerid][pCodigoRecuperar]);
  551. SendMail(DOF2_GetString(GetPlayerAccount(playerid), "Email"), EMAIL_SERVIDOR, "Brasil Leonardo Bradoks", "Recuperacao de Acesso", string);
  552. SendClientMessage(playerid, -1, "[•»] {ffbc59}Foram enviados para o email cadastrado as informações de recuperação !");
  553. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o código enviado para o seu email! {ffbc59}*");
  554. ShowPlayerDialog(playerid, DIALOG_RECUPERAR_CODIGO, DIALOG_STYLE_INPUT, "[LBS] Sistema de Recuperação de Acesso", string, "Confirmar", "");
  555. } else {
  556. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}As informações digitadas não coincidem com as informações salvas !");
  557. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o e-mail cadastrado na sua conta para prosseguir com a recuperação de acesso! {ffbc59}*");
  558. ShowPlayerDialog(playerid, DIALOG_RECUPERAR, DIALOG_STYLE_INPUT, "[LBS] Sistema de Recuperação de Acesso", string, "Recuperar", "Voltar");
  559. }
  560. }
  561. } else { /*-- BOTÃO VOLTAR --*/
  562. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{FFFFFF}Status: {00FF00}Conta registrada\n\n{FFFFFF}Nick: {FF0000}%s\n{FFFFFF}Level: {FF0000}%d\n{FFFFFF}Patente: {FF0000}%s\n\n{ffbc59}* {FFFFFF}Insira sua senha para efetuar login! {ffbc59}*", GetPlayerNome(playerid), DOF2_GetInt(GetPlayerAccount(playerid), "Level"), DOF2_GetString(GetPlayerAccount(playerid), "Patente"));
  563. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[LBS] Sistema de Login", string, "Entrar", "Recuperar");
  564. }
  565. return 1;
  566. }
  567. case DIALOG_RECUPERAR_CODIGO: {
  568. new string[500];
  569. if(response) {
  570. if(!strlen(inputtext)) {
  571. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não digitou nenhum código válido para recuperar sua conta !");
  572. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o código enviado para o seu email! {ffbc59}*");
  573. ShowPlayerDialog(playerid, DIALOG_RECUPERAR_CODIGO, DIALOG_STYLE_INPUT, "[LBS] Sistema de Recuperação de Acesso", string, "Confirmar", "");
  574. } else {
  575. if(strcmp(PlayerBradoks[playerid][pCodigoRecuperar], inputtext, true) == 0) {
  576. format(string, sizeof(string), "Ola %s logue no servidor com a sua senha: %s", GetPlayerNome(playerid), DOF2_GetString(GetPlayerAccount(playerid), "Senha"));
  577. SendMail(DOF2_GetString(GetPlayerAccount(playerid), "Email"), EMAIL_SERVIDOR, "Brasil Leonardo Bradoks", "Lembrete de Senha", string);
  578. SendClientMessage(playerid, -1, "[•»] {ffbc59}Foi enviado para o seu email cadastrado a sua senha de acesso !");
  579. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{FFFFFF}Status: {00FF00}Conta registrada\n\n{FFFFFF}Nick: {FF0000}%s\n{FFFFFF}Level: {FF0000}%d\n{FFFFFF}Patente: {FF0000}%s\n\n{ffbc59}* {FFFFFF}Insira sua senha para efetuar login! {ffbc59}*", GetPlayerNome(playerid), DOF2_GetInt(GetPlayerAccount(playerid), "Level"), DOF2_GetString(GetPlayerAccount(playerid), "Patente"));
  580. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[LBS] Sistema de Login", string, "Entrar", "Recuperar");
  581. } else {
  582. SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}O código informado não coincide com o informado no email !");
  583. format(string, sizeof(string), "{FFFFFF}Seja bem-vindo(a) novamente ao: {ffbc59}Brasil Leonardo Bradoks v1.0!\n\n{ffbc59}* {FFFFFF}Insira o código enviado para o seu email! {ffbc59}*");
  584. ShowPlayerDialog(playerid, DIALOG_RECUPERAR_CODIGO, DIALOG_STYLE_INPUT, "[LBS] Sistema de Recuperação de Acesso", string, "Confirmar", "");
  585. }
  586. }
  587. }
  588. return 1;
  589. }
  590. case DIALOG_MENU_KIT: {
  591. if(response) {
  592. switch(PlayerBradoks[playerid][pGang]) {
  593. case GANG_YAKUZA: {
  594. switch(listitem) {
  595. case 0: {
  596. if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  597. GivePlayerWeapon(playerid, 22, 10);
  598. GivePlayerMoney(playerid, -1000);
  599. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  600. return 1;
  601. }
  602. case 1: {
  603. if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  604. GivePlayerWeapon(playerid, 25, 15);
  605. GivePlayerMoney(playerid, -1500);
  606. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  607. return 1;
  608. }
  609. case 2: {
  610. if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  611. GivePlayerWeapon(playerid, 28, 20);
  612. GivePlayerMoney(playerid, -2000);
  613. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  614. return 1;
  615. }
  616. }
  617. }
  618. case GANG_GROOVE_STREET: {
  619. switch(listitem) {
  620. case 0: {
  621. if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  622. GivePlayerWeapon(playerid, 23, 15);
  623. GivePlayerMoney(playerid, -1500);
  624. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  625. return 1;
  626. }
  627. case 1: {
  628. if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  629. GivePlayerWeapon(playerid, 26, 20);
  630. GivePlayerMoney(playerid, -2000);
  631. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  632. return 1;
  633. }
  634. case 2: {
  635. if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  636. GivePlayerWeapon(playerid, 29, 25);
  637. GivePlayerMoney(playerid, -2500);
  638. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  639. return 1;
  640. }
  641. }
  642. }
  643. case GANG_BALLAS: {
  644. switch(listitem) {
  645. case 0: {
  646. if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  647. GivePlayerWeapon(playerid, 24, 20);
  648. GivePlayerMoney(playerid, -2000);
  649. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  650. return 1;
  651. }
  652. case 1: {
  653. if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  654. GivePlayerWeapon(playerid, 27, 25);
  655. GivePlayerMoney(playerid, -2500);
  656. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  657. return 1;
  658. }
  659. case 2: {
  660. if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  661. GivePlayerWeapon(playerid, 32, 30);
  662. GivePlayerMoney(playerid, -3000);
  663. SendClientMessage(playerid, -1, "[•»] {00FF7F}Arma adquirida com sucesso !");
  664. return 1;
  665. }
  666. }
  667. }
  668. }
  669. }
  670. return 1;
  671. }
  672. case DIALOG_MENU_DETRAN: {
  673. if(response) {
  674. switch(listitem) {
  675. case 0: { /*-- Consultar Multas --*/
  676. ShowPlayerDialog(playerid, DIALOG_MENU_DETRAN_CONSULTAR, DIALOG_STYLE_INPUT, "{FFFFFF}DETRAN - SF Consultas de Multas", "{FFFFFF}Informe a placa do Veículo", "Consultar", "Voltar");
  677. }
  678. case 1: { /*-- Pagar Multas --*/
  679. ShowPlayerDialog(playerid, DIALOG_MENU_DETRAN_PAGARMULTAS, DIALOG_STYLE_INPUT, "{FFFFFF}DETRAN - SF Pagamento de Multas", "{FFFFFF}Informe a placa do Veículo", "Consultar", "Voltar");
  680. }
  681. }
  682. }
  683. return 1;
  684. }
  685. case DIALOG_MENU_DETRAN_CONSULTAR: {
  686. if(response) { /*-- Clicou em Consultar --*/
  687. Contagem[playerid] = false;
  688. for(new i = 1; i < BRADOKS_VEHICLES; i++) {
  689. if(strfind(GetVehicleNumberPlateEx(VeiculoBradoks[i][vVeiculoIDX]), inputtext, true) != -1) {
  690. new string[400];
  691. Contagem[playerid] = true;
  692. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700}---------------------------------------------{FF0000}•{FFFFFF}«\n\n{FF0000}•{FFFFFF}»{FFD700} Veiculo{FFFFFF} %s\n{FF0000}•{FFFFFF}»{FFD700} Placa{FFFFFF} %s\n{FF0000}•{FFFFFF}»{FFD700} Total de Multas:{FFFFFF} %d\n{FF0000}•{FFFFFF}»{FFD700} Valor das Multas:{FFFFFF} %d\n\n{FF0000}•{FFFFFF}»{FFD700}---------------------------------------------{FF0000}•{FFFFFF}«",
  693. GetVehicleName(VeiculoBradoks[i][vVeiculoIDX]), GetVehicleNumberPlateEx(VeiculoBradoks[i][vVeiculoIDX]), VeiculoBradoks[i][vTotalMultas], VeiculoBradoks[i][vValorMulta]);
  694. ShowPlayerDialog(playerid, DIALOG_MULTAS, DIALOG_STYLE_MSGBOX, "{FFFFFF}DETRAN - SF Consultas de Multas", string, "Voltar", "Fechar");
  695. }
  696. }
  697. if(Contagem[playerid] == false) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Nenhum veículo encontrado com a placa informada !");
  698. } else { /*-- Clicou em Voltar --*/
  699. ShowPlayerDialog(playerid, DIALOG_MENU_DETRAN, DIALOG_STYLE_LIST, "DETRAN - SF", "Consultar Multas\nPagar Multas", "Selecionar", "Fechar");
  700. }
  701. return 1;
  702. }
  703. case DIALOG_MULTAS: {
  704. if(response) {
  705. ShowPlayerDialog(playerid, DIALOG_MENU_DETRAN, DIALOG_STYLE_LIST, "DETRAN - SF", "Consultar Multas\nPagar Multas", "Selecionar", "Fechar");
  706. }
  707. return 1;
  708. }
  709. case DIALOG_MENU_DETRAN_PAGARMULTAS: {
  710. if(response) { /*-- Clicou em Consultar --*/
  711. Contagem[playerid] = false;
  712. for(new i = 1; i < BRADOKS_VEHICLES; i++) {
  713. if(strfind(GetVehicleNumberPlateEx(VeiculoBradoks[i][vVeiculoIDX]), inputtext, true) != -1) {
  714. new string[400];
  715. PlayerBradoks[playerid][pIDdoVeiculo] = i;
  716. PlayerBradoks[playerid][pValorDaMulta] = VeiculoBradoks[i][vValorMulta];
  717. Contagem[playerid] = true;
  718. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700}---------------------------------------------{FF0000}•{FFFFFF}«\n\n{FF0000}•{FFFFFF}»{FFD700} Veiculo{FFFFFF} %s\n{FF0000}•{FFFFFF}»{FFD700} Placa{FFFFFF} %s\n{FF0000}•{FFFFFF}»{FFD700} Total de Multas:{FFFFFF} %d\n{FF0000}•{FFFFFF}»{FFD700} Valor das Multas:{FFFFFF} %d\n\n{FF0000}•{FFFFFF}»{FFD700}---------------------------------------------{FF0000}•{FFFFFF}«",
  719. GetVehicleName(VeiculoBradoks[i][vVeiculoIDX]), GetVehicleNumberPlateEx(VeiculoBradoks[i][vVeiculoIDX]), VeiculoBradoks[i][vTotalMultas], VeiculoBradoks[i][vValorMulta]);
  720. ShowPlayerDialog(playerid, DIALOG_PAGAR_MULTAS, DIALOG_STYLE_MSGBOX, "{FFFFFF}DETRAN - SF Consultas de Multas", string, "Pagar", "Voltar");
  721. }
  722. }
  723. if(Contagem[playerid] == false) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Nenhum veículo encontrado com a placa informada !");
  724. } else {
  725. ShowPlayerDialog(playerid, DIALOG_MENU_DETRAN, DIALOG_STYLE_LIST, "DETRAN - SF", "Consultar Multas\nPagar Multas", "Selecionar", "Fechar");
  726. }
  727. return 1;
  728. }
  729. case DIALOG_PAGAR_MULTAS: {
  730. if(response) {
  731. if(GetPlayerMoney(playerid) < PlayerBradoks[playerid][pValorDaMulta]) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não possui dinheiro suficiente !");
  732. GivePlayerMoney(playerid, -PlayerBradoks[playerid][pValorDaMulta]);
  733. VeiculoBradoks[PlayerBradoks[playerid][pIDdoVeiculo]][vValorMulta] = 0;
  734. VeiculoBradoks[PlayerBradoks[playerid][pIDdoVeiculo]][vTotalMultas] = 0;
  735. SendClientMessage(playerid, -1, "[>] {006400}Todas as multas do veículo foram pagas !");
  736. return 1;
  737. } else {
  738. ShowPlayerDialog(playerid, DIALOG_MENU_DETRAN, DIALOG_STYLE_LIST, "DETRAN - SF", "Consultar Multas\nPagar Multas", "Selecionar", "Fechar");
  739. }
  740. return 1;
  741. }
  742. }
  743. return 1;
  744. }
  745.  
  746. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  747. {
  748. return 1;
  749. }
  750.  
  751. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  752. {
  753. new string[128], aname[MAX_PLAYER_NAME];
  754. GetPlayerName(playerid, aname, sizeof(aname));
  755. format(string, sizeof(string), "O(A) player %s foi para a posição %f %f %f", aname, fX, fY, fZ);
  756. SendClientMessageToAll(-1, string);
  757. SetPlayerPosFindZ(playerid, fX, fY, fZ);
  758. return 1;
  759. }
  760.  
  761.  
  762. /*-- Comandos --*/
  763. CMD:setlevel(playerid, params[]) {
  764. new idplayer, level, string[128];
  765. if(sscanf(params, "dd", idplayer, level)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}use: /setlevel [playerid] [level]");
  766. if(!IsPlayerConnected(idplayer)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Este player não está conectado !");
  767. SetPlayerScore(idplayer, level);
  768. format(string, sizeof(string), "[ > ] Seu level foi setado para %d", level);
  769. SendClientMessage(idplayer, -1, string);
  770. return 1;
  771. }
  772.  
  773. CMD:patente(playerid) {
  774. new string[128], aname[MAX_PLAYER_NAME];
  775. GetPlayerName(playerid, aname, sizeof(aname));
  776. format(string, sizeof(string), "{4169E1}Olá {FFFFFF}%s {4169E1}seja bem vindo(a)%sPatente: {FFFFFF}%s", aname, GetPlayerScore(playerid) == 0 ? (" ") : (" novamente "), RankClassNames[GetPlayerPatente(playerid)]);
  777. SendClientMessage(playerid, -1, string);
  778. SetPlayerColor(playerid, RankClassColors[GetPlayerPatente(playerid)]);
  779. return 1;
  780. }
  781.  
  782. CMD:setgang(playerid, params[]) {
  783. new id, gang, aname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[128];
  784. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não tem acesso a este comando !");
  785. if(sscanf(params, "dd", id, gang)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Use: /setgang [playerid] [(1: Yakuza) - (2: Groove Street) - (3: Ballas)]");
  786. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Este player não está conectado !");
  787. if(PlayerBradoks[id][pGang] == gang) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Este player já faz parte desta gang !");
  788. GetPlayerName(playerid, aname, sizeof(aname));
  789. GetPlayerName(playerid, pname, sizeof(pname));
  790.  
  791. format(string, sizeof(string), "[•»] O(A) Administrador(a) %s setou o(a) player %s como membro(a) da gang %s", aname, pname, gang == 1 ? ("Yakuza") : gang == 2 ? ("Groove Street") : gang == 3 ? ("Ballas") : ("Nenhuma"));
  792. SendClientMessageToAll(-1, string);
  793.  
  794. format(string, sizeof(string), "[•»] O(A) Administrador(a) %s te setou como membro(a) da gang %s", aname, gang == 1 ? ("Yakuza") : gang == 2 ? ("Groove Street") : gang == 3 ? ("Ballas") : ("Nenhuma"));
  795. SendClientMessage(playerid, -1, string);
  796. PlayerBradoks[id][pGang] = gang;
  797. return 1;
  798. }
  799.  
  800. CMD:kit(playerid) {
  801. switch(PlayerBradoks[playerid][pGang]) {
  802. case GANG_YAKUZA: {
  803. ShowPlayerDialog(playerid, DIALOG_MENU_KIT, DIALOG_STYLE_TABLIST_HEADERS, "{ffffff}Menu KIT de Armas {FFD700}Yakuza", "{FF0000}Arma\t{ffffff}Munição\t{00FF7F}Valor\n\
  804. {ffffff}Pistola 9MM\t{ffffff}10\t{00FF7F}R$ {ffffff}1000\n\
  805. {ffffff}Espingarda\t{ffffff}15\t{00FF7F}R$ {ffffff}1500\n\
  806. {ffffff}Micro SMG\t{ffffff}20\t{00FF7F}R$ {ffffff}2000",
  807. "Comprar", "Cancelar");
  808. }
  809. case GANG_GROOVE_STREET: {
  810. ShowPlayerDialog(playerid, DIALOG_MENU_KIT, DIALOG_STYLE_TABLIST_HEADERS, "{ffffff}Menu KIT de Armas {00FF7F}Groove Street", "{FF0000}Arma\t{ffffff}Munição\t{00FF7F}Valor\n\
  811. {ffffff}Pistola 9MM C/ Silenciador\t{ffffff}15\t{00FF7F}R$ {ffffff}1500\n\
  812. {ffffff}Shotgun Sawnoff\t{ffffff}20\t{00FF7F}R$ {ffffff}2000\n\
  813. {ffffff}MP5\t{ffffff}25\t{00FF7F}R$ {ffffff}2500",
  814. "Comprar", "Cancelar");
  815. }
  816. case GANG_BALLAS: {
  817. ShowPlayerDialog(playerid, DIALOG_MENU_KIT, DIALOG_STYLE_TABLIST_HEADERS, "{ffffff}Menu KIT de Armas {8A2BE2}Ballas", "{FF0000}Arma\t{ffffff}Munição\t{00FF7F}Valor\n\
  818. {ffffff}Desert Eagle\t{ffffff}20\t{00FF7F}R$ {ffffff}2000\n\
  819. {ffffff}Combat Shotgun\t{ffffff}25\t{00FF7F}R$ {ffffff}2500\n\
  820. {ffffff}Tec-9\t{ffffff}30\t{00FF7F}R$ {ffffff}3000",
  821. "Comprar", "Cancelar");
  822. }
  823. default: SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não tem acesso a este comando !");
  824. }
  825. return 1;
  826. }
  827.  
  828. CMD:dargrana(playerid, params[]) {
  829. new id, grana;
  830. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não tem acesso a este comando !");
  831. if(sscanf(params, "dd", id, grana)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Use: /dargrana [playerid] [valor]");
  832. GivePlayerMoney(id, grana);
  833. SendClientMessage(playerid, -1, "[•»] {00FF7F}Dinheiro enviado com sucesso !");
  834. return 1;
  835. }
  836.  
  837. CMD:criarveiculo(playerid, params[]) {
  838. new idveiculo, cor[2], placa[9], Float:Pos[4], string[140];
  839. if(sscanf(params, "ddds[9]", idveiculo, cor[0], cor[1], placa)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Use: /criarveiculo [id do veiculo] [cor 1] [cor 2] [placa]");
  840. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  841. GetPlayerFacingAngle(playerid, Pos[3]);
  842. VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX] = AddStaticVehicle(idveiculo, Pos[0], Pos[1], Pos[2], Pos[3], cor[0], cor[1]);
  843. SetVehicleNumberPlateEx(VeiculoBradoks[BRADOKS_VEHICLES][vVeiculoIDX], placa); BRADOKS_VEHICLES++;
  844. format(string, sizeof(string), "[x] Veiculo (ID Geral: %d) - (ID Interno: %d) - (Placa: %s) criado com sucesso !", idveiculo, VeiculoBradoks[idveiculo][vVeiculoIDX], placa);
  845. SendClientMessage(playerid, -1, string);
  846. return 1;
  847. }
  848.  
  849. CMD:pegarplaca(playerid) {
  850. new string[148];
  851. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não está dentro de um veiculo !");
  852. format(string, sizeof(string), "{00FF7F}[x] Veiculo ( ID Geral:{FFFFFF} %d {00FF7F}) - ( ID Interno:{FFFFFF} %d {00FF7F}) - ( Placa:{FFFFFF} %s {00FF7F})", GetVehicleModel(GetPlayerVehicleID(playerid)), GetPlayerVehicleID(playerid), GetVehicleNumberPlateEx(GetPlayerVehicleID(playerid)));
  853. SendClientMessage(playerid, -1, string);
  854. return 1;
  855. }
  856.  
  857. CMD:multas(playerid) {
  858. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "[ ERRO ] {FF0000}Você não está dentro de um veiculo !");
  859. new string[400];
  860. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700}---------------------------------------------{FF0000}•{FFFFFF}«\n\n{FF0000}•{FFFFFF}»{FFD700} Veiculo{FFFFFF} %s\n{FF0000}•{FFFFFF}»{FFD700} Placa{FFFFFF} %s\n{FF0000}•{FFFFFF}»{FFD700} Total de Multas:{FFFFFF} %d\n{FF0000}•{FFFFFF}»{FFD700} Valor das Multas:{FFFFFF} %d\n\n{FF0000}•{FFFFFF}»{FFD700}---------------------------------------------{FF0000}•{FFFFFF}«",
  861. GetVehicleName(VeiculoBradoks[GetPlayerVehicleID(playerid)][vVeiculoIDX]), GetVehicleNumberPlateEx(GetPlayerVehicleID(playerid)), VeiculoBradoks[GetPlayerVehicleID(playerid)][vTotalMultas], VeiculoBradoks[GetPlayerVehicleID(playerid)][vValorMulta]);
  862. ShowPlayerDialog(playerid, DIALOG_MULTAS, DIALOG_STYLE_MSGBOX, "{FFFFFF}Menu de Multas", string, "", "Fechar");
  863. return 1;
  864. }
  865.  
  866. CMD:entrar(playerid) {
  867. if(IsPlayerInRangeOfPoint(playerid, 3.0, 2364.3064,2377.5967,10.8203)) { /*-- Entrada Detran SF --*/
  868. SetPlayerInterior(playerid, 3);
  869. SetPlayerFacingAngle(playerid, 89.4206);
  870. SetPlayerPos(playerid, 387.3808,173.8342,1008.3828);
  871. }
  872. return 1;
  873. }
  874.  
  875. CMD:sair(playerid) {
  876. if(IsPlayerInRangeOfPoint(playerid, 3.0, 390.2981,173.7916,1008.3828)) { /*-- Saida Detran SF --*/
  877. SetPlayerInterior(playerid, 0);
  878. SetPlayerFacingAngle(playerid, 90.4796);
  879. SetPlayerPos(playerid, 2361.9072,2377.7593,10.8203);
  880. }
  881. return 1;
  882. }
  883.  
  884. stock SetVehicleNumberPlateEx(carid, plate[]) {
  885. format(VeiculoBradoks[carid][vPlaca], 9, "%s", plate);
  886. SetVehicleNumberPlate(carid, VeiculoBradoks[carid][vPlaca]);
  887. SetVehicleToRespawn(carid);
  888. return 1;
  889. }
  890.  
  891. stock GetVehicleNumberPlateEx(carid) {
  892. new plate[9];
  893. for(new i = 0; i < 9; i++) {
  894. strcat(plate, VeiculoBradoks[carid][vPlaca][i]);
  895. }
  896. return plate;
  897. }
  898.  
  899. public UpdateRadar() {
  900. for(new i = 0, j = GetPlayerPoolSize(); i <= j; ++i) {
  901. if(IsPlayerInAnyVehicle(i) && PlayerBradoks[i][pMulta] == false) {
  902. if(IsPlayerInRangeOfPoint(i, 11.0, 2046.2222,1339.4756,10.6719) || IsPlayerInRangeOfPoint(i, 11.0, 2068.6826,1417.1683,10.6719)) {
  903. if(GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]) >= 61) {
  904. new string[128], Taxa = 20, Tempo = 20;
  905. SendClientMessage(i, -1, "{FF0000}•{FFFFFF}»{FFD700}------------------------- {FF0000}RADAR {FFD700}-------------------------{FF0000}•{FFFFFF}«");
  906. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Veículo %s", GetVehicleName(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  907. SendClientMessage(i, -1, string);
  908. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Placa %s", GetVehicleNumberPlateEx(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  909. SendClientMessage(i, -1, string);
  910. SendClientMessage(i, -1, "{FF0000}•{FFFFFF}»{FFD700} Velocidade Permitida 60 KM/H");
  911. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Velocidade Registrada %d KM/H", GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  912. SendClientMessage(i, -1, string);
  913. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Valor da Multa %d", ((GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]) * Taxa * Tempo) /100));
  914. SendClientMessage(i, -1, string);
  915. SendClientMessage(i, -1, "{FF0000}•{FFFFFF}»{FFD700}------------------------- {FF0000}RADAR {FFD700}-------------------------{FF0000}•{FFFFFF}«");
  916. VeiculoBradoks[GetPlayerVehicleID(i)][vValorMulta] += ((GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]) * Taxa * Tempo) /100);
  917. VeiculoBradoks[GetPlayerVehicleID(i)][vTotalMultas]++;
  918. PlayerBradoks[i][pMulta] = true;
  919. PlayerBradoks[i][pTimerMulta] = SetTimerEx("LiberarPlayerMulta", 2000, false, "i", i);
  920. return 1;
  921. } else {
  922. new string[128];
  923. format(string, sizeof(string), "{FF0000}•{FFFFFF}»{FFD700} Velocidade Registrada: %d KM/H", GetVehicleSpeed(VeiculoBradoks[GetPlayerVehicleID(i)][vVeiculoIDX]));
  924. SendClientMessage(i, -1, string);
  925. PlayerBradoks[i][pMulta] = true;
  926. PlayerBradoks[i][pTimerMulta] = SetTimerEx("LiberarPlayerMulta", 2000, false, "i", i);
  927. return 1;
  928. }
  929. }
  930. }
  931. }
  932. return 1;
  933. }
  934.  
  935. GetVehicleSpeed(vehicleid) {
  936. new Float:Vx, Float:Vy, Float:Vz;
  937. GetVehicleVelocity(vehicleid, Vx, Vy, Vz);
  938. new Float:rtn;
  939. rtn = floatsqroot(floatpower(Vx*100,2) + floatpower(Vy*100,2));
  940. rtn = floatsqroot(floatpower(rtn,2) + floatpower(Vz*100,2));
  941. return floatround(rtn);
  942. }
  943.  
  944. stock GetVehicleName(vehicleid)
  945. {
  946. new string[50];
  947. format(string,sizeof(string),"%s", VehicleNames[GetVehicleModel(vehicleid) - 400]);
  948. return string;
  949. }
  950.  
  951. public LiberarPlayerMulta(playerid) {
  952. if(PlayerBradoks[playerid][pMulta] == true) {
  953. KillTimer(PlayerBradoks[playerid][pTimerMulta]);
  954. PlayerBradoks[playerid][pMulta] = false;
  955. return 1;
  956. }
  957. return 1;
  958. }
  959.  
  960. stock GetPlayerPatente(playerid) {
  961. new idpatente;
  962. switch(GetPlayerScore(playerid)) {
  963. case 0 .. 9: { idpatente = 0; }
  964. case 10 .. 29: { idpatente = 1; }
  965. case 30 .. 39: { idpatente = 2; }
  966. case 40 .. 49: { idpatente = 3; }
  967. case 50 .. 69: { idpatente = 4; }
  968. case 70 .. 89: { idpatente = 5; }
  969. case 90 .. 109: { idpatente = 6; }
  970. case 110 .. 159: { idpatente = 7; }
  971. case 160 .. 184: { idpatente = 8; }
  972. case 185 .. 194: { idpatente = 9; }
  973. case 195 .. 209: { idpatente = 10; }
  974. case 210 .. 239: { idpatente = 11; }
  975. case 240 .. 269: { idpatente = 12; }
  976. case 270 .. 299: { idpatente = 13; }
  977. case 300 .. 329: { idpatente = 14; }
  978. case 330 .. 359: { idpatente = 15; }
  979. case 360 .. 409: { idpatente = 16; }
  980. case 410 .. 459: { idpatente = 17; }
  981. case 460 .. 509: { idpatente = 18; }
  982. case 510 .. 559: { idpatente = 19; }
  983. case 560 .. 619: { idpatente = 20; }
  984. case 620 .. 679: { idpatente = 21; }
  985. case 680 .. 739: { idpatente = 22; }
  986. case 740 .. 799: { idpatente = 23; }
  987. case 800 .. 859: { idpatente = 24; }
  988. case 860 .. 929: { idpatente = 25; }
  989. case 930 .. 999: { idpatente = 26; }
  990. case 1000 .. 1069: { idpatente = 27; }
  991. case 1070 .. 1139: { idpatente = 28; }
  992. case 1140 .. 1209: { idpatente = 29; }
  993. case 1210 .. 1509: { idpatente = 30; }
  994. case 1510 .. 1809: { idpatente = 31; }
  995. case 1810 .. 2109: { idpatente = 32; }
  996. case 2110 .. 2409: { idpatente = 33; }
  997. case 2410 .. 2709: { idpatente = 34; }
  998. case 2710 .. 3109: { idpatente = 35; }
  999. case 3110 .. 3509: { idpatente = 36; }
  1000. case 3510 .. 3909: { idpatente = 37; }
  1001. case 3910 .. 4309: { idpatente = 38; }
  1002. case 4310 .. 4709: { idpatente = 39; }
  1003. case 4710 .. 5209: { idpatente = 40; }
  1004. case 5210 .. 5709: { idpatente = 41; }
  1005. case 5710 .. 6209: { idpatente = 42; }
  1006. case 6210 .. 6709: { idpatente = 43; }
  1007. case 6710 .. 7209: { idpatente = 44; }
  1008. case 7210 .. 12999: { idpatente = 45; }
  1009. case 13000 .. 13999: { idpatente = 46; }
  1010. case 14000 .. 14999: { idpatente = 47; }
  1011. case 15000 .. 15999: { idpatente = 48; }
  1012. case 16000 .. 16999: { idpatente = 49; }
  1013. case 17000 .. 17999: { idpatente = 50; }
  1014. case 18000 .. 19999: { idpatente = 51; }
  1015. default: { idpatente = 51; }
  1016. }
  1017. return idpatente;
  1018. }
  1019.  
  1020. stock GetPlayerAccount(playerid) {
  1021. new file[128];
  1022. format(file, sizeof(file), PASTA_CONTAS, GetPlayerNome(playerid));
  1023. return file;
  1024. }
  1025.  
  1026. stock GetPlayerNome(playerid) {
  1027. new aname[MAX_PLAYER_NAME];
  1028. GetPlayerName(playerid, aname, sizeof(aname));
  1029. return aname;
  1030. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement