AMARANT Posted September 14, 2012 Share Posted September 14, 2012 Why setVehicleIdleRespawnDelay function doesn't work on player death or quit event? Check this simple code below: theVehicle = createVehicle(547,100,300,15,0,0,90) setVehicleRespawnPosition(theVehicle,100,300,15,0,0,90) function RespawnVehicle() toggleVehicleRespawn(theVehicle,true) setVehicleIdleRespawnDelay(theVehicle,10000) end addEventHandler("onPlayerWasted",getRootElement(),RespawnVehicle) addEventHandler("onPlayerQuit",getRootElement(),RespawnVehicle) Note: On the exit vehicle event works just fine. Link to comment
robhol Posted September 14, 2012 Share Posted September 14, 2012 I think it's generally easier to manually handle this, but you might want to see if it's been reported on Mantis, and report it if it's not. Link to comment
AMARANT Posted September 14, 2012 Author Share Posted September 14, 2012 I think it's generally easier to manually handle this, but you might want to see if it's been reported on Mantis, and report it if it's not. Yeah probably I'll report it right now But what do you recommend me to make it spawn on quit event? Link to comment
Flaker Posted September 14, 2012 Share Posted September 14, 2012 I think it's generally easier to manually handle this, but you might want to see if it's been reported on Mantis, and report it if it's not. Yeah probably I'll report it right now But what do you recommend me to make it spawn on quit event? https://wiki.multitheftauto.com/wiki/SetTimer https://wiki.multitheftauto.com/wiki/RespawnVehicle p.s. Default respawn pos is vehicle's creation position. Link to comment
AMARANT Posted September 14, 2012 Author Share Posted September 14, 2012 https://wiki.multitheftauto.com/wiki/SetTimerhttps://wiki.multitheftauto.com/wiki/RespawnVehicle Didn't want to use server-side timers to check that There can be many vehicles needed to be checked. p.s. Default respawn pos is vehicle's creation position. Right. I forgot it, it's unnecessary thing in my code above. 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