Genius Posted May 26, 2012 Share Posted May 26, 2012 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 Posted May 26, 2012 Share Posted May 26, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now