@tlua/gmod 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/achievementicon.d.tlua +0 -1
- package/types/achievements.d.tlua +15 -16
- package/types/ai.d.tlua +5 -6
- package/types/ai_schedule.d.tlua +0 -1
- package/types/ai_task.d.tlua +0 -1
- package/types/angle.d.tlua +18 -19
- package/types/avatarimage.d.tlua +0 -1
- package/types/awesomium.d.tlua +0 -1
- package/types/baseclass.d.tlua +1 -3
- package/types/bf_read.d.tlua +10 -12
- package/types/bit.d.tlua +11 -12
- package/types/button.d.tlua +0 -1
- package/types/cam.d.tlua +16 -17
- package/types/ceffectdata.d.tlua +31 -33
- package/types/chat.d.tlua +5 -6
- package/types/checkbutton.d.tlua +0 -1
- package/types/cleanup.d.tlua +7 -8
- package/types/cluaemitter.d.tlua +11 -13
- package/types/clualocomotion.d.tlua +39 -41
- package/types/cluaparticle.d.tlua +43 -45
- package/types/cmovedata.d.tlua +46 -48
- package/types/cnavarea.d.tlua +76 -78
- package/types/cnavladder.d.tlua +21 -23
- package/types/cnewparticleeffect.d.tlua +25 -27
- package/types/color.d.tlua +28 -29
- package/types/concommand.d.tlua +4 -5
- package/types/constraint.d.tlua +28 -29
- package/types/construct.d.tlua +1 -2
- package/types/contentheader.d.tlua +1 -3
- package/types/contenticon.d.tlua +7 -9
- package/types/contentsidebar.d.tlua +2 -4
- package/types/contentsidebartoolbox.d.tlua +0 -1
- package/types/contextbase.d.tlua +2 -4
- package/types/controlpanel.d.tlua +11 -14
- package/types/controlpresets.d.tlua +11 -13
- package/types/convar.d.tlua +15 -17
- package/types/cookie.d.tlua +3 -4
- package/types/coroutine.d.tlua +7 -8
- package/types/crecipientfilter.d.tlua +15 -17
- package/types/csent.d.tlua +0 -1
- package/types/csoundpatch.d.tlua +13 -15
- package/types/ctakedamageinfo.d.tlua +32 -34
- package/types/ctrllistbox.d.tlua +0 -1
- package/types/ctrlnumpad.d.tlua +5 -7
- package/types/cusercmd.d.tlua +26 -28
- package/types/custom_entity_fields.d.tlua +0 -1
- package/types/cvars.d.tlua +6 -7
- package/types/dadjustablemodelpanel.d.tlua +5 -7
- package/types/dalphabar.d.tlua +1 -3
- package/types/dbinder.d.tlua +2 -4
- package/types/dbubblecontainer.d.tlua +0 -2
- package/types/dbutton.d.tlua +6 -8
- package/types/dcategoryheader.d.tlua +0 -1
- package/types/dcategorylist.d.tlua +0 -1
- package/types/dcheckbox.d.tlua +3 -5
- package/types/dcheckboxlabel.d.tlua +9 -10
- package/types/dcollapsiblecategory.d.tlua +21 -23
- package/types/dcolorbutton.d.tlua +5 -7
- package/types/dcolorcombo.d.tlua +3 -5
- package/types/dcolorcube.d.tlua +11 -13
- package/types/dcolormixer.d.tlua +25 -27
- package/types/dcolorpalette.d.tlua +21 -23
- package/types/dcolumnsheet.d.tlua +3 -5
- package/types/dcombobox.d.tlua +15 -17
- package/types/ddragbase.d.tlua +11 -13
- package/types/ddrawer.d.tlua +6 -8
- package/types/debug.d.tlua +16 -19
- package/types/debugoverlay.d.tlua +11 -12
- package/types/dentityproperties.d.tlua +3 -5
- package/types/derma.d.tlua +10 -11
- package/types/dexpandbutton.d.tlua +1 -3
- package/types/dfilebrowser.d.tlua +20 -21
- package/types/dform.d.tlua +16 -18
- package/types/dframe.d.tlua +24 -25
- package/types/dgrid.d.tlua +9 -11
- package/types/dhorizontaldivider.d.tlua +18 -20
- package/types/dhorizontalscroller.d.tlua +9 -11
- package/types/dhscrollbar.d.tlua +9 -11
- package/types/dhtml.d.tlua +6 -8
- package/types/dhtmlcontrols.d.tlua +5 -6
- package/types/diconbrowser.d.tlua +9 -11
- package/types/diconlayout.d.tlua +16 -18
- package/types/dimage.d.tlua +17 -20
- package/types/dimagebutton.d.tlua +9 -10
- package/types/dkillicon.d.tlua +0 -1
- package/types/dlabel.d.tlua +31 -33
- package/types/dlabeleditable.d.tlua +3 -5
- package/types/dlabelurl.d.tlua +8 -10
- package/types/dlistbox.d.tlua +6 -8
- package/types/dlistboxitem.d.tlua +2 -4
- package/types/dlistlayout.d.tlua +0 -1
- package/types/dlistview.d.tlua +32 -34
- package/types/dlistview_column.d.tlua +12 -14
- package/types/dlistview_columnplain.d.tlua +0 -1
- package/types/dlistview_draggerbar.d.tlua +0 -1
- package/types/dlistview_line.d.tlua +11 -13
- 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 +23 -28
- package/types/dmenubar.d.tlua +2 -7
- package/types/dmenuoption.d.tlua +11 -13
- package/types/dmenuoptioncvar.d.tlua +4 -6
- package/types/dmodelpanel.d.tlua +20 -22
- package/types/dmodelselect.d.tlua +0 -2
- package/types/dmodelselectmulti.d.tlua +0 -2
- package/types/dnotify.d.tlua +8 -10
- package/types/dnumberscratch.d.tlua +24 -26
- package/types/dnumberwang.d.tlua +14 -16
- package/types/dnumpad.d.tlua +0 -1
- package/types/dnumslider.d.tlua +17 -18
- package/types/dpanel.d.tlua +12 -14
- package/types/dpanellist.d.tlua +11 -12
- package/types/dpaneloverlay.d.tlua +5 -7
- package/types/dpanelselect.d.tlua +0 -1
- package/types/dpanpanel.d.tlua +4 -6
- package/types/dprogress.d.tlua +1 -3
- package/types/dproperties.d.tlua +2 -4
- package/types/dproperty_boolean.d.tlua +0 -1
- package/types/dproperty_combo.d.tlua +1 -3
- package/types/dproperty_entity.d.tlua +0 -1
- package/types/dproperty_float.d.tlua +0 -1
- package/types/dproperty_generic.d.tlua +3 -5
- package/types/dproperty_int.d.tlua +0 -1
- package/types/dproperty_vectorcolor.d.tlua +0 -1
- package/types/dpropertysheet.d.tlua +15 -17
- package/types/dragndrop.d.tlua +10 -11
- package/types/draw.d.tlua +10 -12
- package/types/drgbpicker.d.tlua +2 -4
- package/types/drive.d.tlua +11 -13
- package/types/dscrollbargrip.d.tlua +0 -1
- package/types/dscrollpanel.d.tlua +10 -11
- package/types/dshape.d.tlua +5 -7
- package/types/dsizetocontents.d.tlua +3 -5
- package/types/dslider.d.tlua +26 -28
- package/types/dsprite.d.tlua +7 -9
- package/types/dtab.d.tlua +6 -8
- package/types/dtextentry.d.tlua +41 -43
- package/types/dtilelayout.d.tlua +19 -21
- package/types/dtooltip.d.tlua +4 -6
- package/types/dtree.d.tlua +14 -16
- package/types/dtree_node.d.tlua +66 -68
- package/types/dtree_node_button.d.tlua +0 -1
- package/types/duplicator.d.tlua +29 -31
- package/types/dverticaldivider.d.tlua +21 -23
- package/types/dvscrollbar.d.tlua +9 -11
- package/types/editablepanel.d.tlua +0 -1
- package/types/effect.d.tlua +2 -4
- package/types/effects.d.tlua +6 -7
- package/types/engine.d.tlua +21 -22
- package/types/entity.d.tlua +643 -674
- package/types/ents.d.tlua +19 -25
- package/types/enums.d.tlua +0 -1
- package/types/file.d.tlua +39 -40
- 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 +7 -8
- package/types/game.d.tlua +39 -40
- package/types/gameevent.d.tlua +0 -1
- package/types/gamemode.d.tlua +2 -4
- package/types/global.d.tlua +0 -18
- package/types/gm.d.tlua +266 -268
- package/types/gmod.d.tlua +0 -1
- package/types/gmsave.d.tlua +4 -5
- package/types/gui.d.tlua +21 -22
- package/types/gwen.d.tlua +3 -4
- package/types/halo.d.tlua +2 -3
- package/types/hammer.d.tlua +0 -1
- package/types/hook.d.tlua +4 -5
- package/types/html.d.tlua +0 -1
- package/types/http.d.tlua +1 -2
- package/types/iconeditor.d.tlua +9 -11
- package/types/igmodaudiochannel.d.tlua +40 -42
- package/types/imagecheckbox.d.tlua +2 -4
- package/types/imaterial.d.tlua +25 -27
- package/types/imesh.d.tlua +4 -6
- package/types/input.d.tlua +22 -25
- package/types/invalidateinternalentitycache.d.tlua +0 -1
- package/types/irestore.d.tlua +8 -10
- package/types/isave.d.tlua +8 -10
- package/types/itexture.d.tlua +9 -11
- package/types/ivideowriter.d.tlua +4 -6
- package/types/jit.d.tlua +16 -17
- package/types/killicon.d.tlua +7 -8
- package/types/label.d.tlua +0 -1
- package/types/language.d.tlua +1 -2
- package/types/list.d.tlua +8 -9
- package/types/makeballoon.d.tlua +0 -1
- package/types/markup.d.tlua +2 -3
- package/types/markupobject.d.tlua +4 -6
- package/types/material.d.tlua +0 -1
- package/types/math.d.tlua +83 -84
- package/types/matproxy.d.tlua +3 -4
- package/types/matselect.d.tlua +9 -11
- package/types/menu.d.tlua +0 -1
- package/types/menubar.d.tlua +2 -3
- package/types/mesh.d.tlua +19 -20
- package/types/modelimage.d.tlua +0 -1
- package/types/motionsensor.d.tlua +10 -11
- package/types/navmesh.d.tlua +26 -27
- package/types/net.d.tlua +51 -53
- package/types/nextbot.d.tlua +34 -37
- package/types/notification.d.tlua +2 -3
- package/types/npc.d.tlua +180 -182
- package/types/numpad.d.tlua +7 -8
- package/types/os.d.tlua +3 -5
- package/types/package.d.tlua +0 -1
- package/types/panel.d.tlua +329 -331
- package/types/panellist.d.tlua +0 -1
- package/types/pathfollower.d.tlua +30 -32
- package/types/permissions.d.tlua +6 -7
- package/types/physcollide.d.tlua +2 -4
- package/types/physenv.d.tlua +11 -12
- package/types/physobj.d.tlua +77 -79
- package/types/pixelvis_handle_t.d.tlua +0 -1
- package/types/player.d.tlua +288 -293
- package/types/player_manager.d.tlua +13 -14
- package/types/preseteditor.d.tlua +0 -1
- package/types/presets.d.tlua +6 -7
- package/types/projectedtexture.d.tlua +47 -49
- package/types/properties.d.tlua +5 -6
- package/types/propselect.d.tlua +3 -5
- package/types/radiobutton.d.tlua +0 -1
- package/types/render.d.tlua +142 -143
- package/types/resource.d.tlua +2 -3
- package/types/richtext.d.tlua +0 -1
- package/types/sandbox.d.tlua +52 -54
- package/types/saverestore.d.tlua +12 -13
- package/types/schedule.d.tlua +5 -7
- package/types/scripted_ents.d.tlua +9 -12
- package/types/search.d.tlua +1 -2
- package/types/serverlist.d.tlua +7 -8
- package/types/slidebar.d.tlua +0 -1
- package/types/slider.d.tlua +0 -1
- package/types/sound.d.tlua +10 -11
- package/types/spawnicon.d.tlua +6 -8
- package/types/spawnmenu.d.tlua +23 -25
- package/types/spawnmenucontentpanel.d.tlua +3 -5
- package/types/sql.d.tlua +9 -10
- package/types/stack.d.tlua +4 -6
- package/types/steamworks.d.tlua +18 -19
- package/types/string.d.tlua +46 -50
- package/types/structures.d.tlua +0 -7
- package/types/surface.d.tlua +34 -35
- package/types/surfaceinfo.d.tlua +4 -6
- package/types/system.d.tlua +10 -11
- package/types/table.d.tlua +45 -48
- package/types/task.d.tlua +8 -10
- package/types/team.d.tlua +19 -20
- package/types/textentry.d.tlua +0 -1
- package/types/tgaimage.d.tlua +0 -1
- package/types/timer.d.tlua +14 -15
- package/types/tool.d.tlua +42 -46
- package/types/ugcpublishwindow.d.tlua +7 -9
- package/types/umsg.d.tlua +12 -13
- package/types/undo.d.tlua +10 -11
- package/types/urllabel.d.tlua +0 -1
- package/types/usermessage.d.tlua +2 -3
- package/types/utf8.d.tlua +7 -8
- package/types/util.d.tlua +90 -95
- package/types/vector.d.tlua +36 -37
- package/types/vehicle.d.tlua +48 -51
- package/types/vgui.d.tlua +14 -19
- package/types/video.d.tlua +0 -1
- package/types/vmatrix.d.tlua +35 -36
- package/types/weapon.d.tlua +81 -84
- package/types/weapons.d.tlua +5 -7
- package/types/widgets.d.tlua +1 -2
- package/types/workshopfilebase.d.tlua +4 -6
package/types/weapon.d.tlua
CHANGED
|
@@ -14,18 +14,21 @@ interface Weapon extends Entity {
|
|
|
14
14
|
* @source https://wiki.facepunch.com/gmod/WEAPON:AdjustMouseSensitivity
|
|
15
15
|
*/
|
|
16
16
|
AdjustMouseSensitivity(self: Weapon, defaultSensitivity: number, localFOV: number, defaultFOV: number): number;
|
|
17
|
+
|
|
17
18
|
/**
|
|
18
19
|
* Returns how much of primary ammo the player has.
|
|
19
20
|
* @realm shared
|
|
20
21
|
* @source https://wiki.facepunch.com/gmod/WEAPON:Ammo1
|
|
21
22
|
*/
|
|
22
23
|
Ammo1(self: Weapon): number;
|
|
24
|
+
|
|
23
25
|
/**
|
|
24
26
|
* Returns how much of secondary ammo the player has.
|
|
25
27
|
* @realm shared
|
|
26
28
|
* @source https://wiki.facepunch.com/gmod/WEAPON:Ammo2
|
|
27
29
|
*/
|
|
28
30
|
Ammo2(self: Weapon): number;
|
|
31
|
+
|
|
29
32
|
/**
|
|
30
33
|
* Allows you to adjust player view while this weapon in use.
|
|
31
34
|
*
|
|
@@ -35,30 +38,35 @@ interface Weapon extends Entity {
|
|
|
35
38
|
* @source https://wiki.facepunch.com/gmod/WEAPON:CalcView
|
|
36
39
|
*/
|
|
37
40
|
CalcView(self: Weapon, ply: Player, pos: Vector, ang: Angle, fov: number): (Vector, Angle, number);
|
|
41
|
+
|
|
38
42
|
/**
|
|
39
43
|
* Allows overriding the position and angle of the viewmodel. This hook only works if you haven't overridden [GM:CalcViewModelView](https://wiki.facepunch.com/gmod/GM:CalcViewModelView).
|
|
40
44
|
* @realm client
|
|
41
45
|
* @source https://wiki.facepunch.com/gmod/WEAPON:CalcViewModelView
|
|
42
46
|
*/
|
|
43
47
|
CalcViewModelView(self: Weapon, ViewModel: Entity, OldEyePos: Vector, OldEyeAng: Angle, EyePos: Vector, EyeAng: Angle): (Vector, Angle);
|
|
48
|
+
|
|
44
49
|
/**
|
|
45
50
|
* Called when a Citizen NPC is looking around to a (better) weapon to pickup.
|
|
46
51
|
* @realm server
|
|
47
52
|
* @source https://wiki.facepunch.com/gmod/WEAPON:CanBePickedUpByNPCs
|
|
48
53
|
*/
|
|
49
54
|
CanBePickedUpByNPCs(self: Weapon): boolean;
|
|
55
|
+
|
|
50
56
|
/**
|
|
51
57
|
* Helper function for checking for no ammo.
|
|
52
58
|
* @realm shared
|
|
53
59
|
* @source https://wiki.facepunch.com/gmod/WEAPON:CanPrimaryAttack
|
|
54
60
|
*/
|
|
55
61
|
CanPrimaryAttack(self: Weapon): boolean;
|
|
62
|
+
|
|
56
63
|
/**
|
|
57
64
|
* Helper function for checking for no ammo.
|
|
58
65
|
* @realm shared
|
|
59
66
|
* @source https://wiki.facepunch.com/gmod/WEAPON:CanSecondaryAttack
|
|
60
67
|
*/
|
|
61
68
|
CanSecondaryAttack(self: Weapon): boolean;
|
|
69
|
+
|
|
62
70
|
/**
|
|
63
71
|
* Allows you to use any numbers you want for the ammo display on the HUD.
|
|
64
72
|
*
|
|
@@ -68,6 +76,7 @@ interface Weapon extends Entity {
|
|
|
68
76
|
* @source https://wiki.facepunch.com/gmod/WEAPON:CustomAmmoDisplay
|
|
69
77
|
*/
|
|
70
78
|
CustomAmmoDisplay(self: Weapon): table;
|
|
79
|
+
|
|
71
80
|
/**
|
|
72
81
|
* Called when player has just switched to this weapon.
|
|
73
82
|
*
|
|
@@ -78,6 +87,7 @@ interface Weapon extends Entity {
|
|
|
78
87
|
* @source https://wiki.facepunch.com/gmod/WEAPON:Deploy
|
|
79
88
|
*/
|
|
80
89
|
Deploy(self: Weapon): boolean;
|
|
90
|
+
|
|
81
91
|
/**
|
|
82
92
|
* Called when the crosshair is about to get drawn, and allows you to override it.
|
|
83
93
|
*
|
|
@@ -87,6 +97,7 @@ interface Weapon extends Entity {
|
|
|
87
97
|
* @source https://wiki.facepunch.com/gmod/WEAPON:DoDrawCrosshair
|
|
88
98
|
*/
|
|
89
99
|
DoDrawCrosshair(self: Weapon, x: number, y: number): boolean;
|
|
100
|
+
|
|
90
101
|
/**
|
|
91
102
|
* This hook allows you to draw on screen while this weapon is in use.
|
|
92
103
|
*
|
|
@@ -96,18 +107,21 @@ interface Weapon extends Entity {
|
|
|
96
107
|
* @source https://wiki.facepunch.com/gmod/WEAPON:DrawHUD
|
|
97
108
|
*/
|
|
98
109
|
DrawHUD(self: Weapon): void;
|
|
110
|
+
|
|
99
111
|
/**
|
|
100
112
|
* This hook allows you to draw on screen while this weapon is in use. This hook is called **before** [WEAPON:DrawHUD](https://wiki.facepunch.com/gmod/WEAPON:DrawHUD) and is equivalent of [GM:HUDPaintBackground](https://wiki.facepunch.com/gmod/GM:HUDPaintBackground).
|
|
101
113
|
* @realm client
|
|
102
114
|
* @source https://wiki.facepunch.com/gmod/WEAPON:DrawHUDBackground
|
|
103
115
|
*/
|
|
104
116
|
DrawHUDBackground(self: Weapon): void;
|
|
117
|
+
|
|
105
118
|
/**
|
|
106
119
|
* This hook draws the selection icon in the weapon selection menu.
|
|
107
120
|
* @realm client
|
|
108
121
|
* @source https://wiki.facepunch.com/gmod/WEAPON:DrawWeaponSelection
|
|
109
122
|
*/
|
|
110
123
|
DrawWeaponSelection(self: Weapon, x: number, y: number, width: number, height: number, alpha: number): void;
|
|
124
|
+
|
|
111
125
|
/**
|
|
112
126
|
* Called when we are about to draw the opaque parts of the weapon's world model.
|
|
113
127
|
*
|
|
@@ -120,6 +134,7 @@ interface Weapon extends Entity {
|
|
|
120
134
|
* @source https://wiki.facepunch.com/gmod/WEAPON:DrawWorldModel
|
|
121
135
|
*/
|
|
122
136
|
DrawWorldModel(self: Weapon, flags: number): void;
|
|
137
|
+
|
|
123
138
|
/**
|
|
124
139
|
* Called when we are about to draw the translucent parts of the weapon's world model.
|
|
125
140
|
*
|
|
@@ -132,12 +147,14 @@ interface Weapon extends Entity {
|
|
|
132
147
|
* @source https://wiki.facepunch.com/gmod/WEAPON:DrawWorldModelTranslucent
|
|
133
148
|
*/
|
|
134
149
|
DrawWorldModelTranslucent(self: Weapon, flags: number): void;
|
|
150
|
+
|
|
135
151
|
/**
|
|
136
152
|
* Called when a player or NPC has picked the weapon up.
|
|
137
153
|
* @realm server
|
|
138
154
|
* @source https://wiki.facepunch.com/gmod/WEAPON:Equip
|
|
139
155
|
*/
|
|
140
156
|
Equip(self: Weapon, NewOwner: Entity): void;
|
|
157
|
+
|
|
141
158
|
/**
|
|
142
159
|
* The player has picked up the weapon and has taken the ammo from it.
|
|
143
160
|
* The weapon will be removed immediately after this call.
|
|
@@ -146,6 +163,7 @@ interface Weapon extends Entity {
|
|
|
146
163
|
* @source https://wiki.facepunch.com/gmod/WEAPON:EquipAmmo
|
|
147
164
|
*/
|
|
148
165
|
EquipAmmo(self: Weapon, ply: Player): void;
|
|
166
|
+
|
|
149
167
|
/**
|
|
150
168
|
* This hook allows you to freeze players screen.
|
|
151
169
|
* **NOTE**: Player will still be able to move or shoot
|
|
@@ -155,6 +173,7 @@ interface Weapon extends Entity {
|
|
|
155
173
|
* @source https://wiki.facepunch.com/gmod/WEAPON:FreezeMovement
|
|
156
174
|
*/
|
|
157
175
|
FreezeMovement(self: Weapon): boolean;
|
|
176
|
+
|
|
158
177
|
/**
|
|
159
178
|
* This hook is for NPCs, you return what they should try to do with it.
|
|
160
179
|
* **WARNING**: Calling [NPC:CapabilitiesGet](https://wiki.facepunch.com/gmod/NPC:CapabilitiesGet) in this hook on the same entity can cause infinite loops since that function adds the result of [WEAPON:GetCapabilities](https://wiki.facepunch.com/gmod/WEAPON:GetCapabilities) on top of the return value.
|
|
@@ -164,6 +183,7 @@ interface Weapon extends Entity {
|
|
|
164
183
|
* @source https://wiki.facepunch.com/gmod/WEAPON:GetCapabilities
|
|
165
184
|
*/
|
|
166
185
|
GetCapabilities(self: Weapon): CAP;
|
|
186
|
+
|
|
167
187
|
/**
|
|
168
188
|
* Called when the weapon is used by NPCs to determine how accurate the bullets fired should be.
|
|
169
189
|
*
|
|
@@ -173,36 +193,42 @@ interface Weapon extends Entity {
|
|
|
173
193
|
* @source https://wiki.facepunch.com/gmod/WEAPON:GetNPCBulletSpread
|
|
174
194
|
*/
|
|
175
195
|
GetNPCBulletSpread(self: Weapon, proficiency: number): number;
|
|
196
|
+
|
|
176
197
|
/**
|
|
177
198
|
* Called when the weapon is used by NPCs to tell the NPC how to use this weapon. Controls how long the NPC can or should shoot continuously.
|
|
178
199
|
* @realm server
|
|
179
200
|
* @source https://wiki.facepunch.com/gmod/WEAPON:GetNPCBurstSettings
|
|
180
201
|
*/
|
|
181
202
|
GetNPCBurstSettings(self: Weapon): (number, number, number);
|
|
203
|
+
|
|
182
204
|
/**
|
|
183
205
|
* Called when the weapon is used by NPCs to tell the NPC how to use this weapon. Controls amount of time the NPC can rest (not shoot) between bursts.
|
|
184
206
|
* @realm server
|
|
185
207
|
* @source https://wiki.facepunch.com/gmod/WEAPON:GetNPCRestTimes
|
|
186
208
|
*/
|
|
187
209
|
GetNPCRestTimes(self: Weapon): (number, number);
|
|
210
|
+
|
|
188
211
|
/**
|
|
189
212
|
* Allows you to override where the tracer effect comes from. ( Visual bullets )
|
|
190
213
|
* @realm client
|
|
191
214
|
* @source https://wiki.facepunch.com/gmod/WEAPON:GetTracerOrigin
|
|
192
215
|
*/
|
|
193
216
|
GetTracerOrigin(self: Weapon): Vector;
|
|
217
|
+
|
|
194
218
|
/**
|
|
195
219
|
* This hook allows you to adjust view model position and angles.
|
|
196
220
|
* @realm client
|
|
197
221
|
* @source https://wiki.facepunch.com/gmod/WEAPON:GetViewModelPosition
|
|
198
222
|
*/
|
|
199
223
|
GetViewModelPosition(self: Weapon, EyePos: Vector, EyeAng: Angle): (Vector, Angle);
|
|
224
|
+
|
|
200
225
|
/**
|
|
201
226
|
* This hook determines which parts of the HUD to draw.
|
|
202
227
|
* @realm client
|
|
203
228
|
* @source https://wiki.facepunch.com/gmod/WEAPON:HUDShouldDraw
|
|
204
229
|
*/
|
|
205
230
|
HUDShouldDraw(self: Weapon, element: string): boolean;
|
|
231
|
+
|
|
206
232
|
/**
|
|
207
233
|
* Called when the weapon tries to holster. Return true to allow the weapon to
|
|
208
234
|
* holster. This has no effect if the weapon was switched away from using
|
|
@@ -212,6 +238,7 @@ interface Weapon extends Entity {
|
|
|
212
238
|
* @source https://wiki.facepunch.com/gmod/WEAPON:Holster
|
|
213
239
|
*/
|
|
214
240
|
Holster(self: Weapon, weapon?: Weapon): boolean;
|
|
241
|
+
|
|
215
242
|
/**
|
|
216
243
|
* Called internally during `TASK_RANGE_ATTACK1 --> OnRangeAttack1`. This allows you to separate your SWEPs primary firing function from players and NPCs.
|
|
217
244
|
*
|
|
@@ -224,6 +251,7 @@ interface Weapon extends Entity {
|
|
|
224
251
|
* @source https://wiki.facepunch.com/gmod/WEAPON:NPCShoot_Primary
|
|
225
252
|
*/
|
|
226
253
|
NPCShoot_Primary(self: Weapon, shootPos?: Vector, shootDir?: Vector): void;
|
|
254
|
+
|
|
227
255
|
/**
|
|
228
256
|
* A utility function to seperate your SWEPs secondary firing from players.
|
|
229
257
|
*
|
|
@@ -234,6 +262,7 @@ interface Weapon extends Entity {
|
|
|
234
262
|
* @source https://wiki.facepunch.com/gmod/WEAPON:NPCShoot_Secondary
|
|
235
263
|
*/
|
|
236
264
|
NPCShoot_Secondary(self: Weapon, shootPos?: Vector, shootDir?: Vector): void;
|
|
265
|
+
|
|
237
266
|
/**
|
|
238
267
|
* Called when weapon is dropped by [Player:DropWeapon](https://wiki.facepunch.com/gmod/Player:DropWeapon).
|
|
239
268
|
*
|
|
@@ -243,6 +272,7 @@ interface Weapon extends Entity {
|
|
|
243
272
|
* @source https://wiki.facepunch.com/gmod/WEAPON:OnDrop
|
|
244
273
|
*/
|
|
245
274
|
OnDrop(self: Weapon, owner: Entity): void;
|
|
275
|
+
|
|
246
276
|
/**
|
|
247
277
|
* Called when weapon is dropped or picked up by a new player. This can be called clientside for all players on the server if the weapon has no owner and is picked up.
|
|
248
278
|
*
|
|
@@ -252,6 +282,7 @@ interface Weapon extends Entity {
|
|
|
252
282
|
* @source https://wiki.facepunch.com/gmod/WEAPON:OwnerChanged
|
|
253
283
|
*/
|
|
254
284
|
OwnerChanged(self: Weapon): void;
|
|
285
|
+
|
|
255
286
|
/**
|
|
256
287
|
* Called after the view model has been drawn while the weapon in use.
|
|
257
288
|
*
|
|
@@ -268,6 +299,7 @@ interface Weapon extends Entity {
|
|
|
268
299
|
* @source https://wiki.facepunch.com/gmod/WEAPON:PostDrawViewModel
|
|
269
300
|
*/
|
|
270
301
|
PostDrawViewModel(self: Weapon, vm: Entity, weapon: Weapon, ply: Player, flags: number): void;
|
|
302
|
+
|
|
271
303
|
/**
|
|
272
304
|
* Allows you to modify viewmodel while the weapon in use before it is drawn.
|
|
273
305
|
*
|
|
@@ -281,6 +313,7 @@ interface Weapon extends Entity {
|
|
|
281
313
|
* @source https://wiki.facepunch.com/gmod/WEAPON:PreDrawViewModel
|
|
282
314
|
*/
|
|
283
315
|
PreDrawViewModel(self: Weapon, vm: Entity, weapon: Weapon, ply: Player, flags: number): boolean;
|
|
316
|
+
|
|
284
317
|
/**
|
|
285
318
|
* Called when primary attack button ( +attack ) is pressed.
|
|
286
319
|
*
|
|
@@ -299,18 +332,21 @@ interface Weapon extends Entity {
|
|
|
299
332
|
* @source https://wiki.facepunch.com/gmod/WEAPON:PrimaryAttack
|
|
300
333
|
*/
|
|
301
334
|
PrimaryAttack(self: Weapon): void;
|
|
335
|
+
|
|
302
336
|
/**
|
|
303
337
|
* A convenience function that draws the weapon info box, used in [WEAPON:DrawWeaponSelection](https://wiki.facepunch.com/gmod/WEAPON:DrawWeaponSelection).
|
|
304
338
|
* @realm client
|
|
305
339
|
* @source https://wiki.facepunch.com/gmod/WEAPON:PrintWeaponInfo
|
|
306
340
|
*/
|
|
307
341
|
PrintWeaponInfo(self: Weapon, x: number, y: number, alpha: number): void;
|
|
342
|
+
|
|
308
343
|
/**
|
|
309
344
|
* Called when the reload key ( +reload ) is pressed.
|
|
310
345
|
* @realm shared
|
|
311
346
|
* @source https://wiki.facepunch.com/gmod/WEAPON:Reload
|
|
312
347
|
*/
|
|
313
348
|
Reload(self: Weapon): void;
|
|
349
|
+
|
|
314
350
|
/**
|
|
315
351
|
* Called every frame just before [GM:RenderScene](https://wiki.facepunch.com/gmod/GM:RenderScene).
|
|
316
352
|
*
|
|
@@ -324,6 +360,7 @@ interface Weapon extends Entity {
|
|
|
324
360
|
* @source https://wiki.facepunch.com/gmod/WEAPON:RenderScreen
|
|
325
361
|
*/
|
|
326
362
|
RenderScreen(self: Weapon): void;
|
|
363
|
+
|
|
327
364
|
/**
|
|
328
365
|
* Called when secondary attack button ( +attack2 ) is pressed.
|
|
329
366
|
*
|
|
@@ -333,12 +370,14 @@ interface Weapon extends Entity {
|
|
|
333
370
|
* @source https://wiki.facepunch.com/gmod/WEAPON:SecondaryAttack
|
|
334
371
|
*/
|
|
335
372
|
SecondaryAttack(self: Weapon): void;
|
|
373
|
+
|
|
336
374
|
/**
|
|
337
375
|
* Sets the weapon deploy speed. This value needs to match on client and server.
|
|
338
376
|
* @realm shared
|
|
339
377
|
* @source https://wiki.facepunch.com/gmod/WEAPON:SetDeploySpeed
|
|
340
378
|
*/
|
|
341
379
|
SetDeploySpeed(self: Weapon, speed: number): void;
|
|
380
|
+
|
|
342
381
|
/**
|
|
343
382
|
* Sets the hold type of the weapon. This must be called on **both** the server and the client to work properly.
|
|
344
383
|
*
|
|
@@ -349,24 +388,28 @@ interface Weapon extends Entity {
|
|
|
349
388
|
* @source https://wiki.facepunch.com/gmod/WEAPON:SetWeaponHoldType
|
|
350
389
|
*/
|
|
351
390
|
SetWeaponHoldType(self: Weapon, name: string): void;
|
|
391
|
+
|
|
352
392
|
/**
|
|
353
393
|
* A convenient function to shoot bullets.
|
|
354
394
|
* @realm shared
|
|
355
395
|
* @source https://wiki.facepunch.com/gmod/WEAPON:ShootBullet
|
|
356
396
|
*/
|
|
357
397
|
ShootBullet(self: Weapon, damage: number, num_bullets: number, aimcone: number, ammo_type?: string, force?: number, tracer?: number): void;
|
|
398
|
+
|
|
358
399
|
/**
|
|
359
400
|
* A convenience function to create shoot effects.
|
|
360
401
|
* @realm shared
|
|
361
402
|
* @source https://wiki.facepunch.com/gmod/WEAPON:ShootEffects
|
|
362
403
|
*/
|
|
363
404
|
ShootEffects(self: Weapon): void;
|
|
405
|
+
|
|
364
406
|
/**
|
|
365
407
|
* Called to determine if the view model should be drawn or not.
|
|
366
408
|
* @realm client
|
|
367
409
|
* @source https://wiki.facepunch.com/gmod/WEAPON:ShouldDrawViewModel
|
|
368
410
|
*/
|
|
369
411
|
ShouldDrawViewModel(self: Weapon): boolean;
|
|
412
|
+
|
|
370
413
|
/**
|
|
371
414
|
* Should this weapon be dropped when its owner dies?
|
|
372
415
|
*
|
|
@@ -376,18 +419,21 @@ interface Weapon extends Entity {
|
|
|
376
419
|
* @source https://wiki.facepunch.com/gmod/WEAPON:ShouldDropOnDie
|
|
377
420
|
*/
|
|
378
421
|
ShouldDropOnDie(self: Weapon): boolean;
|
|
422
|
+
|
|
379
423
|
/**
|
|
380
424
|
* A convenience function to remove primary ammo from clip.
|
|
381
425
|
* @realm shared
|
|
382
426
|
* @source https://wiki.facepunch.com/gmod/WEAPON:TakePrimaryAmmo
|
|
383
427
|
*/
|
|
384
428
|
TakePrimaryAmmo(self: Weapon, amount: number): void;
|
|
429
|
+
|
|
385
430
|
/**
|
|
386
431
|
* A convenience function to remove secondary ammo from clip.
|
|
387
432
|
* @realm shared
|
|
388
433
|
* @source https://wiki.facepunch.com/gmod/WEAPON:TakeSecondaryAmmo
|
|
389
434
|
*/
|
|
390
435
|
TakeSecondaryAmmo(self: Weapon, amount: number): void;
|
|
436
|
+
|
|
391
437
|
/**
|
|
392
438
|
* Alias of [Weapon:Think](https://wiki.facepunch.com/gmod/Weapon:Think).
|
|
393
439
|
*
|
|
@@ -396,6 +442,7 @@ interface Weapon extends Entity {
|
|
|
396
442
|
* @deprecated Use Weapon:Think instead.
|
|
397
443
|
*/
|
|
398
444
|
Tick(self: Weapon): void;
|
|
445
|
+
|
|
399
446
|
/**
|
|
400
447
|
* Allows to change players field of view while player holds the weapon.
|
|
401
448
|
*
|
|
@@ -406,6 +453,7 @@ interface Weapon extends Entity {
|
|
|
406
453
|
* @source https://wiki.facepunch.com/gmod/WEAPON:TranslateFOV
|
|
407
454
|
*/
|
|
408
455
|
TranslateFOV(self: Weapon, fov: number): number;
|
|
456
|
+
|
|
409
457
|
/**
|
|
410
458
|
* Called straight after the view model has been drawn. This is called before [GM:PostDrawViewModel](https://wiki.facepunch.com/gmod/GM:PostDrawViewModel) and [WEAPON:PostDrawViewModel](https://wiki.facepunch.com/gmod/WEAPON:PostDrawViewModel).
|
|
411
459
|
*
|
|
@@ -419,18 +467,21 @@ interface Weapon extends Entity {
|
|
|
419
467
|
* @source https://wiki.facepunch.com/gmod/WEAPON:ViewModelDrawn
|
|
420
468
|
*/
|
|
421
469
|
ViewModelDrawn(self: Weapon, ViewModel: Entity, flags: number): void;
|
|
470
|
+
|
|
422
471
|
/**
|
|
423
472
|
* Returns whether the weapon allows to being switched from when a better ( [Weapon:GetWeight](https://wiki.facepunch.com/gmod/Weapon:GetWeight) ) weapon is being picked up.
|
|
424
473
|
* @realm shared
|
|
425
474
|
* @source https://wiki.facepunch.com/gmod/Weapon:AllowsAutoSwitchFrom
|
|
426
475
|
*/
|
|
427
476
|
AllowsAutoSwitchFrom(self: Weapon): boolean;
|
|
477
|
+
|
|
428
478
|
/**
|
|
429
479
|
* Returns whether the weapon allows to being switched to when a better ([Weapon:GetWeight](https://wiki.facepunch.com/gmod/Weapon:GetWeight)) weapon is being picked up.
|
|
430
480
|
* @realm shared
|
|
431
481
|
* @source https://wiki.facepunch.com/gmod/Weapon:AllowsAutoSwitchTo
|
|
432
482
|
*/
|
|
433
483
|
AllowsAutoSwitchTo(self: Weapon): boolean;
|
|
484
|
+
|
|
434
485
|
/**
|
|
435
486
|
* Calls a SWEP function on client. Does nothing on client.
|
|
436
487
|
*
|
|
@@ -441,6 +492,7 @@ interface Weapon extends Entity {
|
|
|
441
492
|
* @source https://wiki.facepunch.com/gmod/Weapon:CallOnClient
|
|
442
493
|
*/
|
|
443
494
|
CallOnClient(self: Weapon, functionName: string, data?: string): void;
|
|
495
|
+
|
|
444
496
|
/**
|
|
445
497
|
* Returns how much primary ammo is in the magazine.
|
|
446
498
|
* **NOTE**: This is not shared between clients and will instead return the maximum primary clip size.
|
|
@@ -450,6 +502,7 @@ interface Weapon extends Entity {
|
|
|
450
502
|
* @source https://wiki.facepunch.com/gmod/Weapon:Clip1
|
|
451
503
|
*/
|
|
452
504
|
Clip1(self: Weapon): number;
|
|
505
|
+
|
|
453
506
|
/**
|
|
454
507
|
* Returns how much secondary ammo is in the magazine.
|
|
455
508
|
* **NOTE**: This is not shared between clients and will instead return the maximum secondary clip size.
|
|
@@ -459,6 +512,7 @@ interface Weapon extends Entity {
|
|
|
459
512
|
* @source https://wiki.facepunch.com/gmod/Weapon:Clip2
|
|
460
513
|
*/
|
|
461
514
|
Clip2(self: Weapon): number;
|
|
515
|
+
|
|
462
516
|
/**
|
|
463
517
|
* Forces the weapon to reload while playing given animation.
|
|
464
518
|
* **NOTE**: This will stop the [Weapon:Think](https://wiki.facepunch.com/gmod/Weapon:Think) function from getting called while the weapon is reloading!
|
|
@@ -468,6 +522,7 @@ interface Weapon extends Entity {
|
|
|
468
522
|
* @source https://wiki.facepunch.com/gmod/Weapon:DefaultReload
|
|
469
523
|
*/
|
|
470
524
|
DefaultReload(self: Weapon, act: number): boolean;
|
|
525
|
+
|
|
471
526
|
/**
|
|
472
527
|
* Returns the sequence enumeration number that the weapon is playing.
|
|
473
528
|
*
|
|
@@ -477,48 +532,56 @@ interface Weapon extends Entity {
|
|
|
477
532
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetActivity
|
|
478
533
|
*/
|
|
479
534
|
GetActivity(self: Weapon): number;
|
|
535
|
+
|
|
480
536
|
/**
|
|
481
537
|
* Returns the weapon deploy speed, as set by [Weapon:SetDeploySpeed](https://wiki.facepunch.com/gmod/Weapon:SetDeploySpeed). If not previously set, the value will be polled from the `sv_defaultdeployspeed` [ConVar](https://wiki.facepunch.com/gmod/ConVar).
|
|
482
538
|
* @realm shared
|
|
483
539
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetDeploySpeed
|
|
484
540
|
*/
|
|
485
541
|
GetDeploySpeed(self: Weapon): number;
|
|
542
|
+
|
|
486
543
|
/**
|
|
487
544
|
* Returns the hold type of the weapon.
|
|
488
545
|
* @realm shared
|
|
489
546
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetHoldType
|
|
490
547
|
*/
|
|
491
548
|
GetHoldType(self: Weapon): string;
|
|
549
|
+
|
|
492
550
|
/**
|
|
493
551
|
* Returns maximum primary clip size
|
|
494
552
|
* @realm shared
|
|
495
553
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetMaxClip1
|
|
496
554
|
*/
|
|
497
555
|
GetMaxClip1(self: Weapon): number;
|
|
556
|
+
|
|
498
557
|
/**
|
|
499
558
|
* Returns maximum secondary clip size
|
|
500
559
|
* @realm shared
|
|
501
560
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetMaxClip2
|
|
502
561
|
*/
|
|
503
562
|
GetMaxClip2(self: Weapon): number;
|
|
563
|
+
|
|
504
564
|
/**
|
|
505
565
|
* Gets the next time the weapon can primary fire. ( Can call [WEAPON:PrimaryAttack](https://wiki.facepunch.com/gmod/WEAPON:PrimaryAttack) )
|
|
506
566
|
* @realm shared
|
|
507
567
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetNextPrimaryFire
|
|
508
568
|
*/
|
|
509
569
|
GetNextPrimaryFire(self: Weapon): number;
|
|
570
|
+
|
|
510
571
|
/**
|
|
511
572
|
* Gets the next time the weapon can secondary fire. ( Can call [WEAPON:SecondaryAttack](https://wiki.facepunch.com/gmod/WEAPON:SecondaryAttack) )
|
|
512
573
|
* @realm shared
|
|
513
574
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetNextSecondaryFire
|
|
514
575
|
*/
|
|
515
576
|
GetNextSecondaryFire(self: Weapon): number;
|
|
577
|
+
|
|
516
578
|
/**
|
|
517
579
|
* Gets the primary ammo type of the given weapon.
|
|
518
580
|
* @realm shared
|
|
519
581
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetPrimaryAmmoType
|
|
520
582
|
*/
|
|
521
583
|
GetPrimaryAmmoType(self: Weapon): number;
|
|
584
|
+
|
|
522
585
|
/**
|
|
523
586
|
* Returns the non-internal name of the weapon, that should be for displaying.
|
|
524
587
|
*
|
|
@@ -531,12 +594,14 @@ interface Weapon extends Entity {
|
|
|
531
594
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetPrintName
|
|
532
595
|
*/
|
|
533
596
|
GetPrintName(self: Weapon): string;
|
|
597
|
+
|
|
534
598
|
/**
|
|
535
599
|
* Gets the ammo type of the given weapons secondary fire.
|
|
536
600
|
* @realm shared
|
|
537
601
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetSecondaryAmmoType
|
|
538
602
|
*/
|
|
539
603
|
GetSecondaryAmmoType(self: Weapon): number;
|
|
604
|
+
|
|
540
605
|
/**
|
|
541
606
|
* Returns the slot of the weapon.
|
|
542
607
|
* **NOTE**: The slot numbers start from 0.
|
|
@@ -545,30 +610,35 @@ interface Weapon extends Entity {
|
|
|
545
610
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetSlot
|
|
546
611
|
*/
|
|
547
612
|
GetSlot(self: Weapon): number;
|
|
613
|
+
|
|
548
614
|
/**
|
|
549
615
|
* Returns slot position of the weapon
|
|
550
616
|
* @realm shared
|
|
551
617
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetSlotPos
|
|
552
618
|
*/
|
|
553
619
|
GetSlotPos(self: Weapon): number;
|
|
620
|
+
|
|
554
621
|
/**
|
|
555
622
|
* Returns the view model of the weapon.
|
|
556
623
|
* @realm shared
|
|
557
624
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetWeaponViewModel
|
|
558
625
|
*/
|
|
559
626
|
GetWeaponViewModel(self: Weapon): string;
|
|
627
|
+
|
|
560
628
|
/**
|
|
561
629
|
* Returns the world model of the weapon.
|
|
562
630
|
* @realm shared
|
|
563
631
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetWeaponWorldModel
|
|
564
632
|
*/
|
|
565
633
|
GetWeaponWorldModel(self: Weapon): string;
|
|
634
|
+
|
|
566
635
|
/**
|
|
567
636
|
* Returns the "weight" of the weapon, which is used when deciding which [Weapon](https://wiki.facepunch.com/gmod/Weapon) is better by the engine.
|
|
568
637
|
* @realm shared
|
|
569
638
|
* @source https://wiki.facepunch.com/gmod/Weapon:GetWeight
|
|
570
639
|
*/
|
|
571
640
|
GetWeight(self: Weapon): number;
|
|
641
|
+
|
|
572
642
|
/**
|
|
573
643
|
* Returns whether the weapon has ammo left or not. It will return false when there's no ammo left in the magazine **and** when there's no reserve ammo left.
|
|
574
644
|
*
|
|
@@ -579,30 +649,35 @@ interface Weapon extends Entity {
|
|
|
579
649
|
* @source https://wiki.facepunch.com/gmod/Weapon:HasAmmo
|
|
580
650
|
*/
|
|
581
651
|
HasAmmo(self: Weapon): boolean;
|
|
652
|
+
|
|
582
653
|
/**
|
|
583
654
|
* Returns whenever the weapon is carried by the local player.
|
|
584
655
|
* @realm client
|
|
585
656
|
* @source https://wiki.facepunch.com/gmod/Weapon:IsCarriedByLocalPlayer
|
|
586
657
|
*/
|
|
587
658
|
IsCarriedByLocalPlayer(self: Weapon): boolean;
|
|
659
|
+
|
|
588
660
|
/**
|
|
589
661
|
* Returns whether the weapon is visible. The term visibility is not exactly what gets checked here, first it checks if the owner is a player, then checks if the active view model has EF_NODRAW flag NOT set.
|
|
590
662
|
* @realm shared
|
|
591
663
|
* @source https://wiki.facepunch.com/gmod/Weapon:IsWeaponVisible
|
|
592
664
|
*/
|
|
593
665
|
IsWeaponVisible(self: Weapon): boolean;
|
|
666
|
+
|
|
594
667
|
/**
|
|
595
668
|
* Returns the time since this weapon last fired a bullet with [Entity:FireBullets](https://wiki.facepunch.com/gmod/Entity:FireBullets) in seconds. It is not networked.
|
|
596
669
|
* @realm shared
|
|
597
670
|
* @source https://wiki.facepunch.com/gmod/Weapon:LastShootTime
|
|
598
671
|
*/
|
|
599
672
|
LastShootTime(self: Weapon): number;
|
|
673
|
+
|
|
600
674
|
/**
|
|
601
675
|
* Forces weapon to play activity/animation.
|
|
602
676
|
* @realm shared
|
|
603
677
|
* @source https://wiki.facepunch.com/gmod/Weapon:SendWeaponAnim
|
|
604
678
|
*/
|
|
605
679
|
SendWeaponAnim(self: Weapon, act: number): void;
|
|
680
|
+
|
|
606
681
|
/**
|
|
607
682
|
* Sets the activity the weapon is playing.
|
|
608
683
|
*
|
|
@@ -612,18 +687,21 @@ interface Weapon extends Entity {
|
|
|
612
687
|
* @source https://wiki.facepunch.com/gmod/Weapon:SetActivity
|
|
613
688
|
*/
|
|
614
689
|
SetActivity(self: Weapon, act: number): void;
|
|
690
|
+
|
|
615
691
|
/**
|
|
616
692
|
* Lets you change the number of bullets in the given weapons primary clip.
|
|
617
693
|
* @realm shared
|
|
618
694
|
* @source https://wiki.facepunch.com/gmod/Weapon:SetClip1
|
|
619
695
|
*/
|
|
620
696
|
SetClip1(self: Weapon, ammo: number): void;
|
|
697
|
+
|
|
621
698
|
/**
|
|
622
699
|
* Lets you change the number of bullets in the given weapons secondary clip.
|
|
623
700
|
* @realm shared
|
|
624
701
|
* @source https://wiki.facepunch.com/gmod/Weapon:SetClip2
|
|
625
702
|
*/
|
|
626
703
|
SetClip2(self: Weapon, ammo: number): void;
|
|
704
|
+
|
|
627
705
|
/**
|
|
628
706
|
* Sets the hold type of the weapon. This function also calls [WEAPON:SetWeaponHoldType](https://wiki.facepunch.com/gmod/WEAPON:SetWeaponHoldType) and properly networks it to all clients.
|
|
629
707
|
*
|
|
@@ -636,6 +714,7 @@ interface Weapon extends Entity {
|
|
|
636
714
|
* @source https://wiki.facepunch.com/gmod/Weapon:SetHoldType
|
|
637
715
|
*/
|
|
638
716
|
SetHoldType(self: Weapon, name: string): void;
|
|
717
|
+
|
|
639
718
|
/**
|
|
640
719
|
* Sets the time since this weapon last fired in seconds. Used in conjunction with [Weapon:LastShootTime](https://wiki.facepunch.com/gmod/Weapon:LastShootTime).
|
|
641
720
|
*
|
|
@@ -645,6 +724,7 @@ interface Weapon extends Entity {
|
|
|
645
724
|
* @source https://wiki.facepunch.com/gmod/Weapon:SetLastShootTime
|
|
646
725
|
*/
|
|
647
726
|
SetLastShootTime(self: Weapon, time?: number): void;
|
|
727
|
+
|
|
648
728
|
/**
|
|
649
729
|
* Sets when the weapon can fire again. Time should be based on [Global.CurTime](https://wiki.facepunch.com/gmod/Global.CurTime).
|
|
650
730
|
*
|
|
@@ -656,6 +736,7 @@ interface Weapon extends Entity {
|
|
|
656
736
|
* @source https://wiki.facepunch.com/gmod/Weapon:SetNextPrimaryFire
|
|
657
737
|
*/
|
|
658
738
|
SetNextPrimaryFire(self: Weapon, time: number): void;
|
|
739
|
+
|
|
659
740
|
/**
|
|
660
741
|
* Sets when the weapon can alt-fire again. Time should be based on [Global.CurTime](https://wiki.facepunch.com/gmod/Global.CurTime).
|
|
661
742
|
* @realm shared
|
|
@@ -664,87 +745,3 @@ interface Weapon extends Entity {
|
|
|
664
745
|
SetNextSecondaryFire(self: Weapon, time: number): void;
|
|
665
746
|
}
|
|
666
747
|
interface WEAPON extends Weapon {}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|