01.06.2012, 17:06
if you can use sscanf it will be better
make it like
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;
}