@tlua/gmod 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/__metadata.json +4 -0
- package/_globals.d.tlua +178 -0
- package/_gmod-std.d.tlua +35 -0
- package/achievementicon.d.tlua +12 -0
- package/achievements.d.tlua +162 -0
- package/ai.d.tlua +65 -0
- package/ai_schedule.d.tlua +17 -0
- package/ai_task.d.tlua +17 -0
- package/angle.d.tlua +197 -0
- package/avatarimage.d.tlua +10 -0
- package/awesomium.d.tlua +14 -0
- package/baseclass.d.tlua +42 -0
- package/bf_read.d.tlua +110 -0
- package/bit.d.tlua +121 -0
- package/button.d.tlua +13 -0
- package/cam.d.tlua +220 -0
- package/ceffectdata.d.tlua +337 -0
- package/chat.d.tlua +62 -0
- package/checkbutton.d.tlua +14 -0
- package/cleanup.d.tlua +88 -0
- package/cluaemitter.d.tlua +119 -0
- package/clualocomotion.d.tlua +383 -0
- package/cluaparticle.d.tlua +426 -0
- package/cmovedata.d.tlua +476 -0
- package/cnavarea.d.tlua +845 -0
- package/cnavladder.d.tlua +209 -0
- package/cnewparticleeffect.d.tlua +259 -0
- package/color.d.tlua +339 -0
- package/concommand.d.tlua +69 -0
- package/constraint.d.tlua +311 -0
- package/construct.d.tlua +26 -0
- package/contentheader.d.tlua +32 -0
- package/contenticon.d.tlua +86 -0
- package/contentsidebar.d.tlua +45 -0
- package/contentsidebartoolbox.d.tlua +13 -0
- package/contextbase.d.tlua +37 -0
- package/controlpanel.d.tlua +140 -0
- package/controlpresets.d.tlua +118 -0
- package/convar.d.tlua +162 -0
- package/cookie.d.tlua +60 -0
- package/coroutine.d.tlua +90 -0
- package/crecipientfilter.d.tlua +152 -0
- package/csent.d.tlua +10 -0
- package/csoundpatch.d.tlua +150 -0
- package/ctakedamageinfo.d.tlua +366 -0
- package/ctrllistbox.d.tlua +12 -0
- package/ctrlnumpad.d.tlua +73 -0
- package/cusercmd.d.tlua +320 -0
- package/custom_classes.d.tlua +65 -0
- package/custom_entity_fields.d.tlua +96 -0
- package/cvars.d.tlua +80 -0
- package/dadjustablemodelpanel.d.tlua +81 -0
- package/dalphabar.d.tlua +27 -0
- package/dbinder.d.tlua +37 -0
- package/dbubblecontainer.d.tlua +18 -0
- package/dbutton.d.tlua +88 -0
- package/dcategoryheader.d.tlua +13 -0
- package/dcategorylist.d.tlua +11 -0
- package/dcheckbox.d.tlua +46 -0
- package/dcheckboxlabel.d.tlua +90 -0
- package/dcollapsiblecategory.d.tlua +240 -0
- package/dcolorbutton.d.tlua +73 -0
- package/dcolorcombo.d.tlua +54 -0
- package/dcolorcube.d.tlua +137 -0
- package/dcolormixer.d.tlua +303 -0
- package/dcolorpalette.d.tlua +294 -0
- package/dcolumnsheet.d.tlua +49 -0
- package/dcombobox.d.tlua +161 -0
- package/ddragbase.d.tlua +151 -0
- package/ddrawer.d.tlua +72 -0
- package/debug.d.tlua +236 -0
- package/debugoverlay.d.tlua +193 -0
- package/dentityproperties.d.tlua +63 -0
- package/derma.d.tlua +119 -0
- package/dexpandbutton.d.tlua +30 -0
- package/dfilebrowser.d.tlua +228 -0
- package/dform.d.tlua +176 -0
- package/dframe.d.tlua +261 -0
- package/dgrid.d.tlua +113 -0
- package/dhorizontaldivider.d.tlua +196 -0
- package/dhorizontalscroller.d.tlua +104 -0
- package/dhscrollbar.d.tlua +109 -0
- package/dhtml.d.tlua +91 -0
- package/dhtmlcontrols.d.tlua +62 -0
- package/diconbrowser.d.tlua +113 -0
- package/diconlayout.d.tlua +190 -0
- package/dimage.d.tlua +221 -0
- package/dimagebutton.d.tlua +103 -0
- package/dkillicon.d.tlua +9 -0
- package/dlabel.d.tlua +385 -0
- package/dlabeleditable.d.tlua +51 -0
- package/dlabelurl.d.tlua +100 -0
- package/dlistbox.d.tlua +82 -0
- package/dlistboxitem.d.tlua +42 -0
- package/dlistlayout.d.tlua +14 -0
- package/dlistview.d.tlua +360 -0
- package/dlistview_column.d.tlua +135 -0
- package/dlistview_columnplain.d.tlua +11 -0
- package/dlistview_draggerbar.d.tlua +11 -0
- package/dlistview_line.d.tlua +140 -0
- package/dlistviewheaderlabel.d.tlua +11 -0
- package/dlistviewlabel.d.tlua +11 -0
- package/dlistviewline.d.tlua +11 -0
- package/dmenu.d.tlua +266 -0
- package/dmenubar.d.tlua +42 -0
- package/dmenuoption.d.tlua +135 -0
- package/dmenuoptioncvar.d.tlua +64 -0
- package/dmodelpanel.d.tlua +207 -0
- package/dmodelselect.d.tlua +20 -0
- package/dmodelselectmulti.d.tlua +19 -0
- package/dnotify.d.tlua +93 -0
- package/dnumberscratch.d.tlua +284 -0
- package/dnumberwang.d.tlua +147 -0
- package/dnumpad.d.tlua +11 -0
- package/dnumslider.d.tlua +182 -0
- package/dpanel.d.tlua +152 -0
- package/dpanellist.d.tlua +109 -0
- package/dpaneloverlay.d.tlua +65 -0
- package/dpanelselect.d.tlua +13 -0
- package/dpanpanel.d.tlua +64 -0
- package/dprogress.d.tlua +27 -0
- package/dproperties.d.tlua +52 -0
- package/dproperty_boolean.d.tlua +12 -0
- package/dproperty_combo.d.tlua +31 -0
- package/dproperty_entity.d.tlua +12 -0
- package/dproperty_float.d.tlua +12 -0
- package/dproperty_generic.d.tlua +50 -0
- package/dproperty_int.d.tlua +12 -0
- package/dproperty_vectorcolor.d.tlua +14 -0
- package/dpropertysheet.d.tlua +167 -0
- package/dragndrop.d.tlua +123 -0
- package/draw.d.tlua +162 -0
- package/drgbpicker.d.tlua +49 -0
- package/drive.d.tlua +159 -0
- package/dscrollbargrip.d.tlua +13 -0
- package/dscrollpanel.d.tlua +110 -0
- package/dshape.d.tlua +72 -0
- package/dsizetocontents.d.tlua +46 -0
- package/dslider.d.tlua +302 -0
- package/dsprite.d.tlua +84 -0
- package/dtab.d.tlua +81 -0
- package/dtextentry.d.tlua +442 -0
- package/dtilelayout.d.tlua +218 -0
- package/dtooltip.d.tlua +76 -0
- package/dtree.d.tlua +185 -0
- package/dtree_node.d.tlua +793 -0
- package/dtree_node_button.d.tlua +13 -0
- package/duplicator.d.tlua +338 -0
- package/dverticaldivider.d.tlua +223 -0
- package/dvscrollbar.d.tlua +109 -0
- package/editablepanel.d.tlua +10 -0
- package/effect.d.tlua +121 -0
- package/effects.d.tlua +77 -0
- package/engine.d.tlua +248 -0
- package/entity.d.tlua +8295 -0
- package/ents.d.tlua +267 -0
- package/enums.d.tlua +7082 -0
- package/file.d.tlua +419 -0
- package/file_class.d.tlua +7 -0
- package/fingerposer.d.tlua +12 -0
- package/fingervar.d.tlua +13 -0
- package/frame.d.tlua +11 -0
- package/frame_blend.d.tlua +105 -0
- package/game.d.tlua +482 -0
- package/gameevent.d.tlua +968 -0
- package/gamemode.d.tlua +48 -0
- package/global.d.tlua +3156 -0
- package/gm.d.tlua +3218 -0
- package/gmod.d.tlua +20 -0
- package/gmsave.d.tlua +53 -0
- package/gui.d.tlua +232 -0
- package/gwen.d.tlua +55 -0
- package/halo.d.tlua +42 -0
- package/hammer.d.tlua +17 -0
- package/hook.d.tlua +64 -0
- package/html.d.tlua +22 -0
- package/http.d.tlua +72 -0
- package/iconeditor.d.tlua +130 -0
- package/igmodaudiochannel.d.tlua +419 -0
- package/imagecheckbox.d.tlua +48 -0
- package/imaterial.d.tlua +288 -0
- package/imesh.d.tlua +70 -0
- package/index.d.tlua +277 -0
- package/input.d.tlua +252 -0
- package/invalidateinternalentitycache.d.tlua +13 -0
- package/irestore.d.tlua +94 -0
- package/isave.d.tlua +94 -0
- package/itexture.d.tlua +108 -0
- package/ivideowriter.d.tlua +53 -0
- package/jit.d.tlua +243 -0
- package/killicon.d.tlua +84 -0
- package/label.d.tlua +20 -0
- package/language.d.tlua +26 -0
- package/list.d.tlua +112 -0
- package/makeballoon.d.tlua +15 -0
- package/markup.d.tlua +38 -0
- package/markupobject.d.tlua +53 -0
- package/material.d.tlua +9 -0
- package/math.d.tlua +899 -0
- package/matproxy.d.tlua +60 -0
- package/matselect.d.tlua +106 -0
- package/menu.d.tlua +20 -0
- package/menubar.d.tlua +39 -0
- package/mesh.d.tlua +183 -0
- package/modelimage.d.tlua +12 -0
- package/motionsensor.d.tlua +115 -0
- package/navmesh.d.tlua +274 -0
- package/net.d.tlua +639 -0
- package/nextbot.d.tlua +380 -0
- package/notification.d.tlua +35 -0
- package/npc.d.tlua +1787 -0
- package/numpad.d.tlua +89 -0
- package/os.d.tlua +56 -0
- package/package.d.tlua +15 -0
- package/package.json +18 -0
- package/panel.d.tlua +3650 -0
- package/panellist.d.tlua +13 -0
- package/pathfollower.d.tlua +301 -0
- package/permissions.d.tlua +77 -0
- package/physcollide.d.tlua +40 -0
- package/physenv.d.tlua +136 -0
- package/physobj.d.tlua +799 -0
- package/pixelvis_handle_t.d.tlua +9 -0
- package/player.d.tlua +3320 -0
- package/player_manager.d.tlua +147 -0
- package/preseteditor.d.tlua +13 -0
- package/presets.d.tlua +79 -0
- package/projectedtexture.d.tlua +553 -0
- package/properties.d.tlua +65 -0
- package/propselect.d.tlua +50 -0
- package/radiobutton.d.tlua +13 -0
- package/render.d.tlua +1700 -0
- package/resource.d.tlua +73 -0
- package/richtext.d.tlua +17 -0
- package/sandbox.d.tlua +576 -0
- package/saverestore.d.tlua +148 -0
- package/schedule.d.tlua +69 -0
- package/scripted_ents.d.tlua +124 -0
- package/search.d.tlua +26 -0
- package/serverlist.d.tlua +85 -0
- package/slidebar.d.tlua +12 -0
- package/slider.d.tlua +11 -0
- package/sound.d.tlua +140 -0
- package/spawnicon.d.tlua +95 -0
- package/spawnmenu.d.tlua +286 -0
- package/spawnmenucontentpanel.d.tlua +52 -0
- package/sql.d.tlua +154 -0
- package/stack.d.tlua +57 -0
- package/steamworks.d.tlua +208 -0
- package/string.d.tlua +535 -0
- package/structures.d.tlua +4442 -0
- package/surface.d.tlua +463 -0
- package/surfaceinfo.d.tlua +70 -0
- package/system.d.tlua +134 -0
- package/table.d.tlua +533 -0
- package/task.d.tlua +92 -0
- package/team.d.tlua +195 -0
- package/textentry.d.tlua +12 -0
- package/tgaimage.d.tlua +11 -0
- package/timer.d.tlua +198 -0
- package/tool.d.tlua +466 -0
- package/ugcpublishwindow.d.tlua +83 -0
- package/umsg.d.tlua +147 -0
- package/undo.d.tlua +122 -0
- package/urllabel.d.tlua +13 -0
- package/usermessage.d.tlua +48 -0
- package/utf8.d.tlua +89 -0
- package/util.d.tlua +1087 -0
- package/vector.d.tlua +413 -0
- package/vehicle.d.tlua +472 -0
- package/vgui.d.tlua +201 -0
- package/video.d.tlua +17 -0
- package/vmatrix.d.tlua +392 -0
- package/weapon.d.tlua +913 -0
- package/weapons.d.tlua +90 -0
- package/widgets.d.tlua +29 -0
- package/workshopfilebase.d.tlua +68 -0
package/gameevent.d.tlua
ADDED
|
@@ -0,0 +1,968 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Used to interface with the built-in game events system.
|
|
5
|
+
*
|
|
6
|
+
* **NOTE**: All Serverside gameevents are networked and called clientside. It could happen that a gameevent is called twice because of this like [OnRequestFullUpdate](https://wiki.facepunch.com/gmod/gameevent/OnRequestFullUpdate).
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* The following is a list of all available game events.
|
|
10
|
+
*
|
|
11
|
+
*
|
|
12
|
+
* @source https://wiki.facepunch.com/gmod/gameevent
|
|
13
|
+
*/
|
|
14
|
+
declare gameevent: GameeventLib;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Called when a player requests a full update from the server.
|
|
18
|
+
* Called Clientside when the Update is received or when another player requested a full update.
|
|
19
|
+
*
|
|
20
|
+
* **NOTE**: When this event is called the first time for a client, [net](https://wiki.facepunch.com/gmod/net) messages will be reliably received by the client.
|
|
21
|
+
* This gameevent is called twice for the player, because it is first called serverside and networked, but then also called clientside.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* If `sv_parallel_sendsnapshot` is enabled, then this gameevent **won't** be called reliably since currently gmod discards of gameevents from other threads.
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
* @realm shared and menu
|
|
29
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/OnRequestFullUpdate
|
|
30
|
+
*/
|
|
31
|
+
interface OnRequestFullUpdate {
|
|
32
|
+
/**
|
|
33
|
+
* The SteamID the player has. Will be `BOT` for bots and `STEAM_0:0:0` in single-player.
|
|
34
|
+
*/
|
|
35
|
+
networkid: string;
|
|
36
|
+
/**
|
|
37
|
+
* The Player:Nick the player has.
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* The Player:UserID the player has.
|
|
42
|
+
*/
|
|
43
|
+
userid: number;
|
|
44
|
+
/**
|
|
45
|
+
* The Entity:EntIndex of the player, minus one.
|
|
46
|
+
*/
|
|
47
|
+
index: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Called when a player earns an achievement.
|
|
52
|
+
*
|
|
53
|
+
* @realm shared and menu
|
|
54
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/achievement_earned
|
|
55
|
+
*/
|
|
56
|
+
interface achievement_earned {
|
|
57
|
+
/**
|
|
58
|
+
* The achievement ID.
|
|
59
|
+
*/
|
|
60
|
+
achievement: number;
|
|
61
|
+
/**
|
|
62
|
+
* The Player:UserID of the player.
|
|
63
|
+
*/
|
|
64
|
+
player: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Called when a player makes progress on an achievement.
|
|
69
|
+
*
|
|
70
|
+
* **NOTE**: Only called clientside for the player who made progress.
|
|
71
|
+
*
|
|
72
|
+
*
|
|
73
|
+
* @realm client and menu
|
|
74
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/achievement_event
|
|
75
|
+
*/
|
|
76
|
+
interface achievement_event {
|
|
77
|
+
/**
|
|
78
|
+
* the name of the achievement.
|
|
79
|
+
*/
|
|
80
|
+
achievement_name: string;
|
|
81
|
+
/**
|
|
82
|
+
* amount of steps toward achievement.
|
|
83
|
+
*/
|
|
84
|
+
cur_val: number;
|
|
85
|
+
/**
|
|
86
|
+
* total amount of steps in achievement.
|
|
87
|
+
*/
|
|
88
|
+
max_val: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Called when a func_break is broken by a player.
|
|
93
|
+
*
|
|
94
|
+
* @realm shared and menu
|
|
95
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/break_breakable
|
|
96
|
+
*/
|
|
97
|
+
interface break_breakable {
|
|
98
|
+
/**
|
|
99
|
+
* The Entity:EntIndex of the broken prop.
|
|
100
|
+
*/
|
|
101
|
+
entindex: number;
|
|
102
|
+
/**
|
|
103
|
+
* The Player:UserID of the connected player.
|
|
104
|
+
*/
|
|
105
|
+
userid: number;
|
|
106
|
+
/**
|
|
107
|
+
* Material index of the broken entity.
|
|
108
|
+
*/
|
|
109
|
+
material: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Called when a prop_dynamic or prop_physics is broken by a player.
|
|
114
|
+
*
|
|
115
|
+
* @realm shared and menu
|
|
116
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/break_prop
|
|
117
|
+
*/
|
|
118
|
+
interface break_prop {
|
|
119
|
+
/**
|
|
120
|
+
* The Entity:EntIndex of the broken prop.
|
|
121
|
+
*/
|
|
122
|
+
entindex: number;
|
|
123
|
+
/**
|
|
124
|
+
* The Player:UserID of the connected player. Seems to be 0 every time.
|
|
125
|
+
*/
|
|
126
|
+
userid: number;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Called when trying to connect to a Server.
|
|
131
|
+
*
|
|
132
|
+
* **NOTE**: This is only available in the Menu state because this is called before the Client State has even started.
|
|
133
|
+
* When this is event is called, it will reset [engine.TickCount](https://wiki.facepunch.com/gmod/engine.TickCount) back to **1**.
|
|
134
|
+
*
|
|
135
|
+
*
|
|
136
|
+
* @realm menu
|
|
137
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/client_beginconnect
|
|
138
|
+
*/
|
|
139
|
+
interface client_beginconnect {
|
|
140
|
+
/**
|
|
141
|
+
* The Server address. Will be `localhost:27015` in hosted games.
|
|
142
|
+
*/
|
|
143
|
+
address: string;
|
|
144
|
+
/**
|
|
145
|
+
* The IP of the Server. Will be `16777343` in hosted games. Use the `address` instead of this.
|
|
146
|
+
*/
|
|
147
|
+
ip: number;
|
|
148
|
+
/**
|
|
149
|
+
* The port of the Server. Will be `27015` in hosted games.
|
|
150
|
+
*/
|
|
151
|
+
port: number;
|
|
152
|
+
/**
|
|
153
|
+
* The Source why the client is trying to connect to the Server.
|
|
154
|
+
* If you use `connect [IP:Port]` to connect to a Server, this will be an empty string.
|
|
155
|
+
*/
|
|
156
|
+
source: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Called when the connection to a Server has been established.
|
|
161
|
+
*
|
|
162
|
+
* **NOTE**: This is only available in the Menu state because this is called before the Client State has even started.
|
|
163
|
+
*
|
|
164
|
+
*
|
|
165
|
+
* @realm menu
|
|
166
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/client_connected
|
|
167
|
+
*/
|
|
168
|
+
interface client_connected {
|
|
169
|
+
/**
|
|
170
|
+
* The Server address. Will be **loopback** in hosted games.
|
|
171
|
+
*/
|
|
172
|
+
address: string;
|
|
173
|
+
/**
|
|
174
|
+
* The IP of the Server. Will be **0** in hosted games. Use the **address** instead of this.
|
|
175
|
+
*/
|
|
176
|
+
ip: number;
|
|
177
|
+
/**
|
|
178
|
+
* The port of the Server. Will be **0** in hosted games.
|
|
179
|
+
*/
|
|
180
|
+
port: number;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Called when the client is disconnecting from the server.
|
|
185
|
+
*
|
|
186
|
+
* **NOTE**: Only called clientside for the disconnecting Player.
|
|
187
|
+
* message - will be an empty String if the client intentionally disconnects from the server.
|
|
188
|
+
* This is called multiple times in the **Menu state** when connecting to a server.
|
|
189
|
+
*
|
|
190
|
+
*
|
|
191
|
+
* @realm client and menu
|
|
192
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/client_disconnect
|
|
193
|
+
*/
|
|
194
|
+
interface client_disconnect {
|
|
195
|
+
/**
|
|
196
|
+
* The disconnecting reason. Can be an empty String.
|
|
197
|
+
*/
|
|
198
|
+
message: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Called when an entity dies.
|
|
203
|
+
*
|
|
204
|
+
* **NOTE**: This is not called when a player dies using [Player:KillSilent](https://wiki.facepunch.com/gmod/Player:KillSilent).
|
|
205
|
+
*
|
|
206
|
+
*
|
|
207
|
+
* @realm shared and menu
|
|
208
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/entity_killed
|
|
209
|
+
*/
|
|
210
|
+
interface entity_killed {
|
|
211
|
+
/**
|
|
212
|
+
* The Entity:EntIndex of the inflictor.
|
|
213
|
+
*/
|
|
214
|
+
entindex_inflictor: number;
|
|
215
|
+
/**
|
|
216
|
+
* The Entity:EntIndex of the attacker.
|
|
217
|
+
*/
|
|
218
|
+
entindex_attacker: number;
|
|
219
|
+
/**
|
|
220
|
+
* Damage type(s), a combination of Enums/DMG.
|
|
221
|
+
*/
|
|
222
|
+
damagebits: number;
|
|
223
|
+
/**
|
|
224
|
+
* The Entity:EntIndex of the victim.
|
|
225
|
+
*/
|
|
226
|
+
entindex_killed: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Called when a flare sets an NPC on fire.
|
|
231
|
+
*
|
|
232
|
+
* @realm shared and menu
|
|
233
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/flare_ignite_npc
|
|
234
|
+
*/
|
|
235
|
+
interface flare_ignite_npc {
|
|
236
|
+
/**
|
|
237
|
+
* The Entity:EntIndex of the ignited NPC.
|
|
238
|
+
*/
|
|
239
|
+
entindex: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Called when the freeze cam starts spectating something.
|
|
244
|
+
* Example cause:
|
|
245
|
+
* ```
|
|
246
|
+
* local ply = Entity( 1 )
|
|
247
|
+
* ply:Spectate( OBS_MODE_FREEZECAM )
|
|
248
|
+
*
|
|
249
|
+
* ply:SpectateEntity( ply )
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @realm client and menu
|
|
253
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/freezecam_started
|
|
254
|
+
*/
|
|
255
|
+
interface freezecam_started {
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Called when a map is loaded.
|
|
260
|
+
*
|
|
261
|
+
* **NOTE**: This is only available in the Menu state because this is called before the Client State has even started.
|
|
262
|
+
*
|
|
263
|
+
*
|
|
264
|
+
* @realm menu
|
|
265
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/game_newmap
|
|
266
|
+
*/
|
|
267
|
+
interface game_newmap {
|
|
268
|
+
/**
|
|
269
|
+
* The Map name.
|
|
270
|
+
*/
|
|
271
|
+
mapname: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Called when the freeze cam is finished.
|
|
276
|
+
* Example cause:
|
|
277
|
+
* ```
|
|
278
|
+
* local ply = Entity( 1 )
|
|
279
|
+
* ply:Spectate( OBS_MODE_FREEZECAM )
|
|
280
|
+
*
|
|
281
|
+
* timer.Simple( 1, function()
|
|
282
|
+
* ply:UnSpectate()
|
|
283
|
+
* end )
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* @realm client and menu
|
|
287
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hide_freezepanel
|
|
288
|
+
*/
|
|
289
|
+
interface hide_freezepanel {
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Called when a Client becomes the Cameraman.
|
|
294
|
+
*
|
|
295
|
+
* @realm client and menu
|
|
296
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_cameraman
|
|
297
|
+
*/
|
|
298
|
+
interface hltv_cameraman {
|
|
299
|
+
/**
|
|
300
|
+
* The Entity:EntIndex of the new Cameraman.
|
|
301
|
+
*/
|
|
302
|
+
index: number;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Called when the HLTV observer mode changes.
|
|
307
|
+
*
|
|
308
|
+
* @realm client and menu
|
|
309
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_changed_mode
|
|
310
|
+
*/
|
|
311
|
+
interface hltv_changed_mode {
|
|
312
|
+
/**
|
|
313
|
+
* The new Enums/OBS_MODE.
|
|
314
|
+
*/
|
|
315
|
+
newmode: number;
|
|
316
|
+
/**
|
|
317
|
+
* The Entity:EntIndex of our Target.
|
|
318
|
+
*/
|
|
319
|
+
obs_target: number;
|
|
320
|
+
/**
|
|
321
|
+
* The old Enums/OBS_MODE.
|
|
322
|
+
*/
|
|
323
|
+
oldmode: number;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Called when the HLTV observer target changes.
|
|
328
|
+
*
|
|
329
|
+
* @realm client and menu
|
|
330
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_changed_target
|
|
331
|
+
*/
|
|
332
|
+
interface hltv_changed_target {
|
|
333
|
+
/**
|
|
334
|
+
* The Enums/OBS_MODE.
|
|
335
|
+
*/
|
|
336
|
+
mode: number;
|
|
337
|
+
/**
|
|
338
|
+
* The Entity:EntIndex of the new Target.
|
|
339
|
+
*/
|
|
340
|
+
obs_target: number;
|
|
341
|
+
/**
|
|
342
|
+
* The Entity:EntIndex of the old Target.
|
|
343
|
+
*/
|
|
344
|
+
old_target: number;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Called when the view changes.
|
|
349
|
+
*
|
|
350
|
+
* @realm client and menu
|
|
351
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_chase
|
|
352
|
+
*/
|
|
353
|
+
interface hltv_chase {
|
|
354
|
+
/**
|
|
355
|
+
* The distance from the Target.
|
|
356
|
+
*/
|
|
357
|
+
distance: number;
|
|
358
|
+
/**
|
|
359
|
+
* The inertia.
|
|
360
|
+
*/
|
|
361
|
+
inertia: number;
|
|
362
|
+
/**
|
|
363
|
+
* `1` if we should use Enums/OBS_MODE. else, we use Enums/OBS_MODE.
|
|
364
|
+
*/
|
|
365
|
+
ineye: number;
|
|
366
|
+
/**
|
|
367
|
+
* The phi.
|
|
368
|
+
*/
|
|
369
|
+
phi: number;
|
|
370
|
+
/**
|
|
371
|
+
* The Entity:EntIndex of the Primary target.
|
|
372
|
+
*/
|
|
373
|
+
target1: number;
|
|
374
|
+
/**
|
|
375
|
+
* The Entity:EntIndex of the Secondary target.
|
|
376
|
+
*/
|
|
377
|
+
target2: number;
|
|
378
|
+
/**
|
|
379
|
+
* The theta.
|
|
380
|
+
*/
|
|
381
|
+
theta: number;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Called when the fixed view changes.
|
|
386
|
+
*
|
|
387
|
+
* @realm client and menu
|
|
388
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_fixed
|
|
389
|
+
*/
|
|
390
|
+
interface hltv_fixed {
|
|
391
|
+
/**
|
|
392
|
+
* The X position.
|
|
393
|
+
*/
|
|
394
|
+
posx: number;
|
|
395
|
+
/**
|
|
396
|
+
* The Y position.
|
|
397
|
+
*/
|
|
398
|
+
posy: number;
|
|
399
|
+
/**
|
|
400
|
+
* The Z position.
|
|
401
|
+
*/
|
|
402
|
+
posz: number;
|
|
403
|
+
/**
|
|
404
|
+
* The phi.
|
|
405
|
+
*/
|
|
406
|
+
phi: number;
|
|
407
|
+
/**
|
|
408
|
+
* The Entity:EntIndex of the target.
|
|
409
|
+
*/
|
|
410
|
+
target: number;
|
|
411
|
+
/**
|
|
412
|
+
* The theta.
|
|
413
|
+
*/
|
|
414
|
+
theta: number;
|
|
415
|
+
/**
|
|
416
|
+
* The FOV.
|
|
417
|
+
*/
|
|
418
|
+
fov: number;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Called when a message is sent with `tv_msg`.
|
|
423
|
+
*
|
|
424
|
+
* @realm client and menu
|
|
425
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_message
|
|
426
|
+
*/
|
|
427
|
+
interface hltv_message {
|
|
428
|
+
/**
|
|
429
|
+
* The Text.
|
|
430
|
+
*/
|
|
431
|
+
text: string;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Called when the HLTV ranks all cameras.
|
|
436
|
+
*
|
|
437
|
+
* @realm server
|
|
438
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_rank_camera
|
|
439
|
+
*/
|
|
440
|
+
interface hltv_rank_camera {
|
|
441
|
+
/**
|
|
442
|
+
* The id of the Camera.
|
|
443
|
+
*/
|
|
444
|
+
index: number;
|
|
445
|
+
/**
|
|
446
|
+
* The rank.
|
|
447
|
+
*/
|
|
448
|
+
rank: number;
|
|
449
|
+
/**
|
|
450
|
+
* The Entity:EntIndex of the Target.
|
|
451
|
+
*/
|
|
452
|
+
target: number;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Called when the HLTV ranks all players.
|
|
457
|
+
*
|
|
458
|
+
* @realm server
|
|
459
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_rank_entity
|
|
460
|
+
*/
|
|
461
|
+
interface hltv_rank_entity {
|
|
462
|
+
/**
|
|
463
|
+
* The Entity:EntIndex of the Entity.
|
|
464
|
+
*/
|
|
465
|
+
index: number;
|
|
466
|
+
/**
|
|
467
|
+
* The rank.
|
|
468
|
+
*/
|
|
469
|
+
rank: number;
|
|
470
|
+
/**
|
|
471
|
+
* The Entity:EntIndex of the Target.
|
|
472
|
+
*/
|
|
473
|
+
target: number;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Called when the HLTVServer stats are updated.
|
|
478
|
+
* They should be updated every 8 seconds.
|
|
479
|
+
* All of these stats are global and shared by the master server.
|
|
480
|
+
*
|
|
481
|
+
* @realm shared and menu
|
|
482
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_status
|
|
483
|
+
*/
|
|
484
|
+
interface hltv_status {
|
|
485
|
+
/**
|
|
486
|
+
* The address of the master.
|
|
487
|
+
*/
|
|
488
|
+
master: string;
|
|
489
|
+
/**
|
|
490
|
+
* The number of total clients.
|
|
491
|
+
*/
|
|
492
|
+
clients: number;
|
|
493
|
+
/**
|
|
494
|
+
* The number of total slots.
|
|
495
|
+
*/
|
|
496
|
+
slots: number;
|
|
497
|
+
/**
|
|
498
|
+
* The number of total proxies.
|
|
499
|
+
*/
|
|
500
|
+
proxies: number;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Called when the SourceTV client is spawned.
|
|
505
|
+
*
|
|
506
|
+
* @realm client and menu
|
|
507
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/hltv_title
|
|
508
|
+
*/
|
|
509
|
+
interface hltv_title {
|
|
510
|
+
/**
|
|
511
|
+
* The SourceTV Name.
|
|
512
|
+
*/
|
|
513
|
+
text: string;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Called **only** in the specific realm when the game is existing.
|
|
518
|
+
*
|
|
519
|
+
* **NOTE**: This is not called reliable serverside.
|
|
520
|
+
*
|
|
521
|
+
*
|
|
522
|
+
* @realm shared and menu
|
|
523
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/host_quit
|
|
524
|
+
*/
|
|
525
|
+
interface host_quit {
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Called when a player has entered the game (connected and loaded).
|
|
530
|
+
* From this point you can use [Global.Player](https://wiki.facepunch.com/gmod/Global.Player)(userid) (serverside or in singleplayer).
|
|
531
|
+
*
|
|
532
|
+
* **NOTE**: This is called almost directly after [GM:PlayerInitialSpawn](https://wiki.facepunch.com/gmod/GM:PlayerInitialSpawn) in the same tick, so you could just use that hook serverside.
|
|
533
|
+
*
|
|
534
|
+
* **WARNING**: Just like [GM:PlayerInitialSpawn](https://wiki.facepunch.com/gmod/GM:PlayerInitialSpawn), players may not have finished loading when its called. See the warning in [GM:PlayerInitialSpawn](https://wiki.facepunch.com/gmod/GM:PlayerInitialSpawn) for more details about possible issues
|
|
535
|
+
*
|
|
536
|
+
*
|
|
537
|
+
* @realm shared and menu
|
|
538
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_activate
|
|
539
|
+
*/
|
|
540
|
+
interface player_activate {
|
|
541
|
+
/**
|
|
542
|
+
* The Player:UserID of the Player.
|
|
543
|
+
*/
|
|
544
|
+
userid: number;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Called when a player changes their Steam name.
|
|
549
|
+
* **NOTE**: Functions like [Player:Nick](https://wiki.facepunch.com/gmod/Player:Nick) return the old name here.
|
|
550
|
+
*
|
|
551
|
+
*
|
|
552
|
+
* @realm shared and menu
|
|
553
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_changename
|
|
554
|
+
*/
|
|
555
|
+
interface player_changename {
|
|
556
|
+
/**
|
|
557
|
+
* The Player:UserID of the Player.
|
|
558
|
+
*/
|
|
559
|
+
userid: number;
|
|
560
|
+
/**
|
|
561
|
+
* The old Name.
|
|
562
|
+
*/
|
|
563
|
+
oldname: string;
|
|
564
|
+
/**
|
|
565
|
+
* The new Name.
|
|
566
|
+
*/
|
|
567
|
+
newname: string;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Called when a player connects to the server.
|
|
572
|
+
*
|
|
573
|
+
* **NOTE**: This is only called serverside AND clientside for the listen server host. In other cases it's called serverside.
|
|
574
|
+
*
|
|
575
|
+
*
|
|
576
|
+
* @realm shared and menu
|
|
577
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_connect
|
|
578
|
+
*/
|
|
579
|
+
interface player_connect {
|
|
580
|
+
/**
|
|
581
|
+
* 0 if the player isn't a bot, 1 if they are.
|
|
582
|
+
*/
|
|
583
|
+
bot: number;
|
|
584
|
+
/**
|
|
585
|
+
* The Player:SteamID the player has.
|
|
586
|
+
* Will be `BOT` for bots, `STEAM_0:0:0` or `STEAM_ID_PENDING` in single-player, and `STEAM_ID_LAN` when using the `-multirun` client option.
|
|
587
|
+
*/
|
|
588
|
+
networkid: string;
|
|
589
|
+
/**
|
|
590
|
+
* The Player:Nick the player has.
|
|
591
|
+
*/
|
|
592
|
+
name: string;
|
|
593
|
+
/**
|
|
594
|
+
* The Player:UserID the player has.
|
|
595
|
+
*/
|
|
596
|
+
userid: number;
|
|
597
|
+
/**
|
|
598
|
+
* The Entity:EntIndex of the player, minus one.
|
|
599
|
+
*/
|
|
600
|
+
index: number;
|
|
601
|
+
/**
|
|
602
|
+
* The Player:IPAddress of the connecting player.
|
|
603
|
+
* Will be `none` for bots and `loopback` for listen server and single-player hosts.
|
|
604
|
+
*/
|
|
605
|
+
address: string;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Called when a player connects to the server.
|
|
610
|
+
*
|
|
611
|
+
* **NOTE**: This is not called clientside for the local player or in single-player.
|
|
612
|
+
*
|
|
613
|
+
*
|
|
614
|
+
* @realm shared and menu
|
|
615
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_connect_client
|
|
616
|
+
*/
|
|
617
|
+
interface player_connect_client {
|
|
618
|
+
/**
|
|
619
|
+
* 0 if the player isn't a bot, 1 if they are.
|
|
620
|
+
*/
|
|
621
|
+
bot: number;
|
|
622
|
+
/**
|
|
623
|
+
* The SteamID the player has. Will be `BOT` for bots and `STEAM_0:0:0` in single-player.
|
|
624
|
+
*/
|
|
625
|
+
networkid: string;
|
|
626
|
+
/**
|
|
627
|
+
* The Player:Nick the player has.
|
|
628
|
+
*/
|
|
629
|
+
name: string;
|
|
630
|
+
/**
|
|
631
|
+
* The Player:UserID the player has.
|
|
632
|
+
*/
|
|
633
|
+
userid: number;
|
|
634
|
+
/**
|
|
635
|
+
* The Entity:EntIndex of the player, minus one.
|
|
636
|
+
*/
|
|
637
|
+
index: number;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Called when a player disconnects from the server.
|
|
642
|
+
*
|
|
643
|
+
* **NOTE**: This is also called when a player cancels connecting to the server.
|
|
644
|
+
* This is not called clientside for the local player or in single-player.
|
|
645
|
+
* When this gameevent is called on the client side, the player will be NULL!. so you cannot use `Player(data.userid)`!
|
|
646
|
+
*
|
|
647
|
+
*
|
|
648
|
+
* @realm shared and menu
|
|
649
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_disconnect
|
|
650
|
+
*/
|
|
651
|
+
interface player_disconnect {
|
|
652
|
+
/**
|
|
653
|
+
* 0 if the player isn't a bot, 1 if they are.
|
|
654
|
+
*/
|
|
655
|
+
bot: number;
|
|
656
|
+
/**
|
|
657
|
+
* The SteamID the player has. Will be `BOT` for bots and `STEAM_0:0:0` in single-player.
|
|
658
|
+
*/
|
|
659
|
+
networkid: string;
|
|
660
|
+
/**
|
|
661
|
+
* The Player:Nick the player has.
|
|
662
|
+
*/
|
|
663
|
+
name: string;
|
|
664
|
+
/**
|
|
665
|
+
* The Player:UserID the player has.
|
|
666
|
+
*/
|
|
667
|
+
userid: number;
|
|
668
|
+
/**
|
|
669
|
+
* The disconnect reason.
|
|
670
|
+
*/
|
|
671
|
+
reason: string;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Called when the player takes damage.
|
|
676
|
+
*
|
|
677
|
+
* **NOTE**: This is called after [GM:EntityTakeDamage](https://wiki.facepunch.com/gmod/GM:EntityTakeDamage) so you could just use that hook serverside.
|
|
678
|
+
*
|
|
679
|
+
*
|
|
680
|
+
* @realm shared and menu
|
|
681
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_hurt
|
|
682
|
+
*/
|
|
683
|
+
interface player_hurt {
|
|
684
|
+
/**
|
|
685
|
+
* The new health after being damaged.
|
|
686
|
+
*/
|
|
687
|
+
health: number;
|
|
688
|
+
/**
|
|
689
|
+
* Event priority number used by HLTV.
|
|
690
|
+
*/
|
|
691
|
+
priority: number;
|
|
692
|
+
/**
|
|
693
|
+
* The Player:UserID of the victim.
|
|
694
|
+
*/
|
|
695
|
+
userid: number;
|
|
696
|
+
/**
|
|
697
|
+
* The Player:UserID of the attacker.
|
|
698
|
+
*/
|
|
699
|
+
attacker: number;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Called when a player's info has changed over the network.
|
|
704
|
+
* When a Client joins the Server, this gameevent is called for each player on the server for the client.
|
|
705
|
+
* So if 32 Players are on the Server, this gameevent is called 32 times on the Client.
|
|
706
|
+
*
|
|
707
|
+
* @realm shared and menu
|
|
708
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_info
|
|
709
|
+
*/
|
|
710
|
+
interface player_info {
|
|
711
|
+
/**
|
|
712
|
+
* The Player:AccountID of the Player.
|
|
713
|
+
*/
|
|
714
|
+
friendsid: number;
|
|
715
|
+
/**
|
|
716
|
+
* The Entity:EntIndex of the Player minus one.
|
|
717
|
+
*/
|
|
718
|
+
index: number;
|
|
719
|
+
/**
|
|
720
|
+
* 1 or 0 if it is a bot or not.
|
|
721
|
+
*/
|
|
722
|
+
bot: number;
|
|
723
|
+
/**
|
|
724
|
+
* The Player:UserID of the Player.
|
|
725
|
+
*/
|
|
726
|
+
userid: number;
|
|
727
|
+
/**
|
|
728
|
+
* The Player:Name of the Player.
|
|
729
|
+
*/
|
|
730
|
+
name: string;
|
|
731
|
+
/**
|
|
732
|
+
* The Player:SteamID of the Player.
|
|
733
|
+
*/
|
|
734
|
+
networkid: string;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Called when the player says a message.
|
|
739
|
+
*
|
|
740
|
+
* **NOTE**: This is called after [GM:PlayerSay](https://wiki.facepunch.com/gmod/GM:PlayerSay) so you could just use that hook serverside.
|
|
741
|
+
*
|
|
742
|
+
*
|
|
743
|
+
* @realm shared and menu
|
|
744
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_say
|
|
745
|
+
*/
|
|
746
|
+
interface player_say {
|
|
747
|
+
/**
|
|
748
|
+
* Event priority number used by HLTV. Hardcoded to be 1.
|
|
749
|
+
*/
|
|
750
|
+
priority: number;
|
|
751
|
+
/**
|
|
752
|
+
* The Player:UserID of the Player. For Console the UserID is 0.
|
|
753
|
+
*/
|
|
754
|
+
userid: number;
|
|
755
|
+
/**
|
|
756
|
+
* The text that was said.
|
|
757
|
+
*/
|
|
758
|
+
text: string;
|
|
759
|
+
/**
|
|
760
|
+
* `1` If it's only for the team, else `0`.
|
|
761
|
+
*/
|
|
762
|
+
teamonly: number;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Called when a player spawns.
|
|
767
|
+
*
|
|
768
|
+
* **NOTE**: This is not called clientside for the local player or in single-player.
|
|
769
|
+
*
|
|
770
|
+
*
|
|
771
|
+
* @realm shared and menu
|
|
772
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/player_spawn
|
|
773
|
+
*/
|
|
774
|
+
interface player_spawn {
|
|
775
|
+
/**
|
|
776
|
+
* The Player:UserID the player has.
|
|
777
|
+
*/
|
|
778
|
+
userid: number;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Called when a Ragdoll is going to be Dissolved.
|
|
783
|
+
*
|
|
784
|
+
* @realm shared and menu
|
|
785
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/ragdoll_dissolved
|
|
786
|
+
*/
|
|
787
|
+
interface ragdoll_dissolved {
|
|
788
|
+
/**
|
|
789
|
+
* The Entity:EntIndex of the disolved Ragdoll.
|
|
790
|
+
*/
|
|
791
|
+
entindex: number;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Called when a Player is banned using [Player:Ban](https://wiki.facepunch.com/gmod/Player:Ban), **banip** or the **banid** command.
|
|
796
|
+
*
|
|
797
|
+
* **NOTE**: If **banip** was used the networkid will be an empty string.
|
|
798
|
+
* If **banid** was used the ip will be an empty string.
|
|
799
|
+
*
|
|
800
|
+
*
|
|
801
|
+
* @realm shared and menu
|
|
802
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/server_addban
|
|
803
|
+
*/
|
|
804
|
+
interface server_addban {
|
|
805
|
+
/**
|
|
806
|
+
* The Player:SteamID the player has. Will be `BOT` for bots and `STEAM_0:0:0` in single-player.
|
|
807
|
+
*/
|
|
808
|
+
networkid: string;
|
|
809
|
+
/**
|
|
810
|
+
* The Player:Nick the player has.
|
|
811
|
+
*/
|
|
812
|
+
name: string;
|
|
813
|
+
/**
|
|
814
|
+
* The Player:UserID the player has.
|
|
815
|
+
*/
|
|
816
|
+
userid: number;
|
|
817
|
+
/**
|
|
818
|
+
* The Player:IPAddress of the player.
|
|
819
|
+
*/
|
|
820
|
+
ip: string;
|
|
821
|
+
/**
|
|
822
|
+
* The Duration of the Ban (in minutes).
|
|
823
|
+
*/
|
|
824
|
+
duration: string;
|
|
825
|
+
/**
|
|
826
|
+
* The name of the Person who Banned the Player or Console.
|
|
827
|
+
*/
|
|
828
|
+
by: string;
|
|
829
|
+
/**
|
|
830
|
+
* whether the player was also kicked.
|
|
831
|
+
*/
|
|
832
|
+
kicked: boolean;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Called when a convar with FCVAR_NOTIFY is changed on the server.
|
|
837
|
+
*
|
|
838
|
+
* @realm shared and menu
|
|
839
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/server_cvar
|
|
840
|
+
*/
|
|
841
|
+
interface server_cvar {
|
|
842
|
+
/**
|
|
843
|
+
* The convar name. e.g "sv_cheats".
|
|
844
|
+
*/
|
|
845
|
+
cvarname: string;
|
|
846
|
+
/**
|
|
847
|
+
* The new value. Always a string. e.g "1".
|
|
848
|
+
*/
|
|
849
|
+
cvarvalue: string;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Called when a Player is unbanned using the **removeid** or **removeip** command.
|
|
854
|
+
*
|
|
855
|
+
* **NOTE**: If the player was banned using **banip** was used the networkid will be an empty string.
|
|
856
|
+
* If the player was banned using **banid** was used the ip will be an empty string.
|
|
857
|
+
*
|
|
858
|
+
*
|
|
859
|
+
* @realm shared and menu
|
|
860
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/server_removeban
|
|
861
|
+
*/
|
|
862
|
+
interface server_removeban {
|
|
863
|
+
/**
|
|
864
|
+
* The Player:SteamID of the banned Player.
|
|
865
|
+
*/
|
|
866
|
+
networkid: string;
|
|
867
|
+
/**
|
|
868
|
+
* The Player:IPAddress of the banned Player.
|
|
869
|
+
*/
|
|
870
|
+
ip: string;
|
|
871
|
+
/**
|
|
872
|
+
* The Person who unbanned the Player. Can be Console.
|
|
873
|
+
*/
|
|
874
|
+
by: string;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Called when joining a Server or when a Server spawned.
|
|
879
|
+
*
|
|
880
|
+
* **NOTE**: This is only available in the Menu state because this is called before the Client or Server State has even started.
|
|
881
|
+
*
|
|
882
|
+
*
|
|
883
|
+
* @realm menu
|
|
884
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/server_spawn
|
|
885
|
+
*/
|
|
886
|
+
interface server_spawn {
|
|
887
|
+
/**
|
|
888
|
+
* The hostname of the Server.
|
|
889
|
+
*/
|
|
890
|
+
hostname: string;
|
|
891
|
+
/**
|
|
892
|
+
* The Server address. Will be **loopback** in hosted games.
|
|
893
|
+
*/
|
|
894
|
+
address: string;
|
|
895
|
+
/**
|
|
896
|
+
* The IP of the Server. Will be **0** in hosted games. Use the **address** instead of this.
|
|
897
|
+
*/
|
|
898
|
+
ip: number;
|
|
899
|
+
/**
|
|
900
|
+
* The port of the Server. Will be **0** in hosted games.
|
|
901
|
+
*/
|
|
902
|
+
port: number;
|
|
903
|
+
/**
|
|
904
|
+
* The Game the Server is hosting. Will be **garrysmod**.
|
|
905
|
+
*/
|
|
906
|
+
game: string;
|
|
907
|
+
/**
|
|
908
|
+
* The mapname the Server is currently on.
|
|
909
|
+
*/
|
|
910
|
+
mapname: string;
|
|
911
|
+
/**
|
|
912
|
+
* The amount of slots the server has.
|
|
913
|
+
*/
|
|
914
|
+
maxplayers: number;
|
|
915
|
+
/**
|
|
916
|
+
* The OS of the Server. **W**(WIN32), **L**(LINUX) or **O**(OSX).
|
|
917
|
+
*/
|
|
918
|
+
os: string;
|
|
919
|
+
/**
|
|
920
|
+
* true if it's a dedicated server.
|
|
921
|
+
*/
|
|
922
|
+
dedicated: boolean;
|
|
923
|
+
/**
|
|
924
|
+
* true if the Server is password protected.
|
|
925
|
+
*/
|
|
926
|
+
password: boolean;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* Called when the freeze cam is started.
|
|
931
|
+
* Example cause:
|
|
932
|
+
* ```
|
|
933
|
+
* Player:Spectate(OBS_MODE_FREEZECAM)
|
|
934
|
+
* ```
|
|
935
|
+
*
|
|
936
|
+
* @realm client and menu
|
|
937
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/show_freezepanel
|
|
938
|
+
*/
|
|
939
|
+
interface show_freezepanel {
|
|
940
|
+
/**
|
|
941
|
+
* The Index of the Entity that is being spectated or `0`.
|
|
942
|
+
*/
|
|
943
|
+
killer: number;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Called when the Achievement Manager received the steam user stat data.
|
|
948
|
+
* As soon as this is called, all achievement data should be valid.
|
|
949
|
+
* Trying to access any achievement data before this may return in inaccurate data.
|
|
950
|
+
*
|
|
951
|
+
* @realm menu
|
|
952
|
+
* @source https://wiki.facepunch.com/gmod/gameevent/user_data_downloaded
|
|
953
|
+
*/
|
|
954
|
+
interface user_data_downloaded {
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
interface GameeventLib {
|
|
958
|
+
/**
|
|
959
|
+
* Adds a [game event](https://wiki.facepunch.com/gmod/gameevent) listener, creating a new hook using the [hook](https://wiki.facepunch.com/gmod/hook) library, which can be listened to via [hook.Add](https://wiki.facepunch.com/gmod/hook.Add) with the given `eventName` as event.
|
|
960
|
+
* **NOTE**: All gameevents are called in the **Menu State**, but if you want to use them you need to use some DLL(like [this](https://github.com/RaphaelIT7/gmod-gameevent) one) or you need to create your own.
|
|
961
|
+
*
|
|
962
|
+
*
|
|
963
|
+
* @realm shared
|
|
964
|
+
* @source https://wiki.facepunch.com/gmod/gameevent.Listen
|
|
965
|
+
*/
|
|
966
|
+
Listen(eventName: string): void;
|
|
967
|
+
}
|
|
968
|
+
|