@tlua/gmod 1.0.4 → 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.
- package/package.json +1 -1
- package/types/achievementicon.d.tlua +0 -1
- package/types/achievements.d.tlua +0 -31
- package/types/ai.d.tlua +0 -11
- package/types/ai_schedule.d.tlua +0 -1
- package/types/ai_task.d.tlua +0 -1
- package/types/angle.d.tlua +0 -37
- package/types/avatarimage.d.tlua +0 -1
- package/types/awesomium.d.tlua +0 -1
- package/types/baseclass.d.tlua +0 -4
- package/types/bf_read.d.tlua +0 -23
- package/types/bit.d.tlua +0 -23
- package/types/button.d.tlua +0 -1
- package/types/cam.d.tlua +0 -33
- package/types/ceffectdata.d.tlua +0 -65
- package/types/chat.d.tlua +0 -11
- package/types/checkbutton.d.tlua +0 -1
- package/types/cleanup.d.tlua +0 -15
- package/types/cluaemitter.d.tlua +0 -25
- package/types/clualocomotion.d.tlua +0 -81
- package/types/cluaparticle.d.tlua +0 -89
- package/types/cmovedata.d.tlua +0 -95
- package/types/cnavarea.d.tlua +0 -155
- package/types/cnavladder.d.tlua +0 -45
- package/types/cnewparticleeffect.d.tlua +0 -53
- package/types/color.d.tlua +0 -57
- package/types/concommand.d.tlua +0 -9
- package/types/constraint.d.tlua +0 -57
- package/types/construct.d.tlua +0 -3
- package/types/contentheader.d.tlua +1 -6
- package/types/contenticon.d.tlua +1 -18
- package/types/contentsidebar.d.tlua +1 -8
- package/types/contentsidebartoolbox.d.tlua +0 -1
- package/types/contextbase.d.tlua +1 -8
- package/types/controlpanel.d.tlua +6 -31
- package/types/controlpresets.d.tlua +1 -26
- package/types/convar.d.tlua +0 -33
- package/types/cookie.d.tlua +0 -7
- package/types/coroutine.d.tlua +0 -15
- package/types/crecipientfilter.d.tlua +0 -33
- package/types/csent.d.tlua +0 -1
- package/types/csoundpatch.d.tlua +0 -29
- package/types/ctakedamageinfo.d.tlua +0 -67
- package/types/ctrllistbox.d.tlua +0 -1
- package/types/ctrlnumpad.d.tlua +0 -13
- package/types/cusercmd.d.tlua +0 -55
- package/types/custom_entity_fields.d.tlua +0 -1
- package/types/cvars.d.tlua +0 -13
- package/types/dadjustablemodelpanel.d.tlua +1 -14
- package/types/dalphabar.d.tlua +1 -6
- package/types/dbinder.d.tlua +1 -8
- package/types/dbubblecontainer.d.tlua +1 -4
- package/types/dbutton.d.tlua +1 -16
- package/types/dcategoryheader.d.tlua +0 -1
- package/types/dcategorylist.d.tlua +0 -1
- package/types/dcheckbox.d.tlua +1 -10
- package/types/dcheckboxlabel.d.tlua +0 -19
- package/types/dcollapsiblecategory.d.tlua +1 -46
- package/types/dcolorbutton.d.tlua +1 -14
- package/types/dcolorcombo.d.tlua +1 -10
- package/types/dcolorcube.d.tlua +1 -26
- package/types/dcolormixer.d.tlua +1 -54
- package/types/dcolorpalette.d.tlua +1 -46
- package/types/dcolumnsheet.d.tlua +1 -10
- package/types/dcombobox.d.tlua +1 -34
- package/types/ddragbase.d.tlua +1 -26
- package/types/ddrawer.d.tlua +1 -16
- package/types/debug.d.tlua +25 -60
- package/types/debugoverlay.d.tlua +0 -23
- package/types/dentityproperties.d.tlua +1 -10
- package/types/derma.d.tlua +0 -21
- package/types/dexpandbutton.d.tlua +1 -6
- package/types/dfilebrowser.d.tlua +0 -41
- package/types/dform.d.tlua +1 -36
- package/types/dframe.d.tlua +0 -49
- package/types/dgrid.d.tlua +1 -22
- package/types/dhorizontaldivider.d.tlua +1 -40
- package/types/dhorizontalscroller.d.tlua +1 -22
- package/types/dhscrollbar.d.tlua +1 -22
- package/types/dhtml.d.tlua +1 -16
- package/types/dhtmlcontrols.d.tlua +0 -11
- package/types/diconbrowser.d.tlua +1 -22
- package/types/diconlayout.d.tlua +1 -36
- package/types/dimage.d.tlua +1 -39
- package/types/dimagebutton.d.tlua +0 -19
- package/types/dkillicon.d.tlua +0 -1
- package/types/dlabel.d.tlua +1 -66
- package/types/dlabeleditable.d.tlua +1 -10
- package/types/dlabelurl.d.tlua +1 -20
- package/types/dlistbox.d.tlua +1 -16
- package/types/dlistboxitem.d.tlua +1 -8
- package/types/dlistlayout.d.tlua +0 -1
- package/types/dlistview.d.tlua +1 -68
- package/types/dlistview_column.d.tlua +1 -28
- package/types/dlistview_columnplain.d.tlua +0 -1
- package/types/dlistview_draggerbar.d.tlua +0 -1
- package/types/dlistview_line.d.tlua +1 -26
- package/types/dlistviewheaderlabel.d.tlua +0 -1
- package/types/dlistviewlabel.d.tlua +0 -1
- package/types/dlistviewline.d.tlua +0 -1
- package/types/dmenu.d.tlua +1 -53
- package/types/dmenubar.d.tlua +1 -11
- package/types/dmenuoption.d.tlua +1 -26
- package/types/dmenuoptioncvar.d.tlua +1 -12
- package/types/dmodelpanel.d.tlua +1 -44
- package/types/dmodelselect.d.tlua +1 -4
- package/types/dmodelselectmulti.d.tlua +1 -4
- package/types/dnotify.d.tlua +1 -20
- package/types/dnumberscratch.d.tlua +1 -52
- package/types/dnumberwang.d.tlua +1 -32
- package/types/dnumpad.d.tlua +0 -1
- package/types/dnumslider.d.tlua +0 -35
- package/types/dpanel.d.tlua +1 -28
- package/types/dpanellist.d.tlua +0 -23
- package/types/dpaneloverlay.d.tlua +1 -14
- package/types/dpanelselect.d.tlua +0 -1
- package/types/dpanpanel.d.tlua +1 -12
- package/types/dprogress.d.tlua +1 -6
- package/types/dproperties.d.tlua +1 -8
- package/types/dproperty_boolean.d.tlua +0 -1
- package/types/dproperty_combo.d.tlua +1 -6
- package/types/dproperty_entity.d.tlua +0 -1
- package/types/dproperty_float.d.tlua +0 -1
- package/types/dproperty_generic.d.tlua +1 -10
- package/types/dproperty_int.d.tlua +0 -1
- package/types/dproperty_vectorcolor.d.tlua +0 -1
- package/types/dpropertysheet.d.tlua +9 -41
- package/types/dragndrop.d.tlua +0 -21
- package/types/draw.d.tlua +0 -22
- package/types/drgbpicker.d.tlua +1 -8
- package/types/drive.d.tlua +6 -31
- package/types/dscrollbargrip.d.tlua +0 -1
- package/types/dscrollpanel.d.tlua +0 -21
- package/types/dshape.d.tlua +1 -14
- package/types/dsizetocontents.d.tlua +1 -10
- package/types/dslider.d.tlua +1 -56
- package/types/dsprite.d.tlua +1 -18
- package/types/dtab.d.tlua +1 -16
- package/types/dtextentry.d.tlua +1 -86
- package/types/dtilelayout.d.tlua +1 -42
- package/types/dtooltip.d.tlua +1 -12
- package/types/dtree.d.tlua +1 -32
- package/types/dtree_node.d.tlua +1 -136
- package/types/dtree_node_button.d.tlua +0 -1
- package/types/duplicator.d.tlua +0 -60
- package/types/dverticaldivider.d.tlua +1 -46
- package/types/dvscrollbar.d.tlua +1 -22
- package/types/editablepanel.d.tlua +0 -1
- package/types/effect.d.tlua +1 -8
- package/types/effects.d.tlua +0 -13
- package/types/engine.d.tlua +0 -43
- package/types/entity.d.tlua +2 -1319
- package/types/ents.d.tlua +0 -44
- package/types/enums.d.tlua +0 -1
- package/types/file.d.tlua +0 -79
- package/types/file_class.d.tlua +0 -1
- package/types/fingerposer.d.tlua +0 -1
- package/types/fingervar.d.tlua +0 -1
- package/types/frame.d.tlua +0 -1
- package/types/frame_blend.d.tlua +0 -15
- package/types/game.d.tlua +0 -79
- package/types/gameevent.d.tlua +4 -9
- package/types/gamemode.d.tlua +0 -6
- package/types/global.d.tlua +0 -18
- package/types/gm.d.tlua +0 -535
- package/types/gmod.d.tlua +0 -1
- package/types/gmsave.d.tlua +0 -9
- package/types/gui.d.tlua +0 -43
- package/types/gwen.d.tlua +0 -7
- package/types/halo.d.tlua +0 -5
- package/types/hammer.d.tlua +0 -1
- package/types/hook.d.tlua +0 -9
- package/types/html.d.tlua +0 -1
- package/types/http.d.tlua +0 -3
- package/types/iconeditor.d.tlua +1 -22
- package/types/igmodaudiochannel.d.tlua +0 -83
- package/types/imagecheckbox.d.tlua +1 -8
- package/types/imaterial.d.tlua +0 -53
- package/types/imesh.d.tlua +0 -11
- package/types/input.d.tlua +0 -47
- package/types/invalidateinternalentitycache.d.tlua +0 -1
- package/types/irestore.d.tlua +0 -19
- package/types/isave.d.tlua +0 -19
- package/types/itexture.d.tlua +0 -21
- package/types/ivideowriter.d.tlua +0 -11
- package/types/jit.d.tlua +9 -42
- package/types/killicon.d.tlua +0 -15
- package/types/label.d.tlua +0 -1
- package/types/language.d.tlua +0 -3
- package/types/list.d.tlua +0 -17
- package/types/makeballoon.d.tlua +0 -1
- package/types/markup.d.tlua +0 -5
- package/types/markupobject.d.tlua +0 -11
- package/types/material.d.tlua +0 -1
- package/types/math.d.tlua +200 -371
- package/types/matproxy.d.tlua +0 -7
- package/types/matselect.d.tlua +1 -22
- package/types/menu.d.tlua +0 -1
- package/types/menubar.d.tlua +0 -5
- package/types/mesh.d.tlua +0 -39
- package/types/modelimage.d.tlua +0 -1
- package/types/motionsensor.d.tlua +0 -21
- package/types/navmesh.d.tlua +0 -53
- package/types/net.d.tlua +0 -104
- package/types/nextbot.d.tlua +10 -83
- package/types/notification.d.tlua +0 -5
- package/types/npc.d.tlua +1 -364
- package/types/numpad.d.tlua +0 -15
- package/types/os.d.tlua +0 -8
- package/types/package.d.tlua +0 -1
- package/types/panel.d.tlua +2 -662
- package/types/panellist.d.tlua +0 -1
- package/types/pathfollower.d.tlua +0 -63
- package/types/permissions.d.tlua +0 -13
- package/types/physcollide.d.tlua +0 -7
- package/types/physenv.d.tlua +0 -23
- package/types/physobj.d.tlua +0 -157
- package/types/pixelvis_handle_t.d.tlua +0 -1
- package/types/player.d.tlua +11 -594
- package/types/player_manager.d.tlua +0 -27
- package/types/preseteditor.d.tlua +0 -1
- package/types/presets.d.tlua +0 -13
- package/types/projectedtexture.d.tlua +0 -97
- package/types/properties.d.tlua +0 -11
- package/types/propselect.d.tlua +1 -10
- package/types/radiobutton.d.tlua +0 -1
- package/types/render.d.tlua +0 -285
- package/types/resource.d.tlua +0 -5
- package/types/richtext.d.tlua +0 -1
- package/types/sandbox.d.tlua +1 -108
- package/types/saverestore.d.tlua +0 -25
- package/types/schedule.d.tlua +0 -13
- package/types/scripted_ents.d.tlua +0 -21
- package/types/search.d.tlua +0 -3
- package/types/serverlist.d.tlua +0 -15
- package/types/slidebar.d.tlua +0 -1
- package/types/slider.d.tlua +0 -1
- package/types/sound.d.tlua +0 -21
- package/types/spawnicon.d.tlua +1 -16
- package/types/spawnmenu.d.tlua +0 -48
- package/types/spawnmenucontentpanel.d.tlua +1 -10
- package/types/sql.d.tlua +0 -19
- package/types/stack.d.tlua +0 -11
- package/types/steamworks.d.tlua +0 -37
- package/types/string.d.tlua +0 -96
- package/types/structures.d.tlua +0 -7
- package/types/surface.d.tlua +0 -69
- package/types/surfaceinfo.d.tlua +0 -11
- package/types/system.d.tlua +0 -21
- package/types/table.d.tlua +0 -93
- package/types/task.d.tlua +0 -19
- package/types/team.d.tlua +0 -39
- package/types/textentry.d.tlua +0 -1
- package/types/tgaimage.d.tlua +0 -1
- package/types/timer.d.tlua +0 -29
- package/types/tool.d.tlua +1 -90
- package/types/ugcpublishwindow.d.tlua +1 -18
- package/types/umsg.d.tlua +0 -25
- package/types/undo.d.tlua +0 -21
- package/types/urllabel.d.tlua +0 -1
- package/types/usermessage.d.tlua +0 -5
- package/types/utf8.d.tlua +0 -15
- package/types/util.d.tlua +0 -185
- package/types/vector.d.tlua +0 -73
- package/types/vehicle.d.tlua +2 -102
- package/types/vgui.d.tlua +0 -33
- package/types/video.d.tlua +0 -1
- package/types/vmatrix.d.tlua +0 -71
- package/types/weapon.d.tlua +2 -168
- package/types/weapons.d.tlua +0 -12
- package/types/widgets.d.tlua +0 -3
- package/types/workshopfilebase.d.tlua +0 -11
package/types/gm.d.tlua
CHANGED
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @source https://wiki.facepunch.com/gmod/GM_Hooks
|
|
9
9
|
*/
|
|
10
|
-
interface GM {}
|
|
11
|
-
|
|
12
10
|
interface GM {
|
|
13
11
|
/**
|
|
14
12
|
* Called when a map I/O event occurs.
|
|
@@ -19,9 +17,7 @@ interface GM {
|
|
|
19
17
|
* @source https://wiki.facepunch.com/gmod/GM:AcceptInput
|
|
20
18
|
*/
|
|
21
19
|
AcceptInput(self: GM, ent: Entity, input: string, activator: Entity, caller: Entity, value: any): boolean;
|
|
22
|
-
}
|
|
23
20
|
|
|
24
|
-
interface GM {
|
|
25
21
|
/**
|
|
26
22
|
* Adds a death notice entry.
|
|
27
23
|
*
|
|
@@ -29,18 +25,14 @@ interface GM {
|
|
|
29
25
|
* @source https://wiki.facepunch.com/gmod/GM:AddDeathNotice
|
|
30
26
|
*/
|
|
31
27
|
AddDeathNotice(self: GM, attacker: string, attackerTeam: number, inflictor: string, victim: string, victimTeam: number): any;
|
|
32
|
-
}
|
|
33
28
|
|
|
34
|
-
interface GM {
|
|
35
29
|
/**
|
|
36
30
|
* Allows you to adjust the mouse sensitivity.
|
|
37
31
|
* @realm client
|
|
38
32
|
* @source https://wiki.facepunch.com/gmod/GM:AdjustMouseSensitivity
|
|
39
33
|
*/
|
|
40
34
|
AdjustMouseSensitivity(self: GM, defaultSensitivity: number, localFOV: number, defaultFOV: number): number;
|
|
41
|
-
}
|
|
42
35
|
|
|
43
|
-
interface GM {
|
|
44
36
|
/**
|
|
45
37
|
* Called when a player tries to pick up something using the "use" key, return to override.
|
|
46
38
|
*
|
|
@@ -53,9 +45,7 @@ interface GM {
|
|
|
53
45
|
* @source https://wiki.facepunch.com/gmod/GM:AllowPlayerPickup
|
|
54
46
|
*/
|
|
55
47
|
AllowPlayerPickup(self: GM, ply: Player, ent: Entity): boolean;
|
|
56
|
-
}
|
|
57
48
|
|
|
58
|
-
interface GM {
|
|
59
49
|
/**
|
|
60
50
|
* This hook is used to calculate animations for a player.
|
|
61
51
|
*
|
|
@@ -66,9 +56,7 @@ interface GM {
|
|
|
66
56
|
* @source https://wiki.facepunch.com/gmod/GM:CalcMainActivity
|
|
67
57
|
*/
|
|
68
58
|
CalcMainActivity(self: GM, ply: Player, vel: Vector): (number, number);
|
|
69
|
-
}
|
|
70
59
|
|
|
71
|
-
interface GM {
|
|
72
60
|
/**
|
|
73
61
|
* Called from [GM:CalcView](https://wiki.facepunch.com/gmod/GM:CalcView) when player is in driving a vehicle.
|
|
74
62
|
*
|
|
@@ -78,36 +66,28 @@ interface GM {
|
|
|
78
66
|
* @source https://wiki.facepunch.com/gmod/GM:CalcVehicleView
|
|
79
67
|
*/
|
|
80
68
|
CalcVehicleView(self: GM, veh: Vehicle, ply: Player, view: CamData): table;
|
|
81
|
-
}
|
|
82
69
|
|
|
83
|
-
interface GM {
|
|
84
70
|
/**
|
|
85
71
|
* Allows override of the default view.
|
|
86
72
|
* @realm client
|
|
87
73
|
* @source https://wiki.facepunch.com/gmod/GM:CalcView
|
|
88
74
|
*/
|
|
89
75
|
CalcView(self: GM, ply: Player, origin: Vector, angles: Angle, fov: number, znear: number, zfar: number): CamData;
|
|
90
|
-
}
|
|
91
76
|
|
|
92
|
-
interface GM {
|
|
93
77
|
/**
|
|
94
78
|
* Allows overriding the position and angle of the viewmodel.
|
|
95
79
|
* @realm client
|
|
96
80
|
* @source https://wiki.facepunch.com/gmod/GM:CalcViewModelView
|
|
97
81
|
*/
|
|
98
82
|
CalcViewModelView(self: GM, wep: Weapon, vm: Entity, oldPos: Vector, oldAng: Angle, pos: Vector, ang: Angle): (Vector, Angle);
|
|
99
|
-
}
|
|
100
83
|
|
|
101
|
-
interface GM {
|
|
102
84
|
/**
|
|
103
85
|
* Called whenever a players tries to create an undo.
|
|
104
86
|
* @realm server
|
|
105
87
|
* @source https://wiki.facepunch.com/gmod/GM:CanCreateUndo
|
|
106
88
|
*/
|
|
107
89
|
CanCreateUndo(self: GM, ply: Player, undo: Undo): boolean;
|
|
108
|
-
}
|
|
109
90
|
|
|
110
|
-
interface GM {
|
|
111
91
|
/**
|
|
112
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.
|
|
113
93
|
*
|
|
@@ -119,9 +99,7 @@ interface GM {
|
|
|
119
99
|
* @source https://wiki.facepunch.com/gmod/GM:CanEditVariable
|
|
120
100
|
*/
|
|
121
101
|
CanEditVariable(self: GM, ent: Entity, ply: Player, key: string, value: string, editor: table): boolean;
|
|
122
|
-
}
|
|
123
102
|
|
|
124
|
-
interface GM {
|
|
125
103
|
/**
|
|
126
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.
|
|
127
105
|
*
|
|
@@ -132,9 +110,7 @@ interface GM {
|
|
|
132
110
|
* @source https://wiki.facepunch.com/gmod/GM:CanExitVehicle
|
|
133
111
|
*/
|
|
134
112
|
CanExitVehicle(self: GM, veh: Vehicle, ply: Player): boolean;
|
|
135
|
-
}
|
|
136
113
|
|
|
137
|
-
interface GM {
|
|
138
114
|
/**
|
|
139
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.
|
|
140
116
|
*
|
|
@@ -144,45 +120,35 @@ interface GM {
|
|
|
144
120
|
* @source https://wiki.facepunch.com/gmod/GM:CanPlayerEnterVehicle
|
|
145
121
|
*/
|
|
146
122
|
CanPlayerEnterVehicle(self: GM, player: Player, vehicle: Vehicle, role: number): boolean;
|
|
147
|
-
}
|
|
148
123
|
|
|
149
|
-
interface GM {
|
|
150
124
|
/**
|
|
151
125
|
* Determines if the player can kill themselves using the `kill` or `explode` console commands.
|
|
152
126
|
* @realm server
|
|
153
127
|
* @source https://wiki.facepunch.com/gmod/GM:CanPlayerSuicide
|
|
154
128
|
*/
|
|
155
129
|
CanPlayerSuicide(self: GM, player: Player): boolean;
|
|
156
|
-
}
|
|
157
130
|
|
|
158
|
-
interface GM {
|
|
159
131
|
/**
|
|
160
132
|
* Determines if the player can unfreeze the entity.
|
|
161
133
|
* @realm server
|
|
162
134
|
* @source https://wiki.facepunch.com/gmod/GM:CanPlayerUnfreeze
|
|
163
135
|
*/
|
|
164
136
|
CanPlayerUnfreeze(self: GM, player: Player, entity: Entity, phys: PhysObj): boolean;
|
|
165
|
-
}
|
|
166
137
|
|
|
167
|
-
interface GM {
|
|
168
138
|
/**
|
|
169
139
|
* Controls if a [property](https://wiki.facepunch.com/gmod/properties) can be used or not.
|
|
170
140
|
* @realm shared
|
|
171
141
|
* @source https://wiki.facepunch.com/gmod/GM:CanProperty
|
|
172
142
|
*/
|
|
173
143
|
CanProperty(self: GM, ply: Player, property: string, ent: Entity): boolean;
|
|
174
|
-
}
|
|
175
144
|
|
|
176
|
-
interface GM {
|
|
177
145
|
/**
|
|
178
146
|
* Called whenever a players tries to undo.
|
|
179
147
|
* @realm server
|
|
180
148
|
* @source https://wiki.facepunch.com/gmod/GM:CanUndo
|
|
181
149
|
*/
|
|
182
150
|
CanUndo(self: GM, ply: Player, undo: Undo): boolean;
|
|
183
|
-
}
|
|
184
151
|
|
|
185
|
-
interface GM {
|
|
186
152
|
/**
|
|
187
153
|
* Called each frame to record demos to video using [IVideoWriter](https://wiki.facepunch.com/gmod/IVideoWriter).
|
|
188
154
|
*
|
|
@@ -193,9 +159,7 @@ interface GM {
|
|
|
193
159
|
* @source https://wiki.facepunch.com/gmod/GM:CaptureVideo
|
|
194
160
|
*/
|
|
195
161
|
CaptureVideo(self: GM): void;
|
|
196
|
-
}
|
|
197
162
|
|
|
198
|
-
interface GM {
|
|
199
163
|
/**
|
|
200
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.
|
|
201
165
|
*
|
|
@@ -205,18 +169,14 @@ interface GM {
|
|
|
205
169
|
* @source https://wiki.facepunch.com/gmod/GM:ChatText
|
|
206
170
|
*/
|
|
207
171
|
ChatText(self: GM, index: number, name: string, text: string, type: string): boolean;
|
|
208
|
-
}
|
|
209
172
|
|
|
210
|
-
interface GM {
|
|
211
173
|
/**
|
|
212
174
|
* Called whenever the content of the user's chat input box is changed.
|
|
213
175
|
* @realm client
|
|
214
176
|
* @source https://wiki.facepunch.com/gmod/GM:ChatTextChanged
|
|
215
177
|
*/
|
|
216
178
|
ChatTextChanged(self: GM, text: string): void;
|
|
217
|
-
}
|
|
218
179
|
|
|
219
|
-
interface GM {
|
|
220
180
|
/**
|
|
221
181
|
* Called when a **non local player** connects to allow the Lua system to check the password.
|
|
222
182
|
*
|
|
@@ -226,9 +186,7 @@ interface GM {
|
|
|
226
186
|
* @source https://wiki.facepunch.com/gmod/GM:CheckPassword
|
|
227
187
|
*/
|
|
228
188
|
CheckPassword(self: GM, steamID64: string, ipAddress: string, svPassword: string, clPassword: string, name: string): (boolean, string);
|
|
229
|
-
}
|
|
230
189
|
|
|
231
|
-
interface GM {
|
|
232
190
|
/**
|
|
233
191
|
* Called when a player's sign on state changes.
|
|
234
192
|
* You cannot get a valid player object from the userID at any point during this hook.
|
|
@@ -237,18 +195,14 @@ interface GM {
|
|
|
237
195
|
* @source https://wiki.facepunch.com/gmod/GM:ClientSignOnStateChanged
|
|
238
196
|
*/
|
|
239
197
|
ClientSignOnStateChanged(self: GM, userID: number, oldState: number, newState: number): void;
|
|
240
|
-
}
|
|
241
198
|
|
|
242
|
-
interface GM {
|
|
243
199
|
/**
|
|
244
200
|
* Called when derma menus are closed with [Global.CloseDermaMenus](https://wiki.facepunch.com/gmod/Global.CloseDermaMenus).
|
|
245
201
|
* @realm client and menu
|
|
246
202
|
* @source https://wiki.facepunch.com/gmod/GM:CloseDermaMenus
|
|
247
203
|
*/
|
|
248
204
|
CloseDermaMenus(self: GM): void;
|
|
249
|
-
}
|
|
250
205
|
|
|
251
|
-
interface GM {
|
|
252
206
|
/**
|
|
253
207
|
* Called whenever an entity becomes a clientside ragdoll.
|
|
254
208
|
*
|
|
@@ -258,9 +212,7 @@ interface GM {
|
|
|
258
212
|
* @source https://wiki.facepunch.com/gmod/GM:CreateClientsideRagdoll
|
|
259
213
|
*/
|
|
260
214
|
CreateClientsideRagdoll(self: GM, entity: Entity, ragdoll: Entity): void;
|
|
261
|
-
}
|
|
262
215
|
|
|
263
|
-
interface GM {
|
|
264
216
|
/**
|
|
265
217
|
* Called when a serverside ragdoll of an entity has been created.
|
|
266
218
|
*
|
|
@@ -270,9 +222,7 @@ interface GM {
|
|
|
270
222
|
* @source https://wiki.facepunch.com/gmod/GM:CreateEntityRagdoll
|
|
271
223
|
*/
|
|
272
224
|
CreateEntityRagdoll(self: GM, owner: Entity, ragdoll: Entity): void;
|
|
273
|
-
}
|
|
274
225
|
|
|
275
|
-
interface GM {
|
|
276
226
|
/**
|
|
277
227
|
* Allows you to change the players movements before they're sent to the server.
|
|
278
228
|
*
|
|
@@ -285,9 +235,7 @@ interface GM {
|
|
|
285
235
|
* @source https://wiki.facepunch.com/gmod/GM:CreateMove
|
|
286
236
|
*/
|
|
287
237
|
CreateMove(self: GM, cmd: CUserCmd): boolean;
|
|
288
|
-
}
|
|
289
238
|
|
|
290
|
-
interface GM {
|
|
291
239
|
/**
|
|
292
240
|
* Teams are created within this hook using [team.SetUp](https://wiki.facepunch.com/gmod/team.SetUp).
|
|
293
241
|
*
|
|
@@ -297,18 +245,14 @@ interface GM {
|
|
|
297
245
|
* @source https://wiki.facepunch.com/gmod/GM:CreateTeams
|
|
298
246
|
*/
|
|
299
247
|
CreateTeams(self: GM): void;
|
|
300
|
-
}
|
|
301
248
|
|
|
302
|
-
interface GM {
|
|
303
249
|
/**
|
|
304
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.
|
|
305
251
|
* @realm shared
|
|
306
252
|
* @source https://wiki.facepunch.com/gmod/GM:DoAnimationEvent
|
|
307
253
|
*/
|
|
308
254
|
DoAnimationEvent(self: GM, ply: Player, event: number, data?: number): number;
|
|
309
|
-
}
|
|
310
255
|
|
|
311
|
-
interface GM {
|
|
312
256
|
/**
|
|
313
257
|
* Handles the player's death.
|
|
314
258
|
*
|
|
@@ -325,27 +269,21 @@ interface GM {
|
|
|
325
269
|
* @source https://wiki.facepunch.com/gmod/GM:DoPlayerDeath
|
|
326
270
|
*/
|
|
327
271
|
DoPlayerDeath(self: GM, ply: Player, attacker: Entity, dmg: CTakeDamageInfo): void;
|
|
328
|
-
}
|
|
329
272
|
|
|
330
|
-
interface GM {
|
|
331
273
|
/**
|
|
332
274
|
* This hook is called every frame to draw all of the current death notices.
|
|
333
275
|
* @realm client
|
|
334
276
|
* @source https://wiki.facepunch.com/gmod/GM:DrawDeathNotice
|
|
335
277
|
*/
|
|
336
278
|
DrawDeathNotice(self: GM, x: number, y: number): void;
|
|
337
|
-
}
|
|
338
279
|
|
|
339
|
-
interface GM {
|
|
340
280
|
/**
|
|
341
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.
|
|
342
282
|
* @realm client
|
|
343
283
|
* @source https://wiki.facepunch.com/gmod/GM:DrawMonitors
|
|
344
284
|
*/
|
|
345
285
|
DrawMonitors(self: GM): void;
|
|
346
|
-
}
|
|
347
286
|
|
|
348
|
-
interface GM {
|
|
349
287
|
/**
|
|
350
288
|
* Called after all other 2D draw hooks are called. Draws over all VGUI Panels and HUDs.
|
|
351
289
|
*
|
|
@@ -359,9 +297,7 @@ interface GM {
|
|
|
359
297
|
* @source https://wiki.facepunch.com/gmod/GM:DrawOverlay
|
|
360
298
|
*/
|
|
361
299
|
DrawOverlay(self: GM): void;
|
|
362
|
-
}
|
|
363
300
|
|
|
364
|
-
interface GM {
|
|
365
301
|
/**
|
|
366
302
|
* Allows you to override physgun effects rendering.
|
|
367
303
|
*
|
|
@@ -372,18 +308,14 @@ interface GM {
|
|
|
372
308
|
* @source https://wiki.facepunch.com/gmod/GM:DrawPhysgunBeam
|
|
373
309
|
*/
|
|
374
310
|
DrawPhysgunBeam(self: GM, ply: Player, physgun: Weapon, enabled: boolean, target: Entity, physBone: number, hitPos: Vector): boolean;
|
|
375
|
-
}
|
|
376
311
|
|
|
377
|
-
interface GM {
|
|
378
312
|
/**
|
|
379
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.
|
|
380
314
|
* @realm shared
|
|
381
315
|
* @source https://wiki.facepunch.com/gmod/GM:EndEntityDriving
|
|
382
316
|
*/
|
|
383
317
|
EndEntityDriving(self: GM, ent: Entity, ply: Player): void;
|
|
384
|
-
}
|
|
385
318
|
|
|
386
|
-
interface GM {
|
|
387
319
|
/**
|
|
388
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).
|
|
389
321
|
*
|
|
@@ -391,9 +323,7 @@ interface GM {
|
|
|
391
323
|
* @source https://wiki.facepunch.com/gmod/GM:EntityEmitSound
|
|
392
324
|
*/
|
|
393
325
|
EntityEmitSound(self: GM, data: EmitSoundInfo): boolean;
|
|
394
|
-
}
|
|
395
326
|
|
|
396
|
-
interface GM {
|
|
397
327
|
/**
|
|
398
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.
|
|
399
329
|
*
|
|
@@ -406,9 +336,7 @@ interface GM {
|
|
|
406
336
|
* @source https://wiki.facepunch.com/gmod/GM:EntityFireBullets
|
|
407
337
|
*/
|
|
408
338
|
EntityFireBullets(self: GM, entity: Entity, data: Bullet): boolean;
|
|
409
|
-
}
|
|
410
339
|
|
|
411
|
-
interface GM {
|
|
412
340
|
/**
|
|
413
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).
|
|
414
342
|
*
|
|
@@ -418,9 +346,7 @@ interface GM {
|
|
|
418
346
|
* @source https://wiki.facepunch.com/gmod/GM:EntityKeyValue
|
|
419
347
|
*/
|
|
420
348
|
EntityKeyValue(self: GM, ent: Entity, key: string, value: string): string;
|
|
421
|
-
}
|
|
422
349
|
|
|
423
|
-
interface GM {
|
|
424
350
|
/**
|
|
425
351
|
* Called when an NW2Var is changed.
|
|
426
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.
|
|
@@ -434,9 +360,7 @@ interface GM {
|
|
|
434
360
|
* @source https://wiki.facepunch.com/gmod/GM:EntityNetworkedVarChanged
|
|
435
361
|
*/
|
|
436
362
|
EntityNetworkedVarChanged(self: GM, ent: Entity, name: string, oldval: any, newval: any): void;
|
|
437
|
-
}
|
|
438
363
|
|
|
439
|
-
interface GM {
|
|
440
364
|
/**
|
|
441
365
|
* Called right before removal of an entity.
|
|
442
366
|
* **WARNING**: This hook is called clientside during full updates due to how networking works in the Source Engine.
|
|
@@ -448,9 +372,7 @@ interface GM {
|
|
|
448
372
|
* @source https://wiki.facepunch.com/gmod/GM:EntityRemoved
|
|
449
373
|
*/
|
|
450
374
|
EntityRemoved(self: GM, ent: Entity, fullUpdate: boolean): void;
|
|
451
|
-
}
|
|
452
375
|
|
|
453
|
-
interface GM {
|
|
454
376
|
/**
|
|
455
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.
|
|
456
378
|
*
|
|
@@ -463,9 +385,7 @@ interface GM {
|
|
|
463
385
|
* @source https://wiki.facepunch.com/gmod/GM:EntityTakeDamage
|
|
464
386
|
*/
|
|
465
387
|
EntityTakeDamage(self: GM, target: Entity, dmg: CTakeDamageInfo): boolean;
|
|
466
|
-
}
|
|
467
388
|
|
|
468
|
-
interface GM {
|
|
469
389
|
/**
|
|
470
390
|
* This hook polls the entity the player use action should be applied to.
|
|
471
391
|
*
|
|
@@ -476,18 +396,14 @@ interface GM {
|
|
|
476
396
|
* @source https://wiki.facepunch.com/gmod/GM:FindUseEntity
|
|
477
397
|
*/
|
|
478
398
|
FindUseEntity(self: GM, ply: Player, defaultEnt: Entity): Entity;
|
|
479
|
-
}
|
|
480
399
|
|
|
481
|
-
interface GM {
|
|
482
400
|
/**
|
|
483
401
|
* Runs when user cancels/finishes typing.
|
|
484
402
|
* @realm client
|
|
485
403
|
* @source https://wiki.facepunch.com/gmod/GM:FinishChat
|
|
486
404
|
*/
|
|
487
405
|
FinishChat(self: GM): void;
|
|
488
|
-
}
|
|
489
406
|
|
|
490
|
-
interface GM {
|
|
491
407
|
/**
|
|
492
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.
|
|
493
409
|
*
|
|
@@ -497,9 +413,7 @@ interface GM {
|
|
|
497
413
|
* @source https://wiki.facepunch.com/gmod/GM:FinishMove
|
|
498
414
|
*/
|
|
499
415
|
FinishMove(self: GM, ply: Player, mv: CMoveData): boolean;
|
|
500
|
-
}
|
|
501
416
|
|
|
502
|
-
interface GM {
|
|
503
417
|
/**
|
|
504
418
|
* Called to allow override of the default Derma skin for all panels.
|
|
505
419
|
*
|
|
@@ -512,9 +426,7 @@ interface GM {
|
|
|
512
426
|
* @source https://wiki.facepunch.com/gmod/GM:ForceDermaSkin
|
|
513
427
|
*/
|
|
514
428
|
ForceDermaSkin(self: GM): string;
|
|
515
|
-
}
|
|
516
429
|
|
|
517
|
-
interface GM {
|
|
518
430
|
/**
|
|
519
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).
|
|
520
432
|
*
|
|
@@ -524,9 +436,7 @@ interface GM {
|
|
|
524
436
|
* @source https://wiki.facepunch.com/gmod/GM:GUIMouseDoublePressed
|
|
525
437
|
*/
|
|
526
438
|
GUIMouseDoublePressed(self: GM, mouseCode: number, aimVector: Vector): void;
|
|
527
|
-
}
|
|
528
439
|
|
|
529
|
-
interface GM {
|
|
530
440
|
/**
|
|
531
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).
|
|
532
442
|
*
|
|
@@ -536,27 +446,21 @@ interface GM {
|
|
|
536
446
|
* @source https://wiki.facepunch.com/gmod/GM:GUIMousePressed
|
|
537
447
|
*/
|
|
538
448
|
GUIMousePressed(self: GM, mouseCode: number, aimVector: Vector): void;
|
|
539
|
-
}
|
|
540
449
|
|
|
541
|
-
interface GM {
|
|
542
450
|
/**
|
|
543
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).
|
|
544
452
|
* @realm client
|
|
545
453
|
* @source https://wiki.facepunch.com/gmod/GM:GUIMouseReleased
|
|
546
454
|
*/
|
|
547
455
|
GUIMouseReleased(self: GM, mouseCode: number, aimVector: Vector): void;
|
|
548
|
-
}
|
|
549
456
|
|
|
550
|
-
interface GM {
|
|
551
457
|
/**
|
|
552
458
|
* Called when game content has been changed, for example an addon or a mountable game was (un)mounted.
|
|
553
459
|
* @realm shared and menu
|
|
554
460
|
* @source https://wiki.facepunch.com/gmod/GM:GameContentChanged
|
|
555
461
|
*/
|
|
556
462
|
GameContentChanged(self: GM): void;
|
|
557
|
-
}
|
|
558
463
|
|
|
559
|
-
interface GM {
|
|
560
464
|
/**
|
|
561
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)
|
|
562
466
|
*
|
|
@@ -564,18 +468,14 @@ interface GM {
|
|
|
564
468
|
* @source https://wiki.facepunch.com/gmod/GM:GetDeathNoticeEntityName
|
|
565
469
|
*/
|
|
566
470
|
GetDeathNoticeEntityName(self: GM, name: string | Entity): string;
|
|
567
|
-
}
|
|
568
471
|
|
|
569
|
-
interface GM {
|
|
570
472
|
/**
|
|
571
473
|
* Called when a player takes damage from falling, allows to override the damage.
|
|
572
474
|
* @realm server
|
|
573
475
|
* @source https://wiki.facepunch.com/gmod/GM:GetFallDamage
|
|
574
476
|
*/
|
|
575
477
|
GetFallDamage(self: GM, ply: Player, speed: number): number;
|
|
576
|
-
}
|
|
577
478
|
|
|
578
|
-
interface GM {
|
|
579
479
|
/**
|
|
580
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.
|
|
581
481
|
*
|
|
@@ -588,18 +488,14 @@ interface GM {
|
|
|
588
488
|
* @source https://wiki.facepunch.com/gmod/GM:GetGameDescription
|
|
589
489
|
*/
|
|
590
490
|
GetGameDescription(self: GM): string;
|
|
591
|
-
}
|
|
592
491
|
|
|
593
|
-
interface GM {
|
|
594
492
|
/**
|
|
595
493
|
* Allows you to modify the Source Engine's motion blur shaders.
|
|
596
494
|
* @realm client
|
|
597
495
|
* @source https://wiki.facepunch.com/gmod/GM:GetMotionBlurValues
|
|
598
496
|
*/
|
|
599
497
|
GetMotionBlurValues(self: GM, horizontal: number, vertical: number, forward: number, rotational: number): (number, number, number, number);
|
|
600
|
-
}
|
|
601
498
|
|
|
602
|
-
interface GM {
|
|
603
499
|
/**
|
|
604
500
|
* Called to determine preferred carry angles for the entity. It works for both, +use pickup and gravity gun pickup.
|
|
605
501
|
*
|
|
@@ -613,36 +509,28 @@ interface GM {
|
|
|
613
509
|
* @source https://wiki.facepunch.com/gmod/GM:GetPreferredCarryAngles
|
|
614
510
|
*/
|
|
615
511
|
GetPreferredCarryAngles(self: GM, ent: Entity, ply: Player): Angle;
|
|
616
|
-
}
|
|
617
512
|
|
|
618
|
-
interface GM {
|
|
619
513
|
/**
|
|
620
514
|
* Returns the color for the given entity's team. This is used in chat and deathnotice text.
|
|
621
515
|
* @realm client
|
|
622
516
|
* @source https://wiki.facepunch.com/gmod/GM:GetTeamColor
|
|
623
517
|
*/
|
|
624
518
|
GetTeamColor(self: GM, ent: Entity): Color;
|
|
625
|
-
}
|
|
626
519
|
|
|
627
|
-
interface GM {
|
|
628
520
|
/**
|
|
629
521
|
* Returns the team color for the given team index.
|
|
630
522
|
* @realm client
|
|
631
523
|
* @source https://wiki.facepunch.com/gmod/GM:GetTeamNumColor
|
|
632
524
|
*/
|
|
633
525
|
GetTeamNumColor(self: GM, team: number): Color;
|
|
634
|
-
}
|
|
635
526
|
|
|
636
|
-
interface GM {
|
|
637
527
|
/**
|
|
638
528
|
* Override this hook to disable/change ear-grabbing in your gamemode. By default, it is not called anywhere on the server.
|
|
639
529
|
* @realm shared
|
|
640
530
|
* @source https://wiki.facepunch.com/gmod/GM:GrabEarAnimation
|
|
641
531
|
*/
|
|
642
532
|
GrabEarAnimation(self: GM, ply: Player): void;
|
|
643
|
-
}
|
|
644
533
|
|
|
645
|
-
interface GM {
|
|
646
534
|
/**
|
|
647
535
|
* Called when an entity is released by a gravity gun.
|
|
648
536
|
*
|
|
@@ -652,9 +540,7 @@ interface GM {
|
|
|
652
540
|
* @source https://wiki.facepunch.com/gmod/GM:GravGunOnDropped
|
|
653
541
|
*/
|
|
654
542
|
GravGunOnDropped(self: GM, ply: Player, ent: Entity): void;
|
|
655
|
-
}
|
|
656
543
|
|
|
657
|
-
interface GM {
|
|
658
544
|
/**
|
|
659
545
|
* Called when an entity is picked up by a gravity gun.
|
|
660
546
|
*
|
|
@@ -665,9 +551,7 @@ interface GM {
|
|
|
665
551
|
* @source https://wiki.facepunch.com/gmod/GM:GravGunOnPickedUp
|
|
666
552
|
*/
|
|
667
553
|
GravGunOnPickedUp(self: GM, ply: Player, ent: Entity): void;
|
|
668
|
-
}
|
|
669
554
|
|
|
670
|
-
interface GM {
|
|
671
555
|
/**
|
|
672
556
|
* Called every tick to poll whether a player is allowed to pick up an entity with the gravity gun or not.
|
|
673
557
|
*
|
|
@@ -680,9 +564,7 @@ interface GM {
|
|
|
680
564
|
* @source https://wiki.facepunch.com/gmod/GM:GravGunPickupAllowed
|
|
681
565
|
*/
|
|
682
566
|
GravGunPickupAllowed(self: GM, ply: Player, ent: Entity): boolean;
|
|
683
|
-
}
|
|
684
567
|
|
|
685
|
-
interface GM {
|
|
686
568
|
/**
|
|
687
569
|
* Called when an entity is about to be punted with the gravity gun (primary fire).
|
|
688
570
|
*
|
|
@@ -692,27 +574,21 @@ interface GM {
|
|
|
692
574
|
* @source https://wiki.facepunch.com/gmod/GM:GravGunPunt
|
|
693
575
|
*/
|
|
694
576
|
GravGunPunt(self: GM, ply: Player, ent: Entity): boolean;
|
|
695
|
-
}
|
|
696
577
|
|
|
697
|
-
interface GM {
|
|
698
578
|
/**
|
|
699
579
|
* Called when the client has picked up ammo. Override to disable default HUD notification.
|
|
700
580
|
* @realm client
|
|
701
581
|
* @source https://wiki.facepunch.com/gmod/GM:HUDAmmoPickedUp
|
|
702
582
|
*/
|
|
703
583
|
HUDAmmoPickedUp(self: GM, itemName: string, amount: number): void;
|
|
704
|
-
}
|
|
705
584
|
|
|
706
|
-
interface GM {
|
|
707
585
|
/**
|
|
708
586
|
* Renders the HUD pick-up history. Override to hide default or draw your own HUD.
|
|
709
587
|
* @realm client
|
|
710
588
|
* @source https://wiki.facepunch.com/gmod/GM:HUDDrawPickupHistory
|
|
711
589
|
*/
|
|
712
590
|
HUDDrawPickupHistory(self: GM): void;
|
|
713
|
-
}
|
|
714
591
|
|
|
715
|
-
interface GM {
|
|
716
592
|
/**
|
|
717
593
|
* Called every frame to render the scoreboard.
|
|
718
594
|
*
|
|
@@ -725,27 +601,21 @@ interface GM {
|
|
|
725
601
|
* @source https://wiki.facepunch.com/gmod/GM:HUDDrawScoreBoard
|
|
726
602
|
*/
|
|
727
603
|
HUDDrawScoreBoard(self: GM): void;
|
|
728
|
-
}
|
|
729
604
|
|
|
730
|
-
interface GM {
|
|
731
605
|
/**
|
|
732
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.
|
|
733
607
|
* @realm client
|
|
734
608
|
* @source https://wiki.facepunch.com/gmod/GM:HUDDrawTargetID
|
|
735
609
|
*/
|
|
736
610
|
HUDDrawTargetID(self: GM): boolean;
|
|
737
|
-
}
|
|
738
611
|
|
|
739
|
-
interface GM {
|
|
740
612
|
/**
|
|
741
613
|
* Called when an item has been picked up. Override to disable the default HUD notification.
|
|
742
614
|
* @realm client
|
|
743
615
|
* @source https://wiki.facepunch.com/gmod/GM:HUDItemPickedUp
|
|
744
616
|
*/
|
|
745
617
|
HUDItemPickedUp(self: GM, itemName: string): void;
|
|
746
|
-
}
|
|
747
618
|
|
|
748
|
-
interface GM {
|
|
749
619
|
/**
|
|
750
620
|
* Called whenever the HUD should be drawn.
|
|
751
621
|
*
|
|
@@ -762,9 +632,7 @@ interface GM {
|
|
|
762
632
|
* @source https://wiki.facepunch.com/gmod/GM:HUDPaint
|
|
763
633
|
*/
|
|
764
634
|
HUDPaint(self: GM): void;
|
|
765
|
-
}
|
|
766
635
|
|
|
767
|
-
interface GM {
|
|
768
636
|
/**
|
|
769
637
|
* Called before [GM:HUDPaint](https://wiki.facepunch.com/gmod/GM:HUDPaint) when the HUD background is being drawn.
|
|
770
638
|
*
|
|
@@ -778,9 +646,7 @@ interface GM {
|
|
|
778
646
|
* @source https://wiki.facepunch.com/gmod/GM:HUDPaintBackground
|
|
779
647
|
*/
|
|
780
648
|
HUDPaintBackground(self: GM): void;
|
|
781
|
-
}
|
|
782
649
|
|
|
783
|
-
interface GM {
|
|
784
650
|
/**
|
|
785
651
|
* Called when the Gamemode is about to draw a given element on the client's HUD (heads-up display).
|
|
786
652
|
*
|
|
@@ -791,18 +657,14 @@ interface GM {
|
|
|
791
657
|
* @source https://wiki.facepunch.com/gmod/GM:HUDShouldDraw
|
|
792
658
|
*/
|
|
793
659
|
HUDShouldDraw(self: GM, name: string): boolean;
|
|
794
|
-
}
|
|
795
660
|
|
|
796
|
-
interface GM {
|
|
797
661
|
/**
|
|
798
662
|
* Called when a weapon has been picked up. Override to disable the default HUD notification.
|
|
799
663
|
* @realm client
|
|
800
664
|
* @source https://wiki.facepunch.com/gmod/GM:HUDWeaponPickedUp
|
|
801
665
|
*/
|
|
802
666
|
HUDWeaponPickedUp(self: GM, weapon: Weapon): void;
|
|
803
|
-
}
|
|
804
667
|
|
|
805
|
-
interface GM {
|
|
806
668
|
/**
|
|
807
669
|
* Called to handle player armor reduction, when player receives damage.
|
|
808
670
|
*
|
|
@@ -812,81 +674,63 @@ interface GM {
|
|
|
812
674
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerArmorReduction
|
|
813
675
|
*/
|
|
814
676
|
HandlePlayerArmorReduction(self: GM, ply: Player, dmginfo: CTakeDamageInfo): void;
|
|
815
|
-
}
|
|
816
677
|
|
|
817
|
-
interface GM {
|
|
818
678
|
/**
|
|
819
679
|
* Allows to override player driving animations.
|
|
820
680
|
* @realm shared
|
|
821
681
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerDriving
|
|
822
682
|
*/
|
|
823
683
|
HandlePlayerDriving(self: GM, ply: Player): boolean;
|
|
824
|
-
}
|
|
825
684
|
|
|
826
|
-
interface GM {
|
|
827
685
|
/**
|
|
828
686
|
* Allows to override player crouch animations.
|
|
829
687
|
* @realm shared
|
|
830
688
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerDucking
|
|
831
689
|
*/
|
|
832
690
|
HandlePlayerDucking(self: GM, ply: Player, velocity: Vector): boolean;
|
|
833
|
-
}
|
|
834
691
|
|
|
835
|
-
interface GM {
|
|
836
692
|
/**
|
|
837
693
|
* Called every frame by the player model animation system. Allows to override player jumping animations.
|
|
838
694
|
* @realm shared
|
|
839
695
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerJumping
|
|
840
696
|
*/
|
|
841
697
|
HandlePlayerJumping(self: GM, ply: Player, velocity: Vector): boolean;
|
|
842
|
-
}
|
|
843
698
|
|
|
844
|
-
interface GM {
|
|
845
699
|
/**
|
|
846
700
|
* Called every frame by the player model animation system. Allows to override player landing animations.
|
|
847
701
|
* @realm shared
|
|
848
702
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerLanding
|
|
849
703
|
*/
|
|
850
704
|
HandlePlayerLanding(self: GM, ply: Player, velocity: Vector, onGround: boolean): boolean;
|
|
851
|
-
}
|
|
852
705
|
|
|
853
|
-
interface GM {
|
|
854
706
|
/**
|
|
855
707
|
* Allows to override player noclip animations.
|
|
856
708
|
* @realm shared
|
|
857
709
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerNoClipping
|
|
858
710
|
*/
|
|
859
711
|
HandlePlayerNoClipping(self: GM, ply: Player, velocity: Vector): boolean;
|
|
860
|
-
}
|
|
861
712
|
|
|
862
|
-
interface GM {
|
|
863
713
|
/**
|
|
864
714
|
* Allows to override player swimming animations.
|
|
865
715
|
* @realm shared
|
|
866
716
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerSwimming
|
|
867
717
|
*/
|
|
868
718
|
HandlePlayerSwimming(self: GM, ply: Player, velocity: Vector): boolean;
|
|
869
|
-
}
|
|
870
719
|
|
|
871
|
-
interface GM {
|
|
872
720
|
/**
|
|
873
721
|
* Allows to override player flying ( in mid-air, not noclipping ) animations.
|
|
874
722
|
* @realm shared
|
|
875
723
|
* @source https://wiki.facepunch.com/gmod/GM:HandlePlayerVaulting
|
|
876
724
|
*/
|
|
877
725
|
HandlePlayerVaulting(self: GM, ply: Player, velocity: Vector): boolean;
|
|
878
|
-
}
|
|
879
726
|
|
|
880
|
-
interface GM {
|
|
881
727
|
/**
|
|
882
728
|
* Hides the team selection panel.
|
|
883
729
|
* @realm client
|
|
884
730
|
* @source https://wiki.facepunch.com/gmod/GM:HideTeam
|
|
885
731
|
*/
|
|
886
732
|
HideTeam(self: GM): void;
|
|
887
|
-
}
|
|
888
733
|
|
|
889
|
-
interface GM {
|
|
890
734
|
/**
|
|
891
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.
|
|
892
736
|
*
|
|
@@ -897,9 +741,7 @@ interface GM {
|
|
|
897
741
|
* @source https://wiki.facepunch.com/gmod/GM:InitPostEntity
|
|
898
742
|
*/
|
|
899
743
|
InitPostEntity(self: GM): void;
|
|
900
|
-
}
|
|
901
744
|
|
|
902
|
-
interface GM {
|
|
903
745
|
/**
|
|
904
746
|
* Called after the gamemode loads and starts.
|
|
905
747
|
*
|
|
@@ -908,27 +750,21 @@ interface GM {
|
|
|
908
750
|
* @source https://wiki.facepunch.com/gmod/GM:Initialize
|
|
909
751
|
*/
|
|
910
752
|
Initialize(self: GM): void;
|
|
911
|
-
}
|
|
912
753
|
|
|
913
|
-
interface GM {
|
|
914
754
|
/**
|
|
915
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.
|
|
916
756
|
* @realm client
|
|
917
757
|
* @source https://wiki.facepunch.com/gmod/GM:InputMouseApply
|
|
918
758
|
*/
|
|
919
759
|
InputMouseApply(self: GM, cmd: CUserCmd, x: number, y: number, ang: Angle): boolean;
|
|
920
|
-
}
|
|
921
760
|
|
|
922
|
-
interface GM {
|
|
923
761
|
/**
|
|
924
762
|
* Check if a player can spawn at a certain spawnpoint.
|
|
925
763
|
* @realm server
|
|
926
764
|
* @source https://wiki.facepunch.com/gmod/GM:IsSpawnpointSuitable
|
|
927
765
|
*/
|
|
928
766
|
IsSpawnpointSuitable(self: GM, ply: Player, spawnpoint: Entity, makeSuitable: boolean): boolean;
|
|
929
|
-
}
|
|
930
767
|
|
|
931
|
-
interface GM {
|
|
932
768
|
/**
|
|
933
769
|
* Called whenever a player pressed a key included within the IN keys.
|
|
934
770
|
*
|
|
@@ -944,9 +780,7 @@ interface GM {
|
|
|
944
780
|
* @source https://wiki.facepunch.com/gmod/GM:KeyPress
|
|
945
781
|
*/
|
|
946
782
|
KeyPress(self: GM, ply: Player, key: number): void;
|
|
947
|
-
}
|
|
948
783
|
|
|
949
|
-
interface GM {
|
|
950
784
|
/**
|
|
951
785
|
* Runs when a IN key was released by a player.
|
|
952
786
|
*
|
|
@@ -959,9 +793,7 @@ interface GM {
|
|
|
959
793
|
* @source https://wiki.facepunch.com/gmod/GM:KeyRelease
|
|
960
794
|
*/
|
|
961
795
|
KeyRelease(self: GM, ply: Player, key: number): void;
|
|
962
|
-
}
|
|
963
796
|
|
|
964
|
-
interface GM {
|
|
965
797
|
/**
|
|
966
798
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
967
799
|
* Called from `gm_load` when the game should load a map.
|
|
@@ -969,36 +801,28 @@ interface GM {
|
|
|
969
801
|
* @source https://wiki.facepunch.com/gmod/GM:LoadGModSave
|
|
970
802
|
*/
|
|
971
803
|
LoadGModSave(self: GM, data: string, map: string, timestamp: number): void;
|
|
972
|
-
}
|
|
973
804
|
|
|
974
|
-
interface GM {
|
|
975
805
|
/**
|
|
976
806
|
* Called while an addon from the Steam workshop is downloading. Used by default to update details on the fancy workshop download panel.
|
|
977
807
|
* @realm menu
|
|
978
808
|
* @source https://wiki.facepunch.com/gmod/GM:LoadGModSaveFailed
|
|
979
809
|
*/
|
|
980
810
|
LoadGModSaveFailed(self: GM, reason: string, workshopid: string): void;
|
|
981
|
-
}
|
|
982
811
|
|
|
983
|
-
interface GM {
|
|
984
812
|
/**
|
|
985
813
|
* Called when `menu.lua` has finished loading.
|
|
986
814
|
* @realm menu
|
|
987
815
|
* @source https://wiki.facepunch.com/gmod/GM:MenuStart
|
|
988
816
|
*/
|
|
989
817
|
MenuStart(self: GM): void;
|
|
990
|
-
}
|
|
991
818
|
|
|
992
|
-
interface GM {
|
|
993
819
|
/**
|
|
994
820
|
* Override this gamemode function to disable mouth movement when talking on voice chat. By default, it is not called anywhere on the server.
|
|
995
821
|
* @realm shared
|
|
996
822
|
* @source https://wiki.facepunch.com/gmod/GM:MouthMoveAnimation
|
|
997
823
|
*/
|
|
998
824
|
MouthMoveAnimation(self: GM, ply: Player): void;
|
|
999
|
-
}
|
|
1000
825
|
|
|
1001
|
-
interface GM {
|
|
1002
826
|
/**
|
|
1003
827
|
* The Move hook is called for you to manipulate the player's MoveData.
|
|
1004
828
|
*
|
|
@@ -1014,27 +838,21 @@ interface GM {
|
|
|
1014
838
|
* @source https://wiki.facepunch.com/gmod/GM:Move
|
|
1015
839
|
*/
|
|
1016
840
|
Move(self: GM, ply: Player, mv: CMoveData): boolean;
|
|
1017
|
-
}
|
|
1018
841
|
|
|
1019
|
-
interface GM {
|
|
1020
842
|
/**
|
|
1021
843
|
* Returning true in this hook will cause it to render depth buffers defined with [render.GetResolvedFullFrameDepth](https://wiki.facepunch.com/gmod/render.GetResolvedFullFrameDepth).
|
|
1022
844
|
* @realm client
|
|
1023
845
|
* @source https://wiki.facepunch.com/gmod/GM:NeedsDepthPass
|
|
1024
846
|
*/
|
|
1025
847
|
NeedsDepthPass(self: GM): boolean;
|
|
1026
|
-
}
|
|
1027
848
|
|
|
1028
|
-
interface GM {
|
|
1029
849
|
/**
|
|
1030
850
|
* Called when an entity has been created over the network.
|
|
1031
851
|
* @realm client
|
|
1032
852
|
* @source https://wiki.facepunch.com/gmod/GM:NetworkEntityCreated
|
|
1033
853
|
*/
|
|
1034
854
|
NetworkEntityCreated(self: GM, ent: Entity): void;
|
|
1035
|
-
}
|
|
1036
855
|
|
|
1037
|
-
interface GM {
|
|
1038
856
|
/**
|
|
1039
857
|
* Called when a player's SteamID has been validated by Steam.
|
|
1040
858
|
*
|
|
@@ -1047,9 +865,7 @@ interface GM {
|
|
|
1047
865
|
* @source https://wiki.facepunch.com/gmod/GM:NetworkIDValidated
|
|
1048
866
|
*/
|
|
1049
867
|
NetworkIDValidated(self: GM, name: string, steamID: string, ownerID: string): void;
|
|
1050
|
-
}
|
|
1051
868
|
|
|
1052
|
-
interface GM {
|
|
1053
869
|
/**
|
|
1054
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").
|
|
1055
871
|
*
|
|
@@ -1062,18 +878,14 @@ interface GM {
|
|
|
1062
878
|
* @source https://wiki.facepunch.com/gmod/GM:NotifyShouldTransmit
|
|
1063
879
|
*/
|
|
1064
880
|
NotifyShouldTransmit(self: GM, entity: Entity, shouldtransmit: boolean): void;
|
|
1065
|
-
}
|
|
1066
881
|
|
|
1067
|
-
interface GM {
|
|
1068
882
|
/**
|
|
1069
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.
|
|
1070
884
|
* @realm client
|
|
1071
885
|
* @source https://wiki.facepunch.com/gmod/GM:OnAchievementAchieved
|
|
1072
886
|
*/
|
|
1073
887
|
OnAchievementAchieved(self: GM, ply: Player, achievement: number): void;
|
|
1074
|
-
}
|
|
1075
888
|
|
|
1076
|
-
interface GM {
|
|
1077
889
|
/**
|
|
1078
890
|
* Called when the local player presses TAB while having their chatbox opened.
|
|
1079
891
|
*
|
|
@@ -1084,18 +896,14 @@ interface GM {
|
|
|
1084
896
|
* @source https://wiki.facepunch.com/gmod/GM:OnChatTab
|
|
1085
897
|
*/
|
|
1086
898
|
OnChatTab(self: GM, text: string): string;
|
|
1087
|
-
}
|
|
1088
899
|
|
|
1089
|
-
interface GM {
|
|
1090
900
|
/**
|
|
1091
901
|
* Called when the player cleans up something.
|
|
1092
902
|
* @realm client
|
|
1093
903
|
* @source https://wiki.facepunch.com/gmod/GM:OnCleanup
|
|
1094
904
|
*/
|
|
1095
905
|
OnCleanup(self: GM, name: string): boolean;
|
|
1096
|
-
}
|
|
1097
906
|
|
|
1098
|
-
interface GM {
|
|
1099
907
|
/**
|
|
1100
908
|
* Called on the server when a Lua error occurs on a client and is sent to the server.
|
|
1101
909
|
*
|
|
@@ -1113,18 +921,14 @@ interface GM {
|
|
|
1113
921
|
* @source https://wiki.facepunch.com/gmod/GM:OnClientLuaError
|
|
1114
922
|
*/
|
|
1115
923
|
OnClientLuaError(self: GM, error: string, ply: Player, stack: table, name: string): void;
|
|
1116
|
-
}
|
|
1117
924
|
|
|
1118
|
-
interface GM {
|
|
1119
925
|
/**
|
|
1120
926
|
* Called when a caption/subtitle has been emitted to the closed caption box.
|
|
1121
927
|
* @realm client
|
|
1122
928
|
* @source https://wiki.facepunch.com/gmod/GM:OnCloseCaptionEmit
|
|
1123
929
|
*/
|
|
1124
930
|
OnCloseCaptionEmit(self: GM, soundScript: string, duration: number, fromPlayer: boolean, fullText: string): boolean;
|
|
1125
|
-
}
|
|
1126
931
|
|
|
1127
|
-
interface GM {
|
|
1128
932
|
/**
|
|
1129
933
|
* Called when the context menu keybind (+menu_context) is released, which by default is C.
|
|
1130
934
|
*
|
|
@@ -1136,9 +940,7 @@ interface GM {
|
|
|
1136
940
|
* @source https://wiki.facepunch.com/gmod/GM:OnContextMenuClose
|
|
1137
941
|
*/
|
|
1138
942
|
OnContextMenuClose(self: GM): void;
|
|
1139
|
-
}
|
|
1140
943
|
|
|
1141
|
-
interface GM {
|
|
1142
944
|
/**
|
|
1143
945
|
* Called when the context menu keybind (`+menu_context`) is pressed, which by default is C.
|
|
1144
946
|
*
|
|
@@ -1148,27 +950,21 @@ interface GM {
|
|
|
1148
950
|
* @source https://wiki.facepunch.com/gmod/GM:OnContextMenuOpen
|
|
1149
951
|
*/
|
|
1150
952
|
OnContextMenuOpen(self: GM): void;
|
|
1151
|
-
}
|
|
1152
953
|
|
|
1153
|
-
interface GM {
|
|
1154
954
|
/**
|
|
1155
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.
|
|
1156
956
|
* @realm shared
|
|
1157
957
|
* @source https://wiki.facepunch.com/gmod/GM:OnCrazyPhysics
|
|
1158
958
|
*/
|
|
1159
959
|
OnCrazyPhysics(self: GM, ent: Entity, physobj: PhysObj): void;
|
|
1160
|
-
}
|
|
1161
960
|
|
|
1162
|
-
interface GM {
|
|
1163
961
|
/**
|
|
1164
962
|
* Called when a player has been hurt by an explosion. Override to disable default sound effect.
|
|
1165
963
|
* @realm server
|
|
1166
964
|
* @source https://wiki.facepunch.com/gmod/GM:OnDamagedByExplosion
|
|
1167
965
|
*/
|
|
1168
966
|
OnDamagedByExplosion(self: GM, ply: Player, dmginfo: CTakeDamageInfo): void;
|
|
1169
|
-
}
|
|
1170
967
|
|
|
1171
|
-
interface GM {
|
|
1172
968
|
/**
|
|
1173
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.
|
|
1174
970
|
*
|
|
@@ -1179,9 +975,7 @@ interface GM {
|
|
|
1179
975
|
* @source https://wiki.facepunch.com/gmod/GM:OnEntityCreated
|
|
1180
976
|
*/
|
|
1181
977
|
OnEntityCreated(self: GM, entity: Entity): void;
|
|
1182
|
-
}
|
|
1183
978
|
|
|
1184
|
-
interface GM {
|
|
1185
979
|
/**
|
|
1186
980
|
* Called when the [Entity:WaterLevel](https://wiki.facepunch.com/gmod/Entity:WaterLevel) of an entity is changed.
|
|
1187
981
|
*
|
|
@@ -1200,9 +994,7 @@ interface GM {
|
|
|
1200
994
|
* @source https://wiki.facepunch.com/gmod/GM:OnEntityWaterLevelChanged
|
|
1201
995
|
*/
|
|
1202
996
|
OnEntityWaterLevelChanged(self: GM, entity: Entity, old: number, _new: number): void;
|
|
1203
|
-
}
|
|
1204
997
|
|
|
1205
|
-
interface GM {
|
|
1206
998
|
/**
|
|
1207
999
|
* Called when the gamemode is loaded. [gmod.GetGamemode](https://wiki.facepunch.com/gmod/gmod.GetGamemode) will be functional at this point.
|
|
1208
1000
|
*
|
|
@@ -1212,9 +1004,7 @@ interface GM {
|
|
|
1212
1004
|
* @source https://wiki.facepunch.com/gmod/GM:OnGamemodeLoaded
|
|
1213
1005
|
*/
|
|
1214
1006
|
OnGamemodeLoaded(self: GM): void;
|
|
1215
|
-
}
|
|
1216
1007
|
|
|
1217
|
-
interface GM {
|
|
1218
1008
|
/**
|
|
1219
1009
|
* Called when a Lua error occurs.
|
|
1220
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)
|
|
@@ -1225,9 +1015,7 @@ interface GM {
|
|
|
1225
1015
|
* @source https://wiki.facepunch.com/gmod/GM:OnLuaError
|
|
1226
1016
|
*/
|
|
1227
1017
|
OnLuaError(self: GM, error: string, realm: string, stack: table, name: string, id: string): void;
|
|
1228
|
-
}
|
|
1229
1018
|
|
|
1230
|
-
interface GM {
|
|
1231
1019
|
/**
|
|
1232
1020
|
* Called whenever an NPC drops an item upon its death, such as health kits, armor batteries, etc.
|
|
1233
1021
|
*
|
|
@@ -1240,18 +1028,14 @@ interface GM {
|
|
|
1240
1028
|
* @source https://wiki.facepunch.com/gmod/GM:OnNPCDropItem
|
|
1241
1029
|
*/
|
|
1242
1030
|
OnNPCDropItem(self: GM, npc: NPC, item: Entity): void;
|
|
1243
|
-
}
|
|
1244
1031
|
|
|
1245
|
-
interface GM {
|
|
1246
1032
|
/**
|
|
1247
1033
|
* Called whenever an NPC is killed.
|
|
1248
1034
|
* @realm server
|
|
1249
1035
|
* @source https://wiki.facepunch.com/gmod/GM:OnNPCKilled
|
|
1250
1036
|
*/
|
|
1251
1037
|
OnNPCKilled(self: GM, npc: NPC, attacker: Entity, inflictor: Entity): void;
|
|
1252
|
-
}
|
|
1253
1038
|
|
|
1254
|
-
interface GM {
|
|
1255
1039
|
/**
|
|
1256
1040
|
* Called when a Addon Conflict occurs, only works in the Menu realm.
|
|
1257
1041
|
*
|
|
@@ -1259,9 +1043,7 @@ interface GM {
|
|
|
1259
1043
|
* @source https://wiki.facepunch.com/gmod/GM:OnNotifyAddonConflict
|
|
1260
1044
|
*/
|
|
1261
1045
|
OnNotifyAddonConflict(self: GM, addon1: string, addon2: string, fileName: string): void;
|
|
1262
|
-
}
|
|
1263
1046
|
|
|
1264
|
-
interface GM {
|
|
1265
1047
|
/**
|
|
1266
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.
|
|
1267
1049
|
*
|
|
@@ -1269,9 +1051,7 @@ interface GM {
|
|
|
1269
1051
|
* @source https://wiki.facepunch.com/gmod/GM:OnPauseMenuBlockedTooManyTimes
|
|
1270
1052
|
*/
|
|
1271
1053
|
OnPauseMenuBlockedTooManyTimes(self: GM): void;
|
|
1272
|
-
}
|
|
1273
1054
|
|
|
1274
|
-
interface GM {
|
|
1275
1055
|
/**
|
|
1276
1056
|
* Called when the pause menu is attempting to be opened. Allows you to prevent the main menu from being opened that time.
|
|
1277
1057
|
*
|
|
@@ -1281,9 +1061,7 @@ interface GM {
|
|
|
1281
1061
|
* @source https://wiki.facepunch.com/gmod/GM:OnPauseMenuShow
|
|
1282
1062
|
*/
|
|
1283
1063
|
OnPauseMenuShow(self: GM): boolean;
|
|
1284
|
-
}
|
|
1285
1064
|
|
|
1286
|
-
interface GM {
|
|
1287
1065
|
/**
|
|
1288
1066
|
* Called when a permission gets Granted or Revoked.
|
|
1289
1067
|
*
|
|
@@ -1291,9 +1069,7 @@ interface GM {
|
|
|
1291
1069
|
* @source https://wiki.facepunch.com/gmod/GM:OnPermissionsChanged
|
|
1292
1070
|
*/
|
|
1293
1071
|
OnPermissionsChanged(self: GM): void;
|
|
1294
|
-
}
|
|
1295
1072
|
|
|
1296
|
-
interface GM {
|
|
1297
1073
|
/**
|
|
1298
1074
|
* Called when a player freezes an entity with the physgun.
|
|
1299
1075
|
*
|
|
@@ -1301,9 +1077,7 @@ interface GM {
|
|
|
1301
1077
|
* @source https://wiki.facepunch.com/gmod/GM:OnPhysgunFreeze
|
|
1302
1078
|
*/
|
|
1303
1079
|
OnPhysgunFreeze(self: GM, weapon: Entity, physobj: PhysObj, ent: Entity, ply: Player): boolean;
|
|
1304
|
-
}
|
|
1305
1080
|
|
|
1306
|
-
interface GM {
|
|
1307
1081
|
/**
|
|
1308
1082
|
* Called to when a player has successfully picked up an entity with their Physics Gun.
|
|
1309
1083
|
*
|
|
@@ -1318,18 +1092,14 @@ interface GM {
|
|
|
1318
1092
|
* @source https://wiki.facepunch.com/gmod/GM:OnPhysgunPickup
|
|
1319
1093
|
*/
|
|
1320
1094
|
OnPhysgunPickup(self: GM, ply: Player, ent: Entity): void;
|
|
1321
|
-
}
|
|
1322
1095
|
|
|
1323
|
-
interface GM {
|
|
1324
1096
|
/**
|
|
1325
1097
|
* Called when a player reloads with the physgun. Override this to disable default unfreezing behavior.
|
|
1326
1098
|
* @realm server
|
|
1327
1099
|
* @source https://wiki.facepunch.com/gmod/GM:OnPhysgunReload
|
|
1328
1100
|
*/
|
|
1329
1101
|
OnPhysgunReload(self: GM, physgun: Weapon, ply: Player): boolean;
|
|
1330
|
-
}
|
|
1331
1102
|
|
|
1332
|
-
interface GM {
|
|
1333
1103
|
/**
|
|
1334
1104
|
* Called when a player has changed team using [GM:PlayerJoinTeam](https://wiki.facepunch.com/gmod/GM:PlayerJoinTeam).
|
|
1335
1105
|
*
|
|
@@ -1341,9 +1111,7 @@ interface GM {
|
|
|
1341
1111
|
* @deprecated Use GM:PlayerChangedTeam instead, which works for every Player:SetTeam call.
|
|
1342
1112
|
*/
|
|
1343
1113
|
OnPlayerChangedTeam(self: GM, ply: Player, oldTeam: number, newTeam: number): void;
|
|
1344
|
-
}
|
|
1345
1114
|
|
|
1346
|
-
interface GM {
|
|
1347
1115
|
/**
|
|
1348
1116
|
* Called whenever a player sends a chat message. For the serverside equivalent, see [GM:PlayerSay](https://wiki.facepunch.com/gmod/GM:PlayerSay).
|
|
1349
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.
|
|
@@ -1353,36 +1121,28 @@ interface GM {
|
|
|
1353
1121
|
* @source https://wiki.facepunch.com/gmod/GM:OnPlayerChat
|
|
1354
1122
|
*/
|
|
1355
1123
|
OnPlayerChat(self: GM, ply: Player, text: string, teamChat: boolean, isDead: boolean): boolean;
|
|
1356
|
-
}
|
|
1357
1124
|
|
|
1358
|
-
interface GM {
|
|
1359
1125
|
/**
|
|
1360
1126
|
* Called when a player makes contact with the ground after a jump or a fall.
|
|
1361
1127
|
* @realm shared
|
|
1362
1128
|
* @source https://wiki.facepunch.com/gmod/GM:OnPlayerHitGround
|
|
1363
1129
|
*/
|
|
1364
1130
|
OnPlayerHitGround(self: GM, player: Entity, inWater: boolean, onFloater: boolean, speed: number): boolean;
|
|
1365
|
-
}
|
|
1366
1131
|
|
|
1367
|
-
interface GM {
|
|
1368
1132
|
/**
|
|
1369
1133
|
* Called when a player jumps.
|
|
1370
1134
|
* @realm shared
|
|
1371
1135
|
* @source https://wiki.facepunch.com/gmod/GM:OnPlayerJump
|
|
1372
1136
|
*/
|
|
1373
1137
|
OnPlayerJump(self: GM, player: Entity, speed: number): void;
|
|
1374
|
-
}
|
|
1375
1138
|
|
|
1376
|
-
interface GM {
|
|
1377
1139
|
/**
|
|
1378
1140
|
* Called when a player +use drops an entity.
|
|
1379
1141
|
* @realm server
|
|
1380
1142
|
* @source https://wiki.facepunch.com/gmod/GM:OnPlayerPhysicsDrop
|
|
1381
1143
|
*/
|
|
1382
1144
|
OnPlayerPhysicsDrop(self: GM, ply: Player, ent: Entity, thrown: boolean): void;
|
|
1383
|
-
}
|
|
1384
1145
|
|
|
1385
|
-
interface GM {
|
|
1386
1146
|
/**
|
|
1387
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).
|
|
1388
1148
|
*
|
|
@@ -1393,9 +1153,7 @@ interface GM {
|
|
|
1393
1153
|
* @source https://wiki.facepunch.com/gmod/GM:OnPlayerPhysicsPickup
|
|
1394
1154
|
*/
|
|
1395
1155
|
OnPlayerPhysicsPickup(self: GM, ply: Player, ent: Entity): void;
|
|
1396
|
-
}
|
|
1397
1156
|
|
|
1398
|
-
interface GM {
|
|
1399
1157
|
/**
|
|
1400
1158
|
* Called when gamemode has been reloaded by auto refresh.
|
|
1401
1159
|
*
|
|
@@ -1406,9 +1164,7 @@ interface GM {
|
|
|
1406
1164
|
* @source https://wiki.facepunch.com/gmod/GM:OnReloaded
|
|
1407
1165
|
*/
|
|
1408
1166
|
OnReloaded(self: GM): void;
|
|
1409
|
-
}
|
|
1410
1167
|
|
|
1411
|
-
interface GM {
|
|
1412
1168
|
/**
|
|
1413
1169
|
* Called when the player's screen resolution of the game changes. This also called when changing MSAA settings.
|
|
1414
1170
|
*
|
|
@@ -1418,27 +1174,21 @@ interface GM {
|
|
|
1418
1174
|
* @source https://wiki.facepunch.com/gmod/GM:OnScreenSizeChanged
|
|
1419
1175
|
*/
|
|
1420
1176
|
OnScreenSizeChanged(self: GM, oldWidth: number, oldHeight: number, newWidth: number, newHeight: number): void;
|
|
1421
|
-
}
|
|
1422
1177
|
|
|
1423
|
-
interface GM {
|
|
1424
1178
|
/**
|
|
1425
1179
|
* Called when a player releases the `+menu` bind on their keyboard, which is bound to Q by default.
|
|
1426
1180
|
* @realm client
|
|
1427
1181
|
* @source https://wiki.facepunch.com/gmod/GM:OnSpawnMenuClose
|
|
1428
1182
|
*/
|
|
1429
1183
|
OnSpawnMenuClose(self: GM): void;
|
|
1430
|
-
}
|
|
1431
1184
|
|
|
1432
|
-
interface GM {
|
|
1433
1185
|
/**
|
|
1434
1186
|
* Called when a player presses the `+menu` bind on their keyboard, which is bound to Q by default.
|
|
1435
1187
|
* @realm client
|
|
1436
1188
|
* @source https://wiki.facepunch.com/gmod/GM:OnSpawnMenuOpen
|
|
1437
1189
|
*/
|
|
1438
1190
|
OnSpawnMenuOpen(self: GM): void;
|
|
1439
|
-
}
|
|
1440
1191
|
|
|
1441
|
-
interface GM {
|
|
1442
1192
|
/**
|
|
1443
1193
|
* Called when a [DTextEntry](https://wiki.facepunch.com/gmod/DTextEntry) gets focus.
|
|
1444
1194
|
*
|
|
@@ -1448,27 +1198,21 @@ interface GM {
|
|
|
1448
1198
|
* @source https://wiki.facepunch.com/gmod/GM:OnTextEntryGetFocus
|
|
1449
1199
|
*/
|
|
1450
1200
|
OnTextEntryGetFocus(self: GM, panel: Panel): void;
|
|
1451
|
-
}
|
|
1452
1201
|
|
|
1453
|
-
interface GM {
|
|
1454
1202
|
/**
|
|
1455
1203
|
* Called when a [DTextEntry](https://wiki.facepunch.com/gmod/DTextEntry) loses focus.
|
|
1456
1204
|
* @realm client
|
|
1457
1205
|
* @source https://wiki.facepunch.com/gmod/GM:OnTextEntryLoseFocus
|
|
1458
1206
|
*/
|
|
1459
1207
|
OnTextEntryLoseFocus(self: GM, panel: Panel): void;
|
|
1460
|
-
}
|
|
1461
1208
|
|
|
1462
|
-
interface GM {
|
|
1463
1209
|
/**
|
|
1464
1210
|
* Called when the player undoes something.
|
|
1465
1211
|
* @realm client
|
|
1466
1212
|
* @source https://wiki.facepunch.com/gmod/GM:OnUndo
|
|
1467
1213
|
*/
|
|
1468
1214
|
OnUndo(self: GM, name: string, customText: string): boolean;
|
|
1469
|
-
}
|
|
1470
1215
|
|
|
1471
|
-
interface GM {
|
|
1472
1216
|
/**
|
|
1473
1217
|
* Called when the player changes their weapon to another one - and their viewmodel model changes.
|
|
1474
1218
|
*
|
|
@@ -1478,9 +1222,7 @@ interface GM {
|
|
|
1478
1222
|
* @source https://wiki.facepunch.com/gmod/GM:OnViewModelChanged
|
|
1479
1223
|
*/
|
|
1480
1224
|
OnViewModelChanged(self: GM, viewmodel: Entity, oldModel: string, newModel: string): void;
|
|
1481
|
-
}
|
|
1482
1225
|
|
|
1483
|
-
interface GM {
|
|
1484
1226
|
/**
|
|
1485
1227
|
* Called when a player drops an entity with the Physgun.
|
|
1486
1228
|
*
|
|
@@ -1490,9 +1232,7 @@ interface GM {
|
|
|
1490
1232
|
* @source https://wiki.facepunch.com/gmod/GM:PhysgunDrop
|
|
1491
1233
|
*/
|
|
1492
1234
|
PhysgunDrop(self: GM, player: Player, entity: Entity): void;
|
|
1493
|
-
}
|
|
1494
1235
|
|
|
1495
|
-
interface GM {
|
|
1496
1236
|
/**
|
|
1497
1237
|
* Called to determine if a player should be able to pick up an entity with the Physics Gun.
|
|
1498
1238
|
*
|
|
@@ -1505,9 +1245,7 @@ interface GM {
|
|
|
1505
1245
|
* @source https://wiki.facepunch.com/gmod/GM:PhysgunPickup
|
|
1506
1246
|
*/
|
|
1507
1247
|
PhysgunPickup(self: GM, player: Player, entity: Entity): boolean;
|
|
1508
|
-
}
|
|
1509
1248
|
|
|
1510
|
-
interface GM {
|
|
1511
1249
|
/**
|
|
1512
1250
|
* Called after player's reserve ammo count changes.
|
|
1513
1251
|
*
|
|
@@ -1515,9 +1253,7 @@ interface GM {
|
|
|
1515
1253
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerAmmoChanged
|
|
1516
1254
|
*/
|
|
1517
1255
|
PlayerAmmoChanged(self: GM, ply: Player, ammoID: number, oldCount: number, newCount: number): void;
|
|
1518
|
-
}
|
|
1519
1256
|
|
|
1520
|
-
interface GM {
|
|
1521
1257
|
/**
|
|
1522
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.
|
|
1523
1259
|
*
|
|
@@ -1527,9 +1263,7 @@ interface GM {
|
|
|
1527
1263
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerAuthed
|
|
1528
1264
|
*/
|
|
1529
1265
|
PlayerAuthed(self: GM, ply: Player, steamid: string, uniqueid: string): void;
|
|
1530
|
-
}
|
|
1531
1266
|
|
|
1532
|
-
interface GM {
|
|
1533
1267
|
/**
|
|
1534
1268
|
* Runs when a bind has been pressed. Allows to block commands.
|
|
1535
1269
|
*
|
|
@@ -1546,9 +1280,7 @@ interface GM {
|
|
|
1546
1280
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerBindPress
|
|
1547
1281
|
*/
|
|
1548
1282
|
PlayerBindPress(self: GM, ply: Player, bind: string, pressed: boolean, code: number): boolean;
|
|
1549
|
-
}
|
|
1550
1283
|
|
|
1551
|
-
interface GM {
|
|
1552
1284
|
/**
|
|
1553
1285
|
* Called when a player presses a button.
|
|
1554
1286
|
*
|
|
@@ -1561,9 +1293,7 @@ interface GM {
|
|
|
1561
1293
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerButtonDown
|
|
1562
1294
|
*/
|
|
1563
1295
|
PlayerButtonDown(self: GM, ply: Player, button: BUTTON_CODE): void;
|
|
1564
|
-
}
|
|
1565
1296
|
|
|
1566
|
-
interface GM {
|
|
1567
1297
|
/**
|
|
1568
1298
|
* Called when a player releases a button.
|
|
1569
1299
|
*
|
|
@@ -1576,9 +1306,7 @@ interface GM {
|
|
|
1576
1306
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerButtonUp
|
|
1577
1307
|
*/
|
|
1578
1308
|
PlayerButtonUp(self: GM, ply: Player, button: BUTTON_CODE): void;
|
|
1579
|
-
}
|
|
1580
1309
|
|
|
1581
|
-
interface GM {
|
|
1582
1310
|
/**
|
|
1583
1311
|
* Decides whether a player can hear another player using voice chat.
|
|
1584
1312
|
*
|
|
@@ -1590,9 +1318,7 @@ interface GM {
|
|
|
1590
1318
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerCanHearPlayersVoice
|
|
1591
1319
|
*/
|
|
1592
1320
|
PlayerCanHearPlayersVoice(self: GM, listener: Player, talker: Player): (boolean, boolean);
|
|
1593
|
-
}
|
|
1594
1321
|
|
|
1595
|
-
interface GM {
|
|
1596
1322
|
/**
|
|
1597
1323
|
* Returns whether or not a player is allowed to join a team
|
|
1598
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
|
|
@@ -1602,9 +1328,7 @@ interface GM {
|
|
|
1602
1328
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerCanJoinTeam
|
|
1603
1329
|
*/
|
|
1604
1330
|
PlayerCanJoinTeam(self: GM, ply: Player, team: number): boolean;
|
|
1605
|
-
}
|
|
1606
1331
|
|
|
1607
|
-
interface GM {
|
|
1608
1332
|
/**
|
|
1609
1333
|
* Returns whether or not a player is allowed to pick an item up. (ammo, health, armor)
|
|
1610
1334
|
*
|
|
@@ -1616,9 +1340,7 @@ interface GM {
|
|
|
1616
1340
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerCanPickupItem
|
|
1617
1341
|
*/
|
|
1618
1342
|
PlayerCanPickupItem(self: GM, ply: Player, item: Entity): boolean;
|
|
1619
|
-
}
|
|
1620
1343
|
|
|
1621
|
-
interface GM {
|
|
1622
1344
|
/**
|
|
1623
1345
|
* Returns whether or not a player is allowed to pick up a weapon.
|
|
1624
1346
|
*
|
|
@@ -1632,9 +1354,7 @@ interface GM {
|
|
|
1632
1354
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerCanPickupWeapon
|
|
1633
1355
|
*/
|
|
1634
1356
|
PlayerCanPickupWeapon(self: GM, ply: Player, weapon: Weapon): boolean;
|
|
1635
|
-
}
|
|
1636
1357
|
|
|
1637
|
-
interface GM {
|
|
1638
1358
|
/**
|
|
1639
1359
|
* Returns whether or not the player can see the other player's chat.
|
|
1640
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.
|
|
@@ -1643,9 +1363,7 @@ interface GM {
|
|
|
1643
1363
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerCanSeePlayersChat
|
|
1644
1364
|
*/
|
|
1645
1365
|
PlayerCanSeePlayersChat(self: GM, text: string, teamOnly: boolean, listener: Player, speaker: Player): boolean;
|
|
1646
|
-
}
|
|
1647
1366
|
|
|
1648
|
-
interface GM {
|
|
1649
1367
|
/**
|
|
1650
1368
|
* Called when a player has changed team using [Player:SetTeam](https://wiki.facepunch.com/gmod/Player:SetTeam).
|
|
1651
1369
|
* **WARNING**: Avoid calling [Player:SetTeam](https://wiki.facepunch.com/gmod/Player:SetTeam) in this hook as it may cause an infinite loop!
|
|
@@ -1657,9 +1375,7 @@ interface GM {
|
|
|
1657
1375
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerChangedTeam
|
|
1658
1376
|
*/
|
|
1659
1377
|
PlayerChangedTeam(self: GM, ply: Player, oldTeam: number, newTeam: number): void;
|
|
1660
|
-
}
|
|
1661
1378
|
|
|
1662
|
-
interface GM {
|
|
1663
1379
|
/**
|
|
1664
1380
|
* Called whenever a player is about to spawn something to see if they hit a limit for whatever they are spawning.
|
|
1665
1381
|
* **NOTE**: This hook will not be called in singleplayer, as singleplayer does not have limits.
|
|
@@ -1668,9 +1384,7 @@ interface GM {
|
|
|
1668
1384
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerCheckLimit
|
|
1669
1385
|
*/
|
|
1670
1386
|
PlayerCheckLimit(self: GM, ply: Player, limitName: string, current: number, defaultMax: number): boolean;
|
|
1671
|
-
}
|
|
1672
1387
|
|
|
1673
|
-
interface GM {
|
|
1674
1388
|
/**
|
|
1675
1389
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
1676
1390
|
*
|
|
@@ -1681,9 +1395,7 @@ interface GM {
|
|
|
1681
1395
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerClassChanged
|
|
1682
1396
|
*/
|
|
1683
1397
|
PlayerClassChanged(self: GM, ply: Player, newID: number): void;
|
|
1684
|
-
}
|
|
1685
1398
|
|
|
1686
|
-
interface GM {
|
|
1687
1399
|
/**
|
|
1688
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.
|
|
1689
1401
|
*
|
|
@@ -1696,9 +1408,7 @@ interface GM {
|
|
|
1696
1408
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerConnect
|
|
1697
1409
|
*/
|
|
1698
1410
|
PlayerConnect(self: GM, name: string, ip: string): void;
|
|
1699
|
-
}
|
|
1700
1411
|
|
|
1701
|
-
interface GM {
|
|
1702
1412
|
/**
|
|
1703
1413
|
* Called when a player is killed by [Player:Kill](https://wiki.facepunch.com/gmod/Player:Kill) or any other normal means.
|
|
1704
1414
|
*
|
|
@@ -1717,18 +1427,14 @@ interface GM {
|
|
|
1717
1427
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerDeath
|
|
1718
1428
|
*/
|
|
1719
1429
|
PlayerDeath(self: GM, victim: Player, inflictor: Entity, attacker: Entity): void;
|
|
1720
|
-
}
|
|
1721
1430
|
|
|
1722
|
-
interface GM {
|
|
1723
1431
|
/**
|
|
1724
1432
|
* Returns whether or not the default death sound should be muted.
|
|
1725
1433
|
* @realm server
|
|
1726
1434
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerDeathSound
|
|
1727
1435
|
*/
|
|
1728
1436
|
PlayerDeathSound(self: GM, ply: Player): boolean;
|
|
1729
|
-
}
|
|
1730
1437
|
|
|
1731
|
-
interface GM {
|
|
1732
1438
|
/**
|
|
1733
1439
|
* Called every think while the player is dead. The return value will determine if the player respawns.
|
|
1734
1440
|
*
|
|
@@ -1740,9 +1446,7 @@ interface GM {
|
|
|
1740
1446
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerDeathThink
|
|
1741
1447
|
*/
|
|
1742
1448
|
PlayerDeathThink(self: GM, ply: Player): boolean;
|
|
1743
|
-
}
|
|
1744
1449
|
|
|
1745
|
-
interface GM {
|
|
1746
1450
|
/**
|
|
1747
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.
|
|
1748
1452
|
*
|
|
@@ -1752,18 +1456,14 @@ interface GM {
|
|
|
1752
1456
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerDisconnected
|
|
1753
1457
|
*/
|
|
1754
1458
|
PlayerDisconnected(self: GM, ply: Player): void;
|
|
1755
|
-
}
|
|
1756
1459
|
|
|
1757
|
-
interface GM {
|
|
1758
1460
|
/**
|
|
1759
1461
|
* Called to update the player's animation during a drive.
|
|
1760
1462
|
* @realm shared
|
|
1761
1463
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerDriveAnimate
|
|
1762
1464
|
*/
|
|
1763
1465
|
PlayerDriveAnimate(self: GM, ply: Player): void;
|
|
1764
|
-
}
|
|
1765
1466
|
|
|
1766
|
-
interface GM {
|
|
1767
1467
|
/**
|
|
1768
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.
|
|
1769
1469
|
*
|
|
@@ -1779,18 +1479,14 @@ interface GM {
|
|
|
1779
1479
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerDroppedWeapon
|
|
1780
1480
|
*/
|
|
1781
1481
|
PlayerDroppedWeapon(self: GM, owner: Player | NPC, wep: Weapon): void;
|
|
1782
|
-
}
|
|
1783
1482
|
|
|
1784
|
-
interface GM {
|
|
1785
1483
|
/**
|
|
1786
1484
|
* Called when player stops using voice chat.
|
|
1787
1485
|
* @realm client
|
|
1788
1486
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerEndVoice
|
|
1789
1487
|
*/
|
|
1790
1488
|
PlayerEndVoice(self: GM, ply: Player): void;
|
|
1791
|
-
}
|
|
1792
1489
|
|
|
1793
|
-
interface GM {
|
|
1794
1490
|
/**
|
|
1795
1491
|
* Called when a player enters a vehicle.
|
|
1796
1492
|
*
|
|
@@ -1802,9 +1498,7 @@ interface GM {
|
|
|
1802
1498
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerEnteredVehicle
|
|
1803
1499
|
*/
|
|
1804
1500
|
PlayerEnteredVehicle(self: GM, ply: Player, veh: Vehicle, role: number): void;
|
|
1805
|
-
}
|
|
1806
1501
|
|
|
1807
|
-
interface GM {
|
|
1808
1502
|
/**
|
|
1809
1503
|
* Called before firing clientside animation events on a player model.
|
|
1810
1504
|
*
|
|
@@ -1814,9 +1508,7 @@ interface GM {
|
|
|
1814
1508
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerFireAnimationEvent
|
|
1815
1509
|
*/
|
|
1816
1510
|
PlayerFireAnimationEvent(self: GM, ply: Player, pos: Vector, ang: Angle, event: number, name: string): boolean;
|
|
1817
|
-
}
|
|
1818
1511
|
|
|
1819
|
-
interface GM {
|
|
1820
1512
|
/**
|
|
1821
1513
|
* Called whenever a player steps. Return true to mute the normal sound.
|
|
1822
1514
|
*
|
|
@@ -1828,18 +1520,14 @@ interface GM {
|
|
|
1828
1520
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerFootstep
|
|
1829
1521
|
*/
|
|
1830
1522
|
PlayerFootstep(self: GM, ply: Player, pos: Vector, foot: number, sound: string, volume: number, filter: CRecipientFilter): boolean;
|
|
1831
|
-
}
|
|
1832
1523
|
|
|
1833
|
-
interface GM {
|
|
1834
1524
|
/**
|
|
1835
1525
|
* Called when a player freezes an object.
|
|
1836
1526
|
* @realm server
|
|
1837
1527
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerFrozeObject
|
|
1838
1528
|
*/
|
|
1839
1529
|
PlayerFrozeObject(self: GM, ply: Player, ent: Entity, physobj: PhysObj): void;
|
|
1840
|
-
}
|
|
1841
1530
|
|
|
1842
|
-
interface GM {
|
|
1843
1531
|
/**
|
|
1844
1532
|
* Called before firing serverside animation events on the player models.
|
|
1845
1533
|
*
|
|
@@ -1849,18 +1537,14 @@ interface GM {
|
|
|
1849
1537
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerHandleAnimEvent
|
|
1850
1538
|
*/
|
|
1851
1539
|
PlayerHandleAnimEvent(self: GM, ply: Player, event: number, eventTime: number, cycle: number, type: number, options: string): void;
|
|
1852
|
-
}
|
|
1853
1540
|
|
|
1854
|
-
interface GM {
|
|
1855
1541
|
/**
|
|
1856
1542
|
* Called when a player gets hurt.
|
|
1857
1543
|
* @realm server
|
|
1858
1544
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerHurt
|
|
1859
1545
|
*/
|
|
1860
1546
|
PlayerHurt(self: GM, victim: Player, attacker: Entity, healthRemaining: number, damageTaken: number): void;
|
|
1861
|
-
}
|
|
1862
1547
|
|
|
1863
|
-
interface GM {
|
|
1864
1548
|
/**
|
|
1865
1549
|
* Called when the player spawns for the first time.
|
|
1866
1550
|
*
|
|
@@ -1911,18 +1595,14 @@ interface GM {
|
|
|
1911
1595
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerInitialSpawn
|
|
1912
1596
|
*/
|
|
1913
1597
|
PlayerInitialSpawn(self: GM, player: Player, transition: boolean): void;
|
|
1914
|
-
}
|
|
1915
1598
|
|
|
1916
|
-
interface GM {
|
|
1917
1599
|
/**
|
|
1918
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.
|
|
1919
1601
|
* @realm server
|
|
1920
1602
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerJoinTeam
|
|
1921
1603
|
*/
|
|
1922
1604
|
PlayerJoinTeam(self: GM, ply: Player, team: number): void;
|
|
1923
|
-
}
|
|
1924
1605
|
|
|
1925
|
-
interface GM {
|
|
1926
1606
|
/**
|
|
1927
1607
|
* Called when a player leaves a vehicle for any reason, including [Player:ExitVehicle](https://wiki.facepunch.com/gmod/Player:ExitVehicle).
|
|
1928
1608
|
*
|
|
@@ -1935,9 +1615,7 @@ interface GM {
|
|
|
1935
1615
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerLeaveVehicle
|
|
1936
1616
|
*/
|
|
1937
1617
|
PlayerLeaveVehicle(self: GM, ply: Player, veh: Vehicle): void;
|
|
1938
|
-
}
|
|
1939
1618
|
|
|
1940
|
-
interface GM {
|
|
1941
1619
|
/**
|
|
1942
1620
|
* Called to give players the default set of weapons.
|
|
1943
1621
|
*
|
|
@@ -1949,9 +1627,7 @@ interface GM {
|
|
|
1949
1627
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerLoadout
|
|
1950
1628
|
*/
|
|
1951
1629
|
PlayerLoadout(self: GM, ply: Player): void;
|
|
1952
|
-
}
|
|
1953
1630
|
|
|
1954
|
-
interface GM {
|
|
1955
1631
|
/**
|
|
1956
1632
|
* Called when a player tries to switch noclip mode.
|
|
1957
1633
|
*
|
|
@@ -1961,9 +1637,7 @@ interface GM {
|
|
|
1961
1637
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerNoClip
|
|
1962
1638
|
*/
|
|
1963
1639
|
PlayerNoClip(self: GM, ply: Player, desiredState: boolean): boolean;
|
|
1964
|
-
}
|
|
1965
1640
|
|
|
1966
|
-
interface GM {
|
|
1967
1641
|
/**
|
|
1968
1642
|
* Called after the player's think, just after [GM:FinishMove](https://wiki.facepunch.com/gmod/GM:FinishMove).
|
|
1969
1643
|
*
|
|
@@ -1975,9 +1649,7 @@ interface GM {
|
|
|
1975
1649
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerPostThink
|
|
1976
1650
|
*/
|
|
1977
1651
|
PlayerPostThink(self: GM, ply: Player): void;
|
|
1978
|
-
}
|
|
1979
1652
|
|
|
1980
|
-
interface GM {
|
|
1981
1653
|
/**
|
|
1982
1654
|
* Request a player to join the team. This function will check if the team is available to join or not.
|
|
1983
1655
|
*
|
|
@@ -1989,9 +1661,7 @@ interface GM {
|
|
|
1989
1661
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerRequestTeam
|
|
1990
1662
|
*/
|
|
1991
1663
|
PlayerRequestTeam(self: GM, ply: Player, team: number): void;
|
|
1992
|
-
}
|
|
1993
1664
|
|
|
1994
|
-
interface GM {
|
|
1995
1665
|
/**
|
|
1996
1666
|
* Called when a player dispatched a chat message. For the clientside equivalent, see [GM:OnPlayerChat](https://wiki.facepunch.com/gmod/GM:OnPlayerChat).
|
|
1997
1667
|
*
|
|
@@ -2002,9 +1672,7 @@ interface GM {
|
|
|
2002
1672
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSay
|
|
2003
1673
|
*/
|
|
2004
1674
|
PlayerSay(self: GM, sender: Player, text: string, teamChat: boolean): string;
|
|
2005
|
-
}
|
|
2006
1675
|
|
|
2007
|
-
interface GM {
|
|
2008
1676
|
/**
|
|
2009
1677
|
* Called to determine a spawn point for a player to spawn at.
|
|
2010
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.
|
|
@@ -2014,27 +1682,21 @@ interface GM {
|
|
|
2014
1682
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSelectSpawn
|
|
2015
1683
|
*/
|
|
2016
1684
|
PlayerSelectSpawn(self: GM, ply: Player, transition: boolean): Entity;
|
|
2017
|
-
}
|
|
2018
1685
|
|
|
2019
|
-
interface GM {
|
|
2020
1686
|
/**
|
|
2021
1687
|
* Find a team spawn point entity for this player.
|
|
2022
1688
|
* @realm server
|
|
2023
1689
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSelectTeamSpawn
|
|
2024
1690
|
*/
|
|
2025
1691
|
PlayerSelectTeamSpawn(self: GM, team: number, ply: Player): Entity;
|
|
2026
|
-
}
|
|
2027
1692
|
|
|
2028
|
-
interface GM {
|
|
2029
1693
|
/**
|
|
2030
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.
|
|
2031
1695
|
* @realm server
|
|
2032
1696
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSetHandsModel
|
|
2033
1697
|
*/
|
|
2034
1698
|
PlayerSetHandsModel(self: GM, ply: Player, ent: Entity): void;
|
|
2035
|
-
}
|
|
2036
1699
|
|
|
2037
|
-
interface GM {
|
|
2038
1700
|
/**
|
|
2039
1701
|
* Called whenever a player spawns and must choose a model. A good place to assign a model to a player.
|
|
2040
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).
|
|
@@ -2044,9 +1706,7 @@ interface GM {
|
|
|
2044
1706
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSetModel
|
|
2045
1707
|
*/
|
|
2046
1708
|
PlayerSetModel(self: GM, ply: Player): void;
|
|
2047
|
-
}
|
|
2048
1709
|
|
|
2049
|
-
interface GM {
|
|
2050
1710
|
/**
|
|
2051
1711
|
* Returns true if the player should take damage from the given attacker.
|
|
2052
1712
|
*
|
|
@@ -2057,18 +1717,14 @@ interface GM {
|
|
|
2057
1717
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerShouldTakeDamage
|
|
2058
1718
|
*/
|
|
2059
1719
|
PlayerShouldTakeDamage(self: GM, ply: Player, attacker: Entity): boolean;
|
|
2060
|
-
}
|
|
2061
1720
|
|
|
2062
|
-
interface GM {
|
|
2063
1721
|
/**
|
|
2064
1722
|
* Allows to suppress player taunts.
|
|
2065
1723
|
* @realm server
|
|
2066
1724
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerShouldTaunt
|
|
2067
1725
|
*/
|
|
2068
1726
|
PlayerShouldTaunt(self: GM, ply: Player, act: number): boolean;
|
|
2069
|
-
}
|
|
2070
1727
|
|
|
2071
|
-
interface GM {
|
|
2072
1728
|
/**
|
|
2073
1729
|
* Called when the player is killed by [Player:KillSilent](https://wiki.facepunch.com/gmod/Player:KillSilent).
|
|
2074
1730
|
*
|
|
@@ -2084,9 +1740,7 @@ interface GM {
|
|
|
2084
1740
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSilentDeath
|
|
2085
1741
|
*/
|
|
2086
1742
|
PlayerSilentDeath(self: GM, ply: Player): void;
|
|
2087
|
-
}
|
|
2088
1743
|
|
|
2089
|
-
interface GM {
|
|
2090
1744
|
/**
|
|
2091
1745
|
* Called whenever a player spawns, including respawns.
|
|
2092
1746
|
*
|
|
@@ -2101,36 +1755,28 @@ interface GM {
|
|
|
2101
1755
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSpawn
|
|
2102
1756
|
*/
|
|
2103
1757
|
PlayerSpawn(self: GM, player: Player, transition: boolean): void;
|
|
2104
|
-
}
|
|
2105
1758
|
|
|
2106
|
-
interface GM {
|
|
2107
1759
|
/**
|
|
2108
1760
|
* Called to spawn the player as a spectator.
|
|
2109
1761
|
* @realm server
|
|
2110
1762
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSpawnAsSpectator
|
|
2111
1763
|
*/
|
|
2112
1764
|
PlayerSpawnAsSpectator(self: GM, ply: Player): void;
|
|
2113
|
-
}
|
|
2114
1765
|
|
|
2115
|
-
interface GM {
|
|
2116
1766
|
/**
|
|
2117
1767
|
* Determines if the player can spray using the `impulse 201` console command.
|
|
2118
1768
|
* @realm server
|
|
2119
1769
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSpray
|
|
2120
1770
|
*/
|
|
2121
1771
|
PlayerSpray(self: GM, sprayer: Player): boolean;
|
|
2122
|
-
}
|
|
2123
1772
|
|
|
2124
|
-
interface GM {
|
|
2125
1773
|
/**
|
|
2126
1774
|
* Called when player starts taunting.
|
|
2127
1775
|
* @realm server
|
|
2128
1776
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerStartTaunt
|
|
2129
1777
|
*/
|
|
2130
1778
|
PlayerStartTaunt(self: GM, ply: Player, act: number, length: number): void;
|
|
2131
|
-
}
|
|
2132
1779
|
|
|
2133
|
-
interface GM {
|
|
2134
1780
|
/**
|
|
2135
1781
|
* Called when a player starts using voice chat.
|
|
2136
1782
|
* **NOTE**: Set mp_show_voice_icons to 0, if you want disable icons above player.
|
|
@@ -2140,9 +1786,7 @@ interface GM {
|
|
|
2140
1786
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerStartVoice
|
|
2141
1787
|
*/
|
|
2142
1788
|
PlayerStartVoice(self: GM, ply: Player, plyIndex?: number): boolean;
|
|
2143
|
-
}
|
|
2144
1789
|
|
|
2145
|
-
interface GM {
|
|
2146
1790
|
/**
|
|
2147
1791
|
* Allows you to override the time between footsteps.
|
|
2148
1792
|
*
|
|
@@ -2154,9 +1798,7 @@ interface GM {
|
|
|
2154
1798
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerStepSoundTime
|
|
2155
1799
|
*/
|
|
2156
1800
|
PlayerStepSoundTime(self: GM, ply: Player, type: number, walking: boolean): number;
|
|
2157
|
-
}
|
|
2158
1801
|
|
|
2159
|
-
interface GM {
|
|
2160
1802
|
/**
|
|
2161
1803
|
* Called whenever a player attempts to either turn on or off their flashlight, returning false will deny the change.
|
|
2162
1804
|
* **NOTE**: Also gets called when using [Player:Flashlight](https://wiki.facepunch.com/gmod/Player:Flashlight).
|
|
@@ -2167,9 +1809,7 @@ interface GM {
|
|
|
2167
1809
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSwitchFlashlight
|
|
2168
1810
|
*/
|
|
2169
1811
|
PlayerSwitchFlashlight(self: GM, ply: Player, enabled: boolean): boolean;
|
|
2170
|
-
}
|
|
2171
1812
|
|
|
2172
|
-
interface GM {
|
|
2173
1813
|
/**
|
|
2174
1814
|
* Called when a player attempts to switch their weapon.
|
|
2175
1815
|
*
|
|
@@ -2179,9 +1819,7 @@ interface GM {
|
|
|
2179
1819
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerSwitchWeapon
|
|
2180
1820
|
*/
|
|
2181
1821
|
PlayerSwitchWeapon(self: GM, player: Player, oldWeapon: Weapon, newWeapon: Weapon): boolean;
|
|
2182
|
-
}
|
|
2183
1822
|
|
|
2184
|
-
interface GM {
|
|
2185
1823
|
/**
|
|
2186
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).
|
|
2187
1825
|
*
|
|
@@ -2192,27 +1830,21 @@ interface GM {
|
|
|
2192
1830
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerTick
|
|
2193
1831
|
*/
|
|
2194
1832
|
PlayerTick(self: GM, player: Player, mv: CMoveData): void;
|
|
2195
|
-
}
|
|
2196
1833
|
|
|
2197
|
-
interface GM {
|
|
2198
1834
|
/**
|
|
2199
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.
|
|
2200
1836
|
* @realm shared
|
|
2201
1837
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerTraceAttack
|
|
2202
1838
|
*/
|
|
2203
1839
|
PlayerTraceAttack(self: GM, ply: Player, dmginfo: CTakeDamageInfo, dir: Vector, trace: TraceResult): boolean;
|
|
2204
|
-
}
|
|
2205
1840
|
|
|
2206
|
-
interface GM {
|
|
2207
1841
|
/**
|
|
2208
1842
|
* Called when a player unfreezes an object.
|
|
2209
1843
|
* @realm server
|
|
2210
1844
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerUnfrozeObject
|
|
2211
1845
|
*/
|
|
2212
1846
|
PlayerUnfrozeObject(self: GM, ply: Player, ent: Entity, physobj: PhysObj): void;
|
|
2213
|
-
}
|
|
2214
1847
|
|
|
2215
|
-
interface GM {
|
|
2216
1848
|
/**
|
|
2217
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.
|
|
2218
1850
|
*
|
|
@@ -2220,18 +1852,14 @@ interface GM {
|
|
|
2220
1852
|
* @source https://wiki.facepunch.com/gmod/GM:PlayerUse
|
|
2221
1853
|
*/
|
|
2222
1854
|
PlayerUse(self: GM, ply: Player, ent: Entity): boolean;
|
|
2223
|
-
}
|
|
2224
1855
|
|
|
2225
|
-
interface GM {
|
|
2226
1856
|
/**
|
|
2227
1857
|
* Called when it's time to populate the context menu menu bar at the top.
|
|
2228
1858
|
* @realm client
|
|
2229
1859
|
* @source https://wiki.facepunch.com/gmod/GM:PopulateMenuBar
|
|
2230
1860
|
*/
|
|
2231
1861
|
PopulateMenuBar(self: GM, menubar: Panel): void;
|
|
2232
|
-
}
|
|
2233
1862
|
|
|
2234
|
-
interface GM {
|
|
2235
1863
|
/**
|
|
2236
1864
|
* Called right after the map has cleaned up (usually because [game.CleanUpMap](https://wiki.facepunch.com/gmod/game.CleanUpMap) was called)
|
|
2237
1865
|
*
|
|
@@ -2241,9 +1869,7 @@ interface GM {
|
|
|
2241
1869
|
* @source https://wiki.facepunch.com/gmod/GM:PostCleanupMap
|
|
2242
1870
|
*/
|
|
2243
1871
|
PostCleanupMap(self: GM): void;
|
|
2244
|
-
}
|
|
2245
1872
|
|
|
2246
|
-
interface GM {
|
|
2247
1873
|
/**
|
|
2248
1874
|
* Called right after the 2D skybox has been drawn - allowing you to draw over it.
|
|
2249
1875
|
*
|
|
@@ -2253,9 +1879,7 @@ interface GM {
|
|
|
2253
1879
|
* @source https://wiki.facepunch.com/gmod/GM:PostDraw2DSkyBox
|
|
2254
1880
|
*/
|
|
2255
1881
|
PostDraw2DSkyBox(self: GM): void;
|
|
2256
|
-
}
|
|
2257
1882
|
|
|
2258
|
-
interface GM {
|
|
2259
1883
|
/**
|
|
2260
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).
|
|
2261
1885
|
*
|
|
@@ -2267,9 +1891,7 @@ interface GM {
|
|
|
2267
1891
|
* @source https://wiki.facepunch.com/gmod/GM:PostDrawEffects
|
|
2268
1892
|
*/
|
|
2269
1893
|
PostDrawEffects(self: GM): void;
|
|
2270
|
-
}
|
|
2271
1894
|
|
|
2272
|
-
interface GM {
|
|
2273
1895
|
/**
|
|
2274
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).
|
|
2275
1897
|
*
|
|
@@ -2281,9 +1903,7 @@ interface GM {
|
|
|
2281
1903
|
* @source https://wiki.facepunch.com/gmod/GM:PostDrawHUD
|
|
2282
1904
|
*/
|
|
2283
1905
|
PostDrawHUD(self: GM): void;
|
|
2284
|
-
}
|
|
2285
1906
|
|
|
2286
|
-
interface GM {
|
|
2287
1907
|
/**
|
|
2288
1908
|
* Called after drawing opaque entities.
|
|
2289
1909
|
*
|
|
@@ -2295,9 +1915,7 @@ interface GM {
|
|
|
2295
1915
|
* @source https://wiki.facepunch.com/gmod/GM:PostDrawOpaqueRenderables
|
|
2296
1916
|
*/
|
|
2297
1917
|
PostDrawOpaqueRenderables(self: GM, bDrawingDepth: boolean, bDrawingSkybox: boolean, isDraw3DSkybox: boolean): void;
|
|
2298
|
-
}
|
|
2299
1918
|
|
|
2300
|
-
interface GM {
|
|
2301
1919
|
/**
|
|
2302
1920
|
* Called after the player hands are drawn.
|
|
2303
1921
|
*
|
|
@@ -2309,9 +1927,7 @@ interface GM {
|
|
|
2309
1927
|
* @source https://wiki.facepunch.com/gmod/GM:PostDrawPlayerHands
|
|
2310
1928
|
*/
|
|
2311
1929
|
PostDrawPlayerHands(self: GM, hands: Entity, vm: Entity, ply: Player, weapon: Weapon, flags: number): void;
|
|
2312
|
-
}
|
|
2313
1930
|
|
|
2314
|
-
interface GM {
|
|
2315
1931
|
/**
|
|
2316
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.
|
|
2317
1933
|
*
|
|
@@ -2323,9 +1939,7 @@ interface GM {
|
|
|
2323
1939
|
* @source https://wiki.facepunch.com/gmod/GM:PostDrawSkyBox
|
|
2324
1940
|
*/
|
|
2325
1941
|
PostDrawSkyBox(self: GM): void;
|
|
2326
|
-
}
|
|
2327
1942
|
|
|
2328
|
-
interface GM {
|
|
2329
1943
|
/**
|
|
2330
1944
|
* Called after all translucent entities are drawn.
|
|
2331
1945
|
*
|
|
@@ -2340,9 +1954,7 @@ interface GM {
|
|
|
2340
1954
|
* @source https://wiki.facepunch.com/gmod/GM:PostDrawTranslucentRenderables
|
|
2341
1955
|
*/
|
|
2342
1956
|
PostDrawTranslucentRenderables(self: GM, bDrawingDepth: boolean, bDrawingSkybox: boolean, isDraw3DSkybox: boolean): void;
|
|
2343
|
-
}
|
|
2344
1957
|
|
|
2345
|
-
interface GM {
|
|
2346
1958
|
/**
|
|
2347
1959
|
* Called after view model is drawn.
|
|
2348
1960
|
*
|
|
@@ -2359,9 +1971,7 @@ interface GM {
|
|
|
2359
1971
|
* @source https://wiki.facepunch.com/gmod/GM:PostDrawViewModel
|
|
2360
1972
|
*/
|
|
2361
1973
|
PostDrawViewModel(self: GM, viewmodel: Entity, player: Player, weapon: Weapon, flags: number): void;
|
|
2362
|
-
}
|
|
2363
1974
|
|
|
2364
|
-
interface GM {
|
|
2365
1975
|
/**
|
|
2366
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.
|
|
2367
1977
|
*
|
|
@@ -2374,9 +1984,7 @@ interface GM {
|
|
|
2374
1984
|
* @source https://wiki.facepunch.com/gmod/GM:PostEntityFireBullets
|
|
2375
1985
|
*/
|
|
2376
1986
|
PostEntityFireBullets(self: GM, entity: Entity, data: FiredBullet): boolean;
|
|
2377
|
-
}
|
|
2378
1987
|
|
|
2379
|
-
interface GM {
|
|
2380
1988
|
/**
|
|
2381
1989
|
* Called when an entity receives a damage event, after passing damage filters, etc.
|
|
2382
1990
|
*
|
|
@@ -2389,18 +1997,14 @@ interface GM {
|
|
|
2389
1997
|
* @source https://wiki.facepunch.com/gmod/GM:PostEntityTakeDamage
|
|
2390
1998
|
*/
|
|
2391
1999
|
PostEntityTakeDamage(self: GM, ent: Entity, dmginfo: CTakeDamageInfo, wasDamageTaken: boolean): void;
|
|
2392
|
-
}
|
|
2393
2000
|
|
|
2394
|
-
interface GM {
|
|
2395
2001
|
/**
|
|
2396
2002
|
* Called after the gamemode has loaded.
|
|
2397
2003
|
* @realm shared
|
|
2398
2004
|
* @source https://wiki.facepunch.com/gmod/GM:PostGamemodeLoaded
|
|
2399
2005
|
*/
|
|
2400
2006
|
PostGamemodeLoaded(self: GM): void;
|
|
2401
|
-
}
|
|
2402
2007
|
|
|
2403
|
-
interface GM {
|
|
2404
2008
|
/**
|
|
2405
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).
|
|
2406
2010
|
*
|
|
@@ -2414,9 +2018,7 @@ interface GM {
|
|
|
2414
2018
|
* @source https://wiki.facepunch.com/gmod/GM:PostPlayerDeath
|
|
2415
2019
|
*/
|
|
2416
2020
|
PostPlayerDeath(self: GM, ply: Player): void;
|
|
2417
|
-
}
|
|
2418
2021
|
|
|
2419
|
-
interface GM {
|
|
2420
2022
|
/**
|
|
2421
2023
|
* Called after a given player in your [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") was drawn.
|
|
2422
2024
|
*
|
|
@@ -2427,27 +2029,21 @@ interface GM {
|
|
|
2427
2029
|
* @source https://wiki.facepunch.com/gmod/GM:PostPlayerDraw
|
|
2428
2030
|
*/
|
|
2429
2031
|
PostPlayerDraw(self: GM, ply: Player, flags: number): void;
|
|
2430
|
-
}
|
|
2431
2032
|
|
|
2432
|
-
interface GM {
|
|
2433
2033
|
/**
|
|
2434
2034
|
* Allows you to suppress post processing effect drawing.
|
|
2435
2035
|
* @realm client
|
|
2436
2036
|
* @source https://wiki.facepunch.com/gmod/GM:PostProcessPermitted
|
|
2437
2037
|
*/
|
|
2438
2038
|
PostProcessPermitted(self: GM, effect_name: string): boolean;
|
|
2439
|
-
}
|
|
2440
2039
|
|
|
2441
|
-
interface GM {
|
|
2442
2040
|
/**
|
|
2443
2041
|
* Called after the frame has been rendered.
|
|
2444
2042
|
* @realm client
|
|
2445
2043
|
* @source https://wiki.facepunch.com/gmod/GM:PostRender
|
|
2446
2044
|
*/
|
|
2447
2045
|
PostRender(self: GM): void;
|
|
2448
|
-
}
|
|
2449
2046
|
|
|
2450
|
-
interface GM {
|
|
2451
2047
|
/**
|
|
2452
2048
|
* Called after the VGUI has been drawn.
|
|
2453
2049
|
*
|
|
@@ -2457,18 +2053,14 @@ interface GM {
|
|
|
2457
2053
|
* @source https://wiki.facepunch.com/gmod/GM:PostRenderVGUI
|
|
2458
2054
|
*/
|
|
2459
2055
|
PostRenderVGUI(self: GM): void;
|
|
2460
|
-
}
|
|
2461
2056
|
|
|
2462
|
-
interface GM {
|
|
2463
2057
|
/**
|
|
2464
2058
|
* Called just after performing an undo.
|
|
2465
2059
|
* @realm server
|
|
2466
2060
|
* @source https://wiki.facepunch.com/gmod/GM:PostUndo
|
|
2467
2061
|
*/
|
|
2468
2062
|
PostUndo(self: GM, undo: Undo, count: number): void;
|
|
2469
|
-
}
|
|
2470
2063
|
|
|
2471
|
-
interface GM {
|
|
2472
2064
|
/**
|
|
2473
2065
|
* Called right before the map cleans up (usually because [game.CleanUpMap](https://wiki.facepunch.com/gmod/game.CleanUpMap) was called)
|
|
2474
2066
|
*
|
|
@@ -2478,9 +2070,7 @@ interface GM {
|
|
|
2478
2070
|
* @source https://wiki.facepunch.com/gmod/GM:PreCleanupMap
|
|
2479
2071
|
*/
|
|
2480
2072
|
PreCleanupMap(self: GM): void;
|
|
2481
|
-
}
|
|
2482
2073
|
|
|
2483
|
-
interface GM {
|
|
2484
2074
|
/**
|
|
2485
2075
|
* Called just after [GM:PreDrawViewModel](https://wiki.facepunch.com/gmod/GM:PreDrawViewModel) and can technically be considered as a "PostDrawAllViewModels".
|
|
2486
2076
|
*
|
|
@@ -2492,9 +2082,7 @@ interface GM {
|
|
|
2492
2082
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawEffects
|
|
2493
2083
|
*/
|
|
2494
2084
|
PreDrawEffects(self: GM): void;
|
|
2495
|
-
}
|
|
2496
2085
|
|
|
2497
|
-
interface GM {
|
|
2498
2086
|
/**
|
|
2499
2087
|
* Called just after [GM:PostDrawEffects](https://wiki.facepunch.com/gmod/GM:PostDrawEffects) (duplicate of it). Drawing anything in it seems to work incorrectly.
|
|
2500
2088
|
*
|
|
@@ -2504,9 +2092,7 @@ interface GM {
|
|
|
2504
2092
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawHUD
|
|
2505
2093
|
*/
|
|
2506
2094
|
PreDrawHUD(self: GM): void;
|
|
2507
|
-
}
|
|
2508
2095
|
|
|
2509
|
-
interface GM {
|
|
2510
2096
|
/**
|
|
2511
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).
|
|
2512
2098
|
*
|
|
@@ -2516,9 +2102,7 @@ interface GM {
|
|
|
2516
2102
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawHalos
|
|
2517
2103
|
*/
|
|
2518
2104
|
PreDrawHalos(self: GM): void;
|
|
2519
|
-
}
|
|
2520
2105
|
|
|
2521
|
-
interface GM {
|
|
2522
2106
|
/**
|
|
2523
2107
|
* Called before all opaque entities are drawn.
|
|
2524
2108
|
*
|
|
@@ -2530,9 +2114,7 @@ interface GM {
|
|
|
2530
2114
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawOpaqueRenderables
|
|
2531
2115
|
*/
|
|
2532
2116
|
PreDrawOpaqueRenderables(self: GM, isDrawingDepth: boolean, isDrawSkybox: boolean, isDraw3DSkybox: boolean): boolean;
|
|
2533
|
-
}
|
|
2534
2117
|
|
|
2535
|
-
interface GM {
|
|
2536
2118
|
/**
|
|
2537
2119
|
* Called before the player hands are drawn.
|
|
2538
2120
|
*
|
|
@@ -2543,9 +2125,7 @@ interface GM {
|
|
|
2543
2125
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawPlayerHands
|
|
2544
2126
|
*/
|
|
2545
2127
|
PreDrawPlayerHands(self: GM, hands: Entity, vm: Entity, ply: Player, weapon: Weapon, flags: number): boolean;
|
|
2546
|
-
}
|
|
2547
2128
|
|
|
2548
|
-
interface GM {
|
|
2549
2129
|
/**
|
|
2550
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`)
|
|
2551
2131
|
*
|
|
@@ -2557,9 +2137,7 @@ interface GM {
|
|
|
2557
2137
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawSkyBox
|
|
2558
2138
|
*/
|
|
2559
2139
|
PreDrawSkyBox(self: GM): boolean;
|
|
2560
|
-
}
|
|
2561
2140
|
|
|
2562
|
-
interface GM {
|
|
2563
2141
|
/**
|
|
2564
2142
|
* Called before all the translucent entities are drawn.
|
|
2565
2143
|
*
|
|
@@ -2574,9 +2152,7 @@ interface GM {
|
|
|
2574
2152
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawTranslucentRenderables
|
|
2575
2153
|
*/
|
|
2576
2154
|
PreDrawTranslucentRenderables(self: GM, isDrawingDepth: boolean, isDrawSkybox: boolean, isDraw3DSkybox: boolean): boolean;
|
|
2577
|
-
}
|
|
2578
2155
|
|
|
2579
|
-
interface GM {
|
|
2580
2156
|
/**
|
|
2581
2157
|
* Called before the view model has been drawn.
|
|
2582
2158
|
*
|
|
@@ -2593,9 +2169,7 @@ interface GM {
|
|
|
2593
2169
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawViewModel
|
|
2594
2170
|
*/
|
|
2595
2171
|
PreDrawViewModel(self: GM, vm: Entity, ply: Player, weapon: Weapon, flags: number): boolean;
|
|
2596
|
-
}
|
|
2597
2172
|
|
|
2598
|
-
interface GM {
|
|
2599
2173
|
/**
|
|
2600
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.
|
|
2601
2175
|
*
|
|
@@ -2609,18 +2183,14 @@ interface GM {
|
|
|
2609
2183
|
* @source https://wiki.facepunch.com/gmod/GM:PreDrawViewModels
|
|
2610
2184
|
*/
|
|
2611
2185
|
PreDrawViewModels(self: GM): void;
|
|
2612
|
-
}
|
|
2613
2186
|
|
|
2614
|
-
interface GM {
|
|
2615
2187
|
/**
|
|
2616
2188
|
* Called before the gamemode is loaded.
|
|
2617
2189
|
* @realm shared
|
|
2618
2190
|
* @source https://wiki.facepunch.com/gmod/GM:PreGamemodeLoaded
|
|
2619
2191
|
*/
|
|
2620
2192
|
PreGamemodeLoaded(self: GM): void;
|
|
2621
|
-
}
|
|
2622
2193
|
|
|
2623
|
-
interface GM {
|
|
2624
2194
|
/**
|
|
2625
2195
|
* Called before the player is drawn.
|
|
2626
2196
|
*
|
|
@@ -2630,9 +2200,7 @@ interface GM {
|
|
|
2630
2200
|
* @source https://wiki.facepunch.com/gmod/GM:PrePlayerDraw
|
|
2631
2201
|
*/
|
|
2632
2202
|
PrePlayerDraw(self: GM, player: Player, flags: number): boolean;
|
|
2633
|
-
}
|
|
2634
2203
|
|
|
2635
|
-
interface GM {
|
|
2636
2204
|
/**
|
|
2637
2205
|
* Called by [scripted_ents.Register](https://wiki.facepunch.com/gmod/scripted_ents.Register).
|
|
2638
2206
|
*
|
|
@@ -2640,9 +2208,7 @@ interface GM {
|
|
|
2640
2208
|
* @source https://wiki.facepunch.com/gmod/GM:PreRegisterSENT
|
|
2641
2209
|
*/
|
|
2642
2210
|
PreRegisterSENT(self: GM, ent: table, _class: string): boolean;
|
|
2643
|
-
}
|
|
2644
2211
|
|
|
2645
|
-
interface GM {
|
|
2646
2212
|
/**
|
|
2647
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).
|
|
2648
2214
|
*
|
|
@@ -2650,45 +2216,35 @@ interface GM {
|
|
|
2650
2216
|
* @source https://wiki.facepunch.com/gmod/GM:PreRegisterSWEP
|
|
2651
2217
|
*/
|
|
2652
2218
|
PreRegisterSWEP(self: GM, swep: table, _class: string): boolean;
|
|
2653
|
-
}
|
|
2654
2219
|
|
|
2655
|
-
interface GM {
|
|
2656
2220
|
/**
|
|
2657
2221
|
* Called before the renderer is about to start rendering the next frame.
|
|
2658
2222
|
* @realm client
|
|
2659
2223
|
* @source https://wiki.facepunch.com/gmod/GM:PreRender
|
|
2660
2224
|
*/
|
|
2661
2225
|
PreRender(self: GM): boolean;
|
|
2662
|
-
}
|
|
2663
2226
|
|
|
2664
|
-
interface GM {
|
|
2665
2227
|
/**
|
|
2666
2228
|
* Called just before performing an undo.
|
|
2667
2229
|
* @realm server
|
|
2668
2230
|
* @source https://wiki.facepunch.com/gmod/GM:PreUndo
|
|
2669
2231
|
*/
|
|
2670
2232
|
PreUndo(self: GM, undo: Undo): boolean;
|
|
2671
|
-
}
|
|
2672
2233
|
|
|
2673
|
-
interface GM {
|
|
2674
2234
|
/**
|
|
2675
2235
|
* This will prevent IN_ATTACK from sending to server when player tries to shoot from C menu.
|
|
2676
2236
|
* @realm client
|
|
2677
2237
|
* @source https://wiki.facepunch.com/gmod/GM:PreventScreenClicks
|
|
2678
2238
|
*/
|
|
2679
2239
|
PreventScreenClicks(self: GM): boolean;
|
|
2680
|
-
}
|
|
2681
2240
|
|
|
2682
|
-
interface GM {
|
|
2683
2241
|
/**
|
|
2684
2242
|
* Called when a prop has been destroyed.
|
|
2685
2243
|
* @realm shared
|
|
2686
2244
|
* @source https://wiki.facepunch.com/gmod/GM:PropBreak
|
|
2687
2245
|
*/
|
|
2688
2246
|
PropBreak(self: GM, attacker: Player, prop: Entity): void;
|
|
2689
|
-
}
|
|
2690
2247
|
|
|
2691
|
-
interface GM {
|
|
2692
2248
|
/**
|
|
2693
2249
|
* Render the scene. Used by the `Stereoscopy` post-processing effect.
|
|
2694
2250
|
*
|
|
@@ -2699,9 +2255,7 @@ interface GM {
|
|
|
2699
2255
|
* @source https://wiki.facepunch.com/gmod/GM:RenderScene
|
|
2700
2256
|
*/
|
|
2701
2257
|
RenderScene(self: GM, origin: Vector, angles: Angle, fov: number): boolean;
|
|
2702
|
-
}
|
|
2703
2258
|
|
|
2704
|
-
interface GM {
|
|
2705
2259
|
/**
|
|
2706
2260
|
* Used to render post processing effects.
|
|
2707
2261
|
*
|
|
@@ -2711,9 +2265,7 @@ interface GM {
|
|
|
2711
2265
|
* @source https://wiki.facepunch.com/gmod/GM:RenderScreenspaceEffects
|
|
2712
2266
|
*/
|
|
2713
2267
|
RenderScreenspaceEffects(self: GM): void;
|
|
2714
|
-
}
|
|
2715
2268
|
|
|
2716
|
-
interface GM {
|
|
2717
2269
|
/**
|
|
2718
2270
|
* Called when the game is reloaded from a Source Engine save system ( not the Sandbox saves or dupes ).
|
|
2719
2271
|
*
|
|
@@ -2723,9 +2275,7 @@ interface GM {
|
|
|
2723
2275
|
* @source https://wiki.facepunch.com/gmod/GM:Restored
|
|
2724
2276
|
*/
|
|
2725
2277
|
Restored(self: GM): void;
|
|
2726
|
-
}
|
|
2727
2278
|
|
|
2728
|
-
interface GM {
|
|
2729
2279
|
/**
|
|
2730
2280
|
* Called when the game is saved using the Source Engine save system (not the Sandbox saves or dupes).
|
|
2731
2281
|
*
|
|
@@ -2737,9 +2287,7 @@ interface GM {
|
|
|
2737
2287
|
* @source https://wiki.facepunch.com/gmod/GM:Saved
|
|
2738
2288
|
*/
|
|
2739
2289
|
Saved(self: GM): void;
|
|
2740
|
-
}
|
|
2741
2290
|
|
|
2742
|
-
interface GM {
|
|
2743
2291
|
/**
|
|
2744
2292
|
* Called when an NPC takes damage.
|
|
2745
2293
|
*
|
|
@@ -2750,9 +2298,7 @@ interface GM {
|
|
|
2750
2298
|
* @source https://wiki.facepunch.com/gmod/GM:ScaleNPCDamage
|
|
2751
2299
|
*/
|
|
2752
2300
|
ScaleNPCDamage(self: GM, npc: NPC, hitgroup: number, dmginfo: CTakeDamageInfo): void;
|
|
2753
|
-
}
|
|
2754
2301
|
|
|
2755
|
-
interface GM {
|
|
2756
2302
|
/**
|
|
2757
2303
|
* This hook allows you to change how much damage a player receives when one takes damage to a specific body part.
|
|
2758
2304
|
*
|
|
@@ -2763,27 +2309,21 @@ interface GM {
|
|
|
2763
2309
|
* @source https://wiki.facepunch.com/gmod/GM:ScalePlayerDamage
|
|
2764
2310
|
*/
|
|
2765
2311
|
ScalePlayerDamage(self: GM, ply: Player, hitgroup: number, dmginfo: CTakeDamageInfo): boolean;
|
|
2766
|
-
}
|
|
2767
2312
|
|
|
2768
|
-
interface GM {
|
|
2769
2313
|
/**
|
|
2770
2314
|
* Called when player released the scoreboard button (TAB by default).
|
|
2771
2315
|
* @realm client
|
|
2772
2316
|
* @source https://wiki.facepunch.com/gmod/GM:ScoreboardHide
|
|
2773
2317
|
*/
|
|
2774
2318
|
ScoreboardHide(self: GM): void;
|
|
2775
|
-
}
|
|
2776
2319
|
|
|
2777
|
-
interface GM {
|
|
2778
2320
|
/**
|
|
2779
2321
|
* Called when player presses the scoreboard button (TAB by default).
|
|
2780
2322
|
* @realm client
|
|
2781
2323
|
* @source https://wiki.facepunch.com/gmod/GM:ScoreboardShow
|
|
2782
2324
|
*/
|
|
2783
2325
|
ScoreboardShow(self: GM): boolean;
|
|
2784
|
-
}
|
|
2785
2326
|
|
|
2786
|
-
interface GM {
|
|
2787
2327
|
/**
|
|
2788
2328
|
* An internal function used to send a death notice event to all clients.
|
|
2789
2329
|
*
|
|
@@ -2791,9 +2331,7 @@ interface GM {
|
|
|
2791
2331
|
* @source https://wiki.facepunch.com/gmod/GM:SendDeathNotice
|
|
2792
2332
|
*/
|
|
2793
2333
|
SendDeathNotice(self: GM, attacker: Entity | string | nil, inflictor: string, victim: Entity | string, flags: number): void;
|
|
2794
|
-
}
|
|
2795
2334
|
|
|
2796
|
-
interface GM {
|
|
2797
2335
|
/**
|
|
2798
2336
|
* Sets player run and sprint speeds.
|
|
2799
2337
|
* Using a speed of `0` can lead to prediction errors, and can cause players to move at `sv_maxvelocity`
|
|
@@ -2804,9 +2342,7 @@ interface GM {
|
|
|
2804
2342
|
* @source https://wiki.facepunch.com/gmod/GM:SetPlayerSpeed
|
|
2805
2343
|
*/
|
|
2806
2344
|
SetPlayerSpeed(self: GM, ply: Player, walkSpeed: number, runSpeed: number): void;
|
|
2807
|
-
}
|
|
2808
2345
|
|
|
2809
|
-
interface GM {
|
|
2810
2346
|
/**
|
|
2811
2347
|
* SetupMove is called before the engine process movements. This allows us to override the players movement.
|
|
2812
2348
|
*
|
|
@@ -2816,18 +2352,14 @@ interface GM {
|
|
|
2816
2352
|
* @source https://wiki.facepunch.com/gmod/GM:SetupMove
|
|
2817
2353
|
*/
|
|
2818
2354
|
SetupMove(self: GM, ply: Player, mv: CMoveData, cmd: CUserCmd): void;
|
|
2819
|
-
}
|
|
2820
2355
|
|
|
2821
|
-
interface GM {
|
|
2822
2356
|
/**
|
|
2823
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).
|
|
2824
2358
|
* @realm server
|
|
2825
2359
|
* @source https://wiki.facepunch.com/gmod/GM:SetupPlayerVisibility
|
|
2826
2360
|
*/
|
|
2827
2361
|
SetupPlayerVisibility(self: GM, ply: Player, viewEntity: Entity): void;
|
|
2828
|
-
}
|
|
2829
2362
|
|
|
2830
|
-
interface GM {
|
|
2831
2363
|
/**
|
|
2832
2364
|
* Allows you to use render.Fog* functions to manipulate skybox fog.
|
|
2833
2365
|
* This will not be called for maps with no 3D skybox, or when the 3d skybox is disabled. (`r_3dsky 0`)
|
|
@@ -2836,18 +2368,14 @@ interface GM {
|
|
|
2836
2368
|
* @source https://wiki.facepunch.com/gmod/GM:SetupSkyboxFog
|
|
2837
2369
|
*/
|
|
2838
2370
|
SetupSkyboxFog(self: GM, scale: number): boolean;
|
|
2839
|
-
}
|
|
2840
2371
|
|
|
2841
|
-
interface GM {
|
|
2842
2372
|
/**
|
|
2843
2373
|
* Allows you to use render.Fog* functions to manipulate world fog.
|
|
2844
2374
|
* @realm client
|
|
2845
2375
|
* @source https://wiki.facepunch.com/gmod/GM:SetupWorldFog
|
|
2846
2376
|
*/
|
|
2847
2377
|
SetupWorldFog(self: GM): boolean;
|
|
2848
|
-
}
|
|
2849
2378
|
|
|
2850
|
-
interface GM {
|
|
2851
2379
|
/**
|
|
2852
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.
|
|
2853
2381
|
*
|
|
@@ -2864,9 +2392,7 @@ interface GM {
|
|
|
2864
2392
|
* @source https://wiki.facepunch.com/gmod/GM:ShouldCollide
|
|
2865
2393
|
*/
|
|
2866
2394
|
ShouldCollide(self: GM, ent1: Entity, ent2: Entity): boolean;
|
|
2867
|
-
}
|
|
2868
2395
|
|
|
2869
|
-
interface GM {
|
|
2870
2396
|
/**
|
|
2871
2397
|
* Called to determine if the [Global.LocalPlayer](https://wiki.facepunch.com/gmod/Global.LocalPlayer) should be drawn.
|
|
2872
2398
|
*
|
|
@@ -2879,9 +2405,7 @@ interface GM {
|
|
|
2879
2405
|
* @source https://wiki.facepunch.com/gmod/GM:ShouldDrawLocalPlayer
|
|
2880
2406
|
*/
|
|
2881
2407
|
ShouldDrawLocalPlayer(self: GM, ply: Player): boolean;
|
|
2882
|
-
}
|
|
2883
2408
|
|
|
2884
|
-
interface GM {
|
|
2885
2409
|
/**
|
|
2886
2410
|
* Called when a player executes `gm_showhelp` console command. (Default bind is F1)
|
|
2887
2411
|
*
|
|
@@ -2889,36 +2413,28 @@ interface GM {
|
|
|
2889
2413
|
* @source https://wiki.facepunch.com/gmod/GM:ShowHelp
|
|
2890
2414
|
*/
|
|
2891
2415
|
ShowHelp(self: GM, ply: Player): void;
|
|
2892
|
-
}
|
|
2893
2416
|
|
|
2894
|
-
interface GM {
|
|
2895
2417
|
/**
|
|
2896
2418
|
* Called when a player executes `gm_showspare1` console command ( Default bind is F3 ).
|
|
2897
2419
|
* @realm shared
|
|
2898
2420
|
* @source https://wiki.facepunch.com/gmod/GM:ShowSpare1
|
|
2899
2421
|
*/
|
|
2900
2422
|
ShowSpare1(self: GM, ply: Player): void;
|
|
2901
|
-
}
|
|
2902
2423
|
|
|
2903
|
-
interface GM {
|
|
2904
2424
|
/**
|
|
2905
2425
|
* Called when a player executes `gm_showspare2` console command ( Default bind is F4 ).
|
|
2906
2426
|
* @realm shared
|
|
2907
2427
|
* @source https://wiki.facepunch.com/gmod/GM:ShowSpare2
|
|
2908
2428
|
*/
|
|
2909
2429
|
ShowSpare2(self: GM, ply: Player): void;
|
|
2910
|
-
}
|
|
2911
2430
|
|
|
2912
|
-
interface GM {
|
|
2913
2431
|
/**
|
|
2914
2432
|
* Called when a player executes `gm_showteam` console command. ( Default bind is F2 )
|
|
2915
2433
|
* @realm shared
|
|
2916
2434
|
* @source https://wiki.facepunch.com/gmod/GM:ShowTeam
|
|
2917
2435
|
*/
|
|
2918
2436
|
ShowTeam(self: GM, ply: Player): void;
|
|
2919
|
-
}
|
|
2920
2437
|
|
|
2921
|
-
interface GM {
|
|
2922
2438
|
/**
|
|
2923
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.
|
|
2924
2440
|
*
|
|
@@ -2926,27 +2442,21 @@ interface GM {
|
|
|
2926
2442
|
* @source https://wiki.facepunch.com/gmod/GM:ShutDown
|
|
2927
2443
|
*/
|
|
2928
2444
|
ShutDown(self: GM): void;
|
|
2929
|
-
}
|
|
2930
2445
|
|
|
2931
|
-
interface GM {
|
|
2932
2446
|
/**
|
|
2933
2447
|
* Called when the Spawnmenu is Created.
|
|
2934
2448
|
* @realm client
|
|
2935
2449
|
* @source https://wiki.facepunch.com/gmod/GM:SpawnMenuCreated
|
|
2936
2450
|
*/
|
|
2937
2451
|
SpawnMenuCreated(self: GM): void;
|
|
2938
|
-
}
|
|
2939
2452
|
|
|
2940
|
-
interface GM {
|
|
2941
2453
|
/**
|
|
2942
2454
|
* Called when spawn icon is generated.
|
|
2943
2455
|
* @realm client
|
|
2944
2456
|
* @source https://wiki.facepunch.com/gmod/GM:SpawniconGenerated
|
|
2945
2457
|
*/
|
|
2946
2458
|
SpawniconGenerated(self: GM, lastmodel: string, imagename: string, modelsleft: number): void;
|
|
2947
|
-
}
|
|
2948
2459
|
|
|
2949
|
-
interface GM {
|
|
2950
2460
|
/**
|
|
2951
2461
|
* Runs when the user tries to open the chat box.
|
|
2952
2462
|
*
|
|
@@ -2957,9 +2467,7 @@ interface GM {
|
|
|
2957
2467
|
* @source https://wiki.facepunch.com/gmod/GM:StartChat
|
|
2958
2468
|
*/
|
|
2959
2469
|
StartChat(self: GM, isTeamChat: boolean): boolean;
|
|
2960
|
-
}
|
|
2961
2470
|
|
|
2962
|
-
interface GM {
|
|
2963
2471
|
/**
|
|
2964
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.
|
|
2965
2473
|
*
|
|
@@ -2973,27 +2481,21 @@ interface GM {
|
|
|
2973
2481
|
* @source https://wiki.facepunch.com/gmod/GM:StartCommand
|
|
2974
2482
|
*/
|
|
2975
2483
|
StartCommand(self: GM, ply: Player, ucmd: CUserCmd): void;
|
|
2976
|
-
}
|
|
2977
2484
|
|
|
2978
|
-
interface GM {
|
|
2979
2485
|
/**
|
|
2980
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.
|
|
2981
2487
|
* @realm shared
|
|
2982
2488
|
* @source https://wiki.facepunch.com/gmod/GM:StartEntityDriving
|
|
2983
2489
|
*/
|
|
2984
2490
|
StartEntityDriving(self: GM, ent: Entity, ply: Player): void;
|
|
2985
|
-
}
|
|
2986
2491
|
|
|
2987
|
-
interface GM {
|
|
2988
2492
|
/**
|
|
2989
2493
|
* Called when you start a new game via the menu.
|
|
2990
2494
|
* @realm menu
|
|
2991
2495
|
* @source https://wiki.facepunch.com/gmod/GM:StartGame
|
|
2992
2496
|
*/
|
|
2993
2497
|
StartGame(self: GM): void;
|
|
2994
|
-
}
|
|
2995
2498
|
|
|
2996
|
-
interface GM {
|
|
2997
2499
|
/**
|
|
2998
2500
|
* Called every rendered frame on client, except when the game is paused.
|
|
2999
2501
|
*
|
|
@@ -3009,9 +2511,7 @@ interface GM {
|
|
|
3009
2511
|
* @source https://wiki.facepunch.com/gmod/GM:Think
|
|
3010
2512
|
*/
|
|
3011
2513
|
Think(self: GM): void;
|
|
3012
|
-
}
|
|
3013
2514
|
|
|
3014
|
-
interface GM {
|
|
3015
2515
|
/**
|
|
3016
2516
|
* Called every game tick. [engine.TickCount](https://wiki.facepunch.com/gmod/engine.TickCount) is guaranteed to be different between each call.
|
|
3017
2517
|
*
|
|
@@ -3026,9 +2526,7 @@ interface GM {
|
|
|
3026
2526
|
* @source https://wiki.facepunch.com/gmod/GM:Tick
|
|
3027
2527
|
*/
|
|
3028
2528
|
Tick(self: GM): void;
|
|
3029
|
-
}
|
|
3030
2529
|
|
|
3031
|
-
interface GM {
|
|
3032
2530
|
/**
|
|
3033
2531
|
* **NOTE**: Isn't called when CalcMainActivity returns a valid override sequence id
|
|
3034
2532
|
*
|
|
@@ -3038,36 +2536,28 @@ interface GM {
|
|
|
3038
2536
|
* @source https://wiki.facepunch.com/gmod/GM:TranslateActivity
|
|
3039
2537
|
*/
|
|
3040
2538
|
TranslateActivity(self: GM, ply: Player, act: number): number;
|
|
3041
|
-
}
|
|
3042
2539
|
|
|
3043
|
-
interface GM {
|
|
3044
2540
|
/**
|
|
3045
2541
|
* Animation updates (pose params etc) should be done here.
|
|
3046
2542
|
* @realm shared
|
|
3047
2543
|
* @source https://wiki.facepunch.com/gmod/GM:UpdateAnimation
|
|
3048
2544
|
*/
|
|
3049
2545
|
UpdateAnimation(self: GM, ply: Player, velocity: Vector, maxSeqGroundSpeed: number): void;
|
|
3050
|
-
}
|
|
3051
2546
|
|
|
3052
|
-
interface GM {
|
|
3053
2547
|
/**
|
|
3054
2548
|
* Called when user clicks on a VGUI panel.
|
|
3055
2549
|
* @realm client
|
|
3056
2550
|
* @source https://wiki.facepunch.com/gmod/GM:VGUIMousePressAllowed
|
|
3057
2551
|
*/
|
|
3058
2552
|
VGUIMousePressAllowed(self: GM, button: number): boolean;
|
|
3059
|
-
}
|
|
3060
2553
|
|
|
3061
|
-
interface GM {
|
|
3062
2554
|
/**
|
|
3063
2555
|
* Called when a mouse button is pressed on a VGUI element or menu.
|
|
3064
2556
|
* @realm client and menu
|
|
3065
2557
|
* @source https://wiki.facepunch.com/gmod/GM:VGUIMousePressed
|
|
3066
2558
|
*/
|
|
3067
2559
|
VGUIMousePressed(self: GM, pnl: Panel, mouseCode: number): void;
|
|
3068
|
-
}
|
|
3069
2560
|
|
|
3070
|
-
interface GM {
|
|
3071
2561
|
/**
|
|
3072
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.
|
|
3073
2563
|
*
|
|
@@ -3078,9 +2568,7 @@ interface GM {
|
|
|
3078
2568
|
* @source https://wiki.facepunch.com/gmod/GM:VariableEdited
|
|
3079
2569
|
*/
|
|
3080
2570
|
VariableEdited(self: GM, ent: Entity, ply: Player, key: string, val: string, editor: table): void;
|
|
3081
|
-
}
|
|
3082
2571
|
|
|
3083
|
-
interface GM {
|
|
3084
2572
|
/**
|
|
3085
2573
|
* Called when you are driving a vehicle. This hook works just like [GM:Move](https://wiki.facepunch.com/gmod/GM:Move).
|
|
3086
2574
|
*
|
|
@@ -3090,9 +2578,7 @@ interface GM {
|
|
|
3090
2578
|
* @source https://wiki.facepunch.com/gmod/GM:VehicleMove
|
|
3091
2579
|
*/
|
|
3092
2580
|
VehicleMove(self: GM, ply: Player, veh: Vehicle, mv: CMoveData): void;
|
|
3093
|
-
}
|
|
3094
2581
|
|
|
3095
|
-
interface GM {
|
|
3096
2582
|
/**
|
|
3097
2583
|
* Called as a weapon entity is picked up by a player. (Including [Player:Give](https://wiki.facepunch.com/gmod/Player:Give))
|
|
3098
2584
|
*
|
|
@@ -3109,63 +2595,49 @@ interface GM {
|
|
|
3109
2595
|
* @source https://wiki.facepunch.com/gmod/GM:WeaponEquip
|
|
3110
2596
|
*/
|
|
3111
2597
|
WeaponEquip(self: GM, weapon: Weapon, owner: Player): void;
|
|
3112
|
-
}
|
|
3113
2598
|
|
|
3114
|
-
interface GM {
|
|
3115
2599
|
/**
|
|
3116
2600
|
* Called when an addon from the Steam workshop begins downloading. Used by default to place details on the workshop downloading panel.
|
|
3117
2601
|
* @realm menu
|
|
3118
2602
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadFile
|
|
3119
2603
|
*/
|
|
3120
2604
|
WorkshopDownloadFile(self: GM, id: number, imageID: number, title: string, size: number): void;
|
|
3121
|
-
}
|
|
3122
2605
|
|
|
3123
|
-
interface GM {
|
|
3124
2606
|
/**
|
|
3125
2607
|
* Called while an addon from the Steam workshop is downloading. Used by default to update details on the fancy workshop download panel.
|
|
3126
2608
|
* @realm menu
|
|
3127
2609
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadProgress
|
|
3128
2610
|
*/
|
|
3129
2611
|
WorkshopDownloadProgress(self: GM, id: number, imageID: number, title: string, downloaded: number, expected: number): void;
|
|
3130
|
-
}
|
|
3131
2612
|
|
|
3132
|
-
interface GM {
|
|
3133
2613
|
/**
|
|
3134
2614
|
* Called after [GM:WorkshopStart](https://wiki.facepunch.com/gmod/GM:WorkshopStart).
|
|
3135
2615
|
* @realm menu
|
|
3136
2616
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadTotals
|
|
3137
2617
|
*/
|
|
3138
2618
|
WorkshopDownloadTotals(self: GM, remain: number, total: number): void;
|
|
3139
|
-
}
|
|
3140
2619
|
|
|
3141
|
-
interface GM {
|
|
3142
2620
|
/**
|
|
3143
2621
|
* Called when an addon from the Steam workshop finishes downloading. Used by default to update details on the workshop downloading panel.
|
|
3144
2622
|
* @realm menu
|
|
3145
2623
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopDownloadedFile
|
|
3146
2624
|
*/
|
|
3147
2625
|
WorkshopDownloadedFile(self: GM, id: number, title: string): void;
|
|
3148
|
-
}
|
|
3149
2626
|
|
|
3150
|
-
interface GM {
|
|
3151
2627
|
/**
|
|
3152
2628
|
* Called when downloading content from Steam workshop ends. Used by default to hide fancy workshop downloading panel.
|
|
3153
2629
|
* @realm menu
|
|
3154
2630
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopEnd
|
|
3155
2631
|
*/
|
|
3156
2632
|
WorkshopEnd(self: GM): void;
|
|
3157
|
-
}
|
|
3158
2633
|
|
|
3159
|
-
interface GM {
|
|
3160
2634
|
/**
|
|
3161
2635
|
* Called while an addon from the Steam workshop is extracting. Used by default to update details on the fancy workshop download panel.
|
|
3162
2636
|
* @realm menu
|
|
3163
2637
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopExtractProgress
|
|
3164
2638
|
*/
|
|
3165
2639
|
WorkshopExtractProgress(self: GM, id: number, ImageID: number, title: string, percent: number): void;
|
|
3166
|
-
}
|
|
3167
2640
|
|
|
3168
|
-
interface GM {
|
|
3169
2641
|
/**
|
|
3170
2642
|
* Called when downloading content from Steam workshop begins. Used by default to show fancy workshop downloading panel.
|
|
3171
2643
|
*
|
|
@@ -3182,18 +2654,14 @@ interface GM {
|
|
|
3182
2654
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopStart
|
|
3183
2655
|
*/
|
|
3184
2656
|
WorkshopStart(self: GM): void;
|
|
3185
|
-
}
|
|
3186
2657
|
|
|
3187
|
-
interface GM {
|
|
3188
2658
|
/**
|
|
3189
2659
|
* Called when UGC subscription status changes.
|
|
3190
2660
|
* @realm menu
|
|
3191
2661
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopSubscriptionsChanged
|
|
3192
2662
|
*/
|
|
3193
2663
|
WorkshopSubscriptionsChanged(self: GM): void;
|
|
3194
|
-
}
|
|
3195
2664
|
|
|
3196
|
-
interface GM {
|
|
3197
2665
|
/**
|
|
3198
2666
|
* Called when a Workshop Message is received?. Currently, it seems like the message will be **#ugc.mounting** every time.
|
|
3199
2667
|
* When does this exactly get called?. If an addon is subscribed, unsubscribed, error occurs or on any event?
|
|
@@ -3202,9 +2670,7 @@ interface GM {
|
|
|
3202
2670
|
* @source https://wiki.facepunch.com/gmod/GM:WorkshopSubscriptionsMessage
|
|
3203
2671
|
*/
|
|
3204
2672
|
WorkshopSubscriptionsMessage(self: GM, message: string): void;
|
|
3205
|
-
}
|
|
3206
2673
|
|
|
3207
|
-
interface GM {
|
|
3208
2674
|
/**
|
|
3209
2675
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
3210
2676
|
*
|
|
@@ -3215,4 +2681,3 @@ interface GM {
|
|
|
3215
2681
|
*/
|
|
3216
2682
|
WorkshopSubscriptionsProgress(self: GM, num: number, max: number): void;
|
|
3217
2683
|
}
|
|
3218
|
-
|