How to create a vehicle that don't re-spawn?
#1

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

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

I already have it set to -1 and it respawns.
Reply
#4

REMOVE THIS.
Reply
#5

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.
Reply
#6

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

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.
Reply
#8

I'll think of something then, thanks.
Reply
#9

Sure, best of luck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)