zcmd stats [id]
#4

like it,it can create comand exemple /stats Skaizo and /stats 1
pawn Code:
CMD:stats(playerid, params[])
{
   new string[200], pID;
   if(sscanf(params,"u",pID)) return SendClientMessage(playerid,-1,"/stats <playerid>");

   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;
}
how create it?
using sscanf
Code:
Specifier(s)			Name				Example values
	i, d			Integer				1, 42, -10
	c			Character			a, o, *
	l			Logical				true, false
	b			Binary				01001, 0b1100
	h, x			Hex				1A, 0x23
	o			Octal				045 12
	n			Number				42, 0b010, 0xAC, 045
	f			Float				0.7, -99.5
	g			IEEE Float			0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E
	u			User name/id (bots and players)	******, 0
	q			Bot name/id			ShopBot, 27
	r			Player name/id			******, 42
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)