[Help]: makeadmin command!
#8

Quote:
Originally Posted by DobbysGamertag
Посмотреть сообщение
Try this:
pawn Код:
//try it like this
CMD:makeadmin(playerid, params[])
{
    new targetid;
    new level;
    new string[200];
    if(gPlayerInfo[playerid][pAdminLevel] < gCommands[MAKEADMIN])return SCM(playerid, COLOR_RED, "[ERROR]: You can't use this command!");
    if(sscanf(params, "ui", targetid, level))return SCM(playerid, COLOR_GREY, "[USAGE]: /makeadmin [playerid] [level]");
    if(!IsPlayerConnected(targetid))return SCM(playerid, COLOR_RED, "[ERROR]: This player is not connected!");
    if(level < 0 || level > 10)return SendClientMessage(playerid, COLOR_RED, "[ERROR]: Invalid Admin Level (0-10)!");
    gPlayerInfo[targetid][pAdminLevel] = level;
    format(string, sizeof(string), "{80FF00}[FMJ NAdmin]: {0000FF}%s(ID:%d) has changed %s(ID:%d)'s Admin Level to %i!", GetName(playerid), playerid, GetName(targetid), targetid, level);
    SCMToAll(COLOR_BLUE, string);
    gPlayerLogged[playerid] = 0;
    return 1;
}
Not working :/

Quote:
Originally Posted by DobbysGamertag
Посмотреть сообщение
Meanwhile. Why are you writing an entire new file when you set the players admin level? i'm not too good with Dini. i've forgotten most of it. Tell me, when you use the command in game, does it actually work. Have you tried any admin commands you've made?
When I use the command ingame it's works, but when I relog, then it's still the same level as it was...Other commands are working good.
Reply


Messages In This Thread
[Help]: makeadmin command! - by Areax - 25.05.2013, 18:05
Re: [Help]: makeadmin command! - by Kindred - 25.05.2013, 18:08
Re: [Help]: makeadmin command! - by Areax - 25.05.2013, 18:18
Re: [Help]: makeadmin command! - by DobbysGamertag - 25.05.2013, 18:28
Re: [Help]: makeadmin command! - by Areax - 25.05.2013, 18:42
Re: [Help]: makeadmin command! - by Areax - 25.05.2013, 19:09
Re: [Help]: makeadmin command! - by DobbysGamertag - 25.05.2013, 19:18
Re: [Help]: makeadmin command! - by Areax - 25.05.2013, 19:27
Re: [Help]: makeadmin command! - by Areax - 25.05.2013, 20:41
Re: [Help]: makeadmin command! - by kosa451 - 25.05.2013, 21:23

Forum Jump:


Users browsing this thread: 1 Guest(s)