Admin system problem
#4

Try

pawn Код:
CMD:setlevel(playerid, params[])
{
    new id, level;
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"SERVER: You must be an admin.");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "SERVER: Player not connected.");
    if(id == playerid) return SendClientMessage(playerid, -1, "SERVER: You cant set yourself an admin. Use /setadmin.");
    if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, -1, "Usage: /setlevel [id] [level]");
    if(level > 5) return SendClientMessage(playerid, -1, "SERVER: Level is too high. [0/5]");
    PlayerInfo[id][Admin] == level;
    return 1;
}
Change the PlayerInfo for you info ofplayer..
if i help give me rep
Reply


Messages In This Thread
Admin system problem - by Deaglez - 04.11.2012, 12:58
AW: Admin system problem - by Skimmer - 04.11.2012, 13:00
Re: Admin system problem - by Tigerkiller - 04.11.2012, 13:03
Re: Admin system problem - by s4kuL - 04.11.2012, 13:04
Re: Admin system problem - by Deaglez - 04.11.2012, 13:08
Re: Admin system problem - by s4kuL - 04.11.2012, 13:11
Re: Admin system problem - by Deaglez - 04.11.2012, 13:16
Re: Admin system problem - by tyler12 - 04.11.2012, 13:32

Forum Jump:


Users browsing this thread: 5 Guest(s)