Advertisement
CromartieTX

[FS SAMP] Sistema de porta-malas

Apr 27th, 2019
4,173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 44.38 KB | None | 0 0
  1. #include <a_samp>
  2. #include <ZCMD>
  3.  
  4. static IDVehPLAYER[MAX_PLAYERS];
  5. static SenhaMALA[MAX_VEHICLES];
  6. static SenhON[MAX_VEHICLES];
  7. static PTVida[MAX_VEHICLES];
  8. static PTColete[MAX_VEHICLES];
  9. static PTDinheiro[MAX_VEHICLES];
  10. static PTVidaMAX = 400;
  11. static PTColeteMAX = 400;
  12. static PTDinheiroMAX = 50000;
  13. static AmmoSlot1[MAX_VEHICLES], ArmaSlot1[MAX_VEHICLES],NomeArmSlt1[MAX_VEHICLES][32];
  14. static AmmoSlot1MAX = 1000;
  15. static AmmoSlot2[MAX_VEHICLES], ArmaSlot2[MAX_VEHICLES],NomeArmSlt2[MAX_VEHICLES][32];
  16. static AmmoSlot2MAX = 1000;
  17. static AmmoSlot3[MAX_VEHICLES], ArmaSlot3[MAX_VEHICLES],NomeArmSlt3[MAX_VEHICLES][32];
  18. static AmmoSlot3MAX = 1000;
  19. static AmmoSlot4[MAX_VEHICLES], ArmaSlot4[MAX_VEHICLES],NomeArmSlt4[MAX_VEHICLES][32];
  20. static AmmoSlot4MAX = 1000;
  21. static AmmoSlot5[MAX_VEHICLES], ArmaSlot5[MAX_VEHICLES],NomeArmSlt5[MAX_VEHICLES][32];
  22. static AmmoSlot5MAX = 1000;
  23. new NameFG[MAX_PLAYER_NAME];
  24. new StrMalas[300];
  25. new DialoPMz[972];
  26.  
  27. #define DialogMALA  1010
  28. #define IdDialogTXT1 1011
  29. #define IdDialogTXT2 1012
  30. #define IdDialogTXT3 1013
  31. #define IdDialogTXT4 1014
  32. #define IdDialogTXT5 1015
  33. #define IdDialogTXT6 1016
  34. #define IdDialogTXT7 1017
  35. #define IdDialogTXT8 1018
  36. #define IdDialogTXT9 1019
  37. #define IdDialogTXT10 1020
  38.  
  39. CMD:mala(playerid)
  40. {
  41.     new Float:P[5],Float:distancia = -3.0;
  42.     GetVehiclePos(IDVehPLAYER[playerid], P[0], P[1], P[2]);
  43.     GetVehicleZAngle(IDVehPLAYER[playerid], P[3]);
  44.     P[0] = P[0] + distancia * floatsin(-P[3], degrees);
  45.     P[1] = P[1] + distancia * floatcos(-P[3], degrees);
  46.     new CarID = GetVehicleModel(IDVehPLAYER[playerid]);
  47.     if(CarID ==441||CarID ==448||CarID ==461||CarID ==462||CarID ==463||CarID ==464||CarID ==465||CarID ==468||
  48.     CarID ==471||CarID ==481||CarID ==485||CarID ==486||CarID ==501||CarID ==510||CarID ==509||CarID ==521||
  49.     CarID ==522||CarID ==523||CarID ==531||CarID ==530||CarID ==539||CarID ==564||CarID ==571||CarID ==572||
  50.     CarID ==574||CarID ==581||CarID ==583||CarID ==586) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Este veiculo {FF0000}NÃO{1E90FF} e COMPATIVEL!");
  51.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  52.     new Float:x, Float:y, Float:z;
  53.     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  54.     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{FFFF00} Você está {FF0000}LONGE{FFFF00} OU sem as {FF0000}CHAVES{FFFF00}! Entre no CARRO, é pegue as {FF0000}CHAVES{FFFF00}");
  55.     if(!IsPlayerInRangeOfPoint(playerid, 3, P[0]-1.0285, P[1]+1.0768, P[2])) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{FFFF00} Você {FF0000}NÃO{FFFF00} está perto do PORTA-MALAS");
  56.     strcat(DialoPMz, "{33CC33}ABRIR - {FFFF00}Ver OQUE tem DENTRO\n");
  57.     strcat(DialoPMz, "{FF0000}FECHAR - {FFFF00}O Porta-malas\n");
  58.     strcat(DialoPMz, "{00FF00}Colocar {33CC33}DINHEIRO\n");
  59.     strcat(DialoPMz, "{FFFF00}Pegar {33CC33}DINHEIRO\n");
  60.     strcat(DialoPMz, "{00FF00}Colocar {FF0000}VIDA\n");
  61.     strcat(DialoPMz, "{FFFF00}Pegar {FF0000}VIDA\n");
  62.     strcat(DialoPMz, "{00FF00}Colocar {0099FF}COLETE\n");
  63.     strcat(DialoPMz, "{FFFF00}Pegar {0099FF}COLETE\n");
  64.     strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}1{FFFF00}]\n");
  65.     strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}1{FFFF00}]\n");
  66.     strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}2{FFFF00}]\n");
  67.     strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}2{FFFF00}]\n");
  68.     strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}3{FFFF00}]\n");
  69.     strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}3{FFFF00}]\n");
  70.     strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}4{FFFF00}]\n");
  71.     strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}4{FFFF00}]\n");
  72.     strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}5{FFFF00}]\n");
  73.     strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}5{FFFF00}]\n");
  74.     strcat(DialoPMz, "{00FF00}ATIVAR {FF0000}SENHA{FFFF00} para {00FF00}ABRIR{FFFF00} o Portamalas {00FF00}(Troca SENHA)\n");
  75.    
  76.     if(SenhON[IDVehPLAYER[playerid]] == 1)
  77.     {
  78.         ShowPlayerDialog(playerid, IdDialogTXT10, DIALOG_STYLE_PASSWORD, "{FFFF00}Porta-malas", "{FFFF00} DIGITE a {00BB00}SENHA{FFFF00} do portamalas", "Próximo", "Voltar");
  79.         return 1;
  80.     }
  81.    
  82.     new mot, lu, alar, por, cap, porma, ob;
  83.     GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  84.     SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob);
  85.     ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  86.     return 1;
  87. }
  88.  
  89. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  90. {
  91.     IDVehPLAYER[playerid] = vehicleid;
  92.     return 1;
  93. }
  94.  
  95. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  96. {
  97.     if(dialogid == DialogMALA)
  98.     {
  99.         if(response)
  100.         {
  101.             if(listitem == 0)
  102.             {
  103.                 if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  104.                 new Float:x, Float:y, Float:z;
  105.                 GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  106.                 if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  107.                 {
  108.                     if(AmmoSlot1[IDVehPLAYER[playerid]] == 0) { NomeArmSlt1[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
  109.                     if(AmmoSlot2[IDVehPLAYER[playerid]] == 0) { NomeArmSlt2[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
  110.                     if(AmmoSlot3[IDVehPLAYER[playerid]] == 0) { NomeArmSlt3[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
  111.                     if(AmmoSlot4[IDVehPLAYER[playerid]] == 0) { NomeArmSlt4[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
  112.                     if(AmmoSlot5[IDVehPLAYER[playerid]] == 0) { NomeArmSlt5[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
  113.                     new string1[128],string2[128],string3[128],string4[128],string5[128],string6[128],string7[128],string8[128];
  114.                     format(string1, sizeof(string1), "{33CC33}Dinheiro: {00FCFC}R$%i - {FF0000}[MAX: {00FCFC}R$50.000{FF0000}]",PTDinheiro[IDVehPLAYER[playerid]]);
  115.                     format(string2, sizeof(string2), "{0099FF}Colete: {00FCFC}%i - {FF0000}[MAX: {00FCFC}400.0{FF0000}]",PTColete[IDVehPLAYER[playerid]]);
  116.                     format(string3, sizeof(string3), "{FF0000}Vida: {00FCFC}%i - {FF0000}[MAX: {00FCFC}400.0{FF0000}]",PTVida[IDVehPLAYER[playerid]]);
  117.                     format(string4, sizeof(string4), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}1{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt1[IDVehPLAYER[playerid]],AmmoSlot1[IDVehPLAYER[playerid]]);
  118.                     format(string5, sizeof(string5), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}2{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt2[IDVehPLAYER[playerid]],AmmoSlot2[IDVehPLAYER[playerid]]);
  119.                     format(string6, sizeof(string6), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}3{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt3[IDVehPLAYER[playerid]],AmmoSlot3[IDVehPLAYER[playerid]]);
  120.                     format(string7, sizeof(string7), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}4{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt4[IDVehPLAYER[playerid]],AmmoSlot4[IDVehPLAYER[playerid]]);
  121.                     format(string8, sizeof(string8), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}5{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt5[IDVehPLAYER[playerid]],AmmoSlot5[IDVehPLAYER[playerid]]);
  122.                     SendClientMessage(playerid, 0x0000FFAA, string1);
  123.                     SendClientMessage(playerid, 0x0000FFAA, string2);
  124.                     SendClientMessage(playerid, 0x0000FFAA, string3);
  125.                     SendClientMessage(playerid, 0x0000FFAA, string4);
  126.                     SendClientMessage(playerid, 0x0000FFAA, string5);
  127.                     SendClientMessage(playerid, 0x0000FFAA, string6);
  128.                     SendClientMessage(playerid, 0x0000FFAA, string7);
  129.                     SendClientMessage(playerid, 0x0000FFAA, string8);
  130.                     return 1;
  131.                 }
  132.             }
  133.             if(listitem == 1)
  134.             {
  135.                 new mot, lu, alar, por, cap, porma, ob;
  136.                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  137.                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  138.             }
  139.             if(listitem == 2)
  140.             {
  141.                 ShowPlayerDialog(playerid, IdDialogTXT1, DIALOG_STYLE_INPUT, "{FFFF00}Porta-malas", "{FFFF00} DIGITE o {00BB00}VALOR{FFFF00} de {33CC33}DINHEIRO{FFFF00} que vai {33CC33}COLOCAR", "Próximo", "Voltar");
  142.             }
  143.             if(listitem == 3)
  144.             {
  145.                 ShowPlayerDialog(playerid, IdDialogTXT2, DIALOG_STYLE_INPUT, "{FFFF00}Porta-malas", "{FFFF00} DIGITE o {00BB00}VALOR{FFFF00} de {33CC33}DINHEIRO{FFFF00} que vai {FF0000}TIRAR", "Próximo", "Voltar");
  146.             }
  147.             if(listitem == 4)
  148.             {
  149.                 ShowPlayerDialog(playerid, IdDialogTXT3, DIALOG_STYLE_INPUT, "{FFFF00}Porta-malas", "{FFFF00} DIGITE o {00BB00}QUANTIDADE{FFFF00} de {FF0000}VIDA{FFFF00} que vai {33CC33}COLOCAR", "Próximo", "Voltar");
  150.             }
  151.             if(listitem == 5)
  152.             {
  153.                 ShowPlayerDialog(playerid, IdDialogTXT4, DIALOG_STYLE_INPUT, "{FFFF00}Porta-malas", "{FFFF00} DIGITE o {00BB00}QUANTIDADE{FFFF00} de {FF0000}VIDA{FFFF00} que vai {FF0000}TIRAR", "Próximo", "Voltar");
  154.             }
  155.             if(listitem == 6)
  156.             {
  157.                 ShowPlayerDialog(playerid, IdDialogTXT5, DIALOG_STYLE_INPUT, "{FFFF00}Porta-malas", "{FFFF00} DIGITE o {00BB00}QUANTIDADE{FFFF00} de {0099FF}COLETE{FFFF00} que vai {33CC33}COLOCAR", "Próximo", "Voltar");
  158.             }
  159.             if(listitem == 7)
  160.             {
  161.                 ShowPlayerDialog(playerid, IdDialogTXT6, DIALOG_STYLE_INPUT, "{FFFF00}Porta-malas", "{FFFF00} DIGITE o {00BB00}QUANTIDADE{FFFF00} de {0099FF}COLETE{FFFF00} que vai {FF0000}TIRAR", "Próximo", "Voltar");
  162.             }
  163.             if(listitem == 8)
  164.             {
  165.                 if(response)
  166.                 {
  167.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  168.                     new Float:x, Float:y, Float:z;
  169.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  170.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  171.                     {
  172.                         if(AmmoSlot1[IDVehPLAYER[playerid]] == 0)
  173.                         {
  174.                             ArmaSlot1[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
  175.                             if(ArmaSlot1[IDVehPLAYER[playerid]] != 0)
  176.                             {
  177.                                 new mot, lu, alar, por, cap, porma, ob;
  178.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  179.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  180.                                 AmmoSlot1[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
  181.                                 SetPlayerAmmo(playerid, ArmaSlot1[IDVehPLAYER[playerid]], 0);
  182.                                 if(AmmoSlot1[IDVehPLAYER[playerid]] > AmmoSlot1MAX)
  183.                                 {
  184.                                     AmmoSlot1[IDVehPLAYER[playerid]] = 1000;
  185.                                     SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
  186.                                 }
  187.                                 GetWeaponName(ArmaSlot1[IDVehPLAYER[playerid]], NomeArmSlt1[IDVehPLAYER[playerid]], sizeof(NomeArmSlt1));
  188.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  189.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {33CC33}COLOCOU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 1]",NameFG,NomeArmSlt1[IDVehPLAYER[playerid]],AmmoSlot1[IDVehPLAYER[playerid]]);
  190.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  191.                             }
  192.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
  193.                         }
  194.                         else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
  195.                     }
  196.                     return 1;
  197.                 }
  198.             }
  199.             if(listitem == 9)
  200.             {
  201.                 if(response)
  202.                 {
  203.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  204.                     new Float:x, Float:y, Float:z;
  205.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  206.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  207.                     {
  208.                             if(ArmaSlot1[IDVehPLAYER[playerid]] != 0)
  209.                             {
  210.                                 GivePlayerWeapon(playerid, ArmaSlot1[IDVehPLAYER[playerid]], AmmoSlot1[IDVehPLAYER[playerid]]);
  211.                                 ArmaSlot1[IDVehPLAYER[playerid]] = 0;
  212.                                 new mot, lu, alar, por, cap, porma, ob;
  213.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  214.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  215.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  216.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {FF0000}RETIROU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 1]",NameFG,NomeArmSlt1[IDVehPLAYER[playerid]],AmmoSlot1[IDVehPLAYER[playerid]]);
  217.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  218.                                 AmmoSlot1[IDVehPLAYER[playerid]] = 0;
  219.                                 NomeArmSlt1[IDVehPLAYER[playerid]] = "VAZIO";
  220.                             }
  221.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
  222.                     }
  223.                     return 1;
  224.                 }
  225.             }
  226.  
  227.             if(listitem == 10)
  228.             {
  229.                 if(response)
  230.                 {
  231.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  232.                     new Float:x, Float:y, Float:z;
  233.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  234.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  235.                     {
  236.                         if(AmmoSlot2[IDVehPLAYER[playerid]] == 0)
  237.                         {
  238.                             ArmaSlot2[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
  239.                             if(ArmaSlot2[IDVehPLAYER[playerid]] != 0)
  240.                             {
  241.                                 new mot, lu, alar, por, cap, porma, ob;
  242.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  243.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  244.                                 AmmoSlot2[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
  245.                                 SetPlayerAmmo(playerid, ArmaSlot2[IDVehPLAYER[playerid]], 0);
  246.                                 if(AmmoSlot2[IDVehPLAYER[playerid]] > AmmoSlot2MAX)
  247.                                 {
  248.                                     AmmoSlot2[IDVehPLAYER[playerid]] = 1000;
  249.                                     SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
  250.                                 }
  251.                                 GetWeaponName(ArmaSlot2[IDVehPLAYER[playerid]], NomeArmSlt2[IDVehPLAYER[playerid]], sizeof(NomeArmSlt2));
  252.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  253.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {33CC33}COLOCOU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 2]",NameFG,NomeArmSlt2[IDVehPLAYER[playerid]],AmmoSlot2[IDVehPLAYER[playerid]]);
  254.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  255.                             }
  256.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
  257.                         }
  258.                         else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
  259.                     }
  260.                     return 1;
  261.                 }
  262.             }
  263.             if(listitem == 11)
  264.             {
  265.                 if(response)
  266.                 {
  267.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  268.                     new Float:x, Float:y, Float:z;
  269.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  270.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  271.                     {
  272.                             if(ArmaSlot2[IDVehPLAYER[playerid]] != 0)
  273.                             {
  274.                                 GivePlayerWeapon(playerid, ArmaSlot2[IDVehPLAYER[playerid]], AmmoSlot2[IDVehPLAYER[playerid]]);
  275.                                 ArmaSlot2[IDVehPLAYER[playerid]] = 0;
  276.                                 new mot, lu, alar, por, cap, porma, ob;
  277.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  278.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  279.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  280.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {FF0000}RETIROU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 2]",NameFG,NomeArmSlt2[IDVehPLAYER[playerid]],AmmoSlot2[IDVehPLAYER[playerid]]);
  281.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  282.                                 AmmoSlot2[IDVehPLAYER[playerid]] = 0;
  283.                                 NomeArmSlt2[IDVehPLAYER[playerid]] = "VAZIO";
  284.                             }
  285.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
  286.                     }
  287.                     return 1;
  288.                 }
  289.             }
  290.  
  291.             if(listitem == 12)
  292.             {
  293.                 if(response)
  294.                 {
  295.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  296.                     new Float:x, Float:y, Float:z;
  297.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  298.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  299.                     {
  300.                         if(AmmoSlot3[IDVehPLAYER[playerid]] == 0)
  301.                         {
  302.                             ArmaSlot3[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
  303.                             if(ArmaSlot3[IDVehPLAYER[playerid]] != 0)
  304.                             {
  305.                                 new mot, lu, alar, por, cap, porma, ob;
  306.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  307.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  308.                                 AmmoSlot3[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
  309.                                 SetPlayerAmmo(playerid, ArmaSlot3[IDVehPLAYER[playerid]], 0);
  310.                                 if(AmmoSlot3[IDVehPLAYER[playerid]] > AmmoSlot3MAX)
  311.                                 {
  312.                                     AmmoSlot3[IDVehPLAYER[playerid]] = 1000;
  313.                                     SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
  314.                                 }
  315.                                 GetWeaponName(ArmaSlot3[IDVehPLAYER[playerid]], NomeArmSlt3[IDVehPLAYER[playerid]], sizeof(NomeArmSlt3));
  316.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  317.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {33CC33}COLOCOU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 3]",NameFG,NomeArmSlt3[IDVehPLAYER[playerid]],AmmoSlot3[IDVehPLAYER[playerid]]);
  318.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  319.                             }
  320.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
  321.                         }
  322.                         else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
  323.                     }
  324.                     return 1;
  325.                 }
  326.             }
  327.             if(listitem == 13)
  328.             {
  329.                 if(response)
  330.                 {
  331.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  332.                     new Float:x, Float:y, Float:z;
  333.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  334.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  335.                     {
  336.                             if(ArmaSlot3[IDVehPLAYER[playerid]] != 0)
  337.                             {
  338.                                 GivePlayerWeapon(playerid, ArmaSlot3[IDVehPLAYER[playerid]], AmmoSlot3[IDVehPLAYER[playerid]]);
  339.                                 ArmaSlot3[IDVehPLAYER[playerid]] = 0;
  340.                                 new mot, lu, alar, por, cap, porma, ob;
  341.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  342.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  343.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  344.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {FF0000}RETIROU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 3]",NameFG,NomeArmSlt3[IDVehPLAYER[playerid]],AmmoSlot3[IDVehPLAYER[playerid]]);
  345.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  346.                                 AmmoSlot3[IDVehPLAYER[playerid]] = 0;
  347.                                 NomeArmSlt3[IDVehPLAYER[playerid]] = "VAZIO";
  348.                             }
  349.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
  350.                     }
  351.                     return 1;
  352.                 }
  353.             }
  354.  
  355.             if(listitem == 14)
  356.             {
  357.                 if(response)
  358.                 {
  359.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  360.                     new Float:x, Float:y, Float:z;
  361.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  362.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  363.                     {
  364.                         if(AmmoSlot4[IDVehPLAYER[playerid]] == 0)
  365.                         {
  366.                             ArmaSlot4[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
  367.                             if(ArmaSlot4[IDVehPLAYER[playerid]] != 0)
  368.                             {
  369.                                 new mot, lu, alar, por, cap, porma, ob;
  370.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  371.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  372.                                 AmmoSlot4[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
  373.                                 SetPlayerAmmo(playerid, ArmaSlot4[IDVehPLAYER[playerid]], 0);
  374.                                 if(AmmoSlot4[IDVehPLAYER[playerid]] > AmmoSlot4MAX)
  375.                                 {
  376.                                     AmmoSlot4[IDVehPLAYER[playerid]] = 1000;
  377.                                     SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
  378.                                 }
  379.                                 GetWeaponName(ArmaSlot4[IDVehPLAYER[playerid]], NomeArmSlt4[IDVehPLAYER[playerid]], sizeof(NomeArmSlt4));
  380.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  381.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {33CC33}COLOCOU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 4]",NameFG,NomeArmSlt4[IDVehPLAYER[playerid]],AmmoSlot4[IDVehPLAYER[playerid]]);
  382.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  383.                             }
  384.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
  385.                         }
  386.                         else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
  387.                     }
  388.                     return 1;
  389.                 }
  390.             }
  391.             if(listitem == 15)
  392.             {
  393.                 if(response)
  394.                 {
  395.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  396.                     new Float:x, Float:y, Float:z;
  397.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  398.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  399.                     {
  400.                             if(ArmaSlot4[IDVehPLAYER[playerid]] != 0)
  401.                             {
  402.                                 GivePlayerWeapon(playerid, ArmaSlot4[IDVehPLAYER[playerid]], AmmoSlot4[IDVehPLAYER[playerid]]);
  403.                                 ArmaSlot4[IDVehPLAYER[playerid]] = 0;
  404.                                 new mot, lu, alar, por, cap, porma, ob;
  405.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  406.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  407.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  408.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {FF0000}RETIROU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 4]",NameFG,NomeArmSlt4[IDVehPLAYER[playerid]],AmmoSlot4[IDVehPLAYER[playerid]]);
  409.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  410.                                 AmmoSlot4[IDVehPLAYER[playerid]] = 0;
  411.                                 NomeArmSlt4[IDVehPLAYER[playerid]] = "VAZIO";
  412.                             }
  413.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
  414.                     }
  415.                     return 1;
  416.                 }
  417.             }
  418.  
  419.  
  420.             if(listitem == 16)
  421.             {
  422.                 if(response)
  423.                 {
  424.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  425.                     new Float:x, Float:y, Float:z;
  426.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  427.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  428.                     {
  429.                         if(AmmoSlot5[IDVehPLAYER[playerid]] == 0)
  430.                         {
  431.                             ArmaSlot5[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
  432.                             if(ArmaSlot5[IDVehPLAYER[playerid]] != 0)
  433.                             {
  434.                                 new mot, lu, alar, por, cap, porma, ob;
  435.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  436.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  437.                                 AmmoSlot5[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
  438.                                 SetPlayerAmmo(playerid, ArmaSlot5[IDVehPLAYER[playerid]], 0);
  439.                                 if(AmmoSlot5[IDVehPLAYER[playerid]] > AmmoSlot5MAX)
  440.                                 {
  441.                                     AmmoSlot5[IDVehPLAYER[playerid]] = 1000;
  442.                                     SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
  443.                                 }
  444.                                 GetWeaponName(ArmaSlot5[IDVehPLAYER[playerid]], NomeArmSlt5[IDVehPLAYER[playerid]], sizeof(NomeArmSlt5));
  445.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  446.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {33CC33}COLOCOU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 5]",NameFG,NomeArmSlt5[IDVehPLAYER[playerid]],AmmoSlot5[IDVehPLAYER[playerid]]);
  447.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  448.                             }
  449.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
  450.                         }
  451.                         else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
  452.                     }
  453.                     return 1;
  454.                 }
  455.             }
  456.             if(listitem == 17)
  457.             {
  458.                 if(response)
  459.                 {
  460.                     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  461.                     new Float:x, Float:y, Float:z;
  462.                     GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  463.                     if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  464.                     {
  465.                             if(ArmaSlot5[IDVehPLAYER[playerid]] != 0)
  466.                             {
  467.                                 GivePlayerWeapon(playerid, ArmaSlot5[IDVehPLAYER[playerid]], AmmoSlot5[IDVehPLAYER[playerid]]);
  468.                                 ArmaSlot5[IDVehPLAYER[playerid]] = 0;
  469.                                 new mot, lu, alar, por, cap, porma, ob;
  470.                                 GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  471.                                 SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  472.                                 GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  473.                                 format(StrMalas, sizeof(StrMalas), "[INFO:]{00FCFC} %s {FF0000}RETIROU{FFFF00} ARMA {00FCFC}%s, %i{FFFF00} MUNIÇÕES no Porta-mala {00FCFC}[Slot 5]",NameFG,NomeArmSlt5[IDVehPLAYER[playerid]],AmmoSlot5[IDVehPLAYER[playerid]]);
  474.                                 SendClientMessage(playerid,0xFF0000FF, StrMalas);
  475.                                 AmmoSlot5[IDVehPLAYER[playerid]] = 0;
  476.                                 NomeArmSlt5[IDVehPLAYER[playerid]] = "VAZIO";
  477.                             }
  478.                             else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
  479.                     }
  480.                     return 1;
  481.                 }
  482.             }
  483.  
  484.             if(listitem == 18)
  485.             {
  486.                 ShowPlayerDialog(playerid, IdDialogTXT9, DIALOG_STYLE_PASSWORD, "{FFFF00}Porta-malas", "{FFFF00} DIGITE a {00BB00}NOVA{FFFF00} SENHA", "Próximo", "Voltar");
  487.             }
  488.  
  489.         }
  490.         else
  491.         {
  492.             new mot, lu, alar, por, cap, porma, ob;
  493.             GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  494.             SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  495.         }
  496.     }
  497.  
  498.     if(dialogid == IdDialogTXT1)
  499.     {
  500.         if(response)
  501.         {
  502.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  503.             new Float:x, Float:y, Float:z,PlayerMONEY;
  504.             PlayerMONEY = GetPlayerMoney(playerid);
  505.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  506.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  507.             {
  508.                 new Money = strval(inputtext);
  509.                 new Str1MSG[128],Str2MSG[128];
  510.                 if(PlayerMONEY > Money)
  511.                 {
  512.                     PTDinheiro[IDVehPLAYER[playerid]] += Money;
  513.                     if(PTDinheiro[IDVehPLAYER[playerid]] >= PTDinheiroMAX)
  514.                     {
  515.                         PTDinheiro[IDVehPLAYER[playerid]] -= Money;
  516.                         SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite MÁXIMO R$50.000");
  517.                         return 1;
  518.                     }
  519.                     GivePlayerMoney(playerid, -Money);
  520.                     new mot, lu, alar, por, cap, porma, ob;
  521.                     GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  522.                     SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  523.                     GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  524.                     format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FFFF00}COLOCOU{33CC33} R$%i {FFFF00}No Porta-mala",NameFG, Money);
  525.                     SendClientMessage(playerid,0x0000FFAA, Str1MSG);
  526.                 }
  527.                 else
  528.                 {
  529.                     format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Você NÂO tem {33CC33}R$%i{FFFF00}! {FF0000}Você TEM: {00FCFC}R$%i",Money,PlayerMONEY);
  530.                     SendClientMessage(playerid,0xFF0000FF, Str2MSG);
  531.                 }
  532.             }
  533.             return 1;
  534.         }
  535.         else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  536.     }
  537.     if(dialogid == IdDialogTXT2)
  538.     {
  539.         if(response)
  540.         {
  541.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  542.             new Float:x, Float:y, Float:z;
  543.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  544.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  545.             {
  546.                 new Money = strval(inputtext);
  547.                 new Str1MSG[128],Str2MSG[128];
  548.                 if(Money <= PTDinheiro[IDVehPLAYER[playerid]])
  549.                 {
  550.                     GivePlayerMoney(playerid, Money);
  551.                     PTDinheiro[IDVehPLAYER[playerid]] -= Money;
  552.                     new mot, lu, alar, por, cap, porma, ob;
  553.                     GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  554.                     SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  555.                     GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  556.                     format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FF0000}TIROU{33CC33} R$%i {FFFF00}do Porta-mala",NameFG, Money);
  557.                     SendClientMessage(playerid,0x0000FFAA, Str1MSG);
  558.                 }
  559.                 else
  560.                 {
  561.                     format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Não tem {33CC33}R$%i{FFFF00} disponivel! {FF0000}Valor Disponivel: {00FCFC}R$%i",Money,PTDinheiro[IDVehPLAYER[playerid]]);
  562.                     SendClientMessage(playerid,0xFF0000FF, Str2MSG);
  563.                 }
  564.             }
  565.             return 1;
  566.         }
  567.         else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  568.     }
  569.     if(dialogid == IdDialogTXT3)
  570.     {
  571.         if(response)
  572.         {
  573.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  574.             new Float:x, Float:y, Float:z;
  575.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  576.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  577.             {
  578.                 new Float:HPx, VIDA = strval(inputtext);
  579.                 new Str1MSG[128],Str2MSG[128];
  580.                 GetPlayerHealth(playerid,HPx);
  581.                 if(HPx > VIDA)
  582.                 {
  583.                         new mot, lu, alar, por, cap, porma, ob;
  584.                         GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  585.                         SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  586.                         SetPlayerHealth(playerid,HPx-VIDA);
  587.                         PTVida[IDVehPLAYER[playerid]] += VIDA;
  588.                         if(PTVida[IDVehPLAYER[playerid]] > PTVidaMAX)
  589.                         {
  590.                             PTVida[IDVehPLAYER[playerid]] -= VIDA;
  591.                             SetPlayerHealth(playerid,HPx+VIDA);
  592.                             SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite MÁXIMO 400.0 HP");
  593.                             return 1;
  594.                         }
  595.                         GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  596.                         format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {33CC33}COLOCOU{33CC33} %i HP {FFFF00}no Porta-mala",NameFG, VIDA);
  597.                         SendClientMessage(playerid,0x0000FFAA, Str1MSG);
  598.                 }
  599.                 else
  600.                 {
  601.                     if(HPx == VIDA)
  602.                     {
  603.                         SendClientMessage(playerid,0xFF0000FF, "[WARNING]{FFFF00} Se você tirar ESTA quantidade de {FF0000}VIDA{FFFF00}, você vai {FF0000}MORRER!");
  604.                         return 1;
  605.                     }
  606.                     format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Você NÃO tem {00FCFC}%i{FFFF00} de VIDA! {FF0000}Você TEM: {00FCFC}%f",VIDA,HPx);
  607.                     SendClientMessage(playerid,0xFF0000FF, Str2MSG);
  608.                 }
  609.             }
  610.             return 1;
  611.         }
  612.         else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  613.     }
  614.     if(dialogid == IdDialogTXT4)
  615.     {
  616.         if(response)
  617.         {
  618.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  619.             new Float:x, Float:y, Float:z;
  620.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  621.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  622.             {
  623.                     new Str1MSG[128],Str2MSG[128];
  624.                     new Float:HPx, VIDA = strval(inputtext);
  625.                     if(VIDA <= PTVida[IDVehPLAYER[playerid]])
  626.                     {
  627.                         if(VIDA >= 100) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Valor {FF0000}MÁXIMO{1E90FF} a ser retirado {FF0000}100");
  628.                         GetPlayerHealth(playerid,HPx);
  629.                         if(HPx+VIDA > 100){ return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Erro de calculos! Passou do {FF0000}LIMITE{00FFFF} de VIDA {FF0000}(100)"); }
  630.                         SetPlayerHealth(playerid,HPx+VIDA);
  631.                         PTVida[IDVehPLAYER[playerid]] -= VIDA;
  632.                         new mot, lu, alar, por, cap, porma, ob;
  633.                         GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  634.                         SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  635.                         GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  636.                         format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FF0000}TIROU{33CC33} %i HP {FFFF00}do Porta-mala",NameFG, VIDA);
  637.                         SendClientMessage(playerid,0x0000FFAA, Str1MSG);
  638.                     }
  639.                     else
  640.                     {
  641.                         format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Não tem {00FCFC}%i{FFFF00} de VIDA disponivel! {FF0000}Valor Disponivel: {00FCFC}%i",VIDA,PTVida[IDVehPLAYER[playerid]]);
  642.                         SendClientMessage(playerid,0xFF0000FF, Str2MSG);
  643.                     }
  644.             }
  645.             return 1;
  646.         }
  647.         else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  648.         return 1;
  649.     }
  650.     if(dialogid == IdDialogTXT5)
  651.     {
  652.         if(response)
  653.         {
  654.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  655.             new Float:x, Float:y, Float:z;
  656.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  657.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  658.             {
  659.                 new Str1MSG[128],Str2MSG[128];
  660.                 new Float:HPx, COLETE = strval(inputtext);
  661.                 GetPlayerArmour(playerid,HPx);
  662.                 if(HPx >= COLETE)
  663.                 {
  664.                         new mot, lu, alar, por, cap, porma, ob;
  665.                         GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  666.                         SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  667.                         SetPlayerArmour(playerid,HPx-COLETE);
  668.                         PTColete[IDVehPLAYER[playerid]] += COLETE;
  669.                         if(PTColete[IDVehPLAYER[playerid]] > PTColeteMAX)
  670.                         {
  671.                             PTColete[IDVehPLAYER[playerid]] -= COLETE;
  672.                             SetPlayerArmour(playerid,HPx+COLETE);
  673.                             SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite MÁXIMO 400.0 COLETE");
  674.                             return 1;
  675.                         }
  676.                         GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  677.                         format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {33CC33}COLOCOU{33CC33} %i COLETE {FFFF00}no Porta-mala",NameFG, COLETE);
  678.                         SendClientMessage(playerid,0x0000FFAA, Str1MSG);
  679.                 }
  680.                 else
  681.                 {
  682.                     format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Você NÃO tem {00FCFC}%i{FFFF00} de COLETE! {FF0000}Você TEM: {00FCFC}%f",COLETE,HPx);
  683.                     SendClientMessage(playerid,0xFF0000FF, Str2MSG);
  684.                 }
  685.             }
  686.             return 1;
  687.         }
  688.         else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  689.     }
  690.     if(dialogid == IdDialogTXT6)
  691.     {
  692.         if(response)
  693.         {
  694.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  695.             new Float:x, Float:y, Float:z;
  696.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  697.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  698.             {
  699.                     new Float:HPx, COLETE = strval(inputtext);
  700.                     new Str1MSG[128],Str2MSG[128];
  701.                     if(COLETE <= PTColete[IDVehPLAYER[playerid]])
  702.                     {
  703.                         if(COLETE > 100) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Valor {FF0000}MÁXIMO{1E90FF} a ser retirado {FF0000}100");
  704.                         GetPlayerArmour(playerid,HPx);
  705.                         if(HPx+COLETE > 100){ return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Erro de calculos! Passou do {FF0000}LIMITE{00FFFF} de COLETE {FF0000}(100)"); }
  706.                         SetPlayerArmour(playerid,HPx+COLETE);
  707.                         PTColete[IDVehPLAYER[playerid]] -= COLETE;
  708.                         new mot, lu, alar, por, cap, porma, ob;
  709.                         GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  710.                         SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
  711.                         GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
  712.                         format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FF0000}TIROU{33CC33} %i COLETE {FFFF00}do Porta-mala",NameFG, COLETE);
  713.                         SendClientMessage(playerid,0x0000FFAA, Str1MSG);
  714.                     }
  715.                     else
  716.                     {
  717.                         format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Não tem {00FCFC}%i{FFFF00} de COLETE disponivel! {FF0000}Valor Disponivel: {00FCFC}%i",COLETE,PTColete[IDVehPLAYER[playerid]]);
  718.                         SendClientMessage(playerid,0xFF0000FF, Str2MSG);
  719.                     }
  720.             }
  721.             return 1;
  722.         }
  723.         else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  724.     }
  725.    
  726.     if(dialogid == IdDialogTXT9)
  727.     {
  728.         if(response)
  729.         {
  730.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  731.             new Float:x, Float:y, Float:z, Str2MSG[128];
  732.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  733.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  734.             SenhaMALA[IDVehPLAYER[playerid]] = strval(inputtext);
  735.             SenhON[IDVehPLAYER[playerid]] = 1;
  736.             ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  737.             format(Str2MSG, 50,inputtext);
  738.             SendClientMessage(playerid,0xFFFF00FF, Str2MSG);
  739.             return 1;
  740.         }
  741.         else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  742.     }
  743.     if(dialogid == IdDialogTXT10)
  744.     {
  745.         if(response)
  746.         {
  747.             if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
  748.             new Float:x, Float:y, Float:z;
  749.             GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
  750.             if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
  751.             if(SenhaMALA[IDVehPLAYER[playerid]] != strval(inputtext)){return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{FF0000} Você DIGITOU a SENHA {FF0000}ERRADA!");}
  752.             new mot, lu, alar, por, cap, porma, ob;
  753.             GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
  754.             SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob);
  755.             ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
  756.             return 1;
  757.         }
  758.     }
  759.     return 1;
  760. }
  761.  
  762. public OnVehicleDeath(vehicleid, killerid)
  763. {
  764.     PTVida[vehicleid] = 0;
  765.     PTColete[vehicleid] = 0;
  766.     PTDinheiro[vehicleid] = 0;
  767.     SenhON[vehicleid] = 0;
  768.     AmmoSlot1[vehicleid] = 0, ArmaSlot1[vehicleid] = 0;
  769.     AmmoSlot2[vehicleid] = 0, ArmaSlot2[vehicleid] = 0;
  770.     AmmoSlot3[vehicleid] = 0, ArmaSlot3[vehicleid] = 0;
  771.     AmmoSlot4[vehicleid] = 0, ArmaSlot4[vehicleid] = 0;
  772.     AmmoSlot5[vehicleid] = 0, ArmaSlot5[vehicleid] = 0;
  773.     return 1;
  774. }
  775.  
  776. public OnVehicleSpawn(vehicleid)
  777. {
  778.     SenhON[vehicleid] = 0;
  779. /*  PTVida[vehicleid] = 0;
  780.     PTColete[vehicleid] = 0;
  781.     PTDinheiro[vehicleid] = 0;
  782.     AmmoSlot1[vehicleid] = 0, ArmaSlot1[vehicleid] = 0;
  783.     AmmoSlot2[vehicleid] = 0, ArmaSlot2[vehicleid] = 0;
  784.     AmmoSlot3[vehicleid] = 0, ArmaSlot3[vehicleid] = 0;
  785.     AmmoSlot4[vehicleid] = 0, ArmaSlot4[vehicleid] = 0;
  786.     AmmoSlot5[vehicleid] = 0, ArmaSlot5[vehicleid] = 0;*/
  787.     return 1;
  788. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement