v2.1.0
Runs on QBCore and Qbox. Until this release the resource was ESX only, and it said so in its manifest.
The player object, MSK.Offline.GetPlayerTable and MSK.RegisterCommand are all
used in their 4.0.0 form. Update msk_core along with this script.
Added
-
Config.Commands.ausreise.startMoney. The balanceclear_moneysets is configured here now. It used to be read fromESX.GetConfig().StartingAccountMoney, which QBCore and Qbox do not have, and the account names differ too.cashandbankwork on every framework, the rest is passed through and skipped when the framework has no such account: ESX knowsblack_money, QBCore and Qbox knowcrypto.startMoney = {cash = 0,bank = 0,black = 0,},Add this to your configWithout the block
clear_moneydoes nothing instead of failing, so an old config file still starts. It just stops clearing the money.
Changed
-
es_extendedis no longer a dependency. It was listed independenciesand imported through@es_extended/imports.lua, so the resource refused to start on a server without ESX. Framework calls run through msk_core now. -
The character table is resolved instead of hardcoded. It is
userskeyed byidentifieron ESX andplayerskeyed bycitizenidon QBCore and Qbox.MSK.Offline.GetPlayerTable()answers that, and all four queries use it. -
/einreiseand/ausreiserun throughMSK.RegisterCommandinstead ofESX.RegisterCommand. Same behaviour, same argument validation, but it works on every framework and resolves the ace groups itself. -
The login and logout handlers listen to msk_core's events (
msk_core:playerLoaded,msk_core:playerLogout) instead ofesx:*. They are bound withAddEventHandler, notRegisterNetEvent, because they are server-local: as net events any client could fire them with an arbitrary player id and skew the admin counter. -
The appearance after admin mode is restored through whichever resource is running:
illenium-appearance,qb-clothingor the ESX pairing ofesx_skinandskinchanger. When none of them runs, the step is skipped rather than failing, because nothing changed the appearance in that case either. -
clear_inventoryandclear_weaponsboth go throughClearInventory(). Onox_inventoryweapons are items, so both switches end up doing the same thing on a modern setup.
Fixed
-
/reincrashed whenConfig.Locations.admin_outsideis'last_position'. It stored the position withxTarget.getCoords(true), an ESX method that the msk_core 4.0.0 player object does not have. -
/rausteleported into nowhere when no position had been stored, for example after a resource restart. It falls back to the configured location now instead of sending anilto the client. -
Both admin commands ran into a
nilplayer. They are plainRegisterCommand, so they can be typed in the server console, where there is no player to read a group from. -
The logout and drop handlers indexed a player that was already gone, which ended the handler before it could update the admin counter, so the counter drifted upward over a session.
playerDroppedis also a FiveM event now, not a framework one, and it takes only the reason. -
The
isNewcolumn was added to the wrong table on QBCore and Qbox. TheALTER TABLEwas hardcoded tousers, so it silently failed there and every player counted as not new from then on.
Changed files
fxmanifest.lua
config.lua
client/main.lua
server/main.lua
server/functions.lua