@tlua/gmod 1.0.5 → 1.0.6

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.
Files changed (272) hide show
  1. package/package.json +1 -1
  2. package/types/achievementicon.d.tlua +0 -1
  3. package/types/achievements.d.tlua +15 -16
  4. package/types/ai.d.tlua +5 -6
  5. package/types/ai_schedule.d.tlua +0 -1
  6. package/types/ai_task.d.tlua +0 -1
  7. package/types/angle.d.tlua +18 -19
  8. package/types/avatarimage.d.tlua +0 -1
  9. package/types/awesomium.d.tlua +0 -1
  10. package/types/baseclass.d.tlua +1 -3
  11. package/types/bf_read.d.tlua +10 -12
  12. package/types/bit.d.tlua +11 -12
  13. package/types/button.d.tlua +0 -1
  14. package/types/cam.d.tlua +16 -17
  15. package/types/ceffectdata.d.tlua +31 -33
  16. package/types/chat.d.tlua +5 -6
  17. package/types/checkbutton.d.tlua +0 -1
  18. package/types/cleanup.d.tlua +7 -8
  19. package/types/cluaemitter.d.tlua +11 -13
  20. package/types/clualocomotion.d.tlua +39 -41
  21. package/types/cluaparticle.d.tlua +43 -45
  22. package/types/cmovedata.d.tlua +46 -48
  23. package/types/cnavarea.d.tlua +76 -78
  24. package/types/cnavladder.d.tlua +21 -23
  25. package/types/cnewparticleeffect.d.tlua +25 -27
  26. package/types/color.d.tlua +28 -29
  27. package/types/concommand.d.tlua +4 -5
  28. package/types/constraint.d.tlua +28 -29
  29. package/types/construct.d.tlua +1 -2
  30. package/types/contentheader.d.tlua +1 -3
  31. package/types/contenticon.d.tlua +7 -9
  32. package/types/contentsidebar.d.tlua +2 -4
  33. package/types/contentsidebartoolbox.d.tlua +0 -1
  34. package/types/contextbase.d.tlua +2 -4
  35. package/types/controlpanel.d.tlua +11 -14
  36. package/types/controlpresets.d.tlua +11 -13
  37. package/types/convar.d.tlua +15 -17
  38. package/types/cookie.d.tlua +3 -4
  39. package/types/coroutine.d.tlua +7 -8
  40. package/types/crecipientfilter.d.tlua +15 -17
  41. package/types/csent.d.tlua +0 -1
  42. package/types/csoundpatch.d.tlua +13 -15
  43. package/types/ctakedamageinfo.d.tlua +32 -34
  44. package/types/ctrllistbox.d.tlua +0 -1
  45. package/types/ctrlnumpad.d.tlua +5 -7
  46. package/types/cusercmd.d.tlua +26 -28
  47. package/types/custom_entity_fields.d.tlua +0 -1
  48. package/types/cvars.d.tlua +6 -7
  49. package/types/dadjustablemodelpanel.d.tlua +5 -7
  50. package/types/dalphabar.d.tlua +1 -3
  51. package/types/dbinder.d.tlua +2 -4
  52. package/types/dbubblecontainer.d.tlua +0 -2
  53. package/types/dbutton.d.tlua +6 -8
  54. package/types/dcategoryheader.d.tlua +0 -1
  55. package/types/dcategorylist.d.tlua +0 -1
  56. package/types/dcheckbox.d.tlua +3 -5
  57. package/types/dcheckboxlabel.d.tlua +9 -10
  58. package/types/dcollapsiblecategory.d.tlua +21 -23
  59. package/types/dcolorbutton.d.tlua +5 -7
  60. package/types/dcolorcombo.d.tlua +3 -5
  61. package/types/dcolorcube.d.tlua +11 -13
  62. package/types/dcolormixer.d.tlua +25 -27
  63. package/types/dcolorpalette.d.tlua +21 -23
  64. package/types/dcolumnsheet.d.tlua +3 -5
  65. package/types/dcombobox.d.tlua +15 -17
  66. package/types/ddragbase.d.tlua +11 -13
  67. package/types/ddrawer.d.tlua +6 -8
  68. package/types/debug.d.tlua +16 -19
  69. package/types/debugoverlay.d.tlua +11 -12
  70. package/types/dentityproperties.d.tlua +3 -5
  71. package/types/derma.d.tlua +10 -11
  72. package/types/dexpandbutton.d.tlua +1 -3
  73. package/types/dfilebrowser.d.tlua +20 -21
  74. package/types/dform.d.tlua +16 -18
  75. package/types/dframe.d.tlua +24 -25
  76. package/types/dgrid.d.tlua +9 -11
  77. package/types/dhorizontaldivider.d.tlua +18 -20
  78. package/types/dhorizontalscroller.d.tlua +9 -11
  79. package/types/dhscrollbar.d.tlua +9 -11
  80. package/types/dhtml.d.tlua +6 -8
  81. package/types/dhtmlcontrols.d.tlua +5 -6
  82. package/types/diconbrowser.d.tlua +9 -11
  83. package/types/diconlayout.d.tlua +16 -18
  84. package/types/dimage.d.tlua +17 -20
  85. package/types/dimagebutton.d.tlua +9 -10
  86. package/types/dkillicon.d.tlua +0 -1
  87. package/types/dlabel.d.tlua +31 -33
  88. package/types/dlabeleditable.d.tlua +3 -5
  89. package/types/dlabelurl.d.tlua +8 -10
  90. package/types/dlistbox.d.tlua +6 -8
  91. package/types/dlistboxitem.d.tlua +2 -4
  92. package/types/dlistlayout.d.tlua +0 -1
  93. package/types/dlistview.d.tlua +32 -34
  94. package/types/dlistview_column.d.tlua +12 -14
  95. package/types/dlistview_columnplain.d.tlua +0 -1
  96. package/types/dlistview_draggerbar.d.tlua +0 -1
  97. package/types/dlistview_line.d.tlua +11 -13
  98. package/types/dlistviewheaderlabel.d.tlua +0 -1
  99. package/types/dlistviewlabel.d.tlua +0 -1
  100. package/types/dlistviewline.d.tlua +0 -1
  101. package/types/dmenu.d.tlua +23 -28
  102. package/types/dmenubar.d.tlua +2 -7
  103. package/types/dmenuoption.d.tlua +11 -13
  104. package/types/dmenuoptioncvar.d.tlua +4 -6
  105. package/types/dmodelpanel.d.tlua +20 -22
  106. package/types/dmodelselect.d.tlua +0 -2
  107. package/types/dmodelselectmulti.d.tlua +0 -2
  108. package/types/dnotify.d.tlua +8 -10
  109. package/types/dnumberscratch.d.tlua +24 -26
  110. package/types/dnumberwang.d.tlua +14 -16
  111. package/types/dnumpad.d.tlua +0 -1
  112. package/types/dnumslider.d.tlua +17 -18
  113. package/types/dpanel.d.tlua +12 -14
  114. package/types/dpanellist.d.tlua +11 -12
  115. package/types/dpaneloverlay.d.tlua +5 -7
  116. package/types/dpanelselect.d.tlua +0 -1
  117. package/types/dpanpanel.d.tlua +4 -6
  118. package/types/dprogress.d.tlua +1 -3
  119. package/types/dproperties.d.tlua +2 -4
  120. package/types/dproperty_boolean.d.tlua +0 -1
  121. package/types/dproperty_combo.d.tlua +1 -3
  122. package/types/dproperty_entity.d.tlua +0 -1
  123. package/types/dproperty_float.d.tlua +0 -1
  124. package/types/dproperty_generic.d.tlua +3 -5
  125. package/types/dproperty_int.d.tlua +0 -1
  126. package/types/dproperty_vectorcolor.d.tlua +0 -1
  127. package/types/dpropertysheet.d.tlua +15 -17
  128. package/types/dragndrop.d.tlua +10 -11
  129. package/types/draw.d.tlua +10 -12
  130. package/types/drgbpicker.d.tlua +2 -4
  131. package/types/drive.d.tlua +11 -13
  132. package/types/dscrollbargrip.d.tlua +0 -1
  133. package/types/dscrollpanel.d.tlua +10 -11
  134. package/types/dshape.d.tlua +5 -7
  135. package/types/dsizetocontents.d.tlua +3 -5
  136. package/types/dslider.d.tlua +26 -28
  137. package/types/dsprite.d.tlua +7 -9
  138. package/types/dtab.d.tlua +6 -8
  139. package/types/dtextentry.d.tlua +41 -43
  140. package/types/dtilelayout.d.tlua +19 -21
  141. package/types/dtooltip.d.tlua +4 -6
  142. package/types/dtree.d.tlua +14 -16
  143. package/types/dtree_node.d.tlua +66 -68
  144. package/types/dtree_node_button.d.tlua +0 -1
  145. package/types/duplicator.d.tlua +29 -31
  146. package/types/dverticaldivider.d.tlua +21 -23
  147. package/types/dvscrollbar.d.tlua +9 -11
  148. package/types/editablepanel.d.tlua +0 -1
  149. package/types/effect.d.tlua +2 -4
  150. package/types/effects.d.tlua +6 -7
  151. package/types/engine.d.tlua +21 -22
  152. package/types/entity.d.tlua +643 -674
  153. package/types/ents.d.tlua +19 -25
  154. package/types/enums.d.tlua +0 -1
  155. package/types/file.d.tlua +39 -40
  156. package/types/file_class.d.tlua +0 -1
  157. package/types/fingerposer.d.tlua +0 -1
  158. package/types/fingervar.d.tlua +0 -1
  159. package/types/frame.d.tlua +0 -1
  160. package/types/frame_blend.d.tlua +7 -8
  161. package/types/game.d.tlua +39 -40
  162. package/types/gameevent.d.tlua +0 -1
  163. package/types/gamemode.d.tlua +2 -4
  164. package/types/global.d.tlua +0 -18
  165. package/types/gm.d.tlua +266 -268
  166. package/types/gmod.d.tlua +0 -1
  167. package/types/gmsave.d.tlua +4 -5
  168. package/types/gui.d.tlua +21 -22
  169. package/types/gwen.d.tlua +3 -4
  170. package/types/halo.d.tlua +2 -3
  171. package/types/hammer.d.tlua +0 -1
  172. package/types/hook.d.tlua +4 -5
  173. package/types/html.d.tlua +0 -1
  174. package/types/http.d.tlua +1 -2
  175. package/types/iconeditor.d.tlua +9 -11
  176. package/types/igmodaudiochannel.d.tlua +40 -42
  177. package/types/imagecheckbox.d.tlua +2 -4
  178. package/types/imaterial.d.tlua +25 -27
  179. package/types/imesh.d.tlua +4 -6
  180. package/types/input.d.tlua +22 -25
  181. package/types/invalidateinternalentitycache.d.tlua +0 -1
  182. package/types/irestore.d.tlua +8 -10
  183. package/types/isave.d.tlua +8 -10
  184. package/types/itexture.d.tlua +9 -11
  185. package/types/ivideowriter.d.tlua +4 -6
  186. package/types/jit.d.tlua +16 -17
  187. package/types/killicon.d.tlua +7 -8
  188. package/types/label.d.tlua +0 -1
  189. package/types/language.d.tlua +1 -2
  190. package/types/list.d.tlua +8 -9
  191. package/types/makeballoon.d.tlua +0 -1
  192. package/types/markup.d.tlua +2 -3
  193. package/types/markupobject.d.tlua +4 -6
  194. package/types/material.d.tlua +0 -1
  195. package/types/math.d.tlua +83 -84
  196. package/types/matproxy.d.tlua +3 -4
  197. package/types/matselect.d.tlua +9 -11
  198. package/types/menu.d.tlua +0 -1
  199. package/types/menubar.d.tlua +2 -3
  200. package/types/mesh.d.tlua +19 -20
  201. package/types/modelimage.d.tlua +0 -1
  202. package/types/motionsensor.d.tlua +10 -11
  203. package/types/navmesh.d.tlua +26 -27
  204. package/types/net.d.tlua +51 -53
  205. package/types/nextbot.d.tlua +34 -37
  206. package/types/notification.d.tlua +2 -3
  207. package/types/npc.d.tlua +180 -182
  208. package/types/numpad.d.tlua +7 -8
  209. package/types/os.d.tlua +3 -5
  210. package/types/package.d.tlua +0 -1
  211. package/types/panel.d.tlua +329 -331
  212. package/types/panellist.d.tlua +0 -1
  213. package/types/pathfollower.d.tlua +30 -32
  214. package/types/permissions.d.tlua +6 -7
  215. package/types/physcollide.d.tlua +2 -4
  216. package/types/physenv.d.tlua +11 -12
  217. package/types/physobj.d.tlua +77 -79
  218. package/types/pixelvis_handle_t.d.tlua +0 -1
  219. package/types/player.d.tlua +288 -293
  220. package/types/player_manager.d.tlua +13 -14
  221. package/types/preseteditor.d.tlua +0 -1
  222. package/types/presets.d.tlua +6 -7
  223. package/types/projectedtexture.d.tlua +47 -49
  224. package/types/properties.d.tlua +5 -6
  225. package/types/propselect.d.tlua +3 -5
  226. package/types/radiobutton.d.tlua +0 -1
  227. package/types/render.d.tlua +142 -143
  228. package/types/resource.d.tlua +2 -3
  229. package/types/richtext.d.tlua +0 -1
  230. package/types/sandbox.d.tlua +52 -54
  231. package/types/saverestore.d.tlua +12 -13
  232. package/types/schedule.d.tlua +5 -7
  233. package/types/scripted_ents.d.tlua +9 -12
  234. package/types/search.d.tlua +1 -2
  235. package/types/serverlist.d.tlua +7 -8
  236. package/types/slidebar.d.tlua +0 -1
  237. package/types/slider.d.tlua +0 -1
  238. package/types/sound.d.tlua +10 -11
  239. package/types/spawnicon.d.tlua +6 -8
  240. package/types/spawnmenu.d.tlua +23 -25
  241. package/types/spawnmenucontentpanel.d.tlua +3 -5
  242. package/types/sql.d.tlua +9 -10
  243. package/types/stack.d.tlua +4 -6
  244. package/types/steamworks.d.tlua +18 -19
  245. package/types/string.d.tlua +46 -50
  246. package/types/structures.d.tlua +0 -7
  247. package/types/surface.d.tlua +34 -35
  248. package/types/surfaceinfo.d.tlua +4 -6
  249. package/types/system.d.tlua +10 -11
  250. package/types/table.d.tlua +45 -48
  251. package/types/task.d.tlua +8 -10
  252. package/types/team.d.tlua +19 -20
  253. package/types/textentry.d.tlua +0 -1
  254. package/types/tgaimage.d.tlua +0 -1
  255. package/types/timer.d.tlua +14 -15
  256. package/types/tool.d.tlua +42 -46
  257. package/types/ugcpublishwindow.d.tlua +7 -9
  258. package/types/umsg.d.tlua +12 -13
  259. package/types/undo.d.tlua +10 -11
  260. package/types/urllabel.d.tlua +0 -1
  261. package/types/usermessage.d.tlua +2 -3
  262. package/types/utf8.d.tlua +7 -8
  263. package/types/util.d.tlua +90 -95
  264. package/types/vector.d.tlua +36 -37
  265. package/types/vehicle.d.tlua +48 -51
  266. package/types/vgui.d.tlua +14 -19
  267. package/types/video.d.tlua +0 -1
  268. package/types/vmatrix.d.tlua +35 -36
  269. package/types/weapon.d.tlua +81 -84
  270. package/types/weapons.d.tlua +5 -7
  271. package/types/widgets.d.tlua +1 -2
  272. package/types/workshopfilebase.d.tlua +4 -6
