ZCMD Makeadmin
#2

easy peasy, needs to be edited according to your system.
pawn Код:
CMD:setadmin(playerid, params[])
{
    new victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id;
    if (PlayerInfo[playerid][pAdminLevel] >= MAX_ADMIN_LEVEL)
    {
        if (sscanf(params, "ui", id, admlvl)) return SendClientMessage(playerid, COLOR_LIGHTRED, "USAGE: /setadmin [id] [adminlevel]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAY, "AdmCmd: This player is not connected");
        if (admlvl > MAX_ADMIN_LEVEL || admlvl < 0) return SendClientMessage(playerid, COLOR_GRAY,"Don't go below 0 or over max admin level!");
        PlayerInfo[id][pAdminLevel] = admlvl;
        GetPlayerName(id, victimname, sizeof(victimname));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        new str[128];
        format(str,128,"AdmWarn: %s [ID %d] has set %s [ID %d] admin level to %i",adminname, playerid, victimname, id, admlvl);
        SendAdminMessage(COLOR_LIGHTRED,str);
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_GRAY,"  You don't have authorization!");
}
Reply


Messages In This Thread
ZCMD Makeadmin - by Spiral - 11.02.2011, 19:27
Re: ZCMD Makeadmin - by admantis - 11.02.2011, 19:31
Re: ZCMD Makeadmin - by Spiral - 11.02.2011, 19:37

Forum Jump:


Users browsing this thread: 1 Guest(s)