Repository navigation
Releases
v3.2.1
Requires msk_core 4.1.0
Uses the table forms that msk_core 4.1.0 introduced, so the deprecation warnings in the server console are gone. The notifications are sent as a table, which an older msk_core takes as the title. Update msk_core along with this script.
Added
- The msk_core version is checked on start.
MSK.Check.Dependency('msk_core', '4.1.0', true)logs an error in the server console when msk_core is older, instead of leaving you to wonder why the notifications look wrong. (server/versionchecker.lua)
Changed
Config.Notificationpasses a table toMSK.Notification. The form with title, message, type and duration is deprecated since msk_core 4.1.0 and logs a warning once per resource. If you keep your own config, change the twoMSK.Notificationlines the same way. Leaving them works too, the old form is still accepted for now. (config.lua)
Changed files
fxmanifest.lua
config.lua
server/versionchecker.lua
v3.2.0
Requires msk_core 4.0.0
This release uses the rewritten bridge: the unified player object, MSK.VehicleStore
and MSK.RegisterItem. On msk_core 3.x none of the three answers in this form.
Update msk_core along with this script.
ox_lib is a dependency now, es_extended is not.
Changed
-
es_extendedis no longer a dependency. It was listed independencies
and imported through@es_extended/imports.lua, so the resource refused to
start on any server without ESX.@ox_lib/init.luatakes its place.
(fxmanifest.lua) -
Every database access goes through
MSK.VehicleStore. This resource wrote
owned_vehiclesdirectly, with ESX column names. QBCore and Qbox use
player_vehicles, keep the properties inmodsand the spawn name in its own
column, so the old queries would not have found or written a single row there.
Insert, spawn, delete, move and the owner change all go through the store now.
(server/main.lua) -
Vehicle properties are read and written in the format of the running
framework. ESX has its own layout, QBCore and Qbox use the one fromox_lib,
and these properties end up in the framework's vehicle table where every garage
on the server reads them back. Handing an ox_lib table to an ESX garage
produces a vehicle without mods, with wrong colours, or none at all. ESX is
fetched lazily when it is actually the running framework, everything else uses
lib.getVehiclePropertiesandlib.setVehicleProperties.
(client/main.lua) -
Spawning and deleting no longer go through
ESX.Game. On anything but ESX
the vehicle is created withlib.requestModelandCreateVehicle, and removed
withDeleteVehicleplus anDeleteEntityfallback.
(client/main.lua) -
Usable items are registered through
MSK.RegisterItem, which covers ESX,
QBCore and Qbox in one call, instead ofESX.RegisterUsableItem.
(server/items.lua) -
Player lookups and the item removal after a give run through the unified player
object (MSK.GetPlayer,player.RemoveItem).
(server/main.lua, server/admin/api.lua, server/admin/permissions.lua)
Changed files
fxmanifest.lua
client/main.lua
server/main.lua
server/items.lua
server/admin/api.lua
server/admin/permissions.lua
v3.1.1
Dashboard Access on ESX, QBCore and Qbox
Fixed
-
Admins could not open the dashboard even though their
server.cfggave them
the group. Two things were stacked on top of each other here. First, FiveM
keeps principals and ace objects apart: a line likeadd_principal identifier.license:xxx group.adminonly makes that player a member of the
group, it does not create the ace object of the same name that the check was
looking for. Unless someone had also writtenadd_ace group.admin group.admin allowby hand, the check came back empty. Second, the frameworks do not even
agree on how a group principal is named: ESX and Qbox usegroup.admin, QBCore
usesqbcore.admin, and that is not something you can configure away, it is
what/addpermissionandQBCore.Functions.AddPermissionwrite. QBCore also
only ever linksqbcore.godtogroup.admin, so anyone below god level was a
member of nogroup.*principal at all. On ESX this often stayed invisible
because the group from theuserstable caught it, and that fallback does not
exist on QBCore. The script now registers its own ace object per group on start
and points both spellings at it, foradmin, for every group in
Config.dashboardGroupsand for every group in the permission matrix. So a
plainadd_principal ... group.modand a/addpermission 1 modboth get you
in, and groups you add on the Permissions tab are covered right away without a
restart. (fxmanifest.lua, server/admin/permissions.lua, server/admin/boot.lua,
server/admin/api.lua) -
Checking a group name on the Permissions tab reported "not found" for brand
new groups. The check ran before the group existed as an ace object, so it
could never find anyone in it. The group is registered first now.
(server/admin/api.lua) -
Access denied for command add_acespam on every server start. FiveM checks
add_aceagainst the resource that runs it, and no resource holds that right by
default, so the ace objects were never actually created. Every attempt was refused
and only printed an error. On ESX this went unnoticed because the framework group
caught it. The aces are registered through msk_core now, which is the one resource
your server.cfg already grants that right, and the script checks up front whether it
is allowed instead of spamming the console.
(server/admin/permissions.lua)
Requires msk_core 3.3.0
This release uses MSK.AddRawAce and MSK.CanAddAce, both added in msk_core 3.3.0.
Update msk_core along with this script, and make sure your server.cfg has the msk_core
ace lines. They are the ones the msk_core documentation has always listed and they
cover every MSK script at once:
add_ace resource.msk_core command.add_ace allow
add_ace resource.msk_core command.remove_ace allow
add_ace resource.msk_core command.add_principal allow
add_ace resource.msk_core command.remove_principal allowIf they are missing nothing breaks, the script says so on start and group access falls
back to your framework group.
There is nothing to rebuild and no database change. Replace the resource files and
restart it.
v3.1.0
v3.1.0
Added
-
Change the owner of a vehicle that already exists. Until now a vehicle could
only be made society owned at the moment it was handed out, through the
Job Vehicle tab. Everything that was already in the database was stuck the way
it had been created. The Vehicles tab now has a new row action (the building
icon) that opens an Ownership dialog: pick Player or Job / Society,
pick the job, and save. Society owned means theownercolumn holds the job name
instead of a player identifier, exactly like_givejobveh <...> 1writes it, so
ESX and msk_garage treat the row as a faction vehicle and every member of the job
can use it. Switching back to a player works through the online player picker, or
through a typed identifier when the owner is offline. (server/main.lua,
server/admin/api.lua, client/admin/nui.lua, web/src/admin/VehiclesTab.tsx,
web/src/admin/i18n.ts, web/src/admin/AdminApp.tsx, web/src/admin/devMock.ts,
html/**) -
Society vehicles are visible at a glance. The owner column in the vehicle
browser shows a green JOB / SOCIETY badge instead of a player name whenever
the row belongs to a job, and the ownership button of those rows is highlighted
in the accent colour. (web/src/admin/VehiclesTab.tsx) -
New permission
vehicle.owner("Change owner" / "Besitzer ändern"), listed in
the Permissions tab like every other right.group.admingets it automatically.
Your own groups do not — open the Permissions tab once, tick the new right for
the groups that should have it and save. Without the right the button simply is
not rendered, and the server refuses the call as well.
(shared/admin_perms.lua, web/src/admin/i18n.ts) -
New server console command
_setvehowner, so the console can do everything the
dashboard can do, same as with every other action:_setvehowner job police "ABC 123" _setvehowner player char1:abcd1234 "ABC 123"The command name is configurable through
Config.ConsoleCommands.setvehowner.
Older config files without that key keep working, the command then falls back to
_setvehowner. (config.lua, server/commands.lua)
Changed
- Vehicle keys follow the owner. When the ownership of a vehicle changes and
Config.VehicleKeys.enableis on, every key for that plate is removed and a fresh
key is handed to the new owner (player identifier or job name), through the same
auto-detected key adapter that give and spawn already use. (server/main.lua) - The Vehicles tab now also opens for admins who only hold
vehicle.ownerand
none of the other vehicle rights. (web/src/admin/AdminApp.tsx)
Notes
- Switching a player vehicle to society overwrites the
ownercolumn, so the
original player identifier is gone afterwards. That is why the dialog has the
identifier field, it is the way back for an owner who is not online. - Setting the owner type to Player with the job left on "no job" clears the
job
column to a realNULL, which turns a faction vehicle back into a plain private
vehicle.
Changed files
CHANGELOG.md
VERSION
fxmanifest.lua
config.lua
translation.lua
shared/admin_perms.lua
server/main.lua
server/commands.lua
server/admin/api.lua
client/admin/nui.lua
html/index.html
html/assets/*
web/package.json
web/src/admin/AdminApp.tsx
web/src/admin/VehiclesTab.tsx
web/src/admin/devMock.ts
web/src/admin/i18n.ts
v3.0.0
- Added an in-game Admin Dashboard (/givevehadmin, command name configurable): give, spawn, delete and manage vehicles visually - the old in-game commands have been replaced by it (the server console commands stay)
- Settings, permissions and item vehicles are now stored in the database (seeded once from your config on first start) and are live-editable in the dashboard without a restart
- Added a group & permission system: 9 rights (give / job-give / spawn / delete / move / browse / items / settings / permissions); group.admin always has everything, group.user can never open the dashboard, other groups are managed via a dashboard-group whitelist
- Added a vehicle browser with server-side search & pagination, built for large servers: filter by owner / player name / plate / model / type without ever loading the whole owned_vehicles table
- Every give now checks for a duplicate plate before insert and aborts with an error message instead of creating a broken entry
- Vehicle keys are now given automatically on give/spawn and removed on delete; the key script is auto-detected (msk_vehiclekeys / VehicleKeyChain / vehicles_keys) and toggleable in Settings
- msk_garage integration (only shown when msk_garage is running): pick a target garage when giving, filter the browser by garage, and move a vehicle from one garage to another; an empty target garage uses the msk_garage default garage for the vehicle's category
- The fuel system is now selectable from a dropdown (statebag / ox_fuel / msk_fuel / LegacyFuel / qs-fuelstations / native / custom)
- Added UI color customization with live preview and an editable brand tag, plus a language switch (DE / EN)
- Switched the license to LGPL-3.0 (same as msk_core)
Update v2.0.4
- Fixed Command delveh
- Added Support for msk_vehiclekeys