package/types/gm.d.tlua CHANGED
@@ -17,6 +17,7 @@ interface GM {
17
17
  * @source https://wiki.facepunch.com/gmod/GM:AcceptInput
18
18
  */
19
19
  AcceptInput(self: GM, ent: Entity, input: string, activator: Entity, caller: Entity, value: any): boolean;
20
+
20
21
  /**
21
22
  * Adds a death notice entry.
22
23
  *
@@ -24,12 +25,14 @@ interface GM {
24
25
  * @source https://wiki.facepunch.com/gmod/GM:AddDeathNotice
25
26
  */
26
27
  AddDeathNotice(self: GM, attacker: string, attackerTeam: number, inflictor: string, victim: string, victimTeam: number): any;
28
+
27
29
  /**
28
30
  * Allows you to adjust the mouse sensitivity.
29
31
  * @realm client
30
32
  * @source https://wiki.facepunch.com/gmod/GM:AdjustMouseSensitivity
31
33
  */
32
34
  AdjustMouseSensitivity(self: GM, defaultSensitivity: number, localFOV: number, defaultFOV: number): number;
35
+
33
36
  /**
34
37
  * Called when a player tries to pick up something using the "use" key, return to override.
35
38
  *
@@ -42,6 +45,7 @@ interface GM {
42
45
  * @source https://wiki.facepunch.com/gmod/GM:AllowPlayerPickup
43
46
  */
44
47
  AllowPlayerPickup(self: GM, ply: Player, ent: Entity): boolean;
48
+
45
49
  /**
46
50
  * This hook is used to calculate animations for a player.
47
51
  *
@@ -52,6 +56,7 @@ interface GM {
52
56
  * @source https://wiki.facepunch.com/gmod/GM:CalcMainActivity
53
57
  */
54
58
  CalcMainActivity(self: GM, ply: Player, vel: Vector): (number, number);
59
+
55
60
  /**
56
61
  * Called from [GM:CalcView](https://wiki.facepunch.com/gmod/GM:CalcView) when player is in driving a vehicle.
57
62
  *
@@ -61,24 +66,28 @@ interface GM {
61
66
  * @source https://wiki.facepunch.com/gmod/GM:CalcVehicleView
62
67
  */
63
68
  CalcVehicleView(self: GM, veh: Vehicle, ply: Player, view: CamData): table;
69
+
64
70
  /**
65
71
  * Allows override of the default view.
66
72
  * @realm client
67
73
  * @source https://wiki.facepunch.com/gmod/GM:CalcView
68
74
  */
69
75
  CalcView(self: GM, ply: Player, origin: Vector, angles: Angle, fov: number, znear: number, zfar: number): CamData;
76
+
70
77
  /**
71
78
  * Allows overriding the position and angle of the viewmodel.
72
79
  * @realm client
73
80
  * @source https://wiki.facepunch.com/gmod/GM:CalcViewModelView
74
81
  */
75
82
  CalcViewModelView(self: GM, wep: Weapon, vm: Entity, oldPos: Vector, oldAng: Angle, pos: Vector, ang: Angle): (Vector, Angle);
83
+
76
84
  /**
77
85
  * Called whenever a players tries to create an undo.
78
86
  * @realm server
79
87
  * @source https://wiki.facepunch.com/gmod/GM:CanCreateUndo
80
88
  */
81
89
  CanCreateUndo(self: GM, ply: Player, undo: Undo): boolean;
90
+
82
91
  /**
83
92
  * Called when a variable is about to be edited on an Entity (called by `Edit Properties...` menu), to determine if the edit should be permitted.
84
93
  *
@@ -90,6 +99,7 @@ interface GM {
90
99
  * @source https://wiki.facepunch.com/gmod/GM:CanEditVariable
91
100
  */
92
101
  CanEditVariable(self: GM, ent: Entity, ply: Player, key: string, value: string, editor: table): boolean;
102
+
93
103
  /**
94
104
  * Determines if the player can exit the vehicle on their own. [Player:ExitVehicle](https://wiki.facepunch.com/gmod/Player:ExitVehicle) will bypass this hook.
95
105
  *
@@ -100,6 +110,7 @@ interface GM {
100
110
  * @source https://wiki.facepunch.com/gmod/GM:CanExitVehicle
101
111
  */
102
112
  CanExitVehicle(self: GM, veh: Vehicle, ply: Player): boolean;
113
+
103
114
  /**
104
115
  * Determines whether or not a given player player can enter the given vehicle. [Player:EnterVehicle](https://wiki.facepunch.com/gmod/Player:EnterVehicle) will still call this hook.
105
116
  *
@@ -109,30 +120,35 @@ interface GM {
109
120
  * @source https://wiki.facepunch.com/gmod/GM:CanPlayerEnterVehicle
110
121
  */
111
122
  CanPlayerEnterVehicle(self: GM, player: Player, vehicle: Vehicle, role: number): boolean;
123
+
112
124
  /**
113
125
  * Determines if the player can kill themselves using the `kill` or `explode` console commands.
114
126
  * @realm server
115
127
  * @source https://wiki.facepunch.com/gmod/GM:CanPlayerSuicide
116
128
  */
117
129
  CanPlayerSuicide(self: GM, player: Player): boolean;
130
+
118
131
  /**
119
132
  * Determines if the player can unfreeze the entity.
120
133
  * @realm server
121
134
  * @source https://wiki.facepunch.com/gmod/GM:CanPlayerUnfreeze
122
135
  */
123
136
  CanPlayerUnfreeze(self: GM, player: Player, entity: Entity, phys: PhysObj): boolean;
137
+
124
138
  /**
125
139
  * Controls if a [property](https://wiki.facepunch.com/gmod/properties) can be used or not.
126
140
  * @realm shared
127
141
  * @source https://wiki.facepunch.com/gmod/GM:CanProperty
128
142
  */
129
143
  CanProperty(self: GM, ply: Player, property: string, ent: Entity): boolean;
144
+
130
145
  /**
131
146
  * Called whenever a players tries to undo.
132
147
  * @realm server
133
148
  * @source https://wiki.facepunch.com/gmod/GM:CanUndo
134
149
  */
135
150
  CanUndo(self: GM, ply: Player, undo: Undo): boolean;
151
+
136
152
  /**
137
153
  * Called each frame to record demos to video using [IVideoWriter](https://wiki.facepunch.com/gmod/IVideoWriter).
138
154
  *
@@ -143,6 +159,7 @@ interface GM {
143
159
  * @source https://wiki.facepunch.com/gmod/GM:CaptureVideo
144
160
  */
145
161
  CaptureVideo(self: GM): void;
162
+
146
163
  /**
147
164
  * Called when a message is printed to the chat box. Note, that this isn't working with player messages even though there are arguments for it.
148
165
  *
@@ -152,12 +169,14 @@ interface GM {
152
169
  * @source https://wiki.facepunch.com/gmod/GM:ChatText
153
170
  */
154
171
  ChatText(self: GM, index: number, name: string, text: string, type: string): boolean;
172
+
155
173
  /**
156
174
  * Called whenever the content of the user's chat input box is changed.
157
175
  * @realm client
158
176
  * @source https://wiki.facepunch.com/gmod/GM:ChatTextChanged
159
177
  */
160
178
  ChatTextChanged(self: GM, text: string): void;
179
+
161
180
  /**
162
181
  * Called when a **non local player** connects to allow the Lua system to check the password.
163
182
  *
@@ -167,6 +186,7 @@ interface GM {
167
186
  * @source https://wiki.facepunch.com/gmod/GM:CheckPassword
168
187
  */
169
188
  CheckPassword(self: GM, steamID64: string, ipAddress: string, svPassword: string, clPassword: string, name: string): (boolean, string);
189
+
170
190
  /**
171
191
  * Called when a player's sign on state changes.
172
192
  * You cannot get a valid player object from the userID at any point during this hook.
@@ -175,12 +195,14 @@ interface GM {
175
195
  * @source https://wiki.facepunch.com/gmod/GM:ClientSignOnStateChanged
176
196
  */
177
197
  ClientSignOnStateChanged(self: GM, userID: number, oldState: number, newState: number): void;
198
+
178
199
  /**
179
200
  * Called when derma menus are closed with [Global.CloseDermaMenus](https://wiki.facepunch.com/gmod/Global.CloseDermaMenus).
180
201
  * @realm client and menu
181
202
  * @source https://wiki.facepunch.com/gmod/GM:CloseDermaMenus
182
203
  */
183
204
  CloseDermaMenus(self: GM): void;
205
+
184
206
  /**
185
207
  * Called whenever an entity becomes a clientside ragdoll.
186
208
  *
@@ -190,6 +212,7 @@ interface GM {
190
212
  * @source https://wiki.facepunch.com/gmod/GM:CreateClientsideRagdoll
191
213
  */
192
214
  CreateClientsideRagdoll(self: GM, entity: Entity, ragdoll: Entity): void;
215
+
193
216
  /**
194
217
  * Called when a serverside ragdoll of an entity has been created.
195
218
  *
@@ -199,6 +222,7 @@ interface GM {
199
222
  * @source https://wiki.facepunch.com/gmod/GM:CreateEntityRagdoll
200
223
  */
201
224
  CreateEntityRagdoll(self: GM, owner: Entity, ragdoll: Entity): void;
225
+
202
226
  /**
203
227
  * Allows you to change the players movements before they're sent to the server.
204
228
  *
@@ -211,6 +235,7 @@ interface GM {
211
235
  * @source https://wiki.facepunch.com/gmod/GM:CreateMove
212
236
  */
213
237
  CreateMove(self: GM, cmd: CUserCmd): boolean;
238
+
214
239
  /**
215
240
  * Teams are created within this hook using [team.SetUp](https://wiki.facepunch.com/gmod/team.SetUp).
216
241
  *
@@ -220,12 +245,14 @@ interface GM {
220
245
  * @source https://wiki.facepunch.com/gmod/GM:CreateTeams
221
246
  */
222
247
  CreateTeams(self: GM): void;
248
+
223
249
  /**
224
250
  * Called upon an animation event, this is the ideal place to call player animation functions such as [Player:AddVCDSequenceToGestureSlot](https://wiki.facepunch.com/gmod/Player:AddVCDSequenceToGestureSlot), [Player:AnimRestartGesture](https://wiki.facepunch.com/gmod/Player:AnimRestartGesture) and so on.
225
251
  * @realm shared
226
252
  * @source https://wiki.facepunch.com/gmod/GM:DoAnimationEvent
227
253
  */
228
254
  DoAnimationEvent(self: GM, ply: Player, event: number, data?: number): number;
255
+
229
256
  /**
230
257
  * Handles the player's death.
231
258
  *
@@ -242,18 +269,21 @@ interface GM {
242
269
  * @source https://wiki.facepunch.com/gmod/GM:DoPlayerDeath
243
270
  */
244
271
  DoPlayerDeath(self: GM, ply: Player, attacker: Entity, dmg: CTakeDamageInfo): void;
272
+
245
273
  /**
246
274
  * This hook is called every frame to draw all of the current death notices.
247
275
  * @realm client
248
276
  * @source https://wiki.facepunch.com/gmod/GM:DrawDeathNotice
249
277
  */
250
278
  DrawDeathNotice(self: GM, x: number, y: number): void;
279
+
251
280
  /**
252
281
  * Called every frame before drawing the in-game monitors ( Breencast, in-game TVs, etc ), but doesn't seem to be doing anything, trying to render 2D or 3D elements fail.
253
282
  * @realm client
254
283
  * @source https://wiki.facepunch.com/gmod/GM:DrawMonitors
255
284
  */
256
285
  DrawMonitors(self: GM): void;
286
+
257
287
  /**
258
288
  * Called after all other 2D draw hooks are called. Draws over all VGUI Panels and HUDs.
259
289
  *
@@ -267,6 +297,7 @@ interface GM {
267
297
  * @source https://wiki.facepunch.com/gmod/GM:DrawOverlay
268
298
  */
269
299
  DrawOverlay(self: GM): void;
300
+
270
301
  /**
271
302
  * Allows you to override physgun effects rendering.
272
303
  *
@@ -277,12 +308,14 @@ interface GM {
277
308
  * @source https://wiki.facepunch.com/gmod/GM:DrawPhysgunBeam
278
309
  */
279
310
  DrawPhysgunBeam(self: GM, ply: Player, physgun: Weapon, enabled: boolean, target: Entity, physBone: number, hitPos: Vector): boolean;
311
+
280
312
  /**
281
313
  * Called right before an entity stops driving. Overriding this hook will cause it to not call [drive.End](https://wiki.facepunch.com/gmod/drive.End) and the player will not stop driving.
282
314
  * @realm shared
283
315
  * @source https://wiki.facepunch.com/gmod/GM:EndEntityDriving
284
316
  */
285
317
  EndEntityDriving(self: GM, ent: Entity, ply: Player): void;
318
+
286
319
  /**
287
320
  * Called whenever a sound has been played. This will not be called clientside if the server played the sound without the client also calling [Entity:EmitSound](https://wiki.facepunch.com/gmod/Entity:EmitSound).
288
321
  *
@@ -290,6 +323,7 @@ interface GM {
290
323
  * @source https://wiki.facepunch.com/gmod/GM:EntityEmitSound
291
324
  */
292
325
  EntityEmitSound(self: GM, data: EmitSoundInfo): boolean;
326
+
293
327
  /**
294
328
  * Called every time a bullet is about to be fired from an entity, which allows to completely modify the bullet structure before the bullet is actually fired.
295
329
  *
@@ -302,6 +336,7 @@ interface GM {
302
336
  * @source https://wiki.facepunch.com/gmod/GM:EntityFireBullets
303
337
  */
304
338
  EntityFireBullets(self: GM, entity: Entity, data: Bullet): boolean;
339
+
305
340
  /**
306
341
  * Called when a key-value pair is set on an entity on map spawn. Is **not** called by [Entity:SetKeyValue](https://wiki.facepunch.com/gmod/Entity:SetKeyValue).
307
342
  *
@@ -311,6 +346,7 @@ interface GM {
311
346
  * @source https://wiki.facepunch.com/gmod/GM:EntityKeyValue
312
347
  */
313
348
  EntityKeyValue(self: GM, ent: Entity, key: string, value: string): string;
349
+
314
350
  /**
315
351
  * Called when an NW2Var is changed.
316
352
  * If a NW2Var is set on an entity that is based on a Lua Entity could result in the NW2Var being mixed up with other ones and being updated multiple times.
@@ -324,6 +360,7 @@ interface GM {
324
360
  * @source https://wiki.facepunch.com/gmod/GM:EntityNetworkedVarChanged
325
361
  */
326
362
  EntityNetworkedVarChanged(self: GM, ent: Entity, name: string, oldval: any, newval: any): void;
363
+
327
364
  /**
328
365
  * Called right before removal of an entity.
329
366
  * **WARNING**: This hook is called clientside during full updates due to how networking works in the Source Engine.
@@ -335,6 +372,7 @@ interface GM {
335
372
  * @source https://wiki.facepunch.com/gmod/GM:EntityRemoved
336
373
  */
337
374
  EntityRemoved(self: GM, ent: Entity, fullUpdate: boolean): void;
375
+
338
376
  /**
339
377
  * Called when an entity is about to take damage. You can modify all parts of the damage info in this hook or completely block the damage event.
340
378
  *
@@ -347,6 +385,7 @@ interface GM {
347
385
  * @source https://wiki.facepunch.com/gmod/GM:EntityTakeDamage
348
386
  */
349
387
  EntityTakeDamage(self: GM, target: Entity, dmg: CTakeDamageInfo): boolean;
388
+
350
389
  /**
351
390
  * This hook polls the entity the player use action should be applied to.
352
391
  *
@@ -357,12 +396,14 @@ interface GM {
357
396
  * @source https://wiki.facepunch.com/gmod/GM:FindUseEntity
358
397
  */
359
398
  FindUseEntity(self: GM, ply: Player, defaultEnt: Entity): Entity;
399
+
360
400
  /**
361
401
  * Runs when user cancels/finishes typing.
362
402
  * @realm client
363
403
  * @source https://wiki.facepunch.com/gmod/GM:FinishChat
364
404
  */
365
405
  FinishChat(self: GM): void;
406
+
366
407
  /**
367
408
  * Called after [GM:Move](https://wiki.facepunch.com/gmod/GM:Move), applies all the changes from the [CMoveData](https://wiki.facepunch.com/gmod/CMoveData) to the player.
368
409
  *
@@ -372,6 +413,7 @@ interface GM {
372
413
  * @source https://wiki.facepunch.com/gmod/GM:FinishMove
373
414
  */
374
415
  FinishMove(self: GM, ply: Player, mv: CMoveData): boolean;
416
+
375
417
  /**
376
418
  * Called to allow override of the default Derma skin for all panels.
377
419
  *
@@ -384,6 +426,7 @@ interface GM {
384
426
  * @source https://wiki.facepunch.com/gmod/GM:ForceDermaSkin
385
427
  */
386
428
  ForceDermaSkin(self: GM): string;
429
+
387
430
  /**
388
431
  * Called when the mouse has been double clicked on any panel derived from CGModBase, such as the panel used by [gui.EnableScreenClicker](https://wiki.facepunch.com/gmod/gui.EnableScreenClicker) and the panel used by [Panel:ParentToHUD](https://wiki.facepunch.com/gmod/Panel:ParentToHUD).
389
432
  *
@@ -393,6 +436,7 @@ interface GM {
393
436
  * @source https://wiki.facepunch.com/gmod/GM:GUIMouseDoublePressed
394
437
  */
395
438
  GUIMouseDoublePressed(self: GM, mouseCode: number, aimVector: Vector): void;
439
+
396
440
  /**
397
441
  * Called whenever a players presses a mouse key on the context menu in Sandbox or on any panel derived from CGModBase, such as the panel used by [gui.EnableScreenClicker](https://wiki.facepunch.com/gmod/gui.EnableScreenClicker) and the panel used by [Panel:ParentToHUD](https://wiki.facepunch.com/gmod/Panel:ParentToHUD).
398
442
  *
@@ -402,18 +446,21 @@ interface GM {
402
446
  * @source https://wiki.facepunch.com/gmod/GM:GUIMousePressed
403
447
  */
404
448
  GUIMousePressed(self: GM, mouseCode: number, aimVector: Vector): void;
449
+
405
450
  /**
406
451
  * Called whenever a players releases a mouse key on the context menu in Sandbox or on any panel derived from CGModBase, such as the panel used by [gui.EnableScreenClicker](https://wiki.facepunch.com/gmod/gui.EnableScreenClicker) and the panel used by [Panel:ParentToHUD](https://wiki.facepunch.com/gmod/Panel:ParentToHUD).
407
452
  * @realm client
408
453
  * @source https://wiki.facepunch.com/gmod/GM:GUIMouseReleased
409
454
  */
410
455
  GUIMouseReleased(self: GM, mouseCode: number, aimVector: Vector): void;
456
+
411
457
  /**
412
458
  * Called when game content has been changed, for example an addon or a mountable game was (un)mounted.
413
459
  * @realm shared and menu
414
460
  * @source https://wiki.facepunch.com/gmod/GM:GameContentChanged
415
461
  */
416
462
  GameContentChanged(self: GM): void;
463
+
417
464
  /**
418
465
  * An internal function used to get an untranslated string to show in the kill feed as the entity's name. See [GM:SendDeathNotice](https://wiki.facepunch.com/gmod/GM:SendDeathNotice)
419
466
  *
@@ -421,12 +468,14 @@ interface GM {
421
468
  * @source https://wiki.facepunch.com/gmod/GM:GetDeathNoticeEntityName
422
469
  */
423
470
  GetDeathNoticeEntityName(self: GM, name: string | Entity): string;
471
+
424
472
  /**
425
473
  * Called when a player takes damage from falling, allows to override the damage.
426
474
  * @realm server
427
475
  * @source https://wiki.facepunch.com/gmod/GM:GetFallDamage
428
476
  */
429
477
  GetFallDamage(self: GM, ply: Player, speed: number): number;
478
+
430
479
  /**
431
480
  * Called when the game(server) needs to update the text shown in the server browser as the gamemode. Runs at a ~2s interval, runs even when the server is hibernating.
432
481
  *
@@ -439,12 +488,14 @@ interface GM {
439
488
  * @source https://wiki.facepunch.com/gmod/GM:GetGameDescription
440
489
  */
441
490
  GetGameDescription(self: GM): string;
491
+
442
492
  /**
443
493
  * Allows you to modify the Source Engine's motion blur shaders.
444
494
  * @realm client
445
495
  * @source https://wiki.facepunch.com/gmod/GM:GetMotionBlurValues
446
496
  */
447
497
  GetMotionBlurValues(self: GM, horizontal: number, vertical: number, forward: number, rotational: number): (number, number, number, number);
498
+
448
499
  /**
449
500
  * Called to determine preferred carry angles for the entity. It works for both, +use pickup and gravity gun pickup.
450
501
  *
@@ -458,24 +509,28 @@ interface GM {
458
509
  * @source https://wiki.facepunch.com/gmod/GM:GetPreferredCarryAngles
459
510
  */
460
511
  GetPreferredCarryAngles(self: GM, ent: Entity, ply: Player): Angle;
512
+
461
513
  /**
462
514
  * Returns the color for the given entity's team. This is used in chat and deathnotice text.
463
515
  * @realm client
464
516
  * @source https://wiki.facepunch.com/gmod/GM:GetTeamColor
465
517
  */
466
518
  GetTeamColor(self: GM, ent: Entity): Color;
519
+
467
520
  /**
468
521
  * Returns the team color for the given team index.
469
522
  * @realm client
470
523
  * @source https://wiki.facepunch.com/gmod/GM:GetTeamNumColor
471
524
  */
472
525
  GetTeamNumColor(self: GM, team: number): Color;
526
+
473
527
  /**
474
528
  * Override this hook to disable/change ear-grabbing in your gamemode. By default, it is not called anywhere on the server.
475
529
  * @realm shared
476
530
  * @source https://wiki.facepunch.com/gmod/GM:GrabEarAnimation
477
531
  */
478
532
  GrabEarAnimation(self: GM, ply: Player): void;
533
+
479
534
  /**
480
535
  * Called when an entity is released by a gravity gun.
481
536
  *
@@ -485,6 +540,7 @@ interface GM {
485
540
  * @source https://wiki.facepunch.com/gmod/GM:GravGunOnDropped
486
541
  */
487
542
  GravGunOnDropped(self: GM, ply: Player, ent: Entity): void;
543
+
488
544
  /**
489
545
  * Called when an entity is picked up by a gravity gun.
490
546
  *
@@ -495,6 +551,7 @@ interface GM {
495
551
  * @source https://wiki.facepunch.com/gmod/GM:GravGunOnPickedUp
496
552
  */
497
553
  GravGunOnPickedUp(self: GM, ply: Player, ent: Entity): void;
554
+
498
555
  /**
499
556
  * Called every tick to poll whether a player is allowed to pick up an entity with the gravity gun or not.
500
557
  *
@@ -507,6 +564,7 @@ interface GM {
507
564
  * @source https://wiki.facepunch.com/gmod/GM:GravGunPickupAllowed
508
565
  */
509
566
  GravGunPickupAllowed(self: GM, ply: Player, ent: Entity): boolean;
567
+
510
568
  /**
511
569
  * Called when an entity is about to be punted with the gravity gun (primary fire).
512
570
  *
@@ -516,18 +574,21 @@ interface GM {
516
574
  * @source https://wiki.facepunch.com/gmod/GM:GravGunPunt
517
575
  */
518
576
  GravGunPunt(self: GM, ply: Player, ent: Entity): boolean;
577
+
519
578
  /**
520
579
  * Called when the client has picked up ammo. Override to disable default HUD notification.
521
580
  * @realm client
522
581
  * @source https://wiki.facepunch.com/gmod/GM:HUDAmmoPickedUp
523
582
  */
524
583
  HUDAmmoPickedUp(self: GM, itemName: string, amount: number): void;
584
+
525
585
  /**
526
586
  * Renders the HUD pick-up history. Override to hide default or draw your own HUD.
527
587
  * @realm client
528
588
  * @source https://wiki.facepunch.com/gmod/GM:HUDDrawPickupHistory
529
589
  */
530
590
  HUDDrawPickupHistory(self: GM): void;
591
+
531
592
  /**
532
593
  * Called every frame to render the scoreboard.
533
594
  *
@@ -540,18 +601,21 @@ interface GM {
540
601
  * @source https://wiki.facepunch.com/gmod/GM:HUDDrawScoreBoard
541
602
  */
542
603
  HUDDrawScoreBoard(self: GM): void;
604
+
543
605
  /**
544
606
  * Called from [GM:HUDPaint](https://wiki.facepunch.com/gmod/GM:HUDPaint) to draw player info when you hover over a player with your crosshair or mouse.
545
607
  * @realm client
546
608
  * @source https://wiki.facepunch.com/gmod/GM:HUDDrawTargetID
547
609
  */
548
610
  HUDDrawTargetID(self: GM): boolean;
611
+
549
612
  /**
550
613
  * Called when an item has been picked up. Override to disable the default HUD notification.
551
614
  * @realm client
552
615
  * @source https://wiki.facepunch.com/gmod/GM:HUDItemPickedUp
553
616
  */
554
617
  HUDItemPickedUp(self: GM, itemName: string): void;
618
+
555
619
  /**
556
620
  * Called whenever the HUD should be drawn.
557
621
  *
@@ -568,6 +632,7 @@ interface GM {
568
632
  * @source https://wiki.facepunch.com/gmod/GM:HUDPaint
569
633
  */
570
634
  HUDPaint(self: GM): void;
635
+
571
636
  /**
572
637
  * Called before [GM:HUDPaint](https://wiki.facepunch.com/gmod/GM:HUDPaint) when the HUD background is being drawn.
573
638
  *
@@ -581,6 +646,7 @@ interface GM {
581
646
  * @source https://wiki.facepunch.com/gmod/GM:HUDPaintBackground
582
647
  */
583
648
  HUDPaintBackground(self: GM): void;
649
+
584
650
  /**
585
651
  * Called when the Gamemode is about to draw a given element on the client's HUD (heads-up display).
586
652
  *
@@ -591,12 +657,14 @@ interface GM {
591
657
  * @source https://wiki.facepunch.com/gmod/GM:HUDShouldDraw
592
658
  */
593
659
  HUDShouldDraw(self: GM, name: string): boolean;
660
+
594
661
  /**
595
662
  * Called when a weapon has been picked up. Override to disable the default HUD notification.
596
663
  * @realm client
597
664
  * @source https://wiki.facepunch.com/gmod/GM:HUDWeaponPickedUp
598
665
  */
599
666
  HUDWeaponPickedUp(self: GM, weapon: Weapon): void;
667
+
600
668
  /**
601
669
  * Called to handle player armor reduction, when player receives damage.
602
670
  *
@@ -606,54 +674,63 @@ interface GM {
606
674
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerArmorReduction
607
675
  */
608
676
  HandlePlayerArmorReduction(self: GM, ply: Player, dmginfo: CTakeDamageInfo): void;
677
+
609
678
  /**
610
679
  * Allows to override player driving animations.
611
680
  * @realm shared
612
681
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerDriving
613
682
  */
614
683
  HandlePlayerDriving(self: GM, ply: Player): boolean;
684
+
615
685
  /**
616
686
  * Allows to override player crouch animations.
617
687
  * @realm shared
618
688
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerDucking
619
689
  */
620
690
  HandlePlayerDucking(self: GM, ply: Player, velocity: Vector): boolean;
691
+
621
692
  /**
622
693
  * Called every frame by the player model animation system. Allows to override player jumping animations.
623
694
  * @realm shared
624
695
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerJumping
625
696
  */
626
697
  HandlePlayerJumping(self: GM, ply: Player, velocity: Vector): boolean;
698
+
627
699
  /**
628
700
  * Called every frame by the player model animation system. Allows to override player landing animations.
629
701
  * @realm shared
630
702
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerLanding
631
703
  */
632
704
  HandlePlayerLanding(self: GM, ply: Player, velocity: Vector, onGround: boolean): boolean;
705
+
633
706
  /**
634
707
  * Allows to override player noclip animations.
635
708
  * @realm shared
636
709
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerNoClipping
637
710
  */
638
711
  HandlePlayerNoClipping(self: GM, ply: Player, velocity: Vector): boolean;
712
+
639
713
  /**
640
714
  * Allows to override player swimming animations.
641
715
  * @realm shared
642
716
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerSwimming
643
717
  */
644
718
  HandlePlayerSwimming(self: GM, ply: Player, velocity: Vector): boolean;
719
+
645
720
  /**
646
721
  * Allows to override player flying ( in mid-air, not noclipping ) animations.
647
722
  * @realm shared
648
723
  * @source https://wiki.facepunch.com/gmod/GM:HandlePlayerVaulting
649
724
  */
650
725
  HandlePlayerVaulting(self: GM, ply: Player, velocity: Vector): boolean;
726
+
651
727
  /**
652
728
  * Hides the team selection panel.
653
729
  * @realm client
654
730
  * @source https://wiki.facepunch.com/gmod/GM:HideTeam
655
731
  */
656
732
  HideTeam(self: GM): void;
733
+
657
734
  /**
658
735
  * Called after all the entities are initialized. Starting from this hook [Global.LocalPlayer](https://wiki.facepunch.com/gmod/Global.LocalPlayer) will return valid object.
659
736
  *
@@ -664,6 +741,7 @@ interface GM {
664
741
  * @source https://wiki.facepunch.com/gmod/GM:InitPostEntity
665
742
  */
666
743
  InitPostEntity(self: GM): void;
744
+
667
745
  /**
668
746
  * Called after the gamemode loads and starts.
669
747
  *
@@ -672,18 +750,21 @@ interface GM {
672
750
  * @source https://wiki.facepunch.com/gmod/GM:Initialize
673
751
  */
674
752
  Initialize(self: GM): void;
753
+
675
754
  /**
676
755
  * Allows you to modify the supplied User Command with mouse input. This could be used to make moving the mouse do funky things to view angles.
677
756
  * @realm client
678
757
  * @source https://wiki.facepunch.com/gmod/GM:InputMouseApply
679
758
  */
680
759
  InputMouseApply(self: GM, cmd: CUserCmd, x: number, y: number, ang: Angle): boolean;
760
+
681
761
  /**
682
762
  * Check if a player can spawn at a certain spawnpoint.
683
763
  * @realm server
684
764
  * @source https://wiki.facepunch.com/gmod/GM:IsSpawnpointSuitable
685
765
  */
686
766
  IsSpawnpointSuitable(self: GM, ply: Player, spawnpoint: Entity, makeSuitable: boolean): boolean;
767
+
687
768
  /**
688
769
  * Called whenever a player pressed a key included within the IN keys.
689
770
  *
@@ -699,6 +780,7 @@ interface GM {
699
780
  * @source https://wiki.facepunch.com/gmod/GM:KeyPress
700
781
  */
701
782
  KeyPress(self: GM, ply: Player, key: number): void;
783
+
702
784
  /**
703
785
  * Runs when a IN key was released by a player.
704
786
  *
@@ -711,6 +793,7 @@ interface GM {
711
793
  * @source https://wiki.facepunch.com/gmod/GM:KeyRelease
712
794
  */
713
795
  KeyRelease(self: GM, ply: Player, key: number): void;
796
+
714
797
  /**
715
798
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
716
799
  * Called from `gm_load` when the game should load a map.
@@ -718,24 +801,28 @@ interface GM {
718
801
  * @source https://wiki.facepunch.com/gmod/GM:LoadGModSave
719
802
  */
720
803
  LoadGModSave(self: GM, data: string, map: string, timestamp: number): void;
804
+
721
805
  /**
722
806
  * Called while an addon from the Steam workshop is downloading. Used by default to update details on the fancy workshop download panel.
723
807
  * @realm menu
724
808
  * @source https://wiki.facepunch.com/gmod/GM:LoadGModSaveFailed
725
809
  */
726
810
  LoadGModSaveFailed(self: GM, reason: string, workshopid: string): void;
811
+
727
812
  /**
728
813
  * Called when `menu.lua` has finished loading.
729
814
  * @realm menu
730
815
  * @source https://wiki.facepunch.com/gmod/GM:MenuStart
731
816
  */
732
817
  MenuStart(self: GM): void;
818
+
733
819
  /**
734
820
  * Override this gamemode function to disable mouth movement when talking on voice chat. By default, it is not called anywhere on the server.
735
821
  * @realm shared
736
822
  * @source https://wiki.facepunch.com/gmod/GM:MouthMoveAnimation
737
823
  */
738
824
  MouthMoveAnimation(self: GM, ply: Player): void;
825
+
739
826
  /**
740
827
  * The Move hook is called for you to manipulate the player's MoveData.
741
828
  *
@@ -751,18 +838,21 @@ interface GM {
751
838
  * @source https://wiki.facepunch.com/gmod/GM:Move
752
839
  */
753
840
  Move(self: GM, ply: Player, mv: CMoveData): boolean;
841
+
754
842
  /**
755
843
  * Returning true in this hook will cause it to render depth buffers defined with [render.GetResolvedFullFrameDepth](https://wiki.facepunch.com/gmod/render.GetResolvedFullFrameDepth).
756
844
  * @realm client
757
845
  * @source https://wiki.facepunch.com/gmod/GM:NeedsDepthPass
758
846
  */
759
847
  NeedsDepthPass(self: GM): boolean;
848
+
760
849
  /**
761
850
  * Called when an entity has been created over the network.
762
851
  * @realm client
763
852
  * @source https://wiki.facepunch.com/gmod/GM:NetworkEntityCreated
764
853
  */
765
854
  NetworkEntityCreated(self: GM, ent: Entity): void;
855
+
766
856
  /**
767
857
  * Called when a player's SteamID has been validated by Steam.
768
858
  *
@@ -775,6 +865,7 @@ interface GM {
775
865
  * @source https://wiki.facepunch.com/gmod/GM:NetworkIDValidated
776
866
  */
777
867
  NetworkIDValidated(self: GM, name: string, steamID: string, ownerID: string): void;
868
+
778
869
  /**
779
870
  * Called whenever this entity changes its transmission state for this [Global.LocalPlayer](https://wiki.facepunch.com/gmod/Global.LocalPlayer), such as exiting or re entering the [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community").
780
871
  *
@@ -787,12 +878,14 @@ interface GM {
787
878
  * @source https://wiki.facepunch.com/gmod/GM:NotifyShouldTransmit
788
879
  */
789
880
  NotifyShouldTransmit(self: GM, entity: Entity, shouldtransmit: boolean): void;
881
+
790
882
  /**
791
883
  * Called when a player has achieved an achievement. You can get the name and other information from an achievement ID with the [achievements](https://wiki.facepunch.com/gmod/achievements) library.
792
884
  * @realm client
793
885
  * @source https://wiki.facepunch.com/gmod/GM:OnAchievementAchieved
794
886
  */
795
887
  OnAchievementAchieved(self: GM, ply: Player, achievement: number): void;
888
+
796
889
  /**
797
890
  * Called when the local player presses TAB while having their chatbox opened.
798
891
  *
@@ -803,12 +896,14 @@ interface GM {
803
896
  * @source https://wiki.facepunch.com/gmod/GM:OnChatTab
804
897
  */
805
898
  OnChatTab(self: GM, text: string): string;
899
+
806
900
  /**
807
901
  * Called when the player cleans up something.
808
902
  * @realm client
809
903
  * @source https://wiki.facepunch.com/gmod/GM:OnCleanup
810
904
  */
811
905
  OnCleanup(self: GM, name: string): boolean;
906
+
812
907
  /**
813
908
  * Called on the server when a Lua error occurs on a client and is sent to the server.
814
909
  *
@@ -826,12 +921,14 @@ interface GM {
826
921
  * @source https://wiki.facepunch.com/gmod/GM:OnClientLuaError
827
922
  */
828
923
  OnClientLuaError(self: GM, error: string, ply: Player, stack: table, name: string): void;
924
+
829
925
  /**
830
926
  * Called when a caption/subtitle has been emitted to the closed caption box.
831
927
  * @realm client
832
928
  * @source https://wiki.facepunch.com/gmod/GM:OnCloseCaptionEmit
833
929
  */
834
930
  OnCloseCaptionEmit(self: GM, soundScript: string, duration: number, fromPlayer: boolean, fullText: string): boolean;
931
+
835
932
  /**
836
933
  * Called when the context menu keybind (+menu_context) is released, which by default is C.
837
934
  *
@@ -843,6 +940,7 @@ interface GM {
843
940
  * @source https://wiki.facepunch.com/gmod/GM:OnContextMenuClose
844
941
  */
845
942
  OnContextMenuClose(self: GM): void;
943
+
846
944
  /**
847
945
  * Called when the context menu keybind (`+menu_context`) is pressed, which by default is C.
848
946
  *
@@ -852,18 +950,21 @@ interface GM {
852
950
  * @source https://wiki.facepunch.com/gmod/GM:OnContextMenuOpen
853
951
  */
854
952
  OnContextMenuOpen(self: GM): void;
953
+
855
954
  /**
856
955
  * Called when the crazy physics detection detects an entity with crazy physics, i.e. position being far outside of the map, velocities being near or at infinity, etc. The primary reason for this system is to prevent program crashes in physics engine.
857
956
  * @realm shared
858
957
  * @source https://wiki.facepunch.com/gmod/GM:OnCrazyPhysics
859
958
  */
860
959
  OnCrazyPhysics(self: GM, ent: Entity, physobj: PhysObj): void;
960
+
861
961
  /**
862
962
  * Called when a player has been hurt by an explosion. Override to disable default sound effect.
863
963
  * @realm server
864
964
  * @source https://wiki.facepunch.com/gmod/GM:OnDamagedByExplosion
865
965
  */
866
966
  OnDamagedByExplosion(self: GM, ply: Player, dmginfo: CTakeDamageInfo): void;
967
+
867
968
  /**
868
969
  * Called as soon as the entity is created. Very little of the entity's properties will be initialized at this stage. (keyvalues, classname, flags, anything), especially on the serverside.
869
970
  *
@@ -874,6 +975,7 @@ interface GM {
874
975
  * @source https://wiki.facepunch.com/gmod/GM:OnEntityCreated
875
976
  */
876
977
  OnEntityCreated(self: GM, entity: Entity): void;
978
+
877
979
  /**
878
980
  * Called when the [Entity:WaterLevel](https://wiki.facepunch.com/gmod/Entity:WaterLevel) of an entity is changed.
879
981
  *
@@ -892,6 +994,7 @@ interface GM {
892
994
  * @source https://wiki.facepunch.com/gmod/GM:OnEntityWaterLevelChanged
893
995
  */
894
996
  OnEntityWaterLevelChanged(self: GM, entity: Entity, old: number, _new: number): void;
997
+
895
998
  /**
896
999
  * Called when the gamemode is loaded. [gmod.GetGamemode](https://wiki.facepunch.com/gmod/gmod.GetGamemode) will be functional at this point.
897
1000
  *
@@ -901,6 +1004,7 @@ interface GM {
901
1004
  * @source https://wiki.facepunch.com/gmod/GM:OnGamemodeLoaded
902
1005
  */
903
1006
  OnGamemodeLoaded(self: GM): void;
1007
+
904
1008
  /**
905
1009
  * Called when a Lua error occurs.
906
1010
  * If you want to retrieve client errors on the server side, you can use this hook: [GM:OnClientLuaError](https://wiki.facepunch.com/gmod/GM:OnClientLuaError)
@@ -911,6 +1015,7 @@ interface GM {
911
1015
  * @source https://wiki.facepunch.com/gmod/GM:OnLuaError
912
1016
  */
913
1017
  OnLuaError(self: GM, error: string, realm: string, stack: table, name: string, id: string): void;
1018
+
914
1019
  /**
915
1020
  * Called whenever an NPC drops an item upon its death, such as health kits, armor batteries, etc.
916
1021
  *
@@ -923,12 +1028,14 @@ interface GM {
923
1028
  * @source https://wiki.facepunch.com/gmod/GM:OnNPCDropItem
924
1029
  */
925
1030
  OnNPCDropItem(self: GM, npc: NPC, item: Entity): void;
1031
+
926
1032
  /**
927
1033
  * Called whenever an NPC is killed.
928
1034
  * @realm server
929
1035
  * @source https://wiki.facepunch.com/gmod/GM:OnNPCKilled
930
1036
  */
931
1037
  OnNPCKilled(self: GM, npc: NPC, attacker: Entity, inflictor: Entity): void;
1038
+
932
1039
  /**
933
1040
  * Called when a Addon Conflict occurs, only works in the Menu realm.
934
1041
  *
@@ -936,6 +1043,7 @@ interface GM {
936
1043
  * @source https://wiki.facepunch.com/gmod/GM:OnNotifyAddonConflict
937
1044
  */
938
1045
  OnNotifyAddonConflict(self: GM, addon1: string, addon2: string, fileName: string): void;
1046
+
939
1047
  /**
940
1048
  * Called when the main menu has been blocked by [GM:OnPauseMenuShow](https://wiki.facepunch.com/gmod/GM:OnPauseMenuShow) four times in a small interval. This is used internally to explain to the user that they can hold SHIFT to force open the main menu.
941
1049
  *
@@ -943,6 +1051,7 @@ interface GM {
943
1051
  * @source https://wiki.facepunch.com/gmod/GM:OnPauseMenuBlockedTooManyTimes
944
1052
  */
945
1053
  OnPauseMenuBlockedTooManyTimes(self: GM): void;
1054
+
946
1055
  /**
947
1056
  * Called when the pause menu is attempting to be opened. Allows you to prevent the main menu from being opened that time.
948
1057
  *
@@ -952,6 +1061,7 @@ interface GM {
952
1061
  * @source https://wiki.facepunch.com/gmod/GM:OnPauseMenuShow
953
1062
  */
954
1063
  OnPauseMenuShow(self: GM): boolean;
1064
+
955
1065
  /**
956
1066
  * Called when a permission gets Granted or Revoked.
957
1067
  *
@@ -959,6 +1069,7 @@ interface GM {
959
1069
  * @source https://wiki.facepunch.com/gmod/GM:OnPermissionsChanged
960
1070
  */
961
1071
  OnPermissionsChanged(self: GM): void;
1072
+
962
1073
  /**
963
1074
  * Called when a player freezes an entity with the physgun.
964
1075
  *
@@ -966,6 +1077,7 @@ interface GM {
966
1077
  * @source https://wiki.facepunch.com/gmod/GM:OnPhysgunFreeze
967
1078
  */
968
1079
  OnPhysgunFreeze(self: GM, weapon: Entity, physobj: PhysObj, ent: Entity, ply: Player): boolean;
1080
+
969
1081
  /**
970
1082
  * Called to when a player has successfully picked up an entity with their Physics Gun.
971
1083
  *
@@ -980,12 +1092,14 @@ interface GM {
980
1092
  * @source https://wiki.facepunch.com/gmod/GM:OnPhysgunPickup
981
1093
  */
982
1094
  OnPhysgunPickup(self: GM, ply: Player, ent: Entity): void;
1095
+
983
1096
  /**
984
1097
  * Called when a player reloads with the physgun. Override this to disable default unfreezing behavior.
985
1098
  * @realm server
986
1099
  * @source https://wiki.facepunch.com/gmod/GM:OnPhysgunReload
987
1100
  */
988
1101
  OnPhysgunReload(self: GM, physgun: Weapon, ply: Player): boolean;
1102
+
989
1103
  /**
990
1104
  * Called when a player has changed team using [GM:PlayerJoinTeam](https://wiki.facepunch.com/gmod/GM:PlayerJoinTeam).
991
1105
  *
@@ -997,6 +1111,7 @@ interface GM {
997
1111
  * @deprecated Use GM:PlayerChangedTeam instead, which works for every Player:SetTeam call.
998
1112
  */
999
1113
  OnPlayerChangedTeam(self: GM, ply: Player, oldTeam: number, newTeam: number): void;
1114
+
1000
1115
  /**
1001
1116
  * Called whenever a player sends a chat message. For the serverside equivalent, see [GM:PlayerSay](https://wiki.facepunch.com/gmod/GM:PlayerSay).
1002
1117
  * **NOTE**: The input (or suppression) of this hook is based on the output from [GM:PlayerSay](https://wiki.facepunch.com/gmod/GM:PlayerSay). Chat events suppressed serverside do not call this hook.
@@ -1006,24 +1121,28 @@ interface GM {
1006
1121
  * @source https://wiki.facepunch.com/gmod/GM:OnPlayerChat
1007
1122
  */
1008
1123
  OnPlayerChat(self: GM, ply: Player, text: string, teamChat: boolean, isDead: boolean): boolean;
1124
+
1009
1125
  /**
1010
1126
  * Called when a player makes contact with the ground after a jump or a fall.
1011
1127
  * @realm shared
1012
1128
  * @source https://wiki.facepunch.com/gmod/GM:OnPlayerHitGround
1013
1129
  */
1014
1130
  OnPlayerHitGround(self: GM, player: Entity, inWater: boolean, onFloater: boolean, speed: number): boolean;
1131
+
1015
1132
  /**
1016
1133
  * Called when a player jumps.
1017
1134
  * @realm shared
1018
1135
  * @source https://wiki.facepunch.com/gmod/GM:OnPlayerJump
1019
1136
  */
1020
1137
  OnPlayerJump(self: GM, player: Entity, speed: number): void;
1138
+
1021
1139
  /**
1022
1140
  * Called when a player +use drops an entity.
1023
1141
  * @realm server
1024
1142
  * @source https://wiki.facepunch.com/gmod/GM:OnPlayerPhysicsDrop
1025
1143
  */
1026
1144
  OnPlayerPhysicsDrop(self: GM, ply: Player, ent: Entity, thrown: boolean): void;
1145
+
1027
1146
  /**
1028
1147
  * Called when a player +use pickups up an entity. This will be called after the entity passes though [GM:AllowPlayerPickup](https://wiki.facepunch.com/gmod/GM:AllowPlayerPickup).
1029
1148
  *
@@ -1034,6 +1153,7 @@ interface GM {
1034
1153
  * @source https://wiki.facepunch.com/gmod/GM:OnPlayerPhysicsPickup
1035
1154
  */
1036
1155
  OnPlayerPhysicsPickup(self: GM, ply: Player, ent: Entity): void;
1156
+
1037
1157
  /**
1038
1158
  * Called when gamemode has been reloaded by auto refresh.
1039
1159
  *
@@ -1044,6 +1164,7 @@ interface GM {
1044
1164
  * @source https://wiki.facepunch.com/gmod/GM:OnReloaded
1045
1165
  */
1046
1166
  OnReloaded(self: GM): void;
1167
+
1047
1168
  /**
1048
1169
  * Called when the player's screen resolution of the game changes. This also called when changing MSAA settings.
1049
1170
  *
@@ -1053,18 +1174,21 @@ interface GM {
1053
1174
  * @source https://wiki.facepunch.com/gmod/GM:OnScreenSizeChanged
1054
1175
  */
1055
1176
  OnScreenSizeChanged(self: GM, oldWidth: number, oldHeight: number, newWidth: number, newHeight: number): void;
1177
+
1056
1178
  /**
1057
1179
  * Called when a player releases the `+menu` bind on their keyboard, which is bound to Q by default.
1058
1180
  * @realm client
1059
1181
  * @source https://wiki.facepunch.com/gmod/GM:OnSpawnMenuClose
1060
1182
  */
1061
1183
  OnSpawnMenuClose(self: GM): void;
1184
+
1062
1185
  /**
1063
1186
  * Called when a player presses the `+menu` bind on their keyboard, which is bound to Q by default.
1064
1187
  * @realm client
1065
1188
  * @source https://wiki.facepunch.com/gmod/GM:OnSpawnMenuOpen
1066
1189
  */
1067
1190
  OnSpawnMenuOpen(self: GM): void;
1191
+
1068
1192
  /**
1069
1193
  * Called when a [DTextEntry](https://wiki.facepunch.com/gmod/DTextEntry) gets focus.
1070
1194
  *
@@ -1074,18 +1198,21 @@ interface GM {
1074
1198
  * @source https://wiki.facepunch.com/gmod/GM:OnTextEntryGetFocus
1075
1199
  */
1076
1200
  OnTextEntryGetFocus(self: GM, panel: Panel): void;
1201
+
1077
1202
  /**
1078
1203
  * Called when a [DTextEntry](https://wiki.facepunch.com/gmod/DTextEntry) loses focus.
1079
1204
  * @realm client
1080
1205
  * @source https://wiki.facepunch.com/gmod/GM:OnTextEntryLoseFocus
1081
1206
  */
1082
1207
  OnTextEntryLoseFocus(self: GM, panel: Panel): void;
1208
+
1083
1209
  /**
1084
1210
  * Called when the player undoes something.
1085
1211
  * @realm client
1086
1212
  * @source https://wiki.facepunch.com/gmod/GM:OnUndo
1087
1213
  */
1088
1214
  OnUndo(self: GM, name: string, customText: string): boolean;
1215
+
1089
1216
  /**
1090
1217
  * Called when the player changes their weapon to another one - and their viewmodel model changes.
1091
1218
  *
@@ -1095,6 +1222,7 @@ interface GM {
1095
1222
  * @source https://wiki.facepunch.com/gmod/GM:OnViewModelChanged
1096
1223
  */
1097
1224
  OnViewModelChanged(self: GM, viewmodel: Entity, oldModel: string, newModel: string): void;
1225
+
1098
1226
  /**
1099
1227
  * Called when a player drops an entity with the Physgun.
1100
1228
  *
@@ -1104,6 +1232,7 @@ interface GM {
1104
1232
  * @source https://wiki.facepunch.com/gmod/GM:PhysgunDrop
1105
1233
  */
1106
1234
  PhysgunDrop(self: GM, player: Player, entity: Entity): void;
1235
+
1107
1236
  /**
1108
1237
  * Called to determine if a player should be able to pick up an entity with the Physics Gun.
1109
1238
  *
@@ -1116,6 +1245,7 @@ interface GM {
1116
1245
  * @source https://wiki.facepunch.com/gmod/GM:PhysgunPickup
1117
1246
  */
1118
1247
  PhysgunPickup(self: GM, player: Player, entity: Entity): boolean;
1248
+
1119
1249
  /**
1120
1250
  * Called after player's reserve ammo count changes.
1121
1251
  *
@@ -1123,6 +1253,7 @@ interface GM {
1123
1253
  * @source https://wiki.facepunch.com/gmod/GM:PlayerAmmoChanged
1124
1254
  */
1125
1255
  PlayerAmmoChanged(self: GM, ply: Player, ammoID: number, oldCount: number, newCount: number): void;
1256
+
1126
1257
  /**
1127
1258
  * Called after the player gets their [Player:UniqueID](https://wiki.facepunch.com/gmod/Player:UniqueID) set for the first time. This hook will also be called in singleplayer.
1128
1259
  *
@@ -1132,6 +1263,7 @@ interface GM {
1132
1263
  * @source https://wiki.facepunch.com/gmod/GM:PlayerAuthed
1133
1264
  */
1134
1265
  PlayerAuthed(self: GM, ply: Player, steamid: string, uniqueid: string): void;
1266
+
1135
1267
  /**
1136
1268
  * Runs when a bind has been pressed. Allows to block commands.
1137
1269
  *
@@ -1148,6 +1280,7 @@ interface GM {
1148
1280
  * @source https://wiki.facepunch.com/gmod/GM:PlayerBindPress
1149
1281
  */
1150
1282
  PlayerBindPress(self: GM, ply: Player, bind: string, pressed: boolean, code: number): boolean;
1283
+
1151
1284
  /**
1152
1285
  * Called when a player presses a button.
1153
1286
  *
@@ -1160,6 +1293,7 @@ interface GM {
1160
1293
  * @source https://wiki.facepunch.com/gmod/GM:PlayerButtonDown
1161
1294
  */
1162
1295
  PlayerButtonDown(self: GM, ply: Player, button: BUTTON_CODE): void;
1296
+
1163
1297
  /**
1164
1298
  * Called when a player releases a button.
1165
1299
  *
@@ -1172,6 +1306,7 @@ interface GM {
1172
1306
  * @source https://wiki.facepunch.com/gmod/GM:PlayerButtonUp
1173
1307
  */
1174
1308
  PlayerButtonUp(self: GM, ply: Player, button: BUTTON_CODE): void;
1309
+
1175
1310
  /**
1176
1311
  * Decides whether a player can hear another player using voice chat.
1177
1312
  *
@@ -1183,6 +1318,7 @@ interface GM {
1183
1318
  * @source https://wiki.facepunch.com/gmod/GM:PlayerCanHearPlayersVoice
1184
1319
  */
1185
1320
  PlayerCanHearPlayersVoice(self: GM, listener: Player, talker: Player): (boolean, boolean);
1321
+
1186
1322
  /**
1187
1323
  * Returns whether or not a player is allowed to join a team
1188
1324
  * **WARNING**: This hook will not work with [hook.Add](https://wiki.facepunch.com/gmod/hook.Add) and it is only called manually from [GM:PlayerJoinTeam](https://wiki.facepunch.com/gmod/GM:PlayerJoinTeam) by the base gamemode
@@ -1192,6 +1328,7 @@ interface GM {
1192
1328
  * @source https://wiki.facepunch.com/gmod/GM:PlayerCanJoinTeam
1193
1329
  */
1194
1330
  PlayerCanJoinTeam(self: GM, ply: Player, team: number): boolean;
1331
+
1195
1332
  /**
1196
1333
  * Returns whether or not a player is allowed to pick an item up. (ammo, health, armor)
1197
1334
  *
@@ -1203,6 +1340,7 @@ interface GM {
1203
1340
  * @source https://wiki.facepunch.com/gmod/GM:PlayerCanPickupItem
1204
1341
  */
1205
1342
  PlayerCanPickupItem(self: GM, ply: Player, item: Entity): boolean;
1343
+
1206
1344
  /**
1207
1345
  * Returns whether or not a player is allowed to pick up a weapon.
1208
1346
  *
@@ -1216,6 +1354,7 @@ interface GM {
1216
1354
  * @source https://wiki.facepunch.com/gmod/GM:PlayerCanPickupWeapon
1217
1355
  */
1218
1356
  PlayerCanPickupWeapon(self: GM, ply: Player, weapon: Weapon): boolean;
1357
+
1219
1358
  /**
1220
1359
  * Returns whether or not the player can see the other player's chat.
1221
1360
  * **NOTE**: The **speaker** parameter does not have to be a valid [Player](https://wiki.facepunch.com/gmod/Player) object which happens when console messages are displayed for example.
@@ -1224,6 +1363,7 @@ interface GM {
1224
1363
  * @source https://wiki.facepunch.com/gmod/GM:PlayerCanSeePlayersChat
1225
1364
  */
1226
1365
  PlayerCanSeePlayersChat(self: GM, text: string, teamOnly: boolean, listener: Player, speaker: Player): boolean;
1366
+
1227
1367
  /**
1228
1368
  * Called when a player has changed team using [Player:SetTeam](https://wiki.facepunch.com/gmod/Player:SetTeam).
1229
1369
  * **WARNING**: Avoid calling [Player:SetTeam](https://wiki.facepunch.com/gmod/Player:SetTeam) in this hook as it may cause an infinite loop!
@@ -1235,6 +1375,7 @@ interface GM {
1235
1375
  * @source https://wiki.facepunch.com/gmod/GM:PlayerChangedTeam
1236
1376
  */
1237
1377
  PlayerChangedTeam(self: GM, ply: Player, oldTeam: number, newTeam: number): void;
1378
+
1238
1379
  /**
1239
1380
  * Called whenever a player is about to spawn something to see if they hit a limit for whatever they are spawning.
1240
1381
  * **NOTE**: This hook will not be called in singleplayer, as singleplayer does not have limits.
@@ -1243,6 +1384,7 @@ interface GM {
1243
1384
  * @source https://wiki.facepunch.com/gmod/GM:PlayerCheckLimit
1244
1385
  */
1245
1386
  PlayerCheckLimit(self: GM, ply: Player, limitName: string, current: number, defaultMax: number): boolean;
1387
+
1246
1388
  /**
1247
1389
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
1248
1390
  *
@@ -1253,6 +1395,7 @@ interface GM {
1253
1395
  * @source https://wiki.facepunch.com/gmod/GM:PlayerClassChanged
1254
1396
  */
1255
1397
  PlayerClassChanged(self: GM, ply: Player, newID: number): void;
1398
+
1256
1399
  /**
1257
1400
  * Executes when a player connects to the server. Called before the player has been assigned a [UserID](https://wiki.facepunch.com/gmod/Player:UserID) and entity. See the [player_connect](https://wiki.facepunch.com/gmod/gameevent/player_connect) gameevent for a version of this hook called after the player entity has been created.
1258
1401
  *
@@ -1265,6 +1408,7 @@ interface GM {
1265
1408
  * @source https://wiki.facepunch.com/gmod/GM:PlayerConnect
1266
1409
  */
1267
1410
  PlayerConnect(self: GM, name: string, ip: string): void;
1411
+
1268
1412
  /**
1269
1413
  * Called when a player is killed by [Player:Kill](https://wiki.facepunch.com/gmod/Player:Kill) or any other normal means.
1270
1414
  *
@@ -1283,12 +1427,14 @@ interface GM {
1283
1427
  * @source https://wiki.facepunch.com/gmod/GM:PlayerDeath
1284
1428
  */
1285
1429
  PlayerDeath(self: GM, victim: Player, inflictor: Entity, attacker: Entity): void;
1430
+
1286
1431
  /**
1287
1432
  * Returns whether or not the default death sound should be muted.
1288
1433
  * @realm server
1289
1434
  * @source https://wiki.facepunch.com/gmod/GM:PlayerDeathSound
1290
1435
  */
1291
1436
  PlayerDeathSound(self: GM, ply: Player): boolean;
1437
+
1292
1438
  /**
1293
1439
  * Called every think while the player is dead. The return value will determine if the player respawns.
1294
1440
  *
@@ -1300,6 +1446,7 @@ interface GM {
1300
1446
  * @source https://wiki.facepunch.com/gmod/GM:PlayerDeathThink
1301
1447
  */
1302
1448
  PlayerDeathThink(self: GM, ply: Player): boolean;
1449
+
1303
1450
  /**
1304
1451
  * Called when a player leaves the server. See the [player_disconnect gameevent](https://wiki.facepunch.com/gmod/gameevent/player_disconnect) for a shared version of this hook.
1305
1452
  *
@@ -1309,12 +1456,14 @@ interface GM {
1309
1456
  * @source https://wiki.facepunch.com/gmod/GM:PlayerDisconnected
1310
1457
  */
1311
1458
  PlayerDisconnected(self: GM, ply: Player): void;
1459
+
1312
1460
  /**
1313
1461
  * Called to update the player's animation during a drive.
1314
1462
  * @realm shared
1315
1463
  * @source https://wiki.facepunch.com/gmod/GM:PlayerDriveAnimate
1316
1464
  */
1317
1465
  PlayerDriveAnimate(self: GM, ply: Player): void;
1466
+
1318
1467
  /**
1319
1468
  * Called when a weapon is dropped by a player via [Player:DropWeapon](https://wiki.facepunch.com/gmod/Player:DropWeapon). Despite its name, this hook is also called for NPC weapon drops.
1320
1469
  *
@@ -1330,12 +1479,14 @@ interface GM {
1330
1479
  * @source https://wiki.facepunch.com/gmod/GM:PlayerDroppedWeapon
1331
1480
  */
1332
1481
  PlayerDroppedWeapon(self: GM, owner: Player | NPC, wep: Weapon): void;
1482
+
1333
1483
  /**
1334
1484
  * Called when player stops using voice chat.
1335
1485
  * @realm client
1336
1486
  * @source https://wiki.facepunch.com/gmod/GM:PlayerEndVoice
1337
1487
  */
1338
1488
  PlayerEndVoice(self: GM, ply: Player): void;
1489
+
1339
1490
  /**
1340
1491
  * Called when a player enters a vehicle.
1341
1492
  *
@@ -1347,6 +1498,7 @@ interface GM {
1347
1498
  * @source https://wiki.facepunch.com/gmod/GM:PlayerEnteredVehicle
1348
1499
  */
1349
1500
  PlayerEnteredVehicle(self: GM, ply: Player, veh: Vehicle, role: number): void;
1501
+
1350
1502
  /**
1351
1503
  * Called before firing clientside animation events on a player model.
1352
1504
  *
@@ -1356,6 +1508,7 @@ interface GM {
1356
1508
  * @source https://wiki.facepunch.com/gmod/GM:PlayerFireAnimationEvent
1357
1509
  */
1358
1510
  PlayerFireAnimationEvent(self: GM, ply: Player, pos: Vector, ang: Angle, event: number, name: string): boolean;
1511
+
1359
1512
  /**
1360
1513
  * Called whenever a player steps. Return true to mute the normal sound.
1361
1514
  *
@@ -1367,12 +1520,14 @@ interface GM {
1367
1520
  * @source https://wiki.facepunch.com/gmod/GM:PlayerFootstep
1368
1521
  */
1369
1522
  PlayerFootstep(self: GM, ply: Player, pos: Vector, foot: number, sound: string, volume: number, filter: CRecipientFilter): boolean;
1523
+
1370
1524
  /**
1371
1525
  * Called when a player freezes an object.
1372
1526
  * @realm server
1373
1527
  * @source https://wiki.facepunch.com/gmod/GM:PlayerFrozeObject
1374
1528
  */
1375
1529
  PlayerFrozeObject(self: GM, ply: Player, ent: Entity, physobj: PhysObj): void;
1530
+
1376
1531
  /**
1377
1532
  * Called before firing serverside animation events on the player models.
1378
1533
  *
@@ -1382,12 +1537,14 @@ interface GM {
1382
1537
  * @source https://wiki.facepunch.com/gmod/GM:PlayerHandleAnimEvent
1383
1538
  */
1384
1539
  PlayerHandleAnimEvent(self: GM, ply: Player, event: number, eventTime: number, cycle: number, type: number, options: string): void;
1540
+
1385
1541
  /**
1386
1542
  * Called when a player gets hurt.
1387
1543
  * @realm server
1388
1544
  * @source https://wiki.facepunch.com/gmod/GM:PlayerHurt
1389
1545
  */
1390
1546
  PlayerHurt(self: GM, victim: Player, attacker: Entity, healthRemaining: number, damageTaken: number): void;
1547
+
1391
1548
  /**
1392
1549
  * Called when the player spawns for the first time.
1393
1550
  *
@@ -1438,12 +1595,14 @@ interface GM {
1438
1595
  * @source https://wiki.facepunch.com/gmod/GM:PlayerInitialSpawn
1439
1596
  */
1440
1597
  PlayerInitialSpawn(self: GM, player: Player, transition: boolean): void;
1598
+
1441
1599
  /**
1442
1600
  * Makes the player join a specified team. This is a convenience function that calls [Player:SetTeam](https://wiki.facepunch.com/gmod/Player:SetTeam) and runs the [GM:OnPlayerChangedTeam](https://wiki.facepunch.com/gmod/GM:OnPlayerChangedTeam) hook.
1443
1601
  * @realm server
1444
1602
  * @source https://wiki.facepunch.com/gmod/GM:PlayerJoinTeam
1445
1603
  */
1446
1604
  PlayerJoinTeam(self: GM, ply: Player, team: number): void;
1605
+
1447
1606
  /**
1448
1607
  * Called when a player leaves a vehicle for any reason, including [Player:ExitVehicle](https://wiki.facepunch.com/gmod/Player:ExitVehicle).
1449
1608
  *
@@ -1456,6 +1615,7 @@ interface GM {
1456
1615
  * @source https://wiki.facepunch.com/gmod/GM:PlayerLeaveVehicle
1457
1616
  */
1458
1617
  PlayerLeaveVehicle(self: GM, ply: Player, veh: Vehicle): void;
1618
+
1459
1619
  /**
1460
1620
  * Called to give players the default set of weapons.
1461
1621
  *
@@ -1467,6 +1627,7 @@ interface GM {
1467
1627
  * @source https://wiki.facepunch.com/gmod/GM:PlayerLoadout
1468
1628
  */
1469
1629
  PlayerLoadout(self: GM, ply: Player): void;
1630
+
1470
1631
  /**
1471
1632
  * Called when a player tries to switch noclip mode.
1472
1633
  *
@@ -1476,6 +1637,7 @@ interface GM {
1476
1637
  * @source https://wiki.facepunch.com/gmod/GM:PlayerNoClip
1477
1638
  */
1478
1639
  PlayerNoClip(self: GM, ply: Player, desiredState: boolean): boolean;
1640
+
1479
1641
  /**
1480
1642
  * Called after the player's think, just after [GM:FinishMove](https://wiki.facepunch.com/gmod/GM:FinishMove).
1481
1643
  *
@@ -1487,6 +1649,7 @@ interface GM {
1487
1649
  * @source https://wiki.facepunch.com/gmod/GM:PlayerPostThink
1488
1650
  */
1489
1651
  PlayerPostThink(self: GM, ply: Player): void;
1652
+
1490
1653
  /**
1491
1654
  * Request a player to join the team. This function will check if the team is available to join or not.
1492
1655
  *
@@ -1498,6 +1661,7 @@ interface GM {
1498
1661
  * @source https://wiki.facepunch.com/gmod/GM:PlayerRequestTeam
1499
1662
  */
1500
1663
  PlayerRequestTeam(self: GM, ply: Player, team: number): void;
1664
+
1501
1665
  /**
1502
1666
  * Called when a player dispatched a chat message. For the clientside equivalent, see [GM:OnPlayerChat](https://wiki.facepunch.com/gmod/GM:OnPlayerChat).
1503
1667
  *
@@ -1508,6 +1672,7 @@ interface GM {
1508
1672
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSay
1509
1673
  */
1510
1674
  PlayerSay(self: GM, sender: Player, text: string, teamChat: boolean): string;
1675
+
1511
1676
  /**
1512
1677
  * Called to determine a spawn point for a player to spawn at.
1513
1678
  * **NOTE**: The spawn point entity will also impact the player's eye angle. For example, if the entity is upside down, the player's view will be as well.
@@ -1517,18 +1682,21 @@ interface GM {
1517
1682
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSelectSpawn
1518
1683
  */
1519
1684
  PlayerSelectSpawn(self: GM, ply: Player, transition: boolean): Entity;
1685
+
1520
1686
  /**
1521
1687
  * Find a team spawn point entity for this player.
1522
1688
  * @realm server
1523
1689
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSelectTeamSpawn
1524
1690
  */
1525
1691
  PlayerSelectTeamSpawn(self: GM, team: number, ply: Player): Entity;
1692
+
1526
1693
  /**
1527
1694
  * Called whenever view model hands needs setting a model. By default this calls [PLAYER:GetHandsModel](https://wiki.facepunch.com/gmod/PLAYER:GetHandsModel) and if that fails, sets the hands model according to his player model.
1528
1695
  * @realm server
1529
1696
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSetHandsModel
1530
1697
  */
1531
1698
  PlayerSetHandsModel(self: GM, ply: Player, ent: Entity): void;
1699
+
1532
1700
  /**
1533
1701
  * Called whenever a player spawns and must choose a model. A good place to assign a model to a player.
1534
1702
  * **NOTE**: This function may not work in your custom gamemode if you have overridden your [GM:PlayerSpawn](https://wiki.facepunch.com/gmod/GM:PlayerSpawn) and you do not use [self.BaseClass.PlayerSpawn](https://wiki.facepunch.com/gmod/Global.DEFINE_BASECLASS) in it, or [hook.Call](https://wiki.facepunch.com/gmod/hook.Call) this hook from [GM:PlayerSpawn](https://wiki.facepunch.com/gmod/GM:PlayerSpawn).
@@ -1538,6 +1706,7 @@ interface GM {
1538
1706
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSetModel
1539
1707
  */
1540
1708
  PlayerSetModel(self: GM, ply: Player): void;
1709
+
1541
1710
  /**
1542
1711
  * Returns true if the player should take damage from the given attacker.
1543
1712
  *
@@ -1548,12 +1717,14 @@ interface GM {
1548
1717
  * @source https://wiki.facepunch.com/gmod/GM:PlayerShouldTakeDamage
1549
1718
  */
1550
1719
  PlayerShouldTakeDamage(self: GM, ply: Player, attacker: Entity): boolean;
1720
+
1551
1721
  /**
1552
1722
  * Allows to suppress player taunts.
1553
1723
  * @realm server
1554
1724
  * @source https://wiki.facepunch.com/gmod/GM:PlayerShouldTaunt
1555
1725
  */
1556
1726
  PlayerShouldTaunt(self: GM, ply: Player, act: number): boolean;
1727
+
1557
1728
  /**
1558
1729
  * Called when the player is killed by [Player:KillSilent](https://wiki.facepunch.com/gmod/Player:KillSilent).
1559
1730
  *
@@ -1569,6 +1740,7 @@ interface GM {
1569
1740
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSilentDeath
1570
1741
  */
1571
1742
  PlayerSilentDeath(self: GM, ply: Player): void;
1743
+
1572
1744
  /**
1573
1745
  * Called whenever a player spawns, including respawns.
1574
1746
  *
@@ -1583,24 +1755,28 @@ interface GM {
1583
1755
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSpawn
1584
1756
  */
1585
1757
  PlayerSpawn(self: GM, player: Player, transition: boolean): void;
1758
+
1586
1759
  /**
1587
1760
  * Called to spawn the player as a spectator.
1588
1761
  * @realm server
1589
1762
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSpawnAsSpectator
1590
1763
  */
1591
1764
  PlayerSpawnAsSpectator(self: GM, ply: Player): void;
1765
+
1592
1766
  /**
1593
1767
  * Determines if the player can spray using the `impulse 201` console command.
1594
1768
  * @realm server
1595
1769
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSpray
1596
1770
  */
1597
1771
  PlayerSpray(self: GM, sprayer: Player): boolean;
1772
+
1598
1773
  /**
1599
1774
  * Called when player starts taunting.
1600
1775
  * @realm server
1601
1776
  * @source https://wiki.facepunch.com/gmod/GM:PlayerStartTaunt
1602
1777
  */
1603
1778
  PlayerStartTaunt(self: GM, ply: Player, act: number, length: number): void;
1779
+
1604
1780
  /**
1605
1781
  * Called when a player starts using voice chat.
1606
1782
  * **NOTE**: Set mp_show_voice_icons to 0, if you want disable icons above player.
@@ -1610,6 +1786,7 @@ interface GM {
1610
1786
  * @source https://wiki.facepunch.com/gmod/GM:PlayerStartVoice
1611
1787
  */
1612
1788
  PlayerStartVoice(self: GM, ply: Player, plyIndex?: number): boolean;
1789
+
1613
1790
  /**
1614
1791
  * Allows you to override the time between footsteps.
1615
1792
  *
@@ -1621,6 +1798,7 @@ interface GM {
1621
1798
  * @source https://wiki.facepunch.com/gmod/GM:PlayerStepSoundTime
1622
1799
  */
1623
1800
  PlayerStepSoundTime(self: GM, ply: Player, type: number, walking: boolean): number;
1801
+
1624
1802
  /**
1625
1803
  * Called whenever a player attempts to either turn on or off their flashlight, returning false will deny the change.
1626
1804
  * **NOTE**: Also gets called when using [Player:Flashlight](https://wiki.facepunch.com/gmod/Player:Flashlight).
@@ -1631,6 +1809,7 @@ interface GM {
1631
1809
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSwitchFlashlight
1632
1810
  */
1633
1811
  PlayerSwitchFlashlight(self: GM, ply: Player, enabled: boolean): boolean;
1812
+
1634
1813
  /**
1635
1814
  * Called when a player attempts to switch their weapon.
1636
1815
  *
@@ -1640,6 +1819,7 @@ interface GM {
1640
1819
  * @source https://wiki.facepunch.com/gmod/GM:PlayerSwitchWeapon
1641
1820
  */
1642
1821
  PlayerSwitchWeapon(self: GM, player: Player, oldWeapon: Weapon, newWeapon: Weapon): boolean;
1822
+
1643
1823
  /**
1644
1824
  * The Move hook is called for you to manipulate the player's [CMoveData](https://wiki.facepunch.com/gmod/CMoveData). This hook is called moments before [GM:Move](https://wiki.facepunch.com/gmod/GM:Move) and [GM:PlayerNoClip](https://wiki.facepunch.com/gmod/GM:PlayerNoClip).
1645
1825
  *
@@ -1650,18 +1830,21 @@ interface GM {
1650
1830
  * @source https://wiki.facepunch.com/gmod/GM:PlayerTick
1651
1831
  */
1652
1832
  PlayerTick(self: GM, player: Player, mv: CMoveData): void;
1833
+
1653
1834
  /**
1654
1835
  * Called when a player has been hit by a trace and damaged (such as from a bullet). Returning true overrides the damage handling and prevents [GM:ScalePlayerDamage](https://wiki.facepunch.com/gmod/GM:ScalePlayerDamage) from being called.
1655
1836
  * @realm shared
1656
1837
  * @source https://wiki.facepunch.com/gmod/GM:PlayerTraceAttack
1657
1838
  */
1658
1839
  PlayerTraceAttack(self: GM, ply: Player, dmginfo: CTakeDamageInfo, dir: Vector, trace: TraceResult): boolean;
1840
+
1659
1841
  /**
1660
1842
  * Called when a player unfreezes an object.
1661
1843
  * @realm server
1662
1844
  * @source https://wiki.facepunch.com/gmod/GM:PlayerUnfrozeObject
1663
1845
  */
1664
1846
  PlayerUnfrozeObject(self: GM, ply: Player, ent: Entity, physobj: PhysObj): void;
1847
+
1665
1848
  /**
1666
1849
  * Triggered when the player presses use on an object. Continuously runs until USE is released but will not activate other Entities until the USE key is released; dependent on activation type of the Entity.
1667
1850
  *
@@ -1669,12 +1852,14 @@ interface GM {
1669
1852
  * @source https://wiki.facepunch.com/gmod/GM:PlayerUse
1670
1853
  */
1671
1854
  PlayerUse(self: GM, ply: Player, ent: Entity): boolean;
1855
+
1672
1856
  /**
1673
1857
  * Called when it's time to populate the context menu menu bar at the top.
1674
1858
  * @realm client
1675
1859
  * @source https://wiki.facepunch.com/gmod/GM:PopulateMenuBar
1676
1860
  */
1677
1861
  PopulateMenuBar(self: GM, menubar: Panel): void;
1862
+
1678
1863
  /**
1679
1864
  * Called right after the map has cleaned up (usually because [game.CleanUpMap](https://wiki.facepunch.com/gmod/game.CleanUpMap) was called)
1680
1865
  *
@@ -1684,6 +1869,7 @@ interface GM {
1684
1869
  * @source https://wiki.facepunch.com/gmod/GM:PostCleanupMap
1685
1870
  */
1686
1871
  PostCleanupMap(self: GM): void;
1872
+
1687
1873
  /**
1688
1874
  * Called right after the 2D skybox has been drawn - allowing you to draw over it.
1689
1875
  *
@@ -1693,6 +1879,7 @@ interface GM {
1693
1879
  * @source https://wiki.facepunch.com/gmod/GM:PostDraw2DSkyBox
1694
1880
  */
1695
1881
  PostDraw2DSkyBox(self: GM): void;
1882
+
1696
1883
  /**
1697
1884
  * Called after rendering effects. This is where halos are drawn. Called just before [GM:PreDrawHUD](https://wiki.facepunch.com/gmod/GM:PreDrawHUD) (The two hooks are basically identical).
1698
1885
  *
@@ -1704,6 +1891,7 @@ interface GM {
1704
1891
  * @source https://wiki.facepunch.com/gmod/GM:PostDrawEffects
1705
1892
  */
1706
1893
  PostDrawEffects(self: GM): void;
1894
+
1707
1895
  /**
1708
1896
  * Called after [GM:PreDrawHUD](https://wiki.facepunch.com/gmod/GM:PreDrawHUD), [GM:HUDPaintBackground](https://wiki.facepunch.com/gmod/GM:HUDPaintBackground) and [GM:HUDPaint](https://wiki.facepunch.com/gmod/GM:HUDPaint) but before [GM:DrawOverlay](https://wiki.facepunch.com/gmod/GM:DrawOverlay).
1709
1897
  *
@@ -1715,6 +1903,7 @@ interface GM {
1715
1903
  * @source https://wiki.facepunch.com/gmod/GM:PostDrawHUD
1716
1904
  */
1717
1905
  PostDrawHUD(self: GM): void;
1906
+
1718
1907
  /**
1719
1908
  * Called after drawing opaque entities.
1720
1909
  *
@@ -1726,6 +1915,7 @@ interface GM {
1726
1915
  * @source https://wiki.facepunch.com/gmod/GM:PostDrawOpaqueRenderables
1727
1916
  */
1728
1917
  PostDrawOpaqueRenderables(self: GM, bDrawingDepth: boolean, bDrawingSkybox: boolean, isDraw3DSkybox: boolean): void;
1918
+
1729
1919
  /**
1730
1920
  * Called after the player hands are drawn.
1731
1921
  *
@@ -1737,6 +1927,7 @@ interface GM {
1737
1927
  * @source https://wiki.facepunch.com/gmod/GM:PostDrawPlayerHands
1738
1928
  */
1739
1929
  PostDrawPlayerHands(self: GM, hands: Entity, vm: Entity, ply: Player, weapon: Weapon, flags: number): void;
1930
+
1740
1931
  /**
1741
1932
  * Called after drawing the 3D skybox. This will not be called if skybox rendering was prevented via the [GM:PreDrawSkyBox](https://wiki.facepunch.com/gmod/GM:PreDrawSkyBox) hook.
1742
1933
  *
@@ -1748,6 +1939,7 @@ interface GM {
1748
1939
  * @source https://wiki.facepunch.com/gmod/GM:PostDrawSkyBox
1749
1940
  */
1750
1941
  PostDrawSkyBox(self: GM): void;
1942
+
1751
1943
  /**
1752
1944
  * Called after all translucent entities are drawn.
1753
1945
  *
@@ -1762,6 +1954,7 @@ interface GM {
1762
1954
  * @source https://wiki.facepunch.com/gmod/GM:PostDrawTranslucentRenderables
1763
1955
  */
1764
1956
  PostDrawTranslucentRenderables(self: GM, bDrawingDepth: boolean, bDrawingSkybox: boolean, isDraw3DSkybox: boolean): void;
1957
+
1765
1958
  /**
1766
1959
  * Called after view model is drawn.
1767
1960
  *
@@ -1778,6 +1971,7 @@ interface GM {
1778
1971
  * @source https://wiki.facepunch.com/gmod/GM:PostDrawViewModel
1779
1972
  */
1780
1973
  PostDrawViewModel(self: GM, viewmodel: Entity, player: Player, weapon: Weapon, flags: number): void;
1974
+
1781
1975
  /**
1782
1976
  * Called every time a bullet pellet (i.e. this hook is called multiple times for a shotgun shot) is fired from an entity. Notably this hook will have the final damage and aim direction for the bullet pellet.
1783
1977
  *
@@ -1790,6 +1984,7 @@ interface GM {
1790
1984
  * @source https://wiki.facepunch.com/gmod/GM:PostEntityFireBullets
1791
1985
  */
1792
1986
  PostEntityFireBullets(self: GM, entity: Entity, data: FiredBullet): boolean;
1987
+
1793
1988
  /**
1794
1989
  * Called when an entity receives a damage event, after passing damage filters, etc.
1795
1990
  *
@@ -1802,12 +1997,14 @@ interface GM {
1802
1997
  * @source https://wiki.facepunch.com/gmod/GM:PostEntityTakeDamage
1803
1998
  */
1804
1999
  PostEntityTakeDamage(self: GM, ent: Entity, dmginfo: CTakeDamageInfo, wasDamageTaken: boolean): void;
2000
+
1805
2001
  /**
1806
2002
  * Called after the gamemode has loaded.
1807
2003
  * @realm shared
1808
2004
  * @source https://wiki.facepunch.com/gmod/GM:PostGamemodeLoaded
1809
2005
  */
1810
2006
  PostGamemodeLoaded(self: GM): void;
2007
+
1811
2008
  /**
1812
2009
  * Called right after [GM:DoPlayerDeath](https://wiki.facepunch.com/gmod/GM:DoPlayerDeath), [GM:PlayerDeath](https://wiki.facepunch.com/gmod/GM:PlayerDeath) and [GM:PlayerSilentDeath](https://wiki.facepunch.com/gmod/GM:PlayerSilentDeath).
1813
2010
  *
@@ -1821,6 +2018,7 @@ interface GM {
1821
2018
  * @source https://wiki.facepunch.com/gmod/GM:PostPlayerDeath
1822
2019
  */
1823
2020
  PostPlayerDeath(self: GM, ply: Player): void;
2021
+
1824
2022
  /**
1825
2023
  * Called after a given player in your [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") was drawn.
1826
2024
  *
@@ -1831,18 +2029,21 @@ interface GM {
1831
2029
  * @source https://wiki.facepunch.com/gmod/GM:PostPlayerDraw
1832
2030
  */
1833
2031
  PostPlayerDraw(self: GM, ply: Player, flags: number): void;
2032
+
1834
2033
  /**
1835
2034
  * Allows you to suppress post processing effect drawing.
1836
2035
  * @realm client
1837
2036
  * @source https://wiki.facepunch.com/gmod/GM:PostProcessPermitted
1838
2037
  */
1839
2038
  PostProcessPermitted(self: GM, effect_name: string): boolean;
2039
+
1840
2040
  /**
1841
2041
  * Called after the frame has been rendered.
1842
2042
  * @realm client
1843
2043
  * @source https://wiki.facepunch.com/gmod/GM:PostRender
1844
2044
  */
1845
2045
  PostRender(self: GM): void;
2046
+
1846
2047
  /**
1847
2048
  * Called after the VGUI has been drawn.
1848
2049
  *
@@ -1852,12 +2053,14 @@ interface GM {
1852
2053
  * @source https://wiki.facepunch.com/gmod/GM:PostRenderVGUI
1853
2054
  */
1854
2055
  PostRenderVGUI(self: GM): void;
2056
+
1855
2057
  /**
1856
2058
  * Called just after performing an undo.
1857
2059
  * @realm server
1858
2060
  * @source https://wiki.facepunch.com/gmod/GM:PostUndo
1859
2061
  */
1860
2062
  PostUndo(self: GM, undo: Undo, count: number): void;
2063
+
1861
2064
  /**
1862
2065
  * Called right before the map cleans up (usually because [game.CleanUpMap](https://wiki.facepunch.com/gmod/game.CleanUpMap) was called)
1863
2066
  *
@@ -1867,6 +2070,7 @@ interface GM {
1867
2070
  * @source https://wiki.facepunch.com/gmod/GM:PreCleanupMap
1868
2071
  */
1869
2072
  PreCleanupMap(self: GM): void;
2073
+
1870
2074
  /**
1871
2075
  * Called just after [GM:PreDrawViewModel](https://wiki.facepunch.com/gmod/GM:PreDrawViewModel) and can technically be considered as a "PostDrawAllViewModels".
1872
2076
  *
@@ -1878,6 +2082,7 @@ interface GM {
1878
2082
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawEffects
1879
2083
  */
1880
2084
  PreDrawEffects(self: GM): void;
2085
+
1881
2086
  /**
1882
2087
  * Called just after [GM:PostDrawEffects](https://wiki.facepunch.com/gmod/GM:PostDrawEffects) (duplicate of it). Drawing anything in it seems to work incorrectly.
1883
2088
  *
@@ -1887,6 +2092,7 @@ interface GM {
1887
2092
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawHUD
1888
2093
  */
1889
2094
  PreDrawHUD(self: GM): void;
2095
+
1890
2096
  /**
1891
2097
  * Called before rendering the halos. This is the place to call [halo.Add](https://wiki.facepunch.com/gmod/halo.Add). This hook is actually running inside of [GM:PostDrawEffects](https://wiki.facepunch.com/gmod/GM:PostDrawEffects).
1892
2098
  *
@@ -1896,6 +2102,7 @@ interface GM {
1896
2102
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawHalos
1897
2103
  */
1898
2104
  PreDrawHalos(self: GM): void;
2105
+
1899
2106
  /**
1900
2107
  * Called before all opaque entities are drawn.
1901
2108
  *
@@ -1907,6 +2114,7 @@ interface GM {
1907
2114
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawOpaqueRenderables
1908
2115
  */
1909
2116
  PreDrawOpaqueRenderables(self: GM, isDrawingDepth: boolean, isDrawSkybox: boolean, isDraw3DSkybox: boolean): boolean;
2117
+
1910
2118
  /**
1911
2119
  * Called before the player hands are drawn.
1912
2120
  *
@@ -1917,6 +2125,7 @@ interface GM {
1917
2125
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawPlayerHands
1918
2126
  */
1919
2127
  PreDrawPlayerHands(self: GM, hands: Entity, vm: Entity, ply: Player, weapon: Weapon, flags: number): boolean;
2128
+
1920
2129
  /**
1921
2130
  * Called before the 3D sky box is drawn. This will not be called for maps with no 3D skybox, or when the 3d skybox is disabled. (`r_3dsky 0`)
1922
2131
  *
@@ -1928,6 +2137,7 @@ interface GM {
1928
2137
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawSkyBox
1929
2138
  */
1930
2139
  PreDrawSkyBox(self: GM): boolean;
2140
+
1931
2141
  /**
1932
2142
  * Called before all the translucent entities are drawn.
1933
2143
  *
@@ -1942,6 +2152,7 @@ interface GM {
1942
2152
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawTranslucentRenderables
1943
2153
  */
1944
2154
  PreDrawTranslucentRenderables(self: GM, isDrawingDepth: boolean, isDrawSkybox: boolean, isDraw3DSkybox: boolean): boolean;
2155
+
1945
2156
  /**
1946
2157
  * Called before the view model has been drawn.
1947
2158
  *
@@ -1958,6 +2169,7 @@ interface GM {
1958
2169
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawViewModel
1959
2170
  */
1960
2171
  PreDrawViewModel(self: GM, vm: Entity, ply: Player, weapon: Weapon, flags: number): boolean;
2172
+
1961
2173
  /**
1962
2174
  * Called just before all view models (there are 3 per player, see [Player:GetViewModel](https://wiki.facepunch.com/gmod/Player:GetViewModel)) and entities with `RENDERGROUP_VIEWMODEL` are drawn.
1963
2175
  *
@@ -1971,12 +2183,14 @@ interface GM {
1971
2183
  * @source https://wiki.facepunch.com/gmod/GM:PreDrawViewModels
1972
2184
  */
1973
2185
  PreDrawViewModels(self: GM): void;
2186
+
1974
2187
  /**
1975
2188
  * Called before the gamemode is loaded.
1976
2189
  * @realm shared
1977
2190
  * @source https://wiki.facepunch.com/gmod/GM:PreGamemodeLoaded
1978
2191
  */
1979
2192
  PreGamemodeLoaded(self: GM): void;
2193
+
1980
2194
  /**
1981
2195
  * Called before the player is drawn.
1982
2196
  *
@@ -1986,6 +2200,7 @@ interface GM {
1986
2200
  * @source https://wiki.facepunch.com/gmod/GM:PrePlayerDraw
1987
2201
  */
1988
2202
  PrePlayerDraw(self: GM, player: Player, flags: number): boolean;
2203
+
1989
2204
  /**
1990
2205
  * Called by [scripted_ents.Register](https://wiki.facepunch.com/gmod/scripted_ents.Register).
1991
2206
  *
@@ -1993,6 +2208,7 @@ interface GM {
1993
2208
  * @source https://wiki.facepunch.com/gmod/GM:PreRegisterSENT
1994
2209
  */
1995
2210
  PreRegisterSENT(self: GM, ent: table, _class: string): boolean;
2211
+
1996
2212
  /**
1997
2213
  * Called when a Scripted Weapon (SWEP) is about to be registered, allowing addons to alter the weapon's SWEP table with custom data for later usage. Called internally from [weapons.Register](https://wiki.facepunch.com/gmod/weapons.Register).
1998
2214
  *
@@ -2000,30 +2216,35 @@ interface GM {
2000
2216
  * @source https://wiki.facepunch.com/gmod/GM:PreRegisterSWEP
2001
2217
  */
2002
2218
  PreRegisterSWEP(self: GM, swep: table, _class: string): boolean;
2219
+
2003
2220
  /**
2004
2221
  * Called before the renderer is about to start rendering the next frame.
2005
2222
  * @realm client
2006
2223
  * @source https://wiki.facepunch.com/gmod/GM:PreRender
2007
2224
  */
2008
2225
  PreRender(self: GM): boolean;
2226
+
2009
2227
  /**
2010
2228
  * Called just before performing an undo.
2011
2229
  * @realm server
2012
2230
  * @source https://wiki.facepunch.com/gmod/GM:PreUndo
2013
2231
  */
2014
2232
  PreUndo(self: GM, undo: Undo): boolean;
2233
+
2015
2234
  /**
2016
2235
  * This will prevent IN_ATTACK from sending to server when player tries to shoot from C menu.
2017
2236
  * @realm client
2018
2237
  * @source https://wiki.facepunch.com/gmod/GM:PreventScreenClicks
2019
2238
  */
2020
2239
  PreventScreenClicks(self: GM): boolean;
2240
+
2021
2241
  /**
2022
2242
  * Called when a prop has been destroyed.
2023
2243
  * @realm shared
2024
2244
  * @source https://wiki.facepunch.com/gmod/GM:PropBreak
2025
2245
  */
2026
2246
  PropBreak(self: GM, attacker: Player, prop: Entity): void;
2247
+
2027
2248
  /**
2028
2249
  * Render the scene. Used by the `Stereoscopy` post-processing effect.
2029
2250
  *
@@ -2034,6 +2255,7 @@ interface GM {
2034
2255
  * @source https://wiki.facepunch.com/gmod/GM:RenderScene
2035
2256
  */
2036
2257
  RenderScene(self: GM, origin: Vector, angles: Angle, fov: number): boolean;
2258
+
2037
2259
  /**
2038
2260
  * Used to render post processing effects.
2039
2261
  *
@@ -2043,6 +2265,7 @@ interface GM {
2043
2265
  * @source https://wiki.facepunch.com/gmod/GM:RenderScreenspaceEffects
2044
2266
  */
2045
2267
  RenderScreenspaceEffects(self: GM): void;
2268
+
2046
2269
  /**
2047
2270
  * Called when the game is reloaded from a Source Engine save system ( not the Sandbox saves or dupes ).
2048
2271
  *
@@ -2052,6 +2275,7 @@ interface GM {
2052
2275
  * @source https://wiki.facepunch.com/gmod/GM:Restored
2053
2276
  */
2054
2277
  Restored(self: GM): void;
2278
+
2055
2279
  /**
2056
2280
  * Called when the game is saved using the Source Engine save system (not the Sandbox saves or dupes).
2057
2281
  *
@@ -2063,6 +2287,7 @@ interface GM {
2063
2287
  * @source https://wiki.facepunch.com/gmod/GM:Saved
2064
2288
  */
2065
2289
  Saved(self: GM): void;
2290
+
2066
2291
  /**
2067
2292
  * Called when an NPC takes damage.
2068
2293
  *
@@ -2073,6 +2298,7 @@ interface GM {
2073
2298
  * @source https://wiki.facepunch.com/gmod/GM:ScaleNPCDamage
2074
2299
  */
2075
2300
  ScaleNPCDamage(self: GM, npc: NPC, hitgroup: number, dmginfo: CTakeDamageInfo): void;
2301
+
2076
2302
  /**
2077
2303
  * This hook allows you to change how much damage a player receives when one takes damage to a specific body part.
2078
2304
  *
@@ -2083,18 +2309,21 @@ interface GM {
2083
2309
  * @source https://wiki.facepunch.com/gmod/GM:ScalePlayerDamage
2084
2310
  */
2085
2311
  ScalePlayerDamage(self: GM, ply: Player, hitgroup: number, dmginfo: CTakeDamageInfo): boolean;
2312
+
2086
2313
  /**
2087
2314
  * Called when player released the scoreboard button (TAB by default).
2088
2315
  * @realm client
2089
2316
  * @source https://wiki.facepunch.com/gmod/GM:ScoreboardHide
2090
2317
  */
2091
2318
  ScoreboardHide(self: GM): void;
2319
+
2092
2320
  /**
2093
2321
  * Called when player presses the scoreboard button (TAB by default).
2094
2322
  * @realm client
2095
2323
  * @source https://wiki.facepunch.com/gmod/GM:ScoreboardShow
2096
2324
  */
2097
2325
  ScoreboardShow(self: GM): boolean;
2326
+
2098
2327
  /**
2099
2328
  * An internal function used to send a death notice event to all clients.
2100
2329
  *
@@ -2102,6 +2331,7 @@ interface GM {
2102
2331
  * @source https://wiki.facepunch.com/gmod/GM:SendDeathNotice
2103
2332
  */
2104
2333
  SendDeathNotice(self: GM, attacker: Entity | string | nil, inflictor: string, victim: Entity | string, flags: number): void;
2334
+
2105
2335
  /**
2106
2336
  * Sets player run and sprint speeds.
2107
2337
  * Using a speed of `0` can lead to prediction errors, and can cause players to move at `sv_maxvelocity`
@@ -2112,6 +2342,7 @@ interface GM {
2112
2342
  * @source https://wiki.facepunch.com/gmod/GM:SetPlayerSpeed
2113
2343
  */
2114
2344
  SetPlayerSpeed(self: GM, ply: Player, walkSpeed: number, runSpeed: number): void;
2345
+
2115
2346
  /**
2116
2347
  * SetupMove is called before the engine process movements. This allows us to override the players movement.
2117
2348
  *
@@ -2121,12 +2352,14 @@ interface GM {
2121
2352
  * @source https://wiki.facepunch.com/gmod/GM:SetupMove
2122
2353
  */
2123
2354
  SetupMove(self: GM, ply: Player, mv: CMoveData, cmd: CUserCmd): void;
2355
+
2124
2356
  /**
2125
2357
  * Allows you to add extra positions to the player's [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community"). This is the place to call [Global.AddOriginToPVS](https://wiki.facepunch.com/gmod/Global.AddOriginToPVS).
2126
2358
  * @realm server
2127
2359
  * @source https://wiki.facepunch.com/gmod/GM:SetupPlayerVisibility
2128
2360
  */
2129
2361
  SetupPlayerVisibility(self: GM, ply: Player, viewEntity: Entity): void;
2362
+
2130
2363
  /**
2131
2364
  * Allows you to use render.Fog* functions to manipulate skybox fog.
2132
2365
  * This will not be called for maps with no 3D skybox, or when the 3d skybox is disabled. (`r_3dsky 0`)
@@ -2135,12 +2368,14 @@ interface GM {
2135
2368
  * @source https://wiki.facepunch.com/gmod/GM:SetupSkyboxFog
2136
2369
  */
2137
2370
  SetupSkyboxFog(self: GM, scale: number): boolean;
2371
+
2138
2372
  /**
2139
2373
  * Allows you to use render.Fog* functions to manipulate world fog.
2140
2374
  * @realm client
2141
2375
  * @source https://wiki.facepunch.com/gmod/GM:SetupWorldFog
2142
2376
  */
2143
2377
  SetupWorldFog(self: GM): boolean;
2378
+
2144
2379
  /**
2145
2380
  * Called to decide whether a pair of entities should collide with each other. This is only called if [Entity:SetCustomCollisionCheck](https://wiki.facepunch.com/gmod/Entity:SetCustomCollisionCheck) was used on one or both entities.
2146
2381
  *
@@ -2157,6 +2392,7 @@ interface GM {
2157
2392
  * @source https://wiki.facepunch.com/gmod/GM:ShouldCollide
2158
2393
  */
2159
2394
  ShouldCollide(self: GM, ent1: Entity, ent2: Entity): boolean;
2395
+
2160
2396
  /**
2161
2397
  * Called to determine if the [Global.LocalPlayer](https://wiki.facepunch.com/gmod/Global.LocalPlayer) should be drawn.
2162
2398
  *
@@ -2169,6 +2405,7 @@ interface GM {
2169
2405
  * @source https://wiki.facepunch.com/gmod/GM:ShouldDrawLocalPlayer
2170
2406
  */
2171
2407
  ShouldDrawLocalPlayer(self: GM, ply: Player): boolean;
2408
+
2172
2409
  /**
2173
2410
  * Called when a player executes `gm_showhelp` console command. (Default bind is F1)
2174
2411
  *
@@ -2176,24 +2413,28 @@ interface GM {
2176
2413
  * @source https://wiki.facepunch.com/gmod/GM:ShowHelp
2177
2414
  */
2178
2415
  ShowHelp(self: GM, ply: Player): void;
2416
+
2179
2417
  /**
2180
2418
  * Called when a player executes `gm_showspare1` console command ( Default bind is F3 ).
2181
2419
  * @realm shared
2182
2420
  * @source https://wiki.facepunch.com/gmod/GM:ShowSpare1
2183
2421
  */
2184
2422
  ShowSpare1(self: GM, ply: Player): void;
2423
+
2185
2424
  /**
2186
2425
  * Called when a player executes `gm_showspare2` console command ( Default bind is F4 ).
2187
2426
  * @realm shared
2188
2427
  * @source https://wiki.facepunch.com/gmod/GM:ShowSpare2
2189
2428
  */
2190
2429
  ShowSpare2(self: GM, ply: Player): void;
2430
+
2191
2431
  /**
2192
2432
  * Called when a player executes `gm_showteam` console command. ( Default bind is F2 )
2193
2433
  * @realm shared
2194
2434
  * @source https://wiki.facepunch.com/gmod/GM:ShowTeam
2195
2435
  */
2196
2436
  ShowTeam(self: GM, ply: Player): void;
2437
+
2197
2438
  /**
2198
2439
  * Called whenever the Lua environment is about to be shut down, for example on map change, or when the server is going to shut down.
2199
2440
  *
@@ -2201,18 +2442,21 @@ interface GM {
2201
2442
  * @source https://wiki.facepunch.com/gmod/GM:ShutDown
2202
2443
  */
2203
2444
  ShutDown(self: GM): void;
2445
+
2204
2446
  /**
2205
2447
  * Called when the Spawnmenu is Created.
2206
2448
  * @realm client
2207
2449
  * @source https://wiki.facepunch.com/gmod/GM:SpawnMenuCreated
2208
2450
  */
2209
2451
  SpawnMenuCreated(self: GM): void;
2452
+
2210
2453
  /**
2211
2454
  * Called when spawn icon is generated.
2212
2455
  * @realm client
2213
2456
  * @source https://wiki.facepunch.com/gmod/GM:SpawniconGenerated
2214
2457
  */
2215
2458
  SpawniconGenerated(self: GM, lastmodel: string, imagename: string, modelsleft: number): void;
2459
+
2216
2460
  /**
2217
2461
  * Runs when the user tries to open the chat box.
2218
2462
  *
@@ -2223,6 +2467,7 @@ interface GM {
2223
2467
  * @source https://wiki.facepunch.com/gmod/GM:StartChat
2224
2468
  */
2225
2469
  StartChat(self: GM, isTeamChat: boolean): boolean;
2470
+
2226
2471
  /**
2227
2472
  * Allows you to change the players inputs before they are processed by the server. This function is also called for bots, making it the best solution to control them.
2228
2473
  *
@@ -2236,18 +2481,21 @@ interface GM {
2236
2481
  * @source https://wiki.facepunch.com/gmod/GM:StartCommand
2237
2482
  */
2238
2483
  StartCommand(self: GM, ply: Player, ucmd: CUserCmd): void;
2484
+
2239
2485
  /**
2240
2486
  * Called right before an entity starts driving. Overriding this hook will cause it to not call [drive.Start](https://wiki.facepunch.com/gmod/drive.Start) and the player will not begin driving the entity.
2241
2487
  * @realm shared
2242
2488
  * @source https://wiki.facepunch.com/gmod/GM:StartEntityDriving
2243
2489
  */
2244
2490
  StartEntityDriving(self: GM, ent: Entity, ply: Player): void;
2491
+
2245
2492
  /**
2246
2493
  * Called when you start a new game via the menu.
2247
2494
  * @realm menu
2248
2495
  * @source https://wiki.facepunch.com/gmod/GM:StartGame
2249
2496
  */
2250
2497
  StartGame(self: GM): void;
2498
+
2251
2499
  /**
2252
2500
  * Called every rendered frame on client, except when the game is paused.
2253
2501
  *
@@ -2263,6 +2511,7 @@ interface GM {
2263
2511
  * @source https://wiki.facepunch.com/gmod/GM:Think
2264
2512
  */
2265
2513
  Think(self: GM): void;
2514
+
2266
2515
  /**
2267
2516
  * Called every game tick. [engine.TickCount](https://wiki.facepunch.com/gmod/engine.TickCount) is guaranteed to be different between each call.
2268
2517
  *
@@ -2277,6 +2526,7 @@ interface GM {
2277
2526
  * @source https://wiki.facepunch.com/gmod/GM:Tick
2278
2527
  */
2279
2528
  Tick(self: GM): void;
2529
+
2280
2530
  /**
2281
2531
  * **NOTE**: Isn't called when CalcMainActivity returns a valid override sequence id
2282
2532
  *
@@ -2286,24 +2536,28 @@ interface GM {
2286
2536
  * @source https://wiki.facepunch.com/gmod/GM:TranslateActivity
2287
2537
  */
2288
2538
  TranslateActivity(self: GM, ply: Player, act: number): number;
2539
+
2289
2540
  /**
2290
2541
  * Animation updates (pose params etc) should be done here.
2291
2542
  * @realm shared
2292
2543
  * @source https://wiki.facepunch.com/gmod/GM:UpdateAnimation
2293
2544
  */
2294
2545
  UpdateAnimation(self: GM, ply: Player, velocity: Vector, maxSeqGroundSpeed: number): void;
2546
+
2295
2547
  /**
2296
2548
  * Called when user clicks on a VGUI panel.
2297
2549
  * @realm client
2298
2550
  * @source https://wiki.facepunch.com/gmod/GM:VGUIMousePressAllowed
2299
2551
  */
2300
2552
  VGUIMousePressAllowed(self: GM, button: number): boolean;
2553
+
2301
2554
  /**
2302
2555
  * Called when a mouse button is pressed on a VGUI element or menu.
2303
2556
  * @realm client and menu
2304
2557
  * @source https://wiki.facepunch.com/gmod/GM:VGUIMousePressed
2305
2558
  */
2306
2559
  VGUIMousePressed(self: GM, pnl: Panel, mouseCode: number): void;
2560
+
2307
2561
  /**
2308
2562
  * Called when a variable is edited on an Entity (called by Edit Properties... menu). See [Editable Entities](https://wiki.facepunch.com/gmod/Editable_Entities) for more information.
2309
2563
  *
@@ -2314,6 +2568,7 @@ interface GM {
2314
2568
  * @source https://wiki.facepunch.com/gmod/GM:VariableEdited
2315
2569
  */
2316
2570
  VariableEdited(self: GM, ent: Entity, ply: Player, key: string, val: string, editor: table): void;
2571
+
2317
2572
  /**
2318
2573
  * Called when you are driving a vehicle. This hook works just like [GM:Move](https://wiki.facepunch.com/gmod/GM:Move).
2319
2574
  *
@@ -2323,6 +2578,7 @@ interface GM {
2323
2578
  * @source https://wiki.facepunch.com/gmod/GM:VehicleMove
2324
2579
  */
2325
2580
  VehicleMove(self: GM, ply: Player, veh: Vehicle, mv: CMoveData): void;
2581
+
2326
2582
  /**
2327
2583
  * Called as a weapon entity is picked up by a player. (Including [Player:Give](https://wiki.facepunch.com/gmod/Player:Give))
2328
2584
  *
@@ -2339,42 +2595,49 @@ interface GM {
2339
2595
  * @source https://wiki.facepunch.com/gmod/GM:WeaponEquip
2340
2596
  */
2341
2597
  WeaponEquip(self: GM, weapon: Weapon, owner: Player): void;
2598
+
2342
2599
  /**
2343
2600
  * Called when an addon from the Steam workshop begins downloading. Used by default to place details on the workshop downloading panel.
2344
2601
  * @realm menu
2345
2602
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadFile
2346
2603
  */
2347
2604
  WorkshopDownloadFile(self: GM, id: number, imageID: number, title: string, size: number): void;
2605
+
2348
2606
  /**
2349
2607
  * Called while an addon from the Steam workshop is downloading. Used by default to update details on the fancy workshop download panel.
2350
2608
  * @realm menu
2351
2609
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadProgress
2352
2610
  */
2353
2611
  WorkshopDownloadProgress(self: GM, id: number, imageID: number, title: string, downloaded: number, expected: number): void;
2612
+
2354
2613
  /**
2355
2614
  * Called after [GM:WorkshopStart](https://wiki.facepunch.com/gmod/GM:WorkshopStart).
2356
2615
  * @realm menu
2357
2616
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadTotals
2358
2617
  */
2359
2618
  WorkshopDownloadTotals(self: GM, remain: number, total: number): void;
2619
+
2360
2620
  /**
2361
2621
  * Called when an addon from the Steam workshop finishes downloading. Used by default to update details on the workshop downloading panel.
2362
2622
  * @realm menu
2363
2623
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadedFile
2364
2624
  */
2365
2625
  WorkshopDownloadedFile(self: GM, id: number, title: string): void;
2626
+
2366
2627
  /**
2367
2628
  * Called when downloading content from Steam workshop ends. Used by default to hide fancy workshop downloading panel.
2368
2629
  * @realm menu
2369
2630
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopEnd
2370
2631
  */
2371
2632
  WorkshopEnd(self: GM): void;
2633
+
2372
2634
  /**
2373
2635
  * Called while an addon from the Steam workshop is extracting. Used by default to update details on the fancy workshop download panel.
2374
2636
  * @realm menu
2375
2637
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopExtractProgress
2376
2638
  */
2377
2639
  WorkshopExtractProgress(self: GM, id: number, ImageID: number, title: string, percent: number): void;
2640
+
2378
2641
  /**
2379
2642
  * Called when downloading content from Steam workshop begins. Used by default to show fancy workshop downloading panel.
2380
2643
  *
@@ -2391,12 +2654,14 @@ interface GM {
2391
2654
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopStart
2392
2655
  */
2393
2656
  WorkshopStart(self: GM): void;
2657
+
2394
2658
  /**
2395
2659
  * Called when UGC subscription status changes.
2396
2660
  * @realm menu
2397
2661
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopSubscriptionsChanged
2398
2662
  */
2399
2663
  WorkshopSubscriptionsChanged(self: GM): void;
2664
+
2400
2665
  /**
2401
2666
  * Called when a Workshop Message is received?. Currently, it seems like the message will be **#ugc.mounting** every time.
2402
2667
  * When does this exactly get called?. If an addon is subscribed, unsubscribed, error occurs or on any event?
@@ -2405,6 +2670,7 @@ interface GM {
2405
2670
  * @source https://wiki.facepunch.com/gmod/GM:WorkshopSubscriptionsMessage
2406
2671
  */
2407
2672
  WorkshopSubscriptionsMessage(self: GM, message: string): void;
2673
+
2408
2674
  /**
2409
2675
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
2410
2676
  *
@@ -2415,271 +2681,3 @@ interface GM {
2415
2681
  */
2416
2682
  WorkshopSubscriptionsProgress(self: GM, num: number, max: number): void;
2417
2683
  }
