21.10.2016, 05:55
PHP код:
CMD:inventario(playerid, params[]){
new Inv[160];
new string[10];
new weaponid = GetPlayerWeapon(playerid);
if(UsandoMochila[playerid] == true)
{
for(new i = 0; i != 5; i++)
{
format(string, sizeof(string), "%s", NomePente(weaponid));
strcat(Inv, InventarioAmmo[i][playerid] > 0 ? (InventarioAmmo[i][playerid] == 18 ? ("Cocktail Molotov") : (NomePente(weaponid))) : ("(NenhumPente)"));
strcat(Inv, "\n");
}
strcat(Inv, "GuardarPente");
ShowPlayerDialog(playerid, DialogInv, DIALOG_STYLE_LIST, "Itens", Inv, "Selecionar", "Fechar");
}
else
{
SendClientMessage(playerid, -1,"Voce nao tem uma mochila vai comprar!");
}
return 1;
}