How to see others stats?
#9

pawn Код:
CMD:stats(playerid,params[])
{
    new money = PlayerInfo[pID][pCash];
    new deaths = PlayerInfo[pID][pDeaths];
    new kills = PlayerInfo[pID][pKills];
    new vip = PlayerInfo[pID][pVip];
    new warn = PlayerInfo[pID][pWarns];
    new string[200];
    new name[MAX_PLAYER_NAME],pID;
   if(sscanf(params,"u",pID)) return SendClientMessage(playerid,0xCCCCCCAA,"/stats [id]");
   if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOR_WHITE,"Player not connected.");
   if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_WHITE,"Invalid Player ID");
   GetPlayerName(pID,name,sizeof(name));
   format(string,sizeof(string),"%s's Stats",name);
    format(string,sizeof(string),"| Money: %d | Kills: %d | Deaths: %d | Ratio: %0.2f | VIP: %d | Warns: %d| ",money,kills,deaths,Float:kills/Float:deaths,vip,warn);
    SendClientMessage(playerid,COLOR_WHITE,string);
    return 1;
}
Reply


Messages In This Thread
How to see others stats? - by Champ - 02.07.2013, 08:01
Re: How to see others stats? - by Luis- - 02.07.2013, 08:10
Re: How to see others stats? - by Scottas - 02.07.2013, 08:19
Re: How to see others stats? - by Champ - 02.07.2013, 08:21
Re: How to see others stats? - by Scottas - 02.07.2013, 08:23
Re: How to see others stats? - by Champ - 02.07.2013, 08:26
Re: How to see others stats? - by Scottas - 02.07.2013, 08:36
Re: How to see others stats? - by drichie - 02.07.2013, 08:38
Re: How to see others stats? - by Goldilox - 02.07.2013, 08:46
Re: How to see others stats? - by Scottas - 02.07.2013, 08:49

Forum Jump:


Users browsing this thread: 1 Guest(s)