Jump to content

Mehanic job [Help pls]


Genius

Recommended Posts

I cant fix car :/Can someone help me?

function fix( weapon, attacker, theVehicle ) 
    skin = getPedSkin ( attacker ) 
    if getElementType ( theVehicle ) == "vehicle" and (weapon == 41) and ( skin == 50 ) then 
        if getElementHealth( theVehicle ) <= 100 then 
            fixVehicle ( theVehicle ) 
            givePlayerMoney( source, 100 ) 
        end 
    end 
end 
addEventHandler("onVehicleDamage", getRootElement(), fix ) 

Link to comment
Guest Guest4401
I cant fix car :/Can someone help me?
function fix( weapon, attacker, theVehicle ) 
... 
addEventHandler("onVehicleDamage", getRootElement(), fix ) 

What is weapon, attacker, theVehicle?

look at the parametres properly. onVehicleDamage

Parametres:

float loss 

  • Loss: A float representing the amount of health the vehicle lost.

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