/setlevel yini
#2

Quote:
Originally Posted by thefatshizms
View Post
hello, i guessed on how to make this command but it doesnt work
Try this

pawn Code:
CMD:setlevel(playerid, params[])
{
    if(PlayerInfo[playerid][Padmin] > 5)
    {
        new id, lvl, string[128], string2[128], string3[128];
        new INI:file = INI_Open(Path(playerid));
        if(sscanf(params,"ui",id,lvl)) return SendClientMessage(playerid, -1, "USAGE: /setlevel <id> <lvl>");
        format(string, sizeof(string), "You have set %s admin level to %d", PlayerName(id), lvl);
        format(string2, sizeof(string2), "Your level has been set to %d by %s", lvl, PlayerName(playerid));
        format(string3, sizeof(string3), "%s is now admin level %d", PlayerName(id), lvl);
        SendClientMessage(playerid, -1, string);
        SendClientMessage(id, -1, string2);
        SendClientMessageToAll(-1, string3);
        INI_WriteInt(file,"Padmin",lvl);
        INI_Close(file);
        return 1;
    }
    else if(PlayerInfo[playerid][Padmin] > 5)
    {
        SendClientMessage(playerid, -1, "Your not a admin");
        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: 2 Guest(s)