22.06.2015, 20:08
Hey!
Here is my help
You can use /stats or /stats [ID] (it works both ways)
Replace "ID" with this
so then it will look like
EDIT : SORRY FORGOT TO REFRESH KONSTANTINOS AND THE OTHER ONE
Here is my help
You can use /stats or /stats [ID] (it works both ways)
Replace "ID" with this
Код:
new target=playerid; if(!isnull(params)) sscanf(params, "r", target);
Код:
CMD:stats(playerid,params[]) { new name[MAX_PLAYER_NAME]; new target=playerid; if(!isnull(params)) sscanf(params, "r", target); GetPlayerName(target, name, sizeof(name)); if(sscanf(params,"d",target)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /stats <ID>"); if (!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected."); new string[128]; new Float:ratio=floatdiv(PlayerInfo[target][pKills], PlayerInfo[target][pDeaths]); format(string, 128, "%d %d %.2f", PlayerInfo[target][pKills], PlayerInfo[target][pDeaths], ratio); format(string, sizeof(string), "Name: %s (ID:%d)\nAdmin Level :%d\nKills : %d\nDeaths : %d\nKill/Death Ratio: %.2f\nScore: %d",name, target, PlayerInfo[target][pAdmin], PlayerInfo[target][pKills], PlayerInfo[target][pDeaths], ratio,PlayerInfo[target][pScore]); ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Player Stats",string,"Close",""); return 1; }