Bean666 Posted May 6, 2015 Share Posted May 6, 2015 hello is it possible to make RHINO damageable by RPG? RPG id is 35 , or it's not possible? tried this but doesnt work: client local weaponsBoom = { ["35"] = true, } addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), function (weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if (hitElement) then if getElementType(hitElement) == "vehicle" then if getElementModel(hitElement) == 432 then if weaponBoom(hitElement) then triggerServerEvent("setTheTankHealth",getLocalPlayer(),hitElement) end end end end) server addEvent("setTheTankHealth",true) addEventHandler("setTheTankHealth",getRootElement(), function(tank) setElementHealth(tank, getElementHealth(tank) - 1000) end ) Link to comment
Dealman Posted May 6, 2015 Share Posted May 6, 2015 That event does not trigger for projectiles. The rocket launcher fires a projectile. What you can do is use the event onClientExplosion instead and then create a col sphere at that location to check if there are any vehicles inside the radius. If there are, and they're of the Rhino model - apply damage depending on how close to the center they are. Link to comment
Bean666 Posted May 6, 2015 Author Share Posted May 6, 2015 hello , thank you for advising me to the onClientExplosion , since i'm new to this function can you give me an example? the example on the wiki kinda doesn't help me , any help appreciated. Link to comment
Mr.unpredictable. Posted May 7, 2015 Share Posted May 7, 2015 viewtopic.php?f=91&t=87589&start=15#p791199 try this Just change the weapon id remember Id 35 will not work bec 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