16.12.2017, 08:33
PHP код:
stock list_weapons(playerid)
{
new wep_list[256], wep_holder[128];
new weapon_id, weapon_ammo;
for(new i; i < 13; i++){
GetPlayerWeaponData(playerid, i, weapon_id, weapon_ammo);
if(weapon_id != 0)
{
format(wep_holder, sizeof wep_holder, "Wep ID: %i - Ammo: %i\n", weapon_id, weapon_ammo);
strcat(wep_list, wep_holder);
}
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Caption", wep_list, "<<", ">>");
return 1;
}