03.04.2011, 21:09
Well im trying to make if admin does /weaps [id], it will show what weapons that player has and how many ammos. please help
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));
GetWeaponName(weap,WeapName,sizeof(WeapName));
format(str,sizeof(str),"|| %s Weapons ||",name);
SendClientMessage(playerid,0xFF9900AA,str);
format(str,sizeof(str),"%s(%d)",WeapName,GetPlayerAmmo(id));
SendClientMessage(playerid,0xFF9900AA,str);
}
else return 0;
return 1;
}