SA-MP Forums Archive
LuxAdmin help - 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 help (/showthread.php?tid=382483)



LuxAdmin help - Wonderweiss - 03.10.2012

how can i make lux admin after 10 slaps = ban
and after 3 warnings = ban ?? pls help


Re: LuxAdmin help - RanSEE - 03.10.2012

Obviously find those lines and change them, because no one possible would take their time to sit, search, modify and post it.


Re: LuxAdmin help - Ghost_Boii - 03.10.2012

Better Ask To Luxurian who made luxadmin


Re: LuxAdmin help - Windrush - 04.10.2012

At /warn Command
pawn Код:
CMD:warn(playerid,params[])
{
    if(AccInfo[playerid][Level] >= 3)
    {
        new Index;
        new tmp[256];  tmp  = strtok(params,Index);
        new tmp2[256]; tmp2 = strtok(params,Index);

        if(isnull(tmp) || isnull(tmp2)) return
        Inter_SendClientMessage(playerid, LIGHTBLUE2, "Usage: /warn [PlayerID] [Reason]") &&
        Inter_SendClientMessage(playerid, orange, "Function: Will give a Warning in specified player");
        new warned = strval(tmp);
        new str[128];
        if(AccInfo[warned][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
        return Inter_SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
        if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID)
         {
            if(warned != playerid)
             {
                SendCommandToAdmins(playerid,"Warn");
                AccInfo[warned][Warnings]++;
                if( AccInfo[warned][Warnings] == MAX_WARNINGS)
                {
                format(str, sizeof (str), "|- Administrator \"%s\" has Ban \"%s\". | Reason: %s (Warnings: %d/%d) -|", pName(playerid), pName(warned), params[1+strlen(tmp)], AccInfo[warned][Warnings], MAX_WARNINGS);
                Inter_SendClientMessageToAll(lightred, str);
                SaveIn("KickLog",str);
                Ban(warned);
                return AccInfo[warned][Warnings] = 0;
                }
                else
                {
                format(str, sizeof (str), "|- Administrator \"%s\" has given \"%s\" a Warning. | Reason: %s (Warnings: %d/%d) -|", pName(playerid), pName(warned), params[1+strlen(tmp)], AccInfo[warned][Warnings], MAX_WARNINGS);
                return Inter_SendClientMessageToAll(yellow, str);
                }
            }
            else return Inter_SendClientMessage(playerid, red, "ERROR: You cannot warn yourself");
        }
        else return ErrorMessages(playerid, 2);
    }
    else return ErrorMessages(playerid, 1);
}