v5.4.0
- Added a faction filter to the garage: a toggle next to the favorites filter narrows the park-out list down to the job vehicles of that garage, turning it off shows everything again. It always starts off when the garage is opened, and the button is hidden when the list holds no job vehicles at all (Job vehicles)
- Added a second-key badge on the vehicle card in the garage and the impound:
vehicles you only see because you hold a key now show "Key from <owner name>",
or a neutral "Second key" when the name is hidden or cannot be resolved. The name
can be switched off in Settings → Faction vehicles & keys
(
Config.showKeyOwnerName, on by default) and is resolved by the newUtils.GetOwnerNameinshared/utils.lua(online player first, then the ESXuserstable), cached for five minutes. That function is not escrow-protected, so another framework oruserslayout can be wired up by rewriting its body - Added an option to delete faction vehicles when their owner leaves the job
(
Config.deleteJobVehiclesOnJobChange, off by default): every vehicle the player personally owns and that is registered on the job they left is removed for good. Hooked to the serverside ESX eventesx:setJob, which cannot be faked from a client. A pure grade change does nothing and society vehicles are never touched (Job vehicles) - Added the serverside hook
msk_garage:jobVehiclesDeleted(identifier, jobName, plates)inserver/handler.luaso you can clean up anything else referencing those plates - Added
Keys.RemoveAllKeys(identifier, plate), which drops the keys of a plate through the adapter of the key script you configured. ThejobVehiclesDeletedhook uses it out of the box, so deleted job vehicles no longer leave orphaned keys behind. Implemented for all three supported scripts: msk_vehiclekeys (RemoveAllExistingKeys) and VehicleKeyChain (RemoveAllKeysUsingPlate) remove the keys of all players for that plate, vehicles_keys only exposes a per-owner remove (removeKeysFromIdentifier) and therefore leaves second-key holders alone (Job vehicles)
Changed files
fxmanifest.lua
config/settings.lua
shared/utils.lua
shared/admin_perms.lua
server/main.lua
server/vehicles.lua
server/garages.lua
server/handler.lua
server/keys/init.lua
server/keys/msk_vehiclekeys.lua
server/keys/VehicleKeyChain.lua
server/keys/vehicles_keys.lua
client/nui.lua
locales/de.lua
locales/en.lua
locales/es.lua
locales/fr.lua
locales/hu.lua
locales/pl.lua
locales/pt.lua
html/index.html
html/assets/*
web/src/App.tsx
web/src/devMock.ts
web/src/i18n/types.ts
web/src/components/SearchBar.tsx
web/src/components/VehicleCard.tsx
web/src/admin/SettingsTab.tsx
web/src/admin/i18n.ts
web/src/admin/types.ts