Notorious^ Posted October 25, 2018 Posted October 25, 2018 (edited) Its simple code but its not work for rocket.when i put another weapon,weapon damage canceled.but just not working with rocket.help please :C function stopRocketDamage ( attacker, weapon, bodypart ) if ( weapon == 35 ) then --if the weapon used was the rocket cancelEvent addEventHandler "onClientPlayerDamage" getLocalPlayer Edited October 25, 2018 by Notorious^
Notorious^ Posted October 25, 2018 Author Posted October 25, 2018 (edited) 37 minutes ago, Notorious^ said: addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopRocketDamage ) Edited October 25, 2018 by Notorious^
LilDawage Posted October 25, 2018 Posted October 25, 2018 addEventHandler "onClientPlayerDamage", getRootElement() , function ( attacker, weapon, bodypart ) if ( weapon == 35 ) then --if the weapon used was the rocket cancelEvent end ) ; RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<< Asking Discord Channel JOIN US ON here , you are welcome 10/24 active
Storm-Hanma Posted October 25, 2018 Posted October 25, 2018 (edited) as i guess you cant stop damage of a rocket weapon ! i tried before to stop dmage from rpg weapon but i failed instead of that you can stop the fire function or aim _weapon function on rpg weapon spawned Edited October 25, 2018 by KINGKHAN Visit https://storm-hosting.xyz/ for free game servers !
Zorgman Posted October 25, 2018 Posted October 25, 2018 Try to check for the damage type instead of checking for the weapon:https://wiki.multitheftauto.com/wiki/Damage_Types Dystopia alpha 0.75DOWNLOAD
Notorious^ Posted October 25, 2018 Author Posted October 25, 2018 13 minutes ago, Zorgman said: Try to check for the damage type instead of checking for the weapon:https://wiki.multitheftauto.com/wiki/Damage_Types Hi man.i was saw this page but i didint understand.rocket damage id 19.what can i do ? If you know could you say me ? 2 hours ago, KINGKHAN said: as i guess you cant stop damage of a rocket weapon ! i tried before to stop dmage from rpg weapon but i failed instead of that you can stop the fire function or aim _weapon function on rpg weapon spawned Hello man . Bro i just want close damage for pvp.just players can kill zombies.some zombie servers using this.
Zorgman Posted October 25, 2018 Posted October 25, 2018 addEventHandler "onClientPlayerDamage", root , function ( attacker, weapon, bodypart ) if weapon then outputDebugString("Damage type is "..weapon) end end ) Do this ^ and you will find out what damage type you need to check & cancel. Cheers! Dystopia alpha 0.75DOWNLOAD
Notorious^ Posted October 25, 2018 Author Posted October 25, 2018 (edited) 34 minutes ago, Zorgman said: yes ! ı maked it thanks for helps but last question how can ı just disable rocket damage in las venturas ? do you know ? ı tried this but not working :C addEventHandler("onClientPlayerDamage", root, function(stopRocketDamage) -- if ( weapon == 19 ) then --if the weapon used was the rocket local x,y,z = getElementPosition(source) -- player position local zone = getZoneName(x,y,z, true) -- position name if zone == "Las Venturas" then -- if position nae las venturas cancelEvent() -- eventi iptal et end end end) okay all is done.problems solved thanks for all Edited October 25, 2018 by Notorious^
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