SA-MP Forums Archive
How to create a vehicle that don't re-spawn? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to create a vehicle that don't re-spawn? (/showthread.php?tid=354855)



How to create a vehicle that don't re-spawn? - Makaveli93 - 28.06.2012

It's all in the title, please help me out. Thanks.


Re: How to create a vehicle that don't re-spawn? - Kindred - 28.06.2012

Not sure if this would work, but change the spawn_delay parameter of createvehicle to -1.


Re: How to create a vehicle that don't re-spawn? - Makaveli93 - 28.06.2012

I already have it set to -1 and it respawns.


Re: How to create a vehicle that don't re-spawn? - Hoborific - 28.06.2012

REMOVE THIS.


Re: How to create a vehicle that don't re-spawn? - TyThaBomb - 28.06.2012

Well, when I use AddStaticVehicleEx, I set the respawn_delay to 6000000. Basically, 6 million seconds. Doing the math, that would be 100,000 minutes, or 1666 hours, which would be about 70 days, and I'm pretty sure your server wouldn't have to restart for 70 days.

Also, what exactly do you mean by it doesn't respawn? Because using any function to respawn it isn't stoppable I don't think.


Re: How to create a vehicle that don't re-spawn? - Makaveli93 - 28.06.2012

Yeah, but I'm using CreateVehicle, and wouldn't that just eat up the resources?


Re: How to create a vehicle that don't re-spawn? - TyThaBomb - 28.06.2012

Well if you don't want it to be respawned, that's your only choice.
On this wikipage: https://sampwiki.blast.hk/wiki/AddStaticVehicleEx, it says that "This function can only create vehicles in the OnGameModeInit callback, and vehicles created with this function cannot be removed."

Isn't that what you wanted? Because CreateVehicle is really meant for making vehicles in-game wise, rather than script-wise.


Re: How to create a vehicle that don't re-spawn? - Makaveli93 - 28.06.2012

I'll think of something then, thanks.


Re: How to create a vehicle that don't re-spawn? - TyThaBomb - 28.06.2012

Sure, best of luck.