Quote:
Originally Posted by rVar
pawn Код:
CMD:rmakeadmin(playerid, params[]) // CMD for making someone an admin... { new pid; new alevel; new str[128]; if(sscanf(params,"ui", pid, alevel)) return SendClientMessage(playerid, -1, "USAGE: /rmakeadmin [playerid] [admin level]"); if (IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, " You are not authorized to use this command !"); if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player specified !"); if((alevel<=5)&&(alevel>=1)) return SendClientMessage(playerid, COLOR_GREY, " Invalid admin level specified (Admin Level 1-5)"); { format(str, sizeof(str), "* You have promoted player %s to a level %i admin.", GetName(pid), alevel); SendClientMessage(playerid, COLOR_LIGHTBLUE, str); format(str, sizeof(str), "* You have been promoted to a level %i admin by a Administrator.", alevel); SendClientMessage(pid, COLOR_LIGHTBLUE, str); PlayerInfo[pid][pAdmin] = alevel; } return 1; }
|
I'll try that.
EDIT: Not working, still says player not connected.