Jump to content

Vehicle's explosion


Drakath

Recommended Posts

Posted

I don't think that that gets triggered at all.. you're looking for this: onClientProjectileCreation. But still that gets called before the grenade explodes.

Posted

When it gets damaged it does not explode instantly so setting the health would prevent it from exploding. Anyway, with onClientVehicleDamage I cannot check if it was grenade what hit the vehicle.

Posted

This May work ,

addEventHandler('onClientPlayerWeaponFire', root , -- event 
function ( weapon , hitElement , hitX, hitY, hitZ ) -- Parameters 
if ( weapon == 16 and getElementType( hitElement )== "vehicle" )then -- if the weapon was grenade and the element got hit was vehicle then 
    createExplosion (hitX, hitY, hitZ, 2, true, 0, true ) --- make an explosion( rocket ) at the place the grenade was hit and it will make the vehicle blow  instantly 
    end 
   end 
  ) 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...