feat(client): Add glovebox seat restriction#1964
Conversation
|
While it’s named glovebox it’s really just any sort of internal storage space, I.e under or in the back of a seat, center console, etc. Hence why it’s typically available in other vehicles that aren’t cars. Further customisation is best handled using hooks. |
|
Well, It's true that further customization can be done with hooks, but there are two main reason why making it this way I think it would be better:
By default it remains like it is, so it still works like now. Also with this addition we skip lots of code that it appears to be unnecessary if we want to make it work like a glovebox. If you still think it's a bad feature it's okey, but I think that adding this optional restriction is coherent and does not change the default behaviour. |
|
I think it would be a good option for those who want this, if it's not enabled by default, only those who want that touch of realism would activate it |
|
what do you think @thelindat ? |
Summary
This pull request updates how the glovebox inventory can be accessed in vehicles, introducing a new configuration option to restrict glovebox access based on the player's seat. The changes ensure that glovebox access can be limited to certain seats, improving gameplay control and realism.
Glovebox Access Restriction:
gloveboxseatrestriction, which can be set via theinventory:gloveboxseatrestrictionconvar. When enabled, only players in the driver or front passenger seats (seat -1 or 0) can open the glovebox.client.luato check the newgloveboxseatrestrictionsetting before allowing glovebox access, ensuring that seat restrictions are enforced when configured. [1] [2]* Summary has been made by AI