Advertisement
Guest User

Brasil Play Net By - Lucas Emmanuel - [ Gm Inacabado ]

a guest
Mar 26th, 2013
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include < a_samp >
  2. #include sscanf.inc
  3. #include zcmd.inc
  4.  
  5. // -------------------------------------------------------- >   Definições do Servidor em Geral
  6. #define Entrada_Loja            213.2318,-183.4858,1.5781
  7. #define Entrada_Ammu            243.0552,-178.4454,1.5822
  8. #define Menu_Armas              314.2584,-132.9375,999.6016
  9. #define Entrada_Prefeitura      292.9194,-195.3610,1.7786
  10. #define Entrada_Loja_Roupas     171.9727,-152.4717,1.5752
  11. #define Menu_Prefeitura         361.8299,173.6784,1008.3828
  12. #define Materiais_Obter         1230.2911,-1735.1278,13.5867
  13.  
  14. #define Tempo_P                 5000
  15.  
  16. #define Dialog_Armas            1050
  17. #define Dialog_Emprego          2050
  18.  
  19. #define Desempregado            3
  20. #define Mecanico                4
  21. #define Caminhoneiro            5
  22. #define Advogado                6
  23. #define Detetive                7
  24. #define Vendedor_de_Armas       8
  25.  
  26. #define Civil                   20
  27. #define Groove                  21
  28. #define Ballas                  22
  29. #define Aztecas                 23
  30. #define Vagos                   24
  31. #define PCC                     25
  32. #define Comando_V               26
  33. #define Rota                    27
  34. #define Policia_M               28
  35. #define Policia_F               29
  36. #define Exercito                30
  37. #define GI                      31
  38. #define Farc                    32
  39. #define Hitman                  33
  40. #define Administradores         50
  41.  
  42. #define Verde                   0x21DD00FF
  43. #define Vermelho                0xFF030FFF
  44. #define Amarelo                 0xFFFF00FF
  45. #define Laranja                 0xF97804FF
  46. #define Azul_Claro              0x00C2ECFF
  47. #define Branco                  0xFFFFFFAA
  48. #define Azul                    0x1229FAFF
  49. #define Verde_Claro             0x38FF06FF
  50. #define Cinza                   0xCECECEFF
  51. #define Rosa                    0xD52DFFFF
  52. #define Cinza_Escuro            0x626262FF
  53. // -------------------------------------------------------- >
  54. enum
  55.     pDados
  56. {
  57.     Organizacao,    Quentinha,     Pizza,    Id_Check,      Kikado,      Debug,
  58.     Cargo,          Hamburguer,    Crimes,   Horas_Jogadas, Preso,       Materiais,
  59.     Licenciado,     Licenca_Armas, Cigarros, Emprego,       Loja_Roupas, Comprar_Materiais,
  60.     Fazer_Compras,  Produtos,      Maconha,  Contrato,      Id_Kick,
  61. };
  62.  
  63. new Timer_Cigarro;
  64. new Timer_Maconha;
  65.  
  66. new World_Time;
  67. new pInfo[MAX_PLAYERS][pDados];
  68.  
  69. forward Spawn_Player(playerid);
  70. forward Kick_Player(playerid);
  71. forward Soltar_Preso(playerid);
  72. forward Fumando_Maconha(playerid);
  73. forward Tempo_World(playerid);
  74. forward Fumando_Cigarro(playerid);
  75. // -------------------------------------------------------- >
  76. new Float: C_R[][] = // Random Spawns Caminhoneiros
  77. {
  78.     {195.9697,-232.3367,1.7786,271.1507},
  79.     {219.1665,-226.9594,1.7786,92.1534},
  80.     {253.9131,-158.1334,1.5703,75.7547},
  81.     {292.3913,-187.2190,1.5781,89.1007},
  82.     {81.4282,-198.9835,1.5631,221.6808}
  83. };
  84. // -------------------------------------------------------- >
  85.  
  86. main()
  87. {
  88.     print("\n------------------------------- >");
  89.     print(" Brasil Play Net Carregado !  - > By Lucas Emmanuel");
  90.     print("------------------------------- >\n");
  91. }
  92.  
  93. public OnGameModeInit()
  94. {
  95.     SetGameModeText("Blank Script");
  96.    
  97.     UsePlayerPedAnims();
  98.     DisableInteriorEnterExits();
  99.     LimitGlobalChatRadius(150);
  100.     EnableStuntBonusForAll(0);
  101.  
  102.     AddPlayerClass(23, 1242.7977, -1694.7399, 16.1965, 182.3878, 0, 0, 0, 0, 0, 0);
  103.    
  104.     AddStaticPickup(1318, 1, Entrada_Loja, 0);
  105.     AddStaticPickup(1318, 1, Entrada_Ammu, 0);
  106.     AddStaticPickup(1318, 1, Entrada_Prefeitura,  0);
  107.     AddStaticPickup(1318, 1, Entrada_Loja_Roupas, 0);
  108.     AddStaticPickup(1318, 1, Materiais_Obter , 0);
  109.    
  110.     AddStaticPickup(1318, 1,  315.7297,-143.6574,999.6016, 0);
  111.     AddStaticPickup(1318, 1, -26.0003,-188.2597,1003.5469, 0);
  112.     AddStaticPickup(1318, 1,  389.8720,173.6646,1008.3828, 0);
  113.     AddStaticPickup(1318, 1,  227.5590,-8.1010,1002.2109,  0);
  114.  
  115.     AddStaticPickup(1318, 1,  Menu_Armas, 0);
  116.     AddStaticPickup(1318, 1, Menu_Prefeitura, 0);
  117.    
  118.     Create3DTextLabel("Compra de Materiais\nAperte F", Azul_Claro, Materiais_Obter, 20.0, 0, 0);
  119.    
  120. // ----------------------------------------------- >
  121.     SetTimer("Tempo_World", 60 * 60 * 1000, true);
  122.     return 1;
  123. }
  124.  
  125. public OnGameModeExit()
  126. {
  127.     return 1;
  128. }
  129.  
  130. public Tempo_World(playerid)
  131. {
  132.     new Str[120], StE[120];
  133.     if (World_Time == 25)
  134.     {
  135.         World_Time = 0;
  136.     }
  137.  
  138.     SetWorldTime(World_Time);
  139.     World_Time ++;
  140.     format(Str, sizeof(Str), "BRASIL PLAY NET :{FFFFFF}Agora São {88AA88}%d {FFFFFF}Horas.", World_Time);
  141.     SendClientMessageToAll(Verde_Claro , Str);
  142.     pInfo[playerid][Horas_Jogadas] ++;
  143.     pInfo[playerid][Contrato] --;
  144.     format(StE, sizeof(StE), "Você tem Agora %d Horas Jogadas", pInfo[playerid][Horas_Jogadas]);
  145.     SendClientMessage(playerid, Laranja, StE);
  146. }
  147.  
  148. public OnPlayerRequestClass(playerid, classid)
  149. {
  150.     SetTimer("Spawn_Player", 100, false);
  151.     return 1;
  152. }
  153.  
  154. public Spawn_Player(playerid)
  155. {
  156.     SpawnPlayer(playerid);
  157. }
  158.  
  159. public OnPlayerConnect(playerid)
  160. {
  161.     new
  162.         Nome[25],
  163.         Str[80]
  164.     ;
  165.  
  166.     GetPlayerName(playerid, Nome, 25);
  167.     format(Str, sizeof(Str), "O Jogador {00FFFF}%s {FFFFFF}Entrou no Servidor", Nome);
  168.     SendClientMessageToAll(0xFFFFFFAA, Str);
  169.     return 1;
  170. }
  171.  
  172. public OnPlayerDisconnect(playerid, reason)
  173. {
  174.     new
  175.         Nome[25],
  176.         Str[80]
  177.     ;
  178.  
  179.     GetPlayerName(playerid, Nome, 25);
  180.     format(Str, sizeof(Str), "O Jogador {00FFFF}%s {FFFFFF}Desconectou - se do Servidor", Nome);
  181.     SendClientMessageToAll(0xFFFFFFAA, Str);
  182.     return 1;
  183. }
  184.  
  185. public OnPlayerSpawn(playerid)
  186. {
  187.     if(pInfo[playerid][Preso] == 1)
  188.     {
  189.         new
  190.             Str[80]
  191.         ;
  192.        
  193.         SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
  194.         SetPlayerInterior(playerid, 6);
  195.         ResetPlayerWeapons(playerid);
  196.         SetPlayerWantedLevel(playerid, 0);
  197.         SetTimer("Soltar_Preso", Tempo_P * pInfo[playerid][Crimes], false);
  198.         pInfo[playerid][Preso] = 1;
  199.        
  200.         format(Str, sizeof(Str), "Sentença incompleta. Tempo Restante: {FFFFFF}%d", Tempo_P * pInfo[playerid][Crimes]);
  201.         SendClientMessage(playerid, Verde_Claro, Str);
  202.     }
  203.  
  204.     if(pInfo[playerid][Organizacao] == Civil)
  205.     {
  206.         SetPlayerSkin(playerid, 23);
  207.     }
  208.    
  209.     SetPlayerInterior(playerid, 0);
  210.    
  211.     if(pInfo[playerid][Emprego] == Caminhoneiro)
  212.     {
  213.         new Random = random(sizeof(C_R));
  214.         SetPlayerPos(playerid, C_R[Random][0], C_R[Random][1], C_R[Random][2]);
  215.         SetPlayerFacingAngle(playerid, C_R[Random][3]);
  216.     }
  217.     return 1;
  218. }
  219.  
  220. public OnPlayerDeath(playerid, killerid, reason)
  221. {
  222.     new Str_Wanted[60];
  223.  
  224.     if(pInfo[killerid][Organizacao] == Groove || Ballas || Aztecas || Vagos || PCC || Comando_V || Civil || Hitman)
  225.     {
  226.         pInfo[killerid][Crimes] ++;
  227.         SendClientMessage(killerid, Vermelho, "Você Cometeu um Crime : {FFFFFF}Assasinato");
  228.         format(Str_Wanted, sizeof(Str_Wanted), "Nivel Atual de Procura : {FFFFFF}%d", pInfo[killerid][Crimes]);
  229.         SendClientMessage(playerid, Amarelo, Str_Wanted);
  230.         SetPlayerWantedLevel(killerid, pInfo[killerid][Crimes]);
  231.     }
  232.  
  233.     if(pInfo[playerid][Organizacao] == Groove || Ballas || Aztecas || Vagos || PCC || Comando_V || Civil || Hitman)
  234.     {
  235.         if(GetPlayerWantedLevel(playerid) < 1)
  236.         {
  237.             if(pInfo[killerid][Organizacao] == Rota || Policia_M || Policia_F )
  238.             {
  239.                 GameTextForPlayer(killerid, "~b~Suspeito ~r~Morto ~w~Bonus R$ ~g~300", 2500, 1);
  240.                 GivePlayerMoney(killerid, 300);
  241. // --------------------------------------------------------------------------- >
  242.                 SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
  243.                 SetPlayerInterior(playerid, 6);
  244.                 ResetPlayerWeapons(playerid);
  245.                 SetPlayerWantedLevel(playerid, 0);
  246.                 SetTimer("Soltar_Preso", Tempo_P * pInfo[playerid][Crimes], false);
  247.                 pInfo[playerid][Preso] = 1;
  248.             }
  249.         }
  250.     }
  251.     return 1;
  252. }
  253.  
  254. public OnVehicleSpawn(vehicleid)
  255. {
  256.     return 1;
  257. }
  258.  
  259. public OnVehicleDeath(vehicleid, killerid)
  260. {
  261.     return 1;
  262. }
  263.  
  264. public OnPlayerText(playerid, text[])
  265. {
  266.     return 1;
  267. }
  268.  
  269. // --------------------------------------------------------------------------- >
  270.  
  271. CMD:car(playerid, params[])
  272. {
  273.  
  274.     if (pInfo[playerid][Organizacao] != Administradores)
  275.     {
  276.         SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador");
  277.         return 1;
  278.     }
  279.  
  280.     new
  281.         Id, Cor[2], Float: x,
  282.         Float: y,   Float: z,
  283.         Carro
  284.     ;
  285.  
  286.     pInfo[playerid][Licenciado] = 1;
  287.  
  288.     if (sscanf(params, "dii", Id, Cor[0], Cor[1]))
  289.     {
  290.         SendClientMessage(playerid, Branco, "Use: /Car [Id] [Cor] [Cor]");
  291.     }
  292.     else
  293.     {
  294.         if (Id < 400 || Id > 611) return
  295.         SendClientMessage(playerid, Branco, "ID do Veículo Inválido");
  296.  
  297.         if (Cor[0] < 0 || Cor[0] > 126) return
  298.         SendClientMessage(playerid, Branco, "ID da 1ª Cor Inválido");
  299.  
  300.         if (Cor[1] < 0 || Cor[1] > 126) return
  301.         SendClientMessage(playerid, Branco, "ID da 2ª Cor Inválido");
  302.  
  303.         GetPlayerPos(playerid, x, y, z);
  304.         Carro = CreateVehicle(Id, x, y, z, 0, Cor[0], Cor[1], false);
  305.         PutPlayerInVehicle(playerid, Carro, 0);
  306.     }
  307.     return 1;
  308. }
  309.  
  310. CMD:comprar(playerid, params [])
  311. {
  312.     if (pInfo[playerid][Fazer_Compras] == 0)
  313.     {
  314.         SendClientMessage(playerid, Vermelho, "Você não está em uma 24/7");
  315.         return 1;
  316.     }
  317.    
  318.     new
  319.         Item
  320.     ;
  321.  
  322.     if (sscanf(params, "i", Item))
  323.     {
  324.         SendClientMessage(playerid, Vermelho, "----------------Loja----------------");
  325.         SendClientMessage(playerid, Branco  , "[1] - Carteira de Motorista");
  326.         SendClientMessage(playerid, Branco  , "[2] - Quentinha");
  327.         SendClientMessage(playerid, Branco  , "[3] - Licença de Armas");
  328.         SendClientMessage(playerid, Branco  , "[4] - Pizza");
  329.         SendClientMessage(playerid, Branco  , "[5] - Hamburguer");
  330.         SendClientMessage(playerid, Branco  , "[6] - Cigarros");
  331.         SendClientMessage(playerid, Vermelho, "------------------------------------");
  332.         return SendClientMessage(playerid, Laranja, "Use: /Comprar [ID do Item]");
  333.     }
  334.  
  335.     if ( Item < 0 || Item > 6 )
  336.     {
  337.         SendClientMessage(playerid, Branco, "Número de Item Inválido");
  338.         return 1;
  339.     }
  340.    
  341.     switch ( Item )
  342.     {
  343.         case 1:
  344.         {
  345.             if(GetPlayerMoney(playerid) < 5000)
  346.             {
  347.                 SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 5000");
  348.                 return 1;
  349.             }
  350.  
  351.             pInfo[playerid][Licenciado] = 1;
  352.             SendClientMessage(playerid, Laranja, "Você comprou uma Carteira de Motorista por {FFFFFF}R$: 5000");
  353.             GivePlayerMoney(playerid, - 5000);
  354.             return 1;
  355.         }
  356. // --------------------------------- >
  357.         case 2:
  358.         {
  359.             if(GetPlayerMoney(playerid) < 150)
  360.             {
  361.                 SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 150");
  362.                 return 1;
  363.             }
  364.  
  365.             pInfo[playerid][Quentinha] ++;
  366.             SendClientMessage(playerid, Laranja, "Você comprou uma Quentinha por {FFFFFF}R$: 150. /Comer");
  367.             GivePlayerMoney(playerid, - 150);
  368.             return 1;
  369.         }
  370. // --------------------------------- >
  371.         case 3:
  372.         {
  373.             if(pInfo[playerid][Horas_Jogadas] < 2)
  374.             {
  375.                 SendClientMessage(playerid, Vermelho, "Você não tem Experiência Suficiente");
  376.                 return 1;
  377.             }
  378.        
  379.             if(GetPlayerMoney(playerid) < 5000)
  380.             {
  381.                 SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 5000");
  382.                 return 1;
  383.             }
  384.  
  385.             pInfo[playerid][Licenca_Armas] = 1;
  386.             SendClientMessage(playerid, Laranja, "Você comprou uma Licença de Armas.");
  387.             SendClientMessage(playerid, Laranja, "Agora você pode comprar sua arma em uma Loja de Armas.");
  388.             GivePlayerMoney(playerid, - 5000);
  389.             return 1;
  390.         }
  391. // --------------------------------- >
  392.         case 4:
  393.         {
  394.             if(GetPlayerMoney(playerid) < 150)
  395.             {
  396.                 SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 150");
  397.                 return 1;
  398.             }
  399.  
  400.             pInfo[playerid][Pizza] ++;
  401.             SendClientMessage(playerid, Laranja, "Você comprou uma Pizza por {FFFFFF}R$: 150. /Comer");
  402.             GivePlayerMoney(playerid, - 150);
  403.             return 1;
  404.         }
  405. // --------------------------------- >
  406.         case 5:
  407.         {
  408.             if(GetPlayerMoney(playerid) < 250)
  409.             {
  410.                 SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 250");
  411.                 return 1;
  412.             }
  413.  
  414.             pInfo[playerid][Hamburguer] ++;
  415.             SendClientMessage(playerid, Laranja, "Você comprou um Hambúrguer por {FFFFFF}R$: 250. /Comer");
  416.             GivePlayerMoney(playerid, - 150);
  417.             return 1;
  418.         }
  419. // --------------------------------- >
  420.         case 6:
  421.         {
  422.             if(GetPlayerMoney(playerid) < 1500)
  423.             {
  424.                 SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 1500");
  425.                 return 1;
  426.             }
  427.            
  428.             pInfo[playerid][Cigarros] = 10;
  429.             SendClientMessage(playerid, Laranja, "Você comprou uma Carteira de Cigarros por {FFFFFF}R$: 1500. /Fumar");
  430.             GivePlayerMoney(playerid, - 1500);
  431.             return 1;
  432.         }
  433. // --------------------------------- >
  434.     }
  435.     return 1;
  436. }
  437.  
  438. CMD:comer(playerid, params [])
  439. {
  440.     new
  441.         Item
  442.     ;
  443.  
  444.     if (sscanf(params, "i", Item))
  445.     {
  446.         SendClientMessage(playerid, Vermelho, "----------------Comer----------------");
  447.         SendClientMessage(playerid, Branco  , "[1] - Quentinha");
  448.         SendClientMessage(playerid, Branco  , "[2] - Pizza");
  449.         SendClientMessage(playerid, Branco  , "[3] - Hambúrguer");
  450.         SendClientMessage(playerid, Vermelho, "-------------------------------------");
  451.         return SendClientMessage(playerid, Laranja, "Use: /Comer [ID do Item]");
  452.     }
  453.  
  454.     if ( Item < 0 || Item > 3 )
  455.     {
  456.         SendClientMessage(playerid, Branco, "Número de Item Inválido");
  457.         return 1;
  458.     }
  459.    
  460.     switch ( Item )
  461.     {
  462.         case 1:
  463.         {
  464.             if (pInfo[playerid][Quentinha] < 1)
  465.             {
  466.                 SendClientMessage(playerid, Vermelho, "Você não tem uma Quentinha para comer");
  467.                 return 1;
  468.             }
  469.    
  470.             ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  471.             new Float: Health;
  472.             GetPlayerHealth(playerid, Health);
  473.             SetPlayerHealth(playerid, Health + 25);
  474.             SendClientMessage(playerid, Vermelho, "Você Comeu uma Quentinha, e Ganhou {FFFFFF}25 de Life");
  475.             pInfo[playerid][Quentinha] --;
  476.             return 1;
  477.         }
  478. // --------------------------------- >
  479.         case 2:
  480.         {
  481.             if (pInfo[playerid][Pizza] < 1)
  482.             {
  483.                 SendClientMessage(playerid, Vermelho, "Você não tem uma Pizza para comer");
  484.                 return 1;
  485.             }
  486.  
  487.             ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  488.             new Float: Health;
  489.             GetPlayerHealth(playerid, Health);
  490.             SetPlayerHealth(playerid, Health + 35);
  491.             SendClientMessage(playerid, Vermelho, "Você Comeu uma Pizza, e Ganhou {FFFFFF}35 de Life");
  492.             pInfo[playerid][Pizza] --;
  493.             return 1;
  494.         }
  495. // --------------------------------- >
  496.         case 3:
  497.         {
  498.             if (pInfo[playerid][Hamburguer] < 1)
  499.             {
  500.                 SendClientMessage(playerid, Vermelho, "Você não tem um Hamburguer para comer");
  501.                 return 1;
  502.             }
  503.  
  504.             ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
  505.             new Float: Health;
  506.             GetPlayerHealth(playerid, Health);
  507.             SetPlayerHealth(playerid, Health + 50);
  508.             SendClientMessage(playerid, Vermelho, "Você Comeu um Hamburguer, e Ganhou {FFFFFF}50 de Life");
  509.             pInfo[playerid][Hamburguer] --;
  510.             return 1;
  511.         }
  512. // --------------------------------- >
  513.     }
  514.     return 1;
  515. }
  516.  
  517. CMD:fumar(playerid, params [])
  518. {
  519.     new
  520.         Item
  521.     ;
  522.  
  523.     if (sscanf(params, "i", Item))
  524.     {
  525.         SendClientMessage(playerid, Vermelho, "----------------Fumar----------------");
  526.         SendClientMessage(playerid, Branco  , "[1] - Cigarros");
  527.         SendClientMessage(playerid, Branco  , "[2] - Maconha");
  528.         SendClientMessage(playerid, Vermelho, "-------------------------------------");
  529.         return SendClientMessage(playerid, Laranja, "Use: /Fumar [ID do Item]");
  530.     }
  531.  
  532.     if ( Item < 0 || Item > 2 )
  533.     {
  534.         SendClientMessage(playerid, Branco, "Número de Item Inválido");
  535.         return 1;
  536.     }
  537.  
  538.     switch ( Item )
  539.     {
  540.         case 1:
  541.         {
  542.             if (pInfo[playerid][Cigarros] < 1)
  543.             {
  544.                 SendClientMessage(playerid, Vermelho, "Você não tem Cigarros para Fumar");
  545.                 return 1;
  546.             }
  547.  
  548.             Timer_Cigarro = SetTimer("Fumando_Cigarro", 2000, true);
  549.             return 1;
  550.         }
  551. // --------------------------------- >
  552.         case 2:
  553.         {
  554.             if (pInfo[playerid][Maconha] < 1)
  555.             {
  556.                 SendClientMessage(playerid, Vermelho, "Você não tem Maconha para Fumar");
  557.                 return 1;
  558.             }
  559.  
  560.             Timer_Maconha = SetTimer("Fumando_Maconha", 2500, true);
  561.             return 1;
  562.         }
  563.     }
  564. // --------------------------------- >
  565.     return 1;
  566. }
  567.  
  568. public Soltar_Preso(playerid)
  569. {
  570.     SetPlayerInterior(playerid, 0);
  571.     SpawnPlayer(playerid);
  572.     SendClientMessage(playerid, Verde_Claro, "Sentença completa. Agora você é livre Novamente");
  573.     GameTextForPlayer(playerid, "~g~ Liberdade ", 2500, 1);
  574.     pInfo[playerid][Preso] = 0;
  575. }
  576.  
  577. public Fumando_Cigarro(playerid)
  578. {
  579.     new Float: Armour;
  580.     GetPlayerArmour(playerid, Armour);
  581.     SetPlayerArmour(playerid, Armour + 5);
  582.     pInfo[playerid][Cigarros] --;
  583.     ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
  584.    
  585.     if(pInfo[playerid][Cigarros] == 0)
  586.     {
  587.         KillTimer(Timer_Cigarro);
  588.         SendClientMessage(playerid, Verde, "Acabaram seus Cigarros");
  589.         ClearAnimations(playerid);
  590.     }
  591.    
  592.     if(Armour == 100)
  593.     {
  594.         KillTimer(Timer_Cigarro);
  595.         ClearAnimations(playerid);
  596.     }
  597. }
  598.  
  599. public Fumando_Maconha(playerid)
  600. {
  601.     new Float: Armour;
  602.     GetPlayerArmour(playerid, Armour);
  603.     SetPlayerArmour(playerid, Armour + 10);
  604.     pInfo[playerid][Maconha] --;
  605.     ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
  606.  
  607.     if(pInfo[playerid][Maconha] == 0)
  608.     {
  609.         KillTimer(Timer_Maconha);
  610.         SendClientMessage(playerid, Verde, "Acabaram suas Ervas");
  611.         ClearAnimations(playerid);
  612.     }
  613.  
  614.     if(Armour == 100)
  615.     {
  616.         KillTimer(Timer_Maconha);
  617.         ClearAnimations(playerid);
  618.     }
  619. }
  620.  
  621. CMD:reparo(playerid, params [])
  622. {
  623.     if(pInfo[playerid][Emprego] != Mecanico)
  624.     {
  625.         SendClientMessage(playerid, Amarelo, "Você não é um Mecânico.");
  626.         return 1;
  627.     }
  628.    
  629.     new
  630.         Id,         Str[120],   Carro,
  631.         Float: x,   Str_E[120],
  632.         Float: y,   Nome[25],
  633.         Float: z,   Nome_E[25]
  634.     ;
  635.    
  636.     if (sscanf(params, "u", Id))
  637.     {
  638.         SendClientMessage(playerid, Laranja, "Use: /Reparo [ID]");
  639.         return 1;
  640.     }
  641.    
  642.     if(!IsPlayerConnected(Id))
  643.     {
  644.         SendClientMessage(playerid, Vermelho, "Jogador Não Conectado");
  645.         return 1;
  646.     }
  647.    
  648.     if( Id == playerid)
  649.     {
  650.         SendClientMessage(playerid, Vermelho, "Você não pode reparar a Si mesmo");
  651.         return 1;
  652.     }
  653.    
  654.     GetPlayerPos(Id, x, y, z);
  655.    
  656.     if(!IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
  657.     {
  658.         SendClientMessage(playerid, Branco, "Você não está Próximo ao Jogador");
  659.         return 1;
  660.     }
  661.  
  662.     Carro = GetPlayerVehicleID(Id);
  663.     RepairVehicle(Carro);
  664.     SetVehicleHealth(Carro, 1000);
  665.    
  666.     GetPlayerName(playerid, Nome, 25), GetPlayerName(Id, Nome_E, 25);
  667.     format(Str, sizeof(Str), "Você Reparou o Veículo do Jogador {FFFFFF}%s", Nome_E);
  668.     format(Str_E, sizeof(Str_E), "Seu Veículo foi reparado pelo mecânico {FFFFFF}%s", Nome);
  669.     SendClientMessage(Id, Amarelo, Str_E)SendClientMessage(playerid, Amarelo, Str);
  670.     return 1;
  671. }
  672.  
  673. CMD:procurar(playerid, params [])
  674. {
  675.     if(pInfo[playerid][Emprego] != Detetive)
  676.     {
  677.         SendClientMessage(playerid, Amarelo, "Você não é um Detetive.");
  678.         return 1;
  679.     }
  680.    
  681.     new
  682.         Float: x,   Str[85],
  683.         Float: y,
  684.         Float: z
  685.     ;
  686.    
  687.     if (sscanf(params, "u", Id_Check))
  688.     {
  689.         SendClientMessage(playerid, Laranja, "Use: /Procurar [ID]");
  690.         return 1;
  691.     }
  692.    
  693.     GetPlayerPos(Id_Check, x, y, z);
  694.     SetPlayerCheckpoint(Id_Check, x, y, z, 1.0);
  695.     SetTimer("Cont_P", 1000, false);
  696.  
  697.     format(Str, sizeof(Str), "Você procurou o id %d . Ache ele no Mapa. Você tem 5 Seg!", Id_Check);
  698.     SendClientMessage(playerid, Amarelo, Str);
  699.     return 1;
  700. }
  701.  
  702. CMD:meuskin(playerid, params [])
  703. {
  704.  
  705.     if (pInfo[playerid][Loja_Roupas] != 1)
  706.     {
  707.         SendClientMessage(playerid, Vermelho, "Você não está em uma Loja de Roupas");
  708.         return 1;
  709.     }
  710.  
  711.     new
  712.         Skin
  713.     ;
  714.  
  715.     if (sscanf(params, "i", Skin))
  716.     {
  717.         SendClientMessage(playerid, -1, "Use: /meuskin [Id]");
  718.     }
  719.     else
  720.     {
  721.         if ( Skin > 299 )
  722.         {
  723.             SendClientMessage(playerid, Branco, "ID da Skin Inválido");
  724.             return 1;
  725.         }
  726.        
  727.         if ( GetPlayerMoney(playerid) < 1200)
  728.         {
  729.             SendClientMessage(playerid, Branco, "Você não tem dinheiro Suficiente");
  730.             return 1;
  731.         }
  732.        
  733.         SendClientMessage(playerid, Amarelo, "A Roupa Custou R$ : {FFFFFF}1200");
  734.         GivePlayerMoney(playerid, - 1200);
  735.         SetPlayerSkin(playerid, Skin);
  736.     }
  737.     return 1;
  738. }
  739.  
  740. CMD:tempo(playerid, params [])
  741. {
  742.     if (pInfo[playerid][Organizacao] != Administradores)
  743.     {
  744.         SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador");
  745.         return 1;
  746.     }
  747.  
  748.     new
  749.         Tempo
  750.     ;
  751.  
  752.     if (sscanf(params, "i", Tempo))
  753.     {
  754.         SendClientMessage(playerid, -1, "Use: /tempo [Id]");
  755.     }
  756.     else
  757.     {
  758.         if ( Tempo > 24 )
  759.         {
  760.             SendClientMessage(playerid, Branco, "ID do Tempo Inválido");
  761.             return 1;
  762.         }
  763.  
  764.         SetWorldTime(Tempo);
  765.     }
  766.     return 1;
  767. }
  768.  
  769. CMD:clima(playerid, params [])
  770. {
  771.     if (pInfo[playerid][Organizacao] != Administradores)
  772.     {
  773.         SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador");
  774.         return 1;
  775.     }
  776.  
  777.     new Clima;
  778.  
  779.     if (sscanf(params, "i", Clima))
  780.     {
  781.         SendClientMessage(playerid, -1, "Use: /Clima [Id]");
  782.     }
  783.     else
  784.     {
  785.         if ( Clima > 45 )
  786.         {
  787.             SendClientMessage(playerid, Branco, "ID do Clima Inválido");
  788.             return 1;
  789.         }
  790.  
  791.         SetWeather(Clima);
  792.     }
  793.     return 1;
  794. }
  795.  
  796. CMD:setarmembro(playerid, params [])
  797. {
  798.     if (pInfo[playerid][Organizacao] != Administradores)
  799.     {
  800.         SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador");
  801.         return 1;
  802.     }
  803.  
  804.     new
  805.         Id, Id_Cargo,
  806.         Id_Org
  807.     ;
  808.  
  809.     if(sscanf(params, "uii", Id, Id_Org, Id_Cargo))
  810.     {
  811.         SendClientMessage(playerid,-1,"Use: /setarmembro [Id] [Id Organização] [Id Cargo]");
  812.     }
  813.     else
  814.     {
  815.         if(!IsPlayerConnected(Id))
  816.         {
  817.             SendClientMessage(playerid, Branco, "Jogador Não Conectado");
  818.             return 1;
  819.         }
  820.  
  821.         if(pInfo[Id][Organizacao] != 0 || pInfo[Id][Cargo] != 0)
  822.         {
  823.             SendClientMessage(playerid, Branco, "Este Jogador Já Possui uma Organização");
  824.             return 1;
  825.         }
  826.  
  827.         if ( Id_Org < 21 || Id_Org > 33 )
  828.         {
  829.             SendClientMessage(playerid, Branco, "ID da Organização Inválido");
  830.             return 1;
  831.         }
  832.  
  833.         if ( Id_Cargo > 6 )
  834.         {
  835.             SendClientMessage(playerid, Branco, "ID do Cargo Inválido");
  836.             return 1;
  837.         }
  838.  
  839.         pInfo[Id][Organizacao] = Id_Org;
  840.         pInfo[Id][Cargo] = Id_Cargo;
  841.         SpawnPlayer(Id);
  842.  
  843.         new
  844.             Str[80],
  845.             Nome[25]
  846.         ;
  847.  
  848.         GetPlayerName(playerid, Nome, 25);
  849.  
  850.         format(Str, sizeof(Str),"%s Organização %d Cargo %d", Nome, pInfo[playerid][Organizacao], pInfo[playerid][Cargo]);
  851.         SendClientMessage(playerid, Branco, Str);
  852.     }
  853.     return 1;
  854. }
  855.  
  856. CMD:mp(playerid, params [])
  857. {
  858.     new
  859.         Str_S [120],  Nome_S[25],
  860.         Str_E [120],  Nome_E[25],
  861.         Id,           Texto[120]
  862.     ;
  863.  
  864.     if (sscanf(params, "us[120]", Id, Texto))
  865.     {
  866.         SendClientMessage(playerid, -1, "Use: /MP [Id] [Texto]");
  867.     }
  868.     else
  869.     {
  870.         if (pInfo[Id][Organizacao] != Administradores)
  871.         {
  872.             SendClientMessage(playerid, Branco, "Este Jogador não é um{00FFFF}Administrador");
  873.             return 1;
  874.         }
  875.  
  876.         if(!IsPlayerConnected(Id))
  877.         {
  878.             SendClientMessage(playerid, Branco, "Jogador Não Conectado");
  879.             return 1;
  880.         }
  881.  
  882.         GetPlayerName(playerid, Nome_E, 25);
  883.         GetPlayerName(Id, Nome_S, 25);
  884.  
  885.         format(Str_E, sizeof(Str_E), "Mensagem enviada para o Jogador {00FFFF}%s", Nome_S);
  886.         format(Str_S, sizeof(Str_S), "MP de {00FFFF}%s {FFFFFF}: {00FFFF}%s", Nome_E, Texto);
  887.  
  888.         SendClientMessage(playerid, Branco, Str_E);
  889.         SendClientMessage(Id, Branco, Str_S);
  890.     }
  891.     return 1;
  892. }
  893.  
  894. CMD:pagar(playerid, params [])
  895. {
  896.     new
  897.         Str_S [120],  Nome_S[25],
  898.         Str_E [120],  Nome_E[25],
  899.         Id,           Valor
  900.     ;
  901.  
  902.     if (sscanf(params, "ui", Id, Valor))
  903.     {
  904.         SendClientMessage(playerid, -1, "Use: /Pagar [Id] [Valor]");
  905.     }
  906.     else
  907.     {
  908.         if(!IsPlayerConnected(Id))
  909.         {
  910.             SendClientMessage(playerid, Branco, "Jogador Não Conectado");
  911.             return 1;
  912.         }
  913.  
  914.         new
  915.             Float: x,
  916.             Float: y,
  917.             Float: z
  918.         ;
  919.  
  920.         GetPlayerPos(Id, x, y, z);
  921.  
  922.         if(!IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
  923.         {
  924.             SendClientMessage(playerid, Branco, "Você não está Próximo ao Jogador");
  925.             return 1;
  926.         }
  927.  
  928.         if(GetPlayerMoney(playerid) < Valor)
  929.         {
  930.             SendClientMessage(playerid, Branco, "Você não tem toda essa Grana");
  931.             return 1;
  932.         }
  933.  
  934.         GetPlayerName(playerid, Nome_E, 25);
  935.         GetPlayerName(Id, Nome_S, 25);
  936.  
  937.         format(Str_E, sizeof(Str_E), "Você Pagou R$: {00FFFF}%d{FFFFFF} Para o Jogador {00FFFF}%s", Valor, Nome_S);
  938.         format(Str_S, sizeof(Str_S), "Você Recebeu R$: {00FFFF}%d{FFFFFF} Do Jogador {00FFFF}%s", Valor, Nome_E);
  939.  
  940.         SendClientMessage(playerid, Branco, Str_E);
  941.         SendClientMessage(Id, Branco, Str_S);
  942.  
  943.         GivePlayerMoney(Id, Valor);
  944.         GivePlayerMoney(playerid, - Valor);
  945.     }
  946.     return 1;
  947. }
  948.  
  949. CMD:kick(playerid, params [])
  950. {
  951.     if (pInfo[playerid][Organizacao] != Administradores)
  952.     {
  953.         SendClientMessage(playerid, Branco, "Você não é um {00FFFF}Administrador");
  954.         return 1;
  955.     }
  956.  
  957.     new
  958.         Nome_S[25],   Motivo[120],
  959.         Str_E [148],  Nome_E[25]
  960.     ;
  961.  
  962.     if (sscanf(params, "us[120]", Id_Kick, Motivo))
  963.     {
  964.         SendClientMessage(playerid, -1, "Use: /Kick [Id] [Motivo]");
  965.     }
  966.     else
  967.     {
  968.         if(!IsPlayerConnected(Id_Kick))
  969.         {
  970.             SendClientMessage(playerid, Branco, "Jogador Não Conectado");
  971.             return 1;
  972.         }
  973.  
  974.         GetPlayerName(playerid, Nome_E, 25);
  975.         GetPlayerName(Id_Kick, Nome_S, 25);
  976.  
  977.         format(Str_E, sizeof(Str_E), "O Administrador {00FFFF}%s {FFFFFF}Kickou {00FFFF}%s{FFFFFF}. Motivo: {00FFFF}%s", Nome_E, Nome_S, Motivo);
  978.         SendClientMessageToAll( Branco, Str_E);
  979.         SetTimer("Kick_Player", 10, false);
  980.     }
  981.     return 1;
  982. }
  983.  
  984. CMD:pedircontas(playerid)
  985. {
  986.     new
  987.         Str[120]
  988.     ;
  989.  
  990.     if (pInfo[playerid][Emprego] == Desempregado)
  991.     {
  992.         SendClientMessage(playerid, Vermelho, "Você Já é Desempregado");
  993.         return 1;
  994.     }
  995.    
  996.     if (!(pInfo[playerid][Contrato] == 0))
  997.     {
  998.         format(Str, sizeof(Str), "Você não pode sair do emprego, ainda restam %d Horas de contrato do Emprego antigo.", pInfo[playerid][Contrato]);
  999.         SendClientMessage(playerid, Amarelo, Str);
  1000.         return 1;
  1001.     }
  1002.    
  1003.     pInfo[playerid][Emprego] = Desempregado;
  1004.     SendClientMessage(playerid, Verde_Claro, "Você completou suas horas de trabalho e saiu do emprego. Agora você é Desempregado");
  1005.     return 1;
  1006. }
  1007.  
  1008. CMD:venderarma(playerid, params [])
  1009. {
  1010.     if (pInfo[playerid][Emprego] != Vendedor_de_Armas)
  1011.     {
  1012.         SendClientMessage(playerid, Branco, "Você não é um Vendedor de Armas");
  1013.         return 1;
  1014.     }
  1015.  
  1016.     new
  1017.         Nome_S[25],     Nome_E[25],    Str_Wanted[60],
  1018.         Str_S [148],    Str_E [148],
  1019.         Id,     Arma,   Balas
  1020.     ;
  1021.  
  1022.     if (sscanf(params, "uii", Id, Arma, Balas))
  1023.     {
  1024.         return SendClientMessage(playerid, -1, "Use: /VenderArma [Id] [Arma] [Balas]");
  1025.     }
  1026.     else
  1027.     {
  1028.         if (pInfo[playerid][Materiais] < Balas * Arma)
  1029.         {
  1030.              SendClientMessage(playerid, Branco, "Você não tem Materiais Suficientes");
  1031.              return 1;
  1032.         }
  1033.        
  1034.         if(!IsPlayerConnected(Id))
  1035.         {
  1036.             SendClientMessage(playerid, Branco, "Jogador Não Conectado");
  1037.             return 1;
  1038.         }
  1039.  
  1040. /*
  1041.     if( Id == playerid)
  1042.         {
  1043.             SendClientMessage(playerid, Vermelho, "Você não pode Vender Armas a sí mesmo");
  1044.             return 1;
  1045.         }
  1046. */
  1047.         new
  1048.             Float: x,
  1049.             Float: y,
  1050.             Float: z
  1051.         ;
  1052.  
  1053.         GetPlayerPos(Id, x, y, z);
  1054.  
  1055.         if(!IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
  1056.         {
  1057.             SendClientMessage(playerid, Branco, "Você não está Próximo ao Jogador");
  1058.             return 1;
  1059.         }
  1060.  
  1061.         if (!(Arma == 22 || Arma == 24 || Arma == 25 || Arma == 29 || Arma == 30 || Arma == 31 || Arma == 34 || Arma == 4))
  1062.         {
  1063.              SendClientMessage(playerid, Branco, "ID da Arma Inválido");
  1064.              return 1;
  1065.         }
  1066.  
  1067.         if (Balas < 0 || Balas > 999)
  1068.         {
  1069.              SendClientMessage(playerid, Branco, "Número de Balas Inválido {00FFFF}[ Min :0 Max :999]");
  1070.              return 1;
  1071.         }
  1072.        
  1073.         if(pInfo[Id][Debug] == 0)
  1074.         {
  1075.             if (pInfo[Id][Licenca_Armas] == 0)
  1076.             {
  1077.                 pInfo[Id][Crimes] ++;
  1078.                 SendClientMessage(Id, Vermelho, "Você Cometeu um Crime : {FFFFFF}Porte ilegal de Armas");
  1079.                 format(Str_Wanted, sizeof(Str_Wanted), "Nivel Atual de Procura : {FFFFFF}%d", pInfo[Id][Crimes]);
  1080.                 SendClientMessage(Id, Amarelo, Str_Wanted);
  1081.                 SetPlayerWantedLevel(Id, pInfo[Id][Crimes]);
  1082.                 pInfo[Id][Debug] = 1;
  1083.             }
  1084.         }
  1085.  
  1086.         GetPlayerName(playerid, Nome_E, 25);
  1087.         GetPlayerName(Id, Nome_S, 25);
  1088.  
  1089.         format(Str_E, sizeof(Str_E), "Você Vendeu Armas para o Jogador {00FFFF}%s{FFFFFF} [Arma: %d Balas: %d]", Nome_S, Arma, Balas);
  1090.         format(Str_S, sizeof(Str_S), "Você Recebeu Armas do Traficante {00FFFF}%s{FFFFFF} [Arma: %d Balas: %d]", Nome_E, Arma, Balas);
  1091.  
  1092.         pInfo[playerid][Materiais] -= Balas * Arma;
  1093.  
  1094.         SendClientMessage(playerid, Branco, Str_E);
  1095.         SendClientMessage(Id, Branco, Str_S);
  1096.         GivePlayerWeapon(Id, Arma, Balas);
  1097.     }
  1098.     return 1;
  1099. }
  1100.  
  1101. CMD:materiais(playerid, params [])
  1102. {
  1103.     if (pInfo[playerid][Emprego] != Vendedor_de_Armas)
  1104.     {
  1105.         SendClientMessage(playerid, Branco, "Você não é um Vendedor de Armas");
  1106.         return 1;
  1107.     }
  1108.    
  1109.     if (pInfo[playerid][Comprar_Materiais] == 0)
  1110.     {
  1111.         SendClientMessage(playerid, Vermelho, "Você não está no local que se compra Materiais");
  1112.         return 1;
  1113.     }
  1114.    
  1115.     new
  1116.         Item,
  1117.         Str[60]
  1118.     ;
  1119.  
  1120.     if(sscanf(params, "i", Item))
  1121.     {
  1122.         return SendClientMessage(playerid,-1,"Use: /Materiais [Quantidade]");
  1123.     }
  1124.  
  1125.     if ( Item < 1 || Item > 10000 )
  1126.     {
  1127.         SendClientMessage(playerid, Branco, "Quantidade Inválida [Min: 1 Max: 10000]");
  1128.         return 1;
  1129.     }
  1130.    
  1131.     pInfo[playerid][Materiais] = Item;
  1132.     GivePlayerMoney(playerid, - 2 * Item);
  1133.     format(Str, sizeof(Str), "Você comprou %d Materiais. Use /Venderarma", Item);
  1134.     SendClientMessage(playerid, Amarelo, Str);
  1135.     pInfo[playerid][Comprar_Materiais] = 0;
  1136.     return 1;
  1137. }
  1138.  
  1139. CMD:meuimc(playerid, params [])
  1140. {
  1141.     new
  1142.         Peso,   Total,
  1143.         Altura, Str[60]
  1144.     ;
  1145.  
  1146.     if (sscanf(params, "ii", Peso, Altura))
  1147.     {
  1148.         return SendClientMessage(playerid, -1, "Use: /meuimc [Seu Peso] [Sua Altura]");
  1149.     }
  1150.    
  1151.     if( Peso < 40 )
  1152.     {
  1153.         SendClientMessage(playerid, Branco, "Peso Inválido . [Min: 40]");
  1154.         return 1;
  1155.     }
  1156.  
  1157.     Total = Peso / Altura * Altura;
  1158.     Total = Peso / Altura;
  1159.  
  1160.     format(Str, sizeof(Str), "Seu IMC é {FFFFFF}%d", Total);
  1161.     SendClientMessage(playerid, Azul_Claro, Str);
  1162.     return 1;
  1163. }
  1164.  
  1165. CMD:vendedor(playerid)
  1166. {
  1167.     pInfo[playerid][Emprego] = Vendedor_de_Armas ;
  1168.     return 1;
  1169. }
  1170. // --------------------------------------------------------------------------- >
  1171.  
  1172. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1173. {
  1174.     return 1;
  1175. }
  1176.  
  1177. public OnPlayerExitVehicle(playerid, vehicleid)
  1178. {
  1179.     return 1;
  1180. }
  1181.  
  1182. public OnPlayerStateChange(playerid, newstate, oldstate)
  1183. {
  1184.     new Str_Wanted[60];
  1185.  
  1186.     if (newstate == PLAYER_STATE_DRIVER)
  1187.     {
  1188.         if (pInfo[playerid][Licenciado] != 1)
  1189.         {
  1190.             RemovePlayerFromVehicle(playerid);
  1191.             SendClientMessage(playerid, Vermelho, "Você cometeu um Crime : {FFFFFF}Dirigir sem Carteira");
  1192.             pInfo[playerid][Crimes] ++;
  1193.             format(Str_Wanted, sizeof(Str_Wanted), "Nivel Atual de Procura : {FFFFFF}%d", pInfo[playerid][Crimes]);
  1194.             SendClientMessage(playerid, Amarelo, Str_Wanted);
  1195.             SetPlayerWantedLevel(playerid, pInfo[playerid][Crimes]);
  1196.         }
  1197.     }
  1198. // --------------------------------------------------------------------------- >
  1199.     if (newstate == PLAYER_STATE_DRIVER)
  1200.     {
  1201.         if (pInfo[playerid][Emprego] == Caminhoneiro)
  1202.         {
  1203.             new vehicleid = GetPlayerVehicleID(playerid);
  1204.             new Str[80];
  1205.  
  1206.             if (vehicleid == 524 || 578 || 455 || 403 || 443 || 514 || 515 || 456)
  1207.             {
  1208.                 SendClientMessage(playerid, Branco, "Para Conseguir uma carga vá até uma Empresa");
  1209.                 if (!IsTrailerAttachedToVehicle(vehicleid))
  1210.                 {
  1211.                     format(Str, sizeof(Str), "Produtos do Caminhão : {FFFFFF}%d", pInfo[playerid][Produtos]);
  1212.                     SendClientMessage(playerid, Laranja, Str);
  1213.                 }
  1214.             }
  1215.         }
  1216.     }
  1217.     return 1;
  1218. }
  1219.  
  1220. forward Cont_P(playerid);
  1221. public Cont_P(playerid)
  1222. {
  1223.     GameTextForAll("~w~5", 1000, 6);
  1224.     SetTimer("Cont_P1", 1000, false);
  1225. }
  1226. forward Cont_P1(playerid);
  1227. public Cont_P1(playerid)
  1228. {
  1229.     GameTextForAll("~w~4", 1000, 6);
  1230.     SetTimer("Cont_P2", 1000, false);
  1231. }
  1232. forward Cont_P2(playerid);
  1233. public Cont_P2(playerid)
  1234. {
  1235.     GameTextForAll("~w~3", 1000, 6);
  1236.     SetTimer("Cont_P3", 1000, false);
  1237. }
  1238. forward Cont_P3(playerid);
  1239. public Cont_P3(playerid)
  1240. {   GameTextForAll("~w~2", 1000, 6);
  1241.     SetTimer("Cont_P4", 1000, false);
  1242. }
  1243. forward Cont_P4(playerid);
  1244. public Cont_P4(playerid)
  1245. {   GameTextForAll("~w~1", 1000, 6);
  1246.     SetTimer("Cont_P5", 1000, false);
  1247. }
  1248. forward Cont_P5(playerid);
  1249. public Cont_P5(playerid)
  1250. {
  1251.     GameTextForAll("~w~0", 1000, 6);
  1252.     DisablePlayerCheckpoint(Id_Check);
  1253. }
  1254.  
  1255. public Kick_Player(playerid)
  1256. {
  1257.     Kick(Id_Kick);
  1258.     pInfo[Id_Kick][Kikado] ++;
  1259. }
  1260.  
  1261. public OnPlayerEnterCheckpoint(playerid)
  1262. {
  1263.     return 1;
  1264. }
  1265.  
  1266. public OnPlayerLeaveCheckpoint(playerid)
  1267. {
  1268.     return 1;
  1269. }
  1270.  
  1271. public OnPlayerEnterRaceCheckpoint(playerid)
  1272. {
  1273.     return 1;
  1274. }
  1275.  
  1276. public OnPlayerLeaveRaceCheckpoint(playerid)
  1277. {
  1278.     return 1;
  1279. }
  1280.  
  1281. public OnRconCommand(cmd[])
  1282. {
  1283.     return 1;
  1284. }
  1285.  
  1286. public OnPlayerRequestSpawn(playerid)
  1287. {
  1288.     return 1;
  1289. }
  1290.  
  1291. public OnObjectMoved(objectid)
  1292. {
  1293.     return 1;
  1294. }
  1295.  
  1296. public OnPlayerObjectMoved(playerid, objectid)
  1297. {
  1298.     return 1;
  1299. }
  1300.  
  1301. public OnPlayerPickUpPickup(playerid, pickupid)
  1302. {
  1303.     return 1;
  1304. }
  1305.  
  1306. public OnVehicleMod(playerid, vehicleid, componentid)
  1307. {
  1308.     return 1;
  1309. }
  1310.  
  1311. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1312. {
  1313.     return 1;
  1314. }
  1315.  
  1316. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1317. {
  1318.     return 1;
  1319. }
  1320.  
  1321. public OnPlayerSelectedMenuRow(playerid, row)
  1322. {
  1323.     return 1;
  1324. }
  1325.  
  1326. public OnPlayerExitedMenu(playerid)
  1327. {
  1328.     return 1;
  1329. }
  1330.  
  1331. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  1332. {
  1333.     return 1;
  1334. }
  1335.  
  1336. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1337. {
  1338.     if (newkeys == 16)
  1339.     {
  1340.         if (IsPlayerInRangeOfPoint(playerid, 1.0, Menu_Prefeitura))
  1341.         {
  1342.             ShowPlayerDialog(playerid, Dialog_Emprego, DIALOG_STYLE_LIST, "Empregos", "Mecanico \nCaminhoneiro\nDetetive\nAdvogado\nVendedor de Armas", "Escolher", "Sair");
  1343.         }
  1344.     }
  1345.  
  1346.     if (newkeys == 16)
  1347.     {
  1348.         if (IsPlayerInRangeOfPoint(playerid, 1.0, Materiais_Obter))
  1349.         {
  1350.             if (pInfo[playerid][Emprego] != Vendedor_de_Armas)
  1351.             {
  1352.                 SendClientMessage(playerid, Branco, "Você não é um Vendedor de Armas");
  1353.                 return 1;
  1354.             }
  1355.             SendClientMessage(playerid, Laranja, "Para comprar Materiais use /Materiais");
  1356.             pInfo[playerid][Comprar_Materiais] = 1;
  1357.         }
  1358.     }
  1359.  
  1360.     if (newkeys == 16)
  1361.     {
  1362.         if (IsPlayerInRangeOfPoint(playerid, 1.0, Entrada_Prefeitura))
  1363.         {
  1364.             SetPlayerInterior(playerid, 3);
  1365.             SetPlayerPos(playerid, 389.8720, 173.6646, 1008.3828);
  1366.             SendClientMessage(playerid, Laranja, "Bem Vindo a Prefeitura. Aqui você pode escolher um emprego");
  1367.         }
  1368.     }
  1369.  
  1370.     if (newkeys == 16)
  1371.     {
  1372.         if (IsPlayerInRangeOfPoint(playerid, 1.0, 389.8720, 173.6646, 1008.3828))
  1373.         {
  1374.             SetPlayerInterior(playerid, 0);
  1375.             SetPlayerPos(playerid, Entrada_Prefeitura);
  1376.         }
  1377.     }
  1378.  
  1379.     if (newkeys == 16)
  1380.     {
  1381.         if (IsPlayerInRangeOfPoint(playerid, 1.0, Entrada_Loja))
  1382.         {
  1383.             SetPlayerInterior(playerid, 17);
  1384.             SetPlayerPos(playerid, -25.884498, -185.868988, 1003.546875);
  1385.             SendClientMessage(playerid, Laranja, "Bem Vindo a Loja. Aqui você pode fazer Compras. {FFFFFF}/Comprar");
  1386.             pInfo[playerid][Fazer_Compras] = 1;
  1387.         }
  1388.     }
  1389.  
  1390.     if (newkeys == 16)
  1391.     {
  1392.         if (IsPlayerInRangeOfPoint(playerid, 1.0, -26.0003, -188.2597, 1003.5469))
  1393.         {
  1394.             SetPlayerInterior(playerid, 0);
  1395.             SetPlayerPos(playerid, Entrada_Loja);
  1396.             pInfo[playerid][Fazer_Compras] = 0;
  1397.         }
  1398.     }
  1399.  
  1400.     if (newkeys == 16)
  1401.     {
  1402.         if (IsPlayerInRangeOfPoint(playerid, 1.0, Entrada_Ammu))
  1403.         {
  1404.             SetPlayerInterior(playerid, 7);
  1405.             SetPlayerPos(playerid, 314.820983, -141.431991, 999.601562);
  1406.             SendClientMessage(playerid, Laranja, "Bem Vindo a Ammu Nation. Aqui você poderá comprar Armas");
  1407.         }
  1408.     }
  1409.  
  1410.     if (newkeys == 16)
  1411.     {
  1412.         if (IsPlayerInRangeOfPoint(playerid, 1.0, Menu_Armas))
  1413.         {
  1414.             ShowPlayerDialog(playerid, Dialog_Armas, DIALOG_STYLE_LIST, "Loja de Armas", "Desert Eagle\nShotgun\nMP5\nM4\nAK 47\nColete", "Comprar", "Sair");
  1415.         }
  1416.     }
  1417.  
  1418.     if (newkeys == 16)
  1419.     {
  1420.         if (IsPlayerInRangeOfPoint(playerid, 1.0, 315.7297, -143.6574, 999.6016))
  1421.         {
  1422.             SetPlayerInterior(playerid, 0);
  1423.             SetPlayerPos(playerid, Entrada_Ammu);
  1424.         }
  1425.         if (newkeys == 16)
  1426.         {
  1427.             if (IsPlayerInRangeOfPoint(playerid, 1.0, Entrada_Loja_Roupas))
  1428.             {
  1429.                 SetPlayerInterior(playerid, 5);
  1430.                 SetPlayerPos(playerid, 227.5590, -8.1010, 1002.2109);
  1431.                 SendClientMessage(playerid, Laranja, "Bem Vindo a Loja de Roupas. Aqui você pode comprar Roupas. {FFFFFF}/meuskin");
  1432.                 pInfo[playerid][Loja_Roupas] = 1;
  1433.             }
  1434.         }
  1435.  
  1436.         if (newkeys == 16)
  1437.         {
  1438.             if (IsPlayerInRangeOfPoint(playerid, 1.0, 227.5590, -8.1010, 1002.21097))
  1439.             {
  1440.                 SetPlayerInterior(playerid, 0);
  1441.                 SetPlayerPos(playerid, Entrada_Loja_Roupas);
  1442.                 pInfo[playerid][Loja_Roupas] = 0;
  1443.             }
  1444.         }
  1445.     }
  1446.     return 1;
  1447. }
  1448.  
  1449. public OnRconLoginAttempt(ip[], password[], success)
  1450. {
  1451.     return 1;
  1452. }
  1453.  
  1454. public OnPlayerUpdate(playerid)
  1455. {
  1456.     return 1;
  1457. }
  1458.  
  1459. public OnPlayerStreamIn(playerid, forplayerid)
  1460. {
  1461.     return 1;
  1462. }
  1463.  
  1464. public OnPlayerStreamOut(playerid, forplayerid)
  1465. {
  1466.     return 1;
  1467. }
  1468.  
  1469. public OnVehicleStreamIn(vehicleid, forplayerid)
  1470. {
  1471.     return 1;
  1472. }
  1473.  
  1474. public OnVehicleStreamOut(vehicleid, forplayerid)
  1475. {
  1476.     return 1;
  1477. }
  1478.  
  1479. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1480. {
  1481.  
  1482.     if (dialogid == Dialog_Emprego)
  1483.     {
  1484.         if (response)
  1485.         {
  1486.             if (listitem == 0)
  1487.             {
  1488.                 if (pInfo[playerid][Emprego] == Desempregado)
  1489.                 {
  1490.                     SendClientMessage(playerid, Vermelho, "Você Já tem um Emprego. Use {FFFFFF}/pedircontas");
  1491.                     return 1;
  1492.                 }
  1493.  
  1494.                 pInfo[playerid][Emprego] = Mecanico;
  1495.                 SendClientMessage(playerid, Amarelo, "Parabéns ! Agora você é um Mecânico.");
  1496.                 pInfo[playerid][Contrato] = 5;
  1497.                 return 1;
  1498.             }
  1499.  
  1500.             else if (listitem == 1)
  1501.             {
  1502.                 if (pInfo[playerid][Emprego] == Desempregado)
  1503.                 {
  1504.                     SendClientMessage(playerid, Vermelho, "Você Já tem um Emprego. Use {FFFFFF}/pedircontas");
  1505.                     return 1;
  1506.                 }
  1507.  
  1508.                 pInfo[playerid][Emprego] = Caminhoneiro;
  1509.                 SendClientMessage(playerid, Amarelo, "Parabéns ! Agora você é um Caminhoneiro.");
  1510.                 pInfo[playerid][Contrato] = 5;
  1511.                 return 1;
  1512.             }
  1513.  
  1514.             else if (listitem == 2)
  1515.             {
  1516.                 if (pInfo[playerid][Emprego] == Desempregado)
  1517.                 {
  1518.                     SendClientMessage(playerid, Vermelho, "Você Já tem um Emprego. Use {FFFFFF}/pedircontas");
  1519.                     return 1;
  1520.                 }
  1521.  
  1522.                 pInfo[playerid][Emprego] = Detetive;
  1523.                 SendClientMessage(playerid, Amarelo, "Parabéns ! Agora você é um Detetive.");
  1524.                 pInfo[playerid][Contrato] = 5;
  1525.                 return 1;
  1526.             }
  1527.  
  1528.             else if (listitem == 3)
  1529.             {
  1530.                 if (pInfo[playerid][Emprego] == Desempregado)
  1531.                 {
  1532.                     SendClientMessage(playerid, Vermelho, "Você Já tem um Emprego. Use {FFFFFF}/pedircontas");
  1533.                     return 1;
  1534.                 }
  1535.  
  1536.                 pInfo[playerid][Emprego] = Advogado;
  1537.                 SendClientMessage(playerid, Amarelo, "Parabéns ! Agora você é um Advogado.");
  1538.                 pInfo[playerid][Contrato] = 5;
  1539.                 return 1;
  1540.             }
  1541.            
  1542.             else if (listitem == 4)
  1543.             {
  1544.                 if (pInfo[playerid][Emprego] == Desempregado)
  1545.                 {
  1546.                     SendClientMessage(playerid, Vermelho, "Você Já tem um Emprego. Use {FFFFFF}/pedircontas");
  1547.                     return 1;
  1548.                 }
  1549.  
  1550.                 pInfo[playerid][Emprego] = Vendedor_de_Armas;
  1551.                 SendClientMessage(playerid, Amarelo, "Parabéns ! Agora você é um Vendedor de Armas.");
  1552.                 pInfo[playerid][Contrato] = 5;
  1553.                 return 1;
  1554.             }
  1555.         }
  1556.     }
  1557. // --------------------------------------------------------------------------- >
  1558.     if (dialogid == Dialog_Armas)
  1559.     {
  1560.         if (response)
  1561.         {
  1562.             if (listitem == 0)
  1563.             {
  1564.                 if (GetPlayerMoney(playerid) < 1500)
  1565.                 {
  1566.                     SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 1500");
  1567.                     return 1;
  1568.                 }
  1569.  
  1570.                 GivePlayerWeapon(playerid, 24, 100);
  1571.                 SendClientMessage(playerid, Laranja, "Você comprou uma Desert Eagle {FFFFFF}R$: 1500");
  1572.                 GivePlayerMoney(playerid, -1500);
  1573.                 return 1;
  1574.             }
  1575.  
  1576.             else if (listitem == 1)
  1577.             {
  1578.                 if (GetPlayerMoney(playerid) < 2000)
  1579.                 {
  1580.                     SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 2000");
  1581.                     return 1;
  1582.                 }
  1583.                
  1584.                 if (pInfo[playerid][Licenca_Armas] == 1)
  1585.                 {
  1586.                     SendClientMessage(playerid, Vermelho, "Você não tem uma Licença de Porte Legal");
  1587.                     return 1;
  1588.                 }
  1589.  
  1590.                 GivePlayerWeapon(playerid, 25, 100);
  1591.                 SendClientMessage(playerid, Laranja, "Você comprou uma Shotgun por {FFFFFF}R$: 2000");
  1592.                 GivePlayerMoney(playerid, -2000);
  1593.                 return 1;
  1594.             }
  1595.  
  1596.             else if (listitem == 2)
  1597.             {
  1598.                 if (GetPlayerMoney(playerid) < 1500)
  1599.                 {
  1600.                     SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 1500");
  1601.                     return 1;
  1602.                 }
  1603.                
  1604.                 if (pInfo[playerid][Licenca_Armas] == 1)
  1605.                 {
  1606.                     SendClientMessage(playerid, Vermelho, "Você não tem uma Licença de Porte Legal");
  1607.                     return 1;
  1608.                 }
  1609.  
  1610.                 GivePlayerWeapon(playerid, 29, 100);
  1611.                 SendClientMessage(playerid, Laranja, "Você comprou uma MP5 por {FFFFFF}R$: 1500");
  1612.                 GivePlayerMoney(playerid, -1500);
  1613.                 return 1;
  1614.             }
  1615.  
  1616.             else if (listitem == 3)
  1617.             {
  1618.                 if (GetPlayerMoney(playerid) < 2500)
  1619.                 {
  1620.                     SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 2500");
  1621.                     return 1;
  1622.                 }
  1623.  
  1624.                 if (pInfo[playerid][Licenca_Armas] == 1)
  1625.                 {
  1626.                     SendClientMessage(playerid, Vermelho, "Você não tem uma Licença de Porte Legal");
  1627.                     return 1;
  1628.                 }
  1629.  
  1630.                 GivePlayerWeapon(playerid, 31, 100);
  1631.                 SendClientMessage(playerid, Laranja, "Você comprou uma M4A1 por {FFFFFF}R$: 2500");
  1632.                 GivePlayerMoney(playerid, -2500);
  1633.                 return 1;
  1634.             }
  1635.  
  1636.             else if (listitem == 4)
  1637.             {
  1638.                 if (GetPlayerMoney(playerid) < 2500)
  1639.                 {
  1640.                     SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 2500");
  1641.                     return 1;
  1642.                 }
  1643.                
  1644.                 if (pInfo[playerid][Licenca_Armas] == 1)
  1645.                 {
  1646.                     SendClientMessage(playerid, Vermelho, "Você não tem uma Licença de Porte Legal");
  1647.                     return 1;
  1648.                 }
  1649.                
  1650.                 GivePlayerWeapon(playerid, 30, 100);
  1651.                 SendClientMessage(playerid, Laranja, "Você comprou uma AK-47 por {FFFFFF}R$: 2500");
  1652.                 GivePlayerMoney(playerid, -2500);
  1653.                 return 1;
  1654.             }
  1655.  
  1656.             else if (listitem == 5)
  1657.             {
  1658.                 if (GetPlayerMoney(playerid) < 5000)
  1659.                 {
  1660.                     SendClientMessage(playerid, Vermelho, "Você não tem {FFFFFF}R$: 5000");
  1661.                     return 1;
  1662.                 }
  1663.                
  1664.                 SetPlayerArmour(playerid, 100);
  1665.                 SendClientMessage(playerid, Laranja, "Você comprou um Colete por {FFFFFF}R$: 5000");
  1666.                 GivePlayerMoney(playerid, -5000);
  1667.                 return 1;
  1668.             }
  1669.         }
  1670.     }
  1671. // --------------------------------------------------------------------------- >
  1672.     return 1;
  1673. }
  1674.  
  1675. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1676. {
  1677.     return 1;
  1678. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement