i need very simple Admin lvls :) 1+ Repotions
#9

Код:
#include <sscanf2>
#include <zcmd>

new aLevel[MAX_PLAYERS];

CMD:makeadmin(playerid, params[])
{
    if(IsPlayerAdmin(playerid) || aLevel[playerid] == 2) // You must be RCon logged or aLevel 2 to make someone an admin
    {
    new ID,level;
    if(sscanf(params,"ui",ID,level)) return SendClientMessage(playerid,0x00FF00FF,"Usage: /makeadmin <playerid> <level>");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,0x00FF00FF,"Player not connected.");
    if(level < 0 || level > 2) return SendClientMessage(playerid,0x00FF00FF,"Please enter a level above 0 and below 3");
    aLevel[ID] = level;
    SendClientMessage(playerid, 0x00FF00FF, "You have made this player an admin.");
    SendClientMessage(ID, 0x00FF00FF, "You are now an admin.");
    }
    return 1;
}
Should do the job.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)