forked from JustGodWork/lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeclare.lua
206 lines (168 loc) · 4.57 KB
/
declare.lua
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
---@alias game
---|>'"common"' # Runs on any game, but can't access game-specific APIs - only CitizenFX APIs.
---|> '"gta4"' # Runs on LibertyM.
---|> '"gta5"' # Runs on FiveM.
---|> '"rdr3"' # Runs on RedM.
--- fxmanifest resource metadata
---
--- Resource citizenfx manifest version
---@param version string
function fx_version(version)end
--- fxmanifest resource metadata
---
--- Resource game version
---@param game game
function game(game)end
--- fxmanifest resource metadata
---
--- Resource games
---@param games game[]
function games(games)end
---@alias lua_version
---|>'yes' # Lua 5.4 GLM
---|> 'no' # CfxLua 5.3
--- fxmanifest resource metadata
---
--- Resource lua version use lua 5.4
---@param use_54 lua_version
function lua54(use_54)end
--- fxmanifest resource metadata
---@param resource_name string
function name(resource_name) end
---fxmanifest resource metadata
---@param url_string string
function url(url_string) end
--- fxmanifest resource metadata
---
--- Resource descriptor
---@param description string
function description(description)end
--- fxmanifest resource metadata
---
--- Resource author
---@param author string
function author(author)end
--- fxmanifest resource metadata
---
--- Resource repository
---@param repository string
function repository(repository)end
--- fxmanifest resource metadata
---
--- Resource version
---@param version string
function version(version)end
--- fxmanifest resource metadata
---
--- Resource files
---@param files string[]
function files(files)end
--- fxmanifest resource metadata
---
--- Resource file
---@param file string
function file(file)end
--- fxmanifest resource metadata
---
--- Resource shared scripts list
---@param shared_scripts table
function shared_scripts(shared_scripts)end
--- fxmanifest resource metadata
---
--- Resource shared script
---@param shared_script string
function shared_script(shared_script)end
--- fxmanifest resource metadata
---
--- Resource client scripts list
---@param client_scripts table
function client_scripts(client_scripts)end
--- fxmanifest resource metadata
---
--- Resource client script
---@param client_script string
function client_script(client_script)end
--- fxmanifest resource metadata
---
--- Resource server scripts list
---@param server_scripts table
function server_scripts(server_scripts)end
--- fxmanifest resource metadata
---
--- Resource server script
---@param server_script string
function server_script(server_script)end
--- fxmanifest resource metadata
---@param html_file string
function ui_page(html_file) end
--- fxmanifest resource metadata
---@param resource_symlink string
function provide(resource_symlink) end
--- fxmanifest resource metadata
---
--- Resource dependency list
---@param dependencies table
function dependencies(dependencies)end
--- fxmanifest resource metadata
---
--- Resource dependency
---@param dependency string
function dependency(dependency)end
---@param name string
---@param cb fun(...:any): void
---@overload ResourceExport[]
function exports(name, cb) end
---@class vector2
---@field public x number
---@field public y number
---@param x number
---@param y number
---@return vector2
function vector2(x, y) end
---@class vector3
---@field public x number
---@field public y number
---@field public z number
---@param x number
---@param y number
---@param z number
---@return vector3
function vector3(x, y, z) end
---@class vector4
---@field public x number
---@field public y number
---@field public z number
---@field public w number
---@param x number
---@param y number
---@param z number
---@param w number
---@return vector4
function vector4(x, y, z, w) end
---@class eventData
---@field public key number
---@field public name string
---@class deferrals
---@field public defer fun(): void
---@field public presentCard fun(card: table, cb: fun(data: table, rawData: string): void): void
---@field public update fun(message: string): void
---@field public done fun(failureReason: string): void
---@class StateBag
---@field public set fun(self: StateBag, key: string, value: any, replicated: boolean): void
---@field public get fun(self: StateBag, key: string): any
---@class GlobalState: StateBag
---@class Entity: StateBag
---@class Player: StateBag
---@class LocalPlayer: StateBag
---@class lib.database.schema.field
---@field public name string
---@field public type string
---@field public default? any
---@field public schema? lib.database.schema
---@class lib.DiscordField
---@field public name string
---@field public value string
---@field public inline boolean
---@class lib.DiscordSlashCommandChoice
---@field public name string
---@field public value string