02.01.2016, 14:05
Код:
CMD:makeadmin(playerid, params[]) { if(IsPlayerAdmin(playerid) || pInfo[playerid][pAdminLevel] == 7) { new toid, level; if(!sscanf(params, "ui", toid, level)) { pInfo[toid][pAdminLevel] = level; new string[500]; format(string, sizeof(string), "You have been set as level %d administrator.", level); SendClientMessage(toid, -1, string); new name[25]; GetPlayerName(toid, name, sizeof(name)); format(string, sizeof(string), "You have set %s's admin level to %d.", name, level); } else { return SendClientMessage(playerid, -1, "USAGE: /makeadmin [playerid/partofname] [level]"); } } else { return SendClientMessage(playerid, -1, "You are not authorized to use this command!"); } return 1; }