Lua/HowTo/ServerEvents

From GTA Connected
Jump to navigation Jump to search

Event Handlers

To set a handler for an event, you'll need to use the AddHandler function. The function you use to handle events must follow the syntax shown in each event page, under the "Handler Syntax" section.

Event Object

Each event handler function has the first parameter as an event object. The event object has several properties, and allows you to specify how to handle the event. There is more information on the Event Object page.

Example

There will be a few examples listed here soon. Most of the server event pages have their own example, if you need a reference.

Notes

There are no extra notes for how to use events at this time.