Please help, will be explained in the text.
#2

pawn Код:
cmd(setadmin, playerid, params[])
{
    new level;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not an admin"); // If the player isn't an admin it will send him the message.
    if(!sscanf(params, "ui", targetplayerid, level)) return SendClientMessage(playerid, -1, "/setadmin [playerid] [level]);
    if(Level > 6 || 0 > Level) return SendClientMessage(playerid, -1, "
Level 0-6");
    isadmin[targetplayerid] = level; //isadmin will be the level you wrote in.
    switch (isadmin[targetplayerid]
    {
        case 0: SendClientMessage(playerid, -1, "
You have been removed from the admin team."); //If isadmin == 0 it will send him this message
        case 1: SendClientMessage(playerid, -1, "
You've been added to the admin team."); // If level 1 and so on this message will be set.
        case 2: SendClientMessage(playerid, -1, "You'
ve been added to the admin team.");
        case 3: SendClientMessage(playerid, -1, "
You've been added to the admin team.");
        case 4: SendClientMessage(playerid, -1, "You'
ve been added to the admin team.");
        case 5: SendClientMessage(playerid, -1, "
You've been added to the admin team.");
        case 6: SendClientMessage(playerid, -1, "You'
ve been added to the admin team.");
    }
    return 1;
}
Not tested but should work , edit it and stuff.
Reply


Messages In This Thread
Please help, will be explained in the text. - by jessejanssen - 24.02.2012, 00:02
Re: Please help, will be explained in the text. - by JhnzRep - 24.02.2012, 00:26
Re: Please help, will be explained in the text. - by jessejanssen - 24.02.2012, 00:36
Re: Please help, will be explained in the text. - by JhnzRep - 24.02.2012, 00:40
Re: Please help, will be explained in the text. - by jessejanssen - 24.02.2012, 01:03
Re: Please help, will be explained in the text. - by emokidx - 24.02.2012, 01:26
Re: Please help, will be explained in the text. - by JhnzRep - 24.02.2012, 01:27
Re: Please help, will be explained in the text. - by JhnzRep - 24.02.2012, 01:30

Forum Jump:


Users browsing this thread: 1 Guest(s)