Envy is a tiny (0.4Kb) Javascript-style Event Emitter that helps you differentiate between MTA events and resource events.
It's so small that it can be dropped into any resource.
Drop Envy
into your resource, and initialize it as follows:
local EnvyEmitter = loadstring(Envy:new())()
Envy
exposes 3 methods to work with:
- .on(eventName, callback)
- .emit(eventName, payload)
- .once(eventName, payload)
MIT
If this project was helpful to you, you can buy me a beer if you feel like doing so. π