Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <ZCMD>
- static IDVehPLAYER[MAX_PLAYERS];
- static SenhaMALA[MAX_VEHICLES];
- static SenhON[MAX_VEHICLES];
- static PTVida[MAX_VEHICLES];
- static PTColete[MAX_VEHICLES];
- static PTDinheiro[MAX_VEHICLES];
- static PTVidaMAX = 400;
- static PTColeteMAX = 400;
- static PTDinheiroMAX = 50000;
- static AmmoSlot1[MAX_VEHICLES], ArmaSlot1[MAX_VEHICLES],NomeArmSlt1[MAX_VEHICLES][32];
- static AmmoSlot1MAX = 1000;
- static AmmoSlot2[MAX_VEHICLES], ArmaSlot2[MAX_VEHICLES],NomeArmSlt2[MAX_VEHICLES][32];
- static AmmoSlot2MAX = 1000;
- static AmmoSlot3[MAX_VEHICLES], ArmaSlot3[MAX_VEHICLES],NomeArmSlt3[MAX_VEHICLES][32];
- static AmmoSlot3MAX = 1000;
- static AmmoSlot4[MAX_VEHICLES], ArmaSlot4[MAX_VEHICLES],NomeArmSlt4[MAX_VEHICLES][32];
- static AmmoSlot4MAX = 1000;
- static AmmoSlot5[MAX_VEHICLES], ArmaSlot5[MAX_VEHICLES],NomeArmSlt5[MAX_VEHICLES][32];
- static AmmoSlot5MAX = 1000;
- new NameFG[MAX_PLAYER_NAME];
- new StrMalas[300];
- new DialoPMz[972];
- #define DialogMALA 1010
- #define IdDialogTXT1 1011
- #define IdDialogTXT2 1012
- #define IdDialogTXT3 1013
- #define IdDialogTXT4 1014
- #define IdDialogTXT5 1015
- #define IdDialogTXT6 1016
- #define IdDialogTXT7 1017
- #define IdDialogTXT8 1018
- #define IdDialogTXT9 1019
- #define IdDialogTXT10 1020
- CMD:mala(playerid)
- {
- new Float:P[5],Float:distancia = -3.0;
- GetVehiclePos(IDVehPLAYER[playerid], P[0], P[1], P[2]);
- GetVehicleZAngle(IDVehPLAYER[playerid], P[3]);
- P[0] = P[0] + distancia * floatsin(-P[3], degrees);
- P[1] = P[1] + distancia * floatcos(-P[3], degrees);
- new CarID = GetVehicleModel(IDVehPLAYER[playerid]);
- if(CarID ==441||CarID ==448||CarID ==461||CarID ==462||CarID ==463||CarID ==464||CarID ==465||CarID ==468||
- CarID ==471||CarID ==481||CarID ==485||CarID ==486||CarID ==501||CarID ==510||CarID ==509||CarID ==521||
- CarID ==522||CarID ==523||CarID ==531||CarID ==530||CarID ==539||CarID ==564||CarID ==571||CarID ==572||
- CarID ==574||CarID ==581||CarID ==583||CarID ==586) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Este veiculo {FF0000}NÃO{1E90FF} e COMPATIVEL!");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- 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}");
- 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");
- strcat(DialoPMz, "{33CC33}ABRIR - {FFFF00}Ver OQUE tem DENTRO\n");
- strcat(DialoPMz, "{FF0000}FECHAR - {FFFF00}O Porta-malas\n");
- strcat(DialoPMz, "{00FF00}Colocar {33CC33}DINHEIRO\n");
- strcat(DialoPMz, "{FFFF00}Pegar {33CC33}DINHEIRO\n");
- strcat(DialoPMz, "{00FF00}Colocar {FF0000}VIDA\n");
- strcat(DialoPMz, "{FFFF00}Pegar {FF0000}VIDA\n");
- strcat(DialoPMz, "{00FF00}Colocar {0099FF}COLETE\n");
- strcat(DialoPMz, "{FFFF00}Pegar {0099FF}COLETE\n");
- strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}1{FFFF00}]\n");
- strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}1{FFFF00}]\n");
- strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}2{FFFF00}]\n");
- strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}2{FFFF00}]\n");
- strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}3{FFFF00}]\n");
- strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}3{FFFF00}]\n");
- strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}4{FFFF00}]\n");
- strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}4{FFFF00}]\n");
- strcat(DialoPMz, "{00FF00}Colocar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}5{FFFF00}]\n");
- strcat(DialoPMz, "{FFFF00}Pegar {FF6600}ARMA {FFFF00}[SLOT {00FCFC}5{FFFF00}]\n");
- strcat(DialoPMz, "{00FF00}ATIVAR {FF0000}SENHA{FFFF00} para {00FF00}ABRIR{FFFF00} o Portamalas {00FF00}(Troca SENHA)\n");
- if(SenhON[IDVehPLAYER[playerid]] == 1)
- {
- ShowPlayerDialog(playerid, IdDialogTXT10, DIALOG_STYLE_PASSWORD, "{FFFF00}Porta-malas", "{FFFF00} DIGITE a {00BB00}SENHA{FFFF00} do portamalas", "Próximo", "Voltar");
- return 1;
- }
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob);
- ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- IDVehPLAYER[playerid] = vehicleid;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DialogMALA)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(AmmoSlot1[IDVehPLAYER[playerid]] == 0) { NomeArmSlt1[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
- if(AmmoSlot2[IDVehPLAYER[playerid]] == 0) { NomeArmSlt2[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
- if(AmmoSlot3[IDVehPLAYER[playerid]] == 0) { NomeArmSlt3[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
- if(AmmoSlot4[IDVehPLAYER[playerid]] == 0) { NomeArmSlt4[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
- if(AmmoSlot5[IDVehPLAYER[playerid]] == 0) { NomeArmSlt5[IDVehPLAYER[playerid]] = "{FF0000}VAZIO"; }
- new string1[128],string2[128],string3[128],string4[128],string5[128],string6[128],string7[128],string8[128];
- format(string1, sizeof(string1), "{33CC33}Dinheiro: {00FCFC}R$%i - {FF0000}[MAX: {00FCFC}R$50.000{FF0000}]",PTDinheiro[IDVehPLAYER[playerid]]);
- format(string2, sizeof(string2), "{0099FF}Colete: {00FCFC}%i - {FF0000}[MAX: {00FCFC}400.0{FF0000}]",PTColete[IDVehPLAYER[playerid]]);
- format(string3, sizeof(string3), "{FF0000}Vida: {00FCFC}%i - {FF0000}[MAX: {00FCFC}400.0{FF0000}]",PTVida[IDVehPLAYER[playerid]]);
- format(string4, sizeof(string4), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}1{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt1[IDVehPLAYER[playerid]],AmmoSlot1[IDVehPLAYER[playerid]]);
- format(string5, sizeof(string5), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}2{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt2[IDVehPLAYER[playerid]],AmmoSlot2[IDVehPLAYER[playerid]]);
- format(string6, sizeof(string6), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}3{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt3[IDVehPLAYER[playerid]],AmmoSlot3[IDVehPLAYER[playerid]]);
- format(string7, sizeof(string7), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}4{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt4[IDVehPLAYER[playerid]],AmmoSlot4[IDVehPLAYER[playerid]]);
- format(string8, sizeof(string8), "{FF6600}Arma {FFFF00}[SLOT {00FCFC}5{FFFF00}]: {00FCFC}%s, %i {FF6600}MUNIÇÕES",NomeArmSlt5[IDVehPLAYER[playerid]],AmmoSlot5[IDVehPLAYER[playerid]]);
- SendClientMessage(playerid, 0x0000FFAA, string1);
- SendClientMessage(playerid, 0x0000FFAA, string2);
- SendClientMessage(playerid, 0x0000FFAA, string3);
- SendClientMessage(playerid, 0x0000FFAA, string4);
- SendClientMessage(playerid, 0x0000FFAA, string5);
- SendClientMessage(playerid, 0x0000FFAA, string6);
- SendClientMessage(playerid, 0x0000FFAA, string7);
- SendClientMessage(playerid, 0x0000FFAA, string8);
- return 1;
- }
- }
- if(listitem == 1)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- }
- if(listitem == 2)
- {
- 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");
- }
- if(listitem == 3)
- {
- 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");
- }
- if(listitem == 4)
- {
- 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");
- }
- if(listitem == 5)
- {
- 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");
- }
- if(listitem == 6)
- {
- 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");
- }
- if(listitem == 7)
- {
- 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");
- }
- if(listitem == 8)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(AmmoSlot1[IDVehPLAYER[playerid]] == 0)
- {
- ArmaSlot1[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
- if(ArmaSlot1[IDVehPLAYER[playerid]] != 0)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- AmmoSlot1[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
- SetPlayerAmmo(playerid, ArmaSlot1[IDVehPLAYER[playerid]], 0);
- if(AmmoSlot1[IDVehPLAYER[playerid]] > AmmoSlot1MAX)
- {
- AmmoSlot1[IDVehPLAYER[playerid]] = 1000;
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
- }
- GetWeaponName(ArmaSlot1[IDVehPLAYER[playerid]], NomeArmSlt1[IDVehPLAYER[playerid]], sizeof(NomeArmSlt1));
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
- }
- return 1;
- }
- }
- if(listitem == 9)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(ArmaSlot1[IDVehPLAYER[playerid]] != 0)
- {
- GivePlayerWeapon(playerid, ArmaSlot1[IDVehPLAYER[playerid]], AmmoSlot1[IDVehPLAYER[playerid]]);
- ArmaSlot1[IDVehPLAYER[playerid]] = 0;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- AmmoSlot1[IDVehPLAYER[playerid]] = 0;
- NomeArmSlt1[IDVehPLAYER[playerid]] = "VAZIO";
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
- }
- return 1;
- }
- }
- if(listitem == 10)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(AmmoSlot2[IDVehPLAYER[playerid]] == 0)
- {
- ArmaSlot2[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
- if(ArmaSlot2[IDVehPLAYER[playerid]] != 0)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- AmmoSlot2[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
- SetPlayerAmmo(playerid, ArmaSlot2[IDVehPLAYER[playerid]], 0);
- if(AmmoSlot2[IDVehPLAYER[playerid]] > AmmoSlot2MAX)
- {
- AmmoSlot2[IDVehPLAYER[playerid]] = 1000;
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
- }
- GetWeaponName(ArmaSlot2[IDVehPLAYER[playerid]], NomeArmSlt2[IDVehPLAYER[playerid]], sizeof(NomeArmSlt2));
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
- }
- return 1;
- }
- }
- if(listitem == 11)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(ArmaSlot2[IDVehPLAYER[playerid]] != 0)
- {
- GivePlayerWeapon(playerid, ArmaSlot2[IDVehPLAYER[playerid]], AmmoSlot2[IDVehPLAYER[playerid]]);
- ArmaSlot2[IDVehPLAYER[playerid]] = 0;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- AmmoSlot2[IDVehPLAYER[playerid]] = 0;
- NomeArmSlt2[IDVehPLAYER[playerid]] = "VAZIO";
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
- }
- return 1;
- }
- }
- if(listitem == 12)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(AmmoSlot3[IDVehPLAYER[playerid]] == 0)
- {
- ArmaSlot3[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
- if(ArmaSlot3[IDVehPLAYER[playerid]] != 0)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- AmmoSlot3[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
- SetPlayerAmmo(playerid, ArmaSlot3[IDVehPLAYER[playerid]], 0);
- if(AmmoSlot3[IDVehPLAYER[playerid]] > AmmoSlot3MAX)
- {
- AmmoSlot3[IDVehPLAYER[playerid]] = 1000;
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
- }
- GetWeaponName(ArmaSlot3[IDVehPLAYER[playerid]], NomeArmSlt3[IDVehPLAYER[playerid]], sizeof(NomeArmSlt3));
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
- }
- return 1;
- }
- }
- if(listitem == 13)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(ArmaSlot3[IDVehPLAYER[playerid]] != 0)
- {
- GivePlayerWeapon(playerid, ArmaSlot3[IDVehPLAYER[playerid]], AmmoSlot3[IDVehPLAYER[playerid]]);
- ArmaSlot3[IDVehPLAYER[playerid]] = 0;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- AmmoSlot3[IDVehPLAYER[playerid]] = 0;
- NomeArmSlt3[IDVehPLAYER[playerid]] = "VAZIO";
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
- }
- return 1;
- }
- }
- if(listitem == 14)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(AmmoSlot4[IDVehPLAYER[playerid]] == 0)
- {
- ArmaSlot4[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
- if(ArmaSlot4[IDVehPLAYER[playerid]] != 0)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- AmmoSlot4[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
- SetPlayerAmmo(playerid, ArmaSlot4[IDVehPLAYER[playerid]], 0);
- if(AmmoSlot4[IDVehPLAYER[playerid]] > AmmoSlot4MAX)
- {
- AmmoSlot4[IDVehPLAYER[playerid]] = 1000;
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
- }
- GetWeaponName(ArmaSlot4[IDVehPLAYER[playerid]], NomeArmSlt4[IDVehPLAYER[playerid]], sizeof(NomeArmSlt4));
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
- }
- return 1;
- }
- }
- if(listitem == 15)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(ArmaSlot4[IDVehPLAYER[playerid]] != 0)
- {
- GivePlayerWeapon(playerid, ArmaSlot4[IDVehPLAYER[playerid]], AmmoSlot4[IDVehPLAYER[playerid]]);
- ArmaSlot4[IDVehPLAYER[playerid]] = 0;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- AmmoSlot4[IDVehPLAYER[playerid]] = 0;
- NomeArmSlt4[IDVehPLAYER[playerid]] = "VAZIO";
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
- }
- return 1;
- }
- }
- if(listitem == 16)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(AmmoSlot5[IDVehPLAYER[playerid]] == 0)
- {
- ArmaSlot5[IDVehPLAYER[playerid]] = GetPlayerWeapon(playerid);
- if(ArmaSlot5[IDVehPLAYER[playerid]] != 0)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- AmmoSlot5[IDVehPLAYER[playerid]] = GetPlayerAmmo(playerid);
- SetPlayerAmmo(playerid, ArmaSlot5[IDVehPLAYER[playerid]], 0);
- if(AmmoSlot5[IDVehPLAYER[playerid]] > AmmoSlot5MAX)
- {
- AmmoSlot5[IDVehPLAYER[playerid]] = 1000;
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite {FF0000}MÁXIMO{FFFF00} 1000 MUNIÇÕES");
- }
- GetWeaponName(ArmaSlot5[IDVehPLAYER[playerid]], NomeArmSlt5[IDVehPLAYER[playerid]], sizeof(NomeArmSlt5));
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Você não está com nenhuma {FF6600}ARMA{1E90FF} nas mãos");
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Já possui uma {FF6600}ARMA{1E90FF} neste slot!");
- }
- return 1;
- }
- }
- if(listitem == 17)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- if(ArmaSlot5[IDVehPLAYER[playerid]] != 0)
- {
- GivePlayerWeapon(playerid, ArmaSlot5[IDVehPLAYER[playerid]], AmmoSlot5[IDVehPLAYER[playerid]]);
- ArmaSlot5[IDVehPLAYER[playerid]] = 0;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- 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]]);
- SendClientMessage(playerid,0xFF0000FF, StrMalas);
- AmmoSlot5[IDVehPLAYER[playerid]] = 0;
- NomeArmSlt5[IDVehPLAYER[playerid]] = "VAZIO";
- }
- else SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} NÃO tem nenhuma {FF6600}ARMA{1E90FF} neste SLOT!");
- }
- return 1;
- }
- }
- if(listitem == 18)
- {
- ShowPlayerDialog(playerid, IdDialogTXT9, DIALOG_STYLE_PASSWORD, "{FFFF00}Porta-malas", "{FFFF00} DIGITE a {00BB00}NOVA{FFFF00} SENHA", "Próximo", "Voltar");
- }
- }
- else
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- }
- }
- if(dialogid == IdDialogTXT1)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z,PlayerMONEY;
- PlayerMONEY = GetPlayerMoney(playerid);
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- new Money = strval(inputtext);
- new Str1MSG[128],Str2MSG[128];
- if(PlayerMONEY > Money)
- {
- PTDinheiro[IDVehPLAYER[playerid]] += Money;
- if(PTDinheiro[IDVehPLAYER[playerid]] >= PTDinheiroMAX)
- {
- PTDinheiro[IDVehPLAYER[playerid]] -= Money;
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite MÁXIMO R$50.000");
- return 1;
- }
- GivePlayerMoney(playerid, -Money);
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FFFF00}COLOCOU{33CC33} R$%i {FFFF00}No Porta-mala",NameFG, Money);
- SendClientMessage(playerid,0x0000FFAA, Str1MSG);
- }
- else
- {
- format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Você NÂO tem {33CC33}R$%i{FFFF00}! {FF0000}Você TEM: {00FCFC}R$%i",Money,PlayerMONEY);
- SendClientMessage(playerid,0xFF0000FF, Str2MSG);
- }
- }
- return 1;
- }
- else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- }
- if(dialogid == IdDialogTXT2)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- new Money = strval(inputtext);
- new Str1MSG[128],Str2MSG[128];
- if(Money <= PTDinheiro[IDVehPLAYER[playerid]])
- {
- GivePlayerMoney(playerid, Money);
- PTDinheiro[IDVehPLAYER[playerid]] -= Money;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FF0000}TIROU{33CC33} R$%i {FFFF00}do Porta-mala",NameFG, Money);
- SendClientMessage(playerid,0x0000FFAA, Str1MSG);
- }
- else
- {
- format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Não tem {33CC33}R$%i{FFFF00} disponivel! {FF0000}Valor Disponivel: {00FCFC}R$%i",Money,PTDinheiro[IDVehPLAYER[playerid]]);
- SendClientMessage(playerid,0xFF0000FF, Str2MSG);
- }
- }
- return 1;
- }
- else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- }
- if(dialogid == IdDialogTXT3)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- new Float:HPx, VIDA = strval(inputtext);
- new Str1MSG[128],Str2MSG[128];
- GetPlayerHealth(playerid,HPx);
- if(HPx > VIDA)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- SetPlayerHealth(playerid,HPx-VIDA);
- PTVida[IDVehPLAYER[playerid]] += VIDA;
- if(PTVida[IDVehPLAYER[playerid]] > PTVidaMAX)
- {
- PTVida[IDVehPLAYER[playerid]] -= VIDA;
- SetPlayerHealth(playerid,HPx+VIDA);
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite MÁXIMO 400.0 HP");
- return 1;
- }
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {33CC33}COLOCOU{33CC33} %i HP {FFFF00}no Porta-mala",NameFG, VIDA);
- SendClientMessage(playerid,0x0000FFAA, Str1MSG);
- }
- else
- {
- if(HPx == VIDA)
- {
- SendClientMessage(playerid,0xFF0000FF, "[WARNING]{FFFF00} Se você tirar ESTA quantidade de {FF0000}VIDA{FFFF00}, você vai {FF0000}MORRER!");
- return 1;
- }
- format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Você NÃO tem {00FCFC}%i{FFFF00} de VIDA! {FF0000}Você TEM: {00FCFC}%f",VIDA,HPx);
- SendClientMessage(playerid,0xFF0000FF, Str2MSG);
- }
- }
- return 1;
- }
- else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- }
- if(dialogid == IdDialogTXT4)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- new Str1MSG[128],Str2MSG[128];
- new Float:HPx, VIDA = strval(inputtext);
- if(VIDA <= PTVida[IDVehPLAYER[playerid]])
- {
- if(VIDA >= 100) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Valor {FF0000}MÁXIMO{1E90FF} a ser retirado {FF0000}100");
- GetPlayerHealth(playerid,HPx);
- if(HPx+VIDA > 100){ return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Erro de calculos! Passou do {FF0000}LIMITE{00FFFF} de VIDA {FF0000}(100)"); }
- SetPlayerHealth(playerid,HPx+VIDA);
- PTVida[IDVehPLAYER[playerid]] -= VIDA;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FF0000}TIROU{33CC33} %i HP {FFFF00}do Porta-mala",NameFG, VIDA);
- SendClientMessage(playerid,0x0000FFAA, Str1MSG);
- }
- else
- {
- format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Não tem {00FCFC}%i{FFFF00} de VIDA disponivel! {FF0000}Valor Disponivel: {00FCFC}%i",VIDA,PTVida[IDVehPLAYER[playerid]]);
- SendClientMessage(playerid,0xFF0000FF, Str2MSG);
- }
- }
- return 1;
- }
- else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- return 1;
- }
- if(dialogid == IdDialogTXT5)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- new Str1MSG[128],Str2MSG[128];
- new Float:HPx, COLETE = strval(inputtext);
- GetPlayerArmour(playerid,HPx);
- if(HPx >= COLETE)
- {
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- SetPlayerArmour(playerid,HPx-COLETE);
- PTColete[IDVehPLAYER[playerid]] += COLETE;
- if(PTColete[IDVehPLAYER[playerid]] > PTColeteMAX)
- {
- PTColete[IDVehPLAYER[playerid]] -= COLETE;
- SetPlayerArmour(playerid,HPx+COLETE);
- SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{FFFF00} Limite MÁXIMO 400.0 COLETE");
- return 1;
- }
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {33CC33}COLOCOU{33CC33} %i COLETE {FFFF00}no Porta-mala",NameFG, COLETE);
- SendClientMessage(playerid,0x0000FFAA, Str1MSG);
- }
- else
- {
- format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Você NÃO tem {00FCFC}%i{FFFF00} de COLETE! {FF0000}Você TEM: {00FCFC}%f",COLETE,HPx);
- SendClientMessage(playerid,0xFF0000FF, Str2MSG);
- }
- }
- return 1;
- }
- else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- }
- if(dialogid == IdDialogTXT6)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- {
- new Float:HPx, COLETE = strval(inputtext);
- new Str1MSG[128],Str2MSG[128];
- if(COLETE <= PTColete[IDVehPLAYER[playerid]])
- {
- if(COLETE > 100) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Valor {FF0000}MÁXIMO{1E90FF} a ser retirado {FF0000}100");
- GetPlayerArmour(playerid,HPx);
- if(HPx+COLETE > 100){ return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Erro de calculos! Passou do {FF0000}LIMITE{00FFFF} de COLETE {FF0000}(100)"); }
- SetPlayerArmour(playerid,HPx+COLETE);
- PTColete[IDVehPLAYER[playerid]] -= COLETE;
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
- GetPlayerName(playerid, NameFG, MAX_PLAYER_NAME);
- format(Str1MSG, sizeof(Str1MSG), "{FF0000}[INFO:] %s {FF0000}TIROU{33CC33} %i COLETE {FFFF00}do Porta-mala",NameFG, COLETE);
- SendClientMessage(playerid,0x0000FFAA, Str1MSG);
- }
- else
- {
- format(Str2MSG, sizeof(Str2MSG), "[ERRO]{FFFF00} Não tem {00FCFC}%i{FFFF00} de COLETE disponivel! {FF0000}Valor Disponivel: {00FCFC}%i",COLETE,PTColete[IDVehPLAYER[playerid]]);
- SendClientMessage(playerid,0xFF0000FF, Str2MSG);
- }
- }
- return 1;
- }
- else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- }
- if(dialogid == IdDialogTXT9)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z, Str2MSG[128];
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- SenhaMALA[IDVehPLAYER[playerid]] = strval(inputtext);
- SenhON[IDVehPLAYER[playerid]] = 1;
- ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- format(Str2MSG, 50,inputtext);
- SendClientMessage(playerid,0xFFFF00FF, Str2MSG);
- return 1;
- }
- else ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- }
- if(dialogid == IdDialogTXT10)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ERRO]{1E90FF} Não pode usar este {FF0000}COMANDO{1E90FF} de dentro do CARRO");
- new Float:x, Float:y, Float:z;
- GetVehiclePos(IDVehPLAYER[playerid],x, y, z);
- if(!IsPlayerInRangeOfPoint(playerid, 4, x, y, z)) return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{00FFFF} Você não está perto deste CARRO");
- if(SenhaMALA[IDVehPLAYER[playerid]] != strval(inputtext)){return SendClientMessage(playerid,0xFF0000FF,"[WARNING]{FF0000} Você DIGITOU a SENHA {FF0000}ERRADA!");}
- new mot, lu, alar, por, cap, porma, ob;
- GetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, porma, ob);
- SetVehicleParamsEx(IDVehPLAYER[playerid], mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob);
- ShowPlayerDialog(playerid, DialogMALA, DIALOG_STYLE_LIST , "{FF0000}[Porta-malas]{1E90FF} Do Veiculo", DialoPMz, "Próximo", "Cancelar");
- return 1;
- }
- }
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- PTVida[vehicleid] = 0;
- PTColete[vehicleid] = 0;
- PTDinheiro[vehicleid] = 0;
- SenhON[vehicleid] = 0;
- AmmoSlot1[vehicleid] = 0, ArmaSlot1[vehicleid] = 0;
- AmmoSlot2[vehicleid] = 0, ArmaSlot2[vehicleid] = 0;
- AmmoSlot3[vehicleid] = 0, ArmaSlot3[vehicleid] = 0;
- AmmoSlot4[vehicleid] = 0, ArmaSlot4[vehicleid] = 0;
- AmmoSlot5[vehicleid] = 0, ArmaSlot5[vehicleid] = 0;
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- SenhON[vehicleid] = 0;
- /* PTVida[vehicleid] = 0;
- PTColete[vehicleid] = 0;
- PTDinheiro[vehicleid] = 0;
- AmmoSlot1[vehicleid] = 0, ArmaSlot1[vehicleid] = 0;
- AmmoSlot2[vehicleid] = 0, ArmaSlot2[vehicleid] = 0;
- AmmoSlot3[vehicleid] = 0, ArmaSlot3[vehicleid] = 0;
- AmmoSlot4[vehicleid] = 0, ArmaSlot4[vehicleid] = 0;
- AmmoSlot5[vehicleid] = 0, ArmaSlot5[vehicleid] = 0;*/
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement