Apo Posted March 15, 2016 Posted March 15, 2016 hi guys please help me for make script if player no in the vehilce , vehicle no damaged esle vehicle damaged please give me resource
MIKI785 Posted March 15, 2016 Posted March 15, 2016 Use setVehicleDamageProof in conjunction with onVehicleEnter and onVehicleExit. Btw. this is not how you ask for help in this forum.
Apo Posted March 15, 2016 Author Posted March 15, 2016 ty man can you give me resource i am new scripting vehicle undamaged when player no in the vehicle not damaged by weapon , car etc... When the player is in the vehicle car damaged
MIKI785 Posted March 15, 2016 Posted March 15, 2016 Again, this is not a request forum. Read this: https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897 especially this part: NOTE: Please remember that this is not a forum for requests. We can help you with your code or question but we will not script for you This isn't how you "learn" to script, by having someone else post the whole thing for you and learn nothing.
Apo Posted March 15, 2016 Author Posted March 15, 2016 help me for my code function vehicledamaged (thePlayer) if isPedInVehicle (thePlayer) then local vehicle = getPedOccupiedVehicle (thePlayer) setVehicleDamageProof (vehicle, false) end end addEventHandler ( "onVehicleEnter", getRootElement(), vehicledamaged ) function vehicleundamaged (thePlayer) if isPedInVehicle (thePlayer) then local vehicle = getPedOccupiedVehicle (thePlayer) setVehicleDamageProof (vehicle, true) fixVehicle (vehicle) end end addEventHandler ( "onVehicleExit", getRootElement(), vehicleundamaged )
manawydan Posted March 15, 2016 Posted March 15, 2016 try this: function vehicledamaged (thePlayer) -- source is the vehicle setVehicleDamageProof (source, false) -- damagable fixVehicle (source) end addEventHandler ( "onVehicleEnter", getRootElement(), vehicledamaged ) function vehicleundamaged (thePlayer) setVehicleDamageProof (source, true) -- not damagable fixVehicle (source) end addEventHandler ( "onVehicleExit", getRootElement(), vehicleundamaged )
swedishboy Posted March 15, 2016 Posted March 15, 2016 try this function damageNo (player) setVehicleDamageProof(source, true) end addEventHandler("onVehicleEnter", getRootElement(), damageNo) function damageYes (player) setVehicleDamageProof(source, false) end addEventHandler("onVehicleExit", getRootElement(), damageYes)
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