04.05.2013, 20:31
pawn Код:
CMD:getweapons(playerid, params[])
{
new message[128], Player, weapon, ammo;
if(pInfo[playerid][AdminLevel] < 2) return admMsg(playerid);
if(sscanf(params, "u", Player)) return SCM(playerid, 0xC4C4C4FF, "Usage: /getweapons <playerid>");
for(new i=0;i<13;i++)
{
GetPlayerWeaponData(Player, i, weapon, ammo);
if(weapon != 0)
{
format(message, sizeof(message), "Player %s's weapons: Slot(%d): Weapon ID(%d) Ammo(%d)", GetName(Player),i, weapon, ammo);
SCM(playerid, -1, message);
return 1;
}
}
return 1;
}
How do I make it print ALL the weapons the player has? This prints one of them.