Jump to content

Server Owner Protection!pls read


xTravax

Recommended Posts

Well sometimes it happens when ur server owner some guy bans you so example lets imagine someone bans me...

i will have to change pc or just delete me from banlist.xml but...im too lazy for that

Can you do in next update or something in acl like protection

so idk what line you would add in but you add users same as giving admin for example object name user.Mike for example

but i didnt writed (") and that things now but my point is that when you have that protection noone can ban you or only who has too protection can ban you...JUST SUGGESTION

Link to comment
local autoUnban = 
    { 
        [ "yourSerialHere" ] = true, 
        [ "yourIPHere" ] = true, 
        [ "yourNickHere" ] = true 
    } 
  
addEventHandler ( "onBan", root, 
    function ( theBan ) 
        local bSerial = getBanSerial ( theBan ) 
        local bIP = getBanIP ( theBan ) 
        local bNick = getBanNick ( theBan ) 
        if ( autoUnban [ bSerial ] or autoUnban [ bIP ] or autoUnban [ bNick ] ) then 
            removeBan ( theBan ) 
        end 
    end 
) 

That should do the job.

Link to comment

man..idk am i doing something wrong

pls fix i tried on server and later on client

<meta> 
    <info type="script" description="hack protection" author="Legend" version="1.0.3" name="Protection" /> 
    <script src="script.lua" type="client" /> 
  
</meta> 
  

p.s i writed hack protection cuz to hide it cuz maybe some guy would stop that resource or something..

and i found out my serial on regedit and i copied it and paste and i get my ip from ingame

and i know my nick..

Link to comment
The script should be server-side and must have rights to get player details.

Hi, can you tell me how to get player details right and other rights ? i hear give rights for that, for this but don't how :P

You must add the script to an ACL group that has rights for removeBan(?), getPlayerSerial, getPlayerIP, these things.

Link to comment
OMG, Worked :shock: , Thnx!!!. ok there is any way to add players using console ? like this

/banprotect "playername"

That's different, since you'll need a different table because the script I posted is a lua table, removed when the resource stops/restarts.

ok, i tried but it was not working! :shock:

function autounban(player,cmd,targetPlayer) 
     tPlayer = getPlayerFromName(targetPlayer) 
     if tPlayer then 
          if not getElementData(tPlayer, "auto.unban") then 
               setElementData(tPlayer, "auto.unban", true) 
               outputChatBox("You have given unbanned protection to "..targetPlayer.." !", player) 
          else 
               setElementData(tPlayer, "lift.permission", false) 
               outputChatBox("You have taken unbanned protestion from "..targetPlayer.." !", player) 
          end 
     end 
end 
  
addCommandHandler("banprotect", autounban) 
function(player,targetPlayer) 
     tPlayer = getPlayerFromName(targetPlayer) 
     if getElementData(player, "auto.unban") then 
 local autoUnban = 
    { 
        [ "getPlayerSerial(tPlayer)" ] = true, 
        [ "getPlayerIP(tPlayer)" ] = true, 
        [ "getPlayerIP(tPlayer)" ] = true 
    } 
 addEventHandler ( "onBan", root, 
    function ( theBan ) 
        local bSerial = getBanSerial ( theBan ) 
        local bIP = getBanIP ( theBan ) 
        local bNick = getBanNick ( theBan ) 
        if ( autoUnban [ bSerial ] or autoUnban [ bIP ] or autoUnban [ bNick ] ) then 
            removeBan ( theBan ) 
        end 
    end 
) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...