yToPzz Posted October 28, 2022 Share Posted October 28, 2022 I want to put some time to run destroyElement but I'm not getting it, could someone help me? addEventHandler("onVehicleExplode", root, function() destroyElement(source) end) 1 Link to comment
βurak Posted October 28, 2022 Share Posted October 28, 2022 (edited) You can do it this way. It works once after 3 seconds. You can enter the value you want in milliseconds. addEventHandler("onVehicleExplode", root, function() setTimer(function(source) destroyElement(source) end, 3000, 1, source) --run after 3 seconds end) Edited October 28, 2022 by Burak5312 1 1 Link to comment
Overkillz Posted October 28, 2022 Share Posted October 28, 2022 7 hours ago, Burak5312 said: You can do it this way. It works once after 3 seconds. You can enter the value you want in milliseconds. addEventHandler("onVehicleExplode", root, function() setTimer(function(source) destroyElement(source) end, 3000, 1, source) --run after 3 seconds end) Not sure if this can be even better. Try this one: addEventHandler("onVehicleExplode", root, function() setTimer(destroyElement(),3000,1,source) end) 1 Link to comment
AngelAlpha Posted October 29, 2022 Share Posted October 29, 2022 addEventHandler("onVehicleExplode", root, function() setTimer(destroyElement,3000,1,source) end) 1 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