Admin Level keep re writing on scriptfiles when relloging
#4

Quote:
Originally Posted by iZN
Посмотреть сообщение
Mind showing us some more things about this ? There is might be something wrong with the command 'setlevel', show your full script related to this.
I think this is not just about the /setadmin cmds :/ ...
Because even i didnt use /setadmin command yet, it was keep re writting when i was relloging
anw, this is /setadmin command:

pawn Код:
CMD:setadmin(playerid,params[])
{
    new targetid,level,Name[MAX_PLAYER_NAME],Name2[MAX_PLAYER_NAME],str[128],str2[128];
    if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:You Need to be RCON Admin to do this command!");
    if(sscanf(params,"ui",targetid,level))return SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:Usage:/setadmin ID Level");
    if(PlayerInfo[playerid][pAdmin] == level)return SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:Player selected is already on that Level!");
    if(level >6)return SendClientMessage(playerid,COLOR_BRIGHTRED,"[ERROR]:Available Level 1-6!");
    GetPlayerName(playerid,Name,sizeof(Name));
    GetPlayerName(targetid,Name2,sizeof(Name2));
    format(str,sizeof(str),"Administrator %s[%d] has promoted %s[%d] to admin level %i",Name,playerid,Name2,targetid,level);
    SendClientMessageToAll(COLOR_PINK,str);
    PlayerInfo[targetid][pAdmin] = level;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i)&&IsPlayerAdmin(i)||PlayerInfo[i][pAdmin] >=1)
        {
            format(str2,sizeof(str2),"Admin %s[%d]has used /setadmin command!",Name,playerid);
            SendClientMessage(i,COLOR_ORANGE,str);
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)