04.08.2011, 13:14
PHP код:
CMD:og(playerid, params[])
{
new gangstername[MAX_PLAYER_NAME],adminname[MAX_PLAYER_NAME];
new gangsterlevel, id;
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if (sscanf(params, "ui", id, gangsterlevel)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /set_glevel [id] [gangsterlevel]");
if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
GetPlayerName(id, gangstername, sizeof(gangstername));
GetPlayerName(playerid, adminname, sizeof(adminname));
new str[128];
format(str,128,"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %i%s",adminname, playerid, gangstername, id, gangsterlevel,((gangsterlevel >= 100) ? "(GODFATHER)" : "") );
SendClientMessageToAll(COLOR_YELLOW,str);
return 1;
}
else return SendClientMessage(playerid,COLOR_RED," You are not allowed to use this command!");
}