Skip to main content

v3.0.1

Fixed

  • QBCore item functions were unreachable and crashed MSK.GetPlayer(). On QBCore the player wrapper read the item helpers from self.PlayerData.Functions, which is nil (QBCore exposes them on Player.Functions). Any command or script that resolved a player and then used AddItem, RemoveItem, HasItem or GetItem crashed with attempt to index a nil value (field 'Functions'). They now read from self.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 example msk_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 callbackNotFound for 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 /ban and /unban commands were registered a second time.
    • Cron: a second tick loop and listener could run a cron job twice.
  • MSK.Cron could not be used from other resources. The Cron module returned true, which the loader cached over the MSK.Cron table, so only MSK.CreateCron and MSK.DeleteCron were reachable. It now returns the table, so MSK.Cron.Create and MSK.Cron.Delete work 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