Advertisement
Don_Speed

Game mode DonSpeed

Sep 8th, 2018
2,008
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 79.97 KB | None | 0 0
  1. /*
  2.         ____                  _____                     __
  3.        / __ \____  ____      / ___/____  ___  ___  ____/ /
  4.       / / / / __ \/ __ \     \__ \/ __ \/ _ \/ _ \/ __  /
  5.      / /_/ / /_/ / / / /    ___/ / /_/ /  __/  __/ /_/ /
  6.      _____/\____/_/ /_/____/____/ .___/\___/\___/\__,_/
  7.                                /_/
  8.  
  9. */
  10.  
  11.  
  12. /*                             Brasil RolePlay - Beta
  13. Inicio do projeto : 7 de Setembro 2017
  14.  
  15. O que ja foi feito ?
  16. - Sistema de registro com seleção de sexo
  17. - Sistema de emprego (Motorista , entregador)
  18. - Sistema de entregador com rota random e facil de acrescentar rota
  19. - Sistema de motorista com rota random e facil de acrescentar rota
  20. - Sistema de infoadmin [POSTED]
  21. - 4 Niveis de Admin
  22. - Sistema de ORG
  23. - Sistema de infoorg [POSTED]
  24. - Carros personalizados GM e BOPE
  25. - Sistema de Celular com operadora : EX : 8094-8745 [/sms /ligar][resetar numero compra de creditos]
  26. - Sistema de radio [POSTED]
  27. - Sistema de empresa
  28. - Todas HQ (Menos Reporter)
  29. - Sistema de suspeito com codigo penal
  30.  
  31.  
  32. new JaUsou[MAX_PLAYERS];
  33. JaUsou[playerid] = gettime() + (60000*5);
  34. if(JaUsou[playerid] > gettime()) return SendClientMessage(playerid, -1, "espere 5 minutos!");
  35. */
  36. #include     a_samp
  37. #include     DOF2
  38. #include     zcmd
  39. #include     sscanf2
  40. #include     a_zone
  41. #include     streamer
  42.  
  43.  
  44. #define      DIALOG_REGISTER            1
  45. #define      DIALOG_LOGIN               2
  46. #define      DIALOG_SEXO                3
  47. #define      DIALOG_EMPREGO             4
  48. #define      DIALOG_TELEFONE            5
  49. #define      DIALOG_OPERADORA           6
  50. #define      DIALOG_CREDITOS            7
  51. #define      DIALOG_RESETARN            8
  52. #define      DIALOG_RADIO               9
  53. #define      DIALOG_MUSICA              10
  54.  
  55. /* DEFINIÇOES DE REGISTRO */
  56. #define      GRANAINICIAL               10000
  57. #define      NIVELINICIAL               5    
  58. #define      SKININICIAL                29    
  59. #define      SKININICIALF               40
  60. #define      POSPADRAO1                 1540.6992
  61. #define      POSPADRAO2                 -1674.5836
  62. #define      POSPADRAO3                 13.5511
  63.  
  64. #define      ContaSalva                 "BrasilRolePlay/Contas/%s.ini"
  65.  
  66. #define      CallBacK::%0[%1]           forward %0(%1); public %0(%1)
  67.  
  68. /* DEFINIÇOES DE ORGANIZACOES */
  69. #define     OrgSalva                 "BrasilRolePlay/Organizacao/%d.ini"
  70. #define     MAX_WEAPON      3
  71.  
  72. #define     MAX_ORGS        11// MAXIMO
  73. #define     MAX_VORG        5 // vagas para cara org
  74. enum iorg
  75. {
  76.    ID,
  77.    NameORG[50],
  78.    SkinLider,
  79.    SkinMembro1,
  80.    Color,
  81.    Float:X,
  82.    Float:Y,
  83.    Float:Z,
  84.    Armas[MAX_WEAPON],
  85.    Salario,
  86.    Interior
  87. }
  88. new OrgInfo[MAX_ORGS][iorg] = {
  89.     {0,"Civil", 0, 0, -1, 0.0, 0.0, 0.0, 0}, // default     */
  90.    
  91.     {1,"Guarda Municipal", 283, 282, 0x87CEFAFF, 225.0737,75.9404,1005.0391, {3,24} , 1000, 6},// Multas , rondas , emplacamento
  92.     {2,"Policia Militar", 280, 281, 0x1E90FFFF, 1529.4178,-1668.5122,6.2188, {24,31,29} , 2000, 0}, // rondas abordagens
  93.     {3,"B.O.P.E",  284, 285, 0x696969FF, 1525.2028,-1458.0073,9.5000, {24,31,29}, 5000, 0}, // Atraz dos procurados
  94.    
  95.     {4,"San News",  120, 120, 0xE0FFFFFF, 0.0, 0.0, 0.0, 43, 1900, 0},
  96.    
  97.     {5,"Prefeitura",  59, 59, 0xFF0000FF, 284.3175,-1614.6475,17.8593, 43, 1900, 0},
  98.    
  99.     {6,"Grove Street Families",  107, 106, 0x00FF7FFF, 2488.5647,-1692.0552,14.7656, { 24, 30 }, 900, 0},
  100.     {7,"Front Yard Ballas",  104, 102, 0xFF00FFFF, 332.3149,-1338.0713,14.5078, { 24, 30 }, 900, 0},
  101.     {8,"Los Santos Vagos",  108, 109, 0xFFFF00FF, 950.2487,-909.8270,45.7656, { 24, 30 }, 900, 0},
  102.     {9,"Varrio Los Aztecas",  115, 114, 0x1E90FFFF, 1677.0472,-2124.4573,13.5469, { 24, 30 }, 900, 0},
  103.     {10,"NUll",  0, 0, -1, 0.0, 0.0, 0.0, 0, 900, 0}
  104.    
  105. };
  106. new OrgsCargos[][11] = {
  107.    "Líder",
  108.    "Membro(1)",
  109.    "Membro(2)",
  110.    "Membro(3)",
  111.    "Membro(4)",
  112.    "Membro(5)",
  113.    "Membro(6)",
  114.    "Membro(7)",
  115.    "Membro(8)",
  116.    "Membro(9)",
  117.    "Membro(10)"
  118. };
  119. /* DEFINIÇOES DE ADMIN */
  120. #define      AdminSalva                 "BrasilRolePlay/Admin/%d.ini"
  121. #define      MAX_VAGAS                  10
  122. enum pAdm{
  123.      Name[24],
  124.      Nivel
  125. }
  126. new AdminInfo[MAX_VAGAS][pAdm];
  127. new NomeNivel[][50] ={
  128. {"Player"},
  129. {"Game Tester"},
  130. {"Game Leader"},
  131. {"Administrator"},
  132. {"Dono"}
  133. };
  134. /* DEFINIÇOES DE EMPREGO  */
  135. #define MAX_EMPREGO   3
  136. enum pEmprego{
  137.      Nome[50],
  138.      Salario
  139. }
  140. new Empregos[MAX_EMPREGO][pEmprego] = {
  141. {"Desempregado", 100},
  142. {"Entregador", 900},
  143. {"Motorista", 1000}
  144. };
  145.  
  146. new VTRUCK[14];
  147. new VBUS[6];
  148.  
  149.  
  150. /* DEFINICOES DE TRABALHO TRUCK*/
  151. #define MAXROTAS 4
  152. enum pJob{
  153.     IDColeta,
  154.     Produto[80],
  155.     Local[80],
  156.     Float:X,
  157.     Float:Y,
  158.     Float:Z,
  159.     Pagamento
  160. }
  161. new TrabalhoInfo[MAXROTAS][pJob] = {
  162. {0,"N/D", "N/D", 0.0, 0.0, 0.0, 0},
  163. {1,"Seringa", "Hospital Municipal", 1174.5002, -1309.0336, 13.9948, 200},
  164. {2,"Lençois", "Cemiterio Municipal", 938.8779,-1086.5824,24.2962, 180},
  165. {3,"Caixa de doces", "Parque Municipal", 379.7225,-2020.7133,7.8301, 150}
  166. };
  167. /* DEFINICOES DE TRABALHO Onibus*/
  168. #define MAXROTAS 4
  169. enum pBus{
  170.     IDColeta,
  171.     Local[80],
  172.     Float:X,
  173.     Float:Y,
  174.     Float:Z,
  175.     Pagamento
  176. }
  177. new OnibusInfo[MAXROTAS][pBus] = {
  178. {0,"N/D",  0.0, 0.0, 0.0, 0},
  179. {1,"Cidade 1", 637.7001,-556.6019,16.0826, 200},
  180. {2,"Cidade 2", 286.9157,-171.9587,1.3246, 180},
  181. {3,"Cidade 3", -149.8699,1176.9861,19.6412, 150}
  182. };
  183.  
  184. new EmGeral[100], String[300];
  185.  
  186. enum pInfo {
  187.      Dinheiro,
  188.      Nivel,
  189.      Respeito,
  190.      TempoJogado,
  191.      Skin,
  192.      Float:Pos[3],
  193.      Interior,
  194.      Tentativa,
  195.      TSalvar,
  196.      Emprego,
  197.      IDColeta,
  198.      IDVColeta,
  199.      Admin,
  200.      Text:Zona,
  201.      Passei,
  202.      MinhaOrg,
  203.      Ranked,
  204.      Telefone,
  205.      Creditos,
  206.      LigouP,
  207.      Procurado,
  208.      Suspeito[5],
  209.      TempoPreso,
  210.      bool:PoliciaM,
  211.      bool:Atendeu,
  212.      bool:Sexo,
  213.      bool:Login,
  214.      bool:Coletou
  215. }
  216. new PlayerInfo[MAX_PLAYERS][pInfo];
  217.  
  218. new ViaturaGM[11];
  219. new PortaoGM[2];
  220. new PortaoBaixo[2];
  221.  
  222. new ViaturaBOPE[6];
  223. new PortaoBOPE;
  224.  
  225. new ViaturaPM[11];
  226. new PortaoPM;
  227.  
  228. new VPR[9];
  229.  
  230. /* DDD Operadoras */
  231. new op1[] ={
  232.     69,
  233.     79,
  234.     80,
  235.     81,
  236.     82,
  237.     83
  238. };
  239. new op2[] = {
  240.     68,
  241.     73,
  242.     74,
  243.     75,
  244.     91,
  245.     92,
  246.     93
  247. };
  248. new op3[] = {
  249.     84,
  250.     85,
  251.     86,
  252.     87,
  253.     88,
  254.     89
  255. };
  256. new op4[] = {
  257.     95,
  258.     96,
  259.     97,
  260.     98,
  261.     99
  262. };
  263. new op5[] = {
  264.     30,
  265.     40
  266. };
  267. /*DEFINICOES DE RADIO*/
  268. #define         MAX_MUSICAS  17
  269. #define         MAX_ESTILOS  4
  270. /* ESTILOS MUSICAIS */
  271. new EstiloMusical[][]={
  272. {"ERRO"},
  273. {"SERTANEJO"},
  274. {"FUNK"},
  275. {"POP"}
  276. };
  277. new cont;
  278. new MusicaDon[MAX_PLAYERS][MAX_MUSICAS];
  279.  
  280. enum ir{
  281.      IdMusica,
  282.      Estilo,
  283.      Musica[80],
  284.      Cantor[80],
  285.      Link[150]
  286. }
  287. new Radio[MAX_MUSICAS][ir] = {
  288. {0,0, "--", "--", "--"},
  289. {1,3, "Beliver","Imagine Dragons","https://www.dropbox.com/s/av25zujiv911rtq/Believer.mp3?dl=1"},
  290. {2,1, "Laranjinha","Wesley Safadão","https://www.dropbox.com/s/6t7232dea7pi7a8/Laranjinha%20DVD%20WS%20In%20Miami%20Beach.mp3?dl=1"},
  291. {3,3, "The Scientis", "Gabriella", "https://www.dropbox.com/s/n1ypy6syd2hna2y/Coldplay%20-%20The%20Scientist%20Cover.mp3?dl=1"},
  292. {4,1, "Suave", "Mateus & Kauan", "https://www.dropbox.com/s/9y78jsvhh7ypcdj/VillaMix%20Suave.mp3?dl=1"},
  293. {5,1, "Direitos Iguais", "Allana Macedo", "https://www.dropbox.com/s/nbqkdr0evopq3q9/Direitos%20Iguais%20Ao%20vivo.mp3?dl=1"},
  294. {6,1, "Duas da Manha", "Maycon & Vinicius", "https://www.dropbox.com/s/zjw14qx5lsnntun/Duas%20da%20Manha%20Clipe%20Oficial.mp3?dl=1"},
  295. {7,1, "Poe no 120", "Conrado & Aleksandro", "https://www.dropbox.com/s/6ynoelonap1ob6s/Poe%20no%20120%20Marco%20Brasil%20Filho%20DJ%20Kevin.mp3?dl=1"},
  296. {8,3, "Paradise", "ColdPlay", "https://www.dropbox.com/s/wqerh6njlun227o/Paradise%20Official%20Video.mp3?dl=1"},
  297. {9,3, "Wake Me Up", "Avicii", "https://www.dropbox.com/s/288ugnwg3lzvh5n/Wake%20Me%20Up%20Official%20Video.mp3?dl=1"},
  298. {10,3, "Let Her Go", "Passenger ", "https://www.dropbox.com/s/zxq4xrw6oemlwcf/Passenger%20Let%20Her%20Go%20Official%20Video.mp3?dl=1"},
  299. {11,2, "Encaixa", "MC Kevinho", "https://www.dropbox.com/s/qsayzpfmcvl2hzc/Encaixa%20KondZilla.mp3?dl=1"},
  300. {12,2, "OS MALOCA", "MC Livinho", "https://www.dropbox.com/s/viowpzknznnzlai/Perera%20DJ%20feat%20MC%20Livinho%20MC%20Davi%20MC%20Brinquedo%20e%20MC%20Pedrinho.mp3?dl=1"},
  301. {13,1, "Chifre não e asa", "Thayná Bitencourt", "https://www.dropbox.com/s/bpyr1euw3cmu8wy/Chifre%20nao%20e%20Asa.mp3?dl=1"},
  302. {14,1, "Juízo Ficou Em Casa", "Mariana e Mateus", "https://www.dropbox.com/s/ko2etb395kmkofj/Juizo%20Ficou%20Em%20Casa%20CLIPE%20OFICIAL.mp3?dl=0"},
  303. {15,3, "Despacito", "Luis Fonsi", "https://www.dropbox.com/s/waj4025cnp4lr11/Despacito%20ft%20Daddy%20Yankee.mp3?dl=1"},
  304. {16,1, "Cachaça e Nutella" , "Fernando & Sorocaba", "https://www.dropbox.com/s/gzcvgh97g9kzhyt/Cachaca%20e%20Nutella.mp3?dl=1"}
  305. // SEMPRE MUDAR AQUELE 0 (ZERO) DO FINAL DO LINK PARA 1 (UM)
  306. };
  307. static const Infoart[14][350] = {
  308. {"{FFFFFF}                     --- Principais código penal ---"},
  309. {"{FFFFFF}Art. 33 - Tranfico de intorpecentes .(Resumo)"},
  310. {"{FFFFFF}Art. 121 - Crime contra vida .(Resumo)"},
  311. {"{FFFFFF}Art. 129 - Ofender a integridade corporal ou a saúde de outrem ."},
  312. {"{FFFFFF}Art. 138 - Caluniar alguém, imputando-lhe falsamente fato definido como crime ."},
  313. {"{FFFFFF}Art. 140 - Injuriar alguém, ofendendo-lhe a dignidade ou o decoro ."},
  314. {"{FFFFFF}Art. 148 - Privar alguém de sua liberdade, mediante seqüestro ou cárcere privado ."},
  315. {"{FFFFFF}Art. 150 - Entrar ou permanecer clandestina, em casa alheia ou em suas dependências ."},
  316. {"{FFFFFF}Art. 155 - Subtrair, para si ou para outrem, coisa alheia ."},
  317. {"{FFFFFF}Art. 157 - Subtrair, para si ou para outrem, coisa alheia, mediante grave ameaça ou violência a pessoa ."},
  318. {"{FFFFFF}Art. 163 - Destruir, inutilizar ou deteriorar coisa alheia ."},
  319. {"{FFFFFF}Art. 171 - Obter, para si ou para outrem, vantagem ilícita, em prejuízo alheio, ou qualquer outro meio fraudulento ."},
  320. {"{FFFFFF}Art. 331 - Desacatar, ou seja, faltar com o respeito para com um funcionário público no exercício da função ."},
  321. {"{FFFFFF}                     --- Principais código penal ---"}
  322. };
  323. static const Tempoart[14][350] = {
  324. {"{FFFFFF}                     --- Principais código penal ---"},
  325. {"{FFFFFF}Art. 33 - 10 Minutos de reclusão ."},
  326. {"{FFFFFF}Art. 121 - 30 Minutos de reclusão ."},
  327. {"{FFFFFF}Art. 129 - 05 Minutos de reclusão ."},
  328. {"{FFFFFF}Art. 138 - 05 Minutos de reclusão ."},
  329. {"{FFFFFF}Art. 140 - 05 Minutos de reclusão ."},
  330. {"{FFFFFF}Art. 148 - 20 Minutos de reclusão ."},
  331. {"{FFFFFF}Art. 150 - 10 Minutos de reclusão ."},
  332. {"{FFFFFF}Art. 155 - 15 Minutos de reclusão ."},
  333. {"{FFFFFF}Art. 157 - 20 Minutos de reclusão ."},
  334. {"{FFFFFF}Art. 163 - 10 Minutos de reclusão ."},
  335. {"{FFFFFF}Art. 171 - 05 Minutos de reclusão ."},
  336. {"{FFFFFF}Art. 331 - 10 Minutos de reclusão ."},
  337. {"{FFFFFF}                     --- Principais código penal ---"}
  338. };
  339.  
  340. new VGroove[5];
  341. new VBallas[5];
  342. new VVagos[5];
  343. new VAzteca[5];
  344.  
  345. /* INCLUDES EXTRAS  */
  346. #include      BrasilInclude\COMANDOSPLAYERS.pwn
  347. #include      BrasilInclude\MAPAS.pwn
  348. #include      BrasilInclude\TEXTDRAW.pwn
  349. #include      BrasilInclude\DS-Ban.pwn
  350. #include      BrasilInclude\EMPRESA.pwn
  351. //#include      BrasilInclude\DS-Sistema carro.pwn
  352. main()
  353. {
  354.     print(" [ BRASIL ROLEPLAY BETA]  ");
  355. }
  356. CallBacK::OnGameModeInit[]
  357. {
  358.     SetGameModeText("Brasil RolePlay");
  359.     SendRconCommand("mapname Brasil");
  360.     SendRconCommand("hostname Brasil RolePlay [BETA]");
  361.    
  362.     DisableInteriorEnterExits();
  363.     UsePlayerPedAnims();
  364.     EnableStuntBonusForAll(false);
  365.     //LoadVehicleAll();
  366.     MapGameMode();
  367.    
  368.     //ManualVehicleEngineAndLights();
  369.    
  370.     AdmCarrega();// Carrega o sistema de admin
  371.     ORGCarrega();
  372.     CarregarEmpresa();
  373.    
  374.     /*Agencia de emprego*/
  375.     CreatePickup(1239, 1, 951.1113,-1744.5856,13.6210,-1);
  376.     Create3DTextLabel("{FFFFFF}[AGENCIA DE EMPREGO]\n(/pegaremprego)", -1, 951.1113,-1744.5856,13.6210, 15.0, 0, 0);
  377.     /*Spawn Transportador*/
  378.     CreatePickup(1279, 1, 1751.4454,-2055.2585,13.9677,-1);
  379.     Create3DTextLabel("{FFFFFF}[Don Transportes]\nLocal de coleta.(/coletar)", -1, 1751.4454,-2055.2585,13.9677, 15.0, 0, 0);
  380.  
  381.     for(new ds = 1; ds < MAXROTAS; ds++)
  382.     {
  383.         format(String, sizeof String, "{FFFFFF}[%s]\nLocal de coleta.(/coletar)", TrabalhoInfo[ds][Local]);
  384.         CreatePickup(1279, 1, TrabalhoInfo[ds][X],TrabalhoInfo[ds][Y],TrabalhoInfo[ds][Z],-1);
  385.         Create3DTextLabel(String, -1, TrabalhoInfo[ds][X],TrabalhoInfo[ds][Y],TrabalhoInfo[ds][Z], 15.0, 0, 0);
  386.     }
  387.     for(new donspeed = 1; donspeed < MAXROTAS; donspeed++)
  388.     {
  389.         format(String, sizeof String, "{FFFFFF}[%s]\nLocal para embarque e desembaque", OnibusInfo[donspeed][Local]);
  390.         Create3DTextLabel(String, -1, OnibusInfo[donspeed][X],OnibusInfo[donspeed][Y],OnibusInfo[donspeed][Z], 15.0, 0, 0);
  391.     }
  392.     Create3DTextLabel("{FFFFFF}[Terminal de Los Santos]\nLocal para embarque e desembaque", -1, 1269.6337,-1833.7631,13.3850, 15.0, 0, 0);
  393.    
  394.     /* ENTRADAS E SAIDAS */
  395.     CreatePickup(1239, 1, 1112.1864,-1370.0305,13.9844,-1);// Loja pickup na rua
  396.     Create3DTextLabel("{FFFFFF}[{FFEC8B}Loja de celulares{FFFFFF}]\nAperte 'F' para entrar", -1, 1112.1864,-1370.0305,13.9844, 15.0, 0, 0);
  397.  
  398.     CreatePickup(1239, 1, 662.6379,-573.4273,16.3359,-1);// Loja pickup na interior
  399.     Create3DTextLabel("{FFFFFF}[{FFEC8B}Loja de celulares{FFFFFF}]\nAperte 'F' para sair", -1, 662.6379,-573.4273,16.3359, 15.0, 0, 0);
  400.  
  401.     CreatePickup(1274, 1, 664.1734,-568.1102,16.3433,-1);// Loja pickup na interior
  402.     Create3DTextLabel("{FFFFFF}[{FFEC8B}Loja de celulares{FFFFFF}]\nUse '/comprarlc' para efetuar a compra", -1, 664.1734,-568.1102,16.3433, 15.0, 0, 0);
  403.  
  404.     CreatePickup(1239, 1, 246.9205,62.8383,1003.6406,-1); // Guarda municipal
  405.     Create3DTextLabel("{FFFFFF}[{87CEFA}Guarda Municipal{FFFFFF}]\nAperte 'F' para sair", -1, 246.9205,62.8383,1003.6406, 15.0, 0, 0);
  406.    
  407.     CreatePickup(1239, 1, 1480.7234,-1783.2421,21.0903,-1); // Guarda municipal
  408.     Create3DTextLabel("{FFFFFF}[{87CEFA}Guarda Municipal{FFFFFF}]\nAperte 'F' para entrar", -1, 1480.7234,-1783.2421,21.0903, 15.0, 0, 0);
  409.    
  410.     CreatePickup(1242, 1, 258.5227,77.6601,1003.6406,-1);
  411.     Create3DTextLabel("{FFFFFF}[{87CEFA}Guarda Municipal{FFFFFF}]\nAperte 'F' para obter os equipamentos", -1, 258.5227,77.6601,1003.6406, 15.0, 0, 0);
  412.  
  413.     CreatePickup(1239, 1, 1554.6930,-1675.4583,16.1953,-1);
  414.     Create3DTextLabel("{FFFFFF}[{1E90FF}Policia Militar{FFFFFF}]\nAperte 'F' para entrar", -1, 1554.6930,-1675.4583,16.1953, 15.0, 0, 0);
  415.  
  416.     CreatePickup(1239, 1, 246.375991,109.245994,1003.218750,-1);// Policia interior
  417.     Create3DTextLabel("{FFFFFF}[{1E90FF}Policia Militar{FFFFFF}]\nAperte 'F' para sair", -1, 246.375991,109.245994,1003.218750, 15.0, 0, 0);
  418.  
  419.     CreatePickup(1242, 1, 256.2979,120.9445,1003.2188,-1);
  420.     Create3DTextLabel("{FFFFFF}[{1E90FF}Policia Militar{FFFFFF}]\nAperte 'F' para obter os equipamentos", -1, 256.2979,120.9445,1003.2188, 15.0, 0, 0);
  421.  
  422.     CreatePickup(1239, 1, 276.6117,122.0081,1004.6172,-1);
  423.     Create3DTextLabel("{FFFFFF}[{1E90FF}Policia Militar{FFFFFF}]\nAperte 'F' para sair", -1, 276.6117,122.0081,1004.6172, 15.0, 0, 0);
  424.  
  425.     CreatePickup(1239, 1, 1524.8663,-1677.9346,5.8906,-1);// dentro do interior
  426.     Create3DTextLabel("{FFFFFF}[{1E90FF}Policia Militar{FFFFFF}]\nAperte 'F' para entrar", -1, 1524.8663,-1677.9346,5.8906, 15.0, 0, 0);
  427.  
  428.     CreatePickup(1239, 1, 1525.2028,-1458.0073,9.5000,-1);
  429.     Create3DTextLabel("{FFFFFF}[{696969}B.O.P.E{FFFFFF}]\nAperte 'F' para entrar", -1, 1525.2028,-1458.0073,9.5000, 15.0, 0, 0);
  430.  
  431.     CreatePickup(1239, 1, 1519.1150,-1452.6510,14.2031,-1);
  432.     Create3DTextLabel("{FFFFFF}[{696969}B.O.P.E{FFFFFF}]\nAperte 'F' para entrar", -1, 1519.1150,-1452.6510,14.2031, 15.0, 0, 0);
  433.  
  434.     CreatePickup(1239, 1, 322.2710,317.4043,999.1484,-1); // saida baixo
  435.     Create3DTextLabel("{FFFFFF}[{696969}B.O.P.E{FFFFFF}]\nAperte 'F' para sair", -1, 322.2710,317.4043,999.1484, 15.0, 0, 0);
  436.  
  437.     CreatePickup(1239, 1, 322.197998,302.497985,999.148437,-1);
  438.     Create3DTextLabel("{FFFFFF}[{696969}B.O.P.E{FFFFFF}]\nAperte 'F' para sair", -1, 322.197998,302.497985,999.148437, 15.0, 0, 0);
  439.  
  440.     CreatePickup(1242, 1, 325.1823,307.3195,999.1484,-1);
  441.     Create3DTextLabel("{FFFFFF}[{696969}B.O.P.E{FFFFFF}]\nAperte 'F' para obter os equipamentos", -1, 325.1823,307.3195,999.1484, 15.0, 0, 0);
  442.  
  443.     CreatePickup(1239, 1, 1547.0463,-1130.1417,24.0721,-1);//Entrada Auto Escola
  444.     Create3DTextLabel("{FFFFFF}[{00F5FF}Auto Escola{FFFFFF}]\nAperte 'F' para entrar", -1, 1547.0463,-1130.1417,24.0721, 15.0, 0, 0);
  445.  
  446.     CreatePickup(1239, 1, 1494.4147,1303.5787,1093.2891,-1);//saida Auto Escola
  447.     Create3DTextLabel("{FFFFFF}[{00F5FF}Auto Escola{FFFFFF}]\nAperte 'F' para sair", -1, 1494.4147,1303.5787,1093.2891, 15.0, 0, 0);
  448.  
  449.     //CreatePickup(1210, 1, 1494.325195,1304.942871,1093.289062,-1);//Comprar cnh
  450. //  Create3DTextLabel("{FFFFFF}[{00F5FF}Auto Escola{FFFFFF}]\nDigite (/cnh) para efetuar o teste.", -1, 1494.325195,1304.942871,1093.289062, 15.0, 0, 0);
  451.  
  452.  
  453.     // GROVOE
  454.     CreatePickup(1254, 1, 2495.1582,-1690.7872,14.7656,-1);
  455.     Create3DTextLabel("{FFFFFF}[{006400}Groove Street{FFFFFF}]\nAperte 'F' para obter os equipamentos", -1, 2495.1582,-1690.7872,14.7656, 15.0, 0, 0);
  456.  
  457.    // Ballas
  458.     CreatePickup(1254, 1, 341.6860,-1334.2548,14.5078,-1);
  459.     Create3DTextLabel("{FFFFFF}[{C71585}Ballas{FFFFFF}]\nAperte 'F' para obter os equipamentos", -1, 341.6860,-1334.2548,14.5078, 15.0, 0, 0);
  460.  
  461.     // Vagos
  462.     CreatePickup(1254, 1, 953.9611,-909.8114,45.7656,-1);
  463.     Create3DTextLabel("{FFFFFF}[{FFFF00}Vagos{FFFFFF}]\nAperte 'F' para obter os equipamentos", -1, 953.9611,-909.8114,45.7656, 15.0, 0, 0);
  464.  
  465.     // azteca
  466.     CreatePickup(1254, 1, 1673.8043,-2122.3308,14.1460,-1);
  467.     Create3DTextLabel("{FFFFFF}[{6495ED}Azteca{FFFFFF}]\nAperte 'F' para obter os equipamentos", -1, 1673.8043,-2122.3308,14.1460, 15.0, 0, 0);
  468.  
  469.     return 1;
  470. }
  471.  
  472. CallBacK::OnGameModeExit[]
  473. {
  474.     AdmSalva();
  475.     //SaveVehicleAll();
  476.     DOF2_Exit();
  477.     return 1;
  478. }
  479.  
  480. CallBacK::OnPlayerRequestClass[playerid, classid]
  481. {
  482. //  SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  483. //  SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  484. //  SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  485.     return 0;
  486. }
  487.  
  488. CallBacK::OnPlayerConnect[playerid]
  489. {
  490.     CriarText(playerid);
  491.     if(strfind(DonPegaNome(playerid), "_", true) == -1)
  492.     {
  493.         SendClientMessage(playerid, -1, "{FFFFFF}|____________________________ {FF0000}AVISO {FFFFFF}____________________________");
  494.         SendClientMessage(playerid, -1, "{FFFFFF}Seu nome deve serguir o seguinte padrão : {FF0000}Nome_Sobrenome{FFFFFF}.");
  495.         SendClientMessage(playerid, -1, "{FFFFFF}Por conta deste erro o senhor(a) foi desconectado de nosso sistemas.");
  496.         SendClientMessage(playerid, -1,"");
  497.         SendClientMessage(playerid, -1,"");
  498.         SendClientMessage(playerid, -1, "{436EEE}Brasil Roleplay{FFFFFF} agradece a compreenção.");
  499.         Kick(playerid);
  500.         return 1;
  501.     }
  502.     PlayerInfo[playerid][MinhaOrg] = 0;
  503.     PlayerInfo[playerid][Ranked] = 0;
  504.     PlayerInfo[playerid][Login] = true;
  505.     SetPlayerColor(playerid, -1);
  506.     format(EmGeral, sizeof(EmGeral), ContaSalva , DonPegaNome(playerid));
  507.  
  508.     if(!DOF2_FileExists(EmGeral))
  509.     {
  510.        format(String, sizeof String, "{FFFFFF}Olá {FF0000}%s{FFFFFF} seja bem-vindo ao {436EEE}Brasil RolePlay{FFFFFF} .\n\n\nSenhor(a) não consta em nosso {FF0000}banco de dados{FFFFFF}.\nDigite uma senha para registrar.\n{FF0000}Bom jogo.{FFFFFF}", DonPegaNome(playerid));
  511.        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Brasil Roleplay", String, "Registrar", "{FF0000}Sair{FFFFFF}");
  512.     }
  513.     else
  514.     {
  515.        format(String, sizeof String, "{FFFFFF}Olá {FF0000}%s{FFFFFF} seja bem-vindo ao {436EEE}Brasil RolePlay{FFFFFF} .\n\n\nSenhor(a) possui conta em nosso {FF0000}banco de dados{FFFFFF}.\nDigite sua senha para logar.\n{FF0000}Bom jogo.{FFFFFF}", DonPegaNome(playerid));
  516.        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Brasil RolePlay", String, "Logar", "{FF0000}Sair{FFFFFF}");
  517.     }
  518.     MapConnect(playerid);
  519.     PlayerInfo[playerid][Coletou] = false;
  520.     SetTimer("Salvando", 1000*10, true);
  521.     return 1;
  522. }
  523. CallBacK::Salvando[playerid]
  524. {
  525.     DonSalva(playerid);
  526.     return true;
  527. }
  528. CallBacK::OnPlayerDisconnect[playerid, reason]
  529. {
  530.      Salvando(playerid);
  531.      DestroiText(playerid);
  532.      PlayerInfo[playerid][Dinheiro] = 0;
  533.      PlayerInfo[playerid][Nivel] = 0;
  534.      PlayerInfo[playerid][Respeito] = 0;
  535.      PlayerInfo[playerid][TempoJogado] = 0;
  536.      PlayerInfo[playerid][Skin] = 0;
  537.      PlayerInfo[playerid][Pos][0]= 0;
  538.      PlayerInfo[playerid][Pos][1]= 0;
  539.      PlayerInfo[playerid][Pos][2]= 0;
  540.      PlayerInfo[playerid][Interior] = 0;
  541.      PlayerInfo[playerid][MinhaOrg] = 0;
  542.      PlayerInfo[playerid][Ranked] = 0;
  543.      PlayerInfo[playerid][Telefone] = 0;
  544.      PlayerInfo[playerid][Creditos] = 0;
  545.      PlayerInfo[playerid][Tentativa] = 0;
  546.      PlayerInfo[playerid][Emprego] = 0;
  547.      PlayerInfo[playerid][Sexo] = false;
  548.      PlayerInfo[playerid][Login] = false;
  549.      PlayerInfo[playerid][Coletou] = false;
  550.      PlayerInfo[playerid][Passei] = 0;
  551.      PlayerInfo[playerid][IDVColeta] = 0;
  552.      PlayerInfo[playerid][IDColeta] = 0;
  553.      PlayerInfo[playerid][Admin] = 0;
  554.      PlayerInfo[playerid][LigouP] = -1;
  555.      PlayerInfo[playerid][Atendeu] = false;
  556.      PlayerInfo[playerid][Procurado] = 0;
  557.      PlayerInfo[playerid][TempoPreso] = 0;
  558.      for(new su = 0; su< 5; su++)
  559.      {
  560.         PlayerInfo[playerid][Suspeito][su] = 0;
  561.      }
  562.      return 1;
  563. }
  564.  
  565. CallBacK::OnPlayerSpawn[playerid]
  566. {
  567.     if(PlayerInfo[playerid][Login] == true)
  568.     {
  569.        SetPlayerPos(playerid, PlayerInfo[playerid][Pos][0],PlayerInfo[playerid][Pos][1], PlayerInfo[playerid][Pos][2]);
  570.        SetPlayerInterior(playerid, PlayerInfo[playerid][Interior]);
  571.        SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
  572.        PlayerInfo[playerid][Login] = false;
  573.        for(new vagads = 1; vagads < MAX_VAGAS; vagads++)
  574.        {
  575.             if(!strcmp(AdminInfo[vagads][Name],DonPegaNome(playerid)))
  576.             {
  577.                new donstring[80];
  578.                format(donstring, sizeof donstring, "Você tem administrador nivel %d(%s)",AdminInfo[vagads][Nivel], NomeNivel[AdminInfo[vagads][Nivel]]);
  579.                SendClientMessage(playerid, -1, donstring);
  580.                PlayerInfo[playerid][Admin] = AdminInfo[vagads][Nivel];
  581.             }
  582.        }
  583.        for(new dscheck = 1; dscheck < MAX_ORGS - 1; dscheck++)
  584.        {
  585.            new donstring[90];
  586.            format(donstring, sizeof(donstring), OrgSalva, dscheck);
  587.            if(!strcmp(DOF2_GetString(donstring,OrgsCargos[0]),DonPegaNome(playerid)))
  588.            {
  589.                PlayerInfo[playerid][MinhaOrg] = dscheck;
  590.                PlayerInfo[playerid][Ranked] = 5;
  591.  
  592.                format(donstring, sizeof donstring, "Você e lider de uma organização (%s).",OrgInfo[dscheck][NameORG]);
  593.                SendClientMessage(playerid, -1, donstring);
  594.                SetPlayerHealth(playerid, 99);
  595.            }else
  596.            {
  597.                for(new i=1; i< sizeof OrgsCargos; i++)
  598.                {
  599.                     if(!strcmp(DOF2_GetString(donstring,OrgsCargos[i]),DonPegaNome(playerid)))
  600.                     {
  601.                          PlayerInfo[playerid][MinhaOrg] = dscheck;
  602.  
  603.                          format(donstring, sizeof donstring, "Você e membro de uma organização (%s).",OrgInfo[dscheck][NameORG]);
  604.                          SendClientMessage(playerid, -1, donstring);
  605.                          SetPlayerHealth(playerid, 99);
  606.                     }
  607.                }
  608.            }
  609.         }
  610.        SetTimerEx("SalvarConta", 1000, true, "i", playerid);
  611.        LoadBan(playerid);
  612.     }
  613.     else if(PlayerInfo[playerid][Login] == false)
  614.     {
  615.          if(PlayerInfo[playerid][PoliciaM] == false)
  616.          {
  617.              if(PlayerInfo[playerid][MinhaOrg] > 0)
  618.              {
  619.                  SetPlayerPos(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][X], OrgInfo[PlayerInfo[playerid][MinhaOrg]][Y], OrgInfo[PlayerInfo[playerid][MinhaOrg]][Z]);
  620.                  SetPlayerColor(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Color]);
  621.                  if(PlayerInfo[playerid][Ranked] < 5){
  622.                  SetPlayerSkin(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][SkinMembro1]);}
  623.                  else{SetPlayerSkin(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][SkinLider]);}
  624.                  SetPlayerInterior(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Interior]);
  625.                  SetPlayerHealth(playerid, 99);
  626.              }
  627.          }
  628.          else
  629.          {
  630.               VerificarNivel(playerid);
  631.          }
  632.     }
  633.     return 1;
  634. }
  635. command(spawneu,playerid,params[])return SpawnPlayer(playerid);
  636. CallBacK::OnPlayerDeath[playerid, killerid, reason]
  637. {
  638.     if(PlayerInfo[playerid][Procurado] >= 1)
  639.     {
  640.          if(PlayerInfo[killerid][MinhaOrg] == 1 || PlayerInfo[killerid][MinhaOrg] == 2 || PlayerInfo[killerid][MinhaOrg] == 3)
  641.          {
  642.              PlayerInfo[playerid][PoliciaM] = true;
  643.              SendClientMessage(playerid, -1, "Você foi capturado.");
  644.              
  645.              SendClientMessage(killerid, -1, "Você capturou um fugitivo da lei. Ganhou bonus de R$ 250,00");
  646.              PlayerInfo[killerid][Dinheiro] += 250;
  647.          }
  648.     }
  649.     return 1;
  650. }
  651.  
  652. CallBacK::OnVehicleSpawn[vehicleid]
  653. {
  654.     return 1;
  655. }
  656.  
  657. CallBacK::OnVehicleDeath[vehicleid, killerid]
  658. {
  659.     return 1;
  660. }
  661.  
  662. CallBacK::OnPlayerText[playerid, text[]]
  663. {
  664.     new sdstring[300];
  665.     if(PlayerInfo[playerid][Atendeu] == true)
  666.     {
  667.         if(!IsPlayerConnected(PlayerInfo[playerid][LigouP]))
  668.         {
  669.             PlayerInfo[playerid][Atendeu] = true;
  670.             PlayerInfo[playerid][LigouP] = -1;
  671.             SendClientMessage(playerid, -1, "Jogador não conectado.");
  672.             return true;
  673.         }
  674.         format(sdstring, sizeof sdstring,"[CELULAR]%s: %s .", DonPegaNome(playerid), text);
  675.         SendClientMessage(PlayerInfo[playerid][LigouP], -1, sdstring);
  676.         format(sdstring, sizeof sdstring,"[CELULAR]%s: %s .", DonPegaNome(playerid), text);
  677.         SendClientMessage(playerid, -1, sdstring);
  678.         return true;
  679.     }
  680.  
  681.     new string[128];
  682.     new Float:x, Float:y, Float:z;
  683.     GetPlayerPos(playerid, x, y, z);
  684.    
  685.     format(string, sizeof string,"%s: %s", DonPegaNome(playerid), text);
  686.     for(new i = 0; i < MAX_PLAYERS; i++)
  687.     {
  688.        if(i==playerid)return true;
  689.        if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
  690.        {
  691.           SendClientMessage(i, -1, string);
  692.           return true;
  693.        }
  694.     }
  695.     return 1;
  696. }
  697.  
  698. CallBacK::OnPlayerEnterVehicle[playerid, vehicleid, ispassenger]
  699. {
  700.     return 1;
  701. }
  702.  
  703. CallBacK::OnPlayerExitVehicle[playerid, vehicleid]
  704. {
  705.     return 1;
  706. }
  707. CallBacK::OnPlayerStateChange[playerid, newstate, oldstate]
  708. {
  709.     if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
  710.     {
  711.         for(new vi; vi< 14; vi++)
  712.         {
  713.            if(GetPlayerVehicleID(playerid) == VTRUCK[vi])
  714.            {
  715.               if(PlayerInfo[playerid][Emprego] != 1)
  716.               {
  717.                   RemovePlayerFromVehicle(playerid);
  718.                   SendClientMessage(playerid, -1, "Você não e transportador.");
  719.               }
  720.            }
  721.         }
  722.         for(new dvi; dvi< 6; dvi++)
  723.         {
  724.            if(GetPlayerVehicleID(playerid) == VBUS[dvi])
  725.            {
  726.               if(PlayerInfo[playerid][Emprego] != 2)
  727.               {
  728.                   RemovePlayerFromVehicle(playerid);
  729.                   SendClientMessage(playerid, -1, "Você não e motorista.");
  730.               }
  731.            }
  732.         }
  733.         for(new dvsi; dvsi< 11; dvsi++)
  734.         {
  735.            if(GetPlayerVehicleID(playerid) == ViaturaGM[dvsi])
  736.            //if(IsPlayerInVehicle(playerid, ViaturaGM[dvsi]))
  737.            {
  738.               if(PlayerInfo[playerid][MinhaOrg] != 1)
  739.               {
  740.                   RemovePlayerFromVehicle(playerid);
  741.                   SendClientMessage(playerid, -1, "Você não e guarda.");
  742.               }
  743.            }
  744.         }
  745.         for(new viabope; viabope< 6; viabope++)
  746.         {
  747.            if(GetPlayerVehicleID(playerid) == ViaturaBOPE[viabope])
  748.            {
  749.               if(PlayerInfo[playerid][MinhaOrg] != 3)
  750.               {
  751.                   RemovePlayerFromVehicle(playerid);
  752.                   SendClientMessage(playerid, -1, "Você não e do BOPE.");
  753.               }
  754.            }
  755.         }
  756.         for(new viapm; viapm< 11; viapm++)
  757.         {
  758.            if(GetPlayerVehicleID(playerid) == ViaturaPM[viapm])
  759.            {
  760.               if(PlayerInfo[playerid][MinhaOrg] != 2)
  761.               {
  762.                   RemovePlayerFromVehicle(playerid);
  763.                   SendClientMessage(playerid, -1, "Você não e da PM.");
  764.               }
  765.            }
  766.         }
  767.         for(new ddds=0; ddds< 9; ddds++)
  768.         {
  769.            if(GetPlayerVehicleID(playerid) == VPR[ddds])
  770.            {
  771.               if(PlayerInfo[playerid][MinhaOrg] != 5)
  772.               {
  773.                   RemovePlayerFromVehicle(playerid);
  774.                   SendClientMessage(playerid, -1, "Você não e da Prefeitura.");
  775.               }
  776.            }
  777.         }
  778.         for(new setartodos = 0; setartodos < 5; setartodos++)
  779.         {
  780.            if(GetPlayerVehicleID(playerid) == VGroove[setartodos])
  781.            {
  782.               if(PlayerInfo[playerid][MinhaOrg] != 6)
  783.               {
  784.                   RemovePlayerFromVehicle(playerid);
  785.                   SendClientMessage(playerid, -1, "Você não e groove.");
  786.               }
  787.            }
  788.            if(GetPlayerVehicleID(playerid) == VBallas[setartodos])
  789.            {
  790.               if(PlayerInfo[playerid][MinhaOrg] != 7)
  791.               {
  792.                   RemovePlayerFromVehicle(playerid);
  793.                   SendClientMessage(playerid, -1, "Você não e ballas.");
  794.               }
  795.            }
  796.            if(GetPlayerVehicleID(playerid) == VVagos[setartodos])
  797.            {
  798.               if(PlayerInfo[playerid][MinhaOrg] != 8)
  799.               {
  800.                   RemovePlayerFromVehicle(playerid);
  801.                   SendClientMessage(playerid, -1, "Você não e vagos.");
  802.               }
  803.            }
  804.            if(GetPlayerVehicleID(playerid) == VAzteca[setartodos])
  805.            {
  806.               if(PlayerInfo[playerid][MinhaOrg] != 9)
  807.               {
  808.                   RemovePlayerFromVehicle(playerid);
  809.                   SendClientMessage(playerid, -1, "Você não e azteca.");
  810.               }
  811.            }
  812.         }
  813.     }
  814.     return 1;
  815. }
  816. CallBacK::Descongelar[playerid] return TogglePlayerControllable(playerid,1);
  817. CallBacK::OnPlayerEnterCheckpoint[playerid]
  818. {
  819.      TogglePlayerControllable(playerid,0);
  820.      SetTimerEx("Descongelar", 5000, false, "i", playerid);
  821.      if(PlayerInfo[playerid][Passei] == 1)
  822.      {
  823.             DisablePlayerCheckpoint(playerid);
  824.             new dsrand = random(MAXROTAS);
  825.             if(dsrand == 0){dsrand = random(MAXROTAS); return true;}
  826.             PlayerInfo[playerid][IDColeta] = OnibusInfo[dsrand][IDColeta];
  827.             printf("id coleta %d | Rand %d", PlayerInfo[playerid][IDColeta], OnibusInfo[dsrand][IDColeta]);
  828.             PlayerInfo[playerid][IDVColeta] = GetPlayerVehicleID(playerid);
  829.             PlayerInfo[playerid][Coletou] = true;
  830.             SetPlayerCheckpoint(playerid, OnibusInfo[dsrand][X], OnibusInfo[dsrand][Y], OnibusInfo[dsrand][Z], 5.0);
  831.             PlayerInfo[playerid][Passei] ++;
  832.             format(String, sizeof String, "Transporte os passageiros até %s com a remuneração de R$ %d .", OnibusInfo[dsrand][Local], TrabalhoInfo[dsrand][Pagamento]);
  833.             SendClientMessage(playerid, -1, String);
  834.             return true;
  835.      }
  836.      if(PlayerInfo[playerid][Passei] == 2)
  837.      {
  838.            if(PlayerInfo[playerid][Coletou] == true)
  839.            {
  840.                if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][IDVColeta])
  841.                {
  842.                    PlayerInfo[playerid][Dinheiro] += OnibusInfo[PlayerInfo[playerid][IDColeta]][Pagamento];
  843.                    format(String, sizeof String, "Viajem realizado com sucesso seu pagamento e de R$ %d.", OnibusInfo[PlayerInfo[playerid][IDColeta]][Pagamento]);
  844.                    SendClientMessage(playerid, -1, String);
  845.                    PlayerInfo[playerid][Passei] = 0;
  846.                    DisablePlayerCheckpoint(playerid);
  847.                    PlayerInfo[playerid][Coletou] = false;
  848.                    PlayerInfo[playerid][IDColeta] = 0;
  849.                    PlayerInfo[playerid][IDVColeta] = 0;
  850.                }
  851.           }
  852.      }
  853.      return 1;
  854. }
  855.  
  856. CallBacK::OnPlayerLeaveCheckpoint[playerid]
  857. {
  858.     return 1;
  859. }
  860.  
  861. CallBacK::OnPlayerEnterRaceCheckpoint[playerid]
  862. {
  863.     return 1;
  864. }
  865.  
  866. CallBacK::OnPlayerLeaveRaceCheckpoint[playerid]
  867. {
  868.     return 1;
  869. }
  870.  
  871. CallBacK::OnPlayerRequestSpawn[playerid]
  872. {
  873.     return 1;
  874. }
  875.  
  876. CallBacK::OnObjectMoved[objectid]
  877. {
  878.     return 1;
  879. }
  880.  
  881. CallBacK::OnPlayerObjectMoved[playerid, objectid]
  882. {
  883.     return 1;
  884. }
  885.  
  886. CallBacK::OnPlayerPickUpPickup[playerid, pickupid]
  887. {
  888.     return 1;
  889. }
  890.  
  891. CallBacK::OnVehicleMod[playerid, vehicleid, componentid]
  892. {
  893.     return 1;
  894. }
  895.  
  896. CallBacK::OnVehiclePaintjob[playerid, vehicleid, paintjobid]
  897. {
  898.     return 1;
  899. }
  900.  
  901. CallBacK::OnVehicleRespray[playerid, vehicleid, color1, color2]
  902. {
  903.     return 1;
  904. }
  905.  
  906. CallBacK::OnPlayerSelectedMenuRow[playerid, row]
  907. {
  908.     return 1;
  909. }
  910.  
  911. CallBacK::OnPlayerExitedMenu[playerid]
  912. {
  913.     return 1;
  914. }
  915.  
  916. CallBacK::OnPlayerInteriorChange[playerid, newinteriorid, oldinteriorid]
  917. {
  918.     return 1;
  919. }
  920.  
  921. CallBacK::OnPlayerKeyStateChange[playerid, newkeys, oldkeys]
  922. {
  923.     if(newkeys == KEY_SECONDARY_ATTACK)
  924.     {
  925.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.9205,62.8383,1003.6406))return SetPlayerPos(playerid, 1480.7234,-1783.2421,21.0903), SetPlayerInterior(playerid, 0);
  926.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1480.7234,-1783.2421,21.0903))return SetPlayerPos(playerid, 246.9205,62.8383,1003.6406), SetPlayerInterior(playerid, 0);
  927.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 258.5227,77.6601,1003.6406))
  928.         {
  929.             if(PlayerInfo[playerid][MinhaOrg] == 1){
  930.             for(new i=0; i<MAX_WEAPON; i ++)
  931.             {
  932.                GivePlayerWeapon(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Armas][i], 100000);
  933.                
  934.             }
  935.             SendClientMessage(playerid, -1, "{FFFFFF}[{87CEFA}Guarda Municipal{FFFFFF}] Você pegou seu armamento.");
  936.             SetPlayerHealth(playerid, 99);
  937.             }
  938.         }
  939.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 256.2979,120.9445,1003.2188))
  940.         {
  941.             if(PlayerInfo[playerid][MinhaOrg] == 2){
  942.             for(new i=0; i<MAX_WEAPON; i ++)
  943.             {
  944.                GivePlayerWeapon(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Armas][i], 100000);
  945.             }
  946.             SendClientMessage(playerid, -1, "{FFFFFF}[{696969}Policia Militar{FFFFFF}] Você pegou seu armamento.");
  947.             SetPlayerHealth(playerid, 99);
  948.             }
  949.         }
  950. //PM
  951.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1554.6930,-1675.4583,16.1953))return SetPlayerPos(playerid, 246.375991,109.245994,1003.218750), SetPlayerInterior(playerid, 10);//10
  952.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.375991,109.245994,1003.218750))return SetPlayerPos(playerid, 1554.6930,-1675.4583,16.1953), SetPlayerInterior(playerid, 0);
  953.  
  954.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 276.6117,122.0081,1004.6172))return SetPlayerPos(playerid, 1524.8663,-1677.9346,5.8906), SetPlayerInterior(playerid, 0);
  955.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1524.8663,-1677.9346,5.8906))return SetPlayerPos(playerid, 276.6117,122.0081,1004.6172), SetPlayerInterior(playerid, 10);
  956.  
  957.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 325.1823,307.3195,999.1484))
  958.         {
  959.             if(PlayerInfo[playerid][MinhaOrg] == 3){
  960.             for(new i=0; i<MAX_WEAPON; i ++)
  961.             {
  962.                GivePlayerWeapon(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Armas][i], 100000);
  963.             }
  964.             SendClientMessage(playerid, -1, "{FFFFFF}[{696969}B.O.P.E{FFFFFF}] Você pegou seu armamento.");
  965.             SetPlayerHealth(playerid, 99);
  966.             }
  967.         }
  968.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 322.197998,302.497985,999.148437))return SetPlayerPos(playerid, 1519.1150,-1452.6510,14.2031), SetPlayerInterior(playerid, 0);
  969.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1519.1150,-1452.6510,14.2031))return SetPlayerPos(playerid, 322.197998,302.497985,999.148437), SetPlayerInterior(playerid, 5);
  970.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 322.2710,317.4043,999.1484))return SetPlayerPos(playerid, 1525.2028,-1458.0073,9.5000), SetPlayerInterior(playerid, 0);// arrumar aqui
  971.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1525.2028,-1458.0073,9.5000))return SetPlayerPos(playerid, 322.2710,317.4043,999.1484), SetPlayerInterior(playerid, 5);
  972.         //loja de celulares
  973.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1112.1864,-1370.0305,13.9844))return SetPlayerPos(playerid, 662.6379,-573.4273,16.3359), SetPlayerInterior(playerid, 0);// arrumar aqui
  974.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 662.6379,-573.4273,16.3359))return SetPlayerPos(playerid, 1112.1864,-1370.0305,13.9844), SetPlayerInterior(playerid, 0);
  975.         // auto escola
  976.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1547.0463,-1130.1417,24.0721))return SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062), SetPlayerInterior(playerid, 3);// arrumar aqui
  977.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1494.325195,1304.942871,1093.289062))return SetPlayerPos(playerid, 1547.0463,-1130.1417,24.0721), SetPlayerInterior(playerid, 0);
  978.  
  979.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 2495.1582,-1690.7872,14.7656))
  980.         {
  981.             if(PlayerInfo[playerid][MinhaOrg] == 6){
  982.             for(new i=0; i<MAX_WEAPON; i ++)
  983.             {
  984.                GivePlayerWeapon(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Armas][i], 100000);
  985.             }
  986.             SendClientMessage(playerid, -1, "{FFFFFF}[{006400}Groove Street{FFFFFF}] Você pegou seu armamento.");
  987.             SetPlayerHealth(playerid, 99);
  988.             }
  989.         }
  990.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 341.6860,-1334.2548,14.5078))
  991.         {
  992.             if(PlayerInfo[playerid][MinhaOrg] == 7){
  993.             for(new i=0; i<MAX_WEAPON; i ++)
  994.             {
  995.                GivePlayerWeapon(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Armas][i], 100000);
  996.             }
  997.             SendClientMessage(playerid, -1, "{FFFFFF}[{C71585}Ballas{FFFFFF}] Você pegou seu armamento.");
  998.             SetPlayerHealth(playerid, 99);
  999.             }
  1000.         }
  1001.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 953.9611,-909.8114,45.7656))
  1002.         {
  1003.             if(PlayerInfo[playerid][MinhaOrg] == 8){
  1004.             for(new i=0; i<MAX_WEAPON; i ++)
  1005.             {
  1006.                GivePlayerWeapon(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Armas][i], 100000);
  1007.             }
  1008.             SendClientMessage(playerid, -1, "{FFFFFF}[{FFFF00}Vagos{FFFFFF}] Você pegou seu armamento.");
  1009.             SetPlayerHealth(playerid, 99);
  1010.             }
  1011.         }
  1012.         if(IsPlayerInRangeOfPoint(playerid, 2.0, 1673.8043,-2122.3308,14.1460))
  1013.         {
  1014.             if(PlayerInfo[playerid][MinhaOrg] == 9){
  1015.             for(new i=0; i<MAX_WEAPON; i ++)
  1016.             {
  1017.                GivePlayerWeapon(playerid, OrgInfo[PlayerInfo[playerid][MinhaOrg]][Armas][i], 100000);
  1018.             }
  1019.             SendClientMessage(playerid, -1, "{FFFFFF}[{6495ED}Azteca{FFFFFF}] Você pegou seu armamento.");
  1020.             SetPlayerHealth(playerid, 99);
  1021.             }
  1022.         }
  1023.  
  1024.     }
  1025.     if(newkeys == KEY_SPRINT)
  1026.     {
  1027.        if(IsPlayerInRangeOfPoint(playerid, 3.0, 247.895874,72.519198,1002.640625) && PlayerInfo[playerid][MinhaOrg] == 1)
  1028.        {
  1029.            MoveDynamicObject(PortaoGM[0],248.895874,72.519198,1002.640625,1.0);
  1030.            MoveDynamicObject(PortaoGM[1],243.895874,72.519198,1002.640625,1.0);
  1031.            SetTimer("FecharGM", 3000, false);
  1032.        }
  1033.        if(IsPlayerInRangeOfPoint(playerid, 10.0, 1486.98438, -1804.88904, 15.43190) && PlayerInfo[playerid][MinhaOrg] == 1)
  1034.        {
  1035.            MoveDynamicObject(PortaoBaixo[0],1486.98438, -1804.88904, 20.43190,1.0);
  1036.            MoveDynamicObject(PortaoBaixo[1],1475.47913, -1804.88904, 20.43190,1.0);
  1037.            SetTimer("FecharGMBaixo", 3000, false);
  1038.        }
  1039.        if(IsPlayerInRangeOfPoint(playerid, 10.0, 1535.3000000,-1451.4000000,15.2000000) && PlayerInfo[playerid][MinhaOrg] == 3)
  1040.        {
  1041.            MoveDynamicObject(PortaoBOPE,1535.3000000,-1451.4000000,20.2000000,1.0);
  1042.            SetTimer("FecharportaoBope", 5000, false);
  1043.        }
  1044.        if(IsPlayerInRangeOfPoint(playerid, 10.0, 1587.1000000,-1638.3000000,15.2000000) && PlayerInfo[playerid][MinhaOrg] == 2)
  1045.        {
  1046.            MoveDynamicObject(PortaoPM,1587.1000000,-1638.3000000,20.2000000,1.0);
  1047.            SetTimer("FecharportaoPM", 5000, false);
  1048.        }
  1049.        return true;
  1050.     }
  1051.     return 1;
  1052. }
  1053. CallBacK::FecharportaoPM[]return MoveDynamicObject(PortaoPM, 1587.1000000,-1638.3000000,15.2000000, 1.0);
  1054. CallBacK::FecharportaoBope[]return MoveDynamicObject(PortaoBOPE, 1535.3000000, -1451.4000000, 15.2000000, 1.0);
  1055. CallBacK::FecharGMBaixo[]return MoveDynamicObject(PortaoBaixo[0],1486.98438, -1804.88904, 15.43190,1.0), MoveDynamicObject(PortaoBaixo[1],1475.47913, -1804.88904, 15.43190,1.0);
  1056. CallBacK::FecharGM[]return MoveDynamicObject(PortaoGM[0],247.895874,72.519198,1002.640625,1.0), MoveDynamicObject(PortaoGM[1],244.895874,72.519198,1002.640625,1.0);
  1057. CallBacK::OnRconLoginAttempt[ip[], password[], success]
  1058. {
  1059.     return 1;
  1060. }
  1061.  
  1062. CallBacK::OnPlayerUpdate[playerid]
  1063. {
  1064.     return 1;
  1065. }
  1066.  
  1067. CallBacK::OnPlayerStreamIn[playerid, forplayerid]
  1068. {
  1069.     return 1;
  1070. }
  1071.  
  1072. CallBacK::OnPlayerStreamOut[playerid, forplayerid]
  1073. {
  1074.     return 1;
  1075. }
  1076.  
  1077. CallBacK::OnVehicleStreamIn[vehicleid, forplayerid]
  1078. {
  1079.     return 1;
  1080. }
  1081.  
  1082. CallBacK::OnVehicleStreamOut[vehicleid, forplayerid]
  1083. {
  1084.     return 1;
  1085. }
  1086.  
  1087. CallBacK::OnDialogResponse[playerid, dialogid, response, listitem, inputtext[]]
  1088. {
  1089.     switch(dialogid)
  1090.     {
  1091.            case DIALOG_REGISTER:
  1092.            {
  1093.                 if(!response)return Kick(playerid);
  1094.                 format(EmGeral, sizeof(EmGeral), ContaSalva , DonPegaNome(playerid));
  1095.                 PlayerInfo[playerid][Dinheiro] = GRANAINICIAL;
  1096.                 PlayerInfo[playerid][Nivel] = NIVELINICIAL;
  1097.                 PlayerInfo[playerid][Respeito] = 0;
  1098.                 PlayerInfo[playerid][TempoJogado] = 0;
  1099.                 PlayerInfo[playerid][Respeito] = 0;
  1100.                 PlayerInfo[playerid][Pos][0] = POSPADRAO1;
  1101.                 PlayerInfo[playerid][Pos][1] = POSPADRAO2;
  1102.                 PlayerInfo[playerid][Pos][2] = POSPADRAO3;
  1103.                 PlayerInfo[playerid][Emprego] = 0;
  1104.                 PlayerInfo[playerid][Interior] = 0;
  1105.                 PlayerInfo[playerid][Admin] = 0;
  1106.                 ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_LIST, "{FFFFFF}Qual seu sexo ?", "Masculino\nFeminino", "Selecionar", #);
  1107.            }
  1108.            case DIALOG_LOGIN:
  1109.            {
  1110.                 if(!response)return Kick(playerid);
  1111.                 format(EmGeral, sizeof(EmGeral), ContaSalva , DonPegaNome(playerid));
  1112.                 if(!strcmp(inputtext,DOF2_GetString(EmGeral,"Senha"),true))
  1113.                 {
  1114.                      DonCarrega(playerid);
  1115.                      SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], PlayerInfo[playerid][Pos][0], PlayerInfo[playerid][Pos][1], PlayerInfo[playerid][Pos][2], 0, 0, 0, 0, 0, 0, 0 );
  1116.                      SpawnPlayer(playerid);
  1117.  
  1118.                 }
  1119.                 else
  1120.                 {
  1121.                      if(PlayerInfo[playerid][Tentativa] == 4) return Kick(playerid);
  1122.                      PlayerInfo[playerid][Tentativa] ++;
  1123.                      format(String, sizeof String, "{FFFFFF}Olá {FF0000}%s{FFFFFF} seja bem-vindo ao {436EEE}Brasil RolePlay{FFFFFF} .\n\n\nSenhor(a) possui conta em nosso {FF0000}banco de dados{FFFFFF}.\nDigite sua senha para logar.\n{FF0000}Bom jogo.{FFFFFF}", DonPegaNome(playerid));
  1124.                      ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Brasil RolePlay", String, "Logar", "{FF0000}Sair{FFFFFF}");
  1125.                 }
  1126.            }
  1127.            case DIALOG_SEXO:
  1128.            {
  1129.                 if(!response)return ShowPlayerDialog(playerid, DIALOG_SEXO, DIALOG_STYLE_LIST, "{FFFFFF}Qual seu sexo ?", "Masculino\nFeminino", "Selecionar", #);
  1130.                 switch (listitem)
  1131.                 {
  1132.                      case 0:
  1133.                      {
  1134.                          PlayerInfo[playerid][Sexo] = true;
  1135.                          SetPlayerSkin(playerid, SKININICIAL);
  1136.                          PlayerInfo[playerid][Skin] = SKININICIAL;
  1137.                          SpawnPlayer(playerid);
  1138.                          SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], PlayerInfo[playerid][Pos][0], PlayerInfo[playerid][Pos][1], PlayerInfo[playerid][Pos][2], 0, 0, 0, 0, 0, 0, 0 );
  1139.                          SpawnPlayer(playerid);
  1140.                      }
  1141.                      case 1:
  1142.                      {
  1143.                         PlayerInfo[playerid][Sexo] = false;
  1144.                         SetPlayerSkin(playerid, SKININICIALF);
  1145.                         PlayerInfo[playerid][Skin] = SKININICIALF;
  1146.                         SpawnPlayer(playerid);
  1147.                         SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], PlayerInfo[playerid][Pos][0], PlayerInfo[playerid][Pos][1], PlayerInfo[playerid][Pos][2], 0, 0, 0, 0, 0, 0, 0 );
  1148.                         SpawnPlayer(playerid);
  1149.                     }
  1150.                 }
  1151.            }
  1152.            case DIALOG_EMPREGO:
  1153.            {
  1154.                 if(!response)return true;
  1155.                 format(String, sizeof String,"{FFFFFF}Parabéns agora você trabalha de {FF0000}%s{FFFFFF}.", Empregos[listitem+1][Nome]);
  1156.                 SendClientMessage(playerid, -1, String);
  1157.                 PlayerInfo[playerid][Emprego] = listitem+1;
  1158.            }
  1159.            case DIALOG_TELEFONE:
  1160.            {
  1161.                 if(!response)return true;
  1162.                 switch (listitem)
  1163.                 {
  1164.                      case 0://EmpresaInfo[7][eItem][2]
  1165.                      {
  1166.                           if(PlayerInfo[playerid][Telefone] != 0)return SendClientMessage(playerid, -1, "VocÊ ja possui celular");
  1167.                           new valoresdef[500];
  1168.                           format(valoresdef, sizeof valoresdef ,"{FFFFFF}TIM(R$ %d)\nCLARO(R$ %d)\nOI(R$ %d)\nVIVO(R$ %d)\nDON TELEFONIA(R$ %d)", EmpresaInfo[7][eItem][2], EmpresaInfo[8][eItem][2], EmpresaInfo[9][eItem][2], EmpresaInfo[10][eItem][2], EmpresaInfo[11][eItem][2]);
  1169.                           ShowPlayerDialog(playerid,DIALOG_OPERADORA, DIALOG_STYLE_LIST, "Operadoras Disponiveis",valoresdef , "Comprar", "Fechar");
  1170.                      }
  1171.                      case 1:
  1172.                      {
  1173.                           if(PlayerInfo[playerid][Telefone] == 0)return SendClientMessage(playerid, -1, "VocÊ jnãoa possui celular");
  1174.                           new valoresdef[500];
  1175.                           format(valoresdef, sizeof valoresdef ,"{FFFFFF}Tabela de preços abaixo conforme operadora.\nValor referente a 1 credito.\nTIM(R$ %d)\nCLARO(R$ %d)\nOI(R$ %d)\nVIVO(R$ %d)\nDON TELEFONIA(R$ %d)", EmpresaInfo[7][eItem][3], EmpresaInfo[8][eItem][3], EmpresaInfo[9][eItem][3], EmpresaInfo[10][eItem][3], EmpresaInfo[11][eItem][3]);
  1176.                           ShowPlayerDialog(playerid,DIALOG_CREDITOS, DIALOG_STYLE_INPUT, "Adicionar Creditos", valoresdef, "Comprar", "Fechar");
  1177.                      }
  1178.                      case 2:
  1179.                      {
  1180.                           if(PlayerInfo[playerid][Telefone] == 0)return SendClientMessage(playerid, -1, "VocÊ nãoa possui celular");
  1181.                           new valoresdef[500];
  1182.                           format(valoresdef, sizeof valoresdef ,"{FFFFFF}Custo para resetar Numero e de : \n\n\n\nR$ %d", EmpresaInfo[6][eItem][2]);
  1183.                           ShowPlayerDialog(playerid,DIALOG_RESETARN, DIALOG_STYLE_MSGBOX, "Resetar Numero", valoresdef, "Resetar", "Fechar");
  1184.                      }
  1185.                 }
  1186.            }
  1187.            case DIALOG_RESETARN:
  1188.            {
  1189.                 if(!response)return ShowPlayerDialog(playerid,DIALOG_TELEFONE, DIALOG_STYLE_LIST, "Loja de Celulares","{FFFFFF}Comprar Aparelho\nComprar Creditos\nResetar Numero" , "Comprar", "Fechar");
  1190.                 if(PlayerInfo[playerid][Dinheiro] >= EmpresaInfo[6][eItem][2] || EmpresaInfo[6][eProdutos] < 20)
  1191.                 {
  1192.  
  1193.                    PlayerInfo[playerid][Dinheiro] -= EmpresaInfo[6][eItem][2];
  1194.                    EmpresaInfo[6][eCofre] -= EmpresaInfo[6][eItem][2];
  1195.                    EmpresaInfo[6][eProdutos] -= 20;
  1196.                    PlayerInfo[playerid][Creditos] = 0;
  1197.                    SendClientMessage(playerid, -1, "Numero resetado.");
  1198.                    PlayerInfo[playerid][Telefone] = 0 ;
  1199.  
  1200.                 }else SendClientMessage(playerid, -1, "Não tem dinheiro ou sem produtos");
  1201.            }
  1202.            case DIALOG_CREDITOS:
  1203.            {
  1204.                 new falarpreco[200];
  1205.                 if(!response)return ShowPlayerDialog(playerid,DIALOG_TELEFONE, DIALOG_STYLE_LIST, "Loja de Celulares","{FFFFFF}Comprar Aparelho\nComprar Creditos\nResetar Numero" , "Comprar", "Fechar");
  1206.                 if(!IsNumeric(inputtext)) return SendClientMessage(playerid,-1,"somente numeros!");
  1207.                 if(GetTelefoneID(PlayerInfo[playerid][Telefone]) == 1)
  1208.                 {
  1209.                     if(PlayerInfo[playerid][Dinheiro] < strval(inputtext)*EmpresaInfo[7][eItem][3] || EmpresaInfo[6][eMProduto] < 10)return SendClientMessage(playerid,-1,"Você não tem todo este dinheiro.");
  1210.                     if(EmpresaInfo[7][eProdutos] < 5* strval(inputtext))return SendClientMessage(playerid, -1, "Sem produtos");
  1211.                     EmpresaInfo[7][eProdutos]-=5* strval(inputtext);
  1212.                     EmpresaInfo[6][eProdutos] -=10* strval(inputtext);
  1213.                     EmpresaInfo[6][eCofre] += EmpresaInfo[7][eItem][3] / 2;
  1214.                     EmpresaInfo[7][eCofre] += EmpresaInfo[7][eItem][3] / 2;
  1215.                    
  1216.                     PlayerInfo[playerid][Creditos] += strval(inputtext);
  1217.                     PlayerInfo[playerid][Dinheiro] -= strval(inputtext)*EmpresaInfo[7][eItem][3];
  1218.                     format(falarpreco, sizeof falarpreco, "Voçê comprou %d creditos para DDD TIM e custou R$ %d .", strval(inputtext), strval(inputtext)*EmpresaInfo[7][eItem][3]);
  1219.                     SendClientMessage(playerid, -1, falarpreco);
  1220.                 }
  1221.                 else if(GetTelefoneID(PlayerInfo[playerid][Telefone]) == 2 )
  1222.                 {
  1223.                     if(PlayerInfo[playerid][Dinheiro] < strval(inputtext)*EmpresaInfo[8][eItem][3]|| EmpresaInfo[6][eMProduto] < 10)return SendClientMessage(playerid,-1,"Você não tem todo este dinheiro.");
  1224.                     if(EmpresaInfo[8][eProdutos] < 5* strval(inputtext))return SendClientMessage(playerid, -1, "Sem produtos");
  1225.                     EmpresaInfo[8][eProdutos]-=5* strval(inputtext);
  1226.                     EmpresaInfo[6][eProdutos] -=10* strval(inputtext);
  1227.                     EmpresaInfo[6][eCofre] += EmpresaInfo[8][eItem][3] / 2;
  1228.                     EmpresaInfo[8][eCofre] += EmpresaInfo[8][eItem][3] / 2;
  1229.                     PlayerInfo[playerid][Creditos] += strval(inputtext);
  1230.                     PlayerInfo[playerid][Dinheiro] -= strval(inputtext)*EmpresaInfo[8][eItem][3];
  1231.                     format(falarpreco, sizeof falarpreco, "Voçê comprou %d creditos para DDD CLARO e custou R$ %d .", strval(inputtext), strval(inputtext)*EmpresaInfo[8][eItem][3]);
  1232.                     SendClientMessage(playerid, -1, falarpreco);
  1233.                 }
  1234.                 else if(GetTelefoneID(PlayerInfo[playerid][Telefone]) == 3 )
  1235.                 {
  1236.                     if(PlayerInfo[playerid][Dinheiro] < strval(inputtext)*EmpresaInfo[9][eItem][3]|| EmpresaInfo[6][eMProduto] < 10)return SendClientMessage(playerid,-1,"Você não tem todo este dinheiro.");
  1237.                     if(EmpresaInfo[9][eProdutos] < 5* strval(inputtext))return SendClientMessage(playerid, -1, "Sem produtos");
  1238.                     EmpresaInfo[9][eProdutos]-=5* strval(inputtext);
  1239.                     EmpresaInfo[6][eProdutos] -=10* strval(inputtext);
  1240.                     EmpresaInfo[6][eCofre] += EmpresaInfo[9][eItem][3] / 2;
  1241.                     EmpresaInfo[9][eCofre] += EmpresaInfo[9][eItem][3] / 2;
  1242.                     PlayerInfo[playerid][Creditos] += strval(inputtext);
  1243.                     PlayerInfo[playerid][Dinheiro] -= strval(inputtext)*EmpresaInfo[9][eItem][3];
  1244.                     format(falarpreco, sizeof falarpreco, "Voçê comprou %d creditos para DDD OI e custou R$ %d .", strval(inputtext), strval(inputtext)*EmpresaInfo[9][eItem][3]);
  1245.                     SendClientMessage(playerid, -1, falarpreco);
  1246.                 }
  1247.                 else if(GetTelefoneID(PlayerInfo[playerid][Telefone]) == 4 )
  1248.                 {
  1249.                     if(PlayerInfo[playerid][Dinheiro] < strval(inputtext)*EmpresaInfo[10][eItem][3]|| EmpresaInfo[6][eMProduto] < 10)return SendClientMessage(playerid,-1,"Você não tem todo este dinheiro.");
  1250.                     if(EmpresaInfo[10][eProdutos] < 5* strval(inputtext))return SendClientMessage(playerid, -1, "Sem produtos");
  1251.                     EmpresaInfo[10][eProdutos]-=5* strval(inputtext);
  1252.                     EmpresaInfo[6][eProdutos] -=10* strval(inputtext);
  1253.                     EmpresaInfo[6][eCofre] += EmpresaInfo[10][eItem][3] / 2;
  1254.                     EmpresaInfo[10][eCofre] += EmpresaInfo[10][eItem][3] / 2;
  1255.                     PlayerInfo[playerid][Creditos] += strval(inputtext);
  1256.                     PlayerInfo[playerid][Dinheiro] -= strval(inputtext)*EmpresaInfo[10][eItem][3];
  1257.                     format(falarpreco, sizeof falarpreco, "Voçê comprou %d creditos para DDD VIVO e custou R$ %d .", strval(inputtext), strval(inputtext)*EmpresaInfo[10][eItem][3]);
  1258.                     SendClientMessage(playerid, -1, falarpreco);
  1259.                 }
  1260.                 else if(GetTelefoneID(PlayerInfo[playerid][Telefone]) == 5 )
  1261.                 {
  1262.                     if(PlayerInfo[playerid][Dinheiro] < strval(inputtext)*EmpresaInfo[11][eItem][3]|| EmpresaInfo[6][eMProduto] < 10)return SendClientMessage(playerid,-1,"Você não tem todo este dinheiro.");
  1263.                     if(EmpresaInfo[11][eProdutos] < 5 * strval(inputtext))return SendClientMessage(playerid, -1, "Sem produtos");
  1264.                     EmpresaInfo[11][eProdutos]-=5* strval(inputtext);
  1265.                     EmpresaInfo[6][eProdutos] -=10* strval(inputtext);
  1266.                     EmpresaInfo[6][eCofre] += EmpresaInfo[11][eItem][3] / 2;
  1267.                     EmpresaInfo[11][eCofre] += EmpresaInfo[11][eItem][3] / 2;
  1268.                     PlayerInfo[playerid][Creditos] += strval(inputtext);
  1269.                     PlayerInfo[playerid][Dinheiro] -= strval(inputtext)*EmpresaInfo[11][eItem][3];
  1270.  
  1271.                     format(falarpreco, sizeof falarpreco, "Voçê comprou %d creditos para DDD DON TELEFONIA e custou R$ %d .", strval(inputtext), strval(inputtext)*EmpresaInfo[11][eItem][3]);
  1272.                     SendClientMessage(playerid, -1, falarpreco);
  1273.                 }
  1274.            }
  1275.            case DIALOG_OPERADORA:
  1276.            {
  1277.                 if(!response)return ShowPlayerDialog(playerid,DIALOG_TELEFONE, DIALOG_STYLE_LIST, "Loja de Celulares","{FFFFFF}Comprar Aparelho\nComprar Creditos\nResetar Numero" , "Comprar", "Fechar");
  1278.                 new resultadofone[MAX_PLAYERS][4];
  1279.                 new strd[100];
  1280.                 switch (listitem)
  1281.                 {
  1282.                      case 0:
  1283.                      {
  1284.                             if(PlayerInfo[playerid][Dinheiro] < EmpresaInfo[7][eItem][2] || EmpresaInfo[6][eMProduto] < 30)return SendClientMessage(playerid, -1, "Erro você não tem dinheiro , volte mais tarde.");
  1285.                             EmpresaInfo[6][eProdutos] -= 30;
  1286.                             EmpresaInfo[6][eCofre] += EmpresaInfo[7][eItem][2] / 2;
  1287.                             EmpresaInfo[7][eItem] -= 30;
  1288.                             EmpresaInfo[7][eCofre] += EmpresaInfo[7][eItem][2] / 2;
  1289.  
  1290.                             new rndo = random(sizeof(op1));
  1291.  
  1292.                             resultadofone[playerid][0] = op1[rndo];
  1293.                             resultadofone[playerid][0] = resultadofone[playerid][0] *1000000;
  1294.  
  1295.  
  1296.                             resultadofone[playerid][1] = random(90)*10000;
  1297.                             if( resultadofone[playerid][1] < 10)return resultadofone[playerid][1] = random(90)*10000;
  1298.  
  1299.  
  1300.                             resultadofone[playerid][2] = random(90)*100;
  1301.                             if( resultadofone[playerid][2] < 10)return resultadofone[playerid][2] = random(90)*10;
  1302.  
  1303.  
  1304.                             resultadofone[playerid][3] = random(90);
  1305.                             if( resultadofone[playerid][3] < 10)return resultadofone[playerid][3] = random(90);
  1306.  
  1307.  
  1308.                             new teste = resultadofone[playerid][0] + resultadofone[playerid][1] + resultadofone[playerid][2] + resultadofone[playerid][3];
  1309.                             PlayerInfo[playerid][Telefone] = teste;
  1310.                             teste = 0;
  1311.  
  1312.                             format(strd, sizeof strd, "{FFFFFF}Compra Realizada com sucesso.\n\n\nOperadora: TIM\nNumero: %d", PlayerInfo[playerid][Telefone]);
  1313.                             ShowPlayerDialog(playerid,2000, DIALOG_STYLE_MSGBOX, "Loja de Celulares",strd , "Fechar", #);
  1314.                             PlayerInfo[playerid][Dinheiro] -= EmpresaInfo[7][eItem][2];
  1315.  
  1316.                      }
  1317.                      case 1:
  1318.                      {
  1319.                             if(PlayerInfo[playerid][Dinheiro] < EmpresaInfo[8][eItem][2]|| EmpresaInfo[6][eMProduto] < 30)return SendClientMessage(playerid, -1, "Erro você não tem dinheiro , volte mais tarde.");
  1320.                             EmpresaInfo[6][eProdutos] -= 30;
  1321.                             EmpresaInfo[6][eCofre] += EmpresaInfo[8][eItem][2] / 2;
  1322.                             EmpresaInfo[8][eItem] -= 30;
  1323.                             EmpresaInfo[8][eCofre] += EmpresaInfo[8][eItem][2] / 2;
  1324.                             new rndo = random(sizeof(op2));
  1325.  
  1326.                             resultadofone[playerid][0] = op2[rndo];
  1327.                             resultadofone[playerid][0] = resultadofone[playerid][0] *1000000;
  1328.  
  1329.  
  1330.                             resultadofone[playerid][1] = random(90)*10000;
  1331.                             if( resultadofone[playerid][1] < 10)return resultadofone[playerid][1] = random(90)*10000;
  1332.  
  1333.  
  1334.                             resultadofone[playerid][2] = random(90)*100;
  1335.                             if( resultadofone[playerid][2] < 10)return resultadofone[playerid][2] = random(90)*10;
  1336.  
  1337.  
  1338.                             resultadofone[playerid][3] = random(90);
  1339.                             if( resultadofone[playerid][3] < 10)return resultadofone[playerid][3] = random(90);
  1340.  
  1341.  
  1342.                             new teste = resultadofone[playerid][0] + resultadofone[playerid][1] + resultadofone[playerid][2] + resultadofone[playerid][3];
  1343.                             PlayerInfo[playerid][Telefone] = teste;
  1344.                             teste = 0;
  1345.  
  1346.                             format(strd, sizeof strd, "{FFFFFF}Compra Realizada com sucesso.\n\n\nOperadora: CLARO\nNumero: %d", PlayerInfo[playerid][Telefone]);
  1347.                             ShowPlayerDialog(playerid,2000, DIALOG_STYLE_MSGBOX, "Loja de Celulares",strd , "Fechar", #);
  1348.                             PlayerInfo[playerid][Dinheiro] -= EmpresaInfo[8][eItem][2];
  1349.                      }
  1350.                      case 2:
  1351.                      {
  1352.                             if(PlayerInfo[playerid][Dinheiro] < EmpresaInfo[9][eItem][2]|| EmpresaInfo[6][eMProduto] < 30)return SendClientMessage(playerid, -1, "Erro você não tem dinheiro , volte mais tarde.");
  1353.                             EmpresaInfo[6][eProdutos] -= 30;
  1354.                             EmpresaInfo[6][eCofre] += EmpresaInfo[9][eItem][2] / 2;
  1355.                             EmpresaInfo[9][eItem] -= 30;
  1356.                             EmpresaInfo[9][eCofre] += EmpresaInfo[9][eItem][2] / 2;
  1357.                             new rndo = random(sizeof(op3));
  1358.  
  1359.                             resultadofone[playerid][0] = op3[rndo];
  1360.                             resultadofone[playerid][0] = resultadofone[playerid][0] *1000000;
  1361.  
  1362.  
  1363.                             resultadofone[playerid][1] = random(90)*10000;
  1364.                             if( resultadofone[playerid][1] < 10)return resultadofone[playerid][1] = random(90)*10000;
  1365.  
  1366.  
  1367.                             resultadofone[playerid][2] = random(90)*100;
  1368.                             if( resultadofone[playerid][2] < 10)return resultadofone[playerid][2] = random(90)*10;
  1369.  
  1370.  
  1371.                             resultadofone[playerid][3] = random(90);
  1372.                             if( resultadofone[playerid][3] < 10)return resultadofone[playerid][3] = random(90);
  1373.  
  1374.  
  1375.                             new teste = resultadofone[playerid][0] + resultadofone[playerid][1] + resultadofone[playerid][2] + resultadofone[playerid][3];
  1376.                             PlayerInfo[playerid][Telefone] = teste;
  1377.                             teste = 0;
  1378.  
  1379.                             format(strd, sizeof strd, "{FFFFFF}Compra Realizada com sucesso.\n\n\nOperadora: OI\nNumero: %d", PlayerInfo[playerid][Telefone]);
  1380.                             ShowPlayerDialog(playerid,2000, DIALOG_STYLE_MSGBOX, "Loja de Celulares",strd , "Fechar", #);
  1381.                             PlayerInfo[playerid][Dinheiro] -= EmpresaInfo[9][eItem][2];
  1382.                      }
  1383.                      case 3:
  1384.                      {
  1385.                             if(PlayerInfo[playerid][Dinheiro] < EmpresaInfo[10][eItem][2]|| EmpresaInfo[6][eMProduto] < 30)return SendClientMessage(playerid, -1, "Erro você não tem dinheiro , volte mais tarde.");
  1386.                             EmpresaInfo[6][eProdutos] -= 30;
  1387.                             EmpresaInfo[6][eCofre] += EmpresaInfo[10][eItem][2] / 2;
  1388.                             EmpresaInfo[10][eItem] -= 30;
  1389.                             EmpresaInfo[10][eCofre] += EmpresaInfo[10][eItem][2] / 2;
  1390.                             new rndo = random(sizeof(op4));
  1391.  
  1392.                             resultadofone[playerid][0] = op4[rndo];
  1393.                             resultadofone[playerid][0] = resultadofone[playerid][0] *1000000;
  1394.  
  1395.  
  1396.                             resultadofone[playerid][1] = random(90)*10000;
  1397.                             if( resultadofone[playerid][1] < 10)return resultadofone[playerid][1] = random(90)*10000;
  1398.  
  1399.  
  1400.                             resultadofone[playerid][2] = random(90)*100;
  1401.                             if( resultadofone[playerid][2] < 10)return resultadofone[playerid][2] = random(90)*10;
  1402.  
  1403.  
  1404.                             resultadofone[playerid][3] = random(90);
  1405.                             if( resultadofone[playerid][3] < 10)return resultadofone[playerid][3] = random(90);
  1406.  
  1407.  
  1408.                             new teste = resultadofone[playerid][0] + resultadofone[playerid][1] + resultadofone[playerid][2] + resultadofone[playerid][3];
  1409.                             PlayerInfo[playerid][Telefone] = teste;
  1410.                             teste = 0;
  1411.  
  1412.                             format(strd, sizeof strd, "{FFFFFF}Compra Realizada com sucesso.\n\n\nOperadora: VIVO\nNumero: %d", PlayerInfo[playerid][Telefone]);
  1413.                             ShowPlayerDialog(playerid,2000, DIALOG_STYLE_MSGBOX, "Loja de Celulares",strd , "Fechar", #);
  1414.                             PlayerInfo[playerid][Dinheiro] -= EmpresaInfo[10][eItem][2];
  1415.                      }
  1416.                      case 4:
  1417.                      {
  1418.                             if(PlayerInfo[playerid][Dinheiro] < EmpresaInfo[11][eItem][2]|| EmpresaInfo[6][eMProduto] < 30)return SendClientMessage(playerid, -1, "Erro você não tem dinheiro , volte mais tarde.");
  1419.                             EmpresaInfo[6][eProdutos] -= 30;
  1420.                             EmpresaInfo[6][eCofre] += EmpresaInfo[11][eItem][2] / 2;
  1421.                             EmpresaInfo[11][eItem] -= 30;
  1422.                             EmpresaInfo[11][eCofre] += EmpresaInfo[11][eItem][2] / 2;
  1423.                             new rndo = random(sizeof(op5));
  1424.  
  1425.                             resultadofone[playerid][0] = op5[rndo];
  1426.                             resultadofone[playerid][0] = resultadofone[playerid][0] *1000000;
  1427.  
  1428.  
  1429.                             resultadofone[playerid][1] = random(90)*10000;
  1430.                             if( resultadofone[playerid][1] < 10)return resultadofone[playerid][1] = random(90)*10000;
  1431.  
  1432.  
  1433.                             resultadofone[playerid][2] = random(90)*100;
  1434.                             if( resultadofone[playerid][2] < 10)return resultadofone[playerid][2] = random(90)*10;
  1435.  
  1436.  
  1437.                             resultadofone[playerid][3] = random(90);
  1438.                             if( resultadofone[playerid][3] < 10)return resultadofone[playerid][3] = random(90);
  1439.  
  1440.  
  1441.                             new teste = resultadofone[playerid][0] + resultadofone[playerid][1] + resultadofone[playerid][2] + resultadofone[playerid][3];
  1442.                             PlayerInfo[playerid][Telefone] = teste;
  1443.                             teste = 0;
  1444.  
  1445.                             format(strd, sizeof strd, "{FFFFFF}Compra Realizada com sucesso.\n\n\nOperadora: DON TELEFONIA\nNumero: %d", PlayerInfo[playerid][Telefone]);
  1446.                             ShowPlayerDialog(playerid,2000, DIALOG_STYLE_MSGBOX, "Loja de Celulares",strd , "Fechar", #);
  1447.                             PlayerInfo[playerid][Dinheiro] -= EmpresaInfo[11][eItem][2];
  1448.                      }
  1449.                 }
  1450.            }
  1451.            case DIALOG_RADIO:
  1452.            {
  1453.                 if(!response)return true;
  1454.                 cont = 0;
  1455.                 new var[300], var1[300];
  1456.                 for(new ds = 1; ds< MAX_MUSICAS; ds++)
  1457.                 {
  1458.                     if(Radio[ds][Estilo] == listitem+1)
  1459.                     {
  1460.                         cont ++;
  1461.                         format(var, sizeof var, "[ID:%d]%s - %s\n", Radio[ds][IdMusica], Radio[ds][Cantor], Radio[ds][Musica]);
  1462.                         strcat(var1, var);
  1463.                         MusicaDon[playerid][cont] = Radio[ds][IdMusica];
  1464.                     }
  1465.                 }
  1466.                 ShowPlayerDialog(playerid, DIALOG_MUSICA, DIALOG_STYLE_LIST, "Musicas",var1,"Tocar", "Voltar");
  1467.            }
  1468.            case DIALOG_MUSICA:
  1469.            {
  1470.                 new var[800], var1[800];
  1471.                 if(!response)
  1472.                 {
  1473.                      for(new ds = 1; ds< MAX_ESTILOS; ds++)
  1474.                      {
  1475.                           format(var, sizeof var, "%s\n", EstiloMusical[ds]);
  1476.                           strcat(var1, var);
  1477.                      }
  1478.                      ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "Estilo Musical", var1,"Selecionar", "Fechar");
  1479.                 }
  1480.                 new mysic[800], mysic2[800];
  1481.                 format(mysic, sizeof mysic , "%s", Radio[MusicaDon[playerid][listitem+1]][Link]);
  1482.                 PlayAudioStreamForPlayer(playerid, mysic);
  1483.                 format(mysic2, sizeof mysic2, "[ %s ]Musica: %s \nCantor: %s", EstiloMusical[Radio[MusicaDon[playerid][listitem+1]][Estilo]],Radio[MusicaDon[playerid][listitem+1]][Musica], Radio[MusicaDon[playerid][listitem+1]][Cantor]);
  1484.                 SendClientMessage(playerid, -1 , mysic2);
  1485.            }
  1486.     }
  1487.     return 1;
  1488. }
  1489. CallBacK::OnPlayerCommandPerformed[playerid, cmdtext[], success]
  1490. {
  1491.     if(!success)return SendClientMessage(playerid,-1, "Erro comando inexistente em nosso banco de dados.");
  1492.     return true;
  1493. }
  1494. CallBacK::OnPlayerClickPlayer[playerid, clickedplayerid, source]
  1495. {
  1496.     return 1;
  1497. }
  1498. CallBacK::SalvarConta[playerid]
  1499. {
  1500.     PlayerInfo[playerid][TempoJogado]++;
  1501.     SetPlayerScore(playerid, PlayerInfo[playerid][Nivel]);
  1502.     ResetPlayerMoney(playerid);
  1503.     GivePlayerMoney(playerid, PlayerInfo[playerid][Dinheiro]);
  1504.    
  1505.     SetPlayerWantedLevel(playerid, PlayerInfo[playerid][Procurado]);
  1506.    
  1507.     if(PlayerInfo[playerid][TempoJogado] >= 3600)
  1508.     {
  1509.            PlayerInfo[playerid][TempoJogado] = 0;
  1510.            
  1511.            SendClientMessage(playerid, -1, "PAYDAY:");
  1512.            format(String, sizeof String, "Emprego: %s",Empregos[PlayerInfo[playerid][Emprego]][Nome]);
  1513.            SendClientMessage(playerid, -1, String);
  1514.            format(String, sizeof String, "Salario: R$ %d,00",Empregos[PlayerInfo[playerid][Emprego]][Salario]);
  1515.            SendClientMessage(playerid, -1, String);
  1516.            if(PlayerInfo[playerid][MinhaOrg] > 0)
  1517.            {
  1518.                format(String, sizeof String, "[ Organização %s ]", OrgInfo[PlayerInfo[playerid][MinhaOrg]][NameORG]);
  1519.                SendClientMessage(playerid, -1, String);
  1520.                format(String, sizeof String, "Salario: R$ %d,00", OrgInfo[PlayerInfo[playerid][MinhaOrg]][Salario]*PlayerInfo[playerid][Ranked]);
  1521.                SendClientMessage(playerid, -1, String);
  1522.                PlayerInfo[playerid][Dinheiro] += OrgInfo[PlayerInfo[playerid][MinhaOrg]][Salario]*PlayerInfo[playerid][Ranked];
  1523.            }
  1524.            PlayerInfo[playerid][Dinheiro] += Empregos[PlayerInfo[playerid][Emprego]][Salario];
  1525.            PlayerInfo[playerid][Respeito] ++;
  1526.            if(PlayerInfo[playerid][Respeito] == PlayerInfo[playerid][Nivel]*6)
  1527.            {
  1528.                SendClientMessage(playerid, -1, "Parabéns você acabou de upar de nivel.");
  1529.                PlayerInfo[playerid][Nivel]++;
  1530.                PlayerInfo[playerid][Respeito] = 0;
  1531.            }
  1532.     }
  1533.     new zone[MAX_ZONE_NAME];
  1534.     GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
  1535.     format(String, sizeof(String), "%s", zone);
  1536.     TextDrawSetString(PlayerInfo[playerid][Zona], String);
  1537.    
  1538.    
  1539.     if(PlayerInfo[playerid][TempoPreso] > 0)
  1540.     {
  1541.        PlayerInfo[playerid][TempoPreso] --;
  1542.        if(PlayerInfo[playerid][TempoPreso] == 0)
  1543.        {
  1544.            SendClientMessage(playerid, -1,"Você cumpriu sua pena.");
  1545.            SpawnPlayer(playerid);
  1546.        }
  1547.     }
  1548.     return true;
  1549. }
  1550. CallBacK::DonCarrega[playerid]
  1551. {
  1552.     format(EmGeral, sizeof(EmGeral), ContaSalva , DonPegaNome(playerid));
  1553.     if(DOF2_FileExists(EmGeral))
  1554.     {
  1555.        PlayerInfo[playerid][Dinheiro] = DOF2_GetInt(EmGeral,"Dinheiro");
  1556.        PlayerInfo[playerid][Nivel] = DOF2_GetInt(EmGeral,"Nivel");
  1557.        PlayerInfo[playerid][Respeito] = DOF2_GetInt(EmGeral,"Respeito");
  1558.        PlayerInfo[playerid][Sexo] = DOF2_GetBool(EmGeral,"Sexo");
  1559.        PlayerInfo[playerid][Skin] = DOF2_GetInt(EmGeral,"Skin");
  1560.        PlayerInfo[playerid][Pos][0] = DOF2_GetFloat(EmGeral,"X");
  1561.        PlayerInfo[playerid][Pos][1] = DOF2_GetFloat(EmGeral,"Y");
  1562.        PlayerInfo[playerid][Pos][2] = DOF2_GetFloat(EmGeral,"Z");
  1563.        PlayerInfo[playerid][Interior] = DOF2_GetInt(EmGeral,"Interior");
  1564.        PlayerInfo[playerid][TempoJogado] = DOF2_GetInt(EmGeral,"TJogado");
  1565.        PlayerInfo[playerid][Emprego] = DOF2_GetInt(EmGeral,"Emprego");
  1566.        PlayerInfo[playerid][Ranked] = DOF2_GetInt(EmGeral,"Ranked");
  1567.        PlayerInfo[playerid][Telefone] = DOF2_GetInt(EmGeral,"Telefone");
  1568.        PlayerInfo[playerid][Creditos] = DOF2_GetInt(EmGeral,"Creditos");
  1569.        PlayerInfo[playerid][Procurado] = DOF2_GetInt(EmGeral,"Procurado");
  1570.        for(new su = 0; su< 5; su++)
  1571.        {
  1572.              new strg[50];
  1573.              format(strg,sizeof strg, "Suspeito %d", su);
  1574.              PlayerInfo[playerid][Suspeito][su] = DOF2_GetInt(EmGeral, strg);
  1575.        }
  1576.        PlayerInfo[playerid][TempoPreso] = DOF2_GetInt(EmGeral,"Tempo");
  1577.     }
  1578.     return true;
  1579. }
  1580. CallBacK::DonSalva[playerid]
  1581. {
  1582.     GetPlayerPos(playerid, PlayerInfo[playerid][Pos][0], PlayerInfo[playerid][Pos][1], PlayerInfo[playerid][Pos][2]);
  1583.     PlayerInfo[playerid][Interior] = GetPlayerInterior(playerid);
  1584.     PlayerInfo[playerid][Skin] = GetPlayerSkin(playerid);
  1585.    
  1586.     format(EmGeral, sizeof(EmGeral), ContaSalva , DonPegaNome(playerid));
  1587.     if(DOF2_FileExists(EmGeral))
  1588.     {
  1589.         DOF2_SetInt(EmGeral,"Dinheiro",PlayerInfo[playerid][Dinheiro]);
  1590.         DOF2_SetInt(EmGeral,"Nivel",PlayerInfo[playerid][Nivel]);
  1591.         DOF2_SetInt(EmGeral,"Respeito",PlayerInfo[playerid][Respeito]);
  1592.         DOF2_SetBool(EmGeral,"Sexo", PlayerInfo[playerid][Sexo]);
  1593.         DOF2_SetInt(EmGeral,"Skin",PlayerInfo[playerid][Skin]);
  1594.         DOF2_SetFloat(EmGeral,"X", PlayerInfo[playerid][Pos][0]);
  1595.         DOF2_SetFloat(EmGeral,"Y", PlayerInfo[playerid][Pos][1]);
  1596.         DOF2_SetFloat(EmGeral,"Z", PlayerInfo[playerid][Pos][2]);
  1597.         DOF2_SetInt(EmGeral,"Interior",PlayerInfo[playerid][Interior]);
  1598.         DOF2_SetInt(EmGeral,"TJogado",PlayerInfo[playerid][TempoJogado]);
  1599.         DOF2_SetInt(EmGeral,"Emprego",PlayerInfo[playerid][Emprego]);
  1600.         DOF2_SetInt(EmGeral,"Ranked",PlayerInfo[playerid][Ranked]);
  1601.         DOF2_SetInt(EmGeral,"Telefone",PlayerInfo[playerid][Telefone]);
  1602.         DOF2_SetInt(EmGeral,"Creditos",PlayerInfo[playerid][Creditos]);
  1603.         DOF2_SetInt(EmGeral,"Procurado",PlayerInfo[playerid][Procurado]);
  1604.         for(new su = 0; su< 5; su++)
  1605.         {
  1606.              new strg[50];
  1607.              format(strg,sizeof strg, "Suspeito %d", su);
  1608.              DOF2_SetInt(EmGeral, strg,PlayerInfo[playerid][Suspeito][su]);
  1609.         }
  1610.         DOF2_SetInt(EmGeral,"Tempo",PlayerInfo[playerid][TempoPreso]);
  1611.         DOF2_SaveFile();
  1612.     }
  1613.     else
  1614.     {
  1615.         DOF2_CreateFile(EmGeral);
  1616.         DOF2_SetInt(EmGeral,"Dinheiro",PlayerInfo[playerid][Dinheiro]);
  1617.         DOF2_SetInt(EmGeral,"Nivel",PlayerInfo[playerid][Nivel]);
  1618.         DOF2_SetInt(EmGeral,"Respeito",PlayerInfo[playerid][Respeito]);
  1619.         DOF2_SetBool(EmGeral,"Sexo", PlayerInfo[playerid][Sexo]);
  1620.         DOF2_SetInt(EmGeral,"Skin",PlayerInfo[playerid][Skin]);
  1621.         DOF2_SetFloat(EmGeral,"X", PlayerInfo[playerid][Pos][0]);
  1622.         DOF2_SetFloat(EmGeral,"Y", PlayerInfo[playerid][Pos][1]);
  1623.         DOF2_SetFloat(EmGeral,"Z", PlayerInfo[playerid][Pos][2]);
  1624.         DOF2_SetInt(EmGeral,"Interior",PlayerInfo[playerid][Interior]);
  1625.         DOF2_SetInt(EmGeral,"TJogado",PlayerInfo[playerid][TempoJogado]);
  1626.         DOF2_SetInt(EmGeral,"Emprego",PlayerInfo[playerid][Emprego]);
  1627.         DOF2_SetInt(EmGeral,"Ranked",PlayerInfo[playerid][Ranked]);
  1628.         DOF2_SetInt(EmGeral,"Telefone",PlayerInfo[playerid][Telefone]);
  1629.         DOF2_SetInt(EmGeral,"Creditos",PlayerInfo[playerid][Creditos]);
  1630.         DOF2_SetInt(EmGeral,"Procurado",PlayerInfo[playerid][Procurado]);
  1631.         for(new su = 0; su< 5; su++)
  1632.         {
  1633.              new strg[50];
  1634.              format(strg,sizeof strg, "Suspeito %d", su);
  1635.              DOF2_SetInt(EmGeral, strg,PlayerInfo[playerid][Suspeito][su]);
  1636.         }
  1637.         DOF2_SetInt(EmGeral,"Tempo",PlayerInfo[playerid][TempoPreso]);
  1638.         DOF2_SaveFile();
  1639.     }
  1640.     return true;
  1641. }
  1642. CallBacK::AdmCarrega[]
  1643. {
  1644.     new string2[80];
  1645.     for(new vagads = 1; vagads < MAX_VAGAS; vagads++)
  1646.     {
  1647.        format(string2, sizeof(string2), AdminSalva, vagads);
  1648.        if(!DOF2_FileExists(string2))
  1649.        {
  1650.           DOF2_CreateFile(string2);
  1651.           format(AdminInfo[vagads][Name], 80,"Slot");
  1652.           AdminInfo[vagads][Nivel] = 0;
  1653.           DOF2_SetString(string2,"Nome",AdminInfo[vagads][Name]);
  1654.           DOF2_SetInt(string2,"Nivel", AdminInfo[vagads][Nivel]);
  1655.           DOF2_SaveFile();
  1656.        }
  1657.        else
  1658.        {
  1659.           format(AdminInfo[vagads][Name], 80, DOF2_GetString(string2,"Nome"));
  1660.           AdminInfo[vagads][Nivel] = DOF2_GetInt(string2,"Nivel");
  1661.        }
  1662.     }
  1663.     return true;
  1664. }
  1665. CallBacK::AdmSalva[]
  1666. {
  1667.     new string2[180];
  1668.     for(new vagads = 1; vagads < MAX_VAGAS; vagads++)
  1669.     {
  1670.        format(string2, sizeof(string2), AdminSalva, vagads);
  1671.        if(DOF2_FileExists(string2))
  1672.        {
  1673.            DOF2_SetString(string2,"Nome",AdminInfo[vagads][Name]);
  1674.            DOF2_SetInt(string2,"Nivel", AdminInfo[vagads][Nivel]);
  1675.            DOF2_SaveFile();
  1676.        }
  1677.     }
  1678.     return true;
  1679. }
  1680. stock DonPegaNome(playerid)
  1681. {
  1682.     new name[MAX_PLAYER_NAME];
  1683.     GetPlayerName(playerid, name, sizeof(name));
  1684.     return name;
  1685. }
  1686. stock ReturnUser(PlayerName[])
  1687. {
  1688.     if(IsNumeric(PlayerName))
  1689.         return strval(PlayerName);
  1690.     else
  1691.     {
  1692.         new found=0, id;
  1693.         for(new i=0; i <= MAX_PLAYERS; i++)
  1694.         {
  1695.             if(IsPlayerConnected(i))
  1696.             {
  1697.                 new foundname[MAX_PLAYER_NAME];
  1698.                 GetPlayerName(i, foundname, MAX_PLAYER_NAME);
  1699.                 new namelen = strlen(foundname);
  1700.                 new bool:searched=false;
  1701.                 for(new pos=0; pos <= namelen; pos++)
  1702.                 {
  1703.                     if(searched != true)
  1704.                     {
  1705.                         if(strfind(foundname,PlayerName,true) == pos)
  1706.                         {
  1707.                             found++;
  1708.                             id = i;
  1709.                         }
  1710.                     }
  1711.                 }
  1712.             }
  1713.         }
  1714.         if(found == 1)
  1715.             return id;
  1716.         else
  1717.             return INVALID_PLAYER_ID;
  1718.     }
  1719. }
  1720. stock IsNumeric(const string[])
  1721. {
  1722.     for (new i = 0, j = strlen(string); i < j; i++)
  1723.         if(string[i] > '9' || string[i] < '0') return 0;
  1724.  
  1725.     return 1;
  1726. }
  1727. CallBacK::ORGCarrega[]
  1728. {
  1729.     new string2[80];
  1730.     for(new vagads = 1; vagads < MAX_ORGS; vagads++)
  1731.     {
  1732.        format(string2, sizeof(string2), OrgSalva, vagads);
  1733.        if(!DOF2_FileExists(string2))
  1734.        {
  1735.            DOF2_CreateFile(string2);
  1736.            for(new i=0; i< sizeof OrgsCargos; i++)
  1737.            {
  1738.                 DOF2_SetString(string2,OrgsCargos[i], "Nenhum");
  1739.            }
  1740.            DOF2_SaveFile();
  1741.        }
  1742.     }
  1743.     return true;
  1744. }
  1745. stock ConvertTelefone(numbers)
  1746. {
  1747.     new temp[8], var;
  1748.     valstr(temp,numbers);
  1749.     for(new i = 1;i < 8; i++)
  1750.     {
  1751.         var++;
  1752.         if(var == 4)
  1753.         {
  1754.            strins(temp,"-",i);
  1755.            var = 0;
  1756.            break;
  1757.         }
  1758.     }
  1759.     return temp;
  1760. }
  1761. stock GetTelefoneID(numbers)
  1762. {
  1763.    new temp[10],result;
  1764.    valstr(temp,numbers);
  1765.    if(strfind(temp, "69" ,true) != -1 || strfind(temp, "79" ,true) != -1 || strfind(temp, "80" ,true) != -1 || strfind(temp, "81" ,true) != -1 ||
  1766.    strfind(temp, "82" ,true) != -1 || strfind(temp, "83" ,true) != -1)
  1767.    {
  1768.       result = 1;
  1769.    }
  1770.    if(strfind(temp, "68" ,true) != -1 || strfind(temp, "73" ,true) != -1 || strfind(temp, "74" ,true) != -1 || strfind(temp, "75" ,true) != -1 ||
  1771.    strfind(temp, "91" ,true) != -1 || strfind(temp, "92" ,true) != -1 || strfind(temp, "93" ,true) != -1)
  1772.    {
  1773.       result = 2;
  1774.    }
  1775.    if(strfind(temp, "84" ,true) != -1 || strfind(temp, "85" ,true) != -1 || strfind(temp, "86" ,true) != -1 || strfind(temp, "87" ,true) != -1 ||
  1776.    strfind(temp, "88" ,true) != -1 || strfind(temp, "89" ,true) != -1)
  1777.    {
  1778.       result = 3;
  1779.    }
  1780.    if(strfind(temp, "95" ,true) != -1 || strfind(temp, "96" ,true) != -1 || strfind(temp, "97" ,true) != -1 || strfind(temp, "98" ,true) != -1 ||
  1781.    strfind(temp, "99" ,true) != -1 )
  1782.    {
  1783.       result = 4;
  1784.    }
  1785.    if(strfind(temp, "30" ,true) != -1 || strfind(temp, "40" ,true) != -1 )
  1786.    {
  1787.       result = 5;
  1788.    }
  1789.    return result;
  1790. }
  1791. stock GetTelefoneModel(numbers)
  1792. {
  1793.    new temp[10],result[24];
  1794.    valstr(temp,numbers);
  1795.    if(strfind(temp, "69" ,true) != -1 || strfind(temp, "79" ,true) != -1 || strfind(temp, "80" ,true) != -1 || strfind(temp, "81" ,true) != -1 ||
  1796.    strfind(temp, "82" ,true) != -1 || strfind(temp, "83" ,true) != -1)
  1797.    {
  1798.       result = "TIM";
  1799.    }
  1800.    if(strfind(temp, "68" ,true) != -1 || strfind(temp, "73" ,true) != -1 || strfind(temp, "74" ,true) != -1 || strfind(temp, "75" ,true) != -1 ||
  1801.    strfind(temp, "91" ,true) != -1 || strfind(temp, "92" ,true) != -1 || strfind(temp, "93" ,true) != -1)
  1802.    {
  1803.       result = "CLARO";
  1804.    }
  1805.    if(strfind(temp, "84" ,true) != -1 || strfind(temp, "85" ,true) != -1 || strfind(temp, "86" ,true) != -1 || strfind(temp, "87" ,true) != -1 ||
  1806.    strfind(temp, "88" ,true) != -1 || strfind(temp, "89" ,true) != -1)
  1807.    {
  1808.       result = "OI";
  1809.    }
  1810.    if(strfind(temp, "95" ,true) != -1 || strfind(temp, "96" ,true) != -1 || strfind(temp, "97" ,true) != -1 || strfind(temp, "98" ,true) != -1 ||
  1811.    strfind(temp, "99" ,true) != -1 )
  1812.    {
  1813.       result = "VIVO";
  1814.    }
  1815.    if(strfind(temp, "30" ,true) != -1 || strfind(temp, "40" ,true) != -1 )
  1816.    {
  1817.       result = "DON TELEFONIA";
  1818.    }
  1819.    return result;
  1820. }
  1821. stock VerificarNivel(playerid)
  1822. {
  1823.     if(PlayerInfo[playerid][Procurado] != 0)
  1824.     {
  1825.         for(new su = 0; su< 5; su++)
  1826.         {
  1827.             if(PlayerInfo[playerid][Suspeito][su] != 0)
  1828.             {
  1829.                  switch(PlayerInfo[playerid][Suspeito][su])
  1830.                  {
  1831.                        case 33:{PlayerInfo[playerid][TempoPreso] += (60000*10),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1832.                        case 121:{PlayerInfo[playerid][TempoPreso] += (60000*30),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1833.                        case 129:{PlayerInfo[playerid][TempoPreso] += (60000*5),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1834.                        case 138:{PlayerInfo[playerid][TempoPreso] += (60000*5),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1835.                        case 140:{PlayerInfo[playerid][TempoPreso] += (60000*5),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1836.                        case 148:{PlayerInfo[playerid][TempoPreso] += (60000*20),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1837.                        case 150:{PlayerInfo[playerid][TempoPreso] += (60000*10),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1838.                        case 155:{PlayerInfo[playerid][TempoPreso] += (60000*15),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1839.                        case 157:{PlayerInfo[playerid][TempoPreso] += (60000*20),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1840.                        case 163:{PlayerInfo[playerid][TempoPreso] += (60000*10),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1841.                        case 171:{PlayerInfo[playerid][TempoPreso] += (60000*5),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1842.                        case 331:{PlayerInfo[playerid][TempoPreso] += (60000*10),PlayerInfo[playerid][Suspeito][su] = 0, PlayerInfo[playerid][Procurado] = 0;SetPlayerPos(playerid, 223.2259,109.8377,999.0156),SetPlayerInterior(playerid, 10);}
  1843.                  }
  1844.             }
  1845.         }
  1846.     }
  1847.     return true;
  1848. }
  1849. stock SendClientCrime(id, art)
  1850. {
  1851.    new gfes[800];
  1852.    for(new i; i<MAX_PLAYERS; i++)
  1853.    {
  1854.          if(PlayerInfo[i][MinhaOrg] == 1 || PlayerInfo[i][MinhaOrg] == 2 || PlayerInfo[i][MinhaOrg] == 3)
  1855.          {
  1856.              new zone[MAX_ZONE_NAME];
  1857.              GetPlayer2DZone(id, zone, MAX_ZONE_NAME);
  1858.              SendClientMessage(i, -1, "{FFFFFF}     [  {FF4500}ATENÇÃO TODAS VIATURAS{FFFFFF}  ] ");
  1859.              format(gfes, sizeof gfes,"{FFFFFF} Individo: {FF4500}%s(ID %d){FFFFFF}  | Enquadrado {FF4500}ART. %d{FFFFFF}.", DonPegaNome(id), i, art);
  1860.              SendClientMessage(i, -1, gfes);
  1861.              format(gfes, sizeof gfes,"{FFFFFF} Ultimo contato visual em {FF4500}%s{FFFFFF} .", zone);
  1862.              SendClientMessage(i, -1, gfes);
  1863.              SendClientMessage(i, -1, "{FFFFFF}     [  {FF4500}PARA MAIS INFORMAÇÕES ACESSE O SISTEMA{FFFFFF}  ] ");
  1864.              PlayerInfo[id][Procurado]++;
  1865.              for(new d; d < 5; d++)
  1866.              {
  1867.                  if(PlayerInfo[id][Suspeito][d] == 0)
  1868.                  {
  1869.                      PlayerInfo[id][Suspeito][d] = art;
  1870.                      return true;
  1871.                  }
  1872.              }
  1873.          }
  1874.    }
  1875.    return true;
  1876. }
  1877. command(ajudaartigo, playerid, params[])
  1878. {
  1879.     if(PlayerInfo[playerid][MinhaOrg] == 1 || PlayerInfo[playerid][MinhaOrg] == 2 || PlayerInfo[playerid][MinhaOrg] == 3)
  1880.     {
  1881.              new string[1000];
  1882.              for(new ai =0; ai <sizeof(Infoart); ai ++)
  1883.                  format(string,sizeof(string),"%s\n- %s", string,Infoart[ai]);
  1884.  
  1885.              ShowPlayerDialog(playerid, 999, DIALOG_STYLE_MSGBOX,"Codigo", string, "Sair", #);
  1886.     }else { SendClientMessage(playerid, -1, "Apenas dentro de uma viatura"); return true;}
  1887.     return true;
  1888. }
  1889. command(ajudatartigo, playerid, params[])
  1890. {
  1891.     if(PlayerInfo[playerid][MinhaOrg] == 1 || PlayerInfo[playerid][MinhaOrg] == 2 || PlayerInfo[playerid][MinhaOrg] == 3)
  1892.     {
  1893.              new string[1000];
  1894.              for(new ai =0; ai <sizeof(Tempoart); ai ++)
  1895.                  format(string,sizeof(string),"%s\n- %s", string,Tempoart[ai]);
  1896.  
  1897.              ShowPlayerDialog(playerid, 999, DIALOG_STYLE_MSGBOX,"Codigo", string, "Sair", #);
  1898.     } else { SendClientMessage(playerid, -1, "Apenas dentro de uma viatura"); return true;}
  1899.     return true;
  1900. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement