Liberty Unleashed

Liberty Unleashed => Support => Topic started by: IdkanYavuk X on March 15, 2013, 05:56:04 am

Title: Vehicle Respawn Time
Post by: IdkanYavuk X on March 15, 2013, 05:56:04 am
Hello LU Community

As you see in the title, the vehicle respawn time is very useful depending on the server, and I present you the next problem I have

This configuration line:
Code: (Configuration line :P) [Select]
vehicle_idle_respawn_time 250makes the vehicles respawn after unused for a while.
How can you guys make so the vehicles stay on the same spot until the server stops (infinite)?

Thanks and happy killing
Title: Re: Vehicle Respawn Time
Post by: Mido_Pop on March 15, 2013, 09:34:13 am
Hello LU Community

As you see in the title, the vehicle respawn time is very useful depending on the server, and I present you the next problem I have

This configuration line:
Code: (Configuration line :P) [Select]
vehicle_idle_respawn_time 250makes the vehicles respawn after unused for a while.
How can you guys make so the vehicles stay on the same spot until the server stops (infinite)?

Thanks and happy killing

Man, If You Mean You Don't Need The Vehicles Re spawn Make This >>
 
Code: (Pop) [Select]
vehicle_idle_respawn_time 9999999999
Title: Re: Vehicle Respawn Time
Post by: SugarD on March 15, 2013, 11:16:02 am
Don't use that for the time. It can create a buffer overflow.

Use this instead:
Code: [Select]
vehicle_idle_respawn_time 4294967295
Title: Re: Vehicle Respawn Time
Post by: Juppi on March 15, 2013, 02:22:42 pm
Actually it would cause an integer overflow, a buffer overflow is something completely different. Also it is worth noting is that setting the respawn time to max unsigned integer value wouldn't work in this case due to the way LU handles respawn times internally - they're signed integers, and the internal times are stored in milliseconds (so the user input is multiplied by 1000).

Setting the time to 2147483 or lower should work reliably.

Edit: Technically that doesn't keep the vehicles where they are until the server stops (it's only a couple of weeks, if the server is on longer than that some of the vehicles will respawn). If you want to keep the vehicles where they are for a longer time, you can use Vehicle.SpawnPos and Vehicle.SpawnAngle to force the vehicle to respawn at a given location.
Title: Re: Vehicle Respawn Time
Post by: SugarD on March 15, 2013, 02:27:29 pm
Actually it would cause an integer overflow, a buffer overflow is something completely different. Also it is worth noting that setting the respawn time to max unsigned integer value wouldn't work in this case due to the way LU handles respawn times internally - they're signed integers, and the internal times are stored in milliseconds (so the user input is multiplied by 1000).

Setting the time to 2147483 or lower should work reliably.
Blame VRocker. These are his words :P

I would also suggest adding an option to turn that feature off altogether in the next version. :P
Title: Re: Vehicle Respawn Time
Post by: Vortrex on March 15, 2013, 03:25:29 pm
I would also suggest adding an option to turn that feature off altogether in the next version. :P

I agree. Maybe it would work if we set the respawn time to -1 like I think SA-MP does.
Title: Re: Vehicle Respawn Time
Post by: SugarD on March 15, 2013, 03:35:45 pm
I would also suggest adding an option to turn that feature off altogether in the next version. :P

I agree. Maybe it would work if we set the respawn time to -1 like I think SA-MP does.
Tried that a long time ago. I think it just does whatever the default time is instead.
Title: Re: Vehicle Respawn Time
Post by: Vortrex on March 15, 2013, 03:37:38 pm
I kinda said that wrong. I was talking about in future releases, maybe if the value was -1, then have an infinite respawn time. It was more of a suggestion lol.
Title: Re: Vehicle Respawn Time
Post by: SugarD on March 15, 2013, 03:45:13 pm
I kinda said that wrong. I was talking about in future releases, maybe if the value was -1, then have an infinite respawn time. It was more of a suggestion lol.
Ah. Ya, that sounds good to me. :)
Title: Re: Vehicle Respawn Time
Post by: IdkanYavuk X on March 15, 2013, 05:49:01 pm
So I use 2147483?

I also tried using 0, and the vehicle made a quick respawn (note that the vehicle was vh.OneTime = true;) and stayed like that for a while (I don't know if it dissapeared or not after that)
Title: Re: Vehicle Respawn Time
Post by: SugarD on April 06, 2013, 09:26:22 pm
So I use 2147483?

I also tried using 0, and the vehicle made a quick respawn (note that the vehicle was vh.OneTime = true;) and stayed like that for a while (I don't know if it dissapeared or not after that)
Yes, use 2147483.

Several of us have suggested/requested an ability to turn this off in future versions. We aren't sure of the decision yet, though.

Did this resolve your situation? :)
Title: Re: Vehicle Respawn Time
Post by: IdkanYavuk X on April 07, 2013, 06:15:58 am
Did this resolve your situation? :)

Yes :)
Title: Re: Vehicle Respawn Time
Post by: SugarD on April 07, 2013, 06:20:15 am
Awesome! :D



Issue resolved, topic locked! :)