kevin11 Posted June 13, 2010 Share Posted June 13, 2010 (edited) well i tried making a no dmg for cars and it worked but this is my problem when i start the resource and spawn a car it works but when i spawn a new car it get damaged it only works if i keep restarting the resource everytime im going into a new car here is my code vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do setVehicleDamageProof( vehicleValue, true) end addEventHandler ( "onVehicleEnter", setVehicleDamageProof ) Edited June 13, 2010 by Guest Link to comment
The_Ex Posted June 13, 2010 Share Posted June 13, 2010 Your code sets damageProof once (when you start the resource). So you have to use setVehicleDamageProof every time you spawn a new vehicle. Link to comment
kevin11 Posted June 13, 2010 Author Share Posted June 13, 2010 Your code sets damageProof once (when you start the resource). So you have to use setVehicleDamageProof every time you spawn a new vehicle. ?this doesnt work either Link to comment
dzek (varez) Posted June 13, 2010 Share Posted June 13, 2010 DO NOT EDIT POST AFTER SOMEBODY REPLY! addEventHandler("onVehicleEnter", getRootElement(), function() setVehicleDamageProof(source,true) end) Link to comment
dzek (varez) Posted June 13, 2010 Share Posted June 13, 2010 i just hit the keyboard with my head.. somebody, please tell him WHY.. I can't, i just can't stand it.. 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