04.02.2018, 21:24
PHP код:
CMD:stats(playerid, params[])
{
if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5);
new string[256], stats[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "{4286f4}Name{FFFFFF}: %s\n", name);
format(stats, string);
format(string, sizeof(string), "{4286f4}Admin Level{FFFFFF}: %i\n", pInfo[playerid][Admin]);
format(stats, string);
format(string, sizeof(string), "{4286f4}Score{FFFFFF}: %i\n", pInfo[playerid][Score]);
format(stats, string);
format(string, sizeof(string), "{4286f4}Kills{FFFFFF}: %i\n", PlayerKills[playerid]);
format(stats, string);
format(string, sizeof(string), "{4286f4}Deaths:{FFFFFF}: %i\n", PlayerDeaths[playerid]);
format(stats, string);
format(string, sizeof(string), "{4286f4}Points:{FFFFFF}: %i\n", pInfo[playerid][Points]);
format(stats, string);
ShowPlayerDialog(playerid, 55, DIALOG_STYLE_MSGBOX, "Stats", stats, "Ok", "");
return 1;
}