Jump to content

Lower then... ?


pcisoft

Recommended Posts

  
function fixVehicle(player) 
local vehicle = getPedOccupiedVehicle(player) 
if vehicle then 
    local vhealth = getElementHealth(vehicle) 
    if vhealth < 1000 then 
    fixVehicle(vehicle) 
    outputChatBox("Your vehicle has been successfully repaired", player) 
    else 
    return 
    end 
end 
end 
addCommandHandler("repair", fixVehicle) 
  

Try this, not tested.

Dude he did not ask for the code and the problem is solved. He had a doubt about the operators. Also that untested script won't work. Try to find the problem yourself.

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