/makevip
#1

Hey guys,

i made this cmd for Admins:
/makeadmin
Код:
COMMAND:makeadmin(playerid, params[])
{
    new id;
    new AdminLevel2;
    if(IsPlayerConnected(id))
    {
        if(PlayerInfo[playerid][AdminLevel] >= 5 || IsPlayerAdmin(playerid))
        {
            if(!sscanf(params, "ui", id, AdminLevel2))
            {
                if((AdminLevel2 >= 1 && AdminLevel2 <= 5) || AdminLevel2 == 0)
                {
                    new string[64];
                    new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    GetPlayerName(id, PlayerName, sizeof(PlayerName));
                    format(string, sizeof(string), "%s Has Promoted you to Admin Level %d.", name, AdminLevel2);
                    SendClientMessage(id, 0xD8D8D8FF, string);
                    format(string, sizeof(string), "You Have promoted %s to Admin Level %d.",PlayerName, AdminLevel2);
                    SendClientMessage(playerid, 0xD8D8D8FF, string);
                    PlayerInfo[id][AdminLevel] = AdminLevel2;
                    return 1;
                }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "Levels: 1, 2, 3, 4 and 5.");
            }
            else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /makeadmin [PlayerId/PartOfName] [AdminLevel]");
        }
        else return SendClientMessage(playerid, 0xD8D8D8FF, "You Need to Be RCON Admin to use this Command.");
    }
    else return SendClientMessage(playerid, 0xD8D8D8FF, "Player Is Not Connected");
}
Can someone make same for VIP?
my Enum:
Код:
enum pInfo
{
        AdminLevel,
        VipLevel,
        Cash,
        Score,
        Color,
        Vw,
        Int,
        Warns,
        Prods,
        RepairOffer,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Thanks.
Reply


Messages In This Thread
/makevip - by Avi Raj - 25.12.2012, 10:54
Re: /makevip - by DaRk_RaiN - 25.12.2012, 11:00
Re: /makevip - by Avi Raj - 25.12.2012, 11:04
Re: /makevip - by Konstantinos - 25.12.2012, 11:06
Re: /makevip - by DaRk_RaiN - 25.12.2012, 11:06
Re: /makevip - by zxc1 - 25.12.2012, 11:07
Re: /makevip - by Avi Raj - 25.12.2012, 11:11

Forum Jump:


Users browsing this thread: 1 Guest(s)