LukeWasTakenn / luke_garages

Super lightweight FiveM resource that adds garages and impounds for the ESX Legacy framework
GNU General Public License v3.0
33 stars 37 forks source link

Impound and garages #25

Closed Therealhellsaint closed 2 years ago

Therealhellsaint commented 2 years ago

When pulling a vehicle out of the garage it will become "not in garage" and thats perfect but from the moment the vehicle is out you can park it far away and take it out of the impound and create 2 cars with the same place etc . it should check if the entity is out in the world or not cause if it is the impound should not work even when blowed up or went in the water it.

LukeWasTakenn commented 2 years ago

Seems to be another issue with server sided spawning. It works fine when you have Config.ServerSpawn set to false.

For some reason when you spawn a vehicle with server sided spawning it doesn't find the entity in the world if it's too far away from the player.

Therealhellsaint commented 2 years ago

Asides from the config option is there a way to fix this without causing more issues?

LukeWasTakenn commented 2 years ago

Not really, I need to look into a good way to handle the server spawning stuff since it's quite scuffed now, just haven't gotten around to it.

Therealhellsaint commented 2 years ago

Thats a bummer i really really like this garage system is looks amazing and the way it works is mega cool if i find anything ill post it here to try to help i hope you manage this fix this this garage system is going to be the best out there

Therealhellsaint commented 2 years ago

Was reading some posts i found this native that can be useful but not 100% sure

SetNetworkIdExistsOnAllMachines(vehicle,true)

Might neee to so some reaserch on it it should check if the entity is spawned

LukeWasTakenn commented 2 years ago

Hmm I don't think so, the issue is that the player doesn't get proper ownership of the vehicle, to fix that I'd need to seat the player into the vehicle when it spawns

LukeWasTakenn commented 2 years ago

This should now be fixed with 523d99ef18bda98d742bd5bc2d607c7fdde7ab5a.

Still need to figure out entity ownership though.

LukeWasTakenn commented 2 years ago

As of 6472ed14196065604d0e49a2a6bfab44df3405a4 server spawning should work as intended.