Modifying My /makeadmin command
#8

pawn Code:
CMD:setlevel(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,GREY,"You are not an RCON admin!");//if the player is not rcon admin
    new level, target;
    if(sscanf(params, "ud", target, level)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Usage '/setlevel <playerid/name> <level>'");
    if(!IsPlayerConnected(target)) return SendClientMessage(playerid,GREY,"You have entered an incorrect ID"); //if the id is not connected

    format(file,sizeof(file),"MyAdmin/Users/%s.txt", pName(target));
    PInfo[target][pAdminLevel] = level;
    dini_IntSet(file, "Level", level);

    new str[90];
    format(str,sizeof(str),"You have set %s's level to %d", pName(target), level);
    SendClientMessage(playerid,LIGHTBLUE,str);
    return 1;
}
Just change some settings in the code okay?
Reply


Messages In This Thread
Modifying My /makeadmin command - by GAMER_PS2 - 20.10.2011, 09:36
Re: Modifying My /makeadmin command - by iJumbo - 20.10.2011, 09:45
Re: Modifying My /makeadmin command - by nilanjay - 20.10.2011, 09:46
Re: Modifying My /makeadmin command - by iJumbo - 20.10.2011, 09:47
Re: Modifying My /makeadmin command - by GAMER_PS2 - 20.10.2011, 09:48
Re: Modifying My /makeadmin command - by nilanjay - 20.10.2011, 09:50
Re: Modifying My /makeadmin command - by GAMER_PS2 - 20.10.2011, 10:04
Re: Modifying My /makeadmin command - by nilanjay - 20.10.2011, 10:27
Re: Modifying My /makeadmin command - by [MWR]Blood - 20.10.2011, 10:29
Re: Modifying My /makeadmin command - by iJumbo - 20.10.2011, 10:31

Forum Jump:


Users browsing this thread: 2 Guest(s)