Panda Posted September 18, 2015 Share Posted September 18, 2015 Hello everyone, Well i tried to make friendly fire script function but the problem is i don't want it to be locked to teams, i want it to be locked to Classes. Idk what i'm doing but i just tried something it doesn't work already tested it but yeah.. I really need some help over here function Trolo ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then if ( getElementData ( attacker, "class" ) == "Delta Team" ) ~= ( getElementData ( source, "class" ) == "Delta Team" ) then cancelEvent() end end end addEventHandler ("onPlayerDamage", getRootElement(), Trolo) i'm not sure about it, need some help. Thanks. Link to comment
JR10 Posted September 18, 2015 Share Posted September 18, 2015 onPlayerDamage can not be cancelled. Use onClientPlayerDamage 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