Lua/HowTo/ServerEvents

From GTA Connected
Revision as of 06:47, 14 August 2017 by Vortrex (talk | contribs) (Created page with "== 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.