Mishqutin Posted March 9, 2018 Share Posted March 9, 2018 How do I stop despawning vehicles created by players/resources? Link to comment
Ahmed Ly Posted March 9, 2018 Share Posted March 9, 2018 addEventHandler( "onVehicleExplode", root, function( ) setTimer(destroyElement, 2000, 1, source ) end ) Link to comment
Mishqutin Posted March 10, 2018 Author Share Posted March 10, 2018 I mean they despawn even if not blown up. Link to comment
Tails Posted March 10, 2018 Share Posted March 10, 2018 Probably what you need https://wiki.multitheftauto.com/wiki/ToggleVehicleRespawn Link to comment
Mishqutin Posted March 10, 2018 Author Share Posted March 10, 2018 (edited) If I spawn a vehicle from freeroam panel on my mostly unmodified server and don't get in after some time it just disappears. EDIT: Actually found what to change: local function onExit() local t = tonumber(get("vehicleExpireTime")) or 600000 vehicleDestroyTimers[source] = setTimer(destroyVehicle,(t > 50 and t or 50),1,source) addEventHandler("onVehicleEnter",source,destroyTimer) end Edited March 10, 2018 by Mishqutin Found 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