admin command weird?
#2

so you want it to be like
pawn Код:
[data]
Password = 248578818
Geld = 0
Admin = 1338 //but its making this??
Moorden = 1
Score = 0
Doden = 5
Bommen = 0
Level = 0
Vip = 0
and not like
pawn Код:
Admin = 5 //then its writing new hot to fix deleting this!
[data]
Password = 248578818
Geld = 0
Admin = 1338 //but its making this??
Moorden = 1
Score = 0
Doden = 5
Bommen = 0
Level = 0
Vip = 0
then change your command to this
pawn Код:
CMD:setlevel(playerid,params[])
{
    new id,level;
    if(IsPlayerAdmin(playerid))
    {

        if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid,-1,"{F81414}[USAGE]: /setlevel [playerid/name] [level]");
        else
        {
            if(level > 10) return SendClientMessage(playerid, -1,"{F81414}Only 1-10 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(-1,string);
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(file, "data");
                INI_WriteInt(File,"Admin",level);
                INI_Close(File);
            }
        }
    }
    else
    {
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
admin command weird? - by Mustafa6155 - 11.12.2012, 10:11
Re: admin command weird? - by [HK]Ryder[AN] - 11.12.2012, 10:20
Re: admin command weird? - by Mustafa6155 - 11.12.2012, 10:26
Re: admin command weird? - by Mustafa6155 - 11.12.2012, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)