/setlevel yini
#10

Mine one!

pawn Code:
COMMAND:setlevel(playerid,params[])
{
    new id,level;
    if(IsPlayerAdmin(playerid))
    {
   
        if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid,COLOR_RED,"[USAGE]: /setlevel [playerid/name] [level]");
        else
        {
            if(level > 5) return SendClientMessage(playerid, COLOR_RED,"Only 1-5 levels allowed!");
            else
            {
                new string[64], pName[MAX_PLAYER_NAME];
                GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
                format(string,sizeof string,"RCON Administrator promoted %s to administrator!",pName);
                SendClientMessageToAll(COLOR_GREEN,string);
                new INI:File = INI_Open(Path(id));
                INI_WriteInt(File,"Adminlevel",level);
                INI_Close(File);
            }
        }
    }
    else
    {
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
/setlevel yini - by thefatshizms - 07.07.2012, 16:04
Re: /setlevel yini - by zT KiNgKoNg - 07.07.2012, 16:12
Re: /setlevel yini - by coole210 - 07.07.2012, 16:16
Re: /setlevel yini - by thefatshizms - 07.07.2012, 16:19
Re: /setlevel yini - by coole210 - 07.07.2012, 16:21
Re: /setlevel yini - by thefatshizms - 07.07.2012, 16:23
Re: /setlevel yini - by coole210 - 07.07.2012, 16:25
Re: /setlevel yini - by cJMaster_ - 07.07.2012, 16:38
Re: /setlevel yini - by thefatshizms - 08.07.2012, 15:39
Re: /setlevel yini - by RedJohn - 08.07.2012, 15:52

Forum Jump:


Users browsing this thread: 1 Guest(s)