-
Notifications
You must be signed in to change notification settings - Fork 0
/
MTA.d.ts
72 lines (58 loc) · 1.65 KB
/
MTA.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* returns a table of resource names containing all export functions
*/
declare const exports: table;
/**
* returns a resource element of the resource the snippet was executed in
*/
declare const resource: element;
/**
* returns a resource root element of the resource the snippet was executed in
*/
declare const resourceRoot: element;
/**
* returns the root element of the server
*/
declare const root: element;
/**
* returns the root element of all GUI elements.
*/
declare const guiRoot: element;
/**
* returns the player element of the local player.
*/
declare const localPlayer: element;
/**
* The player or element the event was attached to
*/
declare const source: element;
/**
* the name of the event ("onResourceStart", "onPlayerWasted" etc.)
*/
declare const eventName: string;
/**
* the client that called the event
*/
declare const client: element;
/**
* the root of the resource that called the event
*/
declare const sourceResourceRoot: element;
/**
* the resource that called the event
*/
declare const sourceResource: element;
/**
* current timer in callback function.
*/
declare const sourceTimer: element;
declare function addCommandHandler(commandName: string, handlerFunction: Function, restricted?: false, caseSensitive?: true): boolean
declare function addCommandHandler(commandName: string, handlerFunction: Function, caseSensitive?: true): boolean
/**
* **SERVER SIDE**
*/
declare function outputChatBox(text: string, visibleTo?: element, r?: 231, g?: 217, b?: 176, colorCoded?: false): boolean
/**
* **CLIENT SIDE**
*/
declare function outputChatBox(text: string, r?: 231, g?: 217, b?: 176, colorCoded?: false): boolean