Makeadmin Command (zcmd)
#2

This might not be the best explained command but hey ho.
pawn Код:
CMD:makeadmin(playerid, params[]) // /makeadmin command
{
    if(PlayerInfo[playerid][pAdmin] >= 5) // Checking if their admin level is equal to or above 5.
    {
        new id, string[128], level; // defines.
        if(sscanf(params, "dd", id, level)) return SendClientMessage(playerid, COLOR_RED, "(INFO): /makeadmin [id] [level]"); // if they type '/makeadmin' it'll show the correct parameters.
        format(string, sizeof(string), "You've been promoted to a level %d Administrator.", level); // Confirming they've given their chosen ID the admin level they wanted to give.
        SendClientMessage(id, COLOR_LIGHTBLUE, string); // Sends the message to the one being promoted.
        PlayerInfo[id][pAdmin] = level; // Sets their Admin level.
    }
    else return SendClientMessage(playerid, COLOR_RED, "You don't have access to this command."); // If they're not equal to or above 5, tell them they can't use the command.
    return 1;
}
Reply


Messages In This Thread
Makeadmin Command (zcmd) - by NinjahZ - 08.08.2013, 04:24
Re: Makeadmin Command (zcmd) - by Binx - 08.08.2013, 05:00
Respuesta: Makeadmin Command (zcmd) - by RafaelZam - 08.08.2013, 05:03
Re: Makeadmin Command (zcmd) - by NinjahZ - 08.08.2013, 05:05
Re: Respuesta: Makeadmin Command (zcmd) - by Elysian` - 08.08.2013, 05:06

Forum Jump:


Users browsing this thread: 1 Guest(s)