Skip to content

πŸ˜‘ The Javascript style Event Emitter in MTA:SA

Notifications You must be signed in to change notification settings

molnarmark/envy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ˜‘ Envy

Open Source Love Open Source Love PRs Welcome

What is Envy?

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.

Getting Started

Drop Envy into your resource, and initialize it as follows:

local EnvyEmitter = loadstring(Envy:new())()

The API

Envy exposes 3 methods to work with:

  • .on(eventName, callback)
  • .emit(eventName, payload)
  • .once(eventName, payload)

License

MIT

Fancy buying me a beer?

If this project was helpful to you, you can buy me a beer if you feel like doing so. πŸ™‚

paypal

Releases

No releases published

Packages

No packages published

Languages