Rougue Posted June 19, 2017 Posted June 19, 2017 I was thinking of something like "putting two heads" on a character, and then the first, which would be the helmet, would take a shot and leave, exposing the "main" head. Is it possible to do?
Hale Posted June 19, 2017 Posted June 19, 2017 Use onClientPlayerDamage, which you can cancel if the hit body part is the head. For example: function cancelDamage(attacker, weapon, bodypart) if bodypart == 9 and getElementData(localPlayer, "isWearingHelmet") == true then cancelEvent() setElementData(localPlayer, "isWearingHelmet", false) end end addEventHandler("onClientPlayerDamage", localPlayer, cancelDamage)
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