Код:
CMD:stats(playerid, params[])
{
new string[1000], title[128], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, sizeof(playerName));
format(title, sizeof(title), ""COLOR_YELLOW"Displaying information about player - ["COLOR_SYSTEM"%s"COLOR_YELLOW"]", playerName);
format(string,sizeof(string),""COLOR_SYSTEM"* New Zone Gaming Team Deathmatch - General Statistics *\n \n"COLOR_ORANGE"[General] - [Money: %d] | [Deaths: %d] | [Kills: %d] | [Score: %d]\n"COLOR_SYSTEM"[Administrative] - [Admin Level: %d]",PlayerInfo[playerid][pCash],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pAdmin]);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, title, string, "Close", "");
return true;
}
here is my stats cmd..it does show k/d properly doesnt show score money admin lvl tho..
edit here are makeadmin and setscore cmds maybe something is wrong with them?
Код:
CMD:makeadmin(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id, level, string[126];
if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, COL_SYSTEM, "* Syntax: /makeadmin "COLOR_ORANGE"[TargetID] [Level 1-1336]"COLOR_SYSTEM" *");
PlayerInfo[id][pAdmin] = level;
format (string, sizeof(string), "* System: "COLOR_ORANGE"[Administrator] - %s"COLOR_SYSTEM" has set your admin level to "COLOR_ORANGE"%d"COLOR_SYSTEM". *", GetNameEx(playerid), level);
SendClientMessage(id, COL_SYSTEM, string);
format (string, sizeof(string), "* System: You have set "COLOR_ORANGE"%s's"COLOR_SYSTEM" admin level to "COLOR_ORANGE"%d"COLOR_SYSTEM". *", GetNameEx(id), level);
SendClientMessage(playerid, COL_SYSTEM, string);
}
else
{
SendClientMessage(playerid, COL_SYSTEM, "* System: You are "COLOR_LIGHTRED"not allowed"COLOR_SYSTEM" to use this command! *");
}
return 1;
}
//-----------------------------------------------------------------------------------------------------//
CMD:setscore(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
new string[128], pName[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], pID, score;
if(sscanf(params, "ud", pID, score)) return SendClientMessage(playerid, COL_SYSTEM, "* Syntax: /setscore "COLOR_ORANGE"[TargetID] [Score]"COLOR_SYSTEM" *");
if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COL_SYSTEM, "* System: The targeted ID "COLOR_RED"isn't connected or didn't spawn"COLOR_SYSTEM" yet. *");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(pID, pName, sizeof(pName));
format(string, sizeof(string), "* System: "COLOR_ORANGE"[Administrator] - %s"COLOR_SYSTEM" has set your score to "COLOR_ORANGE"%d"COLOR_SYSTEM". *", name, score);
SendClientMessage(pID, COL_SYSTEM, string);
format(string, sizeof(string), "* System: You have set "COLOR_ORANGE"%s's"COLOR_SYSTEM" score to "COLOR_ORANGE"%d"COLOR_SYSTEM". *", pName, score);
SendClientMessage(playerid, COL_SYSTEM, string);
SetPlayerScore(pID, score);
}
else
{
SendClientMessage(playerid, COL_SYSTEM, "* System: You are "COLOR_LIGHTRED"not allowed"COLOR_SYSTEM" to use this command! *");
}
return 1;
}
thanks in advance!