zcmd stats [id]
#2

if you can use sscanf it will be better

make it like

pawn Code:
CMD:stats(playerid, params[])
{
   new string[200],pID;
   if(sscanf(params,"i",pID)) return SendClientMessage(playerid,-1,"/stats <id>");

   format(string, sizeof(string), "Name: %s | ID: %d | Team: %s | Score: %d | Kills: %i | Deaths: %i | Money: %d | Adminlevel: %d", PlayerName(pID),   pID, GetTeamName(pID), GetPlayerScore(pID), PlayerInfo[pID][Kills], PlayerInfo[pID][Deaths], GetPlayerMoney(pID), AdminLevel[pID]); // all playerid replaced by pID since pID = player  whose stats we gonna get but playerid is player who use command
   SendClientMessage(playerid ,COLOR_BROWN, string);
   return 1;
}
Reply


Messages In This Thread
zcmd stats [id] - by sanrock - 01.06.2012, 17:03
Re: zcmd stats [id] - by Niko_boy - 01.06.2012, 17:06
Re: zcmd stats [id] - by [ABK]Antonio - 01.06.2012, 17:11
Re: zcmd stats [id] - by Skaizo - 01.06.2012, 17:17
Re: zcmd stats [id] - by sanrock - 01.06.2012, 17:17

Forum Jump:


Users browsing this thread: 1 Guest(s)