Jump to content

onClientVehicleDamage bug?


DoKtoR

Recommended Posts

I found a little bug with onClientVehicleDamage function.

It sometimes doesnt detect explosions as theWeapon (grenades,satchels,rocket launcher).

Iam testing with this script:

     
  
    function handleVehicleDamage(attacker, weapon, loss, x, y, z, tyre) 
      
                    
                  
                    outputChatBox(""..weapon.."") 
  
    end 
    addEventHandler("onClientVehicleDamage",getRootElement(), handleVehicleDamage) 
  
  

It sometimes says "51" when i use grenades,satchels,rocket launchers.

But more often it doesnt detect that weapons.

Edited by Guest
Link to comment
  
    function handleVehicleDamage(attacker, weapon, loss, x, y, z, tyre)                    
                    if (weapon and getElementModel(source) == 432) then 
                    outputChatBox(""..weapon.."") 
         end 
    end 
    addEventHandler("onClientVehicleDamage",getRootElement(), handleVehicleDamage) 
  
  

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