yesyesok Posted March 22, 2015 Share Posted March 22, 2015 Hey i tried to make this, like 1 hit one kill But don't want players to die with fire. addEventHandler("onPlayerDamage", getRootElement() , function (attacker, weapon, bodypart, loss) killPed(source,attacker,weapon) end ) Link to comment
JR10 Posted March 22, 2015 Share Posted March 22, 2015 Check if weapon is equal to 37, which is the death reason for being burnt. https://wiki.multitheftauto.com/wiki/Death_Reasons Link to comment
yesyesok Posted March 22, 2015 Author Share Posted March 22, 2015 Check if weapon is equal to 37, which is the death reason for being burnt. https://wiki.multitheftauto.com/wiki/Death_Reasons I don't get it, What should i do? I want it like when i punch a player he should die but he shouldn't die with fire. Link to comment
dewu Posted March 22, 2015 Share Posted March 22, 2015 Client: function bproof ( attacker, weapon, bodypart ) if weapon then cancelEvent() end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), bproof ) Server: function onehit ( attacker, weapon, bodypart, loss ) if not weapon then killPed ( source, attacker, weapon, bodypart ) end end addEventHandler ( "onPlayerDamage", getRootElement (), onehit ) Link to comment
Enargy, Posted March 22, 2015 Share Posted March 22, 2015 Check if weapon is equal to 37, which is the death reason for being burnt. https://wiki.multitheftauto.com/wiki/Death_Reasons addEventHandler("onClientPlayerDamage", root, function (_, weapon) if weapon == 37 then cancelEvent() end end ) Link to comment
yesyesok Posted March 23, 2015 Author Share Posted March 23, 2015 Check if weapon is equal to 37, which is the death reason for being burnt. https://wiki.multitheftauto.com/wiki/Death_Reasons addEventHandler("onClientPlayerDamage", root, function (_, weapon) if weapon == 37 then cancelEvent() end end ) This will only cancel damage from fire. 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