I tryied to make "makeadmin" command, but not work.. not change to "1" in .ini file...
AnyBody help me please...
[pawn]else if (strcmp(cmd, "giveadmin", true) == 0) {
if(IsLogged[playerid] == 0) SendClientMessage(playerid,NOTACCES,"Need to login first !");
else if(Spawned[playerid] == 0) SendClientMessage(playerid,NOTACCES,"You not are Spawned !");
else if(IsPlayerAdmin(playerid))
{
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c giveadmin [Nick/ID]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"Users/%s.ini",name);
if(!fexist(file))
{
dini_Set(file,"AdminLevel","1");
PlayerInfo[plr][AdminLevel] = 1;
}
}
}else{
SendClientMessage(playerid,NOTACCES,"***Not have permission to use this command!");
}
return 1;
}[/pawn]