06.04.2011, 23:21
pawn Код:
COMMAND:stats(playerid, params[])
{
if(isnull(params)) return ShowScore(playerid);
new playername[MAX_PLAYER_NAME];
new string[128];
new player1 = strval(params);
if(IsPlayerConnected(player1))
{
GetPlayerName(player1, playername, sizeof(playername));
format(playername,sizeof playername,"%s's status.",playername);
format(string,sizeof(string),"Kills:\t\t%d\nDeaths:\t%d\nRatio:\t\t%0.2f\nMoney:\t$%d\n",PlayerInfo[player1][kills], PlayerInfo[player1][deaths],Float:PlayerInfo[player1][deaths]/Float:PlayerInfo[player1][deaths],GetPlayerMoney(player1));
ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,playername,string,"Ok","Close");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LRED, "ERROR: Player is not connected.");
}
}