mas tipo й meio osso..
Quero que mostre o armamento da pessoa.
pawn Код:
if(strcmp(cmd,"/revistararmas",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COR_WHITE, "Forma de Uso: /revistararmas [ID do Jogador ou Nome do Jogador]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COR_GREY, "Nгo pode revistar vocк mesmo!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new text1[20], text2[20], text3[20], text4[20], text5[20], text6[20], text7[20], text8[20], text9[20], text10[20], text13[20], text12[20], text11[20];
if(GetPlayerWeapon(giveplayerid) == 0) { text1 = "| Slot Vazio."; } else { text1 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 1) { text1 = "| Soco Inglкs."; } else { text1 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 2) { text2 = "| Taco de Golf."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 3) { text2 = "| Cacetete."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 4) { text2 = "| Faca."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 5) { text2 = "| Taco de Baseball."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 6) { text2 = "| Pб."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 7) { text2 = "| Taco de Sinuca."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 8) { text2 = "| Katana."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 9) { text2 = "| Motosserra."; } else { text2 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 10) { text3 = "| Vibrador Roxo."; } else { text3 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 11) { text3 = "| Vibrador Pequeno."; } else { text3 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 12) { text3 = "| Vibrador Grande."; } else { text3 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 13) { text3 = "| Vibrador Prata."; } else { text3 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 14) { text3 = "| Flores."; } else { text3 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 15) { text3 = "| Cano."; } else { text3 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 16) { text4 = "| Granada."; } else { text4 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 17) { text4 = "| Granada de Gбs."; } else { text4 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 18) { text4 = "| Coquitel Molotov."; } else { text4 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 22) { text5 = "| 9mm."; } else { text5 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 23) { text5 = "| 9mm Silenciada."; } else { text5 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 24) { text5 = "| Desert Eagle."; } else { text5 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 25) { text6 = "| Shotgun."; } else { text6 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 26) { text6 = "| Sawn-off Shotgun."; } else { text6 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 27) { text6 = "| Combat Shotgun."; } else { text6 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 28) { text7 = "| Micro SMG."; } else { text7 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 29) { text7 = "| MP5."; } else { text7 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 30) { text8 = "| AK-47."; } else { text8 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 31) { text8 = "| M4."; } else { text8 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 32) { text7 = "| Tec9."; } else { text7 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 33) { text9 = "| Rifle."; } else { text9 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 34) { text9 = "| Sniper."; } else { text9 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 35) { text10 = "| Rocket Launcher."; } else { text10 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 36) { text10 = "| HS Roc. Lau.."; } else { text10 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 37) { text10 = "| Flamethrower."; } else { text10 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 38) { text10 = "| Minigun."; } else { text10 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 39) { text4 = "| C4."; } else { text1 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 40) { text11 = "| Detonador."; } else { text11 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 41) { text12 = "| Tinta Spray."; } else { text12 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 42) { text12 = "| Extintor."; } else { text12 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 43) { text12 = "| Camera."; } else { text12 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 44) { text13 = "| Visгo Noturna."; } else { text13 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 45) { text13 = "| Visгo Termica."; } else { text13 = "| Slot Vazio."; }
if(GetPlayerWeapon(giveplayerid) == 46) { text13 = "| Paraquedas."; } else { text13 = "| Slot Vazio."; }
format(string, sizeof(string), "|__________ Armas de %s __________|", giveplayer);
SendClientMessage(playerid, COLOR_ROXO_WHITE, string);
format(string, sizeof(string), "Slot 1 %s.", text1);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 2 %s.", text2);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 3 %s.", text3);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 4 %s.", text4);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 5 %s.", text5);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 6 %s.", text6);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 7 %s.", text7);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 8 %s.", text8);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 9 %s.", text9);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 10 %s.", text10);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 11 %s.", text11);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 12 %s.", text12);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "Slot 13 %s.", text13);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "* %s revistou %s para ver se possue algum Item Ilegal.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_ROXO,COLOR_ROXO,COLOR_ROXO,COLOR_ROXO,COLOR_ROXO);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "O Jogador nгo estб Prуximo de vocк!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "O Jogador estб Offline!");
return 1;
}
}
return 1;
}
PQP, seria muito mais fбcil, eficiente e rбpido usar GetPlayerWeaponData com um loop.