so, straight to the point.

restarting resources is not something u would do in a full server iknow, but i still have some questions.

whenever i restart for example my car spawning script. it will remove all the cars spawned in a client radius.

now when i move away, out of scope from the vehicles and then restart script its fine and it will leave them there.

https://cookbook.fivem.net/2020/07/10/a-quick-note-about-onesync-server-side-persistence/

now i read something here on cookbook fivem… it seems like im reading this that when i restart resource and im in scope with the entitys the server is like hellno, i cant take over those vehicles, and then client cleans them? and when out of scope the server is like, ill take them over no worries bro!

im not fully sure… but i would like some more explenation about this…

because in the end even if i restart a script, i would like that all cars stay! same goes for peds, and ped behavior. (without having to move out of scope)

idk if its relevant, but im in ‘strict’ mode with population disabled.
i spawn my entitys server sided to let them be persistant.

im on latest artifacts and latest gamebuild

please light me up with information :smiley:

Hello!

  • Cars dont despawn when a resource that spawned it stops, as far as i know… i never had that problem in my life. even if it has full control over it (but it loses the control) it could be your car script deleting them are you sure thats not the case?

  • peds behave differently. they lose all flags (no control, no usage) etc. etc. this can be avoided by making a second resource that checks for metadata and applies the peds on restart of the script itself (or just find the ped in any way shape or form when restarting and then applying it in the script itself)

  • Vehicles are not 100% persistent, they get deleted after about 2-3 minutes when they are not loaded (or after a max range of 1000m i think,) thats why AdvancedParking exists.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.