forked from multitheftauto/wiki.multitheftauto.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddEvent.yaml
More file actions
22 lines (22 loc) · 959 Bytes
/
addEvent.yaml
File metadata and controls
22 lines (22 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
shared:
name: addEvent
description: This function allows you to register a custom [event](/reference/Event_System "Event").
Custom events function exactly like the built\-in events. See [event system](/reference/Event_System
"Event system") for more information on the event system.
parameters:
- name: eventName
type: string
description: The name of the event you wish to create.
- name: allowRemoteTrigger
type: bool
description: A boolean specifying whether this event can be called remotely using
[[triggerClientEvent]] / [[triggerServerEvent]] or not.
default: 'false'
examples:
- path: examples/addEvent-1.lua
description: This example will define a new event.
returns:
values:
- type: bool
name: result
description: Returns **true** if the event was added successfully, otherwise **false** if the event already exists **built-in game events** or if it fails for any other reason.