/makeleader
#1

CMD:

Код:
CMD:makeleader(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] == 7)
    {
        new targetid,level,string[128];
        if(sscanf(params, "ud", targetid, level)) return  SendClientMessage(playerid,COLOR_GREY,"Syntax: /makeleader [playerid] [ID]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,"Player is not online");
        if(level < 0 || level > 7) return SendClientMessage(playerid,-1,"Factions IDS: do /factions");
        PlayerInfo[targetid][pMember] = level;
        format(string, sizeof(string), "You have set %s(ID:%d) to Level %s(%d)",PlayerName(targetid),targetid,(targetid),level);
        SendClientMessage(playerid, -1, string);
        format(string, sizeof(string), "%s(ID:%d) has set your level to %s(%d)",PlayerName(playerid),playerid,(targetid),level);
        SendClientMessage(playerid, -1, string);
    }
    else SendClientMessage(playerid,-1,"You are not an admin.");
    return 1;
}
This dont work in game why?
It says you are not an admin
In game
Reply
#2

Are you sure that your Admin level is 7? If it's not 7, you will recieve that command.
Reply
#3

Your admin level should be only 7 to do this command so you have to set your adminlevel to 7
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)