10.06.2010, 17:17
When i type /pstats 1 it's showing wrong stats.. :S then i type /pstats 2 and it will be showing /pstats 1 stats.. :S
I hope somebody is able to help.
pawn Код:
dcmd_pstats(playerid,params[])
{
new statid;
new string[256];
new Float:ratio=floatdiv(UserUD[statid][kills], UserUD[statid][deaths]);
if(sscanf(params, "u", statid)) return SendClientMessage(playerid,green,"Error: /pstats <playerid/name>");
if(!IsPlayerConnected(statid) || statid == INVALID_PLAYER_ID || statid == playerid) return SendClientMessage(playerid,green,"Error: Player is not connected or it is yourself, For your own stats use /stats");
format(string,sizeof(string),"Duty-Stats: Kills: %d | Deaths: %d | KD Ratio: %.2f | Admin Level: %d | Duty-ViP: %d | Duty-Cash: %d",UserUD[statid][kills],UserUD[statid][deaths],ratio,UserUD[statid][admin],UserUD[statid][vip],UserUD[statid][money]);
SendClientMessage(playerid,green,string);
format(string,sizeof(string),"Duty-Special-Stats: cookies: %d",UserUD[statid][cookies]);
SendClientMessage(playerid,green,string);
return 1;
}