03.04.2011, 21:13
pawn Код:
CMD:weaps(playerid, params[])
{
if(PlayerData[playerid][AdminLevel] > 0)
{
new id,str[128],WeapName[24],weap,name[MAX_PLAYER_NAME];
if(sscanf(params,"u",id)) return SendClientMessage(playerid,0xFF9900AA,"USAGE: /weaps [id]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"That user is not connected.");
GetPlayerName(id,name,sizeof(name));
new ammo = GetPlayerAmmo(playerid);
GetWeaponName(weap,WeapName,sizeof(WeapName));
format(str,sizeof(str),"|| Weapon name: %s --- Ammo: %d ||",name,ammo);
SendClientMessage(playerid,0xFF9900AA,str);
format(str,sizeof(str),"%s(%d)",WeapName,GetPlayerAmmo(id));
SendClientMessage(playerid,0xFF9900AA,str);
}
else return 0;
return 1;
}