Jump to content

car dmg [re]


kevin11

Recommended Posts

Posted (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

:S 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 by Guest
Posted

Your code sets damageProof once (when you start the resource). So you have to use setVehicleDamageProof every time you spawn a new vehicle.

MTASA.LV - Latvian MTA Community

Posted
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

Posted

DO NOT EDIT POST AFTER SOMEBODY REPLY!

addEventHandler("onVehicleEnter", getRootElement(), function() setVehicleDamageProof(source,true) end)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

i just hit the keyboard with my head..

somebody, please tell him WHY.. I can't, i just can't stand it..

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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