22.12.2013, 14:13
pawn Код:
CMD:weaps(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return 1;
new
id;
if (sscanf(params, "r", id)) return SendClientMessage(playerid, -1, "Usage: /weaps <ID/Part Of Name>");
if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Invalid player");
new
weaponid,
ammo,
sz_T[32];
GetPlayerName(id, sz_T, MAX_PLAYER_NAME);
format( sz_T, sizeof (sz_T), "%s's weapons:", sz_T);
SendClientMessage(playerid, -1, sz_T);
for (new i; i != 13; ++i)
{
GetPlayerWeaponData(id, i, weaponid, ammo);
format(sz_T, sizeof (sz_T), "weaponid: %d & ammo: %d", weaponid, ammo);
SendClientMessage(playerid, -1, sz_T);
}
return 1;
}