TorNix~|nR Posted February 8, 2018 Share Posted February 8, 2018 Hello guys, I have my script, a safe zone when a player enters the safe zone, of course he can't kill players, but the problem is that all the damage are disabled he have like a godmode EXAMPLE: when a players falls from a long distance, he never get damaged, I want to disable this I want the player get damaged, but not from players help me please Client side addEventHandler( 'onClientPlayerDamage', localPlayer, function(attacker) if getElementData(attacker,"dd") == true then return end if getElementData( localPlayer, 'damage' ) == 'no' then cancelEvent( ) end end ) Link to comment
NeXuS™ Posted February 8, 2018 Share Posted February 8, 2018 You can check if there is an attacker or the attacker itself is the client. If it is or there is no attacker, you dont run the cancelEvent. Link to comment
TorNix~|nR Posted February 8, 2018 Author Share Posted February 8, 2018 what should I add? Link to comment
Tails Posted February 8, 2018 Share Posted February 8, 2018 Try adding this if attacker ~= localPlayer then 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