v3.0.1
Fixed
-
QBCore item functions were unreachable and crashed
MSK.GetPlayer(). On QBCore the player wrapper read the item helpers fromself.PlayerData.Functions, which isnil(QBCore exposes them onPlayer.Functions). Any command or script that resolved a player and then usedAddItem,RemoveItem,HasItemorGetItemcrashed withattempt to index a nil value (field 'Functions'). They now read fromself.Functions, consistent with the rest of the wrapper. -
Eager loading a module could break other resources or double its effects. A few modules registered their shared, core owned listeners (net events, callbacks, commands, background threads) unconditionally. When another resource eager loaded such a module through its
fxmanifest.lua, for examplemsk_core 'Notify', a second copy of those listeners started inside that resource and interfered server wide. Every module now guards its shared registrations so they run only inside msk_core, while your resource keeps the full API through the export proxy. This makes every module safe to eager load. Concretely it fixes:- Callback: a second responder answered
callbackNotFoundfor other resources' callbacks and broke them. - Notify: notifications were shown twice, once per eager loading resource.
- Command and Ace: the player and ace permission callbacks were re registered onto the core with a closure pointing back into the consumer, so they broke once that resource stopped.
- Entities: a second death detection handler reported every death twice.
- Vehicle: a second thread reported every vehicle enter and exit twice.
- DisconnectLogger: disconnects were logged and drawn more than once.
- Ban: bans were enforced twice and the
/banand/unbancommands were registered a second time. - Cron: a second tick loop and listener could run a cron job twice.
- Callback: a second responder answered
-
MSK.Croncould not be used from other resources. The Cron module returnedtrue, which the loader cached over theMSK.Crontable, so onlyMSK.CreateCronandMSK.DeleteCronwere reachable. It now returns the table, soMSK.Cron.CreateandMSK.Cron.Deletework everywhere as documented.
This is a pure logic fix, there is nothing to rebuild and the NUI is unchanged. Replace the resource files as usual and restart msk_core.
Changed files
bridge/qbcore/server.lua
modules/Callback/shared.lua
modules/Callback/client.lua
modules/Callback/server.lua
modules/Notify/client.lua
modules/Command/server.lua
modules/Ace/server.lua
modules/Entities/client.lua
modules/Vehicle/client.lua
modules/DisconnectLogger/client.lua
modules/DisconnectLogger/server.lua
modules/Ban/server.lua
modules/Cron/server.lua
fxmanifest.lua