Hi! I am writing a script that would let you store your vehicles in a garage like in GTA Online, but I can’t really find a way how to separate garages from each other. By this I mean each player could have multiple garages, and the vehicles are only visible in the interior if the player is in a specific garage. Each garage has its own ID, so thats how I can make only those vehicles visible, which are parked in that garage. So basicly I want to write a “dimension” system.
I tried using NetworkConcealEntity which did not work very well, because when the owner of the network entity leaves the garage, so the script conceals that entity only for the player who left the interior, that vehicle gets concealed for every other player. And I want the players to see every vehicle in the interior, not just only when it’s not concealed on the owner’s side. But this would work nice.
I also tried using SetEntityVisible and SetEntityCollision and the problem with them is they don’t get visible when someone enters the garage. I mean when the owner leaves the garage and another player enters the same garage the vehicle will not be there, for some reason.
The script that makes entities and players visible works by checking each player’s interior in a loop, and sets the entities and players visible only in the same interior. NetworkConcealPlayer works okay for players.
Is there a way of making a “dimension” system, and storing vehicles in garages like in GTA Online?
One solution you can consider is creating multiple ymaps that place the garages MLO at different coords that do not overlap each other and then RequestIpl(mapname) and RemoveIpl(mapname) when teleporting them in and out of the interior.
This can be cumbersome depending on how may player slots the server has if you’re trying to get to the point of a private garage for everyone on a full server but is certainly possible if you want to go that far.
There are tutorials out there on cloning / moving existing interiors you can check out.