2418
-
2419
-
2420
-
2421
-
2422
-
2423
-
2424
-
2425
-
2426
-
2427
-
2428
-
2429
-
2430
-
2431
-
2432
-
2433
-
2434
-
2435
-
2436
-
2437
-
2438
-
2439
-
2440
-
2441
-
2442
-
2443
-
2444
-
2445
-
2446
-
2447
-
2448
-
2449
-
2450
-
2451
-
2452
-
2453
-
2454
-
2455
-
2456
-
2457
-
2458
-
2459
-
2460
-
2461
-
2462
-
2463
-
2464
-
2465
-
2466
-
2467
-
2468
-
2469
-
2470
-
2471
-
2472
-
2473
-
2474
-
2475
-
2476
-
2477
-
2478
-
2479
-
2480
-
2481
-
2482
-
2483
-
2484
-
2485
-
2486
-
2487
-
2488
-
2489
-
2490
-
2491
-
2492
-
2493
-
2494
-
2495
-
2496
-
2497
-
2498
-
2499
-
2500
-
2501
-
2502
-
2503
-
2504
-
2505
-
2506
-
2507
-
2508
-
2509
-
2510
-
2511
-
2512
-
2513
-
2514
-
2515
-
2516
-
2517
-
2518
-
2519
-
2520
-
2521
-
2522
-
2523
-
2524
-
2525
-
2526
-
2527
-
2528
-
2529
-
2530
-
2531
-
2532
-
2533
-
2534
-
2535
-
2536
-
2537
-
2538
-
2539
-
2540
-
2541
-
2542
-
2543
-
2544
-
2545
-
2546
-
2547
-
2548
-
2549
-
2550
-
2551
-
2552
-
2553
-
2554
-
2555
-
2556
-
2557
-
2558
-
2559
-
2560
-
2561
-
2562
-
2563
-
2564
-
2565
-
2566
-
2567
-
2568
-
2569
-
2570
-
2571
-
2572
-
2573
-
2574
-
2575
-
2576
-
2577
-
2578
-
2579
-
2580
-
2581
-
2582
-
2583
-
2584
-
2585
-
2586
-
2587
-
2588
-
2589
-
2590
-
2591
-
2592
-
2593
-
2594
-
2595
-
2596
-
2597
-
2598
-
2599
-
2600
-
2601
-
2602
-
2603
-
2604
-
2605
-
2606
-
2607
-
2608
-
2609
-
2610
-
2611
-
2612
-
2613
-
2614
-
2615
-
2616
-
2617
-
2618
-
2619
-
2620
-
2621
-
2622
-
2623
-
2624
-
2625
-
2626
-
2627
-
2628
-
2629
-
2630
-
2631
-
2632
-
2633
-
2634
-
2635
-
2636
-
2637
-
2638
-
2639
-
2640
-
2641
-
2642
-
2643
-
2644
-
2645
-
2646
-
2647
-
2648
-
2649
-
2650
-
2651
-
2652
-
2653
-
2654
-
2655
-
2656
-
2657
-
2658
-
2659
-
2660
-
2661
-
2662
-
2663
-
2664
-
2665
-
2666
-
2667
-
2668
-
2669
-
2670
-
2671
-
2672
-
2673
-
2674
-
2675
-
2676
-
2677
-
2678
-
2679
-
2680
-
2681
-
2682
-
2683
-
2684
-
2685
-