Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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