06.01.2012, 19:17
pawn Код:
CMD:frisk(playerid, params[])
{
new ID;
if (sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Usage: /frisk [id]");
new weapons[13][2], string[100], weapname[32], playername[24],count;
for (new i=0;i<13;i++)
{
GetPlayerWeaponData(ID, i, weapons[i][0], weapons[i][1]);
if (weapons[i][0] != 0)
{
GetWeaponName(weapons[i][0], weapname,sizeof(weapname));
GetPlayerName(ID, playername,sizeof(playername));
format(string,sizeof(string),"(%s): Weapon: %s || Ammo: %d || Weapon ID: %d", playername,weapname,weapons[i][1], weapons[i][0]);
SendClientMessage(playerid, -1, string);
count++;
}
}
if (count == 0) SendClientMessage(playerid, -1,"That user has no weapons");
return 1;
}