Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BPS::RemovePlayerAttachedObjectEx(playerid,SlotReal)
- {
- if(ItemSlotA[playerid][SlotReal] != -1)
- {
- if(ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Aureola1 && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Aureola2
- && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Celular && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Roubo
- && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Radio && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Pa
- && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Maconha && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Escudo
- && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Planta && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Corrente
- && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Ejetar && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Ejetar2
- && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Escudo && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Colete
- && ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] != Vaga_Taser)
- {
- if(IsAItem(playerid,SlotDItem[playerid][ItemSlotA[playerid][SlotReal]],0))
- {
- if(TipoItem[playerid] != 0)
- {
- itemnamochila(playerid,SlotDItem[playerid][ItemSlotA[playerid][SlotReal]]);
- }
- }
- }
- RemovePlayerAttachedObject(playerid, ItemSlotA[playerid][SlotReal]);
- ItemSlotP[playerid][ItemSlotA[playerid][SlotReal]] = -1;
- SlotDItem[playerid][ItemSlotA[playerid][SlotReal]] = -1;
- ObjectLoad[playerid][ItemSlotA[playerid][SlotReal]][Objindexid2] = 0;
- ItemSlotA[playerid][SlotReal] = -1;
- }
- }
- //Sistema de guardar armas na mochila
- new Selected[MAX_PLAYERS][3];
- new Text:avisoMochila;
- ShowMochila(playerid, bag){
- new Str[45];
- format(Str, 45, "LD_SPAC:power");
- PlayerTextDrawSetString(playerid, moListBox1[playerid], Str);
- format(Str, 45, "LD_SPAC:power");
- PlayerTextDrawSetString(playerid, moListBox2[playerid], Str);
- format(Str, 45, "LD_SPAC:power");
- PlayerTextDrawSetString(playerid, moListBox3[playerid], Str);
- format(Str, 45, "LD_SPAC:power");
- PlayerTextDrawSetString(playerid, moListBox4[playerid], Str);
- switch(bag)
- {
- case 4:{ }
- case 3:
- {
- format(Str, 45, "LD_SPAC:Health");
- PlayerTextDrawSetString(playerid, moListBox4[playerid], Str);
- }
- case 2:
- {
- format(Str, 45, "LD_SPAC:Health");
- PlayerTextDrawSetString(playerid, moListBox3[playerid], Str);
- format(Str, 45, "LD_SPAC:Health");
- PlayerTextDrawSetString(playerid, moListBox4[playerid], Str);
- }
- default:
- {
- format(Str, 45, "LD_SPAC:Health");
- PlayerTextDrawSetString(playerid, moListBox2[playerid], Str);
- format(Str, 45, "LD_SPAC:Health");
- PlayerTextDrawSetString(playerid, moListBox3[playerid], Str);
- format(Str, 45, "LD_SPAC:Health");
- PlayerTextDrawSetString(playerid, moListBox4[playerid], Str);
- }
- }
- //PlayerTextDrawShow(playerid, moBox1[playerid]);
- PlayerTextDrawShow(playerid, moBox2[playerid]);
- PlayerTextDrawShow(playerid, moBox3[playerid]);
- PlayerTextDrawShow(playerid, moBox4[playerid]);
- PlayerTextDrawShow(playerid, moListBox1[playerid]);
- PlayerTextDrawShow(playerid, moListBox2[playerid]);
- PlayerTextDrawShow(playerid, moListBox3[playerid]);
- PlayerTextDrawShow(playerid, moListBox4[playerid]);
- PlayerTextDrawShow(playerid, moList1[playerid]);
- PlayerTextDrawShow(playerid, moList2[playerid]);
- PlayerTextDrawShow(playerid, moList3[playerid]);
- PlayerTextDrawShow(playerid, moList4[playerid]);
- for(new x=1; x <= 12; x++)
- {
- PlayerTextDrawSetPreviewModel(playerid, moPrev[playerid][x], getidxModelSlot(playerid, x));
- PlayerTextDrawShow(playerid, moPrev[playerid][x]);
- }
- PlayerTextDrawShow(playerid, moMsg[playerid]);
- PlayerTextDrawSetPreviewModel(playerid, moEquipPrev[playerid], 5699);
- PlayerTextDrawShow(playerid, moEquipPrev[playerid]);
- PlayerTextDrawShow(playerid, moArma[playerid]);
- PlayerTextDrawShow(playerid, moBalas[playerid]);
- PlayerTextDrawShow(playerid, moUse[playerid]);
- PlayerTextDrawShow(playerid, moUseBox[playerid]);
- PlayerTextDrawShow(playerid, moExit[playerid]);
- PlayerTextDrawShow(playerid, moInfo[playerid]);
- PlayerTextDrawShow(playerid, moInfoBox[playerid]);
- PlayerTextDrawShow(playerid, moHelp[playerid]);
- PlayerTextDrawShow(playerid, moCr[playerid]);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- SelectTextDraw(playerid, 0xAAAAAAFF);
- SetPVarInt(playerid, "vMochila", 1);
- }
- //---------------------------------------------------
- HideMochila(playerid){
- // PlayerTextDrawHide(playerid, moBox1[playerid]);
- PlayerTextDrawHide(playerid, moBox2[playerid]);
- PlayerTextDrawHide(playerid, moBox3[playerid]);
- PlayerTextDrawHide(playerid, moBox4[playerid]);
- PlayerTextDrawHide(playerid, moListBox1[playerid]);
- PlayerTextDrawHide(playerid, moListBox2[playerid]);
- PlayerTextDrawHide(playerid, moListBox3[playerid]);
- PlayerTextDrawHide(playerid, moListBox4[playerid]);
- PlayerTextDrawHide(playerid, moList1[playerid]);
- PlayerTextDrawHide(playerid, moList2[playerid]);
- PlayerTextDrawHide(playerid, moList3[playerid]);
- PlayerTextDrawHide(playerid, moList4[playerid]);
- for(new x=1; x <= 12; x++)
- {
- PlayerTextDrawHide(playerid, moPrev[playerid][x]);
- }
- PlayerTextDrawHide(playerid, moMsg[playerid]);
- PlayerTextDrawHide(playerid, moEquipPrev[playerid]);
- PlayerTextDrawHide(playerid, moArma[playerid]);
- PlayerTextDrawHide(playerid, moBalas[playerid]);
- PlayerTextDrawHide(playerid, moUse[playerid]);
- PlayerTextDrawHide(playerid, moUseBox[playerid]);
- PlayerTextDrawHide(playerid, moExit[playerid]);
- PlayerTextDrawHide(playerid, moInfo[playerid]);
- PlayerTextDrawHide(playerid, moInfoBox[playerid]);
- PlayerTextDrawHide(playerid, moHelp[playerid]);
- PlayerTextDrawHide(playerid, moCr[playerid]);
- CancelSelectTextDraw(playerid);
- SetPVarInt(playerid, "vMochila", 0);
- }
- //------------------------------------------------------
- stock atualizarMochila(playerid,inv)
- {
- new Str[45],y;
- format(Str, 45, "I");
- PlayerTextDrawSetString(playerid, moList1[playerid], Str);
- format(Str, 45, "II");
- PlayerTextDrawSetString(playerid, moList2[playerid], Str);
- format(Str, 45, "III");
- PlayerTextDrawSetString(playerid, moList3[playerid], Str);
- format(Str, 45, "IV");
- PlayerTextDrawSetString(playerid, moList4[playerid], Str);
- switch(inv)
- {
- case 1:
- {
- format(Str, 45, "~y~I");
- PlayerTextDrawSetString(playerid, moList1[playerid], Str);
- for(new x=1; x <= 12; x++)
- {
- PlayerTextDrawSetPreviewModel(playerid, moPrev[playerid][x], getidxModelSlot(playerid, x));
- PlayerTextDrawShow(playerid, moPrev[playerid][x]);
- }
- Inventario[playerid] = 1;
- return 1;
- }
- case 2:
- {
- format(Str, 45, "~y~II");
- PlayerTextDrawSetString(playerid, moList2[playerid], Str);
- for(new x=13; x <= 24; x++)
- {
- y = x-12;
- PlayerTextDrawSetPreviewModel(playerid, moPrev[playerid][y], getidxModelSlot(playerid, x));
- PlayerTextDrawShow(playerid, moPrev[playerid][y]);
- }
- Inventario[playerid] = 2;
- return 1;
- }
- case 3:
- {
- format(Str, 45, "~y~III");
- PlayerTextDrawSetString(playerid, moList3[playerid], Str);
- for(new x=25; x <= 36; x++)
- {
- y = x-24;
- PlayerTextDrawSetPreviewModel(playerid, moPrev[playerid][y], getidxModelSlot(playerid, x));
- PlayerTextDrawShow(playerid, moPrev[playerid][y]);
- }
- Inventario[playerid] = 3;
- return 1;
- }
- case 4:
- {
- format(Str, 45, "~y~IV");
- PlayerTextDrawSetString(playerid, moList4[playerid], Str);
- for(new x=37; x < MAX_ITEMS; x++)
- {
- y = x-36;
- PlayerTextDrawSetPreviewModel(playerid, moPrev[playerid][y], getidxModelSlot(playerid, x));
- PlayerTextDrawShow(playerid, moPrev[playerid][y]);
- }
- Inventario[playerid] = 4;
- return 1;
- }
- }
- return 0;
- }
- if(clickedid == Text:INVALID_TEXT_DRAW){
- if(GetPVarInt(playerid, "vMochila")){
- HideMochila(playerid);
- }
- if(GetPVarInt(playerid, "vportamala") && !GetPVarInt(playerid, "guardando")){
- HidePortaMala(playerid);
- }
- }
- if(GetPVarInt(playerid, "skinc_active") == 0) return 0;
- // Handle: They cancelled (with ESC)
- if(clickedid == Text:INVALID_TEXT_DRAW) {
- DestroySelectionMenu(playerid);
- SetPVarInt(playerid, "skinc_active", 0);
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- return 1;
- }
- return 1;
- }
- //----------------------------------------------------------
- dialogGuardar(playerid){
- ShowPlayerDialog(playerid, 305, DIALOG_STYLE_MSGBOX, " ",
- "{00CCFF} Você quer guardar uma arma neste slot?\n\
- {00CCFF} OBS: Você precisa ter uma arma com você!",
- "Sim", "Voltar");
- SetPVarInt(playerid, "guardando", 1);
- CancelSelectTextDraw(playerid);
- }
- //-------------------------------------------------------
- dialogGuardarPM(playerid){
- ShowPlayerDialog(playerid, 307, DIALOG_STYLE_MSGBOX, " ",
- "{00CCFF} Você quer guardar uma arma neste slot?\n\
- {00CCFF} OBS: Você precisa ter uma arma com você!",
- "Sim", "Voltar");
- SetPVarInt(playerid, "guardando", 1);
- CancelSelectTextDraw(playerid);
- }
- //-------------------------------------------------------
- dialogHelp(playerid){
- MEGAString[0]=EOS;
- strcat(MEGAString, "{FFFFFF} Sistema de Inventário onde você pode\n");
- strcat(MEGAString, "{FFFFFF} guardar, pegar ou descartar suas armas ou itens\n\n");
- strcat(MEGAString, "{FFFFFF}x{A0A0A0} Para usar/guardar uma arma/item, selecione ela e vá em ''usar'' e coloque usar/guardar\n");
- strcat(MEGAString, "{FFFFFF}x{A0A0A0} Para descartar uma arma, selecione ela e vá em ''usar'' e coloque dropar\n");
- ShowPlayerDialog(playerid, 8724, DIALOG_STYLE_MSGBOX, "Ajuda Inventario", MEGAString, "Informado","");
- }
- //------------------------------------------------------
- countWeapons(playerid){
- new count, weap, ammo;
- for(new x = 1; x != 13; x++){
- GetPlayerWeaponData(playerid, x, weap, ammo);
- if(weap && ammo){
- count++;
- }
- }
- return count;
- }
- //------------------------------------------------------
- dialogArmas(playerid){
- if(!countWeapons(playerid))
- return SendClientMessage(playerid, COLOR_YELLOW, "*Você não tem uma arma com você."), CancelSelectTextDraw(playerid),SelectTextDraw(playerid, 0xAAAAAAFF);
- new Str[95],
- weap,
- ammo;
- MEGAString[0] = EOS;
- for(new x = 1; x != 13; x++){
- GetPlayerWeaponData(playerid, x, weap, ammo);
- if(weap && ammo){
- format(Str, 95, "{FFFFFF}Arma: {A0A0A0}%s {FFFFFF}Balas: {A0A0A0}%03d\n", GunNames[weap], ammo);
- strcat(MEGAString, Str);
- }else{
- strcat(MEGAString, "{FFFFFF}Arma: {A0A0A0}-------- {FFFFFF}Balas: {A0A0A0}---\n");
- }
- }
- ShowPlayerDialog(playerid, 306, DIALOG_STYLE_LIST, "Escolha a arma para guardar", MEGAString, "Guardar", "Sair");
- return 1;
- }
- dialogArmasPM(playerid){
- if(!countWeapons(playerid))
- return SendClientMessage(playerid, COLOR_YELLOW, "*Você não tem uma arma com você."), SelectTextDraw(playerid, 0xAAAAAAFF);
- new Str[95],
- weap,
- ammo;
- MEGAString[0] = EOS;
- for(new x = 1; x != 13; x++){
- GetPlayerWeaponData(playerid, x, weap, ammo);
- if(weap && ammo){
- format(Str, 95, "{FFFFFF}Arma: {A0A0A0}%s {FFFFFF}Balas: {A0A0A0}%03d\n", GunNames[weap], ammo);
- strcat(MEGAString, Str);
- }else{
- strcat(MEGAString, "{FFFFFF}Arma: {A0A0A0}-------- {FFFFFF}Balas: {A0A0A0}---\n");
- }
- }
- ShowPlayerDialog(playerid, 308, DIALOG_STYLE_LIST, "Escolha a arma para guardar", MEGAString, "Guardar", "Sair");
- return 1;
- }
- stock RemoveVendingMachines(playerid)
- {
- // Remove 24/7 machines
- RemoveBuildingForPlayer(playerid, 1776, -33.8750, -186.7656, 1003.6328, 0.25);
- RemoveBuildingForPlayer(playerid, 1775, -32.4453, -186.6953, 1003.6328, 0.25);
- // Remove all other machines
- for(new i = 0; i < 43; i++)
- {
- RemoveBuildingForPlayer(playerid, 955, VMachines[i][0], VMachines[i][1], VMachines[i][2], 0.50);
- RemoveBuildingForPlayer(playerid, 956, VMachines[i][0], VMachines[i][1], VMachines[i][2], 0.50);
- }
- return 1;
- }
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) {
- if(GetPVarInt(playerid, "vMochila")){
- for(new x = 1; x <= 12; x++){
- if(playertextid == moPrev[playerid][x]) {
- if(Inventario[playerid] == 2) x = x+12;
- if(Inventario[playerid] == 3) x = x+24;
- if(Inventario[playerid] == 4) x = x+36;
- if(x != MAX_ITEMS) {
- if(ArmasGuardadas[playerid][x] < 1 && ItemID[playerid][x] == 0){
- //dialogGuardar(playerid);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = x;
- setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- ///SendClientMessage(playerid, COLOR_LIGHTRED, "* Não tem uma arma nesse slot!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- return 1;
- }
- /*if(ItemID[playerid][x] == 1252 && PlayerInfo[playerid][pExplosivos] < 1)
- {
- ItemID[playerid][x] = 0;
- }*/
- if(ItemID[playerid][x] > 0) {
- Selected[playerid][0] = ItemID[playerid][x];
- if(IsAItem(playerid,Selected[playerid][0],0))
- Selected[playerid][1] = 1;
- else
- Selected[playerid][1] = 0;
- /*if(ItemID[playerid][x] == 1252)
- {
- Selected[playerid][1] = PlayerInfo[playerid][pExplosivos];
- }*/
- Selected[playerid][2] = x;
- RotateTipItem(playerid,x);
- setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- return 1;
- }
- else {
- PlayerTextDrawSetPreviewRot(playerid, moEquipPrev[playerid], 180.000000, 160.000000, 360.000000, 2.099999);
- PlayerTextDrawSetPreviewModel(playerid, moEquipPrev[playerid], getidxModelSlot(playerid, x));
- PlayerTextDrawShow(playerid, moEquipPrev[playerid]);
- Selected[playerid][0] = ArmasGuardadas[playerid][x];
- if(IsAItem(playerid,Selected[playerid][0],0)) {
- Selected[playerid][0] = ArmasGuardadas[playerid][x];
- Selected[playerid][1] = BalasGuardadas[playerid][x];
- Selected[playerid][2] = x;
- }
- setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- }
- }
- if(playertextid == moInfo[playerid]){
- //nova info do item em breve
- }
- else if(playertextid == moUse[playerid]) {
- ShowPlayerDialog(playerid, Dialog_Mouse, DIALOG_STYLE_LIST, \
- "{FFFFFF}Opçoes do Item",
- "Usar/Guardar\n\
- Dropar",
- "Selecionar", "Cancelar");
- }
- else if(playertextid == moHelp[playerid]){
- dialogHelp(playerid);
- }
- else if(playertextid == moListBox1[playerid]){
- if(PlayerInfo[playerid][pMochila] >= 1) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,1);
- }
- }
- else if(playertextid == moListBox2[playerid]){
- if(PlayerInfo[playerid][pMochila] > 1) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,2);
- }
- else {
- SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Média para usar Este Inventório");
- }
- }
- else if(playertextid == moListBox3[playerid]){
- if(PlayerInfo[playerid][pMochila] > 2) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,3);
- }
- else
- SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Grande para usar Este Inventório");
- }
- else if(playertextid == moListBox4[playerid]){
- if(PlayerInfo[playerid][pMochila] > 3) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,4);
- }
- else
- SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Gigante para usar Este Inventório");
- }
- else if(playertextid == moExit[playerid]){
- HideMochila(playerid);
- }
- }
- if(GetPVarInt(playerid, "vportamala")){
- for(new x = 1; x != MAX_TRUNK_SLOTS; x++){
- if(playertextid == pmPrev[playerid][x]){
- if(vehTrunk[VeiculoPortaM[playerid]][x] < 1) {
- dialogGuardarPM(playerid);
- Selected[playerid][2] = x;
- ///SendClientMessage(playerid, COLOR_LIGHTRED, "* Não tem uma arma nesse slot!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- return 1;
- }
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], getidxPMModelSlot(VeiculoPortaM[playerid], x));
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = vehTrunk[VeiculoPortaM[playerid]][x];
- Selected[playerid][1] = vehTrunkAmmo[VeiculoPortaM[playerid]][x];
- Selected[playerid][2] = x;
- setweaponpmNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- if(playertextid == pmPrev[playerid][8]) {
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1242);
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = VeiculoPortaM[playerid];
- setItenpmNome(playerid, 8, Selected[playerid][0]);
- Selected[playerid][2] = 8;
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- }
- if(playertextid == pmPrev[playerid][9])
- {
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1279);
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = VeiculoPortaM[playerid];
- setItenpmNome(playerid, 9, Selected[playerid][0]);
- Selected[playerid][2] = 9;
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- }
- if(playertextid == pmPrev[playerid][10])
- {
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1579);
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = VeiculoPortaM[playerid];
- setItenpmNome(playerid, 10, Selected[playerid][0]);
- Selected[playerid][2] = 10;
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- }
- if(playertextid == pmDescart[playerid])
- {
- new thestring[128];
- new result = VeiculoPortaM[playerid];
- if(Selected[playerid][2] == 8)
- {
- if(GetPlayerArmourEx(playerid) > 0)
- {
- if(vehTrunkArmour[result] >= 500.000) return SendClientMessage(playerid, COLOR_GRAD1, " Seu Porta-malas só suporta 5 Coletes!");
- vehTrunkArmour[result] += GetPlayerArmourEx(playerid);
- SetPlayerArmour(playerid, 0);
- format(thestring, sizeof(thestring), "%s tirou o colete e colocou no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 8, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum colete ");
- }
- else if(Selected[playerid][2] == 9)
- {
- if(PlayerInfo[playerid][pDrogas] != 0)
- {
- vehTrunkDroga[result] += PlayerInfo[playerid][pDrogas];
- PlayerInfo[playerid][pDrogas] = 0;
- format(thestring, sizeof(thestring), "%s colocou todas sua Maconha no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 9, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhuma droga para por no porta-malas.");
- }
- else if(Selected[playerid][2] == 10)
- {
- if(PlayerInfo[playerid][pMats] != 0)
- {
- vehTrunkMaterial[result] += PlayerInfo[playerid][pMats];
- PlayerInfo[playerid][pMats] = 0;
- format(thestring, sizeof(thestring), "%s colocou todos seus materiais no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 10, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum material para por no porta-malas.");
- }
- }
- else if(playertextid == pmEquip[playerid])
- {
- new thestring[128];
- new result = VeiculoPortaM[playerid];
- if(Selected[playerid][2] == 8)
- {
- if(vehTrunkArmour[result] >= 100.000)
- {
- vehTrunkArmour[result] -= 100.000;
- SetPlayerArmour(playerid, 100);
- format(thestring, sizeof(thestring), "%s Pegou um colete que estava no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 8, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Seu Porta-malas está sem Colete suficiente para lhe dar.");
- }
- else if(Selected[playerid][2] == 9)
- {
- if(vehTrunkDroga[result] > 0)
- {
- PlayerInfo[playerid][pDrogas] += vehTrunkDroga[result];
- vehTrunkDroga[result] = 0;
- format(thestring, sizeof(thestring), "%s pegou toda sua Maconha no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 9, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhuma droga para pegar no porta-malas.");
- }
- else if(Selected[playerid][2] == 10) {
- if(vehTrunkMaterial[result] > 0) {
- PlayerInfo[playerid][pMats] += vehTrunkMaterial[result];
- vehTrunkMaterial[result] = 0;
- format(thestring, sizeof(thestring), "%s pegou todo seus material no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 10, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum material para pegar no porta-malas.");
- }
- else if(Selected[playerid][0])
- {
- new string[85];
- GivePlayerWeapon(playerid, Selected[playerid][0], Selected[playerid][1]);
- format(string, sizeof string, "Você pegou uma arma %s com %d balas!",NomeArma(Selected[playerid][0]),vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]]);
- SendClientMessage(playerid, COLOR_R, string);
- Sound(playerid, 36401, 30.0);
- format(string, sizeof(string), "* %s pegou uma arma do Porta Malas", NomeArma(Selected[playerid][0]));
- SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- vehTrunk[VeiculoPortaM[playerid]][Selected[playerid][2]] = 0;
- vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]] = 0;
- atualizarPortaMala(playerid);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponpmNome(playerid, 0, 0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "* Você ainda não selecionou uma arma!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- }
- else if(playertextid == pmHelp[playerid]){
- dialogHelp(playerid);
- }
- else if(playertextid == pmExit[playerid]){
- HidePortaMala(playerid);
- }
- }
- CMD:mochila(playerid, params[])
- {
- if (!gPlayerLogged[playerid])
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não está logado !");
- if(PlayerInfo[playerid][pJailed] == 9) {
- SendClientMessage(playerid,COLOR_GRAD1," Você não pode usar este comando nas Celas da Administração!");
- return true;
- }
- if(!GetPVarInt(playerid, "vMochila")){
- new string[128];
- format(string, sizeof(string), "* %s abriu sua mochila!", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- ShowMochila(playerid, PlayerInfo[playerid][pMochila]);
- Sound(playerid, 1039, 30.0);
- new Str[45];
- format(Str, 45, "~y~I");
- PlayerTextDrawSetString(playerid, moList1[playerid], Str);
- format(Str, 45, "II");
- PlayerTextDrawSetString(playerid, moList2[playerid], Str);
- format(Str, 45, "III");
- PlayerTextDrawSetString(playerid, moList3[playerid], Str);
- format(Str, 45, "IV");
- PlayerTextDrawSetString(playerid, moList4[playerid], Str);
- Inventario[playerid] = 1;
- }
- else
- HideMochila(playerid);
- return true;
- }
- if(dialogid == 306){
- SelectTextDraw(playerid, 0xAAAAAAFF);
- if(response){
- new weap, ammo;
- GetPlayerWeaponData(playerid, listitem + 1, weap, ammo);
- if(ammo < 1)
- return CancelSelectTextDraw(playerid), SendClientMessage(playerid, COLOR_YELLOW, "*Esta arma é inválida!"), dialogArmas(playerid);
- ArmasGuardadas[playerid][Selected[playerid][2]] = weap;
- BalasGuardadas[playerid][Selected[playerid][2]] = ammo;
- format(string, sizeof string, "Você guardou uma arma %s com %d balas no slot: %d. Para pegar use: /mochila", NomeItemID(ArmasGuardadas[playerid][Selected[playerid][2]]),BalasGuardadas[playerid][Selected[playerid][2]], Selected[playerid][2]);
- SendClientMessage(playerid, COLOR_R, string);
- RemovePlayerWeapon(playerid, weap);
- format(string, sizeof(string), "* %s guardou um(a) %s em sua mochila", NomePlayer(playerid), NomeItemID(ArmasGuardadas[playerid][Selected[playerid][2]]));
- SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- SetPVarInt(playerid, "guardando", 0);
- HideMochila(playerid);
- }
- else{
- SetPVarInt(playerid, "guardando", 0);
- }
- }
- if(dialogid == 305){
- if(response){
- dialogArmas(playerid);
- }else{
- SetPVarInt(playerid, "guardando", 0);
- SelectTextDraw(playerid, 0xAAAAAAFF);
- }
- }
- if(dialogid == 307){
- if(response){
- dialogArmasPM(playerid);
- }else{
- SetPVarInt(playerid, "guardando", 0);
- SelectTextDraw(playerid, 0xAAAAAAFF);
- }
- }
- if(dialogid == 308){
- SelectTextDraw(playerid, 0xAAAAAAFF);
- if(response){
- new weap, ammo;
- GetPlayerWeaponData(playerid, listitem + 1, weap, ammo);
- if(ammo < 1)
- return CancelSelectTextDraw(playerid), SendClientMessage(playerid, COLOR_YELLOW, "*Esta arma é inválida!"), dialogArmasPM(playerid);
- vehTrunk[VeiculoPortaM[playerid]][Selected[playerid][2]] = weap;
- vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]] = ammo;
- format(string, sizeof string, "Você guardou uma arma %s com %d balas no slot: %d. Para pegar vá ao Porta-Malas.", NomeArma(weap),vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]], Selected[playerid][2]);
- SendClientMessage(playerid, COLOR_R, string);
- RemovePlayerWeapon(playerid, weap);
- format(string, sizeof(string), "* %s guardou um(a) %s no Porta Malas de Seu Veiculo.", NomePlayer(playerid), NomeArma(weap));
- SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- SetPVarInt(playerid, "guardando", 0);
- atualizarPortaMala(playerid);
- }
- else{
- SetPVarInt(playerid, "guardando", 0);
- }
- }
- {
- equiparitem(playerid,Selected[playerid][0],Selected[playerid][2]);
- if(TipoItem[playerid] == 0) return 1;
- if(SlotCheio[playerid] == 1) { SlotCheio[playerid] = 0; return 1; }
- setweaponNome(playerid, 0, 0);
- HideMochila(playerid);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF, "Você Colocou Seu Item no Corpo!");
- EditAttachedObject(playerid, ultimoSlotEQ[playerid]);
- return 1;
- }
- }
- else if(IsAArma(playerid,Selected[playerid][2]))
- {
- GivePlayerWeapon(playerid, Selected[playerid][0], Selected[playerid][1]);
- format(string, sizeof string, "Você pegou uma arma %s com %d balas!",NomeItem(playerid,TipoItem[playerid]),BalasGuardadas[playerid][Selected[playerid][2]]);
- SendClientMessage(playerid, COLOR_R, string);
- Sound(playerid, 36401, 30.0);
- format(string, sizeof(string), "* %s pegou uma arma da mochila", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- ArmasGuardadas[playerid][Selected[playerid][2]] = 0;
- BalasGuardadas[playerid][Selected[playerid][2]] = 0;
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponNome(playerid, 0, 0);
- atualizarMochila(playerid,Inventario[playerid]);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "•• {FFFFFF}ITEM DESCONHECIDO retirado do inventario, Aguarde ele ser liberado em uma LOJA de Acessórios.");
- ItemID[playerid][Selected[playerid][2]] = 0;
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponNome(playerid, 0, 0);
- atualizarMochila(playerid,Inventario[playerid]);
- return 1;
- }
- }
- else{
- dialogGuardar(playerid);
- //SendClientMessage(playerid, COLOR_LIGHTRED, "* Você ainda não selecionou uma arma!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- }
- else if(listitem == 1) //descartar
- {
- /*if(PlayerInfo[playerid][ComExplosivo] || ItemID[playerid][Selected[playerid][2]] == 1252)
- {
- descartarBomba(playerid,1252);
- //ForT:guardarexplosivo(playerid);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponNome(playerid, 1252, PlayerInfo[playerid][pExplosivos]);
- return 1;
- }*/
- if(Selected[playerid][0] > 47)
- {
- descartarItem(playerid,Selected[playerid][2]);
- PlayerTextDrawSetPreviewModel(playerid, moPrev[playerid][Selected[playerid][2]], getidxModelSlot(playerid, 0));
- PlayerTextDrawShow(playerid, moPrev[playerid][Selected[playerid][2]]);
- atualizarMochila(playerid,Inventario[playerid]);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponNome(playerid, 0, 0);
- return 1;
- }
- if(Selected[playerid][0]){
- //if(TempDropArmas[playerid] < 30) return SendClientMessage(playerid, COLOR_LIGHTRED, "* Você só pode dropar armas após ficar um bom tempo Online!");
- descartarArma(playerid, Selected[playerid][2]);
- PlayerTextDrawSetPreviewModel(playerid, moPrev[playerid][Selected[playerid][2]], getidxModelSlot(playerid, 0));
- PlayerTextDrawShow(playerid, moPrev[playerid][Selected[playerid][2]]);
- atualizarMochila(playerid,Inventario[playerid]);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponNome(playerid, 0, 0);
- }
- else{
- SendClientMessage(playerid, COLOR_LIGHTRED, "* Você ainda não selecionou um Item!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- }
- }
- else
- {
- HideMochila(playerid);
- }
- return 1;
- }
- BPS:: hideAviso(playerid)
- {
- TextDrawHideForPlayer(playerid, avisoMochila);
- if( CarregandoI[playerid] < 1) { carregarObjetos(playerid); CarregandoI[playerid]++; }
- }
- BPS::itemnamochila(playerid,itemid)
- {
- new x;
- for(x=1; x < MAX_ITEMS; x++)
- {
- if(ArmasGuardadas[playerid][x] <= 0)
- {
- if(ItemID[playerid][x] <= 0)
- {
- if(x >= 13 && PlayerInfo[playerid][pMochila] < 2)
- {
- InvCheio[playerid] = 1;
- x = MAX_ITEMS-1;
- SendClientMessage(playerid, COLOR_GRAD4, "Seu Inventário está cheio.Não pode receber o item.");
- }
- else if(x >= 25 && PlayerInfo[playerid][pMochila] < 3)
- {
- InvCheio[playerid] = 1;
- x = MAX_ITEMS-1;
- SendClientMessage(playerid, COLOR_GRAD4, "Seu Inventário está cheio.Não pode receber o item.");
- }
- else if(x >= 37 && PlayerInfo[playerid][pMochila] < 4)
- {
- InvCheio[playerid] = 1;
- x = MAX_ITEMS-1;
- SendClientMessage(playerid, COLOR_GRAD4, "Seu Inventário está cheio.Não pode receber o item.");
- }
- else
- {
- ItemID[playerid][x] = itemid;
- break;
- }
- }
- }
- if(x == MAX_ITEMS-1 && InvCheio[playerid] == 0)
- {
- InvCheio[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD4, "Seu Inventário está cheio.Não pode receber o item.");
- }
- }
- }
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) {
- if(GetPVarInt(playerid, "vMochila")){
- for(new x = 1; x <= 12; x++){
- if(playertextid == moPrev[playerid][x]) {
- if(Inventario[playerid] == 2) x = x+12;
- if(Inventario[playerid] == 3) x = x+24;
- if(Inventario[playerid] == 4) x = x+36;
- if(x != MAX_ITEMS) {
- if(ArmasGuardadas[playerid][x] < 1 && ItemID[playerid][x] == 0){
- //dialogGuardar(playerid);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = x;
- setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- ///SendClientMessage(playerid, COLOR_LIGHTRED, "* Não tem uma arma nesse slot!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- return 1;
- }
- /*if(ItemID[playerid][x] == 1252 && PlayerInfo[playerid][pExplosivos] < 1)
- {
- ItemID[playerid][x] = 0;
- }*/
- if(ItemID[playerid][x] > 0) {
- Selected[playerid][0] = ItemID[playerid][x];
- if(IsAItem(playerid,Selected[playerid][0],0))
- Selected[playerid][1] = 1;
- else
- Selected[playerid][1] = 0;
- /*if(ItemID[playerid][x] == 1252)
- {
- Selected[playerid][1] = PlayerInfo[playerid][pExplosivos];
- }*/
- Selected[playerid][2] = x;
- RotateTipItem(playerid,x);
- setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- return 1;
- }
- else {
- PlayerTextDrawSetPreviewRot(playerid, moEquipPrev[playerid], 180.000000, 160.000000, 360.000000, 2.099999);
- PlayerTextDrawSetPreviewModel(playerid, moEquipPrev[playerid], getidxModelSlot(playerid, x));
- PlayerTextDrawShow(playerid, moEquipPrev[playerid]);
- Selected[playerid][0] = ArmasGuardadas[playerid][x];
- if(IsAItem(playerid,Selected[playerid][0],0)) {
- Selected[playerid][0] = ArmasGuardadas[playerid][x];
- Selected[playerid][1] = BalasGuardadas[playerid][x];
- Selected[playerid][2] = x;
- }
- setweaponNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- }
- }
- if(playertextid == moInfo[playerid]){
- //nova info do item em breve
- }
- else if(playertextid == moUse[playerid]) {
- ShowPlayerDialog(playerid, Dialog_Mouse, DIALOG_STYLE_LIST, \
- "{FFFFFF}Opçoes do Item",
- "Usar/Guardar\n\
- Dropar",
- "Selecionar", "Cancelar");
- }
- else if(playertextid == moHelp[playerid]){
- dialogHelp(playerid);
- }
- else if(playertextid == moListBox1[playerid]){
- if(PlayerInfo[playerid][pMochila] >= 1) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,1);
- }
- }
- else if(playertextid == moListBox2[playerid]){
- if(PlayerInfo[playerid][pMochila] > 1) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,2);
- }
- else {
- SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Média para usar Este Inventório");
- }
- }
- else if(playertextid == moListBox3[playerid]){
- if(PlayerInfo[playerid][pMochila] > 2) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,3);
- }
- else
- SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Grande para usar Este Inventório");
- }
- else if(playertextid == moListBox4[playerid]){
- if(PlayerInfo[playerid][pMochila] > 3) {
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- atualizarMochila(playerid,4);
- }
- else
- SendClientMessage(playerid, COLOR_GRAD4, "Sua Mochila deve ser Gigante para usar Este Inventório");
- }
- else if(playertextid == moExit[playerid]){
- HideMochila(playerid);
- }
- }
- if(GetPVarInt(playerid, "vportamala")){
- for(new x = 1; x != MAX_TRUNK_SLOTS; x++){
- if(playertextid == pmPrev[playerid][x]){
- if(vehTrunk[VeiculoPortaM[playerid]][x] < 1) {
- dialogGuardarPM(playerid);
- Selected[playerid][2] = x;
- ///SendClientMessage(playerid, COLOR_LIGHTRED, "* Não tem uma arma nesse slot!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- return 1;
- }
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], getidxPMModelSlot(VeiculoPortaM[playerid], x));
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = vehTrunk[VeiculoPortaM[playerid]][x];
- Selected[playerid][1] = vehTrunkAmmo[VeiculoPortaM[playerid]][x];
- Selected[playerid][2] = x;
- setweaponpmNome(playerid, Selected[playerid][0], Selected[playerid][1]);
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- if(playertextid == pmPrev[playerid][8]) {
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1242);
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = VeiculoPortaM[playerid];
- setItenpmNome(playerid, 8, Selected[playerid][0]);
- Selected[playerid][2] = 8;
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- }
- if(playertextid == pmPrev[playerid][9])
- {
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1279);
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = VeiculoPortaM[playerid];
- setItenpmNome(playerid, 9, Selected[playerid][0]);
- Selected[playerid][2] = 9;
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- }
- if(playertextid == pmPrev[playerid][10])
- {
- PlayerTextDrawSetPreviewModel(playerid, pmEquipPrev[playerid], 1579);
- PlayerTextDrawShow(playerid, pmEquipPrev[playerid]);
- Selected[playerid][0] = VeiculoPortaM[playerid];
- setItenpmNome(playerid, 10, Selected[playerid][0]);
- Selected[playerid][2] = 10;
- PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
- }
- if(playertextid == pmDescart[playerid])
- {
- new thestring[128];
- new result = VeiculoPortaM[playerid];
- if(Selected[playerid][2] == 8)
- {
- if(GetPlayerArmourEx(playerid) > 0)
- {
- if(vehTrunkArmour[result] >= 500.000) return SendClientMessage(playerid, COLOR_GRAD1, " Seu Porta-malas só suporta 5 Coletes!");
- vehTrunkArmour[result] += GetPlayerArmourEx(playerid);
- SetPlayerArmour(playerid, 0);
- format(thestring, sizeof(thestring), "%s tirou o colete e colocou no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 8, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum colete ");
- }
- else if(Selected[playerid][2] == 9)
- {
- if(PlayerInfo[playerid][pDrogas] != 0)
- {
- vehTrunkDroga[result] += PlayerInfo[playerid][pDrogas];
- PlayerInfo[playerid][pDrogas] = 0;
- format(thestring, sizeof(thestring), "%s colocou todas sua Maconha no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 9, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhuma droga para por no porta-malas.");
- }
- else if(Selected[playerid][2] == 10)
- {
- if(PlayerInfo[playerid][pMats] != 0)
- {
- vehTrunkMaterial[result] += PlayerInfo[playerid][pMats];
- PlayerInfo[playerid][pMats] = 0;
- format(thestring, sizeof(thestring), "%s colocou todos seus materiais no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 10, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum material para por no porta-malas.");
- }
- }
- else if(playertextid == pmEquip[playerid])
- {
- new thestring[128];
- new result = VeiculoPortaM[playerid];
- if(Selected[playerid][2] == 8)
- {
- if(vehTrunkArmour[result] >= 100.000)
- {
- vehTrunkArmour[result] -= 100.000;
- SetPlayerArmour(playerid, 100);
- format(thestring, sizeof(thestring), "%s Pegou um colete que estava no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 8, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Seu Porta-malas está sem Colete suficiente para lhe dar.");
- }
- else if(Selected[playerid][2] == 9)
- {
- if(vehTrunkDroga[result] > 0)
- {
- PlayerInfo[playerid][pDrogas] += vehTrunkDroga[result];
- vehTrunkDroga[result] = 0;
- format(thestring, sizeof(thestring), "%s pegou toda sua Maconha no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 9, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhuma droga para pegar no porta-malas.");
- }
- else if(Selected[playerid][2] == 10) {
- if(vehTrunkMaterial[result] > 0) {
- PlayerInfo[playerid][pMats] += vehTrunkMaterial[result];
- vehTrunkMaterial[result] = 0;
- format(thestring, sizeof(thestring), "%s pegou todo seus material no porta-malas do carro.", NomePlayer(playerid));
- SendClientMessageInRange(30.0, playerid, thestring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- setItenpmNome(playerid, 10, result);
- return 1;
- }
- else
- return SendClientMessage(playerid, COLOR_GRAD1, " Você não tem nenhum material para pegar no porta-malas.");
- }
- else if(Selected[playerid][0])
- {
- new string[85];
- GivePlayerWeapon(playerid, Selected[playerid][0], Selected[playerid][1]);
- format(string, sizeof string, "Você pegou uma arma %s com %d balas!",NomeArma(Selected[playerid][0]),vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]]);
- SendClientMessage(playerid, COLOR_R, string);
- Sound(playerid, 36401, 30.0);
- format(string, sizeof(string), "* %s pegou uma arma do Porta Malas", NomeArma(Selected[playerid][0]));
- SendClientMessageInRange(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- vehTrunk[VeiculoPortaM[playerid]][Selected[playerid][2]] = 0;
- vehTrunkAmmo[VeiculoPortaM[playerid]][Selected[playerid][2]] = 0;
- atualizarPortaMala(playerid);
- Selected[playerid][0] = 0;
- Selected[playerid][1] = 0;
- Selected[playerid][2] = 0;
- setweaponpmNome(playerid, 0, 0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "* Você ainda não selecionou uma arma!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- }
- else if(playertextid == pmHelp[playerid]){
- dialogHelp(playerid);
- }
- else if(playertextid == pmExit[playerid]){
- HidePortaMala(playerid);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement