xTravax Posted August 19, 2012 Share Posted August 19, 2012 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
Castillo Posted August 19, 2012 Share Posted August 19, 2012 This can be scripted, I don't see the point of making it as a suggestion. Link to comment
xTravax Posted August 20, 2012 Author Share Posted August 20, 2012 idk where else to post it but...man can u send me that script?i need it please! Link to comment
Castillo Posted August 20, 2012 Share Posted August 20, 2012 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
ASM Posted August 21, 2012 Share Posted August 21, 2012 It should be better. For future. local protectedEntitys = { nick = {["nick"] = true,["nick2"]=true} } etc. Link to comment
Castillo Posted August 21, 2012 Share Posted August 21, 2012 I don't understand what do you mean, my script can protect: serial, IP and nick, he can add as many as he wants. Link to comment
xTravax Posted August 22, 2012 Author Share Posted August 22, 2012 thanks very useful Link to comment
xTravax Posted August 22, 2012 Author Share Posted August 22, 2012 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
Anderl Posted August 22, 2012 Share Posted August 22, 2012 The script should be server-side and must have rights to get player details. Link to comment
Perfect Posted August 22, 2012 Share Posted August 22, 2012 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 Link to comment
Anderl Posted August 22, 2012 Share Posted August 22, 2012 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 You must add the script to an ACL group that has rights for removeBan(?), getPlayerSerial, getPlayerIP, these things. Link to comment
Castillo Posted August 22, 2012 Share Posted August 22, 2012 There's no: getPlayerSerial, getPlayerIP involved. But yes, you must add the resource to the "Admin" group at the "acl.xml". Link to comment
Perfect Posted August 22, 2012 Share Posted August 22, 2012 ok, like this ? "Admin"> "Moderator"> "SuperModerator"> "Admin"> "RPC"> "resource.admin"> "resource.webadmin"> "resource.autounban"> "user.Perfect"> Link to comment
Perfect Posted August 22, 2012 Share Posted August 22, 2012 OMG, Worked , Thnx!!!. ok there is any way to add players using console ? like this /banprotect "playername" Link to comment
Anderl Posted August 22, 2012 Share Posted August 22, 2012 There's no: getPlayerSerial, getPlayerIP involved.But yes, you must add the resource to the "Admin" group at the "acl.xml". Confused "getBanSerial" etc with "getPlayerSerial" Link to comment
Castillo Posted August 22, 2012 Share Posted August 22, 2012 OMG, Worked , 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. Link to comment
Perfect Posted August 22, 2012 Share Posted August 22, 2012 OMG, Worked , 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! 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
Castillo Posted August 22, 2012 Share Posted August 22, 2012 Because it makes no sense. Link to comment
Perfect Posted August 22, 2012 Share Posted August 22, 2012 Because it makes no sense. What you mean? and why that was not working ? Link to comment
Recommended Posts