Jump to content

demage rhino with explosions


Xwad

Recommended Posts

ohh yes xD i forgot it xD

  
boom = { 
 [35]=true, 
 [36]=true, 
 [37]=true, 
 [38]=true, 
 [16]=true, 
 [17]=true, 
 [18]=true, 
 [39]=true, 
} 
  
addEventHandler( "onClientPlayerWeaponFire", root, 
  function( weapon, ammo, clip, , , _, element ) 
    local target = element 
    if getElementType( target ) == "vehicle" then 
     local model = getElementModel( target ) 
      if model == 432 and boom[ weapon ] then 
       blowVehicle( target ) 
      end 
    end 
  end 
) 
  

Link to comment

is there server side correct?

  
function onClientExplosion(x,y,z,theType) 
    if (weapon == 35) or if (weapon == 36) then 
        setElementHealth(source,getElementHealth(source) - 350) 
end 
  
  
addEvent("onClientPlayerWeaponFire", true) 
addEventHandler("onClientPlayerWeaponFire", getRootElement(), onClientExplosion) 
  

Link to comment
is there server side correct?
  
function onClientExplosion(x,y,z,theType) 
    if (weapon == 35) or if (weapon == 36) then 
        setElementHealth(source,getElementHealth(source) - 350) 
end 
  
  
addEvent("onClientPlayerWeaponFire", true) 
addEventHandler("onClientPlayerWeaponFire", getRootElement(), onClientExplosion) 
  

This is client side

+

 if (weapon == 35) or if (weapon == 36)  

It is wrong, rocket launcher is a projectile and it's id is 19 and Heat-Seeking RPG id is 20.

Link to comment

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...