overlocus Posted August 17, 2018 Posted August 17, 2018 Hi guys. I have a desire. Do not damage the car while nobody is driving it. pls help me
SycroX Posted August 17, 2018 Posted August 17, 2018 addEventHandler "onPlayerVehicleExit" setVehicleDamageProof
overlocus Posted August 17, 2018 Author Posted August 17, 2018 i have rp server and vehicles respawning regularly so is this code also suitable for this? also i cant work this code is this server side or client side ? and can you give this code all in all
Dimos7 Posted August 17, 2018 Posted August 17, 2018 https://wiki.multitheftauto.com/wiki/IsVehicleEmpty
Mr.Loki Posted August 17, 2018 Posted August 17, 2018 (edited) When you spawn the vehicle -> setVehicleDamageProof true onVehicleEnter -> setVehicleDamageProof false onVehicleExit -> setVehicleDamageProof true Edited August 17, 2018 by Mr.Loki
Keiichi1 Posted August 17, 2018 Posted August 17, 2018 Server for k, v in ipairs(getElementsByType("vehicle")) do setVehicleDamageProof(v, true) end addEventHandler("onVehicleExit", getRootElement(), function() setVehicleDamageProof(source, true) end) addEventHandler("onVehicleEnter", getRootElement(), function() setVehicleDamageProof(source, false) end)
overlocus Posted August 17, 2018 Author Posted August 17, 2018 (edited) Thanks everybody but i have one more problem. The code failed when vehicle reversing so and the game started to fade. how can i solve this problem? How can I make sure no one can move while the vehicles are idle? Also, the car does not explode during the explosion and is standing still Edited August 17, 2018 by overlocus
Mσнαмα∂ Hєℓιѕн Posted August 17, 2018 Posted August 17, 2018 3 hours ago, overlocus said: i have rp server and vehicles respawning regularly so is this code also suitable for this? also i cant work this code is this server side or client side ? and can you give this code all in all che khabar _Ary4n_
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