SA-MP Forums Archive
LuxAdmin Rep+ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: LuxAdmin Rep+ (/showthread.php?tid=366296)



LuxAdmin Rep+ - SA-MPDrifter - 05.08.2012

Okay so I have a big problem. People are able to set themselves as level 5 administrators with the LuxAdmin system, can anyone please tell me how I can stop this immediately. Reputation will be granted as a reward, peace.


Re: LuxAdmin Rep+ - HodgyOG - 05.08.2012

You should find a new admin system really


Re: LuxAdmin Rep+ - SA-MPDrifter - 05.08.2012

I've searched but none really satisfy me as much as LuxAdmin does.


Re: LuxAdmin Rep+ - DarkB0y - 05.08.2012

Well ppl under level 5 can't set them self to level 5 and if u need try ladmin system


Re: LuxAdmin Rep+ - SA-MPDrifter - 05.08.2012

Both of them have exploits and those two are the best. And also, there is an exploit that I just found it that if known how to do it will allow them to set their desired level...


Re: LuxAdmin Rep+ - Zach7 - 05.08.2012

Quote:
Originally Posted by SA-MPDrifter
Посмотреть сообщение
Both of them have exploits and those two are the best. And also, there is an exploit that I just found it that if known how to do it will allow them to set their desired level...
If they can set themselves as admins look at the LuxAdmin script and check for the command that they are using it should say like [pAdmin] <= or something jus make sure that only certain leels of admins can do that.


Re: LuxAdmin Rep+ - Makaveli93 - 06.08.2012

Can you post the code of your make-admin command?


Re: LuxAdmin Rep+ - Devilxz97 - 06.08.2012

CTRL + F and type in dcmd_setlevel
then copy the commands
and show us here!
[.pawn][./pawn] without dots.


Re: LuxAdmin Rep+ - SA-MPDrifter - 06.08.2012

pawn Код:
dcmd_setlevel(playerid,params[])
{
    if(AccInfo[playerid][LoggedIn] == 1)
    {
        if(AccInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid))
        {
            new tmp [256];
            new tmp2[256];
            new Index;
            tmp  = strtok(params,Index);
            tmp2 = strtok(params,Index);
            if(!strlen(params))
            {
            new string[128];
            format(string,sizeof(string),"Usage: /setlevel [PlayerID] [Level (0-%d)]", ServerInfo[MaxAdminLevel]);
            SendClientMessage(playerid,LIGHTBLUE2,string);
            return SendClientMessage(playerid, orange, "Function: Will set the Level of Administration of the Specific Player");
            }
            new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            player1 = strval(tmp);
            if(!strlen(tmp2)) return
            SendClientMessage(playerid, LIGHTBLUE2, "Usage: /setlevel [PlayerID] [Level (0/5)]") &&
            SendClientMessage(playerid, orange, "Function: Will set the Level of Administration of the Specific Player");
            level = strval(tmp2);

            if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
                if(AccInfo[player1][LoggedIn] == 1)
                {
                if(level > ServerInfo[MaxAdminLevel])
                return SendClientMessage(playerid,red,"ERROR: Invalid Level");
                if(level == AccInfo[player1][Level])
                return SendClientMessage(playerid,red,"ERROR: Player is already this level");
                SendCommandToAdmins(playerid,"SetLevel");
                GetPlayerName(player1, playername, sizeof(playername));
                GetPlayerName(playerid, adminname, sizeof(adminname));
                new year,month,day;
                new hour,minute,second;
                getdate(year, month, day);
                gettime(hour,minute,second);

                if(level > 5)
                {
                AdmRank = "Professional Admin";
                }
                switch(level)
                {
                case 1: AdmRank = "Basic Moderator";
                case 2: AdmRank = "Moderator";
                case 3: AdmRank = "Master Moderator";
                case 4: AdmRank = "Administrator";
                case 5: AdmRank = "Master Administrator";
                }
                if(level > 0)
                format(string,sizeof(string),"|- Administrator %s has set you to Administrator Status | Level: %d - %s -|",adminname, level, AdmRank);
                else
                format(string,sizeof(string),"|- Administrator %s has set you to Player Status | Level: %d -|",adminname, level);
                SendClientMessage(player1,LIGHTBLUE,string);
                if(level > AccInfo[player1][Level])
                GameTextForPlayer(player1,"Promoted", 2000, 3);
                else GameTextForPlayer(player1,"Demoted", 2000, 3);

                format(string,sizeof(string),"You have given %s Level %d on '%d/%d/%d' at '%d:%d:%d'", playername, level, day, month, year, hour, minute, second);
                SendClientMessage(playerid,yellow,string);
                format(string,sizeof(string),"Administrator %s has made %s Level %d",adminname, playername, level);
                SaveIn("AdminLog",string);
                dUserSetINT(PlayerName2(player1)).("Level",(level));
                AccInfo[player1][Level] = level;
                return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
                }
                else return SendClientMessage(playerid,red,"ERROR: This player is not Registred or Logged!");
            }
            else return ErrorMessages(playerid, 2);
        }
        else return ErrorMessages(playerid, 1);
    }
    else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}



Re: LuxAdmin Rep+ - Devilxz97 - 06.08.2012

i dont see any wrong with this codes