Jump to content

setElementHealth


Desaster

Recommended Posts

Posted

hi ,

when I create a car then I set it's health to any number it create me a car with 0 health :P idk why when I remove the setElemntHealth fuction it work but the car has 100 health I want now to ask you how I can setElemntHealth without that the car burns :P

Posted
hi ,

when I create a car then I set it's health to any number it create me a car with 0 health :P idk why when I remove the setElemntHealth fuction it work but the car has 100 health I want now to ask you how I can setElemntHealth without that the car burns :P

use a value more than 0

Posted

ik :P but I don't know whats the problem first I got the number from a table

setElementHealth(vehicle, tonumber(theCar[i].Health)) 

the I did this

setElementHealth(vehicle, 99) 

and still not working

Posted
ik :P but I don't know whats the problem first I got the number from a table
setElementHealth(vehicle, tonumber(theCar[i].Health)) 

the I did this

setElementHealth(vehicle, 99) 

and still not working

local oi = createVehicle(411, -2405,-598,132.6484375) 
setElementHealth ( oi , 500 ) 

use 500 for half life

use 1000 for full life

Posted

If you want help in the future, you can at least try to be a bit appreciative when someone is trying to help. There's no need for such dis-respectful behaviour.

And for your information, vehicles in MTA has a very unique health system. Maximum health is indeed 1000 for vehicles, if you set it to, I believe it's either 250 or 200 - the car will start to burn - and then blow up.

Posted
If you want help in the future, you can at least try to be a bit appreciative when someone is trying to help. There's no need for such dis-respectful behaviour.

And for your information, vehicles in MTA has a very unique health system. Maximum health is indeed 1000 for vehicles, if you set it to, I believe it's either 250 or 200 - the car will start to burn - and then blow up.

exactly.

  • Moderators
Posted
max is 2000. only it is buggy.

and this a problem?

It can be, when you use it.

But to get back to the topic, he can also fake that 100 hp.

Just use the math people learn at school and he will be fine.

Posted
max is 2000. only it is buggy.

and this a problem?

It can be, when you use it.

But to get back to the topic, he can also fake that 100 hp.

Just use the math people learn at school and he will be fine.

interesting.

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