Author Topic: Vehicle Respawn Time  (Read 3862 times)

IdkanYavuk X

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +37/-36
  • Developer for The Newport Experience
    • View Profile
Vehicle Respawn Time
« 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

Mido_Pop

  • Full Member
  • ***
  • Posts: 168
  • Karma: +6/-20
  • The_Pops ( War )
    • View Profile
Re: Vehicle Respawn Time
« Reply #1 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
« Last Edit: March 15, 2013, 02:36:46 pm by Mido_Pop »



SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Vehicle Respawn Time
« Reply #2 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

Juppi

  • Developer
  • Jr. Member
  • *****
  • Posts: 86
  • Karma: +3/-1
    • View Profile
    • Kuslahden alaste GTA:MP clan
Re: Vehicle Respawn Time
« Reply #3 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.
« Last Edit: March 15, 2013, 02:32:12 pm by Juppi »

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Vehicle Respawn Time
« Reply #4 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
« Last Edit: March 15, 2013, 03:22:31 pm by SugarD »

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Vehicle Respawn Time
« Reply #5 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.

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Vehicle Respawn Time
« Reply #6 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.

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Vehicle Respawn Time
« Reply #7 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.

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Vehicle Respawn Time
« Reply #8 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. :)

IdkanYavuk X

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +37/-36
  • Developer for The Newport Experience
    • View Profile
Re: Vehicle Respawn Time
« Reply #9 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)
« Last Edit: March 15, 2013, 05:51:30 pm by IdkanYavuk »

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Vehicle Respawn Time
« Reply #10 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? :)

IdkanYavuk X

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +37/-36
  • Developer for The Newport Experience
    • View Profile
Re: Vehicle Respawn Time
« Reply #11 on: April 07, 2013, 06:15:58 am »
Did this resolve your situation? :)

Yes :)

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Vehicle Respawn Time
« Reply #12 on: April 07, 2013, 06:20:15 am »
Awesome! :D



Issue resolved, topic locked! :)

 

© Liberty Unleashed Team.