Jump to content

What is wrong here?


Recommended Posts

Posted

First of all: WTF there isnt a "onClientVehicleDamage" event?!?!

Ok, so what is wrong here?

function damage1 (thePlayer) 
    h = getElementHealth ( thePlayer ) 
    setElementHealth ( thePlayer, h-10 ) 
end  
addEventHandler( "onVehicleDamage", root, damage1 ) 

debugscript 3 says "bad argument"

"Everything exists, because otherwise nothing would", Bob Marley, 2015.

Posted
is it in meta.xml client side script ?

This is a server-side script.

"Everything exists, because otherwise nothing would", Bob Marley, 2015.

Posted

The source of this event is the vehicle that got damaged.

You are using thePlayer instead of source.

function damage1 (loss) 
    h = getElementHealth ( source ) 
    setElementHealth ( source, h-10 ) 
end 
addEventHandler( "onVehicleDamage", root, damage1 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
The source of this event is the vehicle that got damaged.

You are using thePlayer instead of source.

function damage1 (loss) 
    h = getElementHealth ( source ) 
    setElementHealth ( source, h-10 ) 
end 
addEventHandler( "onVehicleDamage", root, damage1 ) 

oh ty very much!!

"Everything exists, because otherwise nothing would", Bob Marley, 2015.

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