Daduuu Posted February 10, 2016 Share Posted February 10, 2016 addEventHandler("onPlayerDamage", getRootElement(), function(attacker, weapon, body, loss) if not (attacker == source) then local attackAccount = getPlayerAccount(attacker) local sourceAccount = getPlayerAccount(source) if not isGuestAccount(sourceAccount) then if not isGuestAccount(attackAccount) then setAccountData(attackAccount, "antideslog", false) setTimer(function() for i, v in ipairs(getElementsByType("player"))do -- check if the player still connected in the server if v == attacker then setAccountData(attackAccount, "antideslog", true) -- The attacker is not in combat anymore after 1 min end end end, 60000, 1) end setAccountData(sourceAccount, "antideslog", false) setTimer(function() for i, v in ipairs(getElementsByType("player"))do -- check if the player still connected in the server if v == source then setAccountData(sourceAccount, "antideslog", true) -- The player who receive the shot is not in combat anymore after 1 min end end end, 60000, 1) end -- They are now in combat. end end) addEventHandler("onPlayerLogin", getRootElement(), function(previous, current, autologin) if current then local data = getAccountData(current, "antideslog") if (data == true) then -- ok, he can play elseif(data == false)then -- ban the player setAccountData(current, "antideslog", true) banPlayer(source) else end end end) This is a script for Anti Combat Relog and i need help transforming it in a resource if someone can make the script better it's ok :3 Please help me! Link to comment
Captain Cody Posted February 10, 2016 Share Posted February 10, 2016 I didn't check if script works but. Put it into a lua file, and create a meta file --- "AntiSomething" author="Person" version="1" type="script" /> Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now