Jump to content

Health problem


Recommended Posts

Hello ,

I've made a script to show health and nos in the bottom of the screen instead of the normal race Health bar ,

the problem is i'm using a percentage , whenever the health reach 25 % the car becomes on fire.. i need the health to be on 0% to become on fire.

i'm using


Thanks !

Link to comment
  • Moderators
local vehicle = getPedOccupiedVehicle(localPlayer) 
if vehicle then 
    local health = getElementHealth(vehicle)-250 
    if health < 0 then 
        health = 0 

Link to comment

Aa no , you misunderstood me, I didn't mean that the car becomes on fire on 25% and then goes down till 0

I meant I want it normal like 90 to 87 not going from 25 to 0 ,so whenever the car reaches 0 % of health it becomes on fire.

Normaly the car becomes on fire at 25%...


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