feat(states): WIP handler for cacheing and setting states

Provide a centralised non-framework dependent interval to
track and perform tasks based on certain variables, such as
if the player is driving, in a vehicle, or walking.

Will later add a statebag change handler with callbacks, to
easily listen for state changes and use them in third-party
resources.
This commit is contained in:
Linden committed 2022-02-28 00:49:44 +00:00
1 parent 478cd93e97
commit 37032fe0dd
2 files changed
+65 -2

No files matched your search

+2 -2
View File
@@ -1,10 +1,10 @@
-- Creates exports from values assigned to lib
-- Hacky workaround for Lua Language Server support
--- Alias for `exports['pe-lualib']`
--- Alias for `exports.ox_lib`
lib = setmetatable({}, {
__newindex = function(self, name, fn)
exports(name, fn)
rawset(self, name, fn)
end
})
})