declare const SERVER: boolean declare const CLIENT: boolean declare const MENU: boolean declare const GAMEMODE: Gamemode declare const GM: Gamemode declare const SWEP: SWEP declare const ENT: _TOOL declare const TOOL: _ENTITY declare const SANDBOX: _SANDBOX declare const EFFECT: _EFFECT type _SWEP = WeaponHooks type _TOOL = ToolHooks type _ENTITY = EntityHooks type _SANDBOX = SandboxHooks type _EFFECT = EffectHooks type Gamemode = IGamemode & GamemodeHooks type Color = IColor & ColorFuncs type Angle = IAngle & AngleFuncs type Vector = IVector & VectorFuncs type Entity = IEntity & EntityFuncs type Weapon = IWeapon & WeaponFuncs type Tool = ITool & ToolFuncs declare interface IVector { x: number, y: number, z: number } declare interface IAngle { pitch: number, yaw: number, roll: number, p: number, y: number, r: number } type UnknownFunc = (this: void, ...args: any[]) => unknown type thread = any type userdata = any type sensor = any type pixelvis_handle_t = any interface table { [key: string]: any; } declare interface Awesomium extends Panel {} declare interface AvatarImage extends Panel {} declare interface Button extends DLabel {} declare interface CheckButton extends Panel {} declare interface CheckButton {} declare interface DCategoryHeader extends DButton {} declare interface DListBox extends DPanelList {} declare interface DListBoxItem extends DLabel {} declare interface DListLayout extends DDragBase {} declare interface DListViewHeaderLabel extends DLabel {} declare interface DListViewLabel extends DLabel {} declare interface DListViewLine extends Panel {} declare interface DListView_ColumnPlain extends Panel {} declare interface DListView_DraggerBar extends DButton {} declare interface DModelSelectMulti extends DPropertySheet {} declare interface DNumPad extends DPanel {} declare interface DPanelSelect extends DPanelList {} declare interface DProperty_Boolean extends DProperty_Generic {} declare interface DProperty_Float extends DProperty_Generic {} declare interface DProperty_Generic extends Panel {} declare interface DProperty_Int extends DProperty_Float {} declare interface DScrollBarGrip extends DPanel {} declare interface DTab extends DButton {} declare interface DTree_Node_Button extends DButton {} declare interface EditablePanel extends Panel {} declare interface FingerVar extends Panel {} declare interface HTML extends Panel {} declare interface Label extends Panel {} declare interface MatSelect extends ContextBase {} declare interface ModelImage extends Panel {} declare interface PanelList extends Panel {} declare interface PresetEditor extends DFrame {} declare interface PresetEditor extends DFrame {} declare interface PropSelect extends ContextBase {} declare interface RadioButton {} declare interface RichText extends Panel {} declare interface SlideBar extends Panel {} declare interface Slider extends Panel {} declare interface SpawnIcon extends DButton {} declare interface TGAImage extends Panel {} declare interface TextEntry extends Panel {} declare interface URLLabel extends Panel {} declare interface fingerposer extends ContextBase {} /** * @type StructuresServerQueryDataCallback * @param {void} this - no description * @param {number} ping - Latency to the server. * @param {string} name - Name of the server * @param {string} desc - "Nice" gamemode name * @param {string} map - Current map * @param {number} players - Total player number ( bot + human ) * @param {number} maxplayers - Maximum reported amount of players * @param {number} botplayers - Amount of bots on the server * @param {boolean} pass - Whether this server has password or not * @param {number} lastplayed - Time when you last played on this server, as UNIX timestamp or 0 * @param {string} address - IP Address of the server * @param {string} gamemode - Gamemode folder name * @param {number} workshopid - Gamemode Steam Workshop ID **/ type StructuresServerQueryDataCallback = (this: void, ping: number, name: string, desc: string, map: string, players: number, maxplayers: number, botplayers: number, pass: boolean, lastplayed: number, address: string, gamemode: string, workshopid: number) => unknown /** * @type StructuresPropertyAddFilter * @param {table} this - the property table * @param {Entity} ent - the entity the player clicked **/ type StructuresPropertyAddFilter = (this: table, ent: Entity) => unknown /** * @type StructuresPropertyAddChecked * @param {table} this - the property table * @param {Entity} ent - the entity the player clicked * @param {table} tr - the player's eye trace **/ type StructuresPropertyAddChecked = (this: table, ent: Entity, tr: table) => unknown /** * @type StructuresPropertyAddAction * @param {table} this - the property table * @param {Entity} ent - the entity the player clicked * @param {table} tr - the player's eye trace **/ type StructuresPropertyAddAction = (this: table, ent: Entity, tr: table) => unknown /** * @type StructuresPropertyAddReceive * @param {table} this - the property table * @param {number} len - the net message length, although this includes the property identifier used internally (the name of the property) * @param {table} ply - the player who clicked the property **/ type StructuresPropertyAddReceive = (this: table, len: number, ply: table) => unknown /** * @type StructuresPropertyAddMenuOpen * @param {table} this - the property table * @param {Panel} option - the menu option * @param {Entity} ent - the entity the player right-clicked * @param {table} tr - the player's eye trace **/ type StructuresPropertyAddMenuOpen = (this: table, option: Panel, ent: Entity, tr: table) => unknown /** * @type StructuresPropertyAddOnCreate * @param {table} this - the property table * @param {Panel} menu - the property menu * @param {Panel} option - the menu option **/ type StructuresPropertyAddOnCreate = (this: table, menu: Panel, option: Panel) => unknown /** * @type StructuresMatProxyDataInit * @param {table} this - no description * @param {string} materialName - no description * @param {table} values - no description **/ type StructuresMatProxyDataInit = (this: table, materialName: string, values: table) => unknown /** * @type StructuresMatProxyDataBind * @param {table} this - no description * @param {string} materialName - no description * @param {Entity} ent - no description **/ type StructuresMatProxyDataBind = (this: table, materialName: string, ent: Entity) => unknown /** * @type StructuresHTTPRequestFailed * @param {void} this - no description * @param {string} reason - no description **/ type StructuresHTTPRequestFailed = (this: void, reason: string) => unknown /** * @type StructuresHTTPRequestSuccess * @param {void} this - no description * @param {number} code - no description * @param {string} body - no description * @param {table} headers - no description **/ type StructuresHTTPRequestSuccess = (this: void, code: number, body: string, headers: table) => unknown /** * @type StructuresBulletCallback * @param {void} this - no description * @param {Entity} attacker - no description * @param {TraceResult} tr - See @TraceResult structure * @param {CTakeDamageInfo} dmgInfo - no description **/ type StructuresBulletCallback = (this: void, attacker: Entity, tr: TraceResult, dmgInfo: CTakeDamageInfo) => unknown /** * @type StructuresAnimationDataOnEnd * @param {void} this - no description * @param {table} animData - This structure. * @param {Panel} tgtPanel - The panel the animation was run on. **/ type StructuresAnimationDataOnEnd = (this: void, animData: table, tgtPanel: Panel) => unknown /** * @type StructuresAnimationDataThink * @param {void} this - no description * @param {table} animData - This structure. * @param {Panel} tgtPanel - The panel the animation is being run on. * @param {number} fraction - The progress fraction of the animation, between 0 and 1. The change rate of this number will not be linear if you are easing. **/ type StructuresAnimationDataThink = (this: void, animData: table, tgtPanel: Panel, fraction: number) => unknown /** * @type PanelSizeToCallback * @param {void} this - no description * @param {AnimationData} animData - The @AnimationData structure that was used. * @param {Panel} pnl - The panel object that was resized. **/ type PanelSizeToCallback = (this: void, animData: AnimationData, pnl: Panel) => unknown /** * @type PanelReceiverFunc * @param {void} this - no description * @param {Panel} pnl - The receiver panel * @param {table} tbl - A table of panels dropped onto receiver panel * @param {boolean} dropped - False if hovering over, true if dropped onto * @param {number} menuIndex - Index of clicked menu item from third argument of @Panel:Receiver * @param {number} x - Cursor pos, relative to the receiver * @param {number} y - Cursor pos, relative to the receiver **/ type PanelReceiverFunc = (this: void, pnl: Panel, tbl: table, dropped: boolean, menuIndex: number, x: number, y: number) => unknown /** * @type PanelNewAnimationCallback * @param {void} this - no description * @param {AnimationData} animTable - The @AnimationData structure that was used. * @param {Panel} tgtPanel - The panel object that was animated. **/ type PanelNewAnimationCallback = (this: void, animTable: AnimationData, tgtPanel: Panel) => unknown /** * @type PanelMoveToCallback * @param {void} this - no description * @param {AnimationData} animData - The @AnimationData structure that was used. * @param {Panel} pnl - The panel object that was moved. **/ type PanelMoveToCallback = (this: void, animData: AnimationData, pnl: Panel) => unknown /** * @type PanelMoveByCallback * @param {void} this - no description * @param {AnimationData} animData - The @AnimationData structure that was used. * @param {Panel} pnl - The panel object that was moved. **/ type PanelMoveByCallback = (this: void, animData: AnimationData, pnl: Panel) => unknown /** * @type PanelAlphaToCallback * @param {void} this - no description * @param {AnimationData} animData - The @AnimationData structure that was used. * @param {Panel} pnl - The panel object whose alpha was changed. **/ type PanelAlphaToCallback = (this: void, animData: AnimationData, pnl: Panel) => unknown /** * @type GlobalDerma_AnimFunc * @param {void} this - no description * @param {Panel} pnl - the panel passed to Derma_Anim * @param {table} anim - the anim table * @param {number} delta - the fraction of the progress through the animation * @param {any} data - optional data passed to the run metatable method **/ type GlobalDerma_AnimFunc = (this: void, pnl: Panel, anim: table, delta: number, data?: any) => unknown /** * @type EntityFuncsSetRagdollBuildFunctionFunc * @param {void} this - no description * @param {Entity} ragdoll - The ragdoll to build **/ type EntityFuncsSetRagdollBuildFunctionFunc = (this: void, ragdoll: Entity) => unknown /** * @type EntityFuncsSetNWVarProxyCallback * @param {void} this - no description * @param {Entity} ent - The entity * @param {string} name - Name of the NWVar that has changed * @param {any} oldval - The old value * @param {any} newval - The new value **/ type EntityFuncsSetNWVarProxyCallback = (this: void, ent: Entity, name: string, oldval: any, newval: any) => unknown /** * @type EntityFuncsNetworkVarNotifyCallback * @param {void} this - no description * @param {Entity} entity - Entity whos variable changed (This will be variable called "self" in ENT:CallBack format.) * @param {string} name - Name of changed variable * @param {any} prev - Old/current variable value * @param {any} next - New variable value that it was set to **/ type EntityFuncsNetworkVarNotifyCallback = (this: void, entity: Entity, name: string, prev: any, next: any) => unknown /** * @type DMenuAddCVarFunc * @param {void} this - no description * @param {DMenuOptionCVar} pnl - The created @DMenuOptionCVar type. **/ type DMenuAddCVarFunc = (this: void, pnl: DMenuOptionCVar) => unknown /** * @type CLuaParticleSetThinkFunctionFunc * @param {void} this - no description * @param {CLuaParticle} particle - The particle the think hook is set on **/ type CLuaParticleSetThinkFunctionFunc = (this: void, particle: CLuaParticle) => unknown /** * @type CLuaParticleSetCollideCallbackFunc * @param {void} this - no description * @param {CLuaParticle} particle - The particle itself * @param {Vector} hitPos - Position of the collision * @param {Vector} hitNormal - Direction of the collision, perpendicular to the hit surface **/ type CLuaParticleSetCollideCallbackFunc = (this: void, particle: CLuaParticle, hitPos: Vector, hitNormal: Vector) => unknown /** * * Attempts to call the first function. If the execution succeeds, this returns *true* followed by the returns of the function. If execution fails, this returns *false* and the second function is called with the error message. * Unlike in @pcall function, the stack is not unwound and can therefore be used for stack analyses with the @debug library. * * @name xpcall * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/xpcall * @bug #1976 Using this function with @include function will break autorefresh. * @bug #2036 This cannot stop errors from hooks called from the engine. * @bug #2498 This does not stop @Error function and @ErrorNoHalt function from sending error messages to the server (if called clientside) or calling the @GamemodeHooks:OnLuaError hook. The success boolean returned will always return true and thus you will not get the error message returned. @error function does not exhibit these behaviours. * @bug #3112 This does not stop errors incurred by @include function. * @param {void} this - no description * @param {function} func - The function to call initially. * @param {function} errorCallback - The function to be called if execution of the first fails; the error message is passed as a string. * You cannot throw an @error function() from this callback: it will have no effect (not even stopping the callback). * @param {any[]} ...arguments - Arguments to pass to the initial function. * @returns {boolean} - Status of the execution; *true* for success, *false* for failure. * @returns {any[]} - The returns of the first function if execution succeeded, otherwise the **first** return value of the error callback. * @tupleReturn **/ declare function xpcall(this: void, func: UnknownFunc, errorCallback: UnknownFunc, ...arguments: any[]): [boolean, any[]] /** * * Translates the specified position and angle into the specified coordinate system. * * @name WorldToLocal * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/WorldToLocal * @param {void} this - no description * @param {Vector} position - The position that should be translated from the current to the new system. * @param {Angle} angle - The angles that should be translated from the current to the new system. * @param {Vector} newSystemOrigin - The origin of the system to translate to. * @param {Angle} newSystemAngles - The angles of the system to translate to. * @returns {Vector} - Local position * @returns {Angle} - Local angles * @tupleReturn **/ declare function WorldToLocal(this: void, position: Vector, angle: Angle, newSystemOrigin: Vector, newSystemAngles: Angle): [Vector, Angle] /** * * Returns a new WorkshopFileBase element * * @name WorkshopFileBase * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/WorkshopFileBase * @internal * @param {void} this - no description * @param {string} namespace - Namespace for the file base * @param {table} requiredTags - Tags required for a Workshop submission to be interacted with by the filebase * @returns {table} - WorkshopFileBase element **/ declare function WorkshopFileBase(this: void, namespace: string, requiredTags: table): table /** * * Creates and returns a @DShape type rectangle GUI element with the given dimensions. * * @name VGUIRect * @realm client * @wiki https://wiki.garrysmod.com/page/Global/VGUIRect * @param {void} this - no description * @param {number} x - X position of the created element * @param {number} y - Y position of the created element * @param {number} w - Width of the created element * @param {number} h - Height of the created element * @returns {DShape} - @DShape type element **/ declare function VGUIRect(this: void, x: number, y: number, w: number, h: number): DShape /** * * Returns the time in seconds it took to render the VGUI. * * @name VGUIFrameTime * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/VGUIFrameTime * @param {void} this - no description * @returns {void} **/ declare function VGUIFrameTime(this: void): void /** * * Briefly displays layout details of the given panel on-screen * * @name VisualizeLayout * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/VisualizeLayout * @param {void} this - no description * @param {Panel} panel - Panel to display layout details of * @returns {void} **/ declare function VisualizeLayout(this: void, panel: Panel): void /** * * Returns a random vector whose components are each between min(inclusive), max(exclusive). * * @name VectorRand * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/VectorRand * @param {void} this - no description * @param {number} min - Min bound inclusive. * @param {number} max - Max bound exclusive. * @returns {Vector} - The random direction vector. **/ declare function VectorRand(this: void, min?: number, max?: number): Vector /** * * Creates a @Vector type object. * * @name Vector * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Vector * @note This function creates a new unique object. It's a good practice to localize your vectors. * @param {void} this - no description * @param {number} x - The x component of the vector. * If this is a @Vector type, this function will return a copy of the given vector. * If this is a @string type, this function will try to parse the string as a vector. If it fails, it returns a 0 vector. * (See examples) * @param {number} y - The y component of the vector. * @param {number} z - The z component of the vector. * @returns {Vector} - The created vector object. **/ declare function Vector(this: void, x?: number, y?: number, z?: number): Vector /** * * Returns if a panel is safe to use. * * @name ValidPanel * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/ValidPanel * @param {void} this - no description * @param {Panel} panel - The panel to validate. * @returns {void} **/ declare function ValidPanel(this: void, panel: Panel): void /** * * Returns whether or not a model is useless by checking that the file path is that of a proper model. * If the string ".mdl" is not found in the model name, the function will return true. * The function will also return true if any of the following strings are found in the given model name: * * "_gesture" * * "_anim" * * "_gst" * * "_pst" * * "_shd" * * "_ss" * * "_posture" * * "_anm" * * "ghostanim" * * "_paths" * * "_shared" * * "anim_" * * "gestures_" * * "shared_ragdoll_" * * @name UTIL_IsUselessModel * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/UTIL IsUselessModel * @param {void} this - no description * @param {string} modelName - The model name to be checked * @returns {boolean} - Whether or not the model is useless **/ declare function UTIL_IsUselessModel(this: void, modelName: string): boolean /** * * Runs JavaScript on the loading screen panel (@GetLoadPanel function). * * @name UpdateLoadPanel * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/UpdateLoadPanel * @param {void} this - no description * @param {string} javascript - JavaScript to run on the loading panel. * @returns {void} **/ declare function UpdateLoadPanel(this: void, javascript: string): void /** * * Returns the current asynchronous in-game time. * * @name UnPredictedCurTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/UnPredictedCurTime * @param {void} this - no description * @returns {number} - The asynchronous in-game time. **/ declare function UnPredictedCurTime(this: void): number /** * * This function takes a numeric indexed table and return all the members as a vararg. If specified, it will start at the given index and end at end index. * * @name unpack * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/unpack * @param {void} this - no description * @param {table} tbl - The table to generate the vararg from. * @param {number} startIndex - Which index to start from. Optional. * @param {number} endIndex - Which index to end at. Optional, even if you set StartIndex. * @returns {any[]} - Output values **/ declare function unpack(this: void, tbl: table, startIndex?: number, endIndex?: number): any[] /** * * Gets the associated type ID of the variable. Unlike @type function, this does not work with @no value type - an argument must be provided. * * @name TypeID * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/TypeID * @bug This returns garbage for _LOADLIB objects. * @bug This returns TYPE_NIL for @proto types. * @param {void} this - no description * @param {any} variable - The variable to get the type ID of. * @returns {TYPE} - The type ID of the variable. See the @TYPE enum. **/ declare function TypeID(this: void, variable: any): TYPE /** * * Returns a string representing the name of the type of the passed object. * * @name type * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/type * @param {void} this - no description * @param {any} obj - The object to get the type of. * @returns {string} - The name of the object's type. **/ declare function type(this: void, obj: any): string /** * * Attempts to convert the value to a string. If the value is an object and its metatable has defined the __tostring metamethod, this will call that function. * @print function also uses this functionality. * * @name tostring * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/tostring * @param {void} this - no description * @param {any} value - The object to be converted to a string. * @returns {string} - The string representation of the value. **/ declare function tostring(this: void, value: any): string /** * * Returns "Lua Cache File" if the given file name is in a certain string table, nothing otherwise. * * @name TranslateDownloadableName * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/TranslateDownloadableName * @internal * @param {void} this - no description * @param {string} filename - File name to test * @returns {string} - "Lua Cache File" if the given file name is in a certain string table, nothing otherwise. **/ declare function TranslateDownloadableName(this: void, filename: string): string /** * * Attempts to convert the value to a number. * Returns nil on failure. * * @name tonumber * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/tonumber * @param {void} this - no description * @param {any} value - The value to convert. Can be a number or string. * @param {number} base - The [numeric base](https://en.wikipedia.org/wiki/Radix) used in the string. Can be any integer between 2 and 36, inclusive. * @returns {number} - The numeric representation of the value with the given base, or nil if the conversion failed. **/ declare function tonumber(this: void, value: any, base?: number): number /** * * Toggles whether or not the named map is favorited in the new game list. * * @name ToggleFavourite * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/ToggleFavourite * @param {void} this - no description * @param {string} map - Map to toggle favorite. * @returns {void} **/ declare function ToggleFavourite(this: void, map: string): void /** * * Returns a sine value that fluctuates based on @CurTime function. The value returned will be between the start value plus/minus the range value. * * @name TimedSin * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/TimedSin * @bug The range arguments don't work as intended. The existing (bugged) behavior is documented below. * @param {void} this - no description * @param {number} frequency - The frequency of fluctuation, in [hertz](https://en.wikipedia.org/wiki/hertz) * @param {number} origin - The center value of the sine wave. * @param {number} max - This argument's distance from origin defines the size of the full range of the sine wave. For example, if origin is 3 and max is 5, then the full range of the sine wave is 5-3 = 2. 3 is the center point of the sine wave, so the sine wave will range between 2 and 4. * @param {number} offset - Offset variable that doesn't affect the rate of change, but causes the returned value to be offset by time * @returns {number} - Sine value **/ declare function TimedSin(this: void, frequency: number, origin: number, max: number, offset: number): number /** * * Attempts to return an appropriate boolean for the given value * * @name tobool * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/tobool * @param {void} this - no description * @param {any} val - The object to be converted to a boolean * @returns {boolean} - **false** for the boolean false.**false** for "false".**false** for "0".**false** for numeric 0.**false** for nil.**true** otherwise. **/ declare function tobool(this: void, val: any): boolean /** * * Returns a cosine value that fluctuates based on the current time * * @name TimedCos * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/TimedCos * @param {void} this - no description * @param {number} frequency - The frequency of fluctuation * @param {number} min - Minimum value * @param {number} max - Maxmimum value * @param {number} offset - Offset variable that doesn't affect the rate of change, but causes the returned value to be offset by time * @returns {number} - Cosine value **/ declare function TimedCos(this: void, frequency: number, min: number, max: number, offset: number): number /** * * Clears focus from any text entries player may have focused. * * @name TextEntryLoseFocus * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/TextEntryLoseFocus * @param {void} this - no description * @returns {void} **/ declare function TextEntryLoseFocus(this: void): void /** * * Returns a TauntCamera object * * @name TauntCamera * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/TauntCamera * @param {void} this - no description * @returns {table} - TauntCamera **/ declare function TauntCamera(this: void): table /** * * Returns a highly accurate time in seconds since the start up, ideal for benchmarking. * * @name SysTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/SysTime * @param {void} this - no description * @returns {number} - Uptime of the server. **/ declare function SysTime(this: void): number /** * * Suppress any networking from the server to the specified player. This is automatically called by the engine before/after a player fires their weapon, reloads, or causes any other similar shared-predicted event to occur. * * @name SuppressHostEvents * @realm server * @wiki https://wiki.garrysmod.com/page/Global/SuppressHostEvents * @param {void} this - no description * @param {Player} suppressPlayer - The player to suppress any networking to. * @returns {void} **/ declare function SuppressHostEvents(this: void, suppressPlayer: Player): void /** * * Returns the ordinal suffix of a given number. * * @name STNDRD * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/STNDRD * @param {void} this - no description * @param {number} num - The number to find the ordinal suffix of. * @returns {string} - suffix **/ declare function STNDRD(this: void, num: number): string /** * * Returns a number based on the Size argument and your screen's width. Alias of @ScreenScale function. * * @name SScale * @realm client * @wiki https://wiki.garrysmod.com/page/Global/SScale * @param {void} this - no description * @param {number} Size - The number you want to scale. * @returns {void} **/ declare function SScale(this: void, Size: number): void /** * * Returns the duration of the sound specified in seconds. * * @name SoundDuration * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SoundDuration * @bug #936 This only works properly for .wav files. * @param {void} this - no description * @param {string} soundName - The sound file path. * @returns {number} - Sound duration in seconds. **/ declare function SoundDuration(this: void, soundName: string): number /** * * Returns the input value in an escaped form so that it can safely be used inside of queries. The returned value is surrounded by quotes unless noQuotes is true. Alias of @sql.SQLStr * * @name SQLStr * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/SQLStr * @param {void} this - no description * @param {string} input - String to be escaped * @param {boolean} noQuotes - Whether the returned value should be surrounded in quotes or not * @returns {string} - Escaped input **/ declare function SQLStr(this: void, input: string, noQuotes?: boolean): string /** * * Runs @util.PrecacheSound and returns the string. * * @name Sound * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Sound * @bug @util.PrecacheSound does nothing and therefore so does this function * @param {void} this - no description * @param {string} soundPath - The soundpath to precache * @returns {string} - The string passed as the first argument **/ declare function Sound(this: void, soundPath: string): string /** * * Returns an iterator function that can be used to loop through a table in order of its **values**. * To sort by specific **value member**, use @SortedPairsByMemberValue function. * To sort by **keys**, use @SortedPairs function. * * @name SortedPairsByValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/SortedPairsByValue * @param {void} this - no description * @param {table} table - Table to create iterator for * @param {boolean} descending - Whether the iterator should iterate in descending order or not * @returns {function} - Iterator function * @returns {table} - The table which will be iterated over * @tupleReturn **/ declare function SortedPairsByValue(this: void, table: table, descending?: boolean): [UnknownFunc, table] /** * * Returns an iterator function that can be used to loop through a table in order of member values, when the values of the table are also tables and contain that member. * To sort by **value**, use @SortedPairsByValue function. * To sort by **keys**, use @SortedPairs function. * * @name SortedPairsByMemberValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/SortedPairsByMemberValue * @param {void} this - no description * @param {table} table - Table to create iterator for. * @param {any} memberKey - Key of the value member to sort by. * @param {boolean} descending - Whether the iterator should iterate in descending order or not. * @returns {function} - Iterator function * @returns {table} - The table the iterator was created for. * @tupleReturn **/ declare function SortedPairsByMemberValue(this: void, table: table, memberKey: any, descending?: boolean): [UnknownFunc, table] /** * * This function can be used in a for loop instead of @pairs function. It sorts all **keys** alphabetically. * For sorting by specific **value member**, use @SortedPairsByMemberValue function. * For sorting by **value**, use @SortedPairsByValue function. * * @name SortedPairs * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/SortedPairs * @param {void} this - no description * @param {table} table - The table to sort * @param {boolean} desc - Reverse the sorting order * @returns {function} - Iterator function * @returns {table} - The table being iterated over * @tupleReturn **/ declare function SortedPairs(this: void, table: table, desc?: boolean): [UnknownFunc, table] /** * * Called by the engine to set which constraint system [](https://developer.valvesoftware.com/wiki/Phys_constraintsystem) the next created constraints should use * * @name SetPhysConstraintSystem * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetPhysConstraintSystem * @param {void} this - no description * @param {Entity} constraintSystem - Constraint system to use * @returns {void} **/ declare function SetPhysConstraintSystem(this: void, constraintSystem: Entity): void /** * * Sets, changes or removes a table's metatable. Returns Tab (the first argument). * * @name setmetatable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/setmetatable * @param {void} this - no description * @param {table} Tab - The table who's metatable to change. * @param {table} Metatable - The metatable to assign.If it's nil, the metatable will be removed. * @returns {table} - The first argument. **/ declare function setmetatable(this: void, Tab: table, Metatable: table): table /** * * Defines a vector to be automatically networked to clients * * @name SetGlobalVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetGlobalVector * @note Running this function clientside will only set it clientside for the client it is called on! * @param {void} this - no description * @param {any} index - Index to identify the global vector with * @param {Vector} vec - Vector to be networked * @returns {void} **/ declare function SetGlobalVector(this: void, index: any, vec: Vector): void /** * * Defines a string with a maximum of 199 characters to be automatically networked to clients * * @name SetGlobalString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetGlobalString * @note Running this function clientside will only set it clientside for the client it is called on! * @param {void} this - no description * @param {any} index - Index to identify the global string with * @param {string} str - String to be networked * @returns {void} **/ declare function SetGlobalString(this: void, index: any, str: string): void /** * * Sets an integer that is shared between the server and all clients. * * @name SetGlobalInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetGlobalInt * @note Running this function clientside will only set it clientside for the client it is called on! * @bug #3374 This function will not round decimal values as it actually networks a float internally. * @param {void} this - no description * @param {string} index - The unique index to identify the global value with. * @param {number} value - The value to set the global value to * @returns {void} **/ declare function SetGlobalInt(this: void, index: string, value: number): void /** * * Defines a floating point number to be automatically networked to clients * * @name SetGlobalFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetGlobalFloat * @note Running this function clientside will only set it clientside for the client it is called on! * @param {void} this - no description * @param {any} index - Index to identify the global float with * @param {number} float - Float to be networked * @returns {void} **/ declare function SetGlobalFloat(this: void, index: any, float: number): void /** * * Defines an entity to be automatically networked to clients * * @name SetGlobalEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetGlobalEntity * @note Running this function clientside will only set it clientside for the client it is called on! * @param {void} this - no description * @param {any} index - Index to identify the global entity with * @param {Entity} ent - Entity to be networked * @returns {void} **/ declare function SetGlobalEntity(this: void, index: any, ent: Entity): void /** * * Defined a boolean to be automatically networked to clients * * @name SetGlobalBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetGlobalBool * @note Running this function clientside will only set it clientside for the client it is called on! * @param {void} this - no description * @param {any} index - Index to identify the global boolean with * @param {boolean} bool - Boolean to be networked * @returns {void} **/ declare function SetGlobalBool(this: void, index: any, bool: boolean): void /** * * Defines an angle to be automatically networked to clients * * @name SetGlobalAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SetGlobalAngle * @note Running this function clientside will only set it clientside for the client it is called on! * @param {void} this - no description * @param {any} index - Index to identify the global angle with * @param {Angle} angle - Angle to be networked * @returns {void} **/ declare function SetGlobalAngle(this: void, index: any, angle: Angle): void /** * * Sets the enviroment for a function or a stack level, if a function is passed, the return value will be the function, otherwise nil. * * @name setfenv * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/setfenv * @param {void} this - no description * @param {function} location - The function to set the enviroment for or a number representing stack level. * @param {table} enviroment - Table to be used as enviroment. * @returns {void} **/ declare function setfenv(this: void, location: UnknownFunc, enviroment: table): void /** * * Adds the given string to the computers clipboard, which can then be pasted in or outside of GMod with Ctrl + V. * * @name SetClipboardText * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/SetClipboardText * @param {void} this - no description * @param {string} text - The text to add to the clipboard. * @returns {void} **/ declare function SetClipboardText(this: void, text: string): void /** * * Prints "ServerLog: PARAM" without a newline, to the server log and console. * * @name ServerLog * @realm server * @wiki https://wiki.garrysmod.com/page/Global/ServerLog * @param {void} this - no description * @param {string} parameter - The value to be printed to console. * @returns {void} **/ declare function ServerLog(this: void, parameter: string): void /** * * Send a usermessage * * @name SendUserMessage * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/SendUserMessage * @note Useless on client, only server can send info to client. * @param {void} this - no description * @param {string} name - The name of the usermessage * @param {CRecipientFilter | table | Player} recipients - Can be a @CRecipientFilter type, @table type or @Player type object. * @param {any[]} ...args - Data to send in the usermessage * @returns {void} **/ declare function SendUserMessage(this: void, name: string, recipients: CRecipientFilter | table | Player, ...args: any[]): void /** * * Used to select single values from a vararg or get the count of values in it. * * @name select * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/select * @param {void} this - no description * @param {number | string} parameter - Can be a @number type or @string type. * * If it's a string and starts with "#", the function will return the amount of values in the vararg (ignoring the rest of the string). * * If it's a positive number, the function will return all values starting from the given index. * * If the number is negative, it will return the amount specified from the end instead of the beginning. This mode will not be compiled by LuaJIT. * @param {any[]} ...vararg - The vararg. These are the values from which you want to select. * @returns {number | any[]} - Returns a @number type or @vararg type, depending on the select method. **/ declare function select(this: void, parameter: number | string, ...vararg: any[]): number | any[] /** * * Gets the width of the game's window (in pixels). * * @name ScrW * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/ScrW * @param {void} this - no description * @returns {number} - The width of the game's window in pixels **/ declare function ScrW(this: void): number /** * * Gets the height of the game's window (in pixels). * * @name ScrH * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/ScrH * @param {void} this - no description * @returns {number} - The height of the game's window in pixels **/ declare function ScrH(this: void): number /** * * Returns a number based on the Size argument and your screen's width. The screen's width is always equal to size 640. This function is primarily used for scaling font sizes. * * @name ScreenScale * @realm client * @wiki https://wiki.garrysmod.com/page/Global/ScreenScale * @param {void} this - no description * @param {number} Size - The number you want to scale. * @returns {void} **/ declare function ScreenScale(this: void, Size: number): void /** * * Overwrites all presets with the supplied table. Used by the @presets library for preset saving * * @name SavePresets * @realm client * @wiki https://wiki.garrysmod.com/page/Global/SavePresets * @param {void} this - no description * @param {table} presets - Presets to be saved * @returns {void} **/ declare function SavePresets(this: void, presets: table): void /** * * This function is used to save the last map and category to which the map belongs as a [cookie](https://wiki.garrysmod.com/page/Category:cookie). * * @name SaveLastMap * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/SaveLastMap * @internal * @param {void} this - no description * @param {string} map - The name of the map. * @param {string} category - The name of the category to which this map belongs. * @returns {void} **/ declare function SaveLastMap(this: void, map: string, category: string): void /** * * Removes entity after delay using @SafeRemoveEntity function * * @name SafeRemoveEntityDelayed * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/SafeRemoveEntityDelayed * @param {void} this - no description * @param {Entity} entity - Entity to be removed * @param {number} delay - Delay for entity removal in seconds * @returns {void} **/ declare function SafeRemoveEntityDelayed(this: void, entity: Entity, delay: number): void /** * * Removes the given entity unless it is a player or the world entity * * @name SafeRemoveEntity * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/SafeRemoveEntity * @param {void} this - no description * @param {Entity} ent - Entity to safely remove. * @returns {void} **/ declare function SafeRemoveEntity(this: void, ent: Entity): void /** * * Alias of @RunString function. * * @name RunStringEx * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/RunStringEx * @param {void} this - no description * @returns {void} **/ declare function RunStringEx(this: void): void /** * * Evaluates and executes the given code, will throw an error on failure. * * @name RunString * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/RunString * @note Local variables are not passed to the given code. * @param {void} this - no description * @param {string} code - The code to execute. * @param {string} identifier - The name that should appear in any error messages caused by this code. * @param {boolean} handleError - If false, this function will return a string containing any error messages instead of throwing an error. * @returns {string} - If handleError is false, the error message (if any). **/ declare function RunString(this: void, code: string, identifier?: string, handleError?: boolean): string /** * * Runs a menu command. Equivalent to @RunConsoleCommand function( "gamemenucommand", command ) unless the command starts with the "engine" keyword in which case it is equivalent to @RunConsoleCommand function( command ). * * @name RunGameUICommand * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/RunGameUICommand * @param {void} this - no description * @param {string} command - The menu command to run * Should be one of the following: * * Disconnect - Disconnects from the current server. * * OpenBenchmarkDialog - Opens the "Video Hardware Stress Test" dialog. * * OpenChangeGameDialog - Does not work in GMod. * * OpenCreateMultiplayerGameDialog - Opens the Source dialog for creating a listen server. * * OpenCustomMapsDialog - Does nothing. * * OpenFriendsDialog - Does nothing. * * OpenGameMenu - Does not work in GMod. * * OpenLoadCommentaryDialog - Opens the "Developer Commentary" selection dialog. Useless in GMod. * * OpenLoadDemoDialog - Does nothing. * * OpenLoadGameDialog - Opens the Source "Load Game" dialog. * * OpenNewGameDialog - Opens the "New Game" dialog. Useless in GMod. * * OpenOptionsDialog - Opens the options dialog. * * OpenPlayerListDialog - Opens the "Mute Players" dialog that shows all players connected to the server and allows to mute them. * * OpenSaveGameDialog - Opens the Source "Save Game" dialog. * * OpenServerBrowser - Opens the legacy server browser. * * Quit - Quits the game *without* confirmation (unlike other Source games). * * QuitNoConfirm - Quits the game without confirmation (like other Source games). * * ResumeGame - Closes the menu and returns to the game. * * engine - Runs a console command. Equivalent to @RunConsoleCommand function( ). * @returns {void} **/ declare function RunGameUICommand(this: void, command: string): void /** * * Executes the given console command with the parameters. * * @name RunConsoleCommand * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/RunConsoleCommand * @note Some commands/convars are blocked from being ran/changed using this function, usually to prevent harm/annoyance to clients. For a list of blocked commands, see [Blocked ConCommands](https://wiki.garrysmod.com/page/Blocked%20ConCommands). * @param {void} this - no description * @param {string} command - The command to be executed. * @param {any[]} ...arguments - The arguments. Note, that unlike @Player:ConCommand, you must pass each argument as a new string, not separating them with a space. * @returns {void} **/ declare function RunConsoleCommand(this: void, command: string, ...arguments: any[]): void /** * * Restores position of your cursor on screen. You can save it by using @RememberCursorPosition function. * * @name RestoreCursorPosition * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/RestoreCursorPosition * @param {void} this - no description * @returns {void} **/ declare function RestoreCursorPosition(this: void): void /** * * First tries to load a binary module with the given name, if unsuccessful, it tries to load a Lua module with the given name. * * @name require * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/require * @bug #1041 Running this function with @pcall function or @xpcall function will still print an error that counts towards sv_kickerrornum. * @param {void} this - no description * @param {string} name - The name of the module to be loaded. * @returns {void} **/ declare function require(this: void, name: string): void /** * * Renders the Super Depth of Field post-process effect * * @name RenderSuperDoF * @realm client * @wiki https://wiki.garrysmod.com/page/Global/RenderSuperDoF * @param {void} this - no description * @param {Vector} viewOrigin - Origin to render the effect at * @param {Angle} viewAngles - Angles to render the effect at * @param {number} viewFOV - Field of View to render the effect at * @returns {void} **/ declare function RenderSuperDoF(this: void, viewOrigin: Vector, viewAngles: Angle, viewFOV: number): void /** * * Renders the stereoscopic post-process effect * * @name RenderStereoscopy * @realm client * @wiki https://wiki.garrysmod.com/page/Global/RenderStereoscopy * @param {void} this - no description * @param {Vector} viewOrigin - Origin to render the effect at * @param {Angle} viewAngles - Angles to render the effect at * @returns {void} **/ declare function RenderStereoscopy(this: void, viewOrigin: Vector, viewAngles: Angle): void /** * * Renders a Depth of Field effect * * @name RenderDoF * @realm client * @wiki https://wiki.garrysmod.com/page/Global/RenderDoF * @param {void} this - no description * @param {Vector} origin - Origin to render the effect at * @param {Angle} angle - Angle to render the effect at * @param {Vector} usableFocusPoint - Point to focus the effect at * @param {number} angleSize - Angle size of the effect * @param {number} radialSteps - Amount of radial steps to render the effect with * @param {number} passes - Amount of render passes * @param {boolean} spin - Whether to cycle the frame or not * @param {table} inView - Table of view data * @param {number} fov - FOV to render the effect with * @returns {void} **/ declare function RenderDoF(this: void, origin: Vector, angle: Angle, usableFocusPoint: Vector, angleSize: number, radialSteps: number, passes: number, spin: boolean, inView: table, fov: number): void /** * * Returns the angle that the clients view is being rendered at * * @name RenderAngles * @realm client * @wiki https://wiki.garrysmod.com/page/Global/RenderAngles * @param {void} this - no description * @returns {Angle} - Render Angles **/ declare function RenderAngles(this: void): Angle /** * * Does the removing of the tooltip panel. Called by @EndTooltip function. * * @name RemoveTooltip * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/RemoveTooltip * @param {void} this - no description * @returns {void} **/ declare function RemoveTooltip(this: void): void /** * * Saves position of your cursor on screen. You can restore it by using * @RestoreCursorPosition function. * * @name RememberCursorPosition * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/RememberCursorPosition * @param {void} this - no description * @returns {void} **/ declare function RememberCursorPosition(this: void): void /** * * Registers a Derma element to be closed the next time @CloseDermaMenus function is called * * @name RegisterDermaMenuForClose * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/RegisterDermaMenuForClose * @param {void} this - no description * @param {Panel} menu - Menu to be registered for closure * @returns {void} **/ declare function RegisterDermaMenuForClose(this: void, menu: Panel): void /** * * Adds a frame to the currently recording demo. * * @name RecordDemoFrame * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/RecordDemoFrame * @internal * @param {void} this - no description * @returns {void} **/ declare function RecordDemoFrame(this: void): void /** * * Creates a new @CRecipientFilter type. * * @name RecipientFilter * @realm server * @wiki https://wiki.garrysmod.com/page/Global/RecipientFilter * @param {void} this - no description * @returns {CRecipientFilter} - The new created recipient filter. **/ declare function RecipientFilter(this: void): CRecipientFilter /** * * Returns the uptime of the game/server in seconds (to at least 4 decimal places) * You should use this function (or SysTime) for timing real-world events such as user interaction, but not for timing game events such as animations. * See also: @CurTime function, @SysTime function * * @name RealTime * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/RealTime * @note This is **not** synchronised or affected by the game. * @note This will be affected by precision loss if the uptime is more than 30+(?) days, and effectively cease to be functional after 50+(?) days. * @param {void} this - no description * @returns {number} - Uptime of the game/server. **/ declare function RealTime(this: void): number /** * * Returns the real frame-time which is unaffected by host_timescale. To be used for GUI effects (for example) * * @name RealFrameTime * @realm client * @wiki https://wiki.garrysmod.com/page/Global/RealFrameTime * @param {void} this - no description * @returns {number} - Real frame time **/ declare function RealFrameTime(this: void): number /** * * Sets the value with the specified key from the table without calling the __newindex method. * * @name rawset * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/rawset * @param {void} this - no description * @param {table} table - Table to get the value from. * @param {any} index - The index to get the value from. * @param {any} value - The value to set for the specified key. * @returns {void} **/ declare function rawset(this: void, table: table, index: any, value: any): void /** * * Gets the value with the specified key from the table without calling the __index method. * * @name rawget * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/rawget * @param {void} this - no description * @param {table} table - Table to get the value from. * @param {any} index - The index to get the value from. * @returns {any} - The value. **/ declare function rawget(this: void, table: table, index: any): any /** * * Compares the two values without calling their __eq operator. * * @name rawequal * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/rawequal * @param {void} this - no description * @param {any} value1 - The first value to compare. * @param {any} value2 - The second value to compare. * @returns {boolean} - Whether or not the two values are equal. **/ declare function rawequal(this: void, value1: any, value2: any): boolean /** * * Returns an iterator function that can be used to loop through a table in random order * * @name RandomPairs * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/RandomPairs * @param {void} this - no description * @param {table} table - Table to create iterator for * @param {boolean} descending - Whether the iterator should iterate descending or not * @returns {function} - Iterator function **/ declare function RandomPairs(this: void, table: table, descending: boolean): UnknownFunc /** * * Runs a function without stopping the whole script on error. * This function is similar to @pcall function and @xpcall function except the errors are still printed and sent to the error handler (i.e. sent to server console if clientside and @GamemodeHooks:OnLuaError called). * * @name ProtectedCall * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/ProtectedCall * @param {void} this - no description * @param {function} func - Function to run * @returns {boolean} - Whether the function executed successfully or not **/ declare function ProtectedCall(this: void, func: UnknownFunc): boolean /** * * Creates a new @ProjectedTexture type. * * @name ProjectedTexture * @realm client * @wiki https://wiki.garrysmod.com/page/Global/ProjectedTexture * @param {void} this - no description * @returns {ProjectedTexture} - Newly created projected texture. **/ declare function ProjectedTexture(this: void): ProjectedTexture /** * * Recursively prints the contents of a table to the console. * * @name PrintTable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/PrintTable * @param {void} this - no description * @param {table} tableToPrint - The table to be printed * @param {number} indent - Number of tabs to start indenting at. Increases by 2 when entering another table. * @param {table} done - Internal argument, you shouldn't normally change this. Used to check if a nested table has already been printed so it doesn't get caught in a loop. * @returns {void} **/ declare function PrintTable(this: void, tableToPrint: table, indent?: number, done?: table): void /** * * Writes every given argument to the console. * Automatically attempts to convert each argument to a string. (See @tostring function) * Separates arguments with a tab character (*"\t"*). * * @name print * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/print * @param {void} this - no description * @param {any[]} ...args - List of values to print. * @returns {void} **/ declare function print(this: void, ...args: any[]): void /** * * Precache a sentence group in a sentences.txt definition file. * * @name PrecacheSentenceGroup * @realm server * @wiki https://wiki.garrysmod.com/page/Global/PrecacheSentenceGroup * @param {void} this - no description * @param {string} group - The group to precache. * @returns {void} **/ declare function PrecacheSentenceGroup(this: void, group: string): void /** * * Displays a message in the chat, console, or center of screen of every player. * This uses the archaic user message system (@umsg library) and hence is limited to ≈250 characters. * * @name PrintMessage * @realm server * @wiki https://wiki.garrysmod.com/page/Global/PrintMessage * @param {void} this - no description * @param {HUD} type - Which type of message should be sent to the players (see @HUD enum) * @param {string} message - Message to be sent to the players * @returns {void} **/ declare function PrintMessage(this: void, type: HUD, message: string): void /** * * Precaches a scene file. * * @name PrecacheScene * @realm server * @wiki https://wiki.garrysmod.com/page/Global/PrecacheScene * @param {void} this - no description * @param {string} scene - Path to the scene file to precache. * @returns {void} **/ declare function PrecacheScene(this: void, scene: string): void /** * * Precaches the particle with the specified name. * * @name PrecacheParticleSystem * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/PrecacheParticleSystem * @param {void} this - no description * @param {string} particleSystemName - The name of the particle system. * @returns {void} **/ declare function PrecacheParticleSystem(this: void, particleSystemName: string): void /** * * Moves the given model to the given position and calculates appropriate camera parameters for rendering the model to an icon. * The output table interacts nicely with @Panel:RebuildSpawnIconEx with a few key renames. * * @name PositionSpawnIcon * @realm client * @wiki https://wiki.garrysmod.com/page/Global/PositionSpawnIcon * @param {void} this - no description * @param {Entity} model - Model that is being rendered to the spawn icon * @param {Vector} position - Position that the model is being rendered at * @param {boolean} noAngles - If true the function won't reset the angles to 0 for the model. * @returns {table} - Table of information of the view which can be used for rendering **/ declare function PositionSpawnIcon(this: void, model: Entity, position: Vector, noAngles: boolean): table /** * * Calls a function and catches an error that can be thrown while the execution of the call. * * @name pcall * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/pcall * @bug #1976 Using this function with @include function will break autorefresh. * @bug #2036 This cannot stop errors from hooks called from the engine. * @bug #2498 This does not stop @Error function and @ErrorNoHalt function from sending error messages to the server (if called clientside) or calling the @GamemodeHooks:OnLuaError hook. The success boolean returned will always return true and thus you will not get the error message returned. @error function does not exhibit these behaviours. * @bug #3112 This does not stop errors incurred by @include function. * @param {void} this - no description * @param {function} func - Function to be executed and of which the errors should be caught of * @param {any[]} ...arguments - Arguments to call the function with. * @returns {boolean} - If the function had no errors occur within it. * @returns {any[]} - If an error occurred, this will be a string containing the error message. Otherwise, this will be the return values of the function passed in. * @tupleReturn **/ declare function pcall(this: void, func: UnknownFunc, ...arguments: any[]): [boolean, any[]] /** * * Returns the player with the matching @Player:UserID. * For a function that returns a player based on their @EntityFuncs:EntIndex, see @Entity function. * For a function that returns a player based on their connection ID, see @player.GetByID. * * @name Player * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/Player * @param {void} this - no description * @param {number} playerIndex - The player index. * @returns {Player} - The retrieved player. **/ declare function Player(this: void, playerIndex: number): Player /** * * Creates a path for the bot to follow * * @name Path * @realm server * @wiki https://wiki.garrysmod.com/page/Global/Path * @param {void} this - no description * @param {string} type - The name of the path to create. * This is going to be "Follow" or "Chase" right now. * @returns {PathFollower} - The path **/ declare function Path(this: void, type: string): PathFollower /** * * Creates a new @CLuaEmitter type. * * @name ParticleEmitter * @realm client * @wiki https://wiki.garrysmod.com/page/Global/ParticleEmitter * @note Do not forget to delete the emitter with @CLuaEmitter:Finish once you are done with it * @param {void} this - no description * @param {Vector} position - The start position of the emitter. * This is only used to determine particle drawing order for translucent particles. * @param {boolean} use3D - Whenever to render the particles in 2D or 3D mode. * @returns {CLuaEmitter} - The new particle emitter. **/ declare function ParticleEmitter(this: void, position: Vector, use3D: boolean): CLuaEmitter /** * * Creates a particle effect with specialized parameters. * * @name ParticleEffectAttach * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/ParticleEffectAttach * @note The particle effect must be precached with @PrecacheParticleSystem function and the file its from must be added via @game.AddParticles before it can be used! * @param {void} this - no description * @param {string} particleName - The name of the particle effect. * @param {PATTACH} attachType - Attachment type using @PATTACH enum. * @param {Entity} entity - The entity to be used in the way specified by the attachType. * @param {number} attachmentID - The id of the attachment to be used in the way specified by the attachType. * @returns {void} **/ declare function ParticleEffectAttach(this: void, particleName: string, attachType: PATTACH, entity: Entity, attachmentID: number): void /** * * Creates a particle effect. * * @name ParticleEffect * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/ParticleEffect * @note The particle effect must be precached with @PrecacheParticleSystem function and the file its from must be added via @game.AddParticles before it can be used! * @param {void} this - no description * @param {string} particleName - The name of the particle effect. * @param {Vector} position - The start position of the effect. * @param {Angle} angles - The orientation of the effect. * @param {Entity} parent - If set, the particle will be parented to the entity. * @returns {void} **/ declare function ParticleEffect(this: void, particleName: string, position: Vector, angles: Angle, parent?: Entity): void /** * * Calls @game.AddParticles and returns given string. * * @name Particle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Particle * @param {void} this - no description * @param {string} file - The particle file. * @returns {string} - The particle file. **/ declare function Particle(this: void, file: string): string /** * * Returns an iterator function(@next function) for a for loop that will return the values of the specified table in an arbitrary order. * For alphabetical **key** order use @SortedPairs function. * For alphabetical **value** order use @SortedPairsByValue function. * * @name pairs * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/pairs * @param {void} this - no description * @param {table} tab - The table to iterate over * @returns {function} - The iterator (@next function) * @returns {table} - The table being iterated over * @returns {any} - **nil** (for the constructor) * @tupleReturn **/ declare function pairs(this: void, tab: table): [UnknownFunc, table, any] /** * * Modifies the given vectors so that all of vector2's axis are larger than vector1's by switching them around. Also known as ordering vectors. * * @name OrderVectors * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/OrderVectors * @note This function will irreversibly modify the given vectors * @param {void} this - no description * @param {Vector} vector1 - Bounding box min resultant * @param {Vector} vector2 - Bounding box max resultant * @returns {void} **/ declare function OrderVectors(this: void, vector1: Vector, vector2: Vector): void /** * * Opens a folder with the given name in the garrysmod folder using the operating system's file browser. * * @name OpenFolder * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/OpenFolder * @bug #1532 This does not work on OSX or Linux. * @param {void} this - no description * @param {string} folder - The subdirectory to open in the garrysmod folder. * @returns {void} **/ declare function OpenFolder(this: void, folder: string): void /** * * Called by the engine when a model has been loaded. Caches model information with the @sql library. * * @name OnModelLoaded * @realm client * @wiki https://wiki.garrysmod.com/page/Global/OnModelLoaded * @internal * @param {void} this - no description * @param {string} modelName - Name of the model. * @param {number} numPostParams - Number of pose parameters the model has. * @param {number} numSeq - Number of sequences the model has. * @param {number} numAttachments - Number of attachments the model has. * @param {number} numBoneControllers - Number of bone controllers the model has. * @param {number} numSkins - Number of skins that the model has. * @param {number} size - Size of the model. * @returns {void} **/ declare function OnModelLoaded(this: void, modelName: string, numPostParams: number, numSeq: number, numAttachments: number, numBoneControllers: number, numSkins: number, size: number): void /** * * Returns the amount of skins the specified model has. * See also @EntityFuncs:SkinCount if you have an entity. * * @name NumModelSkins * @realm client * @wiki https://wiki.garrysmod.com/page/Global/NumModelSkins * @param {void} this - no description * @param {string} modelName - Model to return amount of skins of * @returns {number} - Amount of skins **/ declare function NumModelSkins(this: void, modelName: string): number /** * * Returns the number of files needed from the server you are currently joining. * * @name NumDownloadables * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/NumDownloadables * @param {void} this - no description * @returns {number} - The number of downloadables **/ declare function NumDownloadables(this: void): number /** * * Returns the next key and value pair in a table. * * @name next * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/next * @note Table keys in Lua have no specific order, and will be returned in whatever order they exist in memory. This may not always be in ascending order or alphabetical order. If you need to iterate over an array in order, use @ipairs function. * @param {void} this - no description * @param {table} tab - The table * @param {any} prevKey - The previous key in the table. * @returns {any} - The next key for the table. If the previous key was nil, this will be the first key in the table. If the previous key was the last key in the table, this will be nil. * @returns {any} - The value associated with that key. If the previous key was the last key in the table, this will be nil. * @tupleReturn **/ declare function next(this: void, tab: table, prevKey?: any): [any, any] /** * * Returns a new userdata object. * * @name newproxy * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/newproxy * @param {void} this - no description * @param {boolean} addMetatable - If true, the userdata will get its own metatable automatically. * @returns {userdata} - The newly created userdata. **/ declare function newproxy(this: void, addMetatable?: boolean): userdata /** * * Returns named color defined in resource/ClientScheme.res. * * @name NamedColor * @realm client * @wiki https://wiki.garrysmod.com/page/Global/NamedColor * @param {void} this - no description * @param {string} name - Name of color * @returns {IColor} - A @IColor structure or nil **/ declare function NamedColor(this: void, name: string): IColor /** * * Same as @print function, except it concatinates the arguments without inserting any whitespace in between them. * See also @Msg function, which doesn't add a newline (*"\n"*) at the end. * * @name MsgN * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/MsgN * @param {void} this - no description * @param {any[]} ...args - List of values to print. They can be of any type and will be converted to strings with @tostring function. * @returns {void} **/ declare function MsgN(this: void, ...args: any[]): void /** * * Just like @Msg function, except it can also print colored text, just like @chat.AddText. * * @name MsgC * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/MsgC * @param {void} this - no description * @param {any[]} ...args - Values to print. If you put in a color, all text after that color will be printed in that color. * @returns {void} **/ declare function MsgC(this: void, ...args: any[]): void /** * * Writes every given argument to the console. * Automatically attempts to convert each argument to a string. (See @tostring function) * Unlike @print function, arguments are not separated by anything. They are simply concatenated. * Additionally, a newline isn't added automatically to the end, so subsequent Msg or print operations will continue the same line of text in the console. See @MsgN function for a version that does add a newline. * The text is blue on the server, orange on the client, and green on the menu: [File:msg server client colors.png](https://wiki.garrysmod.com/page/File:msg%20server%20client%20colors.png) * * @name Msg * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Msg * @param {void} this - no description * @param {any[]} ...args - List of values to print. * @returns {void} **/ declare function Msg(this: void, ...args: any[]): void /** * * Works exactly like @Msg function except that, if called on the server, will print to all players consoles plus the server console. * * @name MsgAll * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/MsgAll * @param {void} this - no description * @param {any[]} ...args - List of values to print. * @returns {void} **/ declare function MsgAll(this: void, ...args: any[]): void /** * * Creates a table with the specified module name and sets the function environment for said table. * Any passed loaders are called with the table as an argument. An example of this is @package.seeall. * * @name module * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/module * @param {void} this - no description * @param {string} name - The name of the module. This will be used to access the module table in the runtime environment. * @param {any[]} ...loaders - Calls each function passed with the new table as an argument. * @returns {void} **/ declare function module(this: void, name: string, ...loaders: any[]): void /** * * Runs @util.PrecacheModel and returns the string * * @name Model * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Model * @param {void} this - no description * @param {string} model - The model to precache * @returns {string} - The same string entered as an argument **/ declare function Model(this: void, model: string): string /** * * Returns a @VMatrix type object. * * @name Matrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/Matrix * @param {void} this - no description * @param {table} data - Initial data to initialize the matrix with. Leave empty to initialize an identity matrix. See examples for usage. * Can be a @VMatrix type to copy its data. * @returns {VMatrix} - New matrix. **/ declare function Matrix(this: void, data?: table): VMatrix /** * * Returns a new mesh object. * * @name Mesh * @realm client * @wiki https://wiki.garrysmod.com/page/Global/Mesh * @param {void} this - no description * @param {IMaterial} mat - The material the mesh is intended to be rendered with. It's merely a hint that tells that mesh what vertex format it should use. * @returns {IMesh} - The created object. **/ declare function Mesh(this: void, mat?: IMaterial): IMesh /** * * Translates the specified position and angle from the specified local coordinate system into worldspace coordinates. * If you're working with an entity's local vectors, use @EntityFuncs:LocalToWorld and/or @EntityFuncs:LocalToWorldAngles instead. * See also: @WorldToLocal function, the reverse of this function. * * @name LocalToWorld * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/LocalToWorld * @param {void} this - no description * @param {Vector} localPos - The position vector in the source coordinate system, that should be translated to world coordinates * @param {Angle} localAng - The angle in the source coordinate system, that should be converted to a world angle. If you don't need to convert an angle, you can supply an arbitrary valid angle (e.g. @Angle function()). * @param {Vector} originPos - The origin point of the source coordinate system, in world coordinates * @param {Angle} originAngle - The angles of the source coordinate system, as a world angle * @returns {Vector} - The world position of the supplied local position. * @returns {Angle} - The world angles of the supplied local angle. * @tupleReturn **/ declare function LocalToWorld(this: void, localPos: Vector, localAng: Angle, originPos: Vector, originAngle: Angle): [Vector, Angle] /** * * Either returns the material with the given name, or loads the material interpreting the first argument as the path. * * @name Material * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Material * @note When using .png or .jpg textures, try to make their sizes Power Of 2 (1, 2, 4, 8, 16, 32, 64, etc). While images are no longer scaled to Power of 2 sizes since February 2019, it is a good practice for things like icons, etc. * @note Since paths are relative to the materials folder, resource paths like ../data/MyImage.jpg will work since ".." translates to moving up a parent directory in the file tree. * @note This feature only works when importing .png or .jpeg image files * @param {void} this - no description * @param {string} materialName - The material name or path. The path is relative to the **materials/ ** folder. You do not need to add **materials/ ** to your path. * To retrieve a Lua material created with @CreateMaterial function, just prepend a "!" to the material name. * @param {string} pngParameters - A string containing space separated keywords which will be used to add material parameters. * See [Material Parameters](https://wiki.garrysmod.com/page/Material%20Parameters) for more information. * @returns {IMaterial} - Generated material * @returns {number} - How long it took for the function to run * @tupleReturn **/ declare function Material(this: void, materialName: string, pngParameters?: string): [IMaterial, number] /** * * Returns the player object of the current client. * LocalPlayer() will return NULL until all entities have been initialized. See @GamemodeHooks:InitPostEntity. * * @name LocalPlayer * @realm client * @wiki https://wiki.garrysmod.com/page/Global/LocalPlayer * @param {void} this - no description * @returns {Player} - The player object representing the client. **/ declare function LocalPlayer(this: void): Player /** * * Returns a localisation for the given token, if none is found it will return the default(second) parameter. * * @name Localize * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Localize * @param {void} this - no description * @param {string} localisationToken - The token to find a translation for. * @param {string} def - The default value to be returned if no translation was found. * @returns {void} **/ declare function Localize(this: void, localisationToken: string, def: string): void /** * * Loads all preset settings for the @presets library and returns them in a table * * @name LoadPresets * @realm client * @wiki https://wiki.garrysmod.com/page/Global/LoadPresets * @param {void} this - no description * @returns {table} - Preset data **/ declare function LoadPresets(this: void): table /** * * This function is used to get the last map and category to which the map belongs from the cookie saved with @SaveLastMap function. * * @name LoadLastMap * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/LoadLastMap * @internal * @param {void} this - no description * @returns {void} **/ declare function LoadLastMap(this: void): void /** * * Linear interpolation between two vectors. It is commonly used to smooth movement between two vectors. * * @name LerpVector * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/LerpVector * @param {void} this - no description * @param {number} fraction - Fraction ranging from 0 to 1 * @param {Vector} from - The initial Vector * @param {Vector} to - The desired Vector * @returns {Vector} - The lerped vector. **/ declare function LerpVector(this: void, fraction: number, from: Vector, to: Vector): Vector /** * * Performs a linear interpolation from the start number to the end number. * This function provides a very efficient and easy way to smooth out movements. * * @name Lerp * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Lerp * @param {void} this - no description * @param {number} t - The fraction for finding the result. This number is clamped between 0 and 1. * @param {number} from - The starting number. The result will be equal to this if delta is 0. * @param {number} to - The ending number. The result will be equal to this if delta is 1. * @returns {number} - The result of the linear interpolation, (1 - t) * from + t * to. **/ declare function Lerp(this: void, t: number, from: number, to: number): number /** * * Returns point between first and second angle using given fraction and linear interpolation * * @name LerpAngle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/LerpAngle * @param {void} this - no description * @param {number} ratio - Ratio of progress through values * @param {Angle} angleStart - Angle to begin from * @param {Angle} angleEnd - Angle to end at * @returns {Angle} - angle **/ declare function LerpAngle(this: void, ratio: number, angleStart: Angle, angleEnd: Angle): Angle /** * * Convenience function that creates a DLabel, sets the text, and returns it * * @name Label * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Label * @param {void} this - no description * @param {string} text - The string to set the label's text to * @param {Panel} parent - Optional. The panel to parent the DLabel to * @returns {Panel} - The created DLabel **/ declare function Label(this: void, text: string, parent?: Panel): Panel /** * * Adds workshop related javascript functions to an HTML panel, used by the "Dupes" and "Saves" tabs in the spawnmenu. * * @name JS_Workshop * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/JS Workshop * @param {void} this - no description * @param {Panel} htmlPanel - Panel to add javascript functions to. * @returns {void} **/ declare function JS_Workshop(this: void, htmlPanel: Panel): void /** * * Callback function for when the client's language changes. Called by the engine. * * @name LanguageChanged * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/LanguageChanged * @param {void} this - no description * @param {string} lang - The new language code. * @returns {void} **/ declare function LanguageChanged(this: void, lang: string): void /** * * Adds javascript function 'util.MotionSensorAvailable' to an HTML panel as a method to call Lua's @motionsensor.IsAvailable function. * * @name JS_Utility * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/JS Utility * @param {void} this - no description * @param {Panel} htmlPanel - Panel to add javascript function 'util.MotionSensorAvailable' to. * @returns {void} **/ declare function JS_Utility(this: void, htmlPanel: Panel): void /** * * Joins the server with the specified IP. * * @name JoinServer * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/JoinServer * @param {void} this - no description * @param {string} IP - The IP of the server to join * @returns {void} **/ declare function JoinServer(this: void, IP: string): void /** * * Adds javascript function 'language.Update' to an HTML panel as a method to call Lua's @language.GetPhrase function. * * @name JS_Language * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/JS Language * @param {void} this - no description * @param {Panel} htmlPanel - Panel to add javascript function 'language.Update' to. * @returns {void} **/ declare function JS_Language(this: void, htmlPanel: Panel): void /** * * Returns whether an object is valid or not. (Such as @Entity types, @Panel types, custom @table type objects and more)Checks that an object is not nil, has an IsValid method and if this method returns true. * * @name IsValid * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IsValid * @note Due to vehicles being technically valid the moment they're spawned, also use @Vehicle:IsValidVehicle to make sure they're fully initialized * @param {void} this - no description * @param {any} toBeValidated - The table or object to be validated. * @returns {boolean} - True if the object is valid. **/ declare function IsValid(this: void, toBeValidated: any): boolean /** * * Returns if the passed object is a @Vector type. * * @name isvector * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/isvector * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @Vector type. **/ declare function isvector(this: void, variable: any): boolean /** * * Returns whether or not a model is useless by checking that the file path is that of a proper model. * If the string ".mdl" is not found in the model name, the function will return true. * The function will also return true if any of the following strings are found in the given model name: * * "_gesture" * * "_anim" * * "_gst" * * "_pst" * * "_shd" * * "_ss" * * "_posture" * * "_anm" * * "ghostanim" * * "_paths" * * "_shared" * * "anim_" * * "gestures_" * * "shared_ragdoll_" * * @name IsUselessModel * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IsUselessModel * @param {void} this - no description * @param {string} modelName - The model name to be checked * @returns {boolean} - Whether or not the model is useless **/ declare function IsUselessModel(this: void, modelName: string): boolean /** * * Returns whether or not every element within a table is a valid entity * * @name IsTableOfEntitiesValid * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IsTableOfEntitiesValid * @param {void} this - no description * @param {table} table - Table containing entities to check * @returns {boolean} - All entities valid **/ declare function IsTableOfEntitiesValid(this: void, table: table): boolean /** * * Returns if the passed object is a @table type. * * @name istable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/istable * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @table type. **/ declare function istable(this: void, variable: any): boolean /** * * Returns if the passed object is a @string type. * * @name isstring * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/isstring * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @string type. **/ declare function isstring(this: void, variable: any): boolean /** * * Returns if the passed object is a @number type. * * @name isnumber * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/isnumber * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @number type. **/ declare function isnumber(this: void, variable: any): boolean /** * * Returns if the passed object is a @Panel type. * * @name ispanel * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ispanel * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @Panel type. **/ declare function ispanel(this: void, variable: any): boolean /** * * Checks whether or not a game is currently mounted. Uses data given by @engine.GetGames. * * @name IsMounted * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IsMounted * @param {void} this - no description * @param {string} game - The game string/app ID to check. * @returns {boolean} - True if the game is mounted. **/ declare function IsMounted(this: void, game: string): boolean /** * * Returns true if the client is currently playing either a singleplayer or multiplayer game. * * @name IsInGame * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/IsInGame * @param {void} this - no description * @returns {boolean} - True if we are in a game. **/ declare function IsInGame(this: void): boolean /** * * Returns if the passed object is a @function type. * * @name isfunction * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/isfunction * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @function type. **/ declare function isfunction(this: void, variable: any): boolean /** * * Returns whether the passed object is a @VMatrix type. * * @name ismatrix * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ismatrix * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @VMatrix type. **/ declare function ismatrix(this: void, variable: any): boolean /** * * Returns if the given NPC class name is a friend. * Returns true if the entity name is one of the following: * * "npc_alyx" * * "npc_barney" * * "npc_citizen" * * "npc_dog" * * "npc_eli" * * "npc_fisherman" * * "npc_gman" * * "npc_kleiner" * * "npc_magnusson" * * "npc_monk" * * "npc_mossman" * * "npc_odessa" * * "npc_vortigaunt" * * @name IsFriendEntityName * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IsFriendEntityName * @param {void} this - no description * @param {string} className - Class name of the entity to check * @returns {boolean} - Is a friend **/ declare function IsFriendEntityName(this: void, className: string): boolean /** * * Returns if the passed object is an @Entity type. * * @name isentity * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/isentity * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is an @Entity type. **/ declare function isentity(this: void, variable: any): boolean /** * * Returns if the passed object is an @Entity type. Alias of @isentity function. * * @name IsEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/IsEntity * @param {void} this - no description * @param {any} variable - The variable to check. * @returns {boolean} - True if the variable is an @Entity type. **/ declare function IsEntity(this: void, variable: any): boolean /** * * Returns if the given NPC class name is an enemy. * Returns true if the entity name is one of the following: * * "npc_antlion" * * "npc_antlionguard" * * "npc_antlionguardian" * * "npc_barnacle" * * "npc_breen" * * "npc_clawscanner" * * "npc_combine_s" * * "npc_cscanner" * * "npc_fastzombie" * * "npc_fastzombie_torso" * * "npc_headcrab" * * "npc_headcrab_fast" * * "npc_headcrab_poison" * * "npc_hunter" * * "npc_metropolice" * * "npc_manhack" * * "npc_poisonzombie" * * "npc_strider" * * "npc_stalker" * * "npc_zombie" * * "npc_zombie_torso" * * "npc_zombine" * * @name IsEnemyEntityName * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IsEnemyEntityName * @param {void} this - no description * @param {string} className - Class name of the entity to check * @returns {boolean} - Is an enemy **/ declare function IsEnemyEntityName(this: void, className: string): boolean /** * * Returns whether the given object does or doesn't have a *metatable* of a color. * * @name IsColor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IsColor * @bug #2407 Engine functions (i.e. those not written in plain Lua) that return color objects do not currently set the color metatable and this function will return false if you use it on them. * @param {void} this - no description * @param {any} Object - The object to be tested * @returns {boolean} - Whether the given object is a color or not **/ declare function IsColor(this: void, Object: any): boolean /** * * Returns if the passed object is a @boolean type. * * @name isbool * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/isbool * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is a @boolean type. **/ declare function isbool(this: void, variable: any): boolean /** * * Returns if the passed object is an @Angle type. * * @name isangle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/isangle * @param {void} this - no description * @param {any} variable - The variable to perform the type check for. * @returns {boolean} - True if the variable is an @Angle type. **/ declare function isangle(this: void, variable: any): boolean /** * * Returns an iterator function for a for loop, to return ordered key-value pairs from a table. * This will only iterate though **numerical** keys, and these must also be **sequential**; starting at 1 with no gaps. * For unordered pairs, see @pairs function. * For pairs sorted by key in alphabetical order, see @SortedPairs function. * * @name ipairs * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ipairs * @param {void} this - no description * @param {table} tab - The table to iterate over. * @returns {function} - The iterator function. * @returns {table} - The table being iterated over * @returns {number} - The origin index **=0** * @tupleReturn **/ declare function ipairs(this: void, tab: table): [UnknownFunc, table, number] /** * * Load and precache a custom sentence file. * * @name PrecacheSentenceFile * @realm server * @wiki https://wiki.garrysmod.com/page/Global/PrecacheSentenceFile * @param {void} this - no description * @param {string} filename - The path to the custom sentences.txt. * @returns {void} **/ declare function PrecacheSentenceFile(this: void, filename: string): void /** * * This function works exactly the same as @include function both clientside and serverside. * The only difference is that on the serverside it also calls @AddCSLuaFile function on the filename, so that it gets sent to the client. * * @name IncludeCS * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/IncludeCS * @param {void} this - no description * @param {string} filename - The filename of the Lua file you want to include. * @returns {void} **/ declare function IncludeCS(this: void, filename?: string): void /** * * Executes a Lua script. * * @name include * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/include * @note Addon files (.gma files) do not support relative parent folders (*..* notation). * @note Please make sure your file names are unique, the filesystem is shared across all addons, so a file named "lua/config.lua" in your addon may be overwritten by the same file in another addon. * @warning The file you are attempting to include MUST NOT be empty or the include will fail. Files over a certain size may fail as well. * @warning If the file you are including is clientside or shared, it **must** be @AddCSLuaFile function'd or this function will error saying the file doesn't exist. * @bug #1976 @pcall functioning this function will break autorefresh. * @param {void} this - no description * @param {string} fileName - The name of the script to be executed. The path must be either relative to the current file, or be an absolute path (relative to and excluding the lua/ folder). * @returns {any[]} - Anything that the executed Lua script returns. **/ declare function include(this: void, fileName: string): any[] /** * * Launches an asynchronous http request with the given parameters. * * @name HTTP * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/HTTP * @bug #2232 This cannot send or receive multiple headers with the same name. * @param {void} this - no description * @param {HTTPRequest} parameters - The request parameters. See @HTTPRequest structure. * @returns {boolean} - true if we made a request, nil if we failed. **/ declare function HTTP(this: void, parameters: HTTPRequest): boolean /** * * Converts a color from [HSV color space](https://en.wikipedia.org/wiki/HSL_and_HSV) into RGB color space and returns a @IColor structure. * * @name HSVToColor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/HSVToColor * @bug #2407 The returned color will not have the color metatable. * @param {void} this - no description * @param {number} hue - The hue in degrees from 0-360. * @param {number} saturation - The saturation from 0-1. * @param {number} value - The value from 0-1. * @returns {IColor} - The @IColor structure created from the HSV color space. **/ declare function HSVToColor(this: void, hue: number, saturation: number, value: number): IColor /** * * Converts a color from [HSL color space](https://en.wikipedia.org/wiki/HSL_and_HSV) into RGB color space and returns a @IColor structure. * * @name HSLToColor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/HSLToColor * @bug #2407 The returned color will not have the color metatable. * @param {void} this - no description * @param {number} hue - The hue in degrees from 0-360. * @param {number} saturation - The saturation from 0-1. * @param {number} value - The lightness from 0-1. * @returns {IColor} - The @IColor structure created from the HSL color space. **/ declare function HSLToColor(this: void, hue: number, saturation: number, value: number): IColor /** * * Returns the entity the client is using to see from (such as the player itself, the camera, or another entity). * * @name GetViewEntity * @realm client * @wiki https://wiki.garrysmod.com/page/Global/GetViewEntity * @param {void} this - no description * @returns {Entity} - The view entity. **/ declare function GetViewEntity(this: void): Entity /** * * Retrieves data about the save with the specified filename. Similar to @GetDemoFileDetails function. * * @name GetSaveFileDetails * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetSaveFileDetails * @param {void} this - no description * @param {string} filename - The file name of the save. * @returns {table} - Save data. **/ declare function GetSaveFileDetails(this: void, filename: string): table /** * * Creates (or gets if it already exsits) the rendertarget with the given name, this function allows to adjust the creation of a rendertarget more than @GetRenderTarget function. * See also @render.PushRenderTarget and @render.SetRenderTarget. * * @name GetRenderTargetEx * @realm client * @wiki https://wiki.garrysmod.com/page/Global/GetRenderTargetEx * @warning The name is treated like a path and gets its extension discarded. * "name.1" and "name.2" are considered the same name and will result in the same render target being reused. * @param {void} this - no description * @param {string} name - The internal name of the render target. * @param {number} width - The width of the render target, must be power of 2. * @param {number} height - The height of the render target, must be power of 2. * @param {RT_SIZE} sizeMode - Bitflag that influences the sizing of the render target, see @RT_SIZE enum. * @param {MATERIAL_RT_DEPTH} depthMode - Bitflag that determines the depth buffer usage of the render target @MATERIAL_RT_DEPTH enum. * @param {TEXTUREFLAGS} textureFlags - Bitflag that configurates the texture, see @TEXTUREFLAGS enum. * List of flags can also be found on the Valve's Developer Wiki: * https://developer.valvesoftware.com/wiki/Valve_Texture_Format * @param {CREATERENDERTARGETFLAGS} rtFlags - Flags that controll the HDR behaviour of the render target, see @CREATERENDERTARGETFLAGS enum. * @param {IMAGE_FORMAT} imageFormat - Image format, see @IMAGE_FORMAT enum. * @returns {ITexture} - The new render target. **/ declare function GetRenderTargetEx(this: void, name: string, width: number, height: number, sizeMode: RT_SIZE, depthMode: MATERIAL_RT_DEPTH, textureFlags: TEXTUREFLAGS, rtFlags: CREATERENDERTARGETFLAGS, imageFormat: IMAGE_FORMAT): ITexture /** * * Creates or gets the rendertarget with the given name. * See @GetRenderTargetEx function for an advanced version of this function with more options. * * @name GetRenderTarget * @realm client * @wiki https://wiki.garrysmod.com/page/Global/GetRenderTarget * @bug #2885 This crashes when used on a cubemap texture. * @param {void} this - no description * @param {string} name - The internal name of the render target. * @param {number} width - The width of the render target, must be power of 2. If not set to PO2, the size will be automatically converted to the nearest PO2 size. * @param {number} height - The height of the render target, must be power of 2. If not set to PO2, the size will be automatically converted to the nearest PO2 size. * @param {boolean} additive - Sets whenever the rt should be additive. * @returns {ITexture} - The render target **/ declare function GetRenderTarget(this: void, name: string, width: number, height: number, additive?: boolean): ITexture /** * * Returns the metatable of an object. This function obeys the metatable's __metatable field, and will return that field if the metatable has it set. * Use @debug.getmetatable if you want the true metatable of the object. * * @name getmetatable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/getmetatable * @param {void} this - no description * @param {any} object - The value to return the metatable of. * @returns {any} - The metatable of the value. This is not always a table. **/ declare function getmetatable(this: void, object: any): any /** * * Returns the menu overlay panel, a container for panels like the error panel created in @GamemodeHooks:OnLuaError. * * @name GetOverlayPanel * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetOverlayPanel * @param {void} this - no description * @returns {Panel} - The overlay panel **/ declare function GetOverlayPanel(this: void): Panel /** * * Returns if this is the first time this hook was predicted. * This is useful for one-time logic in your SWEPs PrimaryAttack, SecondaryAttack and Reload and other [predicted hooks](https://wiki.garrysmod.com/page/Category:Predicted_Hooks) (to prevent those hooks from being called rapidly in succession). It's also useful in a Move hook for when the client predicts movement. * Visit [Prediction](https://wiki.garrysmod.com/page/Prediction) for more information about this behavior. * * @name IsFirstTimePredicted * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/IsFirstTimePredicted * @note This is already used internally for @EntityFuncs:EmitSound, @WeaponFuncs:SendWeaponAnim and @EntityFuncs:FireBullets, but NOT in @util.Effect. * @param {void} this - no description * @returns {boolean} - Whether or not this is the first time being predicted. **/ declare function IsFirstTimePredicted(this: void): boolean /** * * Returns the current status of the server join progress. * * @name GetLoadStatus * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetLoadStatus * @param {void} this - no description * @returns {string} - The current status **/ declare function GetLoadStatus(this: void): string /** * * Returns the loading screen panel and creates it if it doesn't exist. * * @name GetLoadPanel * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetLoadPanel * @param {void} this - no description * @returns {Panel} - The loading screen panel **/ declare function GetLoadPanel(this: void): Panel /** * * Returns the panel that is used as a wrapper for the HUD. * See also @vgui.GetWorldPanel * * @name GetHUDPanel * @realm client * @wiki https://wiki.garrysmod.com/page/Global/GetHUDPanel * @param {void} this - no description * @returns {Panel} - The HUD panel **/ declare function GetHUDPanel(this: void): Panel /** * * Returns the name of the current server. * * @name GetHostName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetHostName * @param {void} this - no description * @returns {string} - The name of the server. **/ declare function GetHostName(this: void): string /** * * Returns a vector that is shared between the server and all clients. * * @name GetGlobalVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetGlobalVector * @param {void} this - no description * @param {string} Index - The unique index to identify the global value with. * @param {Vector} def - The value to return if the global value is not set. * @returns {Vector} - The global value, or the default if the global value is not set. **/ declare function GetGlobalVector(this: void, Index: string, def: Vector): Vector /** * * Returns a string that is shared between the server and all clients. * * @name GetGlobalString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetGlobalString * @param {void} this - no description * @param {string} index - The unique index to identify the global value with. * @param {string} def - The value to return if the global value is not set. * @returns {string} - The global value, or the default if the global value is not set. **/ declare function GetGlobalString(this: void, index: string, def?: string): string /** * * Returns an integer that is shared between the server and all clients. * * @name GetGlobalInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetGlobalInt * @bug #3374 This function will not round decimal values as it actually networks a float internally. * @param {void} this - no description * @param {string} index - The unique index to identify the global value with. * @param {number} def - The value to return if the global value is not set. * @returns {number} - The global value, or the default if the global value is not set. **/ declare function GetGlobalInt(this: void, index: string, def?: number): number /** * * Returns a float that is shared between the server and all clients. * * @name GetGlobalFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetGlobalFloat * @param {void} this - no description * @param {string} index - The unique index to identify the global value with. * @param {number} def - The value to return if the global value is not set. * @returns {number} - The global value, or the default if the global value is not set. **/ declare function GetGlobalFloat(this: void, index: string, def?: number): number /** * * Returns an entity that is shared between the server and all clients. * * @name GetGlobalEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetGlobalEntity * @param {void} this - no description * @param {string} index - The unique index to identify the global value with. * @param {Entity} def - The value to return if the global value is not set. * @returns {Entity} - The global value, or the default if the global value is not set. **/ declare function GetGlobalEntity(this: void, index: string, def?: Entity): Entity /** * * Returns a boolean that is shared between the server and all clients. * * @name GetGlobalBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetGlobalBool * @param {void} this - no description * @param {string} index - The unique index to identify the global value with. * @param {boolean} def - The value to return if the global value is not set. * @returns {boolean} - The global value, or the default if the global value is not set. **/ declare function GetGlobalBool(this: void, index: string, def?: boolean): boolean /** * * Returns an angle that is shared between the server and all clients. * * @name GetGlobalAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/GetGlobalAngle * @param {void} this - no description * @param {string} index - The unique index to identify the global value with. * @param {Angle} def - The value to return if the global value is not set. * @returns {Angle} - The global value, or default if the global is not set. **/ declare function GetGlobalAngle(this: void, index: string, def?: Angle): Angle /** * * Returns the environment table of either the stack level or the function specified. * * @name getfenv * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/getfenv * @param {void} this - no description * @param {function} location - The object to get the enviroment from. Can also be a number that specifies the function at that stack level: Level 1 is the function calling getfenv. * @returns {table} - The environment. **/ declare function getfenv(this: void, location?: UnknownFunc): table /** * * Returns a table with the names of files needed from the server you are currently joining. * * @name GetDownloadables * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetDownloadables * @param {void} this - no description * @returns {table} - table of file names **/ declare function GetDownloadables(this: void): table /** * * Retrieves data about the demo with the specified filename. Similar to @GetSaveFileDetails function. * * @name GetDemoFileDetails * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetDemoFileDetails * @param {void} this - no description * @param {string} filename - The file name of the demo. * @returns {table} - Demo data. **/ declare function GetDemoFileDetails(this: void, filename: string): table /** * * Returns the default loading screen URL (asset://garrysmod/html/loading.html) * * @name GetDefaultLoadingHTML * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetDefaultLoadingHTML * @param {void} this - no description * @returns {string} - Default loading url (asset://garrysmod/html/loading.html) **/ declare function GetDefaultLoadingHTML(this: void): string /** * * Gets the ConVar with the specified name. This function doesn't cache the convar. * * @name GetConVar_Internal * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/GetConVar Internal * @internal * @param {void} this - no description * @param {string} name - Name of the ConVar to get * @returns {ConVar} - The ConVar object **/ declare function GetConVar_Internal(this: void, name: string): ConVar /** * * Gets the string value ConVar with the specified name. * * @name GetConVarString * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/GetConVarString * @param {void} this - no description * @param {string} name - Name of the ConVar to get. * @returns {string} - The ConVar's value. **/ declare function GetConVarString(this: void, name: string): string /** * * Gets the numeric value ConVar with the specified name. * * @name GetConVarNumber * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/GetConVarNumber * @param {void} this - no description * @param {string} name - Name of the ConVar to get. * @returns {number} - The ConVar's value. **/ declare function GetConVarNumber(this: void, name: string): number /** * * Gets the @ConVar type with the specified name. * * @name GetConVar * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/GetConVar * @note This function uses @GetConVar_Internal function internally, but caches the result in Lua for quicker lookups. * @param {void} this - no description * @param {string} name - Name of the ConVar to get * @returns {ConVar | ConVar} - The @ConVar type object, or nil if no such @ConVar type was found. **/ declare function GetConVar(this: void, name: string): ConVar | ConVar /** * * Callback function for when the client has joined a server. This function shows the server's loading URL by default. * * @name GameDetails * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GameDetails * @param {void} this - no description * @param {string} servername - Server's name. * @param {string} serverurl - Server's loading screen URL, or "" if the URL is not set. * @param {string} mapname - Server's current map's name. * @param {number} maxplayers - Max player count of server. * @param {string} steamid - The local player's @Player:SteamID64. * @param {string} gamemode - Server's current gamemode's folder name. * @returns {void} **/ declare function GameDetails(this: void, servername: string, serverurl: string, mapname: string, maxplayers: number, steamid: string, gamemode: string): void /** * * Returns the @CurTime function-based time in seconds it took to render the last frame. * This should be used for frame/tick based timing, such as movement prediction or animations. * For real-time-based frame time that isn't affected by host_timescale, use @RealFrameTime function. RealFrameTime is more suited for things like GUIs or HUDs. * * @name FrameTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/FrameTime * @param {void} this - no description * @returns {number} - time (in seconds) **/ declare function FrameTime(this: void): number /** * * Returns the number of frames rendered since the game was launched. * * @name FrameNumber * @realm client * @wiki https://wiki.garrysmod.com/page/Global/FrameNumber * @param {void} this - no description * @returns {void} **/ declare function FrameNumber(this: void): void /** * * Formats the specified values into the string given. Same as @string.format. * * @name Format * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Format * @param {void} this - no description * @param {string} format - The string to be formatted. * Follows this format: http://www.cplusplus.com/reference/cstdio/printf/ * @param {any[]} ...formatParameters - Values to be formatted into the string. * @returns {string} - The formatted string **/ declare function Format(this: void, format: string, ...formatParameters: any[]): string /** * * Returns the current floored dynamic memory usage of Lua in kilobytes. * * @name gcinfo * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/gcinfo * @param {void} this - no description * @returns {number} - The current floored dynamic memory usage of Lua, in kilobytes. **/ declare function gcinfo(this: void): number /** * * Returns a table with the names of all maps and categories that you have on your client. * * @name GetMapList * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/GetMapList * @param {void} this - no description * @returns {table} - table of map names and categories **/ declare function GetMapList(this: void): table /** * * Returns the tool-tip text and tool-tip-panel (if any) of the given panel as well as itself * * @name FindTooltip * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/FindTooltip * @param {void} this - no description * @param {Panel} panel - Panel to find tool-tip of * @returns {string} - tool-tip text * @returns {Panel} - tool-tip panel * @returns {Panel} - panel that the function was called with * @tupleReturn **/ declare function FindTooltip(this: void, panel: Panel): [string, Panel, Panel] /** * * Returns the meta table for the class with the matching name. * Internally returns @debug.getregistry()[metaName] * You can learn more about meta tables on the [Meta Tables](https://wiki.garrysmod.com/page/Meta%20Tables) page. * You can find a list of meta tables that can be retrieved with this function on @TYPE enum. The name in the description is the string to use with this function. * * @name FindMetaTable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/FindMetaTable * @param {void} this - no description * @param {string} metaName - The object type to retrieve the meta table of. * @returns {table} - The corresponding meta table. **/ declare function FindMetaTable(this: void, metaName: string): table /** * * Returns the normal vector of the current render context as calculated by @GamemodeHooks:CalcView, similar to @EyeAngles function. * * @name EyeVector * @realm client * @wiki https://wiki.garrysmod.com/page/Global/EyeVector * @bug #2516 This function is only reliable inside rendering hooks. * @param {void} this - no description * @returns {Vector} - View direction of the currently rendered scene. **/ declare function EyeVector(this: void): Vector /** * * Returns the origin of the current render context as calculated by @GamemodeHooks:CalcView. * * @name EyePos * @realm client * @wiki https://wiki.garrysmod.com/page/Global/EyePos * @bug #2516 This function is only reliable inside rendering hooks. * @param {void} this - no description * @returns {Vector} - Camera position. **/ declare function EyePos(this: void): Vector /** * * Returns the angles of the current render context as calculated by @GamemodeHooks:CalcView. * * @name EyeAngles * @realm client * @wiki https://wiki.garrysmod.com/page/Global/EyeAngles * @bug #2516 This function is only reliable inside rendering hooks. * @param {void} this - no description * @returns {Angle} - The angle of the currently rendered scene. **/ declare function EyeAngles(this: void): Angle /** * * Throws a Lua error but does not break out of the current call stack. * This function will not print a stack trace like a normal error would. * Essentially similar if not equivalent to @Msg function. * * @name ErrorNoHalt * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ErrorNoHalt * @param {void} this - no description * @param {any[]} ...arguments - Converts all arguments to strings and prints them with no spacing. * @returns {void} **/ declare function ErrorNoHalt(this: void, ...arguments: any[]): void /** * * Throws a Lua error and breaks out of the current call stack. * * @name error * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/error * @param {void} this - no description * @param {string} message - The error message to throw. * @param {number} errorLevel - The level to throw the error at. * @returns {void} **/ declare function error(this: void, message: string, errorLevel?: number): void /** * * Returns the entity with the matching @EntityFuncs:EntIndex. * Indices 1 through @game.MaxPlayers() are always reserved for players. * * @name Entity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/Entity * @note In examples on this wiki, **Entity( 1 )** is used when a player entity is needed (see [wiki editing guide](https://wiki.garrysmod.com/page/Help:Editing)). In singleplayer and listen servers, **Entity( 1 )** will always be the first player. In dedicated servers, however, **Entity( 1 )** won't always be a valid player. * @param {void} this - no description * @param {number} entityIndex - The entity index. * @returns {Entity} - The entity if it exists, or NULL if it doesn't. **/ declare function Entity(this: void, entityIndex: number): Entity /** * * Removes the currently active tool tip from the screen. * * @name EndTooltip * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/EndTooltip * @param {void} this - no description * @param {Panel} panel - This is the panel that has a tool tip. * @returns {void} **/ declare function EndTooltip(this: void, panel: Panel): void /** * * Plays a sentence from scripts/sentences.txt * * @name EmitSentence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/EmitSentence * @param {void} this - no description * @param {string} soundName - The sound to play * @param {Vector} position - The position to play at * @param {number} entity - The entity to emit the sound from. Must be @EntityFuncs:EntIndex * @param {CHAN} channel - The sound channel, see @CHAN enum. * @param {number} volume - The volume of the sound, from 0 to 1 * @param {SNDLVL} soundLevel - The sound level of the sound, see @SNDLVL enum * @param {SND} soundFlags - The flags of the sound, see @SND enum * @param {number} pitch - The pitch of the sound, 0-255 * @returns {void} **/ declare function EmitSentence(this: void, soundName: string, position: Vector, entity: number, channel?: CHAN, volume?: number, soundLevel?: SNDLVL, soundFlags?: SND, pitch?: number): void /** * * Emits the specified sound at the specified position. * * @name EmitSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/EmitSound * @bug Sounds must be precached serverside manually before they can be played. util.PrecacheSound does not work for this purpose, Entity.EmitSound does the trick * @bug This does not work with soundscripts. TODO: Is this a bug or intended? * @param {void} this - no description * @param {string} soundName - The sound to play * @param {Vector} position - The position to play at * @param {number} entity - The entity to emit the sound from. Can be an @EntityFuncs:EntIndex or one of the following: * * 0 - Plays sound on the world (Position set to 0,0,0) * * -1 - Plays sound on the local player (on server acts as 0) * * -2 - Plays UI sound (Position set to 0,0,0, no spatial sound,on server acts as 0) * @param {CHAN} channel - The sound channel, see @CHAN enum. * @param {number} volume - The volume of the sound, from 0 to 1 * @param {SNDLVL} soundLevel - The sound level of the sound, see @SNDLVL enum * @param {SND} soundFlags - The flags of the sound, see @SND enum * @param {number} pitch - The pitch of the sound, 0-255 * @returns {void} **/ declare function EmitSound(this: void, soundName: string, position: Vector, entity: number, channel?: CHAN, volume?: number, soundLevel?: SNDLVL, soundFlags?: SND, pitch?: number): void /** * * An 'if then else'. This is *almost* equivalent to (*condition* and *truevar* or *falsevar*) in Lua. The difference is that if *truevar* evaluates to false, the plain Lua method stated would return *falsevar* regardless of *condition* whilst this function would take *condition* into account. * * @name Either * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Either * @param {void} this - no description * @param {any} condition - The condition to check if true or false. * @param {any} truevar - If the condition isn't nil/false, returns this value. * @param {any} falsevar - If the condition is nil/false, returns this value. * @returns {any} - The result. **/ declare function Either(this: void, condition: any, truevar: any, falsevar: any): any /** * * Returns a @CEffectData type object to be used with @util.Effect. * * @name EffectData * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/EffectData * @bug #2771 This does not create a unique object, but instead returns a shared reference. That means you cannot use two or more of these objects at once. * @param {void} this - no description * @returns {CEffectData} - The @CEffectData type object. **/ declare function EffectData(this: void): CEffectData /** * * Drops the specified entity if it is being held by any player with Gravity Gun or +use pickup. * * @name DropEntityIfHeld * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/DropEntityIfHeld * @param {void} this - no description * @param {Entity} ent - The entity to drop. * @returns {void} **/ declare function DropEntityIfHeld(this: void, ent: Entity): void /** * * Creates or replaces a dynamic light with the given id. * * @name DynamicLight * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DynamicLight * @note Only 32 dlights and 64 elights can be active at once. * @warning It is not safe to hold a reference to this object after creation since its data can be replaced by another dlight at any time. * @bug #3798 The minlight parameter affects the world and entities differently. * @param {void} this - no description * @param {number} index - An unsigned Integer. Usually an [entity index](https://wiki.garrysmod.com/page/Entity/EntIndex) is used here. * @param {boolean} elight - Allocates an elight instead of a dlight. Elights have a higher light limit and do not light the world (making the "noworld" parameter have no effect). * @returns {DynamicLight} - A DynamicLight structured table. See @DynamicLight structure **/ declare function DynamicLight(this: void, index: number, elight?: boolean): DynamicLight /** * * Draws the toy town shader, which blurs the top and bottom of your screen. This can make very large objects look like toys, hence the name. * * @name DrawToyTown * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawToyTown * @param {void} this - no description * @param {number} Passes - An integer determining how many times to draw the effect. A higher number creates more blur. * @param {number} Height - The amount of screen which should be blurred on the top and bottom. * @returns {void} **/ declare function DrawToyTown(this: void, Passes: number, Height: number): void /** * * Draws the texturize shader, which replaces each pixel on your screen with a different part of the texture depending on its brightness. See [g_texturize](https://wiki.garrysmod.com/page/Shaders/g_texturize) for information on making the texture. * * @name DrawTexturize * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawTexturize * @param {void} this - no description * @param {number} Scale - Scale of the texture. A smaller number creates a larger texture. * @param {number} BaseTexture - This will be the texture to use in the effect. Make sure you use @Material function to get the texture number * @returns {void} **/ declare function DrawTexturize(this: void, Scale: number, BaseTexture: number): void /** * * Renders the post-processing effect of beams of light originating from the map's sun. Utilises the "pp/sunbeams" material * * @name DrawSunbeams * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawSunbeams * @param {void} this - no description * @param {number} darken - $darken property for sunbeams material * @param {number} multiplier - $multiply property for sunbeams material * @param {number} sunSize - $sunsize property for sunbeams material * @param {number} sunX - $sunx property for sunbeams material * @param {number} sunY - $suny property for sunbeams material * @returns {void} **/ declare function DrawSunbeams(this: void, darken: number, multiplier: number, sunSize: number, sunX: number, sunY: number): void /** * * Draws the sobel shader, which detects edges and draws a black border. * * @name DrawSobel * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawSobel * @param {void} this - no description * @param {number} Threshold - Determines the threshold of edges. A value of 0 will make your screen completely black. * @returns {void} **/ declare function DrawSobel(this: void, Threshold: number): void /** * * Draws the sharpen shader, which creates more contrast. * * @name DrawSharpen * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawSharpen * @param {void} this - no description * @param {number} Contrast - How much contrast to create. * @param {number} Distance - How large the contrast effect will be. * @returns {void} **/ declare function DrawSharpen(this: void, Contrast: number, Distance: number): void /** * * Creates a motion blur effect by drawing your screen multiple times. * * @name DrawMotionBlur * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawMotionBlur * @param {void} this - no description * @param {number} AddAlpha - How much alpha to change per frame. * @param {number} DrawAlpha - How much alpha the frames will have. A value of 0 will not render the motion blur effect. * @param {number} Delay - Determines the amount of time between frames to capture. * @returns {void} **/ declare function DrawMotionBlur(this: void, AddAlpha: number, DrawAlpha: number, Delay: number): void /** * * Draws a material overlay on the screen. * * @name DrawMaterialOverlay * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawMaterialOverlay * @param {void} this - no description * @param {string} Material - This will be the material that is drawn onto the screen. * @param {number} RefractAmount - This will adjust how much the material will refract your screen. * @returns {void} **/ declare function DrawMaterialOverlay(this: void, Material: string, RefractAmount: number): void /** * * Draws the Color Modify shader, which can be used to adjust colors on screen. * [Category:Post_Processing](https://wiki.garrysmod.com/page/Category:Post_Processing) * * @name DrawColorModify * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawColorModify * @param {void} this - no description * @param {table} modifyParameters - Color modification parameters. See @g_colourmodify shader and the example below. Note that if you leave out a field, it will retain its last value which may have changed if another caller uses this function. * @returns {void} **/ declare function DrawColorModify(this: void, modifyParameters: table): void /** * * Draws the bloom shader, which creates a glowing effect from bright objects. * * @name DrawBloom * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DrawBloom * @param {void} this - no description * @param {number} Darken - Determines how much to darken the effect. A lower number will make the glow come from lower light levels. A value of 1 will make the bloom effect unnoticeable. Negative values will make even pitch black areas glow. * @param {number} Multiply - Will affect how bright the glowing spots are. A value of 0 will make the bloom effect unnoticeable. * @param {number} SizeX - The size of the bloom effect along the horizontal axis. * @param {number} SizeY - The size of the bloom effect along the vertical axis. * @param {number} Passes - Determines how much to exaggerate the effect. * @param {number} ColorMultiply - Will multiply the colors of the glowing spots, making them more vivid. * @param {number} Red - How much red to multiply with the glowing color. Should be between 0 and 1 * @param {number} Green - How much green to multiply with the glowing color. Should be between 0 and 1 * @param {number} Blue - How much blue to multiply with the glowing color. Should be between 0 and 1 * @returns {void} **/ declare function DrawBloom(this: void, Darken: number, Multiply: number, SizeX: number, SizeY: number, Passes: number, ColorMultiply: number, Red: number, Green: number, Blue: number): void /** * * Draws the currently active main menu background image and handles transitioning between background images. * This is called by default in the menu panel's Paint hook. * * @name DrawBackground * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/DrawBackground * @internal * @param {void} this - no description * @returns {void} **/ declare function DrawBackground(this: void): void /** * * Cancels any existing DOF post-process effects. * Begins the DOF post-process effect. * * @name DOF_Start * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DOF Start * @param {void} this - no description * @returns {void} **/ declare function DOF_Start(this: void): void /** * * Cancels current DOF post-process effect started with @DOF_Start function * * @name DOF_Kill * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DOF Kill * @param {void} this - no description * @returns {void} **/ declare function DOF_Kill(this: void): void /** * * A hacky method used to fix some bugs regarding DoF. * * @name DOFModeHack * @realm client * @wiki https://wiki.garrysmod.com/page/Global/DOFModeHack * @internal * @param {void} this - no description * @param {boolean} enable - Enables or disables depth-of-field mode * @returns {void} **/ declare function DOFModeHack(this: void, enable: boolean): void /** * * Sets whether rendering should be limited to being inside a panel or not. * See also @surface.DisableClipping and @Panel:NoClipping. * * @name DisableClipping * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/DisableClipping * @param {void} this - no description * @param {boolean} disable - Whether or not clipping should be disabled * @returns {void} **/ declare function DisableClipping(this: void, disable: boolean): void /** * * Shows a message box in the middle of the screen, with up to 4 buttons they can press. * * @name Derma_Query * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Derma Query * @param {void} this - no description * @param {string} text - The message to display. * @param {string} title - The title to give the message box. * @param {string} btn1text - The text to display on the first button. * @param {function} btn1func - The function to run if the user clicks the first button. * @param {string} btn2text - The text to display on the second button. * @param {function} btn2func - The function to run if the user clicks the second button. * @param {string} btn3text - The text to display on the third button * @param {function} btn3func - The function to run if the user clicks the third button. * @param {string} btn4text - The text to display on the third button * @param {function} btn4func - The function to run if the user clicks the fourth button. * @returns {Panel} - The Panel object of the created window. **/ declare function Derma_Query(this: void, text?: string, title?: string, btn1text: string, btn1func?: UnknownFunc, btn2text?: string, btn2func?: UnknownFunc, btn3text?: string, btn3func?: UnknownFunc, btn4text?: string, btn4func?: UnknownFunc): Panel /** * * Creates a derma window asking players to input a string. * * @name Derma_StringRequest * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Derma StringRequest * @param {void} this - no description * @param {string} title - The title of the created panel. * @param {string} subtitle - The text above the input box * @param {string} def - The default text for the input box. * @param {function} confirm - The function to be called once the user has confirmed their input. * @param {function} cancel - The function to be called once the user has cancelled their input * @param {string} confirmText - Allows you to override text of the "OK" button * @param {string} cancelText - Allows you to override text of the "Cancel" button * @returns {DFrame} - The created @DFrame type **/ declare function Derma_StringRequest(this: void, title: string, subtitle: string, def: string, confirm: UnknownFunc, cancel?: UnknownFunc, confirmText?: string, cancelText?: string): DFrame /** * * Creates a derma window to display information * * @name Derma_Message * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Derma Message * @param {void} this - no description * @param {string} Text - The text within the created panel. * @param {string} Title - The title of the created panel. * @param {string} Button - The text of the button to close the panel. * @returns {DFrame} - The created @DFrame type **/ declare function Derma_Message(this: void, Text: string, Title: string, Button: string): DFrame /** * * Makes the panel (usually an input of sorts) respond to changes in console variables by adding next functions to the panel: * * @Panel:SetConVar * * @Panel:ConVarChanged * * @Panel:ConVarStringThink * * @Panel:ConVarNumberThink * The console variable value is saved in the *m_strConVar* property of the panel. * The panel should call * @Panel:ConVarStringThink or * @Panel:ConVarNumberThink * in its @PanelHooks:Think hook and should call @Panel:ConVarChanged when the panel's value has changed. * * @name Derma_Install_Convar_Functions * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Derma Install Convar Functions * @param {void} this - no description * @param {Panel} target - The panel the functions should be added to. * @returns {void} **/ declare function Derma_Install_Convar_Functions(this: void, target: Panel): void /** * * Draws background blur around the given panel. * * @name Derma_DrawBackgroundBlur * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Derma DrawBackgroundBlur * @param {void} this - no description * @param {Panel} panel - Panel to draw the background blur around * @param {number} startTime - Time that the blur began being painted * @returns {void} **/ declare function Derma_DrawBackgroundBlur(this: void, panel: Panel, startTime: number): void /** * * Creates panel method that calls the supplied Derma skin hook via @derma.SkinHook * * @name Derma_Hook * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Derma Hook * @param {void} this - no description * @param {Panel} panel - Panel to add the hook to * @param {string} functionName - Name of panel function to create * @param {string} hookName - Name of Derma skin hook to call within the function * @param {string} typeName - Type of element to call Derma skin hook for * @returns {void} **/ declare function Derma_Hook(this: void, panel: Panel, functionName: string, hookName: string, typeName: string): void /** * * Creates a new derma animation. * * @name Derma_Anim * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/Derma Anim * @param {void} this - no description * @param {string} name - Name of the animation to create * @param {Panel} panel - Panel to run the animation on * @param {function} func - Function to call to process the animation * Arguments: * @returns {table} - A lua metatable containing four methods: * * Run() - Should be called each frame you want the animation to be ran. * * Active() - Returns if the animation is currently active (has not finished and stop has not been called) * * Stop() - Halts the animation at its current progress. * * Start( Length, Data ) - Prepares the animation to be ran for Length seconds. Must be called once before calling Run(). The data parameter will be passed to the func function. **/ declare function Derma_Anim(this: void, name: string, panel: Panel, func: GlobalDerma_AnimFunc): table /** * * Creates a @DMenu type and closes any current menus. * * @name DermaMenu * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/DermaMenu * @param {void} this - no description * @param {Panel} parent - The panel to parent the created menu to. * @returns {DMenu} - The created @DMenu type **/ declare function DermaMenu(this: void, parent: Panel): DMenu /** * * Loads and registers the specified gamemode, setting the GM table's DerivedFrom field to the value provided, if the table exists. The DerivedFrom field is used post-gamemode-load as the "derived" parameter for @gamemode.Register. * * @name DeriveGamemode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/DeriveGamemode * @param {void} this - no description * @param {string} base - Gamemode name to derive from. * @returns {void} **/ declare function DeriveGamemode(this: void, base: string): void /** * * Writes text to the right hand side of the screen, like the old error system. Messages disappear after a couple of seconds. * * @name DebugInfo * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/DebugInfo * @param {void} this - no description * @param {number} slot - The location on the right hand screen to write the debug info to. Starts at 0, no upper limit * @param {string} info - The debugging information to be written to the screen * @returns {void} **/ declare function DebugInfo(this: void, slot: number, info: string): void /** * * Returns an @CTakeDamageInfo type object. * * @name DamageInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/DamageInfo * @bug #2771 This does not create a unique object, but instead returns a shared reference. That means you cannot use two or more of these objects at once. * @param {void} this - no description * @returns {CTakeDamageInfo} - The @CTakeDamageInfo type object. **/ declare function DamageInfo(this: void): CTakeDamageInfo /** * * Returns the uptime of the server in seconds (to at least 4 decimal places) * This is a synchronised value and affected by various factors such as host_timescale (or @game.GetTimeScale) and the server being paused - either by sv_pausable or all players disconnecting. * You should use this function for timing in-game events but not for real-world events. * See also: @RealTime function, @SysTime function * * @name CurTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/CurTime * @note This is internally defined as a float, and as such it will be affected by precision loss if your server uptime is more than 6 hours, which will cause jittery movement of players and props and inaccuracy of timers, it is highly encouraged to refresh or change the map when that happens (a server restart is not necessary).This is **NOT** easy as it sounds to fix in the engine, so please refrain from posting issues about this * @bug #3026 This returns 0 in @GamemodeHooks:PlayerAuthed. * @param {void} this - no description * @returns {number} - Time synced with the game server. **/ declare function CurTime(this: void): number /** * * Creates and returns a new @DSprite type element with the supplied material. * * @name CreateSprite * @realm client * @wiki https://wiki.garrysmod.com/page/Global/CreateSprite * @param {void} this - no description * @param {IMaterial} material - Material the sprite should draw. * @returns {DSprite} - The new @DSprite type element. **/ declare function CreateSprite(this: void, material: IMaterial): DSprite /** * * Returns a sound parented to the specified entity. * * @name CreateSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/CreateSound * @note You can only create one CSoundPatch per audio file, per entity at the same time. * @note This argument only works serverside. * @param {void} this - no description * @param {Entity} targetEnt - The target entity. * @param {string} soundName - The sound to play. * @param {CRecipientFilter} filter - A @CRecipientFilter type of the players that will have this sound networked to them. * @returns {CSoundPatch} - The sound object **/ declare function CreateSound(this: void, targetEnt: Entity, soundName: string, filter?: CRecipientFilter): CSoundPatch /** * * Creates @PhysCollide type objects for every physics object the model has. The model must be precached with @util.PrecacheModel before being used with this function. * * @name CreatePhysCollidesFromModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/CreatePhysCollidesFromModel * @param {void} this - no description * @param {string} modelName - Model path to get the collision objects of. * @returns {PhysCollide[]} - Table of @PhysCollide type objects. The number of entries will match the model's physics object count. See also @EntityFuncs:GetPhysicsObjectCount. Returns no value if the model doesn't exist, or has not been precached. **/ declare function CreatePhysCollidesFromModel(this: void, modelName: string): PhysCollide[] /** * * Creates a new @PhysCollide type from the given bounds. * * @name CreatePhysCollideBox * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/CreatePhysCollideBox * @bug #3568 This fails to create planes or points - no components of the mins or maxs can be the same. * @param {void} this - no description * @param {Vector} mins - Min corner of the box. This is not automatically ordered with the maxs and must contain the smallest vector components. See @OrderVectors function. * @param {Vector} maxs - Max corner of the box. This is not automatically ordered with the mins and must contain the largest vector components. * @returns {PhysCollide} - The new PhysCollide. This will be a NULL PhysCollide (@PhysCollide:IsValid returns false) if given bad vectors or no more PhysCollides can be created in the physics engine. **/ declare function CreatePhysCollideBox(this: void, mins: Vector, maxs: Vector): PhysCollide /** * * Creates a new particle system. * * @name CreateParticleSystem * @realm client * @wiki https://wiki.garrysmod.com/page/Global/CreateParticleSystem * @note The particle effect must be precached with @PrecacheParticleSystem function and the file its from must be added via @game.AddParticles before it can be used! * @param {void} this - no description * @param {Entity} ent - The entity to attach the control point to. * @param {string} effect - The name of the effect to create. It must be precached. * @param {PATTACH} partAttachment - See @PATTACH enum. * @param {number} entAttachment - The attachment ID on the entity to attach the particle system to * @param {Vector} offset - The offset from the @EntityFuncs:GetPos of the entity we are attaching this CP to. * @returns {CNewParticleEffect} - The created particle system. **/ declare function CreateParticleSystem(this: void, ent: Entity, effect: string, partAttachment: PATTACH, entAttachment?: number, offset?: Vector): CNewParticleEffect /** * * Creates a new material with the specified name and shader. * * @name CreateMaterial * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/CreateMaterial * @note Materials created with this function can be used in @EntityFuncs:SetMaterial and @EntityFuncs:SetSubMaterial by prepending a "!" to their material name argument. * @note Unlike @IMaterial:SetTexture, this table will not accept @ITexture type values. Instead, use the texture's name (see @ITexture:GetName). * @bug #1531 .pngs must be loaded with @Material function before being used with this function. * @bug #2511 This does not work with [patch materials](https://developer.valvesoftware.com/wiki/Patch). * @bug #3103 This will not create a new material if another material object with the same name already exists. * @param {void} this - no description * @param {string} name - The material name. Must be unique. * @param {string} shaderName - The shader name. See [Category: Shaders](https://wiki.garrysmod.com/page/Category:%20Shaders). * @param {table} materialData - Key-value table that contains shader parameters and proxies. * *See: [List of Shader Parameters on Valve Developers Wiki](https://developer.valvesoftware.com/wiki/Category:List_of_Shader_Parameters) and each shader's page from [Category: Shaders](https://wiki.garrysmod.com/page/Category:%20Shaders). * @returns {IMaterial} - Created material **/ declare function CreateMaterial(this: void, name: string, shaderName: string, materialData: table): IMaterial /** * * Creates a console variable (@ConVar type), in general these are for things like gamemode/server settings. * * @name CreateConVar * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/CreateConVar * @param {void} this - no description * @param {string} name - Name of the convar. * This cannot be a name of an engine console command or console variable. It will silently fail if it is. If it is the same name as another lua ConVar, it will return that ConVar object. * @param {string} value - Default value of the convar. Can also be a number. * @param {FCVAR} flags - Flags of the convar, see @FCVAR enum, either as bitflag or as table. * @param {string} helptext - The help text to show in the console. * @param {number} min - If set, the ConVar cannot be changed to a number lower than this value. * @param {number} max - If set, the ConVar cannot be changed to a number higher than this value. * @returns {ConVar} - The convar created. **/ declare function CreateConVar(this: void, name: string, value: string, flags?: FCVAR, helptext?: string, min?: number, max?: number): ConVar /** * * Makes a clientside-only console variable * Although this function is shared, it should only be used clientside. * * @name CreateClientConVar * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/CreateClientConVar * @note This function is a wrapper of @CreateConVar function, with the difference being that FCVAR_ARCHIVE and FCVAR_USERINFO are added automatically when **shouldsave** and **userinfo** are true, respectively. * @param {void} this - no description * @param {string} name - Name of the ConVar to be created and able to be accessed. * This cannot be a name of existing console command or console variable. It will silently fail if it is. * @param {string} def - Default value of the ConVar. * @param {boolean} shouldsave - Should the ConVar be saved across sessions * @param {boolean} userinfo - Should the ConVar and its containing data be sent to the server when it has changed. This make the convar accessible from server using @Player:GetInfoNum and similar functions. * @param {string} helptext - Help text to display in the console. * @param {number} min - If set, the convar cannot be changed to a number lower than this value. * @param {number} max - If set, the convar cannot be changed to a number higher than this value. * @returns {ConVar} - Created convar. **/ declare function CreateClientConVar(this: void, name: string, def: string, shouldsave?: boolean, userinfo?: boolean, helptext?: string, min?: number, max?: number): ConVar /** * * Returns whether a @ConVar type with the given name exists or not * * @name ConVarExists * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ConVarExists * @param {void} this - no description * @param {string} name - Name of the @ConVar type. * @returns {boolean} - True if the @ConVar type exists, false otherwise. **/ declare function ConVarExists(this: void, name: string): boolean /** * * Returns a table of console command names beginning with the given text. * * @name ConsoleAutoComplete * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/ConsoleAutoComplete * @param {void} this - no description * @param {string} text - Text that the console commands must begin with. * @returns {table} - Table of console command names. **/ declare function ConsoleAutoComplete(this: void, text: string): table /** * * This function will compile the code argument as lua code and return a function that will execute that code. * Please note that this function will not automatically execute the given code after compiling it. * * @name CompileString * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/CompileString * @param {void} this - no description * @param {string} code - The code to compile. * @param {string} identifier - An identifier in case an error is thrown. (The same identifier can be used multiple times) * @param {boolean} HandleError - If false this function will return an error string instead of throwing an error. * @returns {function} - A function that, when called, will execute the given code. Returns nil if there was an error. * @returns {string} - The error string. Will be nil if there were no errors or the function handles errors (third argument is true). * @tupleReturn **/ declare function CompileString(this: void, code: string, identifier: string, HandleError?: boolean): [UnknownFunc, string] /** * * Attempts to compile the given file. If successful, returns a function that can be called to perform the actual execution of the script. * * @name CompileFile * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/CompileFile * @param {void} this - no description * @param {string} path - Path to the file, relative to the garrysmod/lua/ directory. * @returns {function} - The function which executes the script. **/ declare function CompileFile(this: void, path: string): UnknownFunc /** * * Converts a @IColor structure into HSV color space. * * @name ColorToHSV * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ColorToHSV * @param {void} this - no description * @param {Color} color - The @IColor structure. * @returns {number} - The hue in degrees [0, 360). * @returns {number} - The saturation in the range [0, 1]. * @returns {number} - The value in the range [0, 1]. * @tupleReturn **/ declare function ColorToHSV(this: void, color: Color): [number, number, number] /** * * Converts a @IColor structure into HSL color space. * * @name ColorToHSL * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ColorToHSL * @param {void} this - no description * @param {Color} color - The @IColor structure. * @returns {number} - The hue in degrees [0, 360). * @returns {number} - The saturation in the range [0, 1]. * @returns {number} - The lightness in the range [0, 1]. * @tupleReturn **/ declare function ColorToHSL(this: void, color: Color): [number, number, number] /** * * Creates a @IColor structure with randomized red, green, and blue components. If the alpha argument is true, alpha will also be randomized. * * @name ColorRand * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ColorRand * @param {void} this - no description * @param {boolean} a - Should alpha be randomized. * @returns {IColor} - The created @IColor structure. **/ declare function ColorRand(this: void, a?: boolean): IColor /** * * Creates a @IColor structure. * * @name Color * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Color * @note This function creates a new table for the color. It's a good practice to localize your colors. * @param {void} this - no description * @param {number} r - An integer from 0-255 describing the red value of the color. * @param {number} g - An integer from 0-255 describing the green value of the color. * @param {number} b - An integer from 0-255 describing the blue value of the color. * @param {number} a - An integer from 0-255 describing the alpha (transparency) of the color. * @returns {IColor} - The created @IColor structure. **/ declare function Color(this: void, r: number, g: number, b: number, a?: number): IColor /** * * Returns a new @IColor structure with the RGB components of the given @IColor structure and the alpha value specified. * * @name ColorAlpha * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/ColorAlpha * @param {void} this - no description * @param {Color} color - The @IColor structure from which to take RGB values. This color will not be modified. * @param {number} alpha - The new alpha value, a number between 0 and 255. Values above 255 will be clamped. * @returns {IColor} - The new @IColor structure with the modified alpha value **/ declare function ColorAlpha(this: void, color: Color, alpha: number): IColor /** * * Executes the specified action on the garbage collector. * * @name collectgarbage * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/collectgarbage * @param {void} this - no description * @param {string} action - The action to run. * Valid actions are "collect", "stop", "restart", "count", "step", "setpause" and "setstepmul". * @param {number} arg - The argument of the specified action, only applicable for "step", "setpause" and "setstepmul". * @returns {any} - If the action is count this is the number of kilobytes of memory used by Lua. * If the action is step this is true if a garbage collection cycle was finished. * If the action is setpause this is the previous value for the GC's pause. * If the action is setstepmul this is the previous value for the GC's step. **/ declare function collectgarbage(this: void, action?: string, arg: number): any /** * * Closes all Derma menus that have been passed to @RegisterDermaMenuForClose function and calls @GamemodeHooks:CloseDermaMenus * * @name CloseDermaMenus * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/CloseDermaMenus * @param {void} this - no description * @returns {void} **/ declare function CloseDermaMenus(this: void): void /** * * Creates a scene entity based on the scene name and the entity. * * @name ClientsideScene * @realm client * @wiki https://wiki.garrysmod.com/page/Global/ClientsideScene * @param {void} this - no description * @param {string} name - The name of the scene. * @param {Entity} targetEnt - The entity to play the scene on. * @returns {CSEnt} - C_SceneEntity **/ declare function ClientsideScene(this: void, name: string, targetEnt: Entity): CSEnt /** * * Creates a fully clientside ragdoll. * * @name ClientsideRagdoll * @realm client * @wiki https://wiki.garrysmod.com/page/Global/ClientsideRagdoll * @note The ragdoll initially starts as hidden and with shadows disabled, see the example for how to enable it.There's no need to call @EntityFuncs:Spawn on this entity.The physics won't initialize at all if the model hasn't been precached serverside first. * @warning Model must be precached with @util.PrecacheModel on the server before usage. * @bug #1387 Clientside entities are not garbage-collected, thus you must store a reference to the object and call @CSEnt:Remove manually. * @param {void} this - no description * @param {string} model - The file path to the model. * @param {RENDERGROUP} renderGroup - The @RENDERGROUP enum to assign. * @returns {CSEnt} - The newly created client-side ragdoll. ( C_ClientRagdoll ) **/ declare function ClientsideRagdoll(this: void, model: string, renderGroup?: RENDERGROUP): CSEnt /** * * Creates a non physical entity that only exists on the client. See also @ents.CreateClientProp. * * @name ClientsideModel * @realm client * @wiki https://wiki.garrysmod.com/page/Global/ClientsideModel * @warning Model must be precached with @util.PrecacheModel on the server before usage. * @bug #861 Parented clientside models will become detached if the parent entity leaves the PVS. * @bug #1387 Clientside entities are not garbage-collected, thus you must store a reference to the object and call @CSEnt:Remove manually. * @bug #3184 Clientside models will occasionally delete themselves during high server lag. * @param {void} this - no description * @param {string} model - The file path to the model. * @param {RENDERGROUP} renderGroup - The rendergroup of the entity, see @RENDERGROUP enum. * @returns {CSEnt} - Created client-side model. ( C_BaseFlex ) **/ declare function ClientsideModel(this: void, model: string, renderGroup?: RENDERGROUP): CSEnt /** * * Empties the pool of main menu background images. * * @name ClearBackgroundImages * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/ClearBackgroundImages * @param {void} this - no description * @returns {void} **/ declare function ClearBackgroundImages(this: void): void /** * * Automatically called by the engine when a panel is hovered over with the mouse * * @name ChangeTooltip * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/ChangeTooltip * @param {void} this - no description * @param {Panel} panel - Panel that has been hovered over * @returns {void} **/ declare function ChangeTooltip(this: void, panel: Panel): void /** * * Sets the active main menu background image to a random entry from the background images pool. Images are added with @AddBackgroundImage function. * * @name ChangeBackground * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/ChangeBackground * @param {void} this - no description * @param {string} currentgm - Apparently does nothing. * @returns {void} **/ declare function ChangeBackground(this: void, currentgm: string): void /** * * Aborts joining of the server you are currently joining. * * @name CancelLoading * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/CancelLoading * @param {void} this - no description * @returns {void} **/ declare function CancelLoading(this: void): void /** * * Used internally to check if the current server the player is on can be added to favorites or not. Does not check if the server is ALREADY in the favorites. * * @name CanAddServerToFavorites * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/CanAddServerToFavorites * @internal * @param {void} this - no description * @returns {boolean} - no description **/ declare function CanAddServerToFavorites(this: void): boolean /** * * If the result of the first argument is false or nil, an error is thrown with the second argument as the message. * * @name assert * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/assert * @param {void} this - no description * @param {any} expression - The expression to assert. * @param {string} errorMessage - The error message to throw when assertion fails. This is only type-checked if the assertion fails. * @param {any[]} ...returns - Any arguments past the error message will be returned by a successful assert. * @returns {any} - If successful, returns the first argument. * @returns {any} - If successful, returns the error message. This will be nil if the second argument wasn't specified. * Since the second argument is only type-checked if the assertion fails, this doesn't have to be a string. * @returns {any[]} - Returns any arguments past the error message. * @tupleReturn **/ declare function assert(this: void, expression: any, errorMessage?: string, ...returns?: any[]): [any, any, any[]] /** * * Sends the specified Lua code to all connected clients and executes it. * * @name BroadcastLua * @realm server * @wiki https://wiki.garrysmod.com/page/Global/BroadcastLua * @param {void} this - no description * @param {string} code - The code to be executed. Capped at length of 254 characters. * @returns {void} **/ declare function BroadcastLua(this: void, code: string): void /** * * Dumps the networked variables of all entities into one table and returns it. * * @name BuildNetworkedVarsTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/BuildNetworkedVarsTable * @param {void} this - no description * @returns {table} - Format: * * key = @Entity type for NWVars or @number type (always 0) for global vars * * value = @table type formatted as: * ** key = @string type var name * ** value = any type var value **/ declare function BuildNetworkedVarsTable(this: void): table /** * * Returns an angle with a randomized pitch, yaw, and roll between min(inclusive), max(exclusive). * * @name AngleRand * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/AngleRand * @param {void} this - no description * @param {number} min - Min bound inclusive. * @param {number} max - Max bound exclusive. * @returns {Angle} - The randomly generated angle. **/ declare function AngleRand(this: void, min?: number, max?: number): Angle /** * * Defines a global entity class variable with an automatic value in order to prevent collisions with other @CLASS enum. You should prefix your variable with CLASS_ for consistency. * * @name Add_NPC_Class * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Add NPC Class * @param {void} this - no description * @param {string} name - The name of the new enum/global variable. * @returns {void} **/ declare function Add_NPC_Class(this: void, name: string): void /** * * Creates an @Angle type object. * * @name Angle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/Angle * @note This function creates a new unique object. It's a good practice to localize your angles. * @param {void} this - no description * @param {number} pitch - The pitch value of the angle. * If this is an @Angle type, this function will return a copy of the given angle. * If this is a @string type, this function will try to parse the string as a angle. If it fails, it returns a 0 angle. * (See examples) * @param {number} yaw - The yaw value of the angle. * @param {number} roll - The roll value of the angle. * @returns {Angle} - Created angle **/ declare function Angle(this: void, pitch?: number, yaw?: number, roll?: number): Angle /** * * This function creates a World Tip, similar to the one shown when aiming at a Thruster where it shows you its force. * This function will make a World Tip that will only last 50 milliseconds (1/20th of a second), so you must call it continuously as long as you want the World Tip to be shown. It is common to call it inside a Think hook. * Contrary to what the function's name implies, it is impossible to create more than one World Tip at the same time. A new World Tip will overwrite the old one, so only use this function when you know nothing else will also be using it. * See @SandboxHooks:PaintWorldTips for more information. * * @name AddWorldTip * @realm client * @wiki https://wiki.garrysmod.com/page/Global/AddWorldTip * @note This function is only available in Sandbox and its derivatives * @param {void} this - no description * @param {number} entindex - **This argument is no longer used**; it has no effect on anything. You can use nil in this argument. * @param {string} text - The text for the world tip to display. * @param {number} dieTime - **This argument is no longer used**; when you add a World Tip it will always last only 0.05 seconds. You can use nil in this argument. * @param {Vector} pos - Where in the world you want the World Tip to be drawn. If you add a valid Entity in the next argument, this argument will have no effect on the actual World Tip. * @param {Entity} ent - Which entity you want to associate with the World Tip. This argument is optional. If set to a valid entity, this will override the position set in *pos* with the Entity's position. * @returns {void} **/ declare function AddWorldTip(this: void, entindex?: number, text: string, dieTime?: number, pos?: Vector, ent?: Entity): void /** * * Adds the specified vector to the PVS which is currently building. This allows all objects in visleafs visible from that vector to be drawn. * * @name AddOriginToPVS * @realm server * @wiki https://wiki.garrysmod.com/page/Global/AddOriginToPVS * @param {void} this - no description * @param {Vector} position - The origin to add. * @returns {void} **/ declare function AddOriginToPVS(this: void, position: Vector): void /** * * Marks a Lua file to be sent to clients when they join the server. Doesn't do anything on the client - this means you can use it in a shared file without problems. * * @name AddCSLuaFile * @realm client, server * @wiki https://wiki.garrysmod.com/page/Global/AddCSLuaFile * @note This function is not needed for scripts located in **lua/autorun/ ** and **lua/autorun/client/ **: they are automatically sent to clients. * @note You can add up to 8192 files. * @warning If the file trying to be added is empty, an error will occur, and the file will not be sent to the client. * @param {void} this - no description * @param {string} file - The name/path to the Lua file that should be sent, relative to the garrysmod/lua folder. If no parameter is specified, it sends the current file. * The file path can be relative to the script it is ran from. For example, if your script is in lua/myfolder/stuff.lua, calling @AddCSLuaFile function("otherstuff.lua") and @AddCSLuaFile function("myfolder/otherstuff.lua") is the same thing. * @returns {void} **/ declare function AddCSLuaFile(this: void, file?: string): void /** * * Loads the specified image from the /cache folder, used in combination @steamworks.Download. * Most addons will provide a 512x512 png image. * * @name AddonMaterial * @realm client, menu * @wiki https://wiki.garrysmod.com/page/Global/AddonMaterial * @param {void} this - no description * @param {string} name - The name of the file. * @returns {IMaterial} - The material, returns nil if the cached file is not an image. **/ declare function AddonMaterial(this: void, name: string): IMaterial /** * * Tells the engine to register a console command. If the command was ran, the engine calls @concommand.Run. * * @name AddConsoleCommand * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/AddConsoleCommand * @internal Use @concommand.Add instead. * @param {void} this - no description * @param {string} name - The name of the console command to add. * @param {string} helpText - The help text. * @param {FCVAR} flags - Concommand flags using @FCVAR enum * @returns {void} **/ declare function AddConsoleCommand(this: void, name: string, helpText: string, flags: FCVAR): void /** * * Adds the specified image path to the main menu background pool. Image can be png or jpeg. * * @name AddBackgroundImage * @realm menu * @wiki https://wiki.garrysmod.com/page/Global/AddBackgroundImage * @param {void} this - no description * @param {string} path - Path to the image. * @returns {void} **/ declare function AddBackgroundImage(this: void, path: string): void /** * * Adds simple Get/Set accessor functions on the specified table. * Can also force the value to be set to a number, bool or string. * * @name AccessorFunc * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Global/AccessorFunc * @param {void} this - no description * @param {table} tab - The table to add the accessor functions too. * @param {any} key - The key of the table to be get/set. * @param {string} name - The name of the functions (will be prefixed with Get and Set). * @param {FORCE} force - The type the setter should force to (uses @FORCE enum). * @returns {void} **/ declare function AccessorFunc(this: void, tab: table, key: any, name: string, force?: FORCE): void /** * @wiki https://wiki.garrysmod.com/page/Enums/ USE * @warning There is no guarantee to receive both ON and OFF signals. A signal will only be sent when pushing or letting go of the use key while actually aiming at the entity, so an ON signal might not be followed by an OFF signal if the player is aiming somewhere else when releasing the key, and similarly, an OFF signal may not be preceded by an ON signal if the player started aiming at the entity only after pressing the key. * Therefore, this method of input is unreliable and should not be used. * @enum _USE * @description Enumerations used by @EntityFuncs:SetUseType. Affects when @EntityHooks:Use is triggered. * Not to be confused with @USE enum used for @EntityHooks:Use and others. * @compileMembersOnly **/ declare enum _USE { /** * @param CONTINUOUS_USE - Fire a [USE_ON](https://wiki.garrysmod.com/page/Enums/USE) signal every tick as long as the player holds their use key and aims at the target. **/ CONTINUOUS_USE = 0, /** * @param ONOFF_USE - Fires a [USE_ON](https://wiki.garrysmod.com/page/Enums/USE) signal when starting to use an entity, and a [USE_OFF](https://wiki.garrysmod.com/page/Enums/USE) signal when letting go. **/ ONOFF_USE = 1, /** * @param DIRECTIONAL_USE - Like a wheel turning. **/ DIRECTIONAL_USE = 2, /** * @param SIMPLE_USE - Fire a [USE_ON](https://wiki.garrysmod.com/page/Enums/USE) signal only once when player presses their use key while aiming at the target. **/ SIMPLE_USE = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/WEAPON PROFICIENCY * @enum WEAPON_PROFICIENCY * @description Enumerations used by @NPC:SetCurrentWeaponProficiency and * @NPC:GetCurrentWeaponProficiency. * @compileMembersOnly **/ declare enum WEAPON_PROFICIENCY { /** * @param WEAPON_PROFICIENCY_POOR - The NPC will miss a large majority of their shots. **/ WEAPON_PROFICIENCY_POOR = 0, /** * @param WEAPON_PROFICIENCY_AVERAGE - The NPC will miss about half of their shots. **/ WEAPON_PROFICIENCY_AVERAGE = 1, /** * @param WEAPON_PROFICIENCY_GOOD - The NPC will sometimes miss their shots. **/ WEAPON_PROFICIENCY_GOOD = 2, /** * @param WEAPON_PROFICIENCY_VERY_GOOD - The NPC will rarely miss their shots. **/ WEAPON_PROFICIENCY_VERY_GOOD = 3, /** * @param WEAPON_PROFICIENCY_PERFECT - The NPC will almost never miss their shots. **/ WEAPON_PROFICIENCY_PERFECT = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/USE * @enum USE * @description Enumerations used by @EntityHooks:Use. * Not to be confused with @_USE enum used by @EntityFuncs:SetUseType. * @compileMembersOnly **/ declare enum USE { /** * @param USE_OFF - no description **/ USE_OFF = 0, /** * @param USE_ON - no description **/ USE_ON = 1, /** * @param USE_SET - no description **/ USE_SET = 2, /** * @param USE_TOGGLE - no description **/ USE_TOGGLE = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/TYPE * @note This doesn't actually represent a unique type returned by @TypeID function, but instead is a hack for networking colors with @net.WriteType. * @enum TYPE * @description Enumerations used by @net.ReadType and returned by @TypeID function * @compileMembersOnly **/ declare enum TYPE { /** * @param TYPE_NONE - Invalid type **/ TYPE_NONE = -1, /** * @param TYPE_INVALID - no description **/ TYPE_INVALID = -1, /** * @param TYPE_NIL - @nil type **/ TYPE_NIL = 0, /** * @param TYPE_BOOL - @boolean type **/ TYPE_BOOL = 1, /** * @param TYPE_LIGHTUSERDATA - @light userdata type **/ TYPE_LIGHTUSERDATA = 2, /** * @param TYPE_NUMBER - @number type **/ TYPE_NUMBER = 3, /** * @param TYPE_STRING - @string type **/ TYPE_STRING = 4, /** * @param TYPE_TABLE - @table type **/ TYPE_TABLE = 5, /** * @param TYPE_FUNCTION - @function type **/ TYPE_FUNCTION = 6, /** * @param TYPE_USERDATA - @userdata type **/ TYPE_USERDATA = 7, /** * @param TYPE_THREAD - @thread type **/ TYPE_THREAD = 8, /** * @param TYPE_ENTITY - @Entity type and entity sub-classes including @Player type, @Weapon type, @NPC type, @Vehicle type, @CSEnt type, and @NextBot type **/ TYPE_ENTITY = 9, /** * @param TYPE_VECTOR - @Vector type **/ TYPE_VECTOR = 10, /** * @param TYPE_ANGLE - @Angle type **/ TYPE_ANGLE = 11, /** * @param TYPE_PHYSOBJ - @PhysObj type **/ TYPE_PHYSOBJ = 12, /** * @param TYPE_SAVE - @ISave type **/ TYPE_SAVE = 13, /** * @param TYPE_RESTORE - @IRestore type **/ TYPE_RESTORE = 14, /** * @param TYPE_DAMAGEINFO - @CTakeDamageInfo type **/ TYPE_DAMAGEINFO = 15, /** * @param TYPE_EFFECTDATA - @CEffectData type **/ TYPE_EFFECTDATA = 16, /** * @param TYPE_MOVEDATA - @CMoveData type **/ TYPE_MOVEDATA = 17, /** * @param TYPE_RECIPIENTFILTER - @CRecipientFilter type **/ TYPE_RECIPIENTFILTER = 18, /** * @param TYPE_USERCMD - @CUserCmd type **/ TYPE_USERCMD = 19, /** * @param TYPE_SCRIPTEDVEHICLE - no description **/ TYPE_SCRIPTEDVEHICLE = 20, /** * @param TYPE_MATERIAL - @IMaterial type **/ TYPE_MATERIAL = 21, /** * @param TYPE_PANEL - @Panel type **/ TYPE_PANEL = 22, /** * @param TYPE_PARTICLE - @CLuaParticle type **/ TYPE_PARTICLE = 23, /** * @param TYPE_PARTICLEEMITTER - @CLuaEmitter type **/ TYPE_PARTICLEEMITTER = 24, /** * @param TYPE_TEXTURE - @ITexture type **/ TYPE_TEXTURE = 25, /** * @param TYPE_USERMSG - @bf_read type **/ TYPE_USERMSG = 26, /** * @param TYPE_CONVAR - @ConVar type **/ TYPE_CONVAR = 27, /** * @param TYPE_IMESH - @IMesh type **/ TYPE_IMESH = 28, /** * @param TYPE_MATRIX - @VMatrix type **/ TYPE_MATRIX = 29, /** * @param TYPE_SOUND - @CSoundPatch type **/ TYPE_SOUND = 30, /** * @param TYPE_PIXELVISHANDLE - @pixelvis_handle_t type **/ TYPE_PIXELVISHANDLE = 31, /** * @param TYPE_DLIGHT - dlight_t. Metatable of a @DynamicLight structure **/ TYPE_DLIGHT = 32, /** * @param TYPE_VIDEO - @IVideoWriter type **/ TYPE_VIDEO = 33, /** * @param TYPE_FILE - @File type **/ TYPE_FILE = 34, /** * @param TYPE_LOCOMOTION - @CLuaLocomotion type **/ TYPE_LOCOMOTION = 35, /** * @param TYPE_PATH - @PathFollower type **/ TYPE_PATH = 36, /** * @param TYPE_NAVAREA - @CNavArea type **/ TYPE_NAVAREA = 37, /** * @param TYPE_SOUNDHANDLE - @IGModAudioChannel type **/ TYPE_SOUNDHANDLE = 38, /** * @param TYPE_NAVLADDER - @CNavLadder type **/ TYPE_NAVLADDER = 39, /** * @param TYPE_PARTICLESYSTEM - @CNewParticleEffect type **/ TYPE_PARTICLESYSTEM = 40, /** * @param TYPE_PROJECTEDTEXTURE - @ProjectedTexture type **/ TYPE_PROJECTEDTEXTURE = 41, /** * @param TYPE_PHYSCOLLIDE - @PhysCollide type **/ TYPE_PHYSCOLLIDE = 42, /** * @param TYPE_SURFACEINFO - @SurfaceInfo type **/ TYPE_SURFACEINFO = 43, /** * @param TYPE_COUNT - Amount of TYPE_* enums **/ TYPE_COUNT = 44, /** * @param TYPE_COLOR - Metatable of a @IColor structure. **/ TYPE_COLOR = 255, } /** * @wiki https://wiki.garrysmod.com/page/Enums/TRANSMIT * @enum TRANSMIT * @description Enumerations used in @EntityHooks:UpdateTransmitState hook. * @compileMembersOnly **/ declare enum TRANSMIT { /** * @param TRANSMIT_ALWAYS - Always transmit the entity **/ TRANSMIT_ALWAYS = 0, /** * @param TRANSMIT_NEVER - Never transmit the entity, default for point entities **/ TRANSMIT_NEVER = 1, /** * @param TRANSMIT_PVS - Transmit when entity is in players view **/ TRANSMIT_PVS = 2, } /** * @wiki https://wiki.garrysmod.com/page/Enums/TRACER * @enum TRACER * @description Enumerations used by @AmmoData structure. * @compileMembersOnly **/ declare enum TRACER { /** * @param TRACER_NONE - Generates no tracer effects **/ TRACER_NONE = 0, /** * @param TRACER_LINE - Generates tracer effects **/ TRACER_LINE = 1, /** * @param TRACER_RAIL - Unused. **/ TRACER_RAIL = 2, /** * @param TRACER_BEAM - Unused. **/ TRACER_BEAM = 3, /** * @param TRACER_LINE_AND_WHIZ - Generates tracer and makes whizzing noises if the bullet flies past the player being shot at **/ TRACER_LINE_AND_WHIZ = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/TEXT ALIGN * @enum TEXT_ALIGN * @description Enumerations used by @draw.SimpleText, @draw.DrawText and in @TextData structure. * @compileMembersOnly **/ declare enum TEXT_ALIGN { /** * @param TEXT_ALIGN_LEFT - Align the text on the left **/ TEXT_ALIGN_LEFT = 0, /** * @param TEXT_ALIGN_CENTER - Align the text in center **/ TEXT_ALIGN_CENTER = 1, /** * @param TEXT_ALIGN_RIGHT - Align the text on the right **/ TEXT_ALIGN_RIGHT = 2, /** * @param TEXT_ALIGN_TOP - Align the text on the top **/ TEXT_ALIGN_TOP = 3, /** * @param TEXT_ALIGN_BOTTOM - Align the text on the bottom **/ TEXT_ALIGN_BOTTOM = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/TEXTUREFLAGS * @warning These enumerations do not exist in the game and are listed here purely for reference purposes only. * @enum TEXTUREFLAGS * @description Bit flags used by @GetRenderTargetEx function. Clientside only. Information taken from [here](https://developer.valvesoftware.com/wiki/Valve_Texture_Format#Image_flags) * @compileMembersOnly **/ declare enum TEXTUREFLAGS { /** * @param TEXTUREFLAGS_POINTSAMPLE - Low quality, "pixel art" texture filtering. **/ TEXTUREFLAGS_POINTSAMPLE = 1, /** * @param TEXTUREFLAGS_TRILINEAR - Medium quality texture filtering. **/ TEXTUREFLAGS_TRILINEAR = 2, /** * @param TEXTUREFLAGS_CLAMPS - Clamp S coordinates. **/ TEXTUREFLAGS_CLAMPS = 4, /** * @param TEXTUREFLAGS_CLAMPT - Clamp T coordinates. **/ TEXTUREFLAGS_CLAMPT = 8, /** * @param TEXTUREFLAGS_ANISOTROPIC - High quality texture filtering. **/ TEXTUREFLAGS_ANISOTROPIC = 16, /** * @param TEXTUREFLAGS_HINT_DXT5 - Used in skyboxes. Makes sure edges are seamless. **/ TEXTUREFLAGS_HINT_DXT5 = 32, /** * @param TEXTUREFLAGS_PWL_CORRECTED - Purpose unknown. **/ TEXTUREFLAGS_PWL_CORRECTED = 64, /** * @param TEXTUREFLAGS_NORMAL - Texture is a normal map. **/ TEXTUREFLAGS_NORMAL = 128, /** * @param TEXTUREFLAGS_NOMIP - Render largest mipmap only. (Does not delete existing mipmaps, just disables them.) **/ TEXTUREFLAGS_NOMIP = 256, /** * @param TEXTUREFLAGS_NOLOD - Not affected by texture resolution settings. **/ TEXTUREFLAGS_NOLOD = 512, /** * @param TEXTUREFLAGS_ALL_MIPS - No Minimum Mipmap **/ TEXTUREFLAGS_ALL_MIPS = 1024, /** * @param TEXTUREFLAGS_PROCEDURAL - Texture is an procedural texture (code can modify it). **/ TEXTUREFLAGS_PROCEDURAL = 2048, /** * @param TEXTUREFLAGS_ONEBITALPHA - One bit alpha channel used. **/ TEXTUREFLAGS_ONEBITALPHA = 4096, /** * @param TEXTUREFLAGS_EIGHTBITALPHA - Eight bit alpha channel used. **/ TEXTUREFLAGS_EIGHTBITALPHA = 8192, /** * @param TEXTUREFLAGS_ENVMAP - Texture is an environment map. **/ TEXTUREFLAGS_ENVMAP = 16384, /** * @param TEXTUREFLAGS_RENDERTARGET - Texture is a render target. **/ TEXTUREFLAGS_RENDERTARGET = 32768, /** * @param TEXTUREFLAGS_DEPTHRENDERTARGET - Texture is a depth render target. **/ TEXTUREFLAGS_DEPTHRENDERTARGET = 65536, /** * @param TEXTUREFLAGS_NODEBUGOVERRIDE - no description **/ TEXTUREFLAGS_NODEBUGOVERRIDE = 131072, /** * @param TEXTUREFLAGS_SINGLECOPY - no description **/ TEXTUREFLAGS_SINGLECOPY = 262144, /** * @param TEXTUREFLAGS_UNUSED_00080000 - no description **/ TEXTUREFLAGS_UNUSED_00080000 = 524288, /** * @param TEXTUREFLAGS_IMMEDIATE_CLEANUP - Immediately destroy this texture when its reference count hits zero * (aka TEXTUREFLAGS_UNUSED_00100000) **/ TEXTUREFLAGS_IMMEDIATE_CLEANUP = 1048576, /** * @param TEXTUREFLAGS_UNUSED_00200000 - no description **/ TEXTUREFLAGS_UNUSED_00200000 = 2097152, /** * @param TEXTUREFLAGS_UNUSED_00400000 - no description **/ TEXTUREFLAGS_UNUSED_00400000 = 4194304, /** * @param TEXTUREFLAGS_NODEPTHBUFFER - Do not buffer for Video Processing, generally render distance. **/ TEXTUREFLAGS_NODEPTHBUFFER = 8388608, /** * @param TEXTUREFLAGS_UNUSED_01000000 - no description **/ TEXTUREFLAGS_UNUSED_01000000 = 16777216, /** * @param TEXTUREFLAGS_CLAMPU - Clamp U coordinates (for volumetric textures). **/ TEXTUREFLAGS_CLAMPU = 33554432, /** * @param TEXTUREFLAGS_VERTEXTEXTURE - Usable as a vertex texture **/ TEXTUREFLAGS_VERTEXTEXTURE = 67108864, /** * @param TEXTUREFLAGS_SSBUMP - Texture is a SSBump. (SSB) **/ TEXTUREFLAGS_SSBUMP = 134217728, /** * @param TEXTUREFLAGS_UNUSED_10000000 - no description **/ TEXTUREFLAGS_UNUSED_10000000 = 268435456, /** * @param TEXTUREFLAGS_BORDER - Clamp to border colour on all texture coordinates **/ TEXTUREFLAGS_BORDER = 536870912, /** * @param TEXTUREFLAGS_UNUSED_40000000 - no description **/ TEXTUREFLAGS_UNUSED_40000000 = 1073741824, /** * @param TEXTUREFLAGS_UNUSED_80000000 - no description **/ TEXTUREFLAGS_UNUSED_80000000 = 2147483648, } /** * @wiki https://wiki.garrysmod.com/page/Enums/TEXFILTER * @enum TEXFILTER * @description Enumerations used by @render.PushFilterMin and @render.PushFilterMag. * See [this](https://msdn.microsoft.com/en-us/library/windows/desktop/bb172615(v=vs.85).aspx) and [this page](https://en.wikipedia.org/wiki/Texture_filtering) for more information on texture filtering. **/ declare enum TEXFILTER { /** * @param NONE - no description **/ NONE = 0, /** * @param POINT - no description **/ POINT = 1, /** * @param LINEAR - no description **/ LINEAR = 2, /** * @param ANISOTROPIC - no description **/ ANISOTROPIC = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/TEAM * @enum TEAM * @description Default defined teams in Garry's Mod. This does not include any custom teams created in custom gamemodes. Enumerations to use with @Player:Team * @compileMembersOnly **/ declare enum TEAM { /** * @param TEAM_CONNECTING - Connecting team ID, set when player connects to the server **/ TEAM_CONNECTING = 0, /** * @param TEAM_UNASSIGNED - Unassigned team ID, set right after player connected **/ TEAM_UNASSIGNED = 1001, /** * @param TEAM_SPECTATOR - Spectator team ID **/ TEAM_SPECTATOR = 1002, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SURF * @enum SURF * @description Surface flags, used by the @TraceResult structure. * @compileMembersOnly **/ declare enum SURF { /** * @param SURF_LIGHT - Value will hold the light strength **/ SURF_LIGHT = 1, /** * @param SURF_SKY2D - The surface is a 2D skybox **/ SURF_SKY2D = 2, /** * @param SURF_SKY - This surface is a skybox, equivalent to HitSky in @TraceResult structure **/ SURF_SKY = 4, /** * @param SURF_WARP - This surface is animated water **/ SURF_WARP = 8, /** * @param SURF_TRANS - This surface is translucent **/ SURF_TRANS = 16, /** * @param SURF_NOPORTAL - This surface cannot have portals placed on, used by Portal's gun **/ SURF_NOPORTAL = 32, /** * @param SURF_TRIGGER - This surface is a trigger **/ SURF_TRIGGER = 64, /** * @param SURF_NODRAW - This surface is an invisible entity, equivalent to HitNoDraw in @TraceResult structure **/ SURF_NODRAW = 128, /** * @param SURF_HINT - Make a primary bsp splitter **/ SURF_HINT = 256, /** * @param SURF_SKIP - This surface can be ignored by impact effects **/ SURF_SKIP = 512, /** * @param SURF_NOLIGHT - This surface has no lights calculated **/ SURF_NOLIGHT = 1024, /** * @param SURF_BUMPLIGHT - Calculate three lightmaps for the surface for bumpmapping **/ SURF_BUMPLIGHT = 2048, /** * @param SURF_NOSHADOWS - No shadows are cast on this surface **/ SURF_NOSHADOWS = 4096, /** * @param SURF_NODECALS - No decals are applied to this surface **/ SURF_NODECALS = 8192, /** * @param SURF_NOCHOP - Don't subdivide patches on this surface **/ SURF_NOCHOP = 16384, /** * @param SURF_HITBOX - This surface is part of an entity's hitbox **/ SURF_HITBOX = 32768, } /** * @wiki https://wiki.garrysmod.com/page/Enums/STUDIO * @enum STUDIO * @description Used by @EntityHooks:Draw and @EntityHooks:DrawTranslucent. * @compileMembersOnly **/ declare enum STUDIO { /** * @param STUDIO_RENDER - no description **/ STUDIO_RENDER = 1, /** * @param STUDIO_VIEWXFORMATTACHMENTS - no description **/ STUDIO_VIEWXFORMATTACHMENTS = 2, /** * @param STUDIO_DRAWTRANSLUCENTSUBMODELS - no description **/ STUDIO_DRAWTRANSLUCENTSUBMODELS = 4, /** * @param STUDIO_TWOPASS - no description **/ STUDIO_TWOPASS = 8, /** * @param STUDIO_STATIC_LIGHTING - no description **/ STUDIO_STATIC_LIGHTING = 16, /** * @param STUDIO_WIREFRAME - no description **/ STUDIO_WIREFRAME = 32, /** * @param STUDIO_ITEM_BLINK - no description **/ STUDIO_ITEM_BLINK = 64, /** * @param STUDIO_NOSHADOWS - no description **/ STUDIO_NOSHADOWS = 128, /** * @param STUDIO_WIREFRAME_VCOLLIDE - no description **/ STUDIO_WIREFRAME_VCOLLIDE = 256, /** * @param STUDIO_GENERATE_STATS - Not a studio flag, but used to flag when we want studio stats **/ STUDIO_GENERATE_STATS = 16777216, /** * @param STUDIO_SSAODEPTHTEXTURE - Not a studio flag, but used to flag model as using shadow depth material override **/ STUDIO_SSAODEPTHTEXTURE = 134217728, /** * @param STUDIO_SHADOWDEPTHTEXTURE - Not a studio flag, but used to flag model as using shadow depth material override **/ STUDIO_SHADOWDEPTHTEXTURE = 1073741824, /** * @param STUDIO_TRANSPARENCY - Not a studio flag, but used to flag model as a non-sorting brush model **/ STUDIO_TRANSPARENCY = 2147483648, } /** * @wiki https://wiki.garrysmod.com/page/Enums/STEPSOUNDTIME * @enum STEPSOUNDTIME * @description Enumerations used in @GamemodeHooks:PlayerStepSoundTime hook. * @compileMembersOnly **/ declare enum STEPSOUNDTIME { /** * @param STEPSOUNDTIME_NORMAL - Normal step **/ STEPSOUNDTIME_NORMAL = 0, /** * @param STEPSOUNDTIME_ON_LADDER - Step on ladder **/ STEPSOUNDTIME_ON_LADDER = 1, /** * @param STEPSOUNDTIME_WATER_KNEE - Step in water, with water reaching knee **/ STEPSOUNDTIME_WATER_KNEE = 2, /** * @param STEPSOUNDTIME_WATER_FOOT - Step in water, with water reaching foot **/ STEPSOUNDTIME_WATER_FOOT = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/STENCILOPERATION * @note These enumerations are also mirrored as @STENCIL enum. * @enum STENCILOPERATION * @description Enumerations for use with @render.SetStencilPassOperation, @render.SetStencilFailOperation and @render.SetStencilZFailOperation. Clientside only. * These enumerations are mirrors of @STENCILOPERATION enum. * Also see this corresponding MSDN entry: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476219%28v=vs.85%29.aspx. * @compileMembersOnly **/ declare enum STENCILOPERATION { /** * @param STENCILOPERATION_KEEP - Preserves the existing stencil buffer value. **/ STENCILOPERATION_KEEP = 1, /** * @param STENCILOPERATION_ZERO - Sets the value in the stencil buffer to 0. **/ STENCILOPERATION_ZERO = 2, /** * @param STENCILOPERATION_REPLACE - Sets the value in the stencil buffer to the reference value, set using @render.SetStencilReferenceValue. **/ STENCILOPERATION_REPLACE = 3, /** * @param STENCILOPERATION_INCRSAT - Increments the value in the stencil buffer by 1, clamping the result. **/ STENCILOPERATION_INCRSAT = 4, /** * @param STENCILOPERATION_DECRSAT - Decrements the value in the stencil buffer by 1, clamping the result. **/ STENCILOPERATION_DECRSAT = 5, /** * @param STENCILOPERATION_INVERT - Inverts the value in the stencil buffer. **/ STENCILOPERATION_INVERT = 6, /** * @param STENCILOPERATION_INCR - Increments the value in the stencil buffer by 1, wrapping around on overflow. **/ STENCILOPERATION_INCR = 7, /** * @param STENCILOPERATION_DECR - Decrements the value in the stencil buffer by 1, wrapping around on overflow. **/ STENCILOPERATION_DECR = 8, } /** * @wiki https://wiki.garrysmod.com/page/Enums/STENCILCOMPARISONFUNCTION * @note These enumerations are also mirrored as @STENCIL enum. * @enum STENCILCOMPARISONFUNCTION * @description Enumerations for use with @render.SetStencilCompareFunction. * The comparison is between the reference value set by @render.SetStencilReferenceValue, and the value of each pixel in the stencil buffer. * Clientside only. * These enumerations are mirrors of @STENCILCOMPARISONFUNCTION enum. * Also see this corresponding MSDN entry: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476101%28v=vs.85%29.aspx. * @compileMembersOnly **/ declare enum STENCILCOMPARISONFUNCTION { /** * @param STENCILCOMPARISONFUNCTION_NEVER - Never passes. **/ STENCILCOMPARISONFUNCTION_NEVER = 1, /** * @param STENCILCOMPARISONFUNCTION_LESS - Passes where the reference value is less than the stencil value. **/ STENCILCOMPARISONFUNCTION_LESS = 2, /** * @param STENCILCOMPARISONFUNCTION_EQUAL - Passes where the reference value is equal to the stencil value. **/ STENCILCOMPARISONFUNCTION_EQUAL = 3, /** * @param STENCILCOMPARISONFUNCTION_LESSEQUAL - Passes where the reference value is less than or equal to the stencil value. **/ STENCILCOMPARISONFUNCTION_LESSEQUAL = 4, /** * @param STENCILCOMPARISONFUNCTION_GREATER - Passes where the reference value is greater than the stencil value. **/ STENCILCOMPARISONFUNCTION_GREATER = 5, /** * @param STENCILCOMPARISONFUNCTION_NOTEQUAL - Passes where the reference value is not equal to the stencil value. **/ STENCILCOMPARISONFUNCTION_NOTEQUAL = 6, /** * @param STENCILCOMPARISONFUNCTION_GREATEREQUAL - Passes where the reference value is greater than or equal to the stencil value. **/ STENCILCOMPARISONFUNCTION_GREATEREQUAL = 7, /** * @param STENCILCOMPARISONFUNCTION_ALWAYS - Always passes. **/ STENCILCOMPARISONFUNCTION_ALWAYS = 8, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SOLID * @note No Physics Object will be created when using this. * @note Seems to be broken. * @enum SOLID * @description For use with @EntityFuncs:PhysicsInit, @EntityFuncs:SetSolid and @EntityFuncs:GetSolid. * @compileMembersOnly **/ declare enum SOLID { /** * @param SOLID_NONE - Does not collide with anything **/ SOLID_NONE = 0, /** * @param SOLID_BSP - The entity has a brush model defined by the map. Does not collide with other SOLID_BSP entities. **/ SOLID_BSP = 1, /** * @param SOLID_BBOX - Uses the entity's axis-aligned bounding box for collisions **/ SOLID_BBOX = 2, /** * @param SOLID_OBB - Uses the entity's object-aligned bounding box for collisions **/ SOLID_OBB = 3, /** * @param SOLID_OBB_YAW - Same as SOLID_OBB but restricts orientation to the Z-axis **/ SOLID_OBB_YAW = 4, /** * @param SOLID_CUSTOM - Always call into the entity for tests **/ SOLID_CUSTOM = 5, /** * @param SOLID_VPHYSICS - Uses the @PhysObj typeects of the entity **/ SOLID_VPHYSICS = 6, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SNDLVL * @validate * @warning These enumerations do not exist in the game and are listed here purely for reference purposes only. * @enum SNDLVL * @description The sound's attenuation; how fast it drops away, enumerations used by @EmitSound function and @EntityFuncs:EmitSound. * The engine starts running into trouble below 60dB. * @compileMembersOnly **/ declare enum SNDLVL { /** * @param SNDLVL_NONE - Sound plays everywhere **/ SNDLVL_NONE = 0, /** * @param SNDLVL_20dB - Rustling leaves **/ SNDLVL_20dB = 20, /** * @param SNDLVL_25dB - Whispering **/ SNDLVL_25dB = 25, /** * @param SNDLVL_30dB - Library **/ SNDLVL_30dB = 30, /** * @param SNDLVL_35dB - no description **/ SNDLVL_35dB = 35, /** * @param SNDLVL_40dB - no description **/ SNDLVL_40dB = 40, /** * @param SNDLVL_45dB - Refrigerator **/ SNDLVL_45dB = 45, /** * @param SNDLVL_50dB - Average home **/ SNDLVL_50dB = 50, /** * @param SNDLVL_55dB - Stop the sound **/ SNDLVL_55dB = 55, /** * @param SNDLVL_60dBSNDLVL_IDLE - Normal conversation, clothes dryer **/ SNDLVL_60dBSNDLVL_IDLE = 60, /** * @param SNDLVL_65dB - Washing machine, dishwasher **/ SNDLVL_65dB = 65, /** * @param SNDLVL_STATIC - no description **/ SNDLVL_STATIC = 66, /** * @param SNDLVL_70dB - Car, vacuum cleaner, mixer, electric sewing machine **/ SNDLVL_70dB = 70, /** * @param SNDLVL_75dBSNDLVL_NORM - Busy traffic **/ SNDLVL_75dBSNDLVL_NORM = 75, /** * @param SNDLVL_80dBSNDLVL_TALKING - Mini-bike, alarm clock, noisy restaurant, office tabulator, outboard motor, passing snowmobile **/ SNDLVL_80dBSNDLVL_TALKING = 80, /** * @param SNDLVL_85dB - Average factory, electric shaver **/ SNDLVL_85dB = 85, /** * @param SNDLVL_90dB - Screaming child, passing motorcycle, convertible ride on freeway **/ SNDLVL_90dB = 90, /** * @param SNDLVL_95dB - no description **/ SNDLVL_95dB = 95, /** * @param SNDLVL_100dB - Subway train, diesel truck, woodworking shop, pneumatic drill, boiler shop, jackhammer **/ SNDLVL_100dB = 100, /** * @param SNDLVL_105dB - Helicopter, power mower **/ SNDLVL_105dB = 105, /** * @param SNDLVL_110dB - Snowmobile (drivers seat), inboard motorboat, sandblasting **/ SNDLVL_110dB = 110, /** * @param SNDLVL_120dB - Car horn, propeller aircraft **/ SNDLVL_120dB = 120, /** * @param SNDLVL_130dB - Air raid siren **/ SNDLVL_130dB = 130, /** * @param SNDLVL_140dBSNDLVL_GUNFIRE - Threshold of pain, gunshot, jet engine **/ SNDLVL_140dBSNDLVL_GUNFIRE = 140, /** * @param SNDLVL_150dB - no description **/ SNDLVL_150dB = 150, /** * @param SNDLVL_180dB - Rocket launching **/ SNDLVL_180dB = 180, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SND * @enum SND * @description Sound flags used by @EmitSound function and @EntityFuncs:EmitSound. * @compileMembersOnly **/ declare enum SND { /** * @param SND_NOFLAGS - To keep the compiler happy **/ SND_NOFLAGS = 0, /** * @param SND_CHANGE_VOL - Change sound vol **/ SND_CHANGE_VOL = 1, /** * @param SND_CHANGE_PITCH - Change sound pitch **/ SND_CHANGE_PITCH = 2, /** * @param SND_STOP - Stop the sound **/ SND_STOP = 4, /** * @param SND_SPAWNING - We're spawning, used in some cases for ambients. Not sent over net, only a param between dll and server. **/ SND_SPAWNING = 8, /** * @param SND_DELAY - Sound has an initial delay **/ SND_DELAY = 16, /** * @param SND_STOP_LOOPING - Stop all looping sounds on the entity. **/ SND_STOP_LOOPING = 32, /** * @param SND_SHOULDPAUSE - This sound should be paused if the game is paused **/ SND_SHOULDPAUSE = 128, /** * @param SND_IGNORE_PHONEMES - no description **/ SND_IGNORE_PHONEMES = 256, /** * @param SND_IGNORE_NAME - Used to change all sounds emitted by an entity, regardless of scriptname **/ SND_IGNORE_NAME = 512, /** * @param SND_DO_NOT_OVERWRITE_EXISTING_ON_CHANNEL - no description **/ SND_DO_NOT_OVERWRITE_EXISTING_ON_CHANNEL = 1024, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SIM * @enum SIM * @description Enumerations used by @EntityHooks:PhysicsSimulate. * @compileMembersOnly **/ declare enum SIM { /** * @param SIM_NOTHING - Don't simulate physics **/ SIM_NOTHING = 0, /** * @param SIM_LOCAL_ACCELERATION - Vectors in local coordinate system **/ SIM_LOCAL_ACCELERATION = 1, /** * @param SIM_LOCAL_FORCE - Vectors in local coordinate system **/ SIM_LOCAL_FORCE = 2, /** * @param SIM_GLOBAL_ACCELERATION - Vectors in world coordinate system **/ SIM_GLOBAL_ACCELERATION = 3, /** * @param SIM_GLOBAL_FORCE - Vectors in world coordinate system **/ SIM_GLOBAL_FORCE = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SF * @note This is not a full list of available spawnflags, there are *a lot* more, each unique to each entity, you can find out more on the [Valve Developer Community](https://developer.valvesoftware.com/wiki/Main_Page) website for the entities in question. * @enum SF * @description Enumerations describing certain spawnflags. Everything except for SF_PHYS* is serverside only. * Spawnflags are set using @EntityFuncs:SetKeyValue with **"spawnflags"** as the key. * * SF_CITIZEN_* spawnflags represent spawnflags only usable on [npc_citizen](https://developer.valvesoftware.com/wiki/Npc_citizen). * * SF_NPC_* - Usable on all NPCs * * SF_PHYSBOX_* - Usable on [func_physbox](https://developer.valvesoftware.com/wiki/Func_physbox) * * SF_PHYSPROP_* - Usable on [prop_physics](https://developer.valvesoftware.com/wiki/Prop_physics) entities * @compileMembersOnly **/ declare enum SF { /** * @param SF_CITIZEN_AMMORESUPPLIER - Citizen that resupplies ammo **/ SF_CITIZEN_AMMORESUPPLIER = 524288, /** * @param SF_CITIZEN_FOLLOW - "Follow the player as soon as I spawn" **/ SF_CITIZEN_FOLLOW = 65536, /** * @param SF_CITIZEN_IGNORE_SEMAPHORE - "Work outside the speech semaphore system" **/ SF_CITIZEN_IGNORE_SEMAPHORE = 2097152, /** * @param SF_CITIZEN_MEDIC - Makes the citizen a medic **/ SF_CITIZEN_MEDIC = 131072, /** * @param SF_CITIZEN_NOT_COMMANDABLE - Citizen cannot join players squad, and will not able to be commanded by the Half-Life 2 command system for Citizens **/ SF_CITIZEN_NOT_COMMANDABLE = 1048576, /** * @param SF_CITIZEN_RANDOM_HEAD - Gives the citizen a random head **/ SF_CITIZEN_RANDOM_HEAD = 262144, /** * @param SF_CITIZEN_RANDOM_HEAD_FEMALE - Gives the citizen a random female head **/ SF_CITIZEN_RANDOM_HEAD_FEMALE = 8388608, /** * @param SF_CITIZEN_RANDOM_HEAD_MALE - Gives the citizen a random male head **/ SF_CITIZEN_RANDOM_HEAD_MALE = 4194304, /** * @param SF_CITIZEN_USE_RENDER_BOUNDS - "Use render bounds instead of human hull for guys sitting in chairs, etc". Must be set before Spawn() is called to take effect **/ SF_CITIZEN_USE_RENDER_BOUNDS = 16777216, /** * @param SF_FLOOR_TURRET_CITIZEN - Makes the floor turret friendly **/ SF_FLOOR_TURRET_CITIZEN = 512, /** * @param SF_NPC_ALTCOLLISION - Do Alternate collision for this NPC (player avoidance) **/ SF_NPC_ALTCOLLISION = 4096, /** * @param SF_NPC_ALWAYSTHINK - [Think outside PVS](https://developer.valvesoftware.com/wiki/NPC_Sensing) **/ SF_NPC_ALWAYSTHINK = 1024, /** * @param SF_NPC_DROP_HEALTHKIT - NPC Drops health kit when it dies **/ SF_NPC_DROP_HEALTHKIT = 8, /** * @param SF_NPC_FADE_CORPSE - Fade Corpse **/ SF_NPC_FADE_CORPSE = 512, /** * @param SF_NPC_FALL_TO_GROUND - If not set, means *teleport* to ground **/ SF_NPC_FALL_TO_GROUND = 4, /** * @param SF_NPC_GAG - No IDLE sounds until angry **/ SF_NPC_GAG = 2, /** * @param SF_NPC_LONG_RANGE - Long Visibility/Shoot **/ SF_NPC_LONG_RANGE = 256, /** * @param SF_NPC_NO_PLAYER_PUSHAWAY - Ignore player push - Don't give way to player **/ SF_NPC_NO_PLAYER_PUSHAWAY = 16384, /** * @param SF_NPC_NO_WEAPON_DROP - NPC Doesn't drop weapon on death **/ SF_NPC_NO_WEAPON_DROP = 8192, /** * @param SF_NPC_START_EFFICIENT - Don't acquire enemies or avoid obstacles **/ SF_NPC_START_EFFICIENT = 16, /** * @param SF_NPC_TEMPLATE - This entity is a template for the [npc_template_maker](https://developer.valvesoftware.com/wiki/Npc_template_maker). It will not spawn automatically and cannot be used with [point_template](https://developer.valvesoftware.com/wiki/Point_template). **/ SF_NPC_TEMPLATE = 2048, /** * @param SF_NPC_WAIT_FOR_SCRIPT - Wait for script **/ SF_NPC_WAIT_FOR_SCRIPT = 128, /** * @param SF_NPC_WAIT_TILL_SEEN - Wait till seen **/ SF_NPC_WAIT_TILL_SEEN = 1, /** * @param SF_PHYSBOX_MOTIONDISABLED - If set, calls @PhysObj:EnableMotion( false ) on the func_physbox when the physics are created **/ SF_PHYSBOX_MOTIONDISABLED = 32768, /** * @param SF_PHYSBOX_NEVER_PICK_UP - Gravity gun is NOT allowed to pick this up. **/ SF_PHYSBOX_NEVER_PICK_UP = 2097152, /** * @param SF_PHYSPROP_MOTIONDISABLED - If set, calls @PhysObj:EnableMotion( false ) on the func_physbox when the physics are created. See [Physics optimization](https://developer.valvesoftware.com/wiki/Physics_optimization) **/ SF_PHYSPROP_MOTIONDISABLED = 8, /** * @param SF_PHYSPROP_PREVENT_PICKUP - Prevent that physbox from being picked up **/ SF_PHYSPROP_PREVENT_PICKUP = 512, /** * @param SF_ROLLERMINE_FRIENDLY - Makes the rollermine friendly **/ SF_ROLLERMINE_FRIENDLY = 65536, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SENSORBONE * @enum SENSORBONE * @description Enumerations used by Kinect SDK bindings. **/ declare enum SENSORBONE { /** * @param SHOULDER_RIGHT - no description **/ SHOULDER_RIGHT = 8, /** * @param SHOULDER_LEFT - no description **/ SHOULDER_LEFT = 4, /** * @param HIP - no description **/ HIP = 0, /** * @param ELBOW_RIGHT - no description **/ ELBOW_RIGHT = 9, /** * @param KNEE_RIGHT - no description **/ KNEE_RIGHT = 17, /** * @param WRIST_RIGHT - no description **/ WRIST_RIGHT = 10, /** * @param ANKLE_LEFT - no description **/ ANKLE_LEFT = 14, /** * @param FOOT_LEFT - no description **/ FOOT_LEFT = 15, /** * @param WRIST_LEFT - no description **/ WRIST_LEFT = 6, /** * @param FOOT_RIGHT - no description **/ FOOT_RIGHT = 19, /** * @param HAND_RIGHT - no description **/ HAND_RIGHT = 11, /** * @param SHOULDER - no description **/ SHOULDER = 2, /** * @param HIP_LEFT - no description **/ HIP_LEFT = 12, /** * @param HIP_RIGHT - no description **/ HIP_RIGHT = 16, /** * @param HAND_LEFT - no description **/ HAND_LEFT = 7, /** * @param ANKLE_RIGHT - no description **/ ANKLE_RIGHT = 18, /** * @param SPINE - no description **/ SPINE = 1, /** * @param ELBOW_LEFT - no description **/ ELBOW_LEFT = 5, /** * @param KNEE_LEFT - no description **/ KNEE_LEFT = 13, /** * @param HEAD - no description **/ HEAD = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SCREENFADE * @enum SCREENFADE * @description Enumerations used by @Player:ScreenFade. **/ declare enum SCREENFADE { /** * @param IN - Fade out after the hold time has passed **/ IN = 1, /** * @param OUT - Fade in, hold time passes, disappear **/ OUT = 2, /** * @param MODULATE - With white color, turns the screen black **/ MODULATE = 4, /** * @param STAYOUT - No effects, never disappear **/ STAYOUT = 8, /** * @param PURGE - Appear, Disappear, no effects **/ PURGE = 16, } /** * @wiki https://wiki.garrysmod.com/page/Enums/SCHED * @enum SCHED * @description Enumerations for NPC schedules, used by @EntityHooks:StartEngineSchedule and @NPC:SetSchedule. Serverside only. * @compileMembersOnly **/ declare enum SCHED { /** * @param LAST_SHARED_SCHEDULE - The schedule enum limit **/ LAST_SHARED_SCHEDULE = 88, /** * @param SCHED_AISCRIPT - Begins AI script based on NPC's *m_hCine* save value. **/ SCHED_AISCRIPT = 56, /** * @param SCHED_ALERT_FACE - Idle stance and face ideal yaw angles. **/ SCHED_ALERT_FACE = 5, /** * @param SCHED_ALERT_FACE_BESTSOUND - no description **/ SCHED_ALERT_FACE_BESTSOUND = 6, /** * @param SCHED_ALERT_REACT_TO_COMBAT_SOUND - no description **/ SCHED_ALERT_REACT_TO_COMBAT_SOUND = 7, /** * @param SCHED_ALERT_SCAN - Rotate 180 degrees and back to check for enemies. **/ SCHED_ALERT_SCAN = 8, /** * @param SCHED_ALERT_STAND - Remain idle until an enemy is heard or found. **/ SCHED_ALERT_STAND = 9, /** * @param SCHED_ALERT_WALK - Walk until an enemy is heard or found. **/ SCHED_ALERT_WALK = 10, /** * @param SCHED_AMBUSH - Remain idle until provoked or an enemy is found. **/ SCHED_AMBUSH = 52, /** * @param SCHED_ARM_WEAPON - Performs ACT_ARM. **/ SCHED_ARM_WEAPON = 48, /** * @param SCHED_BACK_AWAY_FROM_ENEMY - Back away from enemy. If not possible to back away then go behind enemy. **/ SCHED_BACK_AWAY_FROM_ENEMY = 24, /** * @param SCHED_BACK_AWAY_FROM_SAVE_POSITION - no description **/ SCHED_BACK_AWAY_FROM_SAVE_POSITION = 26, /** * @param SCHED_BIG_FLINCH - Heavy damage was taken for the first time in a while. **/ SCHED_BIG_FLINCH = 23, /** * @param SCHED_CHASE_ENEMY - Begin chasing an enemy. **/ SCHED_CHASE_ENEMY = 17, /** * @param SCHED_CHASE_ENEMY_FAILED - Failed to chase enemy. **/ SCHED_CHASE_ENEMY_FAILED = 18, /** * @param SCHED_COMBAT_FACE - Face current enemy. **/ SCHED_COMBAT_FACE = 12, /** * @param SCHED_COMBAT_PATROL - Will walk around patrolling an area until an enemy is found. **/ SCHED_COMBAT_PATROL = 75, /** * @param SCHED_COMBAT_STAND - no description **/ SCHED_COMBAT_STAND = 15, /** * @param SCHED_COMBAT_SWEEP - no description **/ SCHED_COMBAT_SWEEP = 13, /** * @param SCHED_COMBAT_WALK - no description **/ SCHED_COMBAT_WALK = 16, /** * @param SCHED_COWER - When not moving, will perform ACT_COWER. **/ SCHED_COWER = 40, /** * @param SCHED_DIE - Regular NPC death. **/ SCHED_DIE = 53, /** * @param SCHED_DIE_RAGDOLL - Plays NPC death sound (doesn't kill NPC). **/ SCHED_DIE_RAGDOLL = 54, /** * @param SCHED_DISARM_WEAPON - Holsters active weapon. (Only works with NPC's that can holster weapons) **/ SCHED_DISARM_WEAPON = 49, /** * @param SCHED_DROPSHIP_DUSTOFF - no description **/ SCHED_DROPSHIP_DUSTOFF = 79, /** * @param SCHED_DUCK_DODGE - Preform Ducking animation. (Only works with npc_alyx) **/ SCHED_DUCK_DODGE = 84, /** * @param SCHED_ESTABLISH_LINE_OF_FIRE - Search for a place to shoot current enemy. **/ SCHED_ESTABLISH_LINE_OF_FIRE = 35, /** * @param SCHED_ESTABLISH_LINE_OF_FIRE_FALLBACK - Fallback from an established line of fire. **/ SCHED_ESTABLISH_LINE_OF_FIRE_FALLBACK = 36, /** * @param SCHED_FAIL - Failed doing current schedule. **/ SCHED_FAIL = 81, /** * @param SCHED_FAIL_ESTABLISH_LINE_OF_FIRE - Failed to establish a line of fire. **/ SCHED_FAIL_ESTABLISH_LINE_OF_FIRE = 38, /** * @param SCHED_FAIL_NOSTOP - no description **/ SCHED_FAIL_NOSTOP = 82, /** * @param SCHED_FAIL_TAKE_COVER - Failed to take cover. **/ SCHED_FAIL_TAKE_COVER = 31, /** * @param SCHED_FALL_TO_GROUND - Fall to ground when in the air. **/ SCHED_FALL_TO_GROUND = 78, /** * @param SCHED_FEAR_FACE - Will express fear face. (Only works on NPCs with expressions) **/ SCHED_FEAR_FACE = 14, /** * @param SCHED_FLEE_FROM_BEST_SOUND - no description **/ SCHED_FLEE_FROM_BEST_SOUND = 29, /** * @param SCHED_FLINCH_PHYSICS - Plays ACT_FLINCH_PHYSICS. **/ SCHED_FLINCH_PHYSICS = 80, /** * @param SCHED_FORCED_GO - Force walk to position (debug). **/ SCHED_FORCED_GO = 71, /** * @param SCHED_FORCED_GO_RUN - Force run to position (debug). **/ SCHED_FORCED_GO_RUN = 72, /** * @param SCHED_GET_HEALTHKIT - Pick up item if within a radius of 5 units. **/ SCHED_GET_HEALTHKIT = 66, /** * @param SCHED_HIDE_AND_RELOAD - Take cover and reload weapon. **/ SCHED_HIDE_AND_RELOAD = 50, /** * @param SCHED_IDLE_STAND - Idle stance **/ SCHED_IDLE_STAND = 1, /** * @param SCHED_IDLE_WALK - Walk to position. **/ SCHED_IDLE_WALK = 2, /** * @param SCHED_IDLE_WANDER - Walk to random position within a radius of 200 units. **/ SCHED_IDLE_WANDER = 3, /** * @param SCHED_INTERACTION_MOVE_TO_PARTNER - no description **/ SCHED_INTERACTION_MOVE_TO_PARTNER = 85, /** * @param SCHED_INTERACTION_WAIT_FOR_PARTNER - no description **/ SCHED_INTERACTION_WAIT_FOR_PARTNER = 86, /** * @param SCHED_INVESTIGATE_SOUND - no description **/ SCHED_INVESTIGATE_SOUND = 11, /** * @param SCHED_MELEE_ATTACK1 - no description **/ SCHED_MELEE_ATTACK1 = 41, /** * @param SCHED_MELEE_ATTACK2 - no description **/ SCHED_MELEE_ATTACK2 = 42, /** * @param SCHED_MOVE_AWAY - Move away from player. **/ SCHED_MOVE_AWAY = 68, /** * @param SCHED_MOVE_AWAY_END - Stop moving and continue enemy scan. **/ SCHED_MOVE_AWAY_END = 70, /** * @param SCHED_MOVE_AWAY_FAIL - Failed to move away; stop moving. **/ SCHED_MOVE_AWAY_FAIL = 69, /** * @param SCHED_MOVE_AWAY_FROM_ENEMY - Move away from enemy while facing it and checking for new enemies. **/ SCHED_MOVE_AWAY_FROM_ENEMY = 25, /** * @param SCHED_MOVE_TO_WEAPON_RANGE - Move to the range the weapon is preferably used at. **/ SCHED_MOVE_TO_WEAPON_RANGE = 34, /** * @param SCHED_NEW_WEAPON - Pick up a new weapon if within a radius of 5 units. **/ SCHED_NEW_WEAPON = 63, /** * @param SCHED_NEW_WEAPON_CHEAT - Fail safe: Create the weapon that the NPC went to pick up if it was removed during pick up schedule. **/ SCHED_NEW_WEAPON_CHEAT = 64, /** * @param SCHED_NONE - No schedule is being performed. **/ SCHED_NONE = 0, /** * @param SCHED_NPC_FREEZE - Prevents movement until COND_NPC_UNFREEZE(68) is set. **/ SCHED_NPC_FREEZE = 73, /** * @param SCHED_PATROL_RUN - Run to random position and stop if enemy is heard or found. **/ SCHED_PATROL_RUN = 76, /** * @param SCHED_PATROL_WALK - Walk to random position and stop if enemy is heard or found. **/ SCHED_PATROL_WALK = 74, /** * @param SCHED_PRE_FAIL_ESTABLISH_LINE_OF_FIRE - no description **/ SCHED_PRE_FAIL_ESTABLISH_LINE_OF_FIRE = 37, /** * @param SCHED_RANGE_ATTACK1 - no description **/ SCHED_RANGE_ATTACK1 = 43, /** * @param SCHED_RANGE_ATTACK2 - no description **/ SCHED_RANGE_ATTACK2 = 44, /** * @param SCHED_RELOAD - Stop moving and reload until danger is heard. **/ SCHED_RELOAD = 51, /** * @param SCHED_RUN_FROM_ENEMY - Retreat from the established enemy. **/ SCHED_RUN_FROM_ENEMY = 32, /** * @param SCHED_RUN_FROM_ENEMY_FALLBACK - no description **/ SCHED_RUN_FROM_ENEMY_FALLBACK = 33, /** * @param SCHED_RUN_FROM_ENEMY_MOB - no description **/ SCHED_RUN_FROM_ENEMY_MOB = 83, /** * @param SCHED_RUN_RANDOM - Run to random position within a radius of 500 units. **/ SCHED_RUN_RANDOM = 77, /** * @param SCHED_SCENE_GENERIC - no description **/ SCHED_SCENE_GENERIC = 62, /** * @param SCHED_SCRIPTED_CUSTOM_MOVE - no description **/ SCHED_SCRIPTED_CUSTOM_MOVE = 59, /** * @param SCHED_SCRIPTED_FACE - no description **/ SCHED_SCRIPTED_FACE = 61, /** * @param SCHED_SCRIPTED_RUN - no description **/ SCHED_SCRIPTED_RUN = 58, /** * @param SCHED_SCRIPTED_WAIT - no description **/ SCHED_SCRIPTED_WAIT = 60, /** * @param SCHED_SCRIPTED_WALK - no description **/ SCHED_SCRIPTED_WALK = 57, /** * @param SCHED_SHOOT_ENEMY_COVER - Shoot cover that the enemy is behind. **/ SCHED_SHOOT_ENEMY_COVER = 39, /** * @param SCHED_SLEEP - Sets the NPC to a sleep-like state. **/ SCHED_SLEEP = 87, /** * @param SCHED_SMALL_FLINCH - no description **/ SCHED_SMALL_FLINCH = 22, /** * @param SCHED_SPECIAL_ATTACK1 - no description **/ SCHED_SPECIAL_ATTACK1 = 45, /** * @param SCHED_SPECIAL_ATTACK2 - no description **/ SCHED_SPECIAL_ATTACK2 = 46, /** * @param SCHED_STANDOFF - no description **/ SCHED_STANDOFF = 47, /** * @param SCHED_SWITCH_TO_PENDING_WEAPON - no description **/ SCHED_SWITCH_TO_PENDING_WEAPON = 65, /** * @param SCHED_TAKE_COVER_FROM_BEST_SOUND - no description **/ SCHED_TAKE_COVER_FROM_BEST_SOUND = 28, /** * @param SCHED_TAKE_COVER_FROM_ENEMY - Take cover from current enemy. **/ SCHED_TAKE_COVER_FROM_ENEMY = 27, /** * @param SCHED_TAKE_COVER_FROM_ORIGIN - no description **/ SCHED_TAKE_COVER_FROM_ORIGIN = 30, /** * @param SCHED_TARGET_CHASE - Chase set NPC target. **/ SCHED_TARGET_CHASE = 21, /** * @param SCHED_TARGET_FACE - Face NPC target. **/ SCHED_TARGET_FACE = 20, /** * @param SCHED_VICTORY_DANCE - Human victory dance. **/ SCHED_VICTORY_DANCE = 19, /** * @param SCHED_WAIT_FOR_SCRIPT - no description **/ SCHED_WAIT_FOR_SCRIPT = 55, /** * @param SCHED_WAIT_FOR_SPEAK_FINISH - no description **/ SCHED_WAIT_FOR_SPEAK_FINISH = 67, /** * @param SCHED_WAKE_ANGRY - Spot an enemy and go from an idle state to combat state. **/ SCHED_WAKE_ANGRY = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/RT SIZE * @enum RT_SIZE * @description Enumerations used by @GetRenderTargetEx function. Clientside only. * @compileMembersOnly **/ declare enum RT_SIZE { /** * @param RT_SIZE_NO_CHANGE - Only allowed for render targets that don't want a depth buffer (because if they have a depth buffer, the render target must be less than or equal to the size of the framebuffer). **/ RT_SIZE_NO_CHANGE = 0, /** * @param RT_SIZE_DEFAULT - Don't play with the specified width and height other than making sure it fits in the framebuffer. **/ RT_SIZE_DEFAULT = 1, /** * @param RT_SIZE_PICMIP - Apply picmip to the render target's width and height. **/ RT_SIZE_PICMIP = 2, /** * @param RT_SIZE_HDR - frame_buffer_width / 4 **/ RT_SIZE_HDR = 3, /** * @param RT_SIZE_FULL_FRAME_BUFFER - Same size as frame buffer, or next lower power of 2 if we can't do that. **/ RT_SIZE_FULL_FRAME_BUFFER = 4, /** * @param RT_SIZE_OFFSCREEN - Target of specified size, don't mess with dimensions **/ RT_SIZE_OFFSCREEN = 5, /** * @param RT_SIZE_FULL_FRAME_BUFFER_ROUNDED_UP - Same size as the frame buffer, rounded up if necessary for systems that can't do non-power of two textures. **/ RT_SIZE_FULL_FRAME_BUFFER_ROUNDED_UP = 6, /** * @param RT_SIZE_REPLAY_SCREENSHOT - Rounded down to power of 2, essentially **/ RT_SIZE_REPLAY_SCREENSHOT = 7, /** * @param RT_SIZE_LITERAL - Use the size passed in. Don't clamp it to the frame buffer size. Really. **/ RT_SIZE_LITERAL = 8, /** * @param RT_SIZE_LITERAL_PICMIP - no description **/ RT_SIZE_LITERAL_PICMIP = 9, } /** * @wiki https://wiki.garrysmod.com/page/Enums/RENDERMODE * @enum RENDERMODE * @description Enumerations used by @EntityFuncs:SetRenderMode and @EntityFuncs:GetRenderMode. * @compileMembersOnly **/ declare enum RENDERMODE { /** * @param RENDERMODE_NORMAL - Default render mode. Transparently has no effect. **/ RENDERMODE_NORMAL = 0, /** * @param RENDERMODE_TRANSCOLOR - Supports transparency. **/ RENDERMODE_TRANSCOLOR = 1, /** * @param RENDERMODE_TRANSTEXTURE - no description **/ RENDERMODE_TRANSTEXTURE = 2, /** * @param RENDERMODE_GLOW - Intended for glowing sprites. Allows transparency, and forces the sprite or model to be rendered unlit. * The size of a sprite rendered with Glow is consistent with the screen size (unlike the alternative World Space Glow), making it appear larger at a distance, in comparison to the world. * The GlowProxySize keyvalue affects this Render Mode on sprites. **/ RENDERMODE_GLOW = 3, /** * @param RENDERMODE_TRANSALPHA - Enables Alphatesting. Legacy port from Goldsource. Obsolete in Source due to Alphatesting being handled in materials. Does not allow transparency. * Use this to make alpha of @Color function work for your entity. For players, it must be set for their active weapon aswell. **/ RENDERMODE_TRANSALPHA = 4, /** * @param RENDERMODE_TRANSADD - Add the material's color values to the existing image, instead of performing a multiplication. Sprites will appear through world geometry and the sprite/model will always brighten the world. Allows transparency. **/ RENDERMODE_TRANSADD = 5, /** * @param RENDERMODE_ENVIROMENTAL - Causes the material to be not be drawn at all, similarly to Don't Render. **/ RENDERMODE_ENVIROMENTAL = 6, /** * @param RENDERMODE_TRANSADDFRAMEBLEND - Functions like Additive, but also blends between animation frames. Requires the material to have a functioning animating texture. Allows transparency. **/ RENDERMODE_TRANSADDFRAMEBLEND = 7, /** * @param RENDERMODE_TRANSALPHADD - Functions similarly to Additive, except that the alpha channel controls the opacity of the sprite. An example of use is for dark sprites, with an example material being sprites/strider_blackball.vmt. **/ RENDERMODE_TRANSALPHADD = 8, /** * @param RENDERMODE_WORLDGLOW - Functions similarly to Glow, with the exception that the size of the sprite is relative to the world rather than the screen. * The GlowProxySize keyvalue affects this Render Mode on sprites. **/ RENDERMODE_WORLDGLOW = 9, /** * @param RENDERMODE_NONE - The entity is still being drawn and networked albeit invisible, therefore not making this Render Mode ideal for performance reasons. * To completely avoid drawing and networking an entity, see EF_NODRAW. **/ RENDERMODE_NONE = 10, } /** * @wiki https://wiki.garrysmod.com/page/Enums/RENDERGROUP * @enum RENDERGROUP * @description Enumerations used by @ClientsideModel function, ENT.RenderGroup in @IEntity structure and @EntityFuncs:GetRenderGroup. * @compileMembersOnly **/ declare enum RENDERGROUP { /** * @param RENDERGROUP_STATIC_HUGE - Huge static prop, possibly leftover from goldsrc **/ RENDERGROUP_STATIC_HUGE = 0, /** * @param RENDERGROUP_OPAQUE_HUGE - Huge opaque entity, possibly leftover from goldsrc **/ RENDERGROUP_OPAQUE_HUGE = 1, /** * @param RENDERGROUP_STATIC - Static props? **/ RENDERGROUP_STATIC = 6, /** * @param RENDERGROUP_OPAQUE - For non transparent/solid entities. * For scripted entities, this will have @EntityHooks:Draw called **/ RENDERGROUP_OPAQUE = 7, /** * @param RENDERGROUP_TRANSLUCENT - For translucent/transparent entities * For scripted entities, this will have @EntityHooks:DrawTranslucent called **/ RENDERGROUP_TRANSLUCENT = 8, /** * @param RENDERGROUP_BOTH - For both translucent/transparent and opaque/solid anim entities * For scripted entities, this will have both, @EntityHooks:Draw and @EntityHooks:DrawTranslucent called **/ RENDERGROUP_BOTH = 9, /** * @param RENDERGROUP_VIEWMODEL - Solid weapon view models **/ RENDERGROUP_VIEWMODEL = 10, /** * @param RENDERGROUP_VIEWMODEL_TRANSLUCENT - Transparent overlays etc **/ RENDERGROUP_VIEWMODEL_TRANSLUCENT = 11, /** * @param RENDERGROUP_OPAQUE_BRUSH - For brush entities **/ RENDERGROUP_OPAQUE_BRUSH = 12, /** * @param RENDERGROUP_OTHER - Unclassfied. Won't get drawn. **/ RENDERGROUP_OTHER = 13, } /** * @wiki https://wiki.garrysmod.com/page/Enums/PLAYER * @enum PLAYER_ANIM * @description Enumerations used by @EntityFuncs:SetAnimation * @compileMembersOnly **/ declare enum PLAYER_ANIM { /** * @param PLAYER_IDLE - no description **/ PLAYER_IDLE = 0, /** * @param PLAYER_WALK - no description **/ PLAYER_WALK = 1, /** * @param PLAYER_JUMP - no description **/ PLAYER_JUMP = 2, /** * @param PLAYER_SUPERJUMP - no description **/ PLAYER_SUPERJUMP = 3, /** * @param PLAYER_DIE - no description **/ PLAYER_DIE = 4, /** * @param PLAYER_ATTACK1 - Player attack according to current hold type, used in SWEPs **/ PLAYER_ATTACK1 = 5, /** * @param PLAYER_IN_VEHICLE - no description **/ PLAYER_IN_VEHICLE = 6, /** * @param PLAYER_RELOAD - Player reload according to current hold type, used in SWEPs **/ PLAYER_RELOAD = 7, /** * @param PLAYER_START_AIMING - no description **/ PLAYER_START_AIMING = 8, /** * @param PLAYER_LEAVE_AIMING - no description **/ PLAYER_LEAVE_AIMING = 9, } /** * @wiki https://wiki.garrysmod.com/page/Enums/PLAYERANIMEVENT * @enum PLAYERANIMEVENT * @description Used by @GamemodeHooks:DoAnimationEvent and @Player:DoCustomAnimEvent. * @compileMembersOnly **/ declare enum PLAYERANIMEVENT { /** * @param PLAYERANIMEVENT_ATTACK_PRIMARY - Primary attack **/ PLAYERANIMEVENT_ATTACK_PRIMARY = 0, /** * @param PLAYERANIMEVENT_ATTACK_SECONDARY - Secondary attack **/ PLAYERANIMEVENT_ATTACK_SECONDARY = 1, /** * @param PLAYERANIMEVENT_ATTACK_GRENADE - Grenade throw **/ PLAYERANIMEVENT_ATTACK_GRENADE = 2, /** * @param PLAYERANIMEVENT_RELOAD - Reload **/ PLAYERANIMEVENT_RELOAD = 3, /** * @param PLAYERANIMEVENT_RELOAD_LOOP - Looping reload (single-reload shotguns) **/ PLAYERANIMEVENT_RELOAD_LOOP = 4, /** * @param PLAYERANIMEVENT_RELOAD_END - Looping reload end **/ PLAYERANIMEVENT_RELOAD_END = 5, /** * @param PLAYERANIMEVENT_JUMP - Jump **/ PLAYERANIMEVENT_JUMP = 6, /** * @param PLAYERANIMEVENT_SWIM - Swim **/ PLAYERANIMEVENT_SWIM = 7, /** * @param PLAYERANIMEVENT_DIE - Die **/ PLAYERANIMEVENT_DIE = 8, /** * @param PLAYERANIMEVENT_FLINCH_CHEST - no description **/ PLAYERANIMEVENT_FLINCH_CHEST = 9, /** * @param PLAYERANIMEVENT_FLINCH_HEAD - no description **/ PLAYERANIMEVENT_FLINCH_HEAD = 10, /** * @param PLAYERANIMEVENT_FLINCH_LEFTARM - no description **/ PLAYERANIMEVENT_FLINCH_LEFTARM = 11, /** * @param PLAYERANIMEVENT_FLINCH_RIGHTARM - no description **/ PLAYERANIMEVENT_FLINCH_RIGHTARM = 12, /** * @param PLAYERANIMEVENT_FLINCH_LEFTLEG - no description **/ PLAYERANIMEVENT_FLINCH_LEFTLEG = 13, /** * @param PLAYERANIMEVENT_FLINCH_RIGHTLEG - no description **/ PLAYERANIMEVENT_FLINCH_RIGHTLEG = 14, /** * @param PLAYERANIMEVENT_DOUBLEJUMP - no description **/ PLAYERANIMEVENT_DOUBLEJUMP = 15, /** * @param PLAYERANIMEVENT_CANCEL - no description **/ PLAYERANIMEVENT_CANCEL = 16, /** * @param PLAYERANIMEVENT_SPAWN - Spawn **/ PLAYERANIMEVENT_SPAWN = 17, /** * @param PLAYERANIMEVENT_SNAP_YAW - no description **/ PLAYERANIMEVENT_SNAP_YAW = 18, /** * @param PLAYERANIMEVENT_CUSTOM - Custom activity **/ PLAYERANIMEVENT_CUSTOM = 19, /** * @param PLAYERANIMEVENT_CUSTOM_GESTURE - Play activity in gesture slot **/ PLAYERANIMEVENT_CUSTOM_GESTURE = 20, /** * @param PLAYERANIMEVENT_CUSTOM_SEQUENCE - Play sequence **/ PLAYERANIMEVENT_CUSTOM_SEQUENCE = 21, /** * @param PLAYERANIMEVENT_CUSTOM_GESTURE_SEQUENCE - Play sequence in gesture slot **/ PLAYERANIMEVENT_CUSTOM_GESTURE_SEQUENCE = 22, /** * @param PLAYERANIMEVENT_CANCEL_RELOAD - Cancel reload animation **/ PLAYERANIMEVENT_CANCEL_RELOAD = 23, } /** * @wiki https://wiki.garrysmod.com/page/Enums/PATTACH * @enum PATTACH * @description Enumerations used by @ParticleEffectAttach function. * @compileMembersOnly **/ declare enum PATTACH { /** * @param PATTACH_ABSORIGIN - Particle spawns in entity's origin and does not follow it **/ PATTACH_ABSORIGIN = 0, /** * @param PATTACH_ABSORIGIN_FOLLOW - Particle attaches to entity's origin and follows the entity **/ PATTACH_ABSORIGIN_FOLLOW = 1, /** * @param PATTACH_CUSTOMORIGIN - Create at a custom origin, but don't follow **/ PATTACH_CUSTOMORIGIN = 2, /** * @param PATTACH_POINT - Particle attaches to passed to @ParticleEffectAttach function attachment id, but does not follow the entity **/ PATTACH_POINT = 3, /** * @param PATTACH_POINT_FOLLOW - Particle attaches to passed to @ParticleEffectAttach function attachment id and follows the entity **/ PATTACH_POINT_FOLLOW = 4, /** * @param PATTACH_WORLDORIGIN - Particle spawns in the beginning of coordinates ( Vector( 0, 0, 0 ) ), used for control points that don't attach to an entity **/ PATTACH_WORLDORIGIN = 5, } /** * @wiki https://wiki.garrysmod.com/page/Enums/OBS MODE * @enum OBS_MODE * @description Enumerations used by @Player:SetObserverMode, @Player:GetObserverMode and @Player:Spectate. * @compileMembersOnly **/ declare enum OBS_MODE { /** * @param OBS_MODE_NONE - Not spectating **/ OBS_MODE_NONE = 0, /** * @param OBS_MODE_DEATHCAM - no description **/ OBS_MODE_DEATHCAM = 1, /** * @param OBS_MODE_FREEZECAM - TF2-like freezecam **/ OBS_MODE_FREEZECAM = 2, /** * @param OBS_MODE_FIXED - Same as OBS_MODE_CHASE, but you can't rotate the view **/ OBS_MODE_FIXED = 3, /** * @param OBS_MODE_IN_EYE - First person cam **/ OBS_MODE_IN_EYE = 4, /** * @param OBS_MODE_CHASE - Chase cam, 3rd person cam, free rotation around the spectated target **/ OBS_MODE_CHASE = 5, /** * @param OBS_MODE_ROAMING - Free roam/noclip-alike. Does not work from @GamemodeHooks:PlayerDeath **/ OBS_MODE_ROAMING = 6, } /** * @wiki https://wiki.garrysmod.com/page/Enums/NUM * @note These only exist serverside. * @enum NUM * @description Various count enums. * @compileMembersOnly **/ declare enum NUM { /** * @param NUM_AI_CLASSES - Amount of @CLASS enum. Used by @Add_NPC_Class function. **/ NUM_AI_CLASSES = 36, /** * @param NUM_HULLS - Amount of @HULL enum. **/ NUM_HULLS = 10, } /** * @wiki https://wiki.garrysmod.com/page/Enums/NPC STATE * @enum NPC_STATE * @description Enumerations used by @NPC:SetNPCState. Serverside only. * @compileMembersOnly **/ declare enum NPC_STATE { /** * @param NPC_STATE_INVALID - Invalid state **/ NPC_STATE_INVALID = -1, /** * @param NPC_STATE_NONE - NPC default state **/ NPC_STATE_NONE = 0, /** * @param NPC_STATE_IDLE - NPC is idle **/ NPC_STATE_IDLE = 1, /** * @param NPC_STATE_ALERT - NPC is alert and searching for enemies **/ NPC_STATE_ALERT = 2, /** * @param NPC_STATE_COMBAT - NPC is in combat **/ NPC_STATE_COMBAT = 3, /** * @param NPC_STATE_SCRIPT - NPC is executing scripted sequence **/ NPC_STATE_SCRIPT = 4, /** * @param NPC_STATE_PLAYDEAD - NPC is playing dead (used for expressions) **/ NPC_STATE_PLAYDEAD = 5, /** * @param NPC_STATE_PRONE - NPC is prone to death **/ NPC_STATE_PRONE = 6, /** * @param NPC_STATE_DEAD - NPC is dead **/ NPC_STATE_DEAD = 7, } /** * @wiki https://wiki.garrysmod.com/page/Enums/NOTIFY * @enum NOTIFY * @description Enumerations used by @notification.AddLegacy. Clientside only. * @compileMembersOnly **/ declare enum NOTIFY { /** * @param NOTIFY_GENERIC - [middle](https://wiki.garrysmod.com/page/File:NOTIFY_GENERIC_PREVIEW.png) Generic notification **/ NOTIFY_GENERIC = 0, /** * @param NOTIFY_ERROR - [middle](https://wiki.garrysmod.com/page/File:NOTIFY_ERROR_PREVIEW.png) Error notification **/ NOTIFY_ERROR = 1, /** * @param NOTIFY_UNDO - [middle](https://wiki.garrysmod.com/page/File:NOTIFY_UNDO_PREVIEW.png) Undo notification **/ NOTIFY_UNDO = 2, /** * @param NOTIFY_HINT - [middle](https://wiki.garrysmod.com/page/File:NOTIFY_HINT_PREVIEW.png) Hint notification **/ NOTIFY_HINT = 3, /** * @param NOTIFY_CLEANUP - [middle](https://wiki.garrysmod.com/page/File:NOTIFY_CLEANUP_PREVIEW.png) Cleanup notification **/ NOTIFY_CLEANUP = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/NAV MESH * @enum NAV_MESH * @description Enumerations used by @CNavArea:GetAttributes and @CNavArea:HasAttributes. * @compileMembersOnly **/ declare enum NAV_MESH { /** * @param NAV_MESH_INVALID - The nav area is invalid. **/ NAV_MESH_INVALID = 0, /** * @param NAV_MESH_CROUCH - Must crouch to use this node/area **/ NAV_MESH_CROUCH = 1, /** * @param NAV_MESH_JUMP - Must jump to traverse this area (only used during generation) **/ NAV_MESH_JUMP = 2, /** * @param NAV_MESH_PRECISE - Do not adjust for obstacles, just move along area **/ NAV_MESH_PRECISE = 4, /** * @param NAV_MESH_NO_JUMP - Inhibit discontinuity jumping **/ NAV_MESH_NO_JUMP = 8, /** * @param NAV_MESH_STOP - Must stop when entering this area **/ NAV_MESH_STOP = 16, /** * @param NAV_MESH_RUN - Must run to traverse this area **/ NAV_MESH_RUN = 32, /** * @param NAV_MESH_WALK - Must walk to traverse this area **/ NAV_MESH_WALK = 64, /** * @param NAV_MESH_AVOID - Avoid this area unless alternatives are too dangerous **/ NAV_MESH_AVOID = 128, /** * @param NAV_MESH_TRANSIENT - Area may become blocked, and should be periodically checked **/ NAV_MESH_TRANSIENT = 256, /** * @param NAV_MESH_DONT_HIDE - Area should not be considered for hiding spot generation **/ NAV_MESH_DONT_HIDE = 512, /** * @param NAV_MESH_STAND - Bots hiding in this area should stand **/ NAV_MESH_STAND = 1024, /** * @param NAV_MESH_NO_HOSTAGES - Hostages shouldn't use this area **/ NAV_MESH_NO_HOSTAGES = 2048, /** * @param NAV_MESH_STAIRS - This area represents stairs, do not attempt to climb or jump them - just walk up **/ NAV_MESH_STAIRS = 4096, /** * @param NAV_MESH_NO_MERGE - Don't merge this area with adjacent areas **/ NAV_MESH_NO_MERGE = 8192, /** * @param NAV_MESH_OBSTACLE_TOP - This nav area is the climb point on the tip of an obstacle **/ NAV_MESH_OBSTACLE_TOP = 16384, /** * @param NAV_MESH_CLIFF - This nav area is adjacent to a drop of at least CliffHeight **/ NAV_MESH_CLIFF = 32768, /** * @param NAV_MESH_FUNC_COST - Area has designer specified cost controlled by func_nav_cost entities **/ NAV_MESH_FUNC_COST = 536870912, /** * @param NAV_MESH_HAS_ELEVATOR - Area is in an elevator's path **/ NAV_MESH_HAS_ELEVATOR = 1073741824, /** * @param NAV_MESH_NAV_BLOCKER - no description **/ NAV_MESH_NAV_BLOCKER = -2147483648, } /** * @wiki https://wiki.garrysmod.com/page/Enums/NavTraverseType * @note These enumerations do not exist in game and are listed here only for reference! * @enum NavTraverseType * @description Enumerations used by @CNavArea:GetParentHow. * @compileMembersOnly **/ declare enum NavTraverseType { /** * @param GO_NORTH - no description **/ GO_NORTH = 0, /** * @param GO_EAST - no description **/ GO_EAST = 1, /** * @param GO_SOUTH - no description **/ GO_SOUTH = 2, /** * @param GO_WEST - no description **/ GO_WEST = 3, /** * @param GO_LADDER_UP - no description **/ GO_LADDER_UP = 4, /** * @param GO_LADDER_DOWN - no description **/ GO_LADDER_DOWN = 5, /** * @param GO_JUMP - no description **/ GO_JUMP = 6, /** * @param GO_ELEVATOR_UP - no description **/ GO_ELEVATOR_UP = 7, /** * @param GO_ELEVATOR_DOWN - no description **/ GO_ELEVATOR_DOWN = 8, } /** * @wiki https://wiki.garrysmod.com/page/Enums/NavDir * @note These enumerations do not exist in game and are listed here only for reference! * @enum NavDir * @description Enumerations used by @CNavArea type methods. * These Enums correspond to each side of a @CNavArea type * @compileMembersOnly **/ declare enum NavDir { /** * @param NORTH - North from given @CNavArea type **/ NORTH = 0, /** * @param EAST - East from given @CNavArea type **/ EAST = 1, /** * @param SOUTH - South from given @CNavArea type **/ SOUTH = 2, /** * @param WEST - West from given @CNavArea type **/ WEST = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/NavCorner * @note These enumerations do not exist in game and are listed here only for reference! * @enum NavCorner * @description Enumerations used by @CNavArea type methods. * These Enums correspond to each corner of a @CNavArea type * @compileMembersOnly **/ declare enum NavCorner { /** * @param NORTH_WEST - North West Corner **/ NORTH_WEST = 0, /** * @param NORTH_EAST - North East Corner **/ NORTH_EAST = 1, /** * @param SOUTH_EAST - South East Corner **/ SOUTH_EAST = 2, /** * @param SOUTH_WEST - South West Corner **/ SOUTH_WEST = 3, /** * @param NUM_CORNERS - Represents all corners, only applicable to certain functions, such as @CNavArea:PlaceOnGround. **/ NUM_CORNERS = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MOVETYPE * @enum MOVETYPE * @description Enumerations used by @EntityFuncs:SetMoveType and @EntityFuncs:GetMoveType. * @compileMembersOnly **/ declare enum MOVETYPE { /** * @param MOVETYPE_NONE - Don't move **/ MOVETYPE_NONE = 0, /** * @param MOVETYPE_ISOMETRIC - For players, in TF2 commander view, etc **/ MOVETYPE_ISOMETRIC = 1, /** * @param MOVETYPE_WALK - Player only, moving on the ground **/ MOVETYPE_WALK = 2, /** * @param MOVETYPE_STEP - Monster/NPC movement **/ MOVETYPE_STEP = 3, /** * @param MOVETYPE_FLY - Fly, no gravity **/ MOVETYPE_FLY = 4, /** * @param MOVETYPE_FLYGRAVITY - Fly, with gravity **/ MOVETYPE_FLYGRAVITY = 5, /** * @param MOVETYPE_VPHYSICS - Physics movetype **/ MOVETYPE_VPHYSICS = 6, /** * @param MOVETYPE_PUSH - No clip to world, but pushes and crushes things **/ MOVETYPE_PUSH = 7, /** * @param MOVETYPE_NOCLIP - Noclip **/ MOVETYPE_NOCLIP = 8, /** * @param MOVETYPE_LADDER - For players, when moving on a ladder **/ MOVETYPE_LADDER = 9, /** * @param MOVETYPE_OBSERVER - Spectator movetype. DO **NOT** use this to make player spectate **/ MOVETYPE_OBSERVER = 10, /** * @param MOVETYPE_CUSTOM - Custom movetype, can be applied to the player to prevent the default movement code from running, while still calling the related hooks **/ MOVETYPE_CUSTOM = 11, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MOVECOLLIDE * @enum MOVECOLLIDE * @description Enumerations used by @EntityFuncs:SetMoveCollide and @EntityFuncs:GetMoveCollide. * @compileMembersOnly **/ declare enum MOVECOLLIDE { /** * @param MOVECOLLIDE_DEFAULT - Default behavior **/ MOVECOLLIDE_DEFAULT = 0, /** * @param MOVECOLLIDE_FLY_BOUNCE - Entity bounces, reflects, based on elasticity of surface and object - applies friction (adjust velocity) **/ MOVECOLLIDE_FLY_BOUNCE = 1, /** * @param MOVECOLLIDE_FLY_CUSTOM - @EntityHooks:Touch will modify the velocity however it likes **/ MOVECOLLIDE_FLY_CUSTOM = 2, /** * @param MOVECOLLIDE_FLY_SLIDE - Entity slides along surfaces (no bounce) - applies friciton (adjusts velocity) **/ MOVECOLLIDE_FLY_SLIDE = 3, /** * @param MOVECOLLIDE_COUNT - Number of different movecollides **/ MOVECOLLIDE_COUNT = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MOUSE * @enum MOUSE * @description Enumerations used by: * * @input.IsMouseDown * * @input.WasMousePressed * * @input.WasMouseDoublePressed * It's also part of the @BUTTON_CODE enum. * @compileMembersOnly **/ declare enum MOUSE { /** * @param MOUSE_FIRST - First mouse button **/ MOUSE_FIRST = 107, /** * @param MOUSE_LEFT - Left mouse button **/ MOUSE_LEFT = 107, /** * @param MOUSE_RIGHT - Right mouse button **/ MOUSE_RIGHT = 108, /** * @param MOUSE_MIDDLE - Middle mouse button, aka the wheel press **/ MOUSE_MIDDLE = 109, /** * @param MOUSE_4 - Mouse 4 button ( Sometimes, mouse wheel tilt left ) **/ MOUSE_4 = 110, /** * @param MOUSE_5 - Mouse 5 button ( Sometimes, mouse wheel tilt right ) **/ MOUSE_5 = 111, /** * @param MOUSE_WHEEL_UP - Mouse wheel scroll up **/ MOUSE_WHEEL_UP = 112, /** * @param MOUSE_WHEEL_DOWN - Mouse wheel scroll down **/ MOUSE_WHEEL_DOWN = 113, /** * @param MOUSE_LAST - Last mouse button **/ MOUSE_LAST = 113, /** * @param MOUSE_COUNT - Mouse button count **/ MOUSE_COUNT = 7, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MATERIAL RT DEPTH * @enum MATERIAL_RT_DEPTH * @description Enumerations used by @GetRenderTargetEx function. Clientside only. * @compileMembersOnly **/ declare enum MATERIAL_RT_DEPTH { /** * @param MATERIAL_RT_DEPTH_SHARED - Do not create a depth-stencil buffer. * Use the default depth-stencil buffer if used as render target 0. **/ MATERIAL_RT_DEPTH_SHARED = 0, /** * @param MATERIAL_RT_DEPTH_SEPARATE - Create a depth-stencil buffer. * Use the created depth-stencil buffer if used as render target 0. **/ MATERIAL_RT_DEPTH_SEPARATE = 1, /** * @param MATERIAL_RT_DEPTH_NONE - Do not create a depth-stencil buffer. * Disable depth and stencil buffer usage if used as render target 0. **/ MATERIAL_RT_DEPTH_NONE = 2, /** * @param MATERIAL_RT_DEPTH_ONLY - Create a depth-stencil buffer. * Use the created depth-stencil buffer if used as render target 0. * Creates a color texture despite the name. * Seems to behave the same as MATERIAL_RT_DEPTH_SEPARATE. **/ MATERIAL_RT_DEPTH_ONLY = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MATERIAL LIGHT * @enum MATERIAL_LIGHT * @description Enumerations used by @render.SetLocalModelLights. Clientside only. * @compileMembersOnly **/ declare enum MATERIAL_LIGHT { /** * @param MATERIAL_LIGHT_DISABLE - No light **/ MATERIAL_LIGHT_DISABLE = 0, /** * @param MATERIAL_LIGHT_POINT - Point light **/ MATERIAL_LIGHT_POINT = 1, /** * @param MATERIAL_LIGHT_DIRECTIONAL - Directional light **/ MATERIAL_LIGHT_DIRECTIONAL = 2, /** * @param MATERIAL_LIGHT_SPOT - Spot light **/ MATERIAL_LIGHT_SPOT = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MATERIAL FOG * @enum MATERIAL_FOG * @description Enumerations used by @render.GetFogMode and @render.FogMode. Clientside only. * @compileMembersOnly **/ declare enum MATERIAL_FOG { /** * @param MATERIAL_FOG_NONE - No fog **/ MATERIAL_FOG_NONE = 0, /** * @param MATERIAL_FOG_LINEAR - Linear fog **/ MATERIAL_FOG_LINEAR = 1, /** * @param MATERIAL_FOG_LINEAR_BELOW_FOG_Z - For use in conjunction with @render.SetFogZ. Does not work if start distance is bigger than end distance. Ignores density setting. Seems to be broken? Used for underwater fog by the engine. **/ MATERIAL_FOG_LINEAR_BELOW_FOG_Z = 2, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MATERIAL * @enum MATERIAL * @description Enumerations used by @mesh.Begin. Clientside only. * @compileMembersOnly **/ declare enum MATERIAL { /** * @param MATERIAL_LINES - no description **/ MATERIAL_LINES = 1, /** * @param MATERIAL_LINE_LOOP - no description **/ MATERIAL_LINE_LOOP = 5, /** * @param MATERIAL_LINE_STRIP - no description **/ MATERIAL_LINE_STRIP = 4, /** * @param MATERIAL_POINTS - no description **/ MATERIAL_POINTS = 0, /** * @param MATERIAL_POLYGON - no description **/ MATERIAL_POLYGON = 6, /** * @param MATERIAL_QUADS - no description **/ MATERIAL_QUADS = 7, /** * @param MATERIAL_TRIANGLES - no description **/ MATERIAL_TRIANGLES = 2, /** * @param MATERIAL_TRIANGLE_STRIP - no description **/ MATERIAL_TRIANGLE_STRIP = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MATERIAL CULLMODE * @enum MATERIAL_CULLMODE * @description Enumerations used by @render.CullMode. Clientside only. * @compileMembersOnly **/ declare enum MATERIAL_CULLMODE { /** * @param MATERIAL_CULLMODE_CCW - Counter clock wise cull mode **/ MATERIAL_CULLMODE_CCW = 0, /** * @param MATERIAL_CULLMODE_CW - Clock wise cull mode **/ MATERIAL_CULLMODE_CW = 1, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MAT * @enum MAT * @description Enumerations used in @TraceResult structure and by @EntityFuncs:GetMaterialType. * @compileMembersOnly **/ declare enum MAT { /** * @param MAT_ANTLION - Antlions **/ MAT_ANTLION = 65, /** * @param MAT_BLOODYFLESH - Similar to MAT_FLESH, only used by "bloodyflesh" surface property, has different impact sound **/ MAT_BLOODYFLESH = 66, /** * @param MAT_CONCRETE - Concrete **/ MAT_CONCRETE = 67, /** * @param MAT_DIRT - Dirt **/ MAT_DIRT = 68, /** * @param MAT_EGGSHELL - The egg sacs in the antlion tunnels in HL2: EP2 **/ MAT_EGGSHELL = 69, /** * @param MAT_FLESH - Flesh **/ MAT_FLESH = 70, /** * @param MAT_GRATE - Grates, chainlink fences **/ MAT_GRATE = 71, /** * @param MAT_ALIENFLESH - Alien flesh - headcrabs and vortigaunts **/ MAT_ALIENFLESH = 72, /** * @param MAT_CLIP - Unused **/ MAT_CLIP = 73, /** * @param MAT_SNOW - Snow **/ MAT_SNOW = 74, /** * @param MAT_PLASTIC - Plastic **/ MAT_PLASTIC = 76, /** * @param MAT_METAL - Metal **/ MAT_METAL = 77, /** * @param MAT_SAND - Sand **/ MAT_SAND = 78, /** * @param MAT_FOLIAGE - Plants, only used by the "foliage" surface property **/ MAT_FOLIAGE = 79, /** * @param MAT_COMPUTER - Electronics, only used by "computer" surface property **/ MAT_COMPUTER = 80, /** * @param MAT_SLOSH - Water, slime **/ MAT_SLOSH = 83, /** * @param MAT_TILE - Floor tiles **/ MAT_TILE = 84, /** * @param MAT_GRASS - Grass **/ MAT_GRASS = 85, /** * @param MAT_VENT - Metallic vents **/ MAT_VENT = 86, /** * @param MAT_WOOD - Wood **/ MAT_WOOD = 87, /** * @param MAT_DEFAULT - Skybox or nodraw texture **/ MAT_DEFAULT = 88, /** * @param MAT_GLASS - Glass **/ MAT_GLASS = 89, /** * @param MAT_WARPSHIELD - "wierd-looking jello effect for advisor shield." **/ MAT_WARPSHIELD = 90, } /** * @wiki https://wiki.garrysmod.com/page/Enums/MASK * @enum MASK * @description Enumerations used as trace masks in @Trace structure and @HullTrace structure. These enumerations are simply combinations of @CONTENTS enum. * @compileMembersOnly **/ declare enum MASK { /** * @param MASK_ALL - Anything that is not empty space **/ MASK_ALL = 4294967295, /** * @param MASK_BLOCKLOS - Anything that blocks line of sight for AI **/ MASK_BLOCKLOS = 16449, /** * @param MASK_BLOCKLOS_AND_NPCS - Anything that blocks line of sight for AI or NPCs **/ MASK_BLOCKLOS_AND_NPCS = 33570881, /** * @param MASK_CURRENT - Water that is moving (may not work) **/ MASK_CURRENT = 16515072, /** * @param MASK_DEADSOLID - Anything that blocks corpse movement **/ MASK_DEADSOLID = 65547, /** * @param MASK_NPCSOLID - Anything that blocks NPC movement **/ MASK_NPCSOLID = 33701899, /** * @param MASK_NPCSOLID_BRUSHONLY - Anything that blocks NPC movement, except other NPCs **/ MASK_NPCSOLID_BRUSHONLY = 147467, /** * @param MASK_NPCWORLDSTATIC - The world entity **/ MASK_NPCWORLDSTATIC = 131083, /** * @param MASK_OPAQUE - Anything that blocks lighting **/ MASK_OPAQUE = 16513, /** * @param MASK_OPAQUE_AND_NPCS - Anything that blocks lighting, including NPCs **/ MASK_OPAQUE_AND_NPCS = 33570945, /** * @param MASK_PLAYERSOLID - Anything that blocks player movement **/ MASK_PLAYERSOLID = 33636363, /** * @param MASK_PLAYERSOLID_BRUSHONLY - World + Brushes + Player Clips **/ MASK_PLAYERSOLID_BRUSHONLY = 81931, /** * @param MASK_SHOT - Anything that stops a bullet (including hitboxes) **/ MASK_SHOT = 1174421507, /** * @param MASK_SHOT_HULL - Anything that stops a bullet (excluding hitboxes) **/ MASK_SHOT_HULL = 100679691, /** * @param MASK_SHOT_PORTAL - Solids except for grates **/ MASK_SHOT_PORTAL = 33570819, /** * @param MASK_SOLID - Anything that is (normally) solid **/ MASK_SOLID = 33570827, /** * @param MASK_SOLID_BRUSHONLY - World + Brushes **/ MASK_SOLID_BRUSHONLY = 16395, /** * @param MASK_SPLITAREAPORTAL - Things that split area portals **/ MASK_SPLITAREAPORTAL = 48, /** * @param MASK_VISIBLE - Anything that blocks line of sight for players **/ MASK_VISIBLE = 24705, /** * @param MASK_VISIBLE_AND_NPCS - Anything that blocks line of sight for players, including NPCs **/ MASK_VISIBLE_AND_NPCS = 33579137, /** * @param MASK_WATER - Anything that has water-like physics **/ MASK_WATER = 16432, } /** * @wiki https://wiki.garrysmod.com/page/Enums/kRenderFx * @enum kRenderFx * @description Used by @EntityFuncs:SetRenderFX and returned by @EntityFuncs:GetRenderFX. * Most of these require alpha value of entitys color to be less than 255 to have any visible effect. * @compileMembersOnly **/ declare enum kRenderFx { /** * @param kRenderFxNone - None. No change. **/ kRenderFxNone = 0, /** * @param kRenderFxPulseSlow - Slowly pulses the entitys transparency, +-15 to the current alpha. **/ kRenderFxPulseSlow = 1, /** * @param kRenderFxPulseFast - Quickly pulses the entitys transparency, +-15 to the current alpha. **/ kRenderFxPulseFast = 2, /** * @param kRenderFxPulseSlowWide - Slowly pulses the entitys transparency, +-60 to the current alpha. **/ kRenderFxPulseSlowWide = 3, /** * @param kRenderFxPulseFastWide - Quickly pulses the entitys transparency, +-60 to the current alpha. **/ kRenderFxPulseFastWide = 4, /** * @param kRenderFxFadeSlow - Slowly fades away the entity, making it completely invisible.Starts from whatever alpha the entity currently has set. **/ kRenderFxFadeSlow = 5, /** * @param kRenderFxFadeFast - Quickly fades away the entity, making it completely invisible.Starts from whatever alpha the entity currently has set. **/ kRenderFxFadeFast = 6, /** * @param kRenderFxSolidSlow - Slowly solidifies the entity, making it fully opaque.Starts from whatever alpha the entity currently has set. **/ kRenderFxSolidSlow = 7, /** * @param kRenderFxSolidFast - Quickly solidifies the entity, making it fully opaque.Starts from whatever alpha the entity currently has set. **/ kRenderFxSolidFast = 8, /** * @param kRenderFxStrobeSlow - Slowly switches the entitys transparency between its alpha and 0. **/ kRenderFxStrobeSlow = 9, /** * @param kRenderFxStrobeFast - Quickly switches the entitys transparency between its alpha and 0. **/ kRenderFxStrobeFast = 10, /** * @param kRenderFxStrobeFaster - Very quickly switches the entitys transparency between its alpha and 0. **/ kRenderFxStrobeFaster = 11, /** * @param kRenderFxFlickerSlow - Same as Strobe Slow, but the interval is more randomized. **/ kRenderFxFlickerSlow = 12, /** * @param kRenderFxFlickerFast - Same as Strobe Fast, but the interval is more randomized. **/ kRenderFxFlickerFast = 13, /** * @param kRenderFxNoDissipation - no description **/ kRenderFxNoDissipation = 14, /** * @param kRenderFxDistort - Flickers ( randomizes ) the entitys transparency **/ kRenderFxDistort = 15, /** * @param kRenderFxHologram - Same as Distort, but fades the entity away the farther you are from it. **/ kRenderFxHologram = 16, /** * @param kRenderFxExplode - no description **/ kRenderFxExplode = 17, /** * @param kRenderFxGlowShell - no description **/ kRenderFxGlowShell = 18, /** * @param kRenderFxClampMinScale - no description **/ kRenderFxClampMinScale = 19, /** * @param kRenderFxEnvRain - no description **/ kRenderFxEnvRain = 20, /** * @param kRenderFxEnvSnow - no description **/ kRenderFxEnvSnow = 21, /** * @param kRenderFxSpotlight - no description **/ kRenderFxSpotlight = 22, /** * @param kRenderFxRagdoll - no description **/ kRenderFxRagdoll = 23, /** * @param kRenderFxPulseFastWider - Quickly pulses the entitys transparency, from 0 to 255. **/ kRenderFxPulseFastWider = 24, } /** * @wiki https://wiki.garrysmod.com/page/Enums/JOYSTICK * @enum JOYSTICK * @description Enumerations used by @input.IsButtonDown. * It's also part of the @BUTTON_CODE enum. * @compileMembersOnly **/ declare enum JOYSTICK { /** * @param JOYSTICK_FIRST - no description **/ JOYSTICK_FIRST = 114, /** * @param JOYSTICK_FIRST_BUTTON - rowspan=2*Joystick buttons are in this range, but don't have individual enum names. **/ JOYSTICK_FIRST_BUTTON = 114, /** * @param JOYSTICK_LAST_BUTTON - style="display:none"* **/ JOYSTICK_LAST_BUTTON = 145, /** * @param JOYSTICK_FIRST_POV_BUTTON - rowspan=2*Joystick POV buttons are in this range, but don't have individual enum names. **/ JOYSTICK_FIRST_POV_BUTTON = 146, /** * @param JOYSTICK_LAST_POV_BUTTON - style="display:none"* **/ JOYSTICK_LAST_POV_BUTTON = 149, /** * @param JOYSTICK_FIRST_AXIS_BUTTON - rowspan=2*Joystick axis buttons are in this range, but don't have individual enum names. **/ JOYSTICK_FIRST_AXIS_BUTTON = 150, /** * @param JOYSTICK_LAST_AXIS_BUTTON - style="display:none"* **/ JOYSTICK_LAST_AXIS_BUTTON = 161, /** * @param JOYSTICK_LAST - no description **/ JOYSTICK_LAST = 161, } /** * @wiki https://wiki.garrysmod.com/page/Enums/KEY * @enum KEY * @description Enumerations used by: * * @input.IsKeyDown * * @input.WasKeyPressed * * @input.WasKeyReleased * * @input.WasKeyTyped * * @input.IsKeyTrapping * * @input.GetKeyName * * @input.LookupBinding * * @PanelHooks:OnKeyCodePressed * * @PanelHooks:OnKeyCodeReleased * It's also part of the @BUTTON_CODE enum. * @compileMembersOnly **/ declare enum KEY { /** * @param KEY_FIRST - no description **/ KEY_FIRST = 0, /** * @param KEY_NONE - no description **/ KEY_NONE = 0, /** * @param KEY_0 - Normal number 0 key **/ KEY_0 = 1, /** * @param KEY_1 - Normal number 1 key **/ KEY_1 = 2, /** * @param KEY_2 - Normal number 2 key **/ KEY_2 = 3, /** * @param KEY_3 - Normal number 3 key **/ KEY_3 = 4, /** * @param KEY_4 - Normal number 4 key **/ KEY_4 = 5, /** * @param KEY_5 - Normal number 5 key **/ KEY_5 = 6, /** * @param KEY_6 - Normal number 6 key **/ KEY_6 = 7, /** * @param KEY_7 - Normal number 7 key **/ KEY_7 = 8, /** * @param KEY_8 - Normal number 8 key **/ KEY_8 = 9, /** * @param KEY_9 - Normal number 9 key **/ KEY_9 = 10, /** * @param KEY_A - no description **/ KEY_A = 11, /** * @param KEY_B - no description **/ KEY_B = 12, /** * @param KEY_C - no description **/ KEY_C = 13, /** * @param KEY_D - no description **/ KEY_D = 14, /** * @param KEY_E - no description **/ KEY_E = 15, /** * @param KEY_F - no description **/ KEY_F = 16, /** * @param KEY_G - no description **/ KEY_G = 17, /** * @param KEY_H - no description **/ KEY_H = 18, /** * @param KEY_I - no description **/ KEY_I = 19, /** * @param KEY_J - no description **/ KEY_J = 20, /** * @param KEY_K - no description **/ KEY_K = 21, /** * @param KEY_L - no description **/ KEY_L = 22, /** * @param KEY_M - no description **/ KEY_M = 23, /** * @param KEY_N - no description **/ KEY_N = 24, /** * @param KEY_O - no description **/ KEY_O = 25, /** * @param KEY_P - no description **/ KEY_P = 26, /** * @param KEY_Q - no description **/ KEY_Q = 27, /** * @param KEY_R - no description **/ KEY_R = 28, /** * @param KEY_S - no description **/ KEY_S = 29, /** * @param KEY_T - no description **/ KEY_T = 30, /** * @param KEY_U - no description **/ KEY_U = 31, /** * @param KEY_V - no description **/ KEY_V = 32, /** * @param KEY_W - no description **/ KEY_W = 33, /** * @param KEY_X - no description **/ KEY_X = 34, /** * @param KEY_Y - no description **/ KEY_Y = 35, /** * @param KEY_Z - no description **/ KEY_Z = 36, /** * @param KEY_PAD_0 - Keypad number 0 key **/ KEY_PAD_0 = 37, /** * @param KEY_PAD_1 - Keypad number 1 key **/ KEY_PAD_1 = 38, /** * @param KEY_PAD_2 - Keypad number 2 key **/ KEY_PAD_2 = 39, /** * @param KEY_PAD_3 - Keypad number 3 key **/ KEY_PAD_3 = 40, /** * @param KEY_PAD_4 - Keypad number 4 key **/ KEY_PAD_4 = 41, /** * @param KEY_PAD_5 - Keypad number 5 key **/ KEY_PAD_5 = 42, /** * @param KEY_PAD_6 - Keypad number 6 key **/ KEY_PAD_6 = 43, /** * @param KEY_PAD_7 - Keypad number 7 key **/ KEY_PAD_7 = 44, /** * @param KEY_PAD_8 - Keypad number 8 key **/ KEY_PAD_8 = 45, /** * @param KEY_PAD_9 - Keypad number 9 key **/ KEY_PAD_9 = 46, /** * @param KEY_PAD_DIVIDE - Keypad division/slash key (/) **/ KEY_PAD_DIVIDE = 47, /** * @param KEY_PAD_MULTIPLY - Keypad asterisk key (*) **/ KEY_PAD_MULTIPLY = 48, /** * @param KEY_PAD_MINUS - Keypad minus key **/ KEY_PAD_MINUS = 49, /** * @param KEY_PAD_PLUS - Keypad plus key **/ KEY_PAD_PLUS = 50, /** * @param KEY_PAD_ENTER - Keypad enter key **/ KEY_PAD_ENTER = 51, /** * @param KEY_PAD_DECIMAL - Keypad dot key (.) **/ KEY_PAD_DECIMAL = 52, /** * @param KEY_LBRACKET - no description **/ KEY_LBRACKET = 53, /** * @param KEY_RBRACKET - no description **/ KEY_RBRACKET = 54, /** * @param KEY_SEMICOLON - no description **/ KEY_SEMICOLON = 55, /** * @param KEY_APOSTROPHE - no description **/ KEY_APOSTROPHE = 56, /** * @param KEY_BACKQUOTE - no description **/ KEY_BACKQUOTE = 57, /** * @param KEY_COMMA - no description **/ KEY_COMMA = 58, /** * @param KEY_PERIOD - no description **/ KEY_PERIOD = 59, /** * @param KEY_SLASH - no description **/ KEY_SLASH = 60, /** * @param KEY_BACKSLASH - no description **/ KEY_BACKSLASH = 61, /** * @param KEY_MINUS - no description **/ KEY_MINUS = 62, /** * @param KEY_EQUAL - no description **/ KEY_EQUAL = 63, /** * @param KEY_ENTER - no description **/ KEY_ENTER = 64, /** * @param KEY_SPACE - no description **/ KEY_SPACE = 65, /** * @param KEY_BACKSPACE - no description **/ KEY_BACKSPACE = 66, /** * @param KEY_TAB - no description **/ KEY_TAB = 67, /** * @param KEY_CAPSLOCK - no description **/ KEY_CAPSLOCK = 68, /** * @param KEY_NUMLOCK - no description **/ KEY_NUMLOCK = 69, /** * @param KEY_ESCAPE - no description **/ KEY_ESCAPE = 70, /** * @param KEY_SCROLLLOCK - no description **/ KEY_SCROLLLOCK = 71, /** * @param KEY_INSERT - no description **/ KEY_INSERT = 72, /** * @param KEY_DELETE - no description **/ KEY_DELETE = 73, /** * @param KEY_HOME - no description **/ KEY_HOME = 74, /** * @param KEY_END - no description **/ KEY_END = 75, /** * @param KEY_PAGEUP - no description **/ KEY_PAGEUP = 76, /** * @param KEY_PAGEDOWN - no description **/ KEY_PAGEDOWN = 77, /** * @param KEY_BREAK - no description **/ KEY_BREAK = 78, /** * @param KEY_LSHIFT - The left Shift key, has been seen to be triggered by Right Shift in @PanelHooks:OnKeyCodePressed **/ KEY_LSHIFT = 79, /** * @param KEY_RSHIFT - no description **/ KEY_RSHIFT = 80, /** * @param KEY_LALT - no description **/ KEY_LALT = 81, /** * @param KEY_RALT - no description **/ KEY_RALT = 82, /** * @param KEY_LCONTROL - no description **/ KEY_LCONTROL = 83, /** * @param KEY_RCONTROL - no description **/ KEY_RCONTROL = 84, /** * @param KEY_LWIN - The left Windows key or the Command key on Mac OSX **/ KEY_LWIN = 85, /** * @param KEY_RWIN - The right Windows key or the Command key on Mac OSX **/ KEY_RWIN = 86, /** * @param KEY_APP - no description **/ KEY_APP = 87, /** * @param KEY_UP - no description **/ KEY_UP = 88, /** * @param KEY_LEFT - no description **/ KEY_LEFT = 89, /** * @param KEY_DOWN - no description **/ KEY_DOWN = 90, /** * @param KEY_RIGHT - no description **/ KEY_RIGHT = 91, /** * @param KEY_F1 - no description **/ KEY_F1 = 92, /** * @param KEY_F2 - no description **/ KEY_F2 = 93, /** * @param KEY_F3 - no description **/ KEY_F3 = 94, /** * @param KEY_F4 - no description **/ KEY_F4 = 95, /** * @param KEY_F5 - no description **/ KEY_F5 = 96, /** * @param KEY_F6 - no description **/ KEY_F6 = 97, /** * @param KEY_F7 - no description **/ KEY_F7 = 98, /** * @param KEY_F8 - no description **/ KEY_F8 = 99, /** * @param KEY_F9 - no description **/ KEY_F9 = 100, /** * @param KEY_F10 - no description **/ KEY_F10 = 101, /** * @param KEY_F11 - no description **/ KEY_F11 = 102, /** * @param KEY_F12 - no description **/ KEY_F12 = 103, /** * @param KEY_CAPSLOCKTOGGLE - no description **/ KEY_CAPSLOCKTOGGLE = 104, /** * @param KEY_NUMLOCKTOGGLE - no description **/ KEY_NUMLOCKTOGGLE = 105, /** * @param KEY_LAST - no description **/ KEY_LAST = 106, /** * @param KEY_SCROLLLOCKTOGGLE - no description **/ KEY_SCROLLLOCKTOGGLE = 106, /** * @param KEY_COUNT - no description **/ KEY_COUNT = 107, /** * @param KEY_XBUTTON_A - no description **/ KEY_XBUTTON_A = 114, /** * @param KEY_XBUTTON_B - no description **/ KEY_XBUTTON_B = 115, /** * @param KEY_XBUTTON_X - no description **/ KEY_XBUTTON_X = 116, /** * @param KEY_XBUTTON_Y - no description **/ KEY_XBUTTON_Y = 117, /** * @param KEY_XBUTTON_LEFT_SHOULDER - no description **/ KEY_XBUTTON_LEFT_SHOULDER = 118, /** * @param KEY_XBUTTON_RIGHT_SHOULDER - no description **/ KEY_XBUTTON_RIGHT_SHOULDER = 119, /** * @param KEY_XBUTTON_BACK - no description **/ KEY_XBUTTON_BACK = 120, /** * @param KEY_XBUTTON_START - no description **/ KEY_XBUTTON_START = 121, /** * @param KEY_XBUTTON_STICK1 - no description **/ KEY_XBUTTON_STICK1 = 122, /** * @param KEY_XBUTTON_STICK2 - no description **/ KEY_XBUTTON_STICK2 = 123, /** * @param KEY_XBUTTON_UP - no description **/ KEY_XBUTTON_UP = 146, /** * @param KEY_XBUTTON_RIGHT - no description **/ KEY_XBUTTON_RIGHT = 147, /** * @param KEY_XBUTTON_DOWN - no description **/ KEY_XBUTTON_DOWN = 148, /** * @param KEY_XBUTTON_LEFT - no description **/ KEY_XBUTTON_LEFT = 149, /** * @param KEY_XSTICK1_RIGHT - no description **/ KEY_XSTICK1_RIGHT = 150, /** * @param KEY_XSTICK1_LEFT - no description **/ KEY_XSTICK1_LEFT = 151, /** * @param KEY_XSTICK1_DOWN - no description **/ KEY_XSTICK1_DOWN = 152, /** * @param KEY_XSTICK1_UP - no description **/ KEY_XSTICK1_UP = 153, /** * @param KEY_XBUTTON_LTRIGGER - no description **/ KEY_XBUTTON_LTRIGGER = 154, /** * @param KEY_XBUTTON_RTRIGGER - no description **/ KEY_XBUTTON_RTRIGGER = 155, /** * @param KEY_XSTICK2_RIGHT - no description **/ KEY_XSTICK2_RIGHT = 156, /** * @param KEY_XSTICK2_LEFT - no description **/ KEY_XSTICK2_LEFT = 157, /** * @param KEY_XSTICK2_DOWN - no description **/ KEY_XSTICK2_DOWN = 158, /** * @param KEY_XSTICK2_UP - no description **/ KEY_XSTICK2_UP = 159, } /** * @wiki https://wiki.garrysmod.com/page/Enums/IN * @enum IN * @description Unlike @BUTTON_CODE enum, these enums are abstracted to allow the user to bind actions to any key they might prefer. * Keybinds using these actions work with two console commands, one starting with a plus and one with a minus symbol. A key press or release will call either the plus or minus command, adding or removing the corresponding enum in the current @CUserCmd type. * Enumerations used by: * * @Player:KeyDown * * @Player:KeyDownLast * * @Player:KeyPressed * * @Player:KeyReleased * * @CMoveData:AddKey * * @CMoveData:GetButtons * * @CMoveData:GetOldButtons * * @CMoveData:KeyDown * * @CMoveData:KeyPressed * * @CMoveData:KeyReleased * * @CMoveData:KeyWasDown * * @CMoveData:SetButtons * * @CMoveData:SetOldButtons * * @CUserCmd:GetButtons * * @CUserCmd:KeyDown * * @CUserCmd:RemoveKey * * @CUserCmd:SetButtons * * @GamemodeHooks:KeyPress * * @GamemodeHooks:KeyRelease * @compileMembersOnly **/ declare enum IN { /** * @param IN_ATTACK - +attack bound key ( Default: Left Mouse Button ) **/ IN_ATTACK = 1, /** * @param IN_JUMP - +jump bound key ( Default: Space ) **/ IN_JUMP = 2, /** * @param IN_DUCK - +duck bound key ( Default: CTRL ) **/ IN_DUCK = 4, /** * @param IN_FORWARD - +forward bound key ( Default: W ) **/ IN_FORWARD = 8, /** * @param IN_BACK - +back bound key ( Default: S ) **/ IN_BACK = 16, /** * @param IN_USE - +use bound key ( Default: E ) **/ IN_USE = 32, /** * @param IN_CANCEL - no description **/ IN_CANCEL = 64, /** * @param IN_LEFT - +left bound key ( Look left ) **/ IN_LEFT = 128, /** * @param IN_RIGHT - +right bound key ( Look right ) **/ IN_RIGHT = 256, /** * @param IN_MOVELEFT - +moveleft bound key ( Default: A ) **/ IN_MOVELEFT = 512, /** * @param IN_MOVERIGHT - +moveright bound key ( Default: D ) **/ IN_MOVERIGHT = 1024, /** * @param IN_ATTACK2 - +attack2 bound key ( Default: Right Mouse Button ) **/ IN_ATTACK2 = 2048, /** * @param IN_RUN - no description **/ IN_RUN = 4096, /** * @param IN_RELOAD - +reload bound key ( Default: R ) **/ IN_RELOAD = 8192, /** * @param IN_ALT1 - +alt1 bound key **/ IN_ALT1 = 16384, /** * @param IN_ALT2 - +alt2 bound key **/ IN_ALT2 = 32768, /** * @param IN_SCORE - +showscores bound key ( Default: Tab ) **/ IN_SCORE = 65536, /** * @param IN_SPEED - +speed bound key ( Default: Shift ) **/ IN_SPEED = 131072, /** * @param IN_WALK - +walk bound key ( Slow walk ) **/ IN_WALK = 262144, /** * @param IN_ZOOM - +zoom bound key ( Suit Zoom ) **/ IN_ZOOM = 524288, /** * @param IN_WEAPON1 - For use in weapons. Set in the physgun when scrolling an object away from you. **/ IN_WEAPON1 = 1048576, /** * @param IN_WEAPON2 - For use in weapons. Set in the physgun when scrolling an object towards you. **/ IN_WEAPON2 = 2097152, /** * @param IN_BULLRUSH - no description **/ IN_BULLRUSH = 4194304, /** * @param IN_GRENADE1 - +grenade1 bound key **/ IN_GRENADE1 = 8388608, /** * @param IN_GRENADE2 - +grenade2 bound key **/ IN_GRENADE2 = 16777216, } /** * @wiki https://wiki.garrysmod.com/page/Enums/IMAGE FORMAT * @enum IMAGE_FORMAT * @description Enumerations used by @GetRenderTargetEx function. Clientside only. * @compileMembersOnly **/ declare enum IMAGE_FORMAT { /** * @param IMAGE_FORMAT_DEFAULT - no description **/ IMAGE_FORMAT_DEFAULT = -1, /** * @param IMAGE_FORMAT_RGBA8888 - no description **/ IMAGE_FORMAT_RGBA8888 = 0, /** * @param IMAGE_FORMAT_ABGR8888 - no description **/ IMAGE_FORMAT_ABGR8888 = 1, /** * @param IMAGE_FORMAT_RGB888 - no description **/ IMAGE_FORMAT_RGB888 = 2, /** * @param IMAGE_FORMAT_BGR888 - no description **/ IMAGE_FORMAT_BGR888 = 3, /** * @param IMAGE_FORMAT_RGB565 - no description **/ IMAGE_FORMAT_RGB565 = 4, /** * @param IMAGE_FORMAT_ARGB8888 - no description **/ IMAGE_FORMAT_ARGB8888 = 11, /** * @param IMAGE_FORMAT_BGRA8888 - no description **/ IMAGE_FORMAT_BGRA8888 = 12, /** * @param IMAGE_FORMAT_RGBA16161616 - no description **/ IMAGE_FORMAT_RGBA16161616 = 25, /** * @param IMAGE_FORMAT_RGBA16161616F - no description **/ IMAGE_FORMAT_RGBA16161616F = 24, } /** * @wiki https://wiki.garrysmod.com/page/Enums/HULL * @enum HULL * @description Enumerations used by @NPC:SetHullType and @NPC:GetHullType. Serverside only. * @compileMembersOnly **/ declare enum HULL { /** * @param HULL_HUMAN - Hull of a Citizen **/ HULL_HUMAN = 0, /** * @param HULL_SMALL_CENTERED - no description **/ HULL_SMALL_CENTERED = 1, /** * @param HULL_WIDE_HUMAN - no description **/ HULL_WIDE_HUMAN = 2, /** * @param HULL_TINY - no description **/ HULL_TINY = 3, /** * @param HULL_WIDE_SHORT - no description **/ HULL_WIDE_SHORT = 4, /** * @param HULL_MEDIUM - no description **/ HULL_MEDIUM = 5, /** * @param HULL_TINY_CENTERED - no description **/ HULL_TINY_CENTERED = 6, /** * @param HULL_LARGE - no description **/ HULL_LARGE = 7, /** * @param HULL_LARGE_CENTERED - no description **/ HULL_LARGE_CENTERED = 8, /** * @param HULL_MEDIUM_TALL - no description **/ HULL_MEDIUM_TALL = 9, } /** * @wiki https://wiki.garrysmod.com/page/Enums/HUD * @enum HUD * @description Enumerations used by @Player:PrintMessage and @PrintMessage function. * @compileMembersOnly **/ declare enum HUD { /** * @param HUD_PRINTNOTIFY - No longer works; now same as HUD_PRINTCONSOLE **/ HUD_PRINTNOTIFY = 1, /** * @param HUD_PRINTCONSOLE - Console **/ HUD_PRINTCONSOLE = 2, /** * @param HUD_PRINTTALK - Chat, also prints to console **/ HUD_PRINTTALK = 3, /** * @param HUD_PRINTCENTER - Center of the screen **/ HUD_PRINTCENTER = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/HITGROUP * @enum HITGROUP * @description Enumerations used by @GamemodeHooks:ScalePlayerDamage and @GamemodeHooks:ScaleNPCDamage and returned by @Player:LastHitGroup. * @compileMembersOnly **/ declare enum HITGROUP { /** * @param HITGROUP_GENERIC - 1:1 damage. Melee weapons typically hit this hitgroup. * This hitgroup is not present on default player models.It is unknown how this is generated in @GamemodeHooks:ScalePlayerDamage, but it occurs when shot by NPCs ( npc_combine_s ) for example. **/ HITGROUP_GENERIC = 0, /** * @param HITGROUP_HEAD - Head **/ HITGROUP_HEAD = 1, /** * @param HITGROUP_CHEST - Chest **/ HITGROUP_CHEST = 2, /** * @param HITGROUP_STOMACH - Stomach **/ HITGROUP_STOMACH = 3, /** * @param HITGROUP_LEFTARM - Left arm **/ HITGROUP_LEFTARM = 4, /** * @param HITGROUP_RIGHTARM - Right arm **/ HITGROUP_RIGHTARM = 5, /** * @param HITGROUP_LEFTLEG - Left leg **/ HITGROUP_LEFTLEG = 6, /** * @param HITGROUP_RIGHTLEG - Right leg **/ HITGROUP_RIGHTLEG = 7, /** * @param HITGROUP_GEAR - Gear. Supposed to be belt area.This hitgroup is not present on default player models. **/ HITGROUP_GEAR = 10, } /** * @wiki https://wiki.garrysmod.com/page/Enums/GMOD CHANNEL * @enum GMOD_CHANNEL * @description Enumerations used by @IGModAudioChannel:GetState. Clientside only. * @compileMembersOnly **/ declare enum GMOD_CHANNEL { /** * @param GMOD_CHANNEL_STOPPED - The channel is stopped **/ GMOD_CHANNEL_STOPPED = 0, /** * @param GMOD_CHANNEL_PLAYING - The channel is playing **/ GMOD_CHANNEL_PLAYING = 1, /** * @param GMOD_CHANNEL_PAUSED - The channel is paused **/ GMOD_CHANNEL_PAUSED = 2, /** * @param GMOD_CHANNEL_STALLED - The channel is buffering **/ GMOD_CHANNEL_STALLED = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/GLOBAL * @enum GLOBAL * @description Enumerations used by @game.SetGlobalState and @game.GetGlobalState. * Serverside only. * @compileMembersOnly **/ declare enum GLOBAL { /** * @param GLOBAL_OFF - Initial state, the global state is off. **/ GLOBAL_OFF = 0, /** * @param GLOBAL_ON - The global state is enabled. **/ GLOBAL_ON = 1, /** * @param GLOBAL_DEAD - The global state is dead and is no longer active. It will be cleared. **/ GLOBAL_DEAD = 2, } /** * @wiki https://wiki.garrysmod.com/page/Enums/GESTURE SLOT * @enum GESTURE_SLOT * @description Enumerations used by @Player:AnimResetGestureSlot and @Player:AnimRestartGesture. * @compileMembersOnly **/ declare enum GESTURE_SLOT { /** * @param GESTURE_SLOT_ATTACK_AND_RELOAD - Slot for weapon gestures **/ GESTURE_SLOT_ATTACK_AND_RELOAD = 0, /** * @param GESTURE_SLOT_GRENADE - no description **/ GESTURE_SLOT_GRENADE = 1, /** * @param GESTURE_SLOT_JUMP - Slot for jump gestures **/ GESTURE_SLOT_JUMP = 2, /** * @param GESTURE_SLOT_SWIM - Slot for swimming gestures **/ GESTURE_SLOT_SWIM = 3, /** * @param GESTURE_SLOT_FLINCH - Slot for flinching gestures **/ GESTURE_SLOT_FLINCH = 4, /** * @param GESTURE_SLOT_VCD - no description **/ GESTURE_SLOT_VCD = 5, /** * @param GESTURE_SLOT_CUSTOM - Slot for custom gestures **/ GESTURE_SLOT_CUSTOM = 6, } /** * @wiki https://wiki.garrysmod.com/page/Enums/FVPHYSICS * @enum FVPHYSICS * @description Enumerations used by @PhysObj:AddGameFlag, @PhysObj:HasGameFlag and @PhysObj:ClearGameFlag. * @compileMembersOnly **/ declare enum FVPHYSICS { /** * @param FVPHYSICS_CONSTRAINT_STATIC - Won't receive physics forces from collisions and won't collide with other @PhysObj type with the same flag set. **/ FVPHYSICS_CONSTRAINT_STATIC = 2, /** * @param FVPHYSICS_DMG_DISSOLVE - Colliding with entities will cause 1000 damage with DMG_DISSOLVE as the damage type, but only if EFL_NO_DISSOLVE is not set. **/ FVPHYSICS_DMG_DISSOLVE = 512, /** * @param FVPHYSICS_DMG_SLICE - Does slice damage, not just blunt damage. **/ FVPHYSICS_DMG_SLICE = 1, /** * @param FVPHYSICS_HEAVY_OBJECT - Will deal high physics damage even with a small mass. **/ FVPHYSICS_HEAVY_OBJECT = 32, /** * @param FVPHYSICS_MULTIOBJECT_ENTITY - This @PhysObj type is part of an entity with multiple @PhysObj type , such as a ragdoll or a vehicle , and will be considered during collision damage events. **/ FVPHYSICS_MULTIOBJECT_ENTITY = 16, /** * @param FVPHYSICS_NO_IMPACT_DMG - Colliding with entities won't cause physics damage. **/ FVPHYSICS_NO_IMPACT_DMG = 1024, /** * @param FVPHYSICS_NO_NPC_IMPACT_DMG - Like FVPHYSICS_NO_NPC_IMPACT_DMG, but only checks for NPCs. Usually set on Combine Balls fired by Combine Soldiers. **/ FVPHYSICS_NO_NPC_IMPACT_DMG = 2048, /** * @param FVPHYSICS_NO_PLAYER_PICKUP - Doesn't allow the player to pick this @PhysObj type with the Gravity Gun or +use pickup. **/ FVPHYSICS_NO_PLAYER_PICKUP = 128, /** * @param FVPHYSICS_NO_SELF_COLLISIONS - We won't collide with other @PhysObj type associated to the same entity, only used for vehicles and ragdolls held by the Super Gravity Gun. **/ FVPHYSICS_NO_SELF_COLLISIONS = 32768, /** * @param FVPHYSICS_PART_OF_RAGDOLL - This @PhysObj type is part of a ragdoll. **/ FVPHYSICS_PART_OF_RAGDOLL = 8, /** * @param FVPHYSICS_PENETRATING - Set by the physics engine when two @PhysObj type are penetrating each other. This is only automatically updated for non-static physics objects. **/ FVPHYSICS_PENETRATING = 64, /** * @param FVPHYSICS_PLAYER_HELD - Set when the player is holding this @PhysObj type with the Gravity Gun or +use pickup. **/ FVPHYSICS_PLAYER_HELD = 4, /** * @param FVPHYSICS_WAS_THROWN - This object was thrown by the Gravity Gun , stuns Antlion guards, Hunters, and squashes Antlion grubs. **/ FVPHYSICS_WAS_THROWN = 256, } /** * @wiki https://wiki.garrysmod.com/page/Enums/FSOLID * @enum FSOLID * @description Enumerations used by @EntityFuncs:SetSolidFlags and @EntityFuncs:GetSolidFlags. * @compileMembersOnly **/ declare enum FSOLID { /** * @param FSOLID_CUSTOMRAYTEST - Ignore solid type + always call into the entity for ray tests **/ FSOLID_CUSTOMRAYTEST = 1, /** * @param FSOLID_CUSTOMBOXTEST - Ignore solid type + always call into the entity for swept box tests **/ FSOLID_CUSTOMBOXTEST = 2, /** * @param FSOLID_NOT_SOLID - The object is currently not solid **/ FSOLID_NOT_SOLID = 4, /** * @param FSOLID_TRIGGER - This is something may be collideable but fires touch functions even when it's not collideable (when the FSOLID_NOT_SOLID flag is set) **/ FSOLID_TRIGGER = 8, /** * @param FSOLID_NOT_STANDABLE - The player can't stand on this **/ FSOLID_NOT_STANDABLE = 16, /** * @param FSOLID_VOLUME_CONTENTS - Contains volumetric contents (like water) **/ FSOLID_VOLUME_CONTENTS = 32, /** * @param FSOLID_FORCE_WORLD_ALIGNED - Forces the collision representation to be world-aligned even if it's SOLID_BSP or SOLID_VPHYSICS **/ FSOLID_FORCE_WORLD_ALIGNED = 64, /** * @param FSOLID_USE_TRIGGER_BOUNDS - Uses a special trigger bounds separate from the normal OBB **/ FSOLID_USE_TRIGGER_BOUNDS = 128, /** * @param FSOLID_ROOT_PARENT_ALIGNED - Collisions are defined in root parent's local coordinate space **/ FSOLID_ROOT_PARENT_ALIGNED = 256, /** * @param FSOLID_TRIGGER_TOUCH_DEBRIS - This trigger will touch debris objects **/ FSOLID_TRIGGER_TOUCH_DEBRIS = 512, /** * @param FSOLID_MAX_BITS - The amount of bits needed to store the all the flags in a variable/sent over network. **/ FSOLID_MAX_BITS = 10, } /** * @wiki https://wiki.garrysmod.com/page/Enums/FORCE * @enum FORCE * @description Enumerations used by @AccessorFunc function. * @compileMembersOnly **/ declare enum FORCE { /** * @param FORCE_STRING - Forces the function to take @string types only **/ FORCE_STRING = 1, /** * @param FORCE_NUMBER - Forces the function to take @number types only **/ FORCE_NUMBER = 2, /** * @param FORCE_BOOL - Forces the function to take @boolean types only **/ FORCE_BOOL = 3, } /** * @wiki https://wiki.garrysmod.com/page/Enums/FL * @bug Bots will still be able to look around. * @enum FL * @description Enumerations used by @EntityFuncs:AddFlags, @EntityFuncs:RemoveFlags and @EntityFuncs:IsFlagSet. * @compileMembersOnly **/ declare enum FL { /** * @param FL_ONGROUND - Is the entity on ground or not **/ FL_ONGROUND = 1, /** * @param FL_DUCKING - Is player ducking or not **/ FL_DUCKING = 2, /** * @param FL_ANIMDUCKING - Is the player in the process of ducking or standing up **/ FL_ANIMDUCKING = 4, /** * @param FL_WATERJUMP - The player is jumping out of water **/ FL_WATERJUMP = 8, /** * @param FL_ONTRAIN - This player is controlling a func_train **/ FL_ONTRAIN = 16, /** * @param FL_INRAIN - Indicates the entity is standing in rain **/ FL_INRAIN = 32, /** * @param FL_FROZEN - Completely freezes the player **/ FL_FROZEN = 64, /** * @param FL_ATCONTROLS - This player is controlling something UI related in the world, this prevents his movement, but doesn't freeze mouse movement, jumping, etc. **/ FL_ATCONTROLS = 128, /** * @param FL_CLIENT - Is this entity a player or not **/ FL_CLIENT = 256, /** * @param FL_FAKECLIENT - Bots have this flag **/ FL_FAKECLIENT = 512, /** * @param FL_INWATER - Is the player in water or not **/ FL_INWATER = 1024, /** * @param FL_FLY - This entity can fly **/ FL_FLY = 2048, /** * @param FL_SWIM - This entity can swim **/ FL_SWIM = 4096, /** * @param FL_CONVEYOR - This entity is a func_conveyor **/ FL_CONVEYOR = 8192, /** * @param FL_NPC - NPCs have this flag (NPC: Ignore player push) **/ FL_NPC = 16384, /** * @param FL_GODMODE - Whether the player has god mode enabled **/ FL_GODMODE = 32768, /** * @param FL_NOTARGET - Makes the entity invisible to AI **/ FL_NOTARGET = 65536, /** * @param FL_AIMTARGET - This entity can be aimed at **/ FL_AIMTARGET = 131072, /** * @param FL_PARTIALGROUND - Not all corners are valid **/ FL_PARTIALGROUND = 262144, /** * @param FL_STATICPROP - It's a static prop **/ FL_STATICPROP = 524288, /** * @param FL_GRAPHED - worldgraph has this ent listed as something that blocks a connection **/ FL_GRAPHED = 1048576, /** * @param FL_GRENADE - This entity is a grenade, unused **/ FL_GRENADE = 2097152, /** * @param FL_STEPMOVEMENT - Changes the SV_Movestep() behavior to not do any processing **/ FL_STEPMOVEMENT = 4194304, /** * @param FL_DONTTOUCH - Doesn't generate touch functions, calls @EntityHooks:EndTouch when this flag gets set during a touch callback **/ FL_DONTTOUCH = 8388608, /** * @param FL_BASEVELOCITY - Base velocity has been applied this frame (used to convert base velocity into momentum) **/ FL_BASEVELOCITY = 16777216, /** * @param FL_WORLDBRUSH - This entity is a brush and part of the world **/ FL_WORLDBRUSH = 33554432, /** * @param FL_OBJECT - This entity can be seen by NPCs **/ FL_OBJECT = 67108864, /** * @param FL_KILLME - This entity is about to get removed **/ FL_KILLME = 134217728, /** * @param FL_ONFIRE - This entity is on fire **/ FL_ONFIRE = 268435456, /** * @param FL_DISSOLVING - The entity is currently dissolving **/ FL_DISSOLVING = 536870912, /** * @param FL_TRANSRAGDOLL - This entity is about to become a ragdoll **/ FL_TRANSRAGDOLL = 1073741824, /** * @param FL_UNBLOCKABLE_BY_PLAYER - This moving door can't be blocked by the player **/ FL_UNBLOCKABLE_BY_PLAYER = -2147483648, } /** * @wiki https://wiki.garrysmod.com/page/Enums/FFT * @enum FFT * @description Enumerations used by @IGModAudioChannel:FFT. Clientside only. * @compileMembersOnly **/ declare enum FFT { /** * @param FFT_256 - 128 levels **/ FFT_256 = 0, /** * @param FFT_512 - 256 levels **/ FFT_512 = 1, /** * @param FFT_1024 - 512 levels **/ FFT_1024 = 2, /** * @param FFT_2048 - 1024 levels **/ FFT_2048 = 3, /** * @param FFT_4096 - 2048 levels **/ FFT_4096 = 4, /** * @param FFT_8192 - 4096 levels **/ FFT_8192 = 5, /** * @param FFT_16384 - 8192 levels **/ FFT_16384 = 6, /** * @param FFT_32768 - 16384 levels **/ FFT_32768 = 7, } /** * @wiki https://wiki.garrysmod.com/page/Enums/FCVAR * @enum FCVAR * @description Enumerations used by @concommand.Add, @CreateClientConVar function and @CreateConVar function. * @compileMembersOnly **/ declare enum FCVAR { /** * @param FCVAR_ARCHIVE - Save the @ConVar type value into config.cfg * Reported as "a" by *cvarlist*, except Lua @ConVar types **/ FCVAR_ARCHIVE = 128, /** * @param FCVAR_ARCHIVE_XBOX - Save the @ConVar type value into config.cfg on XBox **/ FCVAR_ARCHIVE_XBOX = 16777216, /** * @param FCVAR_CHEAT - Requires sv_cheats to be enabled to change the @ConVar type or run the command * Reported as "cheat" by *cvarlist* **/ FCVAR_CHEAT = 16384, /** * @param FCVAR_CLIENTCMD_CAN_EXECUTE - IVEngineClient::ClientCmd is allowed to execute this command * Reported as "clientcmd_can_execute" by *cvarlist* **/ FCVAR_CLIENTCMD_CAN_EXECUTE = 1073741824, /** * @param FCVAR_CLIENTDLL - @ConVar type is defined by the client DLL.This flag is set automatically * Reported as "cl" by *cvarlist* **/ FCVAR_CLIENTDLL = 8, /** * @param FCVAR_DEMO - Force the @ConVar type to be recorded by demo recordings. * Reported as "demo" by *cvarlist* **/ FCVAR_DEMO = 65536, /** * @param FCVAR_DONTRECORD - Opposite of FCVAR_DEMO, ensures the @ConVar type is not recorded in demos * Reported as "norecord" by *cvarlist* **/ FCVAR_DONTRECORD = 131072, /** * @param FCVAR_GAMEDLL - @ConVar type is defined by the game DLL.This flag is set automatically * Reported as "sv" by *cvarlist* **/ FCVAR_GAMEDLL = 4, /** * @param FCVAR_LUA_CLIENT - Set automatically on all ConVars and console commands created by the client Lua state. * Reported as "lua_client" by *cvarlist* **/ FCVAR_LUA_CLIENT = 262144, /** * @param FCVAR_LUA_SERVER - Set automatically on all ConVars and console commands created by the server Lua state. * Reported as "lua_server" by *cvarlist* **/ FCVAR_LUA_SERVER = 524288, /** * @param FCVAR_NEVER_AS_STRING - Tells the engine to never print this variable as a string. * Reported as "numeric" by *cvarlist* **/ FCVAR_NEVER_AS_STRING = 4096, /** * @param FCVAR_NONE - No flags **/ FCVAR_NONE = 0, /** * @param FCVAR_NOTIFY - For serverside @ConVar types, notifies all players with blue chat text when the value gets changed * Reported as "nf" by *cvarlist* **/ FCVAR_NOTIFY = 256, /** * @param FCVAR_NOT_CONNECTED - Makes the @ConVar type not changeable while connected to a server or in singleplayer **/ FCVAR_NOT_CONNECTED = 4194304, /** * @param FCVAR_PRINTABLEONLY - Forces the @ConVar type to only have printable characters ( No control characters ) * Reported as "print" by *cvarlist* **/ FCVAR_PRINTABLEONLY = 1024, /** * @param FCVAR_PROTECTED - Makes the @ConVar type value hidden from all clients ( For example sv_password ) * Reported as "prot" by *cvarlist* **/ FCVAR_PROTECTED = 32, /** * @param FCVAR_REPLICATED - For serverside @ConVar types, it will send its value to all clients. The @ConVar type with the same name must also exist on the client! * Reported as "rep" by *cvarlist* **/ FCVAR_REPLICATED = 8192, /** * @param FCVAR_SERVER_CANNOT_QUERY - Prevents the server from querying value of this @ConVar type **/ FCVAR_SERVER_CANNOT_QUERY = 536870912, /** * @param FCVAR_SERVER_CAN_EXECUTE - The server is allowed to execute this command on clients. * Reported as "server_can_execute" by *cvarlist* **/ FCVAR_SERVER_CAN_EXECUTE = 268435456, /** * @param FCVAR_SPONLY - Executing the command or changing the @ConVar type is only allowed in singleplayer * Reported as "sp" by *cvarlist* **/ FCVAR_SPONLY = 64, /** * @param FCVAR_UNLOGGED - Don't log the @ConVar type changes to console/log files/users * Reported as "log" by *cvarlist* **/ FCVAR_UNLOGGED = 2048, /** * @param FCVAR_UNREGISTERED - If this is set, the convar will become anonymous and won't show up in the 'find' results. **/ FCVAR_UNREGISTERED = 1, /** * @param FCVAR_USERINFO - For clientside commands, sends the value to the server * Reported as "user" by *cvarlist* **/ FCVAR_USERINFO = 512, } /** * @wiki https://wiki.garrysmod.com/page/Enums/EFL * @warning You should never set this flag manually. * @enum EFL * @description Enumerations used by @EntityFuncs:AddEFlags, @EntityFuncs:RemoveEFlags and @EntityFuncs:IsEFlagSet. * @compileMembersOnly **/ declare enum EFL { /** * @param EFL_BOT_FROZEN - This is set on bots that are frozen **/ EFL_BOT_FROZEN = 256, /** * @param EFL_CHECK_UNTOUCH - no description **/ EFL_CHECK_UNTOUCH = 16777216, /** * @param EFL_DIRTY_ABSANGVELOCITY - Some dirty bits with respect to abs computations **/ EFL_DIRTY_ABSANGVELOCITY = 8192, /** * @param EFL_DIRTY_ABSTRANSFORM - no description **/ EFL_DIRTY_ABSTRANSFORM = 2048, /** * @param EFL_DIRTY_ABSVELOCITY - no description **/ EFL_DIRTY_ABSVELOCITY = 4096, /** * @param EFL_DIRTY_SHADOWUPDATE - (Client only) need shadow manager to update the shadow **/ EFL_DIRTY_SHADOWUPDATE = 32, /** * @param EFL_DIRTY_SPATIAL_PARTITION - no description **/ EFL_DIRTY_SPATIAL_PARTITION = 32768, /** * @param EFL_DIRTY_SURROUNDING_COLLISION_BOUNDS - no description **/ EFL_DIRTY_SURROUNDING_COLLISION_BOUNDS = 16384, /** * @param EFL_DONTBLOCKLOS - Entity shouldn't block NPC line-of-sight **/ EFL_DONTBLOCKLOS = 33554432, /** * @param EFL_DONTWALKON - NPCs should not walk on this entity **/ EFL_DONTWALKON = 67108864, /** * @param EFL_DORMANT - Entity is dormant, no updates to client **/ EFL_DORMANT = 2, /** * @param EFL_FORCE_CHECK_TRANSMIT - The default behavior in ShouldTransmit is to not send an entity if it doesn't have a model. Certain entities want to be sent anyway because all the drawing logic is in the client DLL. They can set this flag and the engine will transmit them even if they don't have model **/ EFL_FORCE_CHECK_TRANSMIT = 128, /** * @param EFL_HAS_PLAYER_CHILD - One of the child entities is a player **/ EFL_HAS_PLAYER_CHILD = 16, /** * @param EFL_IN_SKYBOX - This is set if the entity detects that it's in the skybox. This forces it to pass the "in PVS" for transmission **/ EFL_IN_SKYBOX = 131072, /** * @param EFL_IS_BEING_LIFTED_BY_BARNACLE - no description **/ EFL_IS_BEING_LIFTED_BY_BARNACLE = 1048576, /** * @param EFL_KEEP_ON_RECREATE_ENTITIES - This is a special entity that should not be deleted when we restart entities only **/ EFL_KEEP_ON_RECREATE_ENTITIES = 16, /** * @param EFL_KILLME - This entity is marked for death -- This allows the game to actually delete ents at a safe time. **/ EFL_KILLME = 1, /** * @param EFL_NOCLIP_ACTIVE - Lets us know when the noclip command is active **/ EFL_NOCLIP_ACTIVE = 4, /** * @param EFL_NOTIFY - Another entity is watching events on this entity (used by teleport) **/ EFL_NOTIFY = 64, /** * @param EFL_NO_AUTO_EDICT_ATTACH - Don't attach the edict **/ EFL_NO_AUTO_EDICT_ATTACH = 1024, /** * @param EFL_NO_DAMAGE_FORCES - Doesn't accept forces from physics damage **/ EFL_NO_DAMAGE_FORCES = -2147483648, /** * @param EFL_NO_DISSOLVE - Entitiy shouldn't dissolve **/ EFL_NO_DISSOLVE = 134217728, /** * @param EFL_NO_GAME_PHYSICS_SIMULATION - no description **/ EFL_NO_GAME_PHYSICS_SIMULATION = 8388608, /** * @param EFL_NO_MEGAPHYSCANNON_RAGDOLL - Mega physcannon can't ragdoll these guys **/ EFL_NO_MEGAPHYSCANNON_RAGDOLL = 268435456, /** * @param EFL_NO_PHYSCANNON_INTERACTION - Physcannon can't pick these up or punt them **/ EFL_NO_PHYSCANNON_INTERACTION = 1073741824, /** * @param EFL_NO_ROTORWASH_PUSH - no description **/ EFL_NO_ROTORWASH_PUSH = 2097152, /** * @param EFL_NO_THINK_FUNCTION - Avoid executing the entity's Think **/ EFL_NO_THINK_FUNCTION = 4194304, /** * @param EFL_NO_WATER_VELOCITY_CHANGE - Don't adjust this entity's velocity when transitioning into water **/ EFL_NO_WATER_VELOCITY_CHANGE = 536870912, /** * @param EFL_SERVER_ONLY - Non-networked entity **/ EFL_SERVER_ONLY = 512, /** * @param EFL_SETTING_UP_BONES - Set while a model is setting up its bones **/ EFL_SETTING_UP_BONES = 8, /** * @param EFL_TOUCHING_FLUID - Used to determine if an entity is floating **/ EFL_TOUCHING_FLUID = 524288, /** * @param EFL_USE_PARTITION_WHEN_NOT_SOLID - Entities with this flag set show up in the partition even when not solid **/ EFL_USE_PARTITION_WHEN_NOT_SOLID = 262144, } /** * @wiki https://wiki.garrysmod.com/page/Enums/EF * @enum EF * @description Enumerations used by @EntityFuncs:AddEffects, @EntityFuncs:RemoveEffects and @EntityFuncs:IsEffectActive. * @compileMembersOnly **/ declare enum EF { /** * @param EF_BONEMERGE - Performs bone merge on client side **/ EF_BONEMERGE = 1, /** * @param EF_BONEMERGE_FASTCULL - For use with EF_BONEMERGE. If this is set, then it places this ents origin at its parent and uses the parent's bbox + the max extents of the aiment. Otherwise, it sets up the parent's bones every frame to figure out where to place the aiment, which is inefficient because it'll setup the parent's bones even if the parent is not in the PVS. **/ EF_BONEMERGE_FASTCULL = 128, /** * @param EF_BRIGHTLIGHT - DLIGHT centered at entity origin **/ EF_BRIGHTLIGHT = 2, /** * @param EF_DIMLIGHT - Player flashlight **/ EF_DIMLIGHT = 4, /** * @param EF_NOINTERP - Don't interpolate the next frame **/ EF_NOINTERP = 8, /** * @param EF_NOSHADOW - Disables shadow **/ EF_NOSHADOW = 16, /** * @param EF_NODRAW - Prevents the entity from drawing and networking. **/ EF_NODRAW = 32, /** * @param EF_NORECEIVESHADOW - Don't receive shadows **/ EF_NORECEIVESHADOW = 64, /** * @param EF_ITEM_BLINK - Makes the entity blink **/ EF_ITEM_BLINK = 256, /** * @param EF_PARENT_ANIMATES - Always assume that the parent entity is animating **/ EF_PARENT_ANIMATES = 512, /** * @param EF_FOLLOWBONE - Internal flag that is set by @EntityFuncs:FollowBone **/ EF_FOLLOWBONE = 1024, } /** * @wiki https://wiki.garrysmod.com/page/Enums/DOF * @enum DOF * @description Internal globals for SimpleDoF. Clientside only. * @compileMembersOnly **/ declare enum DOF { /** * @param DOF_OFFSET - no description **/ DOF_OFFSET = 256, /** * @param DOF_SPACING - no description **/ DOF_SPACING = 512, } /** * @wiki https://wiki.garrysmod.com/page/Enums/DOCK * @note These enumerations doesn't have DOCK_ prefix, this is an exception from all other enumerations. * @enum DOCK * @description Enumerations used by @Panel:Dock. * @compileMembersOnly **/ declare enum DOCK { /** * @param NODOCK - Don't dock **/ NODOCK = 0, /** * @param FILL - Fill parent **/ FILL = 1, /** * @param LEFT - Dock to the left **/ LEFT = 2, /** * @param RIGHT - Dock to the right **/ RIGHT = 3, /** * @param TOP - Dock to the top **/ TOP = 4, /** * @param BOTTOM - Dock to the bottom **/ BOTTOM = 5, } /** * @wiki https://wiki.garrysmod.com/page/Enums/DMG * @enum DMG * @description Enumerations used by @CTakeDamageInfo:GetDamageType, @CTakeDamageInfo:SetDamageType and @CTakeDamageInfo:IsDamageType * @compileMembersOnly **/ declare enum DMG { /** * @param DMG_GENERIC - Generic damage **/ DMG_GENERIC = 0, /** * @param DMG_CRUSH - Caused by physics interaction. Ignored by airboat drivers. Used by the Crowbar **/ DMG_CRUSH = 1, /** * @param DMG_BULLET - Bullet damage **/ DMG_BULLET = 2, /** * @param DMG_SLASH - Sharp objects, such as Manhacks or other NPCs attacks **/ DMG_SLASH = 4, /** * @param DMG_BURN - Damage from fire **/ DMG_BURN = 8, /** * @param DMG_VEHICLE - Hit by a vehicle. This will need to be set for passengers of some vehicle to receive damage. **/ DMG_VEHICLE = 16, /** * @param DMG_FALL - Fall damage **/ DMG_FALL = 32, /** * @param DMG_BLAST - Explosion damage. Will be ignored by most vehicle passengers. **/ DMG_BLAST = 64, /** * @param DMG_CLUB - Crowbar damage **/ DMG_CLUB = 128, /** * @param DMG_SHOCK - Electrical damage, shows smoke at the damage position **/ DMG_SHOCK = 256, /** * @param DMG_SONIC - Sonic damage,used by the Gargantua and Houndeye NPCs **/ DMG_SONIC = 512, /** * @param DMG_ENERGYBEAM - Laser **/ DMG_ENERGYBEAM = 1024, /** * @param DMG_PREVENT_PHYSICS_FORCE - Prevent a physics force **/ DMG_PREVENT_PHYSICS_FORCE = 2048, /** * @param DMG_NEVERGIB - Never creates gibs. (Used by the crossbow) **/ DMG_NEVERGIB = 4096, /** * @param DMG_ALWAYSGIB - Always create gibs **/ DMG_ALWAYSGIB = 8192, /** * @param DMG_DROWN - Drown damage **/ DMG_DROWN = 16384, /** * @param DMG_PARALYZE - Same as DMG_POISON **/ DMG_PARALYZE = 32768, /** * @param DMG_NERVEGAS - Neurotoxin damage **/ DMG_NERVEGAS = 65536, /** * @param DMG_POISON - Poison damage **/ DMG_POISON = 131072, /** * @param DMG_RADIATION - Radiation. Will be ignored by most vehicle passengers. **/ DMG_RADIATION = 262144, /** * @param DMG_DROWNRECOVER - Damage applied to the player to restore health after drowning **/ DMG_DROWNRECOVER = 524288, /** * @param DMG_ACID - Toxic chemicals or acid burns **/ DMG_ACID = 1048576, /** * @param DMG_SLOWBURN - In an oven **/ DMG_SLOWBURN = 2097152, /** * @param DMG_REMOVENORAGDOLL - Don't create a ragdoll on death **/ DMG_REMOVENORAGDOLL = 4194304, /** * @param DMG_PHYSGUN - Damage done by the gravity gun **/ DMG_PHYSGUN = 8388608, /** * @param DMG_PLASMA - Plasma **/ DMG_PLASMA = 16777216, /** * @param DMG_AIRBOAT - Airboat gun damage **/ DMG_AIRBOAT = 33554432, /** * @param DMG_DISSOLVE - Forces the entity to dissolve on death. This is what the combine ball uses when it hits a target **/ DMG_DISSOLVE = 67108864, /** * @param DMG_BLAST_SURFACE - This won't hurt the player underwater **/ DMG_BLAST_SURFACE = 134217728, /** * @param DMG_DIRECT - Direct damage to the entity that does not go through any damage value modifications **/ DMG_DIRECT = 268435456, /** * @param DMG_BUCKSHOT - The pellets fired from a shotgun **/ DMG_BUCKSHOT = 536870912, /** * @param DMG_SNIPER - Damage from SniperRound/SniperPenetratedRound ammo types **/ DMG_SNIPER = 1073741824, /** * @param DMG_MISSILEDEFENSE - Damage from npc_missiledefense, npc_combinegunship, or monster_mortar **/ DMG_MISSILEDEFENSE = 2147483648, } /** * @wiki https://wiki.garrysmod.com/page/Enums/DISPSURF * @enum DISPSURF * @description Displacement surface flags, used by the @TraceResult structure. * @compileMembersOnly **/ declare enum DISPSURF { /** * @param DISPSURF_SURFACE - no description **/ DISPSURF_SURFACE = 1, /** * @param DISPSURF_WALKABLE - no description **/ DISPSURF_WALKABLE = 2, /** * @param DISPSURF_BUILDABLE - no description **/ DISPSURF_BUILDABLE = 4, /** * @param DISPSURF_SURFPROP1 - no description **/ DISPSURF_SURFPROP1 = 8, /** * @param DISPSURF_SURFPROP2 - no description **/ DISPSURF_SURFPROP2 = 16, } /** * @wiki https://wiki.garrysmod.com/page/Enums/CT * @enum CT * @description Citizen type, a KeyValue for npc_citizen( citizentype ), serverside only. * @compileMembersOnly **/ declare enum CT { /** * @param CT_DEFAULT - Default citizen **/ CT_DEFAULT = 0, /** * @param CT_DOWNTRODDEN - no description **/ CT_DOWNTRODDEN = 1, /** * @param CT_REFUGEE - Refugee **/ CT_REFUGEE = 2, /** * @param CT_REBEL - Rebel **/ CT_REBEL = 3, /** * @param CT_UNIQUE - Odessa? **/ CT_UNIQUE = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/CREATERENDERTARGETFLAGS * @enum CREATERENDERTARGETFLAGS * @description Enumerations used by @GetRenderTargetEx function. Clientside only. * @compileMembersOnly **/ declare enum CREATERENDERTARGETFLAGS { /** * @param CREATERENDERTARGETFLAGS_HDR - no description **/ CREATERENDERTARGETFLAGS_HDR = 1, /** * @param CREATERENDERTARGETFLAGS_AUTOMIPMAP - no description **/ CREATERENDERTARGETFLAGS_AUTOMIPMAP = 2, /** * @param CREATERENDERTARGETFLAGS_UNFILTERABLE_OK - no description **/ CREATERENDERTARGETFLAGS_UNFILTERABLE_OK = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/D * @enum D * @description Enumerations used by @NPC:Disposition and @EntityHooks:GetRelationship. * @compileMembersOnly **/ declare enum D { /** * @param D_ER - Error **/ D_ER = 0, /** * @param D_HT - Hate **/ D_HT = 1, /** * @param D_FR - Frightened / Fear **/ D_FR = 2, /** * @param D_LI - Like **/ D_LI = 3, /** * @param D_NU - Neutral **/ D_NU = 4, } /** * @wiki https://wiki.garrysmod.com/page/Enums/CONTENTS * @enum CONTENTS * @description Enumerations used by @util.PointContents and as tracer masks. * @compileMembersOnly **/ declare enum CONTENTS { /** * @param CONTENTS_EMPTY - Things that are not solid **/ CONTENTS_EMPTY = 0, /** * @param CONTENTS_SOLID - Things that are solid **/ CONTENTS_SOLID = 1, /** * @param CONTENTS_WINDOW - Glass **/ CONTENTS_WINDOW = 2, /** * @param CONTENTS_AUX - no description **/ CONTENTS_AUX = 4, /** * @param CONTENTS_GRATE - Bullets go through, solids don't **/ CONTENTS_GRATE = 8, /** * @param CONTENTS_SLIME - no description **/ CONTENTS_SLIME = 16, /** * @param CONTENTS_WATER - Hits world but not skybox **/ CONTENTS_WATER = 32, /** * @param CONTENTS_BLOCKLOS - Things that block line of sight **/ CONTENTS_BLOCKLOS = 64, /** * @param CONTENTS_OPAQUE - Things that block light **/ CONTENTS_OPAQUE = 128, /** * @param CONTENTS_TESTFOGVOLUME - no description **/ CONTENTS_TESTFOGVOLUME = 256, /** * @param CONTENTS_TEAM4 - no description **/ CONTENTS_TEAM4 = 512, /** * @param CONTENTS_TEAM3 - no description **/ CONTENTS_TEAM3 = 1024, /** * @param CONTENTS_TEAM1 - no description **/ CONTENTS_TEAM1 = 2048, /** * @param CONTENTS_TEAM2 - no description **/ CONTENTS_TEAM2 = 4096, /** * @param CONTENTS_IGNORE_NODRAW_OPAQUE - no description **/ CONTENTS_IGNORE_NODRAW_OPAQUE = 8192, /** * @param CONTENTS_MOVEABLE - no description **/ CONTENTS_MOVEABLE = 16384, /** * @param CONTENTS_AREAPORTAL - no description **/ CONTENTS_AREAPORTAL = 32768, /** * @param CONTENTS_PLAYERCLIP - no description **/ CONTENTS_PLAYERCLIP = 65536, /** * @param CONTENTS_MONSTERCLIP - no description **/ CONTENTS_MONSTERCLIP = 131072, /** * @param CONTENTS_CURRENT_0 - no description **/ CONTENTS_CURRENT_0 = 262144, /** * @param CONTENTS_CURRENT_180 - no description **/ CONTENTS_CURRENT_180 = 1048576, /** * @param CONTENTS_CURRENT_270 - no description **/ CONTENTS_CURRENT_270 = 2097152, /** * @param CONTENTS_CURRENT_90 - no description **/ CONTENTS_CURRENT_90 = 524288, /** * @param CONTENTS_CURRENT_DOWN - no description **/ CONTENTS_CURRENT_DOWN = 8388608, /** * @param CONTENTS_CURRENT_UP - no description **/ CONTENTS_CURRENT_UP = 4194304, /** * @param CONTENTS_DEBRIS - no description **/ CONTENTS_DEBRIS = 67108864, /** * @param CONTENTS_DETAIL - no description **/ CONTENTS_DETAIL = 134217728, /** * @param CONTENTS_HITBOX - Hitbox **/ CONTENTS_HITBOX = 1073741824, /** * @param CONTENTS_LADDER - Ladder **/ CONTENTS_LADDER = 536870912, /** * @param CONTENTS_MONSTER - NPCs **/ CONTENTS_MONSTER = 33554432, /** * @param CONTENTS_ORIGIN - no description **/ CONTENTS_ORIGIN = 16777216, /** * @param CONTENTS_TRANSLUCENT - Hits world but not skybox **/ CONTENTS_TRANSLUCENT = 268435456, /** * @param LAST_VISIBLE_CONTENTS - Last visible contents enumeration **/ LAST_VISIBLE_CONTENTS = 128, /** * @param ALL_VISIBLE_CONTENTS - Sum of all the visible contents enumerations **/ ALL_VISIBLE_CONTENTS = 255, } /** * @wiki https://wiki.garrysmod.com/page/Enums/COND * @note There are more conditions than listed here after **COND_NO_CUSTOM_INTERRUPTS**(70) but the name depends on what's returned by @NPC:ConditionName * @warning These enumerations do not exist in game, but are listed here anyway for reference * @enum COND * @description Enumerations for NPC conditions, used by @NPC:SetCondition. Serverside only. * @compileMembersOnly **/ declare enum COND { /** * @param COND_BEHIND_ENEMY - no description **/ COND_BEHIND_ENEMY = 29, /** * @param COND_BETTER_WEAPON_AVAILABLE - no description **/ COND_BETTER_WEAPON_AVAILABLE = 46, /** * @param COND_CAN_MELEE_ATTACK1 - no description **/ COND_CAN_MELEE_ATTACK1 = 23, /** * @param COND_CAN_MELEE_ATTACK2 - no description **/ COND_CAN_MELEE_ATTACK2 = 24, /** * @param COND_CAN_RANGE_ATTACK1 - no description **/ COND_CAN_RANGE_ATTACK1 = 21, /** * @param COND_CAN_RANGE_ATTACK2 - no description **/ COND_CAN_RANGE_ATTACK2 = 22, /** * @param COND_ENEMY_DEAD - no description **/ COND_ENEMY_DEAD = 30, /** * @param COND_ENEMY_FACING_ME - no description **/ COND_ENEMY_FACING_ME = 28, /** * @param COND_ENEMY_OCCLUDED - no description **/ COND_ENEMY_OCCLUDED = 13, /** * @param COND_ENEMY_TOO_FAR - no description **/ COND_ENEMY_TOO_FAR = 27, /** * @param COND_ENEMY_UNREACHABLE - no description **/ COND_ENEMY_UNREACHABLE = 31, /** * @param COND_ENEMY_WENT_NULL - no description **/ COND_ENEMY_WENT_NULL = 12, /** * @param COND_FLOATING_OFF_GROUND - no description **/ COND_FLOATING_OFF_GROUND = 61, /** * @param COND_GIVE_WAY - no description **/ COND_GIVE_WAY = 48, /** * @param COND_HAVE_ENEMY_LOS - no description **/ COND_HAVE_ENEMY_LOS = 15, /** * @param COND_HAVE_TARGET_LOS - no description **/ COND_HAVE_TARGET_LOS = 16, /** * @param COND_HEALTH_ITEM_AVAILABLE - no description **/ COND_HEALTH_ITEM_AVAILABLE = 47, /** * @param COND_HEAR_BUGBAIT - no description **/ COND_HEAR_BUGBAIT = 52, /** * @param COND_HEAR_BULLET_IMPACT - no description **/ COND_HEAR_BULLET_IMPACT = 56, /** * @param COND_HEAR_COMBAT - no description **/ COND_HEAR_COMBAT = 53, /** * @param COND_HEAR_DANGER - no description **/ COND_HEAR_DANGER = 50, /** * @param COND_HEAR_MOVE_AWAY - no description **/ COND_HEAR_MOVE_AWAY = 58, /** * @param COND_HEAR_PHYSICS_DANGER - no description **/ COND_HEAR_PHYSICS_DANGER = 57, /** * @param COND_HEAR_PLAYER - no description **/ COND_HEAR_PLAYER = 55, /** * @param COND_HEAR_SPOOKY - no description **/ COND_HEAR_SPOOKY = 59, /** * @param COND_HEAR_THUMPER - no description **/ COND_HEAR_THUMPER = 51, /** * @param COND_HEAR_WORLD - no description **/ COND_HEAR_WORLD = 54, /** * @param COND_HEAVY_DAMAGE - no description **/ COND_HEAVY_DAMAGE = 18, /** * @param COND_IDLE_INTERRUPT - no description **/ COND_IDLE_INTERRUPT = 2, /** * @param COND_IN_PVS - no description **/ COND_IN_PVS = 1, /** * @param COND_LIGHT_DAMAGE - no description **/ COND_LIGHT_DAMAGE = 17, /** * @param COND_LOST_ENEMY - no description **/ COND_LOST_ENEMY = 11, /** * @param COND_LOST_PLAYER - no description **/ COND_LOST_PLAYER = 33, /** * @param COND_LOW_PRIMARY_AMMO - no description **/ COND_LOW_PRIMARY_AMMO = 3, /** * @param COND_MOBBED_BY_ENEMIES - no description **/ COND_MOBBED_BY_ENEMIES = 62, /** * @param COND_NEW_ENEMY - no description **/ COND_NEW_ENEMY = 26, /** * @param COND_NO_CUSTOM_INTERRUPTS - no description **/ COND_NO_CUSTOM_INTERRUPTS = 70, /** * @param COND_NO_HEAR_DANGER - no description **/ COND_NO_HEAR_DANGER = 60, /** * @param COND_NO_PRIMARY_AMMO - no description **/ COND_NO_PRIMARY_AMMO = 4, /** * @param COND_NO_SECONDARY_AMMO - no description **/ COND_NO_SECONDARY_AMMO = 5, /** * @param COND_NO_WEAPON - no description **/ COND_NO_WEAPON = 6, /** * @param COND_NONE - No additional conditions are being played **/ COND_NONE = 0, /** * @param COND_NOT_FACING_ATTACK - no description **/ COND_NOT_FACING_ATTACK = 40, /** * @param COND_NPC_FREEZE - Freezes NPC movement **/ COND_NPC_FREEZE = 67, /** * @param COND_NPC_UNFREEZE - Unfreezes NPC movement **/ COND_NPC_UNFREEZE = 68, /** * @param COND_PHYSICS_DAMAGE - no description **/ COND_PHYSICS_DAMAGE = 19, /** * @param COND_PLAYER_ADDED_TO_SQUAD - no description **/ COND_PLAYER_ADDED_TO_SQUAD = 64, /** * @param COND_PLAYER_PUSHING - no description **/ COND_PLAYER_PUSHING = 66, /** * @param COND_PLAYER_REMOVED_FROM_SQUAD - no description **/ COND_PLAYER_REMOVED_FROM_SQUAD = 65, /** * @param COND_PROVOKED - no description **/ COND_PROVOKED = 25, /** * @param COND_RECEIVED_ORDERS - no description **/ COND_RECEIVED_ORDERS = 63, /** * @param COND_REPEATED_DAMAGE - no description **/ COND_REPEATED_DAMAGE = 20, /** * @param COND_SCHEDULE_DONE - no description **/ COND_SCHEDULE_DONE = 36, /** * @param COND_SEE_DISLIKE - no description **/ COND_SEE_DISLIKE = 9, /** * @param COND_SEE_ENEMY - no description **/ COND_SEE_ENEMY = 10, /** * @param COND_SEE_FEAR - no description **/ COND_SEE_FEAR = 8, /** * @param COND_SEE_HATE - no description **/ COND_SEE_HATE = 7, /** * @param COND_SEE_NEMESIS - no description **/ COND_SEE_NEMESIS = 34, /** * @param COND_SEE_PLAYER - no description **/ COND_SEE_PLAYER = 32, /** * @param COND_SMELL - no description **/ COND_SMELL = 37, /** * @param COND_TALKER_RESPOND_TO_QUESTION - no description **/ COND_TALKER_RESPOND_TO_QUESTION = 69, /** * @param COND_TARGET_OCCLUDED - no description **/ COND_TARGET_OCCLUDED = 14, /** * @param COND_TASK_FAILED - no description **/ COND_TASK_FAILED = 35, /** * @param COND_TOO_CLOSE_TO_ATTACK - no description **/ COND_TOO_CLOSE_TO_ATTACK = 38, /** * @param COND_TOO_FAR_TO_ATTACK - no description **/ COND_TOO_FAR_TO_ATTACK = 39, /** * @param COND_WAY_CLEAR - no description **/ COND_WAY_CLEAR = 49, /** * @param COND_WEAPON_BLOCKED_BY_FRIEND - no description **/ COND_WEAPON_BLOCKED_BY_FRIEND = 42, /** * @param COND_WEAPON_HAS_LOS - no description **/ COND_WEAPON_HAS_LOS = 41, /** * @param COND_WEAPON_PLAYER_IN_SPREAD - no description **/ COND_WEAPON_PLAYER_IN_SPREAD = 43, /** * @param COND_WEAPON_PLAYER_NEAR_TARGET - no description **/ COND_WEAPON_PLAYER_NEAR_TARGET = 44, /** * @param COND_WEAPON_SIGHT_OCCLUDED - no description **/ COND_WEAPON_SIGHT_OCCLUDED = 45, } /** * @wiki https://wiki.garrysmod.com/page/Enums/COLLISION GROUP * @enum COLLISION_GROUP * @description Enumerations used by @EntityFuncs:SetCollisionGroup and @EntityFuncs:GetCollisionGroup. * @compileMembersOnly **/ declare enum COLLISION_GROUP { /** * @param COLLISION_GROUP_NONE - Normal **/ COLLISION_GROUP_NONE = 0, /** * @param COLLISION_GROUP_DEBRIS - Collides with nothing but world and static stuff **/ COLLISION_GROUP_DEBRIS = 1, /** * @param COLLISION_GROUP_DEBRIS_TRIGGER - Same as debris, but hits triggers. Useful for an item that can be shot, but doesn't collide. **/ COLLISION_GROUP_DEBRIS_TRIGGER = 2, /** * @param COLLISION_GROUP_INTERACTIVE_DEBRIS - Collides with everything except other interactive debris or debris **/ COLLISION_GROUP_INTERACTIVE_DEBRIS = 3, /** * @param COLLISION_GROUP_INTERACTIVE - Collides with everything except interactive debris or debris **/ COLLISION_GROUP_INTERACTIVE = 4, /** * @param COLLISION_GROUP_PLAYER - no description **/ COLLISION_GROUP_PLAYER = 5, /** * @param COLLISION_GROUP_BREAKABLE_GLASS - NPCs can see straight through an Entity with this applied. **/ COLLISION_GROUP_BREAKABLE_GLASS = 6, /** * @param COLLISION_GROUP_VEHICLE - no description **/ COLLISION_GROUP_VEHICLE = 7, /** * @param COLLISION_GROUP_PLAYER_MOVEMENT - For HL2, same as Collision_Group_Player, for TF2, this filters out other players and CBaseObjects **/ COLLISION_GROUP_PLAYER_MOVEMENT = 8, /** * @param COLLISION_GROUP_NPC - no description **/ COLLISION_GROUP_NPC = 9, /** * @param COLLISION_GROUP_IN_VEHICLE - Doesn't collide with anything, no traces **/ COLLISION_GROUP_IN_VEHICLE = 10, /** * @param COLLISION_GROUP_WEAPON - Doesn't collide with players and vehicles **/ COLLISION_GROUP_WEAPON = 11, /** * @param COLLISION_GROUP_VEHICLE_CLIP - Only collides with vehicles **/ COLLISION_GROUP_VEHICLE_CLIP = 12, /** * @param COLLISION_GROUP_PROJECTILE - no description **/ COLLISION_GROUP_PROJECTILE = 13, /** * @param COLLISION_GROUP_DOOR_BLOCKER - Blocks entities not permitted to get near moving doors **/ COLLISION_GROUP_DOOR_BLOCKER = 14, /** * @param COLLISION_GROUP_PASSABLE_DOOR - Let's the Player through, nothing else. **/ COLLISION_GROUP_PASSABLE_DOOR = 15, /** * @param COLLISION_GROUP_DISSOLVING - Things that are dissolving are in this group **/ COLLISION_GROUP_DISSOLVING = 16, /** * @param COLLISION_GROUP_PUSHAWAY - Nonsolid on client and server, pushaway in player code **/ COLLISION_GROUP_PUSHAWAY = 17, /** * @param COLLISION_GROUP_NPC_ACTOR - no description **/ COLLISION_GROUP_NPC_ACTOR = 18, /** * @param COLLISION_GROUP_NPC_SCRIPTED - no description **/ COLLISION_GROUP_NPC_SCRIPTED = 19, /** * @param COLLISION_GROUP_WORLD - Doesn't collide with players/props **/ COLLISION_GROUP_WORLD = 20, /** * @param LAST_SHARED_COLLISION_GROUP - Amount of COLLISION_GROUP_ enumerations **/ LAST_SHARED_COLLISION_GROUP = 21, } /** * @wiki https://wiki.garrysmod.com/page/Enums/CHAN * @enum CHAN * @description Enumerations used by @EmitSound function and @sound.Add. * @compileMembersOnly **/ declare enum CHAN { /** * @param CHAN_REPLACE - Used when playing sounds through console commands. **/ CHAN_REPLACE = -1, /** * @param CHAN_AUTO - Automatic channel **/ CHAN_AUTO = 0, /** * @param CHAN_WEAPON - Channel for weapon sounds **/ CHAN_WEAPON = 1, /** * @param CHAN_VOICE - Channel for NPC voices **/ CHAN_VOICE = 2, /** * @param CHAN_ITEM - Channel for items ( Health kits, etc ) **/ CHAN_ITEM = 3, /** * @param CHAN_BODY - Clothing, ragdoll impacts, footsteps, knocking/pounding/punching etc. **/ CHAN_BODY = 4, /** * @param CHAN_STREAM - Stream channel from the static or dynamic area **/ CHAN_STREAM = 5, /** * @param CHAN_STATIC - A constant/background sound that doesn't require any reaction. **/ CHAN_STATIC = 6, /** * @param CHAN_VOICE2 - TF2s Announcer dialogue channel **/ CHAN_VOICE2 = 7, /** * @param CHAN_VOICE_BASE - Channel for network voice data **/ CHAN_VOICE_BASE = 8, /** * @param CHAN_USER_BASE - no description **/ CHAN_USER_BASE = 136, } /** * @wiki https://wiki.garrysmod.com/page/Enums/CAP * @enum CAP * @description Enumerations used by @NPC:CapabilitiesAdd, @WeaponHooks:GetCapabilities and @NPC:CapabilitiesGet. Serverside only. * @compileMembersOnly **/ declare enum CAP { /** * @param CAP_SIMPLE_RADIUS_DAMAGE - When hit by an explosion, we'll simply block it instead of spilling it to entities behind us, the sv_robust_explosions cvar can also enable this globally when set to 0 **/ CAP_SIMPLE_RADIUS_DAMAGE = -2147483648, /** * @param CAP_MOVE_GROUND - Walk/Run **/ CAP_MOVE_GROUND = 1, /** * @param CAP_MOVE_JUMP - Jump/Leap **/ CAP_MOVE_JUMP = 2, /** * @param CAP_MOVE_FLY - Can fly move all around **/ CAP_MOVE_FLY = 4, /** * @param CAP_MOVE_CLIMB - climb ladders **/ CAP_MOVE_CLIMB = 8, /** * @param CAP_MOVE_SWIM - no description **/ CAP_MOVE_SWIM = 16, /** * @param CAP_MOVE_CRAWL - no description **/ CAP_MOVE_CRAWL = 32, /** * @param CAP_MOVE_SHOOT - Tries to shoot weapon while moving **/ CAP_MOVE_SHOOT = 64, /** * @param CAP_SKIP_NAV_GROUND_CHECK - no description **/ CAP_SKIP_NAV_GROUND_CHECK = 128, /** * @param CAP_USE - Open doors/push buttons/pull levers **/ CAP_USE = 256, /** * @param CAP_AUTO_DOORS - Can trigger auto doors **/ CAP_AUTO_DOORS = 1024, /** * @param CAP_OPEN_DOORS - Can open manual doors **/ CAP_OPEN_DOORS = 2048, /** * @param CAP_TURN_HEAD - Can turn head always bone controller 0 **/ CAP_TURN_HEAD = 4096, /** * @param CAP_WEAPON_RANGE_ATTACK1 - no description **/ CAP_WEAPON_RANGE_ATTACK1 = 8192, /** * @param CAP_WEAPON_RANGE_ATTACK2 - no description **/ CAP_WEAPON_RANGE_ATTACK2 = 16384, /** * @param CAP_WEAPON_MELEE_ATTACK1 - no description **/ CAP_WEAPON_MELEE_ATTACK1 = 32768, /** * @param CAP_WEAPON_MELEE_ATTACK2 - no description **/ CAP_WEAPON_MELEE_ATTACK2 = 65536, /** * @param CAP_INNATE_RANGE_ATTACK1 - no description **/ CAP_INNATE_RANGE_ATTACK1 = 131072, /** * @param CAP_INNATE_RANGE_ATTACK2 - no description **/ CAP_INNATE_RANGE_ATTACK2 = 262144, /** * @param CAP_INNATE_MELEE_ATTACK1 - no description **/ CAP_INNATE_MELEE_ATTACK1 = 524288, /** * @param CAP_INNATE_MELEE_ATTACK2 - no description **/ CAP_INNATE_MELEE_ATTACK2 = 1048576, /** * @param CAP_USE_WEAPONS - no description **/ CAP_USE_WEAPONS = 2097152, /** * @param CAP_USE_SHOT_REGULATOR - no description **/ CAP_USE_SHOT_REGULATOR = 16777216, /** * @param CAP_ANIMATEDFACE - Has animated eyes/face **/ CAP_ANIMATEDFACE = 8388608, /** * @param CAP_FRIENDLY_DMG_IMMUNE - Don't take damage from npc's that are D_LI **/ CAP_FRIENDLY_DMG_IMMUNE = 33554432, /** * @param CAP_SQUAD - Can form squads **/ CAP_SQUAD = 67108864, /** * @param CAP_DUCK - Cover and Reload ducking **/ CAP_DUCK = 134217728, /** * @param CAP_NO_HIT_PLAYER - Don't hit players **/ CAP_NO_HIT_PLAYER = 268435456, /** * @param CAP_AIM_GUN - Use arms to aim gun, not just body **/ CAP_AIM_GUN = 536870912, /** * @param CAP_NO_HIT_SQUADMATES - no description **/ CAP_NO_HIT_SQUADMATES = 1073741824, } /** * @wiki https://wiki.garrysmod.com/page/Enums/BUTTON CODE * @enum BUTTON_CODE * @description Encompasses the range of @KEY enum, @MOUSE enum and @JOYSTICK enum, all of which can be used by: * * @input.IsButtonDown * * @input.LookupKeyBinding * * @input.GetKeyName * * @input.GetKeyCode * * @GamemodeHooks:PlayerButtonDown * * @GamemodeHooks:PlayerButtonUp * @compileMembersOnly **/ declare enum BUTTON_CODE { /** * @param BUTTON_CODE_INVALID - no description **/ BUTTON_CODE_INVALID = -1, /** * @param BUTTON_CODE_NONE - no description **/ BUTTON_CODE_NONE = 0, /** * @param BUTTON_CODE_LAST - no description **/ BUTTON_CODE_LAST = 171, /** * @param BUTTON_CODE_COUNT - no description **/ BUTTON_CODE_COUNT = 172, } /** * @wiki https://wiki.garrysmod.com/page/Enums/CLASS * @enum CLASS * @description Enumerations used by @NPC:Classify. * @compileMembersOnly **/ declare enum CLASS { /** * @param CLASS_NONE - None - default class for entities. **/ CLASS_NONE = 0, /** * @param CLASS_PLAYER - Players. **/ CLASS_PLAYER = 1, /** * @param CLASS_PLAYER_ALLY - HL2 player allies - monster_barney, npc_citizen, hacked npc_manhack, and friendly npc_turret_floor. **/ CLASS_PLAYER_ALLY = 2, /** * @param CLASS_PLAYER_ALLY_VITAL - HL2 vital player allies - npc_magnusson, npc_gman, npc_fisherman, npc_eli, npc_barney, npc_kleiner, npc_mossman, npc_alyx, npc_monk, npc_dog, and npc_vortigaunt at the end of EP2 (controlled by "MakeGameEndAlly" input). **/ CLASS_PLAYER_ALLY_VITAL = 3, /** * @param CLASS_ANTLION - HL2 antlions - npc_antlion, npc_antlionguard, and npc_ichthyosaur. **/ CLASS_ANTLION = 4, /** * @param CLASS_BARNACLE - HL2 barnacles - npc_barnacle. **/ CLASS_BARNACLE = 5, /** * @param CLASS_BULLSEYE - HL2 bullseyes - npc_bullseye. **/ CLASS_BULLSEYE = 6, /** * @param CLASS_CITIZEN_PASSIVE - HL2 passive/non-rebel citizens - npc_citizen in the beginning of HL2. **/ CLASS_CITIZEN_PASSIVE = 7, /** * @param CLASS_CITIZEN_REBEL - HL2 unused. **/ CLASS_CITIZEN_REBEL = 8, /** * @param CLASS_COMBINE - HL2 combine troops - npc_combine, npc_advisor, apc_missile, npc_apcdriver, hostile npc_turret_floor, hostile npc_rollermine, npc_turret_ground when active, npc_turret_ceiling when active, and npc_strider when active (not being carried by the gunship). **/ CLASS_COMBINE = 9, /** * @param CLASS_COMBINE_GUNSHIP - HL2 combine aircrafts - npc_combinegunship, npc_combinedropship, and npc_helicopter. **/ CLASS_COMBINE_GUNSHIP = 10, /** * @param CLASS_CONSCRIPT - HL2 unused. **/ CLASS_CONSCRIPT = 11, /** * @param CLASS_HEADCRAB - HL2 headcrabs - visible npc_headcrab. **/ CLASS_HEADCRAB = 12, /** * @param CLASS_MANHACK - HL2 manhacks - hostile npc_manhack not held by the gravity gun. **/ CLASS_MANHACK = 13, /** * @param CLASS_METROPOLICE - HL2 metro police - npc_metropolice and npc_vehicledriver. **/ CLASS_METROPOLICE = 14, /** * @param CLASS_MILITARY - HL2 combine military objects - func_guntarget, npc_spotlight, and active npc_combine_camera. **/ CLASS_MILITARY = 15, /** * @param CLASS_SCANNER - HL2 combine scanners - npc_cscanner and npc_clawscanner. **/ CLASS_SCANNER = 16, /** * @param CLASS_STALKER - HL2 stalkers - npc_stalker. **/ CLASS_STALKER = 17, /** * @param CLASS_VORTIGAUNT - HL2 vortigaunts - npc_vortigaunt before the end of EP2 (controlled by "MakeGameEndAlly" input). **/ CLASS_VORTIGAUNT = 18, /** * @param CLASS_ZOMBIE - HL2 zombies - unslumped npc_zombie, npc_poisonzombie, npc_fastzombie, npc_fastzombie_torso, and npc_zombine. **/ CLASS_ZOMBIE = 19, /** * @param CLASS_PROTOSNIPER - HL2 snipers - npc_sniper and proto_sniper. **/ CLASS_PROTOSNIPER = 20, /** * @param CLASS_MISSILE - HL2 missiles - rpg_missile, apc_missile, and grenade_pathfollower. **/ CLASS_MISSILE = 21, /** * @param CLASS_FLARE - HL2 flares - env_flare. **/ CLASS_FLARE = 22, /** * @param CLASS_EARTH_FAUNA - HL2 animals - npc_crow, npc_seagull, and npc_pigeon. **/ CLASS_EARTH_FAUNA = 23, /** * @param CLASS_HACKED_ROLLERMINE - HL2 friendly rollermines - hacked npc_rollermine. **/ CLASS_HACKED_ROLLERMINE = 24, /** * @param CLASS_COMBINE_HUNTER - HL2 hunters - npc_hunter. **/ CLASS_COMBINE_HUNTER = 25, /** * @param CLASS_MACHINE - HL:S turrets - monster_turret, monster_miniturret, monster_sentry. **/ CLASS_MACHINE = 26, /** * @param CLASS_HUMAN_PASSIVE - HL:S friendly humans - monster_scientist. **/ CLASS_HUMAN_PASSIVE = 27, /** * @param CLASS_HUMAN_MILITARY - HL:S human military - monster_human_grunt and monster_apache. **/ CLASS_HUMAN_MILITARY = 28, /** * @param CLASS_ALIEN_MILITARY - HL:S alien military - monster_alien_controller, monster_vortigaunt, monster_alien_grunt, monster_nihilanth, and monster_snark if it has an enemy of class CLASS_PLAYER, CLASS_HUMAN_PASSIVE, or CLASS_HUMAN_MILITARY. **/ CLASS_ALIEN_MILITARY = 29, /** * @param CLASS_ALIEN_MONSTER - HL:S monsters - monster_tentacle, monster_barnacle, monster_zombie, monster_gargantua, monster_houndeye, monster_ichthyosaur, and monster_bigmomma. **/ CLASS_ALIEN_MONSTER = 30, /** * @param CLASS_ALIEN_PREY - HL:S headcrabs - monster_headcrab. **/ CLASS_ALIEN_PREY = 31, /** * @param CLASS_ALIEN_PREDATOR - HL:S alien predators - monster_bullsquid, xen_tree, and xen_hull. **/ CLASS_ALIEN_PREDATOR = 32, /** * @param CLASS_INSECT - HL:S insects - montser_roach and monster_leech. **/ CLASS_INSECT = 33, /** * @param CLASS_PLAYER_BIOWEAPON - HL:S player bioweapons - hornet fired by a player. **/ CLASS_PLAYER_BIOWEAPON = 34, /** * @param CLASS_ALIEN_BIOWEAPON - HL:S enemy bioweapons - hornet fired by anyone but a player, or monster_snark with no enemy or an enemy without the class CLASS_PLAYER, CLASS_HUMAN_PASSIVE, or CLASS_HUMAN_MILITARY. **/ CLASS_ALIEN_BIOWEAPON = 35, } /** * @wiki https://wiki.garrysmod.com/page/Enums/BOX * @enum BOX * @description Enumerations used by @render.SetModelLighting. * @compileMembersOnly **/ declare enum BOX { /** * @param BOX_FRONT - Place the light from the front **/ BOX_FRONT = 0, /** * @param BOX_BACK - Place the light behind **/ BOX_BACK = 1, /** * @param BOX_RIGHT - Place the light to the right **/ BOX_RIGHT = 2, /** * @param BOX_LEFT - Place the light to the left **/ BOX_LEFT = 3, /** * @param BOX_TOP - Place the light to the top **/ BOX_TOP = 4, /** * @param BOX_BOTTOM - Place the light to the bottom **/ BOX_BOTTOM = 5, } /** * @wiki https://wiki.garrysmod.com/page/Enums/BONE * @enum BONE * @description Used by @EntityFuncs:BoneHasFlag. * @compileMembersOnly **/ declare enum BONE { /** * @param BONE_PHYSICALLY_SIMULATED - no description **/ BONE_PHYSICALLY_SIMULATED = 1, /** * @param BONE_PHYSICS_PROCEDURAL - no description **/ BONE_PHYSICS_PROCEDURAL = 2, /** * @param BONE_ALWAYS_PROCEDURAL - no description **/ BONE_ALWAYS_PROCEDURAL = 4, /** * @param BONE_SCREEN_ALIGN_SPHERE - no description **/ BONE_SCREEN_ALIGN_SPHERE = 8, /** * @param BONE_SCREEN_ALIGN_CYLINDER - no description **/ BONE_SCREEN_ALIGN_CYLINDER = 16, /** * @param BONE_CALCULATE_MASK - no description **/ BONE_CALCULATE_MASK = 31, /** * @param BONE_USED_BY_HITBOX - A hitbox is attached to this bone **/ BONE_USED_BY_HITBOX = 256, /** * @param BONE_USED_BY_ATTACHMENT - An attachment is attached to this bone **/ BONE_USED_BY_ATTACHMENT = 512, /** * @param BONE_USED_BY_VERTEX_LOD0 - no description **/ BONE_USED_BY_VERTEX_LOD0 = 1024, /** * @param BONE_USED_BY_VERTEX_LOD1 - no description **/ BONE_USED_BY_VERTEX_LOD1 = 2048, /** * @param BONE_USED_BY_VERTEX_LOD2 - no description **/ BONE_USED_BY_VERTEX_LOD2 = 4096, /** * @param BONE_USED_BY_VERTEX_LOD3 - no description **/ BONE_USED_BY_VERTEX_LOD3 = 8192, /** * @param BONE_USED_BY_VERTEX_LOD4 - no description **/ BONE_USED_BY_VERTEX_LOD4 = 16384, /** * @param BONE_USED_BY_VERTEX_LOD5 - no description **/ BONE_USED_BY_VERTEX_LOD5 = 32768, /** * @param BONE_USED_BY_VERTEX_LOD6 - no description **/ BONE_USED_BY_VERTEX_LOD6 = 65536, /** * @param BONE_USED_BY_VERTEX_LOD7 - no description **/ BONE_USED_BY_VERTEX_LOD7 = 131072, /** * @param BONE_USED_BY_VERTEX_MASK - no description **/ BONE_USED_BY_VERTEX_MASK = 261120, /** * @param BONE_USED_BY_BONE_MERGE - no description **/ BONE_USED_BY_BONE_MERGE = 262144, /** * @param BONE_USED_BY_ANYTHING - Is this bone used by anything?( If any BONE_USED_BY_* flags are true ) **/ BONE_USED_BY_ANYTHING = 524032, /** * @param BONE_USED_MASK - no description **/ BONE_USED_MASK = 524032, } /** * @wiki https://wiki.garrysmod.com/page/Enums/BLOOD COLOR * @enum BLOOD_COLOR * @description Enumerations used by @EntityFuncs:GetBloodColor and @EntityFuncs:SetBloodColor. * @compileMembersOnly **/ declare enum BLOOD_COLOR { /** * @param DONT_BLEED - No blood **/ DONT_BLEED = -1, /** * @param BLOOD_COLOR_RED - Normal red blood **/ BLOOD_COLOR_RED = 0, /** * @param BLOOD_COLOR_YELLOW - Yellow blood **/ BLOOD_COLOR_YELLOW = 1, /** * @param BLOOD_COLOR_GREEN - Green-red blood **/ BLOOD_COLOR_GREEN = 2, /** * @param BLOOD_COLOR_MECH - Sparks **/ BLOOD_COLOR_MECH = 3, /** * @param BLOOD_COLOR_ANTLION - Yellow blood **/ BLOOD_COLOR_ANTLION = 4, /** * @param BLOOD_COLOR_ZOMBIE - Green-red blood **/ BLOOD_COLOR_ZOMBIE = 5, /** * @param BLOOD_COLOR_ANTLION_WORKER - Bright green blood **/ BLOOD_COLOR_ANTLION_WORKER = 6, } /** * @wiki https://wiki.garrysmod.com/page/Enums/BLENDFUNC * @enum BLENDFUNC * @description Used by @render.OverrideBlend. * @compileMembersOnly **/ declare enum BLENDFUNC { /** * @param BLENDFUNC_ADD - no description **/ BLENDFUNC_ADD = 0, /** * @param BLENDFUNC_SUBTRACT - no description **/ BLENDFUNC_SUBTRACT = 1, /** * @param BLENDFUNC_REVERSE_SUBTRACT - no description **/ BLENDFUNC_REVERSE_SUBTRACT = 2, } /** * @wiki https://wiki.garrysmod.com/page/Enums/BLEND * @enum BLEND * @description Used by @render.OverrideBlend to determine how texture RGBA information should be interpreted when rendered. * For more information refer to OpenGL's glBlendFunc page here: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBlendFunc.xhtml * Clientside only. * @compileMembersOnly **/ declare enum BLEND { /** * @param BLEND_ZERO - no description **/ BLEND_ZERO = 0, /** * @param BLEND_ONE - no description **/ BLEND_ONE = 1, /** * @param BLEND_DST_COLOR - no description **/ BLEND_DST_COLOR = 2, /** * @param BLEND_ONE_MINUS_DST_COLOR - no description **/ BLEND_ONE_MINUS_DST_COLOR = 3, /** * @param BLEND_SRC_ALPHA - no description **/ BLEND_SRC_ALPHA = 4, /** * @param BLEND_ONE_MINUS_SRC_ALPHA - no description **/ BLEND_ONE_MINUS_SRC_ALPHA = 5, /** * @param BLEND_DST_ALPHA - no description **/ BLEND_DST_ALPHA = 6, /** * @param BLEND_ONE_MINUS_DST_ALPHA - no description **/ BLEND_ONE_MINUS_DST_ALPHA = 7, /** * @param BLEND_SRC_ALPHA_SATURATE - no description **/ BLEND_SRC_ALPHA_SATURATE = 8, /** * @param BLEND_SRC_COLOR - no description **/ BLEND_SRC_COLOR = 9, /** * @param BLEND_ONE_MINUS_SRC_COLOR - no description **/ BLEND_ONE_MINUS_SRC_COLOR = 10, } /** * @wiki https://wiki.garrysmod.com/page/Enums/AMMO * @note These enumerations do not exist in game and are listed here only for reference! * @enum AMMO * @description Used by @game.AddAmmoType's input structure - the @AmmoData structure. * @compileMembersOnly **/ declare enum AMMO { /** * @param AMMO_FORCE_DROP_IF_CARRIED - Forces player to drop the object they are carrying if the object was hit by this ammo type. **/ AMMO_FORCE_DROP_IF_CARRIED = 1, /** * @param AMMO_INTERPRET_PLRDAMAGE_AS_DAMAGE_TO_PLAYER - Uses [AmmoData](https://wiki.garrysmod.com/page/Structures/AmmoData).plydmg of the ammo type as the damage to deal to shot players instead of [Bullet](https://wiki.garrysmod.com/page/Structures/Bullet).Damage. **/ AMMO_INTERPRET_PLRDAMAGE_AS_DAMAGE_TO_PLAYER = 2, } /** * @wiki https://wiki.garrysmod.com/page/Enums/ACT * @bug #3075 Some activity enums are unlisted since they do not exist as variables in-game, but still link to existing player animations. * @enum ACT * @description Enumerations used by functions like @WeaponFuncs:SendWeaponAnim & @EntityFuncs:SelectWeightedSequence. * @compileMembersOnly **/ declare enum ACT { /** * @param ACT_INVALID - no description **/ ACT_INVALID = -1, /** * @param ACT_RESET - no description **/ ACT_RESET = 0, /** * @param ACT_IDLE - no description **/ ACT_IDLE = 1, /** * @param ACT_TRANSITION - no description **/ ACT_TRANSITION = 2, /** * @param ACT_COVER - no description **/ ACT_COVER = 3, /** * @param ACT_COVER_MED - no description **/ ACT_COVER_MED = 4, /** * @param ACT_COVER_LOW - no description **/ ACT_COVER_LOW = 5, /** * @param ACT_WALK - no description **/ ACT_WALK = 6, /** * @param ACT_WALK_AIM - no description **/ ACT_WALK_AIM = 7, /** * @param ACT_WALK_CROUCH - no description **/ ACT_WALK_CROUCH = 8, /** * @param ACT_WALK_CROUCH_AIM - no description **/ ACT_WALK_CROUCH_AIM = 9, /** * @param ACT_RUN - no description **/ ACT_RUN = 10, /** * @param ACT_RUN_AIM - no description **/ ACT_RUN_AIM = 11, /** * @param ACT_RUN_CROUCH - no description **/ ACT_RUN_CROUCH = 12, /** * @param ACT_RUN_CROUCH_AIM - no description **/ ACT_RUN_CROUCH_AIM = 13, /** * @param ACT_RUN_PROTECTED - no description **/ ACT_RUN_PROTECTED = 14, /** * @param ACT_SCRIPT_CUSTOM_MOVE - no description **/ ACT_SCRIPT_CUSTOM_MOVE = 15, /** * @param ACT_RANGE_ATTACK1 - no description **/ ACT_RANGE_ATTACK1 = 16, /** * @param ACT_RANGE_ATTACK2 - no description **/ ACT_RANGE_ATTACK2 = 17, /** * @param ACT_RANGE_ATTACK1_LOW - no description **/ ACT_RANGE_ATTACK1_LOW = 18, /** * @param ACT_RANGE_ATTACK2_LOW - no description **/ ACT_RANGE_ATTACK2_LOW = 19, /** * @param ACT_DIESIMPLE - no description **/ ACT_DIESIMPLE = 20, /** * @param ACT_DIEBACKWARD - no description **/ ACT_DIEBACKWARD = 21, /** * @param ACT_DIEFORWARD - no description **/ ACT_DIEFORWARD = 22, /** * @param ACT_DIEVIOLENT - no description **/ ACT_DIEVIOLENT = 23, /** * @param ACT_DIERAGDOLL - no description **/ ACT_DIERAGDOLL = 24, /** * @param ACT_FLY - no description **/ ACT_FLY = 25, /** * @param ACT_HOVER - no description **/ ACT_HOVER = 26, /** * @param ACT_GLIDE - no description **/ ACT_GLIDE = 27, /** * @param ACT_SWIM - no description **/ ACT_SWIM = 28, /** * @param ACT_SWIM_IDLE - no description **/ ACT_SWIM_IDLE = 29, /** * @param ACT_JUMP - no description **/ ACT_JUMP = 30, /** * @param ACT_HOP - no description **/ ACT_HOP = 31, /** * @param ACT_LEAP - no description **/ ACT_LEAP = 32, /** * @param ACT_LAND - no description **/ ACT_LAND = 33, /** * @param ACT_CLIMB_UP - no description **/ ACT_CLIMB_UP = 34, /** * @param ACT_CLIMB_DOWN - no description **/ ACT_CLIMB_DOWN = 35, /** * @param ACT_CLIMB_DISMOUNT - no description **/ ACT_CLIMB_DISMOUNT = 36, /** * @param ACT_SHIPLADDER_UP - no description **/ ACT_SHIPLADDER_UP = 37, /** * @param ACT_SHIPLADDER_DOWN - no description **/ ACT_SHIPLADDER_DOWN = 38, /** * @param ACT_STRAFE_LEFT - no description **/ ACT_STRAFE_LEFT = 39, /** * @param ACT_STRAFE_RIGHT - no description **/ ACT_STRAFE_RIGHT = 40, /** * @param ACT_ROLL_LEFT - no description **/ ACT_ROLL_LEFT = 41, /** * @param ACT_ROLL_RIGHT - no description **/ ACT_ROLL_RIGHT = 42, /** * @param ACT_TURN_LEFT - no description **/ ACT_TURN_LEFT = 43, /** * @param ACT_TURN_RIGHT - no description **/ ACT_TURN_RIGHT = 44, /** * @param ACT_CROUCH - no description **/ ACT_CROUCH = 45, /** * @param ACT_CROUCHIDLE - no description **/ ACT_CROUCHIDLE = 46, /** * @param ACT_STAND - no description **/ ACT_STAND = 47, /** * @param ACT_USE - no description **/ ACT_USE = 48, /** * @param ACT_SIGNAL1 - no description **/ ACT_SIGNAL1 = 49, /** * @param ACT_SIGNAL2 - no description **/ ACT_SIGNAL2 = 50, /** * @param ACT_SIGNAL3 - no description **/ ACT_SIGNAL3 = 51, /** * @param ACT_SIGNAL_ADVANCE - no description **/ ACT_SIGNAL_ADVANCE = 52, /** * @param ACT_SIGNAL_FORWARD - no description **/ ACT_SIGNAL_FORWARD = 53, /** * @param ACT_SIGNAL_GROUP - no description **/ ACT_SIGNAL_GROUP = 54, /** * @param ACT_SIGNAL_HALT - no description **/ ACT_SIGNAL_HALT = 55, /** * @param ACT_SIGNAL_LEFT - no description **/ ACT_SIGNAL_LEFT = 56, /** * @param ACT_SIGNAL_RIGHT - no description **/ ACT_SIGNAL_RIGHT = 57, /** * @param ACT_SIGNAL_TAKECOVER - no description **/ ACT_SIGNAL_TAKECOVER = 58, /** * @param ACT_LOOKBACK_RIGHT - no description **/ ACT_LOOKBACK_RIGHT = 59, /** * @param ACT_LOOKBACK_LEFT - no description **/ ACT_LOOKBACK_LEFT = 60, /** * @param ACT_COWER - no description **/ ACT_COWER = 61, /** * @param ACT_SMALL_FLINCH - no description **/ ACT_SMALL_FLINCH = 62, /** * @param ACT_BIG_FLINCH - no description **/ ACT_BIG_FLINCH = 63, /** * @param ACT_MELEE_ATTACK1 - no description **/ ACT_MELEE_ATTACK1 = 64, /** * @param ACT_MELEE_ATTACK2 - no description **/ ACT_MELEE_ATTACK2 = 65, /** * @param ACT_RELOAD - no description **/ ACT_RELOAD = 66, /** * @param ACT_RELOAD_START - no description **/ ACT_RELOAD_START = 67, /** * @param ACT_RELOAD_FINISH - no description **/ ACT_RELOAD_FINISH = 68, /** * @param ACT_RELOAD_LOW - no description **/ ACT_RELOAD_LOW = 69, /** * @param ACT_ARM - no description **/ ACT_ARM = 70, /** * @param ACT_DISARM - no description **/ ACT_DISARM = 71, /** * @param ACT_DROP_WEAPON - no description **/ ACT_DROP_WEAPON = 72, /** * @param ACT_DROP_WEAPON_SHOTGUN - no description **/ ACT_DROP_WEAPON_SHOTGUN = 73, /** * @param ACT_PICKUP_GROUND - no description **/ ACT_PICKUP_GROUND = 74, /** * @param ACT_PICKUP_RACK - no description **/ ACT_PICKUP_RACK = 75, /** * @param ACT_IDLE_ANGRY - no description **/ ACT_IDLE_ANGRY = 76, /** * @param ACT_IDLE_RELAXED - no description **/ ACT_IDLE_RELAXED = 77, /** * @param ACT_IDLE_STIMULATED - no description **/ ACT_IDLE_STIMULATED = 78, /** * @param ACT_IDLE_AGITATED - no description **/ ACT_IDLE_AGITATED = 79, /** * @param ACT_IDLE_STEALTH - no description **/ ACT_IDLE_STEALTH = 80, /** * @param ACT_IDLE_HURT - no description **/ ACT_IDLE_HURT = 81, /** * @param ACT_WALK_RELAXED - no description **/ ACT_WALK_RELAXED = 82, /** * @param ACT_WALK_STIMULATED - no description **/ ACT_WALK_STIMULATED = 83, /** * @param ACT_WALK_AGITATED - no description **/ ACT_WALK_AGITATED = 84, /** * @param ACT_WALK_STEALTH - no description **/ ACT_WALK_STEALTH = 85, /** * @param ACT_RUN_RELAXED - no description **/ ACT_RUN_RELAXED = 86, /** * @param ACT_RUN_STIMULATED - no description **/ ACT_RUN_STIMULATED = 87, /** * @param ACT_RUN_AGITATED - no description **/ ACT_RUN_AGITATED = 88, /** * @param ACT_RUN_STEALTH - no description **/ ACT_RUN_STEALTH = 89, /** * @param ACT_IDLE_AIM_RELAXED - no description **/ ACT_IDLE_AIM_RELAXED = 90, /** * @param ACT_IDLE_AIM_STIMULATED - no description **/ ACT_IDLE_AIM_STIMULATED = 91, /** * @param ACT_IDLE_AIM_AGITATED - no description **/ ACT_IDLE_AIM_AGITATED = 92, /** * @param ACT_IDLE_AIM_STEALTH - no description **/ ACT_IDLE_AIM_STEALTH = 93, /** * @param ACT_WALK_AIM_RELAXED - no description **/ ACT_WALK_AIM_RELAXED = 94, /** * @param ACT_WALK_AIM_STIMULATED - no description **/ ACT_WALK_AIM_STIMULATED = 95, /** * @param ACT_WALK_AIM_AGITATED - no description **/ ACT_WALK_AIM_AGITATED = 96, /** * @param ACT_WALK_AIM_STEALTH - no description **/ ACT_WALK_AIM_STEALTH = 97, /** * @param ACT_RUN_AIM_RELAXED - no description **/ ACT_RUN_AIM_RELAXED = 98, /** * @param ACT_RUN_AIM_STIMULATED - no description **/ ACT_RUN_AIM_STIMULATED = 99, /** * @param ACT_RUN_AIM_AGITATED - no description **/ ACT_RUN_AIM_AGITATED = 100, /** * @param ACT_RUN_AIM_STEALTH - no description **/ ACT_RUN_AIM_STEALTH = 101, /** * @param ACT_CROUCHIDLE_STIMULATED - no description **/ ACT_CROUCHIDLE_STIMULATED = 102, /** * @param ACT_CROUCHIDLE_AIM_STIMULATED - no description **/ ACT_CROUCHIDLE_AIM_STIMULATED = 103, /** * @param ACT_CROUCHIDLE_AGITATED - no description **/ ACT_CROUCHIDLE_AGITATED = 104, /** * @param ACT_WALK_HURT - no description **/ ACT_WALK_HURT = 105, /** * @param ACT_RUN_HURT - no description **/ ACT_RUN_HURT = 106, /** * @param ACT_SPECIAL_ATTACK1 - no description **/ ACT_SPECIAL_ATTACK1 = 107, /** * @param ACT_SPECIAL_ATTACK2 - no description **/ ACT_SPECIAL_ATTACK2 = 108, /** * @param ACT_COMBAT_IDLE - no description **/ ACT_COMBAT_IDLE = 109, /** * @param ACT_WALK_SCARED - no description **/ ACT_WALK_SCARED = 110, /** * @param ACT_RUN_SCARED - no description **/ ACT_RUN_SCARED = 111, /** * @param ACT_VICTORY_DANCE - no description **/ ACT_VICTORY_DANCE = 112, /** * @param ACT_DIE_HEADSHOT - no description **/ ACT_DIE_HEADSHOT = 113, /** * @param ACT_DIE_CHESTSHOT - no description **/ ACT_DIE_CHESTSHOT = 114, /** * @param ACT_DIE_GUTSHOT - no description **/ ACT_DIE_GUTSHOT = 115, /** * @param ACT_DIE_BACKSHOT - no description **/ ACT_DIE_BACKSHOT = 116, /** * @param ACT_FLINCH_HEAD - no description **/ ACT_FLINCH_HEAD = 117, /** * @param ACT_FLINCH_CHEST - no description **/ ACT_FLINCH_CHEST = 118, /** * @param ACT_FLINCH_STOMACH - no description **/ ACT_FLINCH_STOMACH = 119, /** * @param ACT_FLINCH_LEFTARM - no description **/ ACT_FLINCH_LEFTARM = 120, /** * @param ACT_FLINCH_RIGHTARM - no description **/ ACT_FLINCH_RIGHTARM = 121, /** * @param ACT_FLINCH_LEFTLEG - no description **/ ACT_FLINCH_LEFTLEG = 122, /** * @param ACT_FLINCH_RIGHTLEG - no description **/ ACT_FLINCH_RIGHTLEG = 123, /** * @param ACT_FLINCH_PHYSICS - no description **/ ACT_FLINCH_PHYSICS = 124, /** * @param ACT_IDLE_ON_FIRE - no description **/ ACT_IDLE_ON_FIRE = 125, /** * @param ACT_WALK_ON_FIRE - no description **/ ACT_WALK_ON_FIRE = 126, /** * @param ACT_RUN_ON_FIRE - no description **/ ACT_RUN_ON_FIRE = 127, /** * @param ACT_RAPPEL_LOOP - no description **/ ACT_RAPPEL_LOOP = 128, /** * @param ACT_180_LEFT - no description **/ ACT_180_LEFT = 129, /** * @param ACT_180_RIGHT - no description **/ ACT_180_RIGHT = 130, /** * @param ACT_90_LEFT - no description **/ ACT_90_LEFT = 131, /** * @param ACT_90_RIGHT - no description **/ ACT_90_RIGHT = 132, /** * @param ACT_STEP_LEFT - no description **/ ACT_STEP_LEFT = 133, /** * @param ACT_STEP_RIGHT - no description **/ ACT_STEP_RIGHT = 134, /** * @param ACT_STEP_BACK - no description **/ ACT_STEP_BACK = 135, /** * @param ACT_STEP_FORE - no description **/ ACT_STEP_FORE = 136, /** * @param ACT_GESTURE_RANGE_ATTACK1 - no description **/ ACT_GESTURE_RANGE_ATTACK1 = 137, /** * @param ACT_GESTURE_RANGE_ATTACK2 - no description **/ ACT_GESTURE_RANGE_ATTACK2 = 138, /** * @param ACT_GESTURE_MELEE_ATTACK1 - no description **/ ACT_GESTURE_MELEE_ATTACK1 = 139, /** * @param ACT_GESTURE_MELEE_ATTACK2 - no description **/ ACT_GESTURE_MELEE_ATTACK2 = 140, /** * @param ACT_GESTURE_RANGE_ATTACK1_LOW - no description **/ ACT_GESTURE_RANGE_ATTACK1_LOW = 141, /** * @param ACT_GESTURE_RANGE_ATTACK2_LOW - no description **/ ACT_GESTURE_RANGE_ATTACK2_LOW = 142, /** * @param ACT_MELEE_ATTACK_SWING_GESTURE - no description **/ ACT_MELEE_ATTACK_SWING_GESTURE = 143, /** * @param ACT_GESTURE_SMALL_FLINCH - no description **/ ACT_GESTURE_SMALL_FLINCH = 144, /** * @param ACT_GESTURE_BIG_FLINCH - no description **/ ACT_GESTURE_BIG_FLINCH = 145, /** * @param ACT_GESTURE_FLINCH_BLAST - no description **/ ACT_GESTURE_FLINCH_BLAST = 146, /** * @param ACT_GESTURE_FLINCH_BLAST_SHOTGUN - no description **/ ACT_GESTURE_FLINCH_BLAST_SHOTGUN = 147, /** * @param ACT_GESTURE_FLINCH_BLAST_DAMAGED - no description **/ ACT_GESTURE_FLINCH_BLAST_DAMAGED = 148, /** * @param ACT_GESTURE_FLINCH_BLAST_DAMAGED_SHOTGUN - no description **/ ACT_GESTURE_FLINCH_BLAST_DAMAGED_SHOTGUN = 149, /** * @param ACT_GESTURE_FLINCH_HEAD - no description **/ ACT_GESTURE_FLINCH_HEAD = 150, /** * @param ACT_GESTURE_FLINCH_CHEST - no description **/ ACT_GESTURE_FLINCH_CHEST = 151, /** * @param ACT_GESTURE_FLINCH_STOMACH - no description **/ ACT_GESTURE_FLINCH_STOMACH = 152, /** * @param ACT_GESTURE_FLINCH_LEFTARM - no description **/ ACT_GESTURE_FLINCH_LEFTARM = 153, /** * @param ACT_GESTURE_FLINCH_RIGHTARM - no description **/ ACT_GESTURE_FLINCH_RIGHTARM = 154, /** * @param ACT_GESTURE_FLINCH_LEFTLEG - no description **/ ACT_GESTURE_FLINCH_LEFTLEG = 155, /** * @param ACT_GESTURE_FLINCH_RIGHTLEG - no description **/ ACT_GESTURE_FLINCH_RIGHTLEG = 156, /** * @param ACT_GESTURE_TURN_LEFT - no description **/ ACT_GESTURE_TURN_LEFT = 157, /** * @param ACT_GESTURE_TURN_RIGHT - no description **/ ACT_GESTURE_TURN_RIGHT = 158, /** * @param ACT_GESTURE_TURN_LEFT45 - no description **/ ACT_GESTURE_TURN_LEFT45 = 159, /** * @param ACT_GESTURE_TURN_RIGHT45 - no description **/ ACT_GESTURE_TURN_RIGHT45 = 160, /** * @param ACT_GESTURE_TURN_LEFT90 - no description **/ ACT_GESTURE_TURN_LEFT90 = 161, /** * @param ACT_GESTURE_TURN_RIGHT90 - no description **/ ACT_GESTURE_TURN_RIGHT90 = 162, /** * @param ACT_GESTURE_TURN_LEFT45_FLAT - no description **/ ACT_GESTURE_TURN_LEFT45_FLAT = 163, /** * @param ACT_GESTURE_TURN_RIGHT45_FLAT - no description **/ ACT_GESTURE_TURN_RIGHT45_FLAT = 164, /** * @param ACT_GESTURE_TURN_LEFT90_FLAT - no description **/ ACT_GESTURE_TURN_LEFT90_FLAT = 165, /** * @param ACT_GESTURE_TURN_RIGHT90_FLAT - no description **/ ACT_GESTURE_TURN_RIGHT90_FLAT = 166, /** * @param ACT_BARNACLE_HIT - no description **/ ACT_BARNACLE_HIT = 167, /** * @param ACT_BARNACLE_PULL - no description **/ ACT_BARNACLE_PULL = 168, /** * @param ACT_BARNACLE_CHOMP - no description **/ ACT_BARNACLE_CHOMP = 169, /** * @param ACT_BARNACLE_CHEW - no description **/ ACT_BARNACLE_CHEW = 170, /** * @param ACT_DO_NOT_DISTURB - no description **/ ACT_DO_NOT_DISTURB = 171, /** * @param ACT_VM_DRAW - no description **/ ACT_VM_DRAW = 172, /** * @param ACT_VM_HOLSTER - no description **/ ACT_VM_HOLSTER = 173, /** * @param ACT_VM_IDLE - no description **/ ACT_VM_IDLE = 174, /** * @param ACT_VM_FIDGET - no description **/ ACT_VM_FIDGET = 175, /** * @param ACT_VM_PULLBACK - no description **/ ACT_VM_PULLBACK = 176, /** * @param ACT_VM_PULLBACK_HIGH - no description **/ ACT_VM_PULLBACK_HIGH = 177, /** * @param ACT_VM_PULLBACK_LOW - no description **/ ACT_VM_PULLBACK_LOW = 178, /** * @param ACT_VM_THROW - no description **/ ACT_VM_THROW = 179, /** * @param ACT_VM_PULLPIN - no description **/ ACT_VM_PULLPIN = 180, /** * @param ACT_VM_PRIMARYATTACK - no description **/ ACT_VM_PRIMARYATTACK = 181, /** * @param ACT_VM_SECONDARYATTACK - no description **/ ACT_VM_SECONDARYATTACK = 182, /** * @param ACT_VM_RELOAD - no description **/ ACT_VM_RELOAD = 183, /** * @param ACT_VM_DRYFIRE - no description **/ ACT_VM_DRYFIRE = 186, /** * @param ACT_VM_HITLEFT - no description **/ ACT_VM_HITLEFT = 187, /** * @param ACT_VM_HITLEFT2 - no description **/ ACT_VM_HITLEFT2 = 188, /** * @param ACT_VM_HITRIGHT - no description **/ ACT_VM_HITRIGHT = 189, /** * @param ACT_VM_HITRIGHT2 - no description **/ ACT_VM_HITRIGHT2 = 190, /** * @param ACT_VM_HITCENTER - no description **/ ACT_VM_HITCENTER = 191, /** * @param ACT_VM_HITCENTER2 - no description **/ ACT_VM_HITCENTER2 = 192, /** * @param ACT_VM_MISSLEFT - no description **/ ACT_VM_MISSLEFT = 193, /** * @param ACT_VM_MISSLEFT2 - no description **/ ACT_VM_MISSLEFT2 = 194, /** * @param ACT_VM_MISSRIGHT - no description **/ ACT_VM_MISSRIGHT = 195, /** * @param ACT_VM_MISSRIGHT2 - no description **/ ACT_VM_MISSRIGHT2 = 196, /** * @param ACT_VM_MISSCENTER - no description **/ ACT_VM_MISSCENTER = 197, /** * @param ACT_VM_MISSCENTER2 - no description **/ ACT_VM_MISSCENTER2 = 198, /** * @param ACT_VM_HAULBACK - no description **/ ACT_VM_HAULBACK = 199, /** * @param ACT_VM_SWINGHARD - no description **/ ACT_VM_SWINGHARD = 200, /** * @param ACT_VM_SWINGMISS - no description **/ ACT_VM_SWINGMISS = 201, /** * @param ACT_VM_SWINGHIT - no description **/ ACT_VM_SWINGHIT = 202, /** * @param ACT_VM_IDLE_TO_LOWERED - no description **/ ACT_VM_IDLE_TO_LOWERED = 203, /** * @param ACT_VM_IDLE_LOWERED - no description **/ ACT_VM_IDLE_LOWERED = 204, /** * @param ACT_VM_LOWERED_TO_IDLE - no description **/ ACT_VM_LOWERED_TO_IDLE = 205, /** * @param ACT_VM_RECOIL1 - no description **/ ACT_VM_RECOIL1 = 206, /** * @param ACT_VM_RECOIL2 - no description **/ ACT_VM_RECOIL2 = 207, /** * @param ACT_VM_RECOIL3 - no description **/ ACT_VM_RECOIL3 = 208, /** * @param ACT_VM_PICKUP - no description **/ ACT_VM_PICKUP = 209, /** * @param ACT_VM_RELEASE - no description **/ ACT_VM_RELEASE = 210, /** * @param ACT_VM_ATTACH_SILENCER - no description **/ ACT_VM_ATTACH_SILENCER = 211, /** * @param ACT_VM_DETACH_SILENCER - no description **/ ACT_VM_DETACH_SILENCER = 212, /** * @param ACT_SLAM_STICKWALL_IDLE - no description **/ ACT_SLAM_STICKWALL_IDLE = 229, /** * @param ACT_SLAM_STICKWALL_ND_IDLE - no description **/ ACT_SLAM_STICKWALL_ND_IDLE = 230, /** * @param ACT_SLAM_STICKWALL_ATTACH - no description **/ ACT_SLAM_STICKWALL_ATTACH = 231, /** * @param ACT_SLAM_STICKWALL_ATTACH2 - no description **/ ACT_SLAM_STICKWALL_ATTACH2 = 232, /** * @param ACT_SLAM_STICKWALL_ND_ATTACH - no description **/ ACT_SLAM_STICKWALL_ND_ATTACH = 233, /** * @param ACT_SLAM_STICKWALL_ND_ATTACH2 - no description **/ ACT_SLAM_STICKWALL_ND_ATTACH2 = 234, /** * @param ACT_SLAM_STICKWALL_DETONATE - no description **/ ACT_SLAM_STICKWALL_DETONATE = 235, /** * @param ACT_SLAM_STICKWALL_DETONATOR_HOLSTER - no description **/ ACT_SLAM_STICKWALL_DETONATOR_HOLSTER = 236, /** * @param ACT_SLAM_STICKWALL_DRAW - no description **/ ACT_SLAM_STICKWALL_DRAW = 237, /** * @param ACT_SLAM_STICKWALL_ND_DRAW - no description **/ ACT_SLAM_STICKWALL_ND_DRAW = 238, /** * @param ACT_SLAM_STICKWALL_TO_THROW - no description **/ ACT_SLAM_STICKWALL_TO_THROW = 239, /** * @param ACT_SLAM_STICKWALL_TO_THROW_ND - no description **/ ACT_SLAM_STICKWALL_TO_THROW_ND = 240, /** * @param ACT_SLAM_STICKWALL_TO_TRIPMINE_ND - no description **/ ACT_SLAM_STICKWALL_TO_TRIPMINE_ND = 241, /** * @param ACT_SLAM_THROW_IDLE - no description **/ ACT_SLAM_THROW_IDLE = 242, /** * @param ACT_SLAM_THROW_ND_IDLE - no description **/ ACT_SLAM_THROW_ND_IDLE = 243, /** * @param ACT_SLAM_THROW_THROW - no description **/ ACT_SLAM_THROW_THROW = 244, /** * @param ACT_SLAM_THROW_THROW2 - no description **/ ACT_SLAM_THROW_THROW2 = 245, /** * @param ACT_SLAM_THROW_THROW_ND - no description **/ ACT_SLAM_THROW_THROW_ND = 246, /** * @param ACT_SLAM_THROW_THROW_ND2 - no description **/ ACT_SLAM_THROW_THROW_ND2 = 247, /** * @param ACT_SLAM_THROW_DRAW - no description **/ ACT_SLAM_THROW_DRAW = 248, /** * @param ACT_SLAM_THROW_ND_DRAW - no description **/ ACT_SLAM_THROW_ND_DRAW = 249, /** * @param ACT_SLAM_THROW_TO_STICKWALL - no description **/ ACT_SLAM_THROW_TO_STICKWALL = 250, /** * @param ACT_SLAM_THROW_TO_STICKWALL_ND - no description **/ ACT_SLAM_THROW_TO_STICKWALL_ND = 251, /** * @param ACT_SLAM_THROW_DETONATE - no description **/ ACT_SLAM_THROW_DETONATE = 252, /** * @param ACT_SLAM_THROW_DETONATOR_HOLSTER - no description **/ ACT_SLAM_THROW_DETONATOR_HOLSTER = 253, /** * @param ACT_SLAM_THROW_TO_TRIPMINE_ND - no description **/ ACT_SLAM_THROW_TO_TRIPMINE_ND = 254, /** * @param ACT_SLAM_TRIPMINE_IDLE - no description **/ ACT_SLAM_TRIPMINE_IDLE = 255, /** * @param ACT_SLAM_TRIPMINE_DRAW - no description **/ ACT_SLAM_TRIPMINE_DRAW = 256, /** * @param ACT_SLAM_TRIPMINE_ATTACH - no description **/ ACT_SLAM_TRIPMINE_ATTACH = 257, /** * @param ACT_SLAM_TRIPMINE_ATTACH2 - no description **/ ACT_SLAM_TRIPMINE_ATTACH2 = 258, /** * @param ACT_SLAM_TRIPMINE_TO_STICKWALL_ND - no description **/ ACT_SLAM_TRIPMINE_TO_STICKWALL_ND = 259, /** * @param ACT_SLAM_TRIPMINE_TO_THROW_ND - no description **/ ACT_SLAM_TRIPMINE_TO_THROW_ND = 260, /** * @param ACT_SLAM_DETONATOR_IDLE - no description **/ ACT_SLAM_DETONATOR_IDLE = 261, /** * @param ACT_SLAM_DETONATOR_DRAW - no description **/ ACT_SLAM_DETONATOR_DRAW = 262, /** * @param ACT_SLAM_DETONATOR_DETONATE - no description **/ ACT_SLAM_DETONATOR_DETONATE = 263, /** * @param ACT_SLAM_DETONATOR_HOLSTER - no description **/ ACT_SLAM_DETONATOR_HOLSTER = 264, /** * @param ACT_SLAM_DETONATOR_STICKWALL_DRAW - no description **/ ACT_SLAM_DETONATOR_STICKWALL_DRAW = 265, /** * @param ACT_SLAM_DETONATOR_THROW_DRAW - no description **/ ACT_SLAM_DETONATOR_THROW_DRAW = 266, /** * @param ACT_SHOTGUN_RELOAD_START - no description **/ ACT_SHOTGUN_RELOAD_START = 267, /** * @param ACT_SHOTGUN_RELOAD_FINISH - no description **/ ACT_SHOTGUN_RELOAD_FINISH = 268, /** * @param ACT_SHOTGUN_PUMP - no description **/ ACT_SHOTGUN_PUMP = 269, /** * @param ACT_SMG2_IDLE2 - no description **/ ACT_SMG2_IDLE2 = 270, /** * @param ACT_SMG2_FIRE2 - no description **/ ACT_SMG2_FIRE2 = 271, /** * @param ACT_SMG2_DRAW2 - no description **/ ACT_SMG2_DRAW2 = 272, /** * @param ACT_SMG2_RELOAD2 - no description **/ ACT_SMG2_RELOAD2 = 273, /** * @param ACT_SMG2_DRYFIRE2 - no description **/ ACT_SMG2_DRYFIRE2 = 274, /** * @param ACT_SMG2_TOAUTO - no description **/ ACT_SMG2_TOAUTO = 275, /** * @param ACT_SMG2_TOBURST - no description **/ ACT_SMG2_TOBURST = 276, /** * @param ACT_PHYSCANNON_UPGRADE - no description **/ ACT_PHYSCANNON_UPGRADE = 277, /** * @param ACT_RANGE_ATTACK_AR1 - no description **/ ACT_RANGE_ATTACK_AR1 = 278, /** * @param ACT_RANGE_ATTACK_AR2 - no description **/ ACT_RANGE_ATTACK_AR2 = 279, /** * @param ACT_RANGE_ATTACK_AR2_LOW - no description **/ ACT_RANGE_ATTACK_AR2_LOW = 280, /** * @param ACT_RANGE_ATTACK_AR2_GRENADE - no description **/ ACT_RANGE_ATTACK_AR2_GRENADE = 281, /** * @param ACT_RANGE_ATTACK_HMG1 - no description **/ ACT_RANGE_ATTACK_HMG1 = 282, /** * @param ACT_RANGE_ATTACK_ML - no description **/ ACT_RANGE_ATTACK_ML = 283, /** * @param ACT_RANGE_ATTACK_SMG1 - no description **/ ACT_RANGE_ATTACK_SMG1 = 284, /** * @param ACT_RANGE_ATTACK_SMG1_LOW - no description **/ ACT_RANGE_ATTACK_SMG1_LOW = 285, /** * @param ACT_RANGE_ATTACK_SMG2 - no description **/ ACT_RANGE_ATTACK_SMG2 = 286, /** * @param ACT_RANGE_ATTACK_SHOTGUN - no description **/ ACT_RANGE_ATTACK_SHOTGUN = 287, /** * @param ACT_RANGE_ATTACK_SHOTGUN_LOW - no description **/ ACT_RANGE_ATTACK_SHOTGUN_LOW = 288, /** * @param ACT_RANGE_ATTACK_PISTOL - no description **/ ACT_RANGE_ATTACK_PISTOL = 289, /** * @param ACT_RANGE_ATTACK_PISTOL_LOW - no description **/ ACT_RANGE_ATTACK_PISTOL_LOW = 290, /** * @param ACT_RANGE_ATTACK_SLAM - no description **/ ACT_RANGE_ATTACK_SLAM = 291, /** * @param ACT_RANGE_ATTACK_TRIPWIRE - no description **/ ACT_RANGE_ATTACK_TRIPWIRE = 292, /** * @param ACT_RANGE_ATTACK_THROW - no description **/ ACT_RANGE_ATTACK_THROW = 293, /** * @param ACT_RANGE_ATTACK_SNIPER_RIFLE - no description **/ ACT_RANGE_ATTACK_SNIPER_RIFLE = 294, /** * @param ACT_RANGE_ATTACK_RPG - no description **/ ACT_RANGE_ATTACK_RPG = 295, /** * @param ACT_MELEE_ATTACK_SWING - no description **/ ACT_MELEE_ATTACK_SWING = 296, /** * @param ACT_RANGE_AIM_LOW - no description **/ ACT_RANGE_AIM_LOW = 297, /** * @param ACT_RANGE_AIM_SMG1_LOW - no description **/ ACT_RANGE_AIM_SMG1_LOW = 298, /** * @param ACT_RANGE_AIM_PISTOL_LOW - no description **/ ACT_RANGE_AIM_PISTOL_LOW = 299, /** * @param ACT_RANGE_AIM_AR2_LOW - no description **/ ACT_RANGE_AIM_AR2_LOW = 300, /** * @param ACT_COVER_PISTOL_LOW - no description **/ ACT_COVER_PISTOL_LOW = 301, /** * @param ACT_COVER_SMG1_LOW - no description **/ ACT_COVER_SMG1_LOW = 302, /** * @param ACT_GESTURE_RANGE_ATTACK_AR1 - no description **/ ACT_GESTURE_RANGE_ATTACK_AR1 = 303, /** * @param ACT_GESTURE_RANGE_ATTACK_AR2 - no description **/ ACT_GESTURE_RANGE_ATTACK_AR2 = 304, /** * @param ACT_GESTURE_RANGE_ATTACK_AR2_GRENADE - no description **/ ACT_GESTURE_RANGE_ATTACK_AR2_GRENADE = 305, /** * @param ACT_GESTURE_RANGE_ATTACK_HMG1 - no description **/ ACT_GESTURE_RANGE_ATTACK_HMG1 = 306, /** * @param ACT_GESTURE_RANGE_ATTACK_ML - no description **/ ACT_GESTURE_RANGE_ATTACK_ML = 307, /** * @param ACT_GESTURE_RANGE_ATTACK_SMG1 - no description **/ ACT_GESTURE_RANGE_ATTACK_SMG1 = 308, /** * @param ACT_GESTURE_RANGE_ATTACK_SMG1_LOW - no description **/ ACT_GESTURE_RANGE_ATTACK_SMG1_LOW = 309, /** * @param ACT_GESTURE_RANGE_ATTACK_SMG2 - no description **/ ACT_GESTURE_RANGE_ATTACK_SMG2 = 310, /** * @param ACT_GESTURE_RANGE_ATTACK_SHOTGUN - no description **/ ACT_GESTURE_RANGE_ATTACK_SHOTGUN = 311, /** * @param ACT_GESTURE_RANGE_ATTACK_PISTOL - no description **/ ACT_GESTURE_RANGE_ATTACK_PISTOL = 312, /** * @param ACT_GESTURE_RANGE_ATTACK_PISTOL_LOW - no description **/ ACT_GESTURE_RANGE_ATTACK_PISTOL_LOW = 313, /** * @param ACT_GESTURE_RANGE_ATTACK_SLAM - no description **/ ACT_GESTURE_RANGE_ATTACK_SLAM = 314, /** * @param ACT_GESTURE_RANGE_ATTACK_TRIPWIRE - no description **/ ACT_GESTURE_RANGE_ATTACK_TRIPWIRE = 315, /** * @param ACT_GESTURE_RANGE_ATTACK_THROW - no description **/ ACT_GESTURE_RANGE_ATTACK_THROW = 316, /** * @param ACT_GESTURE_RANGE_ATTACK_SNIPER_RIFLE - no description **/ ACT_GESTURE_RANGE_ATTACK_SNIPER_RIFLE = 317, /** * @param ACT_GESTURE_MELEE_ATTACK_SWING - no description **/ ACT_GESTURE_MELEE_ATTACK_SWING = 318, /** * @param ACT_IDLE_RIFLE - no description **/ ACT_IDLE_RIFLE = 319, /** * @param ACT_IDLE_SMG1 - no description **/ ACT_IDLE_SMG1 = 320, /** * @param ACT_IDLE_ANGRY_SMG1 - no description **/ ACT_IDLE_ANGRY_SMG1 = 321, /** * @param ACT_IDLE_PISTOL - no description **/ ACT_IDLE_PISTOL = 322, /** * @param ACT_IDLE_ANGRY_PISTOL - no description **/ ACT_IDLE_ANGRY_PISTOL = 323, /** * @param ACT_IDLE_ANGRY_SHOTGUN - no description **/ ACT_IDLE_ANGRY_SHOTGUN = 324, /** * @param ACT_IDLE_STEALTH_PISTOL - no description **/ ACT_IDLE_STEALTH_PISTOL = 325, /** * @param ACT_IDLE_PACKAGE - no description **/ ACT_IDLE_PACKAGE = 326, /** * @param ACT_WALK_PACKAGE - no description **/ ACT_WALK_PACKAGE = 327, /** * @param ACT_IDLE_SUITCASE - no description **/ ACT_IDLE_SUITCASE = 328, /** * @param ACT_WALK_SUITCASE - no description **/ ACT_WALK_SUITCASE = 329, /** * @param ACT_IDLE_SMG1_RELAXED - no description **/ ACT_IDLE_SMG1_RELAXED = 330, /** * @param ACT_IDLE_SMG1_STIMULATED - no description **/ ACT_IDLE_SMG1_STIMULATED = 331, /** * @param ACT_WALK_RIFLE_RELAXED - no description **/ ACT_WALK_RIFLE_RELAXED = 332, /** * @param ACT_RUN_RIFLE_RELAXED - no description **/ ACT_RUN_RIFLE_RELAXED = 333, /** * @param ACT_WALK_RIFLE_STIMULATED - no description **/ ACT_WALK_RIFLE_STIMULATED = 334, /** * @param ACT_RUN_RIFLE_STIMULATED - no description **/ ACT_RUN_RIFLE_STIMULATED = 335, /** * @param ACT_IDLE_AIM_RIFLE_STIMULATED - no description **/ ACT_IDLE_AIM_RIFLE_STIMULATED = 336, /** * @param ACT_WALK_AIM_RIFLE_STIMULATED - no description **/ ACT_WALK_AIM_RIFLE_STIMULATED = 337, /** * @param ACT_RUN_AIM_RIFLE_STIMULATED - no description **/ ACT_RUN_AIM_RIFLE_STIMULATED = 338, /** * @param ACT_IDLE_SHOTGUN_RELAXED - no description **/ ACT_IDLE_SHOTGUN_RELAXED = 339, /** * @param ACT_IDLE_SHOTGUN_STIMULATED - no description **/ ACT_IDLE_SHOTGUN_STIMULATED = 340, /** * @param ACT_IDLE_SHOTGUN_AGITATED - no description **/ ACT_IDLE_SHOTGUN_AGITATED = 341, /** * @param ACT_WALK_ANGRY - no description **/ ACT_WALK_ANGRY = 342, /** * @param ACT_POLICE_HARASS1 - no description **/ ACT_POLICE_HARASS1 = 343, /** * @param ACT_POLICE_HARASS2 - no description **/ ACT_POLICE_HARASS2 = 344, /** * @param ACT_IDLE_MANNEDGUN - no description **/ ACT_IDLE_MANNEDGUN = 345, /** * @param ACT_IDLE_MELEE - no description **/ ACT_IDLE_MELEE = 346, /** * @param ACT_IDLE_ANGRY_MELEE - no description **/ ACT_IDLE_ANGRY_MELEE = 347, /** * @param ACT_IDLE_RPG_RELAXED - no description **/ ACT_IDLE_RPG_RELAXED = 348, /** * @param ACT_IDLE_RPG - no description **/ ACT_IDLE_RPG = 349, /** * @param ACT_IDLE_ANGRY_RPG - no description **/ ACT_IDLE_ANGRY_RPG = 350, /** * @param ACT_COVER_LOW_RPG - no description **/ ACT_COVER_LOW_RPG = 351, /** * @param ACT_WALK_RPG - no description **/ ACT_WALK_RPG = 352, /** * @param ACT_RUN_RPG - no description **/ ACT_RUN_RPG = 353, /** * @param ACT_WALK_CROUCH_RPG - no description **/ ACT_WALK_CROUCH_RPG = 354, /** * @param ACT_RUN_CROUCH_RPG - no description **/ ACT_RUN_CROUCH_RPG = 355, /** * @param ACT_WALK_RPG_RELAXED - no description **/ ACT_WALK_RPG_RELAXED = 356, /** * @param ACT_RUN_RPG_RELAXED - no description **/ ACT_RUN_RPG_RELAXED = 357, /** * @param ACT_WALK_RIFLE - no description **/ ACT_WALK_RIFLE = 358, /** * @param ACT_WALK_AIM_RIFLE - no description **/ ACT_WALK_AIM_RIFLE = 359, /** * @param ACT_WALK_CROUCH_RIFLE - no description **/ ACT_WALK_CROUCH_RIFLE = 360, /** * @param ACT_WALK_CROUCH_AIM_RIFLE - no description **/ ACT_WALK_CROUCH_AIM_RIFLE = 361, /** * @param ACT_RUN_RIFLE - no description **/ ACT_RUN_RIFLE = 362, /** * @param ACT_RUN_AIM_RIFLE - no description **/ ACT_RUN_AIM_RIFLE = 363, /** * @param ACT_RUN_CROUCH_RIFLE - no description **/ ACT_RUN_CROUCH_RIFLE = 364, /** * @param ACT_RUN_CROUCH_AIM_RIFLE - no description **/ ACT_RUN_CROUCH_AIM_RIFLE = 365, /** * @param ACT_RUN_STEALTH_PISTOL - no description **/ ACT_RUN_STEALTH_PISTOL = 366, /** * @param ACT_WALK_AIM_SHOTGUN - no description **/ ACT_WALK_AIM_SHOTGUN = 367, /** * @param ACT_RUN_AIM_SHOTGUN - no description **/ ACT_RUN_AIM_SHOTGUN = 368, /** * @param ACT_WALK_PISTOL - no description **/ ACT_WALK_PISTOL = 369, /** * @param ACT_RUN_PISTOL - no description **/ ACT_RUN_PISTOL = 370, /** * @param ACT_WALK_AIM_PISTOL - no description **/ ACT_WALK_AIM_PISTOL = 371, /** * @param ACT_RUN_AIM_PISTOL - no description **/ ACT_RUN_AIM_PISTOL = 372, /** * @param ACT_WALK_STEALTH_PISTOL - no description **/ ACT_WALK_STEALTH_PISTOL = 373, /** * @param ACT_WALK_AIM_STEALTH_PISTOL - no description **/ ACT_WALK_AIM_STEALTH_PISTOL = 374, /** * @param ACT_RUN_AIM_STEALTH_PISTOL - no description **/ ACT_RUN_AIM_STEALTH_PISTOL = 375, /** * @param ACT_RELOAD_PISTOL - no description **/ ACT_RELOAD_PISTOL = 376, /** * @param ACT_RELOAD_PISTOL_LOW - no description **/ ACT_RELOAD_PISTOL_LOW = 377, /** * @param ACT_RELOAD_SMG1 - no description **/ ACT_RELOAD_SMG1 = 378, /** * @param ACT_RELOAD_SMG1_LOW - no description **/ ACT_RELOAD_SMG1_LOW = 379, /** * @param ACT_RELOAD_SHOTGUN - no description **/ ACT_RELOAD_SHOTGUN = 380, /** * @param ACT_RELOAD_SHOTGUN_LOW - no description **/ ACT_RELOAD_SHOTGUN_LOW = 381, /** * @param ACT_GESTURE_RELOAD - no description **/ ACT_GESTURE_RELOAD = 382, /** * @param ACT_GESTURE_RELOAD_PISTOL - no description **/ ACT_GESTURE_RELOAD_PISTOL = 383, /** * @param ACT_GESTURE_RELOAD_SMG1 - no description **/ ACT_GESTURE_RELOAD_SMG1 = 384, /** * @param ACT_GESTURE_RELOAD_SHOTGUN - no description **/ ACT_GESTURE_RELOAD_SHOTGUN = 385, /** * @param ACT_BUSY_LEAN_LEFT - no description **/ ACT_BUSY_LEAN_LEFT = 386, /** * @param ACT_BUSY_LEAN_LEFT_ENTRY - no description **/ ACT_BUSY_LEAN_LEFT_ENTRY = 387, /** * @param ACT_BUSY_LEAN_LEFT_EXIT - no description **/ ACT_BUSY_LEAN_LEFT_EXIT = 388, /** * @param ACT_BUSY_LEAN_BACK - no description **/ ACT_BUSY_LEAN_BACK = 389, /** * @param ACT_BUSY_LEAN_BACK_ENTRY - no description **/ ACT_BUSY_LEAN_BACK_ENTRY = 390, /** * @param ACT_BUSY_LEAN_BACK_EXIT - no description **/ ACT_BUSY_LEAN_BACK_EXIT = 391, /** * @param ACT_BUSY_SIT_GROUND - no description **/ ACT_BUSY_SIT_GROUND = 392, /** * @param ACT_BUSY_SIT_GROUND_ENTRY - no description **/ ACT_BUSY_SIT_GROUND_ENTRY = 393, /** * @param ACT_BUSY_SIT_GROUND_EXIT - no description **/ ACT_BUSY_SIT_GROUND_EXIT = 394, /** * @param ACT_BUSY_SIT_CHAIR - no description **/ ACT_BUSY_SIT_CHAIR = 395, /** * @param ACT_BUSY_SIT_CHAIR_ENTRY - no description **/ ACT_BUSY_SIT_CHAIR_ENTRY = 396, /** * @param ACT_BUSY_SIT_CHAIR_EXIT - no description **/ ACT_BUSY_SIT_CHAIR_EXIT = 397, /** * @param ACT_BUSY_STAND - no description **/ ACT_BUSY_STAND = 398, /** * @param ACT_BUSY_QUEUE - no description **/ ACT_BUSY_QUEUE = 399, /** * @param ACT_DUCK_DODGE - no description **/ ACT_DUCK_DODGE = 400, /** * @param ACT_DIE_BARNACLE_SWALLOW - no description **/ ACT_DIE_BARNACLE_SWALLOW = 401, /** * @param ACT_GESTURE_BARNACLE_STRANGLE - no description **/ ACT_GESTURE_BARNACLE_STRANGLE = 402, /** * @param ACT_PHYSCANNON_DETACH - no description **/ ACT_PHYSCANNON_DETACH = 403, /** * @param ACT_PHYSCANNON_ANIMATE - no description **/ ACT_PHYSCANNON_ANIMATE = 404, /** * @param ACT_PHYSCANNON_ANIMATE_PRE - no description **/ ACT_PHYSCANNON_ANIMATE_PRE = 405, /** * @param ACT_PHYSCANNON_ANIMATE_POST - no description **/ ACT_PHYSCANNON_ANIMATE_POST = 406, /** * @param ACT_DIE_FRONTSIDE - no description **/ ACT_DIE_FRONTSIDE = 407, /** * @param ACT_DIE_RIGHTSIDE - no description **/ ACT_DIE_RIGHTSIDE = 408, /** * @param ACT_DIE_BACKSIDE - no description **/ ACT_DIE_BACKSIDE = 409, /** * @param ACT_DIE_LEFTSIDE - no description **/ ACT_DIE_LEFTSIDE = 410, /** * @param ACT_OPEN_DOOR - no description **/ ACT_OPEN_DOOR = 411, /** * @param ACT_DI_ALYX_ZOMBIE_MELEE - no description **/ ACT_DI_ALYX_ZOMBIE_MELEE = 412, /** * @param ACT_DI_ALYX_ZOMBIE_TORSO_MELEE - no description **/ ACT_DI_ALYX_ZOMBIE_TORSO_MELEE = 413, /** * @param ACT_DI_ALYX_HEADCRAB_MELEE - no description **/ ACT_DI_ALYX_HEADCRAB_MELEE = 414, /** * @param ACT_DI_ALYX_ANTLION - no description **/ ACT_DI_ALYX_ANTLION = 415, /** * @param ACT_DI_ALYX_ZOMBIE_SHOTGUN64 - no description **/ ACT_DI_ALYX_ZOMBIE_SHOTGUN64 = 416, /** * @param ACT_DI_ALYX_ZOMBIE_SHOTGUN26 - no description **/ ACT_DI_ALYX_ZOMBIE_SHOTGUN26 = 417, /** * @param ACT_READINESS_RELAXED_TO_STIMULATED - no description **/ ACT_READINESS_RELAXED_TO_STIMULATED = 418, /** * @param ACT_READINESS_RELAXED_TO_STIMULATED_WALK - no description **/ ACT_READINESS_RELAXED_TO_STIMULATED_WALK = 419, /** * @param ACT_READINESS_AGITATED_TO_STIMULATED - no description **/ ACT_READINESS_AGITATED_TO_STIMULATED = 420, /** * @param ACT_READINESS_STIMULATED_TO_RELAXED - no description **/ ACT_READINESS_STIMULATED_TO_RELAXED = 421, /** * @param ACT_READINESS_PISTOL_RELAXED_TO_STIMULATED - no description **/ ACT_READINESS_PISTOL_RELAXED_TO_STIMULATED = 422, /** * @param ACT_READINESS_PISTOL_RELAXED_TO_STIMULATED_WALK - no description **/ ACT_READINESS_PISTOL_RELAXED_TO_STIMULATED_WALK = 423, /** * @param ACT_READINESS_PISTOL_AGITATED_TO_STIMULATED - no description **/ ACT_READINESS_PISTOL_AGITATED_TO_STIMULATED = 424, /** * @param ACT_READINESS_PISTOL_STIMULATED_TO_RELAXED - no description **/ ACT_READINESS_PISTOL_STIMULATED_TO_RELAXED = 425, /** * @param ACT_IDLE_CARRY - no description **/ ACT_IDLE_CARRY = 426, /** * @param ACT_WALK_CARRY - no description **/ ACT_WALK_CARRY = 427, /** * @param ACT_STARTDYING - no description **/ ACT_STARTDYING = 428, /** * @param ACT_DYINGLOOP - no description **/ ACT_DYINGLOOP = 429, /** * @param ACT_DYINGTODEAD - no description **/ ACT_DYINGTODEAD = 430, /** * @param ACT_RIDE_MANNED_GUN - no description **/ ACT_RIDE_MANNED_GUN = 431, /** * @param ACT_VM_SPRINT_ENTER - no description **/ ACT_VM_SPRINT_ENTER = 432, /** * @param ACT_VM_SPRINT_IDLE - no description **/ ACT_VM_SPRINT_IDLE = 433, /** * @param ACT_VM_SPRINT_LEAVE - no description **/ ACT_VM_SPRINT_LEAVE = 434, /** * @param ACT_FIRE_START - no description **/ ACT_FIRE_START = 435, /** * @param ACT_FIRE_LOOP - no description **/ ACT_FIRE_LOOP = 436, /** * @param ACT_FIRE_END - no description **/ ACT_FIRE_END = 437, /** * @param ACT_CROUCHING_GRENADEIDLE - no description **/ ACT_CROUCHING_GRENADEIDLE = 438, /** * @param ACT_CROUCHING_GRENADEREADY - no description **/ ACT_CROUCHING_GRENADEREADY = 439, /** * @param ACT_CROUCHING_PRIMARYATTACK - no description **/ ACT_CROUCHING_PRIMARYATTACK = 440, /** * @param ACT_OVERLAY_GRENADEIDLE - no description **/ ACT_OVERLAY_GRENADEIDLE = 441, /** * @param ACT_OVERLAY_GRENADEREADY - no description **/ ACT_OVERLAY_GRENADEREADY = 442, /** * @param ACT_OVERLAY_PRIMARYATTACK - no description **/ ACT_OVERLAY_PRIMARYATTACK = 443, /** * @param ACT_OVERLAY_SHIELD_UP - no description **/ ACT_OVERLAY_SHIELD_UP = 444, /** * @param ACT_OVERLAY_SHIELD_DOWN - no description **/ ACT_OVERLAY_SHIELD_DOWN = 445, /** * @param ACT_OVERLAY_SHIELD_UP_IDLE - no description **/ ACT_OVERLAY_SHIELD_UP_IDLE = 446, /** * @param ACT_OVERLAY_SHIELD_ATTACK - no description **/ ACT_OVERLAY_SHIELD_ATTACK = 447, /** * @param ACT_OVERLAY_SHIELD_KNOCKBACK - no description **/ ACT_OVERLAY_SHIELD_KNOCKBACK = 448, /** * @param ACT_SHIELD_UP - no description **/ ACT_SHIELD_UP = 449, /** * @param ACT_SHIELD_DOWN - no description **/ ACT_SHIELD_DOWN = 450, /** * @param ACT_SHIELD_UP_IDLE - no description **/ ACT_SHIELD_UP_IDLE = 451, /** * @param ACT_SHIELD_ATTACK - no description **/ ACT_SHIELD_ATTACK = 452, /** * @param ACT_SHIELD_KNOCKBACK - no description **/ ACT_SHIELD_KNOCKBACK = 453, /** * @param ACT_CROUCHING_SHIELD_UP - no description **/ ACT_CROUCHING_SHIELD_UP = 454, /** * @param ACT_CROUCHING_SHIELD_DOWN - no description **/ ACT_CROUCHING_SHIELD_DOWN = 455, /** * @param ACT_CROUCHING_SHIELD_UP_IDLE - no description **/ ACT_CROUCHING_SHIELD_UP_IDLE = 456, /** * @param ACT_CROUCHING_SHIELD_ATTACK - no description **/ ACT_CROUCHING_SHIELD_ATTACK = 457, /** * @param ACT_CROUCHING_SHIELD_KNOCKBACK - no description **/ ACT_CROUCHING_SHIELD_KNOCKBACK = 458, /** * @param ACT_TURNRIGHT45 - no description **/ ACT_TURNRIGHT45 = 459, /** * @param ACT_TURNLEFT45 - no description **/ ACT_TURNLEFT45 = 460, /** * @param ACT_TURN - no description **/ ACT_TURN = 461, /** * @param ACT_OBJ_ASSEMBLING - no description **/ ACT_OBJ_ASSEMBLING = 462, /** * @param ACT_OBJ_DISMANTLING - no description **/ ACT_OBJ_DISMANTLING = 463, /** * @param ACT_OBJ_STARTUP - no description **/ ACT_OBJ_STARTUP = 464, /** * @param ACT_OBJ_RUNNING - no description **/ ACT_OBJ_RUNNING = 465, /** * @param ACT_OBJ_IDLE - no description **/ ACT_OBJ_IDLE = 466, /** * @param ACT_OBJ_PLACING - no description **/ ACT_OBJ_PLACING = 467, /** * @param ACT_OBJ_DETERIORATING - no description **/ ACT_OBJ_DETERIORATING = 468, /** * @param ACT_OBJ_UPGRADING - no description **/ ACT_OBJ_UPGRADING = 469, /** * @param ACT_DEPLOY - no description **/ ACT_DEPLOY = 470, /** * @param ACT_DEPLOY_IDLE - no description **/ ACT_DEPLOY_IDLE = 471, /** * @param ACT_UNDEPLOY - no description **/ ACT_UNDEPLOY = 472, /** * @param ACT_GRENADE_ROLL - no description **/ ACT_GRENADE_ROLL = 473, /** * @param ACT_GRENADE_TOSS - no description **/ ACT_GRENADE_TOSS = 474, /** * @param ACT_HANDGRENADE_THROW1 - no description **/ ACT_HANDGRENADE_THROW1 = 475, /** * @param ACT_HANDGRENADE_THROW2 - no description **/ ACT_HANDGRENADE_THROW2 = 476, /** * @param ACT_HANDGRENADE_THROW3 - no description **/ ACT_HANDGRENADE_THROW3 = 477, /** * @param ACT_SHOTGUN_IDLE_DEEP - no description **/ ACT_SHOTGUN_IDLE_DEEP = 478, /** * @param ACT_SHOTGUN_IDLE4 - no description **/ ACT_SHOTGUN_IDLE4 = 479, /** * @param ACT_GLOCK_SHOOTEMPTY - no description **/ ACT_GLOCK_SHOOTEMPTY = 480, /** * @param ACT_GLOCK_SHOOT_RELOAD - no description **/ ACT_GLOCK_SHOOT_RELOAD = 481, /** * @param ACT_RPG_DRAW_UNLOADED - no description **/ ACT_RPG_DRAW_UNLOADED = 482, /** * @param ACT_RPG_HOLSTER_UNLOADED - no description **/ ACT_RPG_HOLSTER_UNLOADED = 483, /** * @param ACT_RPG_IDLE_UNLOADED - no description **/ ACT_RPG_IDLE_UNLOADED = 484, /** * @param ACT_RPG_FIDGET_UNLOADED - no description **/ ACT_RPG_FIDGET_UNLOADED = 485, /** * @param ACT_CROSSBOW_DRAW_UNLOADED - no description **/ ACT_CROSSBOW_DRAW_UNLOADED = 486, /** * @param ACT_CROSSBOW_IDLE_UNLOADED - no description **/ ACT_CROSSBOW_IDLE_UNLOADED = 487, /** * @param ACT_CROSSBOW_FIDGET_UNLOADED - no description **/ ACT_CROSSBOW_FIDGET_UNLOADED = 488, /** * @param ACT_GAUSS_SPINUP - no description **/ ACT_GAUSS_SPINUP = 489, /** * @param ACT_GAUSS_SPINCYCLE - no description **/ ACT_GAUSS_SPINCYCLE = 490, /** * @param ACT_TRIPMINE_GROUND - no description **/ ACT_TRIPMINE_GROUND = 491, /** * @param ACT_TRIPMINE_WORLD - no description **/ ACT_TRIPMINE_WORLD = 492, /** * @param ACT_VM_PRIMARYATTACK_SILENCED - no description **/ ACT_VM_PRIMARYATTACK_SILENCED = 493, /** * @param ACT_VM_RELOAD_SILENCED - no description **/ ACT_VM_RELOAD_SILENCED = 494, /** * @param ACT_VM_DRYFIRE_SILENCED - no description **/ ACT_VM_DRYFIRE_SILENCED = 495, /** * @param ACT_VM_IDLE_SILENCED - no description **/ ACT_VM_IDLE_SILENCED = 496, /** * @param ACT_VM_DRAW_SILENCED - no description **/ ACT_VM_DRAW_SILENCED = 497, /** * @param ACT_VM_IDLE_EMPTY_LEFT - no description **/ ACT_VM_IDLE_EMPTY_LEFT = 498, /** * @param ACT_VM_DRYFIRE_LEFT - no description **/ ACT_VM_DRYFIRE_LEFT = 499, /** * @param ACT_PLAYER_IDLE_FIRE - no description **/ ACT_PLAYER_IDLE_FIRE = 500, /** * @param ACT_PLAYER_CROUCH_FIRE - no description **/ ACT_PLAYER_CROUCH_FIRE = 501, /** * @param ACT_PLAYER_CROUCH_WALK_FIRE - no description **/ ACT_PLAYER_CROUCH_WALK_FIRE = 502, /** * @param ACT_PLAYER_WALK_FIRE - no description **/ ACT_PLAYER_WALK_FIRE = 503, /** * @param ACT_PLAYER_RUN_FIRE - no description **/ ACT_PLAYER_RUN_FIRE = 504, /** * @param ACT_IDLETORUN - no description **/ ACT_IDLETORUN = 505, /** * @param ACT_RUNTOIDLE - no description **/ ACT_RUNTOIDLE = 506, /** * @param ACT_SPRINT - no description **/ ACT_SPRINT = 507, /** * @param ACT_GET_DOWN_STAND - no description **/ ACT_GET_DOWN_STAND = 508, /** * @param ACT_GET_UP_STAND - no description **/ ACT_GET_UP_STAND = 509, /** * @param ACT_GET_DOWN_CROUCH - no description **/ ACT_GET_DOWN_CROUCH = 510, /** * @param ACT_GET_UP_CROUCH - no description **/ ACT_GET_UP_CROUCH = 511, /** * @param ACT_PRONE_FORWARD - no description **/ ACT_PRONE_FORWARD = 512, /** * @param ACT_PRONE_IDLE - no description **/ ACT_PRONE_IDLE = 513, /** * @param ACT_DEEPIDLE1 - no description **/ ACT_DEEPIDLE1 = 514, /** * @param ACT_DEEPIDLE2 - no description **/ ACT_DEEPIDLE2 = 515, /** * @param ACT_DEEPIDLE3 - no description **/ ACT_DEEPIDLE3 = 516, /** * @param ACT_DEEPIDLE4 - no description **/ ACT_DEEPIDLE4 = 517, /** * @param ACT_VM_RELOAD_DEPLOYED - no description **/ ACT_VM_RELOAD_DEPLOYED = 518, /** * @param ACT_VM_RELOAD_IDLE - no description **/ ACT_VM_RELOAD_IDLE = 519, /** * @param ACT_VM_DRAW_DEPLOYED - no description **/ ACT_VM_DRAW_DEPLOYED = 520, /** * @param ACT_VM_DRAW_EMPTY - no description **/ ACT_VM_DRAW_EMPTY = 521, /** * @param ACT_VM_PRIMARYATTACK_EMPTY - no description **/ ACT_VM_PRIMARYATTACK_EMPTY = 522, /** * @param ACT_VM_RELOAD_EMPTY - no description **/ ACT_VM_RELOAD_EMPTY = 523, /** * @param ACT_VM_IDLE_EMPTY - no description **/ ACT_VM_IDLE_EMPTY = 524, /** * @param ACT_VM_IDLE_DEPLOYED_EMPTY - no description **/ ACT_VM_IDLE_DEPLOYED_EMPTY = 525, /** * @param ACT_VM_IDLE_8 - no description **/ ACT_VM_IDLE_8 = 526, /** * @param ACT_VM_IDLE_7 - no description **/ ACT_VM_IDLE_7 = 527, /** * @param ACT_VM_IDLE_6 - no description **/ ACT_VM_IDLE_6 = 528, /** * @param ACT_VM_IDLE_5 - no description **/ ACT_VM_IDLE_5 = 529, /** * @param ACT_VM_IDLE_4 - no description **/ ACT_VM_IDLE_4 = 530, /** * @param ACT_VM_IDLE_3 - no description **/ ACT_VM_IDLE_3 = 531, /** * @param ACT_VM_IDLE_2 - no description **/ ACT_VM_IDLE_2 = 532, /** * @param ACT_VM_IDLE_1 - no description **/ ACT_VM_IDLE_1 = 533, /** * @param ACT_VM_IDLE_DEPLOYED - no description **/ ACT_VM_IDLE_DEPLOYED = 534, /** * @param ACT_VM_IDLE_DEPLOYED_8 - no description **/ ACT_VM_IDLE_DEPLOYED_8 = 535, /** * @param ACT_VM_IDLE_DEPLOYED_7 - no description **/ ACT_VM_IDLE_DEPLOYED_7 = 536, /** * @param ACT_VM_IDLE_DEPLOYED_6 - no description **/ ACT_VM_IDLE_DEPLOYED_6 = 537, /** * @param ACT_VM_IDLE_DEPLOYED_5 - no description **/ ACT_VM_IDLE_DEPLOYED_5 = 538, /** * @param ACT_VM_IDLE_DEPLOYED_4 - no description **/ ACT_VM_IDLE_DEPLOYED_4 = 539, /** * @param ACT_VM_IDLE_DEPLOYED_3 - no description **/ ACT_VM_IDLE_DEPLOYED_3 = 540, /** * @param ACT_VM_IDLE_DEPLOYED_2 - no description **/ ACT_VM_IDLE_DEPLOYED_2 = 541, /** * @param ACT_VM_IDLE_DEPLOYED_1 - no description **/ ACT_VM_IDLE_DEPLOYED_1 = 542, /** * @param ACT_VM_UNDEPLOY - no description **/ ACT_VM_UNDEPLOY = 543, /** * @param ACT_VM_UNDEPLOY_8 - no description **/ ACT_VM_UNDEPLOY_8 = 544, /** * @param ACT_VM_UNDEPLOY_7 - no description **/ ACT_VM_UNDEPLOY_7 = 545, /** * @param ACT_VM_UNDEPLOY_6 - no description **/ ACT_VM_UNDEPLOY_6 = 546, /** * @param ACT_VM_UNDEPLOY_5 - no description **/ ACT_VM_UNDEPLOY_5 = 547, /** * @param ACT_VM_UNDEPLOY_4 - no description **/ ACT_VM_UNDEPLOY_4 = 548, /** * @param ACT_VM_UNDEPLOY_3 - no description **/ ACT_VM_UNDEPLOY_3 = 549, /** * @param ACT_VM_UNDEPLOY_2 - no description **/ ACT_VM_UNDEPLOY_2 = 550, /** * @param ACT_VM_UNDEPLOY_1 - no description **/ ACT_VM_UNDEPLOY_1 = 551, /** * @param ACT_VM_UNDEPLOY_EMPTY - no description **/ ACT_VM_UNDEPLOY_EMPTY = 552, /** * @param ACT_VM_DEPLOY - no description **/ ACT_VM_DEPLOY = 553, /** * @param ACT_VM_DEPLOY_8 - no description **/ ACT_VM_DEPLOY_8 = 554, /** * @param ACT_VM_DEPLOY_7 - no description **/ ACT_VM_DEPLOY_7 = 555, /** * @param ACT_VM_DEPLOY_6 - no description **/ ACT_VM_DEPLOY_6 = 556, /** * @param ACT_VM_DEPLOY_5 - no description **/ ACT_VM_DEPLOY_5 = 557, /** * @param ACT_VM_DEPLOY_4 - no description **/ ACT_VM_DEPLOY_4 = 558, /** * @param ACT_VM_DEPLOY_3 - no description **/ ACT_VM_DEPLOY_3 = 559, /** * @param ACT_VM_DEPLOY_2 - no description **/ ACT_VM_DEPLOY_2 = 560, /** * @param ACT_VM_DEPLOY_1 - no description **/ ACT_VM_DEPLOY_1 = 561, /** * @param ACT_VM_DEPLOY_EMPTY - no description **/ ACT_VM_DEPLOY_EMPTY = 562, /** * @param ACT_VM_PRIMARYATTACK_8 - no description **/ ACT_VM_PRIMARYATTACK_8 = 563, /** * @param ACT_VM_PRIMARYATTACK_7 - no description **/ ACT_VM_PRIMARYATTACK_7 = 564, /** * @param ACT_VM_PRIMARYATTACK_6 - no description **/ ACT_VM_PRIMARYATTACK_6 = 565, /** * @param ACT_VM_PRIMARYATTACK_5 - no description **/ ACT_VM_PRIMARYATTACK_5 = 566, /** * @param ACT_VM_PRIMARYATTACK_4 - no description **/ ACT_VM_PRIMARYATTACK_4 = 567, /** * @param ACT_VM_PRIMARYATTACK_3 - no description **/ ACT_VM_PRIMARYATTACK_3 = 568, /** * @param ACT_VM_PRIMARYATTACK_2 - no description **/ ACT_VM_PRIMARYATTACK_2 = 569, /** * @param ACT_VM_PRIMARYATTACK_1 - no description **/ ACT_VM_PRIMARYATTACK_1 = 570, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED = 571, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_8 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_8 = 572, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_7 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_7 = 573, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_6 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_6 = 574, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_5 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_5 = 575, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_4 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_4 = 576, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_3 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_3 = 577, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_2 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_2 = 578, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_1 - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_1 = 579, /** * @param ACT_VM_PRIMARYATTACK_DEPLOYED_EMPTY - no description **/ ACT_VM_PRIMARYATTACK_DEPLOYED_EMPTY = 580, /** * @param ACT_DOD_DEPLOYED - no description **/ ACT_DOD_DEPLOYED = 581, /** * @param ACT_DOD_PRONE_DEPLOYED - no description **/ ACT_DOD_PRONE_DEPLOYED = 582, /** * @param ACT_DOD_IDLE_ZOOMED - no description **/ ACT_DOD_IDLE_ZOOMED = 583, /** * @param ACT_DOD_WALK_ZOOMED - no description **/ ACT_DOD_WALK_ZOOMED = 584, /** * @param ACT_DOD_CROUCH_ZOOMED - no description **/ ACT_DOD_CROUCH_ZOOMED = 585, /** * @param ACT_DOD_CROUCHWALK_ZOOMED - no description **/ ACT_DOD_CROUCHWALK_ZOOMED = 586, /** * @param ACT_DOD_PRONE_ZOOMED - no description **/ ACT_DOD_PRONE_ZOOMED = 587, /** * @param ACT_DOD_PRONE_FORWARD_ZOOMED - no description **/ ACT_DOD_PRONE_FORWARD_ZOOMED = 588, /** * @param ACT_DOD_PRIMARYATTACK_DEPLOYED - no description **/ ACT_DOD_PRIMARYATTACK_DEPLOYED = 589, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED = 590, /** * @param ACT_DOD_RELOAD_DEPLOYED - no description **/ ACT_DOD_RELOAD_DEPLOYED = 591, /** * @param ACT_DOD_RELOAD_PRONE_DEPLOYED - no description **/ ACT_DOD_RELOAD_PRONE_DEPLOYED = 592, /** * @param ACT_DOD_PRIMARYATTACK_PRONE - no description **/ ACT_DOD_PRIMARYATTACK_PRONE = 593, /** * @param ACT_DOD_SECONDARYATTACK_PRONE - no description **/ ACT_DOD_SECONDARYATTACK_PRONE = 594, /** * @param ACT_DOD_RELOAD_CROUCH - no description **/ ACT_DOD_RELOAD_CROUCH = 595, /** * @param ACT_DOD_RELOAD_PRONE - no description **/ ACT_DOD_RELOAD_PRONE = 596, /** * @param ACT_DOD_STAND_IDLE - no description **/ ACT_DOD_STAND_IDLE = 597, /** * @param ACT_DOD_STAND_AIM - no description **/ ACT_DOD_STAND_AIM = 598, /** * @param ACT_DOD_CROUCH_IDLE - no description **/ ACT_DOD_CROUCH_IDLE = 599, /** * @param ACT_DOD_CROUCH_AIM - no description **/ ACT_DOD_CROUCH_AIM = 600, /** * @param ACT_DOD_CROUCHWALK_IDLE - no description **/ ACT_DOD_CROUCHWALK_IDLE = 601, /** * @param ACT_DOD_CROUCHWALK_AIM - no description **/ ACT_DOD_CROUCHWALK_AIM = 602, /** * @param ACT_DOD_WALK_IDLE - no description **/ ACT_DOD_WALK_IDLE = 603, /** * @param ACT_DOD_WALK_AIM - no description **/ ACT_DOD_WALK_AIM = 604, /** * @param ACT_DOD_RUN_IDLE - no description **/ ACT_DOD_RUN_IDLE = 605, /** * @param ACT_DOD_RUN_AIM - no description **/ ACT_DOD_RUN_AIM = 606, /** * @param ACT_DOD_STAND_AIM_PISTOL - no description **/ ACT_DOD_STAND_AIM_PISTOL = 607, /** * @param ACT_DOD_CROUCH_AIM_PISTOL - no description **/ ACT_DOD_CROUCH_AIM_PISTOL = 608, /** * @param ACT_DOD_CROUCHWALK_AIM_PISTOL - no description **/ ACT_DOD_CROUCHWALK_AIM_PISTOL = 609, /** * @param ACT_DOD_WALK_AIM_PISTOL - no description **/ ACT_DOD_WALK_AIM_PISTOL = 610, /** * @param ACT_DOD_RUN_AIM_PISTOL - no description **/ ACT_DOD_RUN_AIM_PISTOL = 611, /** * @param ACT_DOD_PRONE_AIM_PISTOL - no description **/ ACT_DOD_PRONE_AIM_PISTOL = 612, /** * @param ACT_DOD_STAND_IDLE_PISTOL - no description **/ ACT_DOD_STAND_IDLE_PISTOL = 613, /** * @param ACT_DOD_CROUCH_IDLE_PISTOL - no description **/ ACT_DOD_CROUCH_IDLE_PISTOL = 614, /** * @param ACT_DOD_CROUCHWALK_IDLE_PISTOL - no description **/ ACT_DOD_CROUCHWALK_IDLE_PISTOL = 615, /** * @param ACT_DOD_WALK_IDLE_PISTOL - no description **/ ACT_DOD_WALK_IDLE_PISTOL = 616, /** * @param ACT_DOD_RUN_IDLE_PISTOL - no description **/ ACT_DOD_RUN_IDLE_PISTOL = 617, /** * @param ACT_DOD_SPRINT_IDLE_PISTOL - no description **/ ACT_DOD_SPRINT_IDLE_PISTOL = 618, /** * @param ACT_DOD_PRONEWALK_IDLE_PISTOL - no description **/ ACT_DOD_PRONEWALK_IDLE_PISTOL = 619, /** * @param ACT_DOD_STAND_AIM_C96 - no description **/ ACT_DOD_STAND_AIM_C96 = 620, /** * @param ACT_DOD_CROUCH_AIM_C96 - no description **/ ACT_DOD_CROUCH_AIM_C96 = 621, /** * @param ACT_DOD_CROUCHWALK_AIM_C96 - no description **/ ACT_DOD_CROUCHWALK_AIM_C96 = 622, /** * @param ACT_DOD_WALK_AIM_C96 - no description **/ ACT_DOD_WALK_AIM_C96 = 623, /** * @param ACT_DOD_RUN_AIM_C96 - no description **/ ACT_DOD_RUN_AIM_C96 = 624, /** * @param ACT_DOD_PRONE_AIM_C96 - no description **/ ACT_DOD_PRONE_AIM_C96 = 625, /** * @param ACT_DOD_STAND_IDLE_C96 - no description **/ ACT_DOD_STAND_IDLE_C96 = 626, /** * @param ACT_DOD_CROUCH_IDLE_C96 - no description **/ ACT_DOD_CROUCH_IDLE_C96 = 627, /** * @param ACT_DOD_CROUCHWALK_IDLE_C96 - no description **/ ACT_DOD_CROUCHWALK_IDLE_C96 = 628, /** * @param ACT_DOD_WALK_IDLE_C96 - no description **/ ACT_DOD_WALK_IDLE_C96 = 629, /** * @param ACT_DOD_RUN_IDLE_C96 - no description **/ ACT_DOD_RUN_IDLE_C96 = 630, /** * @param ACT_DOD_SPRINT_IDLE_C96 - no description **/ ACT_DOD_SPRINT_IDLE_C96 = 631, /** * @param ACT_DOD_PRONEWALK_IDLE_C96 - no description **/ ACT_DOD_PRONEWALK_IDLE_C96 = 632, /** * @param ACT_DOD_STAND_AIM_RIFLE - no description **/ ACT_DOD_STAND_AIM_RIFLE = 633, /** * @param ACT_DOD_CROUCH_AIM_RIFLE - no description **/ ACT_DOD_CROUCH_AIM_RIFLE = 634, /** * @param ACT_DOD_CROUCHWALK_AIM_RIFLE - no description **/ ACT_DOD_CROUCHWALK_AIM_RIFLE = 635, /** * @param ACT_DOD_WALK_AIM_RIFLE - no description **/ ACT_DOD_WALK_AIM_RIFLE = 636, /** * @param ACT_DOD_RUN_AIM_RIFLE - no description **/ ACT_DOD_RUN_AIM_RIFLE = 637, /** * @param ACT_DOD_PRONE_AIM_RIFLE - no description **/ ACT_DOD_PRONE_AIM_RIFLE = 638, /** * @param ACT_DOD_STAND_IDLE_RIFLE - no description **/ ACT_DOD_STAND_IDLE_RIFLE = 639, /** * @param ACT_DOD_CROUCH_IDLE_RIFLE - no description **/ ACT_DOD_CROUCH_IDLE_RIFLE = 640, /** * @param ACT_DOD_CROUCHWALK_IDLE_RIFLE - no description **/ ACT_DOD_CROUCHWALK_IDLE_RIFLE = 641, /** * @param ACT_DOD_WALK_IDLE_RIFLE - no description **/ ACT_DOD_WALK_IDLE_RIFLE = 642, /** * @param ACT_DOD_RUN_IDLE_RIFLE - no description **/ ACT_DOD_RUN_IDLE_RIFLE = 643, /** * @param ACT_DOD_SPRINT_IDLE_RIFLE - no description **/ ACT_DOD_SPRINT_IDLE_RIFLE = 644, /** * @param ACT_DOD_PRONEWALK_IDLE_RIFLE - no description **/ ACT_DOD_PRONEWALK_IDLE_RIFLE = 645, /** * @param ACT_DOD_STAND_AIM_BOLT - no description **/ ACT_DOD_STAND_AIM_BOLT = 646, /** * @param ACT_DOD_CROUCH_AIM_BOLT - no description **/ ACT_DOD_CROUCH_AIM_BOLT = 647, /** * @param ACT_DOD_CROUCHWALK_AIM_BOLT - no description **/ ACT_DOD_CROUCHWALK_AIM_BOLT = 648, /** * @param ACT_DOD_WALK_AIM_BOLT - no description **/ ACT_DOD_WALK_AIM_BOLT = 649, /** * @param ACT_DOD_RUN_AIM_BOLT - no description **/ ACT_DOD_RUN_AIM_BOLT = 650, /** * @param ACT_DOD_PRONE_AIM_BOLT - no description **/ ACT_DOD_PRONE_AIM_BOLT = 651, /** * @param ACT_DOD_STAND_IDLE_BOLT - no description **/ ACT_DOD_STAND_IDLE_BOLT = 652, /** * @param ACT_DOD_CROUCH_IDLE_BOLT - no description **/ ACT_DOD_CROUCH_IDLE_BOLT = 653, /** * @param ACT_DOD_CROUCHWALK_IDLE_BOLT - no description **/ ACT_DOD_CROUCHWALK_IDLE_BOLT = 654, /** * @param ACT_DOD_WALK_IDLE_BOLT - no description **/ ACT_DOD_WALK_IDLE_BOLT = 655, /** * @param ACT_DOD_RUN_IDLE_BOLT - no description **/ ACT_DOD_RUN_IDLE_BOLT = 656, /** * @param ACT_DOD_SPRINT_IDLE_BOLT - no description **/ ACT_DOD_SPRINT_IDLE_BOLT = 657, /** * @param ACT_DOD_PRONEWALK_IDLE_BOLT - no description **/ ACT_DOD_PRONEWALK_IDLE_BOLT = 658, /** * @param ACT_DOD_STAND_AIM_TOMMY - no description **/ ACT_DOD_STAND_AIM_TOMMY = 659, /** * @param ACT_DOD_CROUCH_AIM_TOMMY - no description **/ ACT_DOD_CROUCH_AIM_TOMMY = 660, /** * @param ACT_DOD_CROUCHWALK_AIM_TOMMY - no description **/ ACT_DOD_CROUCHWALK_AIM_TOMMY = 661, /** * @param ACT_DOD_WALK_AIM_TOMMY - no description **/ ACT_DOD_WALK_AIM_TOMMY = 662, /** * @param ACT_DOD_RUN_AIM_TOMMY - no description **/ ACT_DOD_RUN_AIM_TOMMY = 663, /** * @param ACT_DOD_PRONE_AIM_TOMMY - no description **/ ACT_DOD_PRONE_AIM_TOMMY = 664, /** * @param ACT_DOD_STAND_IDLE_TOMMY - no description **/ ACT_DOD_STAND_IDLE_TOMMY = 665, /** * @param ACT_DOD_CROUCH_IDLE_TOMMY - no description **/ ACT_DOD_CROUCH_IDLE_TOMMY = 666, /** * @param ACT_DOD_CROUCHWALK_IDLE_TOMMY - no description **/ ACT_DOD_CROUCHWALK_IDLE_TOMMY = 667, /** * @param ACT_DOD_WALK_IDLE_TOMMY - no description **/ ACT_DOD_WALK_IDLE_TOMMY = 668, /** * @param ACT_DOD_RUN_IDLE_TOMMY - no description **/ ACT_DOD_RUN_IDLE_TOMMY = 669, /** * @param ACT_DOD_SPRINT_IDLE_TOMMY - no description **/ ACT_DOD_SPRINT_IDLE_TOMMY = 670, /** * @param ACT_DOD_PRONEWALK_IDLE_TOMMY - no description **/ ACT_DOD_PRONEWALK_IDLE_TOMMY = 671, /** * @param ACT_DOD_STAND_AIM_MP40 - no description **/ ACT_DOD_STAND_AIM_MP40 = 672, /** * @param ACT_DOD_CROUCH_AIM_MP40 - no description **/ ACT_DOD_CROUCH_AIM_MP40 = 673, /** * @param ACT_DOD_CROUCHWALK_AIM_MP40 - no description **/ ACT_DOD_CROUCHWALK_AIM_MP40 = 674, /** * @param ACT_DOD_WALK_AIM_MP40 - no description **/ ACT_DOD_WALK_AIM_MP40 = 675, /** * @param ACT_DOD_RUN_AIM_MP40 - no description **/ ACT_DOD_RUN_AIM_MP40 = 676, /** * @param ACT_DOD_PRONE_AIM_MP40 - no description **/ ACT_DOD_PRONE_AIM_MP40 = 677, /** * @param ACT_DOD_STAND_IDLE_MP40 - no description **/ ACT_DOD_STAND_IDLE_MP40 = 678, /** * @param ACT_DOD_CROUCH_IDLE_MP40 - no description **/ ACT_DOD_CROUCH_IDLE_MP40 = 679, /** * @param ACT_DOD_CROUCHWALK_IDLE_MP40 - no description **/ ACT_DOD_CROUCHWALK_IDLE_MP40 = 680, /** * @param ACT_DOD_WALK_IDLE_MP40 - no description **/ ACT_DOD_WALK_IDLE_MP40 = 681, /** * @param ACT_DOD_RUN_IDLE_MP40 - no description **/ ACT_DOD_RUN_IDLE_MP40 = 682, /** * @param ACT_DOD_SPRINT_IDLE_MP40 - no description **/ ACT_DOD_SPRINT_IDLE_MP40 = 683, /** * @param ACT_DOD_PRONEWALK_IDLE_MP40 - no description **/ ACT_DOD_PRONEWALK_IDLE_MP40 = 684, /** * @param ACT_DOD_STAND_AIM_MP44 - no description **/ ACT_DOD_STAND_AIM_MP44 = 685, /** * @param ACT_DOD_CROUCH_AIM_MP44 - no description **/ ACT_DOD_CROUCH_AIM_MP44 = 686, /** * @param ACT_DOD_CROUCHWALK_AIM_MP44 - no description **/ ACT_DOD_CROUCHWALK_AIM_MP44 = 687, /** * @param ACT_DOD_WALK_AIM_MP44 - no description **/ ACT_DOD_WALK_AIM_MP44 = 688, /** * @param ACT_DOD_RUN_AIM_MP44 - no description **/ ACT_DOD_RUN_AIM_MP44 = 689, /** * @param ACT_DOD_PRONE_AIM_MP44 - no description **/ ACT_DOD_PRONE_AIM_MP44 = 690, /** * @param ACT_DOD_STAND_IDLE_MP44 - no description **/ ACT_DOD_STAND_IDLE_MP44 = 691, /** * @param ACT_DOD_CROUCH_IDLE_MP44 - no description **/ ACT_DOD_CROUCH_IDLE_MP44 = 692, /** * @param ACT_DOD_CROUCHWALK_IDLE_MP44 - no description **/ ACT_DOD_CROUCHWALK_IDLE_MP44 = 693, /** * @param ACT_DOD_WALK_IDLE_MP44 - no description **/ ACT_DOD_WALK_IDLE_MP44 = 694, /** * @param ACT_DOD_RUN_IDLE_MP44 - no description **/ ACT_DOD_RUN_IDLE_MP44 = 695, /** * @param ACT_DOD_SPRINT_IDLE_MP44 - no description **/ ACT_DOD_SPRINT_IDLE_MP44 = 696, /** * @param ACT_DOD_PRONEWALK_IDLE_MP44 - no description **/ ACT_DOD_PRONEWALK_IDLE_MP44 = 697, /** * @param ACT_DOD_STAND_AIM_GREASE - no description **/ ACT_DOD_STAND_AIM_GREASE = 698, /** * @param ACT_DOD_CROUCH_AIM_GREASE - no description **/ ACT_DOD_CROUCH_AIM_GREASE = 699, /** * @param ACT_DOD_CROUCHWALK_AIM_GREASE - no description **/ ACT_DOD_CROUCHWALK_AIM_GREASE = 700, /** * @param ACT_DOD_WALK_AIM_GREASE - no description **/ ACT_DOD_WALK_AIM_GREASE = 701, /** * @param ACT_DOD_RUN_AIM_GREASE - no description **/ ACT_DOD_RUN_AIM_GREASE = 702, /** * @param ACT_DOD_PRONE_AIM_GREASE - no description **/ ACT_DOD_PRONE_AIM_GREASE = 703, /** * @param ACT_DOD_STAND_IDLE_GREASE - no description **/ ACT_DOD_STAND_IDLE_GREASE = 704, /** * @param ACT_DOD_CROUCH_IDLE_GREASE - no description **/ ACT_DOD_CROUCH_IDLE_GREASE = 705, /** * @param ACT_DOD_CROUCHWALK_IDLE_GREASE - no description **/ ACT_DOD_CROUCHWALK_IDLE_GREASE = 706, /** * @param ACT_DOD_WALK_IDLE_GREASE - no description **/ ACT_DOD_WALK_IDLE_GREASE = 707, /** * @param ACT_DOD_RUN_IDLE_GREASE - no description **/ ACT_DOD_RUN_IDLE_GREASE = 708, /** * @param ACT_DOD_SPRINT_IDLE_GREASE - no description **/ ACT_DOD_SPRINT_IDLE_GREASE = 709, /** * @param ACT_DOD_PRONEWALK_IDLE_GREASE - no description **/ ACT_DOD_PRONEWALK_IDLE_GREASE = 710, /** * @param ACT_DOD_STAND_AIM_MG - no description **/ ACT_DOD_STAND_AIM_MG = 711, /** * @param ACT_DOD_CROUCH_AIM_MG - no description **/ ACT_DOD_CROUCH_AIM_MG = 712, /** * @param ACT_DOD_CROUCHWALK_AIM_MG - no description **/ ACT_DOD_CROUCHWALK_AIM_MG = 713, /** * @param ACT_DOD_WALK_AIM_MG - no description **/ ACT_DOD_WALK_AIM_MG = 714, /** * @param ACT_DOD_RUN_AIM_MG - no description **/ ACT_DOD_RUN_AIM_MG = 715, /** * @param ACT_DOD_PRONE_AIM_MG - no description **/ ACT_DOD_PRONE_AIM_MG = 716, /** * @param ACT_DOD_STAND_IDLE_MG - no description **/ ACT_DOD_STAND_IDLE_MG = 717, /** * @param ACT_DOD_CROUCH_IDLE_MG - no description **/ ACT_DOD_CROUCH_IDLE_MG = 718, /** * @param ACT_DOD_CROUCHWALK_IDLE_MG - no description **/ ACT_DOD_CROUCHWALK_IDLE_MG = 719, /** * @param ACT_DOD_WALK_IDLE_MG - no description **/ ACT_DOD_WALK_IDLE_MG = 720, /** * @param ACT_DOD_RUN_IDLE_MG - no description **/ ACT_DOD_RUN_IDLE_MG = 721, /** * @param ACT_DOD_SPRINT_IDLE_MG - no description **/ ACT_DOD_SPRINT_IDLE_MG = 722, /** * @param ACT_DOD_PRONEWALK_IDLE_MG - no description **/ ACT_DOD_PRONEWALK_IDLE_MG = 723, /** * @param ACT_DOD_STAND_AIM_30CAL - no description **/ ACT_DOD_STAND_AIM_30CAL = 724, /** * @param ACT_DOD_CROUCH_AIM_30CAL - no description **/ ACT_DOD_CROUCH_AIM_30CAL = 725, /** * @param ACT_DOD_CROUCHWALK_AIM_30CAL - no description **/ ACT_DOD_CROUCHWALK_AIM_30CAL = 726, /** * @param ACT_DOD_WALK_AIM_30CAL - no description **/ ACT_DOD_WALK_AIM_30CAL = 727, /** * @param ACT_DOD_RUN_AIM_30CAL - no description **/ ACT_DOD_RUN_AIM_30CAL = 728, /** * @param ACT_DOD_PRONE_AIM_30CAL - no description **/ ACT_DOD_PRONE_AIM_30CAL = 729, /** * @param ACT_DOD_STAND_IDLE_30CAL - no description **/ ACT_DOD_STAND_IDLE_30CAL = 730, /** * @param ACT_DOD_CROUCH_IDLE_30CAL - no description **/ ACT_DOD_CROUCH_IDLE_30CAL = 731, /** * @param ACT_DOD_CROUCHWALK_IDLE_30CAL - no description **/ ACT_DOD_CROUCHWALK_IDLE_30CAL = 732, /** * @param ACT_DOD_WALK_IDLE_30CAL - no description **/ ACT_DOD_WALK_IDLE_30CAL = 733, /** * @param ACT_DOD_RUN_IDLE_30CAL - no description **/ ACT_DOD_RUN_IDLE_30CAL = 734, /** * @param ACT_DOD_SPRINT_IDLE_30CAL - no description **/ ACT_DOD_SPRINT_IDLE_30CAL = 735, /** * @param ACT_DOD_PRONEWALK_IDLE_30CAL - no description **/ ACT_DOD_PRONEWALK_IDLE_30CAL = 736, /** * @param ACT_DOD_STAND_AIM_GREN_FRAG - no description **/ ACT_DOD_STAND_AIM_GREN_FRAG = 737, /** * @param ACT_DOD_CROUCH_AIM_GREN_FRAG - no description **/ ACT_DOD_CROUCH_AIM_GREN_FRAG = 738, /** * @param ACT_DOD_CROUCHWALK_AIM_GREN_FRAG - no description **/ ACT_DOD_CROUCHWALK_AIM_GREN_FRAG = 739, /** * @param ACT_DOD_WALK_AIM_GREN_FRAG - no description **/ ACT_DOD_WALK_AIM_GREN_FRAG = 740, /** * @param ACT_DOD_RUN_AIM_GREN_FRAG - no description **/ ACT_DOD_RUN_AIM_GREN_FRAG = 741, /** * @param ACT_DOD_PRONE_AIM_GREN_FRAG - no description **/ ACT_DOD_PRONE_AIM_GREN_FRAG = 742, /** * @param ACT_DOD_SPRINT_AIM_GREN_FRAG - no description **/ ACT_DOD_SPRINT_AIM_GREN_FRAG = 743, /** * @param ACT_DOD_PRONEWALK_AIM_GREN_FRAG - no description **/ ACT_DOD_PRONEWALK_AIM_GREN_FRAG = 744, /** * @param ACT_DOD_STAND_AIM_GREN_STICK - no description **/ ACT_DOD_STAND_AIM_GREN_STICK = 745, /** * @param ACT_DOD_CROUCH_AIM_GREN_STICK - no description **/ ACT_DOD_CROUCH_AIM_GREN_STICK = 746, /** * @param ACT_DOD_CROUCHWALK_AIM_GREN_STICK - no description **/ ACT_DOD_CROUCHWALK_AIM_GREN_STICK = 747, /** * @param ACT_DOD_WALK_AIM_GREN_STICK - no description **/ ACT_DOD_WALK_AIM_GREN_STICK = 748, /** * @param ACT_DOD_RUN_AIM_GREN_STICK - no description **/ ACT_DOD_RUN_AIM_GREN_STICK = 749, /** * @param ACT_DOD_PRONE_AIM_GREN_STICK - no description **/ ACT_DOD_PRONE_AIM_GREN_STICK = 750, /** * @param ACT_DOD_SPRINT_AIM_GREN_STICK - no description **/ ACT_DOD_SPRINT_AIM_GREN_STICK = 751, /** * @param ACT_DOD_PRONEWALK_AIM_GREN_STICK - no description **/ ACT_DOD_PRONEWALK_AIM_GREN_STICK = 752, /** * @param ACT_DOD_STAND_AIM_KNIFE - no description **/ ACT_DOD_STAND_AIM_KNIFE = 753, /** * @param ACT_DOD_CROUCH_AIM_KNIFE - no description **/ ACT_DOD_CROUCH_AIM_KNIFE = 754, /** * @param ACT_DOD_CROUCHWALK_AIM_KNIFE - no description **/ ACT_DOD_CROUCHWALK_AIM_KNIFE = 755, /** * @param ACT_DOD_WALK_AIM_KNIFE - no description **/ ACT_DOD_WALK_AIM_KNIFE = 756, /** * @param ACT_DOD_RUN_AIM_KNIFE - no description **/ ACT_DOD_RUN_AIM_KNIFE = 757, /** * @param ACT_DOD_PRONE_AIM_KNIFE - no description **/ ACT_DOD_PRONE_AIM_KNIFE = 758, /** * @param ACT_DOD_SPRINT_AIM_KNIFE - no description **/ ACT_DOD_SPRINT_AIM_KNIFE = 759, /** * @param ACT_DOD_PRONEWALK_AIM_KNIFE - no description **/ ACT_DOD_PRONEWALK_AIM_KNIFE = 760, /** * @param ACT_DOD_STAND_AIM_SPADE - no description **/ ACT_DOD_STAND_AIM_SPADE = 761, /** * @param ACT_DOD_CROUCH_AIM_SPADE - no description **/ ACT_DOD_CROUCH_AIM_SPADE = 762, /** * @param ACT_DOD_CROUCHWALK_AIM_SPADE - no description **/ ACT_DOD_CROUCHWALK_AIM_SPADE = 763, /** * @param ACT_DOD_WALK_AIM_SPADE - no description **/ ACT_DOD_WALK_AIM_SPADE = 764, /** * @param ACT_DOD_RUN_AIM_SPADE - no description **/ ACT_DOD_RUN_AIM_SPADE = 765, /** * @param ACT_DOD_PRONE_AIM_SPADE - no description **/ ACT_DOD_PRONE_AIM_SPADE = 766, /** * @param ACT_DOD_SPRINT_AIM_SPADE - no description **/ ACT_DOD_SPRINT_AIM_SPADE = 767, /** * @param ACT_DOD_PRONEWALK_AIM_SPADE - no description **/ ACT_DOD_PRONEWALK_AIM_SPADE = 768, /** * @param ACT_DOD_STAND_AIM_BAZOOKA - no description **/ ACT_DOD_STAND_AIM_BAZOOKA = 769, /** * @param ACT_DOD_CROUCH_AIM_BAZOOKA - no description **/ ACT_DOD_CROUCH_AIM_BAZOOKA = 770, /** * @param ACT_DOD_CROUCHWALK_AIM_BAZOOKA - no description **/ ACT_DOD_CROUCHWALK_AIM_BAZOOKA = 771, /** * @param ACT_DOD_WALK_AIM_BAZOOKA - no description **/ ACT_DOD_WALK_AIM_BAZOOKA = 772, /** * @param ACT_DOD_RUN_AIM_BAZOOKA - no description **/ ACT_DOD_RUN_AIM_BAZOOKA = 773, /** * @param ACT_DOD_PRONE_AIM_BAZOOKA - no description **/ ACT_DOD_PRONE_AIM_BAZOOKA = 774, /** * @param ACT_DOD_STAND_IDLE_BAZOOKA - no description **/ ACT_DOD_STAND_IDLE_BAZOOKA = 775, /** * @param ACT_DOD_CROUCH_IDLE_BAZOOKA - no description **/ ACT_DOD_CROUCH_IDLE_BAZOOKA = 776, /** * @param ACT_DOD_CROUCHWALK_IDLE_BAZOOKA - no description **/ ACT_DOD_CROUCHWALK_IDLE_BAZOOKA = 777, /** * @param ACT_DOD_WALK_IDLE_BAZOOKA - no description **/ ACT_DOD_WALK_IDLE_BAZOOKA = 778, /** * @param ACT_DOD_RUN_IDLE_BAZOOKA - no description **/ ACT_DOD_RUN_IDLE_BAZOOKA = 779, /** * @param ACT_DOD_SPRINT_IDLE_BAZOOKA - no description **/ ACT_DOD_SPRINT_IDLE_BAZOOKA = 780, /** * @param ACT_DOD_PRONEWALK_IDLE_BAZOOKA - no description **/ ACT_DOD_PRONEWALK_IDLE_BAZOOKA = 781, /** * @param ACT_DOD_STAND_AIM_PSCHRECK - no description **/ ACT_DOD_STAND_AIM_PSCHRECK = 782, /** * @param ACT_DOD_CROUCH_AIM_PSCHRECK - no description **/ ACT_DOD_CROUCH_AIM_PSCHRECK = 783, /** * @param ACT_DOD_CROUCHWALK_AIM_PSCHRECK - no description **/ ACT_DOD_CROUCHWALK_AIM_PSCHRECK = 784, /** * @param ACT_DOD_WALK_AIM_PSCHRECK - no description **/ ACT_DOD_WALK_AIM_PSCHRECK = 785, /** * @param ACT_DOD_RUN_AIM_PSCHRECK - no description **/ ACT_DOD_RUN_AIM_PSCHRECK = 786, /** * @param ACT_DOD_PRONE_AIM_PSCHRECK - no description **/ ACT_DOD_PRONE_AIM_PSCHRECK = 787, /** * @param ACT_DOD_STAND_IDLE_PSCHRECK - no description **/ ACT_DOD_STAND_IDLE_PSCHRECK = 788, /** * @param ACT_DOD_CROUCH_IDLE_PSCHRECK - no description **/ ACT_DOD_CROUCH_IDLE_PSCHRECK = 789, /** * @param ACT_DOD_CROUCHWALK_IDLE_PSCHRECK - no description **/ ACT_DOD_CROUCHWALK_IDLE_PSCHRECK = 790, /** * @param ACT_DOD_WALK_IDLE_PSCHRECK - no description **/ ACT_DOD_WALK_IDLE_PSCHRECK = 791, /** * @param ACT_DOD_RUN_IDLE_PSCHRECK - no description **/ ACT_DOD_RUN_IDLE_PSCHRECK = 792, /** * @param ACT_DOD_SPRINT_IDLE_PSCHRECK - no description **/ ACT_DOD_SPRINT_IDLE_PSCHRECK = 793, /** * @param ACT_DOD_PRONEWALK_IDLE_PSCHRECK - no description **/ ACT_DOD_PRONEWALK_IDLE_PSCHRECK = 794, /** * @param ACT_DOD_STAND_AIM_BAR - no description **/ ACT_DOD_STAND_AIM_BAR = 795, /** * @param ACT_DOD_CROUCH_AIM_BAR - no description **/ ACT_DOD_CROUCH_AIM_BAR = 796, /** * @param ACT_DOD_CROUCHWALK_AIM_BAR - no description **/ ACT_DOD_CROUCHWALK_AIM_BAR = 797, /** * @param ACT_DOD_WALK_AIM_BAR - no description **/ ACT_DOD_WALK_AIM_BAR = 798, /** * @param ACT_DOD_RUN_AIM_BAR - no description **/ ACT_DOD_RUN_AIM_BAR = 799, /** * @param ACT_DOD_PRONE_AIM_BAR - no description **/ ACT_DOD_PRONE_AIM_BAR = 800, /** * @param ACT_DOD_STAND_IDLE_BAR - no description **/ ACT_DOD_STAND_IDLE_BAR = 801, /** * @param ACT_DOD_CROUCH_IDLE_BAR - no description **/ ACT_DOD_CROUCH_IDLE_BAR = 802, /** * @param ACT_DOD_CROUCHWALK_IDLE_BAR - no description **/ ACT_DOD_CROUCHWALK_IDLE_BAR = 803, /** * @param ACT_DOD_WALK_IDLE_BAR - no description **/ ACT_DOD_WALK_IDLE_BAR = 804, /** * @param ACT_DOD_RUN_IDLE_BAR - no description **/ ACT_DOD_RUN_IDLE_BAR = 805, /** * @param ACT_DOD_SPRINT_IDLE_BAR - no description **/ ACT_DOD_SPRINT_IDLE_BAR = 806, /** * @param ACT_DOD_PRONEWALK_IDLE_BAR - no description **/ ACT_DOD_PRONEWALK_IDLE_BAR = 807, /** * @param ACT_DOD_STAND_ZOOM_RIFLE - no description **/ ACT_DOD_STAND_ZOOM_RIFLE = 808, /** * @param ACT_DOD_CROUCH_ZOOM_RIFLE - no description **/ ACT_DOD_CROUCH_ZOOM_RIFLE = 809, /** * @param ACT_DOD_CROUCHWALK_ZOOM_RIFLE - no description **/ ACT_DOD_CROUCHWALK_ZOOM_RIFLE = 810, /** * @param ACT_DOD_WALK_ZOOM_RIFLE - no description **/ ACT_DOD_WALK_ZOOM_RIFLE = 811, /** * @param ACT_DOD_RUN_ZOOM_RIFLE - no description **/ ACT_DOD_RUN_ZOOM_RIFLE = 812, /** * @param ACT_DOD_PRONE_ZOOM_RIFLE - no description **/ ACT_DOD_PRONE_ZOOM_RIFLE = 813, /** * @param ACT_DOD_STAND_ZOOM_BOLT - no description **/ ACT_DOD_STAND_ZOOM_BOLT = 814, /** * @param ACT_DOD_CROUCH_ZOOM_BOLT - no description **/ ACT_DOD_CROUCH_ZOOM_BOLT = 815, /** * @param ACT_DOD_CROUCHWALK_ZOOM_BOLT - no description **/ ACT_DOD_CROUCHWALK_ZOOM_BOLT = 816, /** * @param ACT_DOD_WALK_ZOOM_BOLT - no description **/ ACT_DOD_WALK_ZOOM_BOLT = 817, /** * @param ACT_DOD_RUN_ZOOM_BOLT - no description **/ ACT_DOD_RUN_ZOOM_BOLT = 818, /** * @param ACT_DOD_PRONE_ZOOM_BOLT - no description **/ ACT_DOD_PRONE_ZOOM_BOLT = 819, /** * @param ACT_DOD_STAND_ZOOM_BAZOOKA - no description **/ ACT_DOD_STAND_ZOOM_BAZOOKA = 820, /** * @param ACT_DOD_CROUCH_ZOOM_BAZOOKA - no description **/ ACT_DOD_CROUCH_ZOOM_BAZOOKA = 821, /** * @param ACT_DOD_CROUCHWALK_ZOOM_BAZOOKA - no description **/ ACT_DOD_CROUCHWALK_ZOOM_BAZOOKA = 822, /** * @param ACT_DOD_WALK_ZOOM_BAZOOKA - no description **/ ACT_DOD_WALK_ZOOM_BAZOOKA = 823, /** * @param ACT_DOD_RUN_ZOOM_BAZOOKA - no description **/ ACT_DOD_RUN_ZOOM_BAZOOKA = 824, /** * @param ACT_DOD_PRONE_ZOOM_BAZOOKA - no description **/ ACT_DOD_PRONE_ZOOM_BAZOOKA = 825, /** * @param ACT_DOD_STAND_ZOOM_PSCHRECK - no description **/ ACT_DOD_STAND_ZOOM_PSCHRECK = 826, /** * @param ACT_DOD_CROUCH_ZOOM_PSCHRECK - no description **/ ACT_DOD_CROUCH_ZOOM_PSCHRECK = 827, /** * @param ACT_DOD_CROUCHWALK_ZOOM_PSCHRECK - no description **/ ACT_DOD_CROUCHWALK_ZOOM_PSCHRECK = 828, /** * @param ACT_DOD_WALK_ZOOM_PSCHRECK - no description **/ ACT_DOD_WALK_ZOOM_PSCHRECK = 829, /** * @param ACT_DOD_RUN_ZOOM_PSCHRECK - no description **/ ACT_DOD_RUN_ZOOM_PSCHRECK = 830, /** * @param ACT_DOD_PRONE_ZOOM_PSCHRECK - no description **/ ACT_DOD_PRONE_ZOOM_PSCHRECK = 831, /** * @param ACT_DOD_DEPLOY_RIFLE - no description **/ ACT_DOD_DEPLOY_RIFLE = 832, /** * @param ACT_DOD_DEPLOY_TOMMY - no description **/ ACT_DOD_DEPLOY_TOMMY = 833, /** * @param ACT_DOD_DEPLOY_MG - no description **/ ACT_DOD_DEPLOY_MG = 834, /** * @param ACT_DOD_DEPLOY_30CAL - no description **/ ACT_DOD_DEPLOY_30CAL = 835, /** * @param ACT_DOD_PRONE_DEPLOY_RIFLE - no description **/ ACT_DOD_PRONE_DEPLOY_RIFLE = 836, /** * @param ACT_DOD_PRONE_DEPLOY_TOMMY - no description **/ ACT_DOD_PRONE_DEPLOY_TOMMY = 837, /** * @param ACT_DOD_PRONE_DEPLOY_MG - no description **/ ACT_DOD_PRONE_DEPLOY_MG = 838, /** * @param ACT_DOD_PRONE_DEPLOY_30CAL - no description **/ ACT_DOD_PRONE_DEPLOY_30CAL = 839, /** * @param ACT_DOD_PRIMARYATTACK_RIFLE - no description **/ ACT_DOD_PRIMARYATTACK_RIFLE = 840, /** * @param ACT_DOD_SECONDARYATTACK_RIFLE - no description **/ ACT_DOD_SECONDARYATTACK_RIFLE = 841, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_RIFLE - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_RIFLE = 842, /** * @param ACT_DOD_SECONDARYATTACK_PRONE_RIFLE - no description **/ ACT_DOD_SECONDARYATTACK_PRONE_RIFLE = 843, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED_RIFLE - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED_RIFLE = 844, /** * @param ACT_DOD_PRIMARYATTACK_DEPLOYED_RIFLE - no description **/ ACT_DOD_PRIMARYATTACK_DEPLOYED_RIFLE = 845, /** * @param ACT_DOD_PRIMARYATTACK_BOLT - no description **/ ACT_DOD_PRIMARYATTACK_BOLT = 846, /** * @param ACT_DOD_SECONDARYATTACK_BOLT - no description **/ ACT_DOD_SECONDARYATTACK_BOLT = 847, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_BOLT - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_BOLT = 848, /** * @param ACT_DOD_SECONDARYATTACK_PRONE_BOLT - no description **/ ACT_DOD_SECONDARYATTACK_PRONE_BOLT = 849, /** * @param ACT_DOD_PRIMARYATTACK_TOMMY - no description **/ ACT_DOD_PRIMARYATTACK_TOMMY = 850, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_TOMMY - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_TOMMY = 851, /** * @param ACT_DOD_SECONDARYATTACK_TOMMY - no description **/ ACT_DOD_SECONDARYATTACK_TOMMY = 852, /** * @param ACT_DOD_SECONDARYATTACK_PRONE_TOMMY - no description **/ ACT_DOD_SECONDARYATTACK_PRONE_TOMMY = 853, /** * @param ACT_DOD_PRIMARYATTACK_MP40 - no description **/ ACT_DOD_PRIMARYATTACK_MP40 = 854, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_MP40 - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_MP40 = 855, /** * @param ACT_DOD_SECONDARYATTACK_MP40 - no description **/ ACT_DOD_SECONDARYATTACK_MP40 = 856, /** * @param ACT_DOD_SECONDARYATTACK_PRONE_MP40 - no description **/ ACT_DOD_SECONDARYATTACK_PRONE_MP40 = 857, /** * @param ACT_DOD_PRIMARYATTACK_MP44 - no description **/ ACT_DOD_PRIMARYATTACK_MP44 = 858, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_MP44 - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_MP44 = 859, /** * @param ACT_DOD_PRIMARYATTACK_GREASE - no description **/ ACT_DOD_PRIMARYATTACK_GREASE = 860, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_GREASE - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_GREASE = 861, /** * @param ACT_DOD_PRIMARYATTACK_PISTOL - no description **/ ACT_DOD_PRIMARYATTACK_PISTOL = 862, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_PISTOL - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_PISTOL = 863, /** * @param ACT_DOD_PRIMARYATTACK_C96 - no description **/ ACT_DOD_PRIMARYATTACK_C96 = 864, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_C96 - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_C96 = 865, /** * @param ACT_DOD_PRIMARYATTACK_MG - no description **/ ACT_DOD_PRIMARYATTACK_MG = 866, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_MG - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_MG = 867, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED_MG - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED_MG = 868, /** * @param ACT_DOD_PRIMARYATTACK_DEPLOYED_MG - no description **/ ACT_DOD_PRIMARYATTACK_DEPLOYED_MG = 869, /** * @param ACT_DOD_PRIMARYATTACK_30CAL - no description **/ ACT_DOD_PRIMARYATTACK_30CAL = 870, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_30CAL - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_30CAL = 871, /** * @param ACT_DOD_PRIMARYATTACK_DEPLOYED_30CAL - no description **/ ACT_DOD_PRIMARYATTACK_DEPLOYED_30CAL = 872, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED_30CAL - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_DEPLOYED_30CAL = 873, /** * @param ACT_DOD_PRIMARYATTACK_GREN_FRAG - no description **/ ACT_DOD_PRIMARYATTACK_GREN_FRAG = 874, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_GREN_FRAG - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_GREN_FRAG = 875, /** * @param ACT_DOD_PRIMARYATTACK_GREN_STICK - no description **/ ACT_DOD_PRIMARYATTACK_GREN_STICK = 876, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_GREN_STICK - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_GREN_STICK = 877, /** * @param ACT_DOD_PRIMARYATTACK_KNIFE - no description **/ ACT_DOD_PRIMARYATTACK_KNIFE = 878, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_KNIFE - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_KNIFE = 879, /** * @param ACT_DOD_PRIMARYATTACK_SPADE - no description **/ ACT_DOD_PRIMARYATTACK_SPADE = 880, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_SPADE - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_SPADE = 881, /** * @param ACT_DOD_PRIMARYATTACK_BAZOOKA - no description **/ ACT_DOD_PRIMARYATTACK_BAZOOKA = 882, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_BAZOOKA - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_BAZOOKA = 883, /** * @param ACT_DOD_PRIMARYATTACK_PSCHRECK - no description **/ ACT_DOD_PRIMARYATTACK_PSCHRECK = 884, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_PSCHRECK - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_PSCHRECK = 885, /** * @param ACT_DOD_PRIMARYATTACK_BAR - no description **/ ACT_DOD_PRIMARYATTACK_BAR = 886, /** * @param ACT_DOD_PRIMARYATTACK_PRONE_BAR - no description **/ ACT_DOD_PRIMARYATTACK_PRONE_BAR = 887, /** * @param ACT_DOD_RELOAD_GARAND - no description **/ ACT_DOD_RELOAD_GARAND = 888, /** * @param ACT_DOD_RELOAD_K43 - no description **/ ACT_DOD_RELOAD_K43 = 889, /** * @param ACT_DOD_RELOAD_BAR - no description **/ ACT_DOD_RELOAD_BAR = 890, /** * @param ACT_DOD_RELOAD_MP40 - no description **/ ACT_DOD_RELOAD_MP40 = 891, /** * @param ACT_DOD_RELOAD_MP44 - no description **/ ACT_DOD_RELOAD_MP44 = 892, /** * @param ACT_DOD_RELOAD_BOLT - no description **/ ACT_DOD_RELOAD_BOLT = 893, /** * @param ACT_DOD_RELOAD_M1CARBINE - no description **/ ACT_DOD_RELOAD_M1CARBINE = 894, /** * @param ACT_DOD_RELOAD_TOMMY - no description **/ ACT_DOD_RELOAD_TOMMY = 895, /** * @param ACT_DOD_RELOAD_GREASEGUN - no description **/ ACT_DOD_RELOAD_GREASEGUN = 896, /** * @param ACT_DOD_RELOAD_PISTOL - no description **/ ACT_DOD_RELOAD_PISTOL = 897, /** * @param ACT_DOD_RELOAD_FG42 - no description **/ ACT_DOD_RELOAD_FG42 = 898, /** * @param ACT_DOD_RELOAD_RIFLE - no description **/ ACT_DOD_RELOAD_RIFLE = 899, /** * @param ACT_DOD_RELOAD_RIFLEGRENADE - no description **/ ACT_DOD_RELOAD_RIFLEGRENADE = 900, /** * @param ACT_DOD_RELOAD_C96 - no description **/ ACT_DOD_RELOAD_C96 = 901, /** * @param ACT_DOD_RELOAD_CROUCH_BAR - no description **/ ACT_DOD_RELOAD_CROUCH_BAR = 902, /** * @param ACT_DOD_RELOAD_CROUCH_RIFLE - no description **/ ACT_DOD_RELOAD_CROUCH_RIFLE = 903, /** * @param ACT_DOD_RELOAD_CROUCH_RIFLEGRENADE - no description **/ ACT_DOD_RELOAD_CROUCH_RIFLEGRENADE = 904, /** * @param ACT_DOD_RELOAD_CROUCH_BOLT - no description **/ ACT_DOD_RELOAD_CROUCH_BOLT = 905, /** * @param ACT_DOD_RELOAD_CROUCH_MP44 - no description **/ ACT_DOD_RELOAD_CROUCH_MP44 = 906, /** * @param ACT_DOD_RELOAD_CROUCH_MP40 - no description **/ ACT_DOD_RELOAD_CROUCH_MP40 = 907, /** * @param ACT_DOD_RELOAD_CROUCH_TOMMY - no description **/ ACT_DOD_RELOAD_CROUCH_TOMMY = 908, /** * @param ACT_DOD_RELOAD_CROUCH_BAZOOKA - no description **/ ACT_DOD_RELOAD_CROUCH_BAZOOKA = 909, /** * @param ACT_DOD_RELOAD_CROUCH_PSCHRECK - no description **/ ACT_DOD_RELOAD_CROUCH_PSCHRECK = 910, /** * @param ACT_DOD_RELOAD_CROUCH_PISTOL - no description **/ ACT_DOD_RELOAD_CROUCH_PISTOL = 911, /** * @param ACT_DOD_RELOAD_CROUCH_M1CARBINE - no description **/ ACT_DOD_RELOAD_CROUCH_M1CARBINE = 912, /** * @param ACT_DOD_RELOAD_CROUCH_C96 - no description **/ ACT_DOD_RELOAD_CROUCH_C96 = 913, /** * @param ACT_DOD_RELOAD_BAZOOKA - no description **/ ACT_DOD_RELOAD_BAZOOKA = 914, /** * @param ACT_DOD_ZOOMLOAD_BAZOOKA - no description **/ ACT_DOD_ZOOMLOAD_BAZOOKA = 915, /** * @param ACT_DOD_RELOAD_PSCHRECK - no description **/ ACT_DOD_RELOAD_PSCHRECK = 916, /** * @param ACT_DOD_ZOOMLOAD_PSCHRECK - no description **/ ACT_DOD_ZOOMLOAD_PSCHRECK = 917, /** * @param ACT_DOD_RELOAD_DEPLOYED_FG42 - no description **/ ACT_DOD_RELOAD_DEPLOYED_FG42 = 918, /** * @param ACT_DOD_RELOAD_DEPLOYED_30CAL - no description **/ ACT_DOD_RELOAD_DEPLOYED_30CAL = 919, /** * @param ACT_DOD_RELOAD_DEPLOYED_MG - no description **/ ACT_DOD_RELOAD_DEPLOYED_MG = 920, /** * @param ACT_DOD_RELOAD_DEPLOYED_MG34 - no description **/ ACT_DOD_RELOAD_DEPLOYED_MG34 = 921, /** * @param ACT_DOD_RELOAD_DEPLOYED_BAR - no description **/ ACT_DOD_RELOAD_DEPLOYED_BAR = 922, /** * @param ACT_DOD_RELOAD_PRONE_PISTOL - no description **/ ACT_DOD_RELOAD_PRONE_PISTOL = 923, /** * @param ACT_DOD_RELOAD_PRONE_GARAND - no description **/ ACT_DOD_RELOAD_PRONE_GARAND = 924, /** * @param ACT_DOD_RELOAD_PRONE_M1CARBINE - no description **/ ACT_DOD_RELOAD_PRONE_M1CARBINE = 925, /** * @param ACT_DOD_RELOAD_PRONE_BOLT - no description **/ ACT_DOD_RELOAD_PRONE_BOLT = 926, /** * @param ACT_DOD_RELOAD_PRONE_K43 - no description **/ ACT_DOD_RELOAD_PRONE_K43 = 927, /** * @param ACT_DOD_RELOAD_PRONE_MP40 - no description **/ ACT_DOD_RELOAD_PRONE_MP40 = 928, /** * @param ACT_DOD_RELOAD_PRONE_MP44 - no description **/ ACT_DOD_RELOAD_PRONE_MP44 = 929, /** * @param ACT_DOD_RELOAD_PRONE_BAR - no description **/ ACT_DOD_RELOAD_PRONE_BAR = 930, /** * @param ACT_DOD_RELOAD_PRONE_GREASEGUN - no description **/ ACT_DOD_RELOAD_PRONE_GREASEGUN = 931, /** * @param ACT_DOD_RELOAD_PRONE_TOMMY - no description **/ ACT_DOD_RELOAD_PRONE_TOMMY = 932, /** * @param ACT_DOD_RELOAD_PRONE_FG42 - no description **/ ACT_DOD_RELOAD_PRONE_FG42 = 933, /** * @param ACT_DOD_RELOAD_PRONE_RIFLE - no description **/ ACT_DOD_RELOAD_PRONE_RIFLE = 934, /** * @param ACT_DOD_RELOAD_PRONE_RIFLEGRENADE - no description **/ ACT_DOD_RELOAD_PRONE_RIFLEGRENADE = 935, /** * @param ACT_DOD_RELOAD_PRONE_C96 - no description **/ ACT_DOD_RELOAD_PRONE_C96 = 936, /** * @param ACT_DOD_RELOAD_PRONE_BAZOOKA - no description **/ ACT_DOD_RELOAD_PRONE_BAZOOKA = 937, /** * @param ACT_DOD_ZOOMLOAD_PRONE_BAZOOKA - no description **/ ACT_DOD_ZOOMLOAD_PRONE_BAZOOKA = 938, /** * @param ACT_DOD_RELOAD_PRONE_PSCHRECK - no description **/ ACT_DOD_RELOAD_PRONE_PSCHRECK = 939, /** * @param ACT_DOD_ZOOMLOAD_PRONE_PSCHRECK - no description **/ ACT_DOD_ZOOMLOAD_PRONE_PSCHRECK = 940, /** * @param ACT_DOD_RELOAD_PRONE_DEPLOYED_BAR - no description **/ ACT_DOD_RELOAD_PRONE_DEPLOYED_BAR = 941, /** * @param ACT_DOD_RELOAD_PRONE_DEPLOYED_FG42 - no description **/ ACT_DOD_RELOAD_PRONE_DEPLOYED_FG42 = 942, /** * @param ACT_DOD_RELOAD_PRONE_DEPLOYED_30CAL - no description **/ ACT_DOD_RELOAD_PRONE_DEPLOYED_30CAL = 943, /** * @param ACT_DOD_RELOAD_PRONE_DEPLOYED_MG - no description **/ ACT_DOD_RELOAD_PRONE_DEPLOYED_MG = 944, /** * @param ACT_DOD_RELOAD_PRONE_DEPLOYED_MG34 - no description **/ ACT_DOD_RELOAD_PRONE_DEPLOYED_MG34 = 945, /** * @param ACT_DOD_PRONE_ZOOM_FORWARD_RIFLE - no description **/ ACT_DOD_PRONE_ZOOM_FORWARD_RIFLE = 946, /** * @param ACT_DOD_PRONE_ZOOM_FORWARD_BOLT - no description **/ ACT_DOD_PRONE_ZOOM_FORWARD_BOLT = 947, /** * @param ACT_DOD_PRONE_ZOOM_FORWARD_BAZOOKA - no description **/ ACT_DOD_PRONE_ZOOM_FORWARD_BAZOOKA = 948, /** * @param ACT_DOD_PRONE_ZOOM_FORWARD_PSCHRECK - no description **/ ACT_DOD_PRONE_ZOOM_FORWARD_PSCHRECK = 949, /** * @param ACT_DOD_PRIMARYATTACK_CROUCH - no description **/ ACT_DOD_PRIMARYATTACK_CROUCH = 950, /** * @param ACT_DOD_PRIMARYATTACK_CROUCH_SPADE - no description **/ ACT_DOD_PRIMARYATTACK_CROUCH_SPADE = 951, /** * @param ACT_DOD_PRIMARYATTACK_CROUCH_KNIFE - no description **/ ACT_DOD_PRIMARYATTACK_CROUCH_KNIFE = 952, /** * @param ACT_DOD_PRIMARYATTACK_CROUCH_GREN_FRAG - no description **/ ACT_DOD_PRIMARYATTACK_CROUCH_GREN_FRAG = 953, /** * @param ACT_DOD_PRIMARYATTACK_CROUCH_GREN_STICK - no description **/ ACT_DOD_PRIMARYATTACK_CROUCH_GREN_STICK = 954, /** * @param ACT_DOD_SECONDARYATTACK_CROUCH - no description **/ ACT_DOD_SECONDARYATTACK_CROUCH = 955, /** * @param ACT_DOD_SECONDARYATTACK_CROUCH_TOMMY - no description **/ ACT_DOD_SECONDARYATTACK_CROUCH_TOMMY = 956, /** * @param ACT_DOD_SECONDARYATTACK_CROUCH_MP40 - no description **/ ACT_DOD_SECONDARYATTACK_CROUCH_MP40 = 957, /** * @param ACT_DOD_HS_IDLE - no description **/ ACT_DOD_HS_IDLE = 958, /** * @param ACT_DOD_HS_CROUCH - no description **/ ACT_DOD_HS_CROUCH = 959, /** * @param ACT_DOD_HS_IDLE_30CAL - no description **/ ACT_DOD_HS_IDLE_30CAL = 960, /** * @param ACT_DOD_HS_IDLE_BAZOOKA - no description **/ ACT_DOD_HS_IDLE_BAZOOKA = 961, /** * @param ACT_DOD_HS_IDLE_PSCHRECK - no description **/ ACT_DOD_HS_IDLE_PSCHRECK = 962, /** * @param ACT_DOD_HS_IDLE_KNIFE - no description **/ ACT_DOD_HS_IDLE_KNIFE = 963, /** * @param ACT_DOD_HS_IDLE_MG42 - no description **/ ACT_DOD_HS_IDLE_MG42 = 964, /** * @param ACT_DOD_HS_IDLE_PISTOL - no description **/ ACT_DOD_HS_IDLE_PISTOL = 965, /** * @param ACT_DOD_HS_IDLE_STICKGRENADE - no description **/ ACT_DOD_HS_IDLE_STICKGRENADE = 966, /** * @param ACT_DOD_HS_IDLE_TOMMY - no description **/ ACT_DOD_HS_IDLE_TOMMY = 967, /** * @param ACT_DOD_HS_IDLE_MP44 - no description **/ ACT_DOD_HS_IDLE_MP44 = 968, /** * @param ACT_DOD_HS_IDLE_K98 - no description **/ ACT_DOD_HS_IDLE_K98 = 969, /** * @param ACT_DOD_HS_CROUCH_30CAL - no description **/ ACT_DOD_HS_CROUCH_30CAL = 970, /** * @param ACT_DOD_HS_CROUCH_BAZOOKA - no description **/ ACT_DOD_HS_CROUCH_BAZOOKA = 971, /** * @param ACT_DOD_HS_CROUCH_PSCHRECK - no description **/ ACT_DOD_HS_CROUCH_PSCHRECK = 972, /** * @param ACT_DOD_HS_CROUCH_KNIFE - no description **/ ACT_DOD_HS_CROUCH_KNIFE = 973, /** * @param ACT_DOD_HS_CROUCH_MG42 - no description **/ ACT_DOD_HS_CROUCH_MG42 = 974, /** * @param ACT_DOD_HS_CROUCH_PISTOL - no description **/ ACT_DOD_HS_CROUCH_PISTOL = 975, /** * @param ACT_DOD_HS_CROUCH_STICKGRENADE - no description **/ ACT_DOD_HS_CROUCH_STICKGRENADE = 976, /** * @param ACT_DOD_HS_CROUCH_TOMMY - no description **/ ACT_DOD_HS_CROUCH_TOMMY = 977, /** * @param ACT_DOD_HS_CROUCH_MP44 - no description **/ ACT_DOD_HS_CROUCH_MP44 = 978, /** * @param ACT_DOD_HS_CROUCH_K98 - no description **/ ACT_DOD_HS_CROUCH_K98 = 979, /** * @param ACT_DOD_STAND_IDLE_TNT - no description **/ ACT_DOD_STAND_IDLE_TNT = 980, /** * @param ACT_DOD_CROUCH_IDLE_TNT - no description **/ ACT_DOD_CROUCH_IDLE_TNT = 981, /** * @param ACT_DOD_CROUCHWALK_IDLE_TNT - no description **/ ACT_DOD_CROUCHWALK_IDLE_TNT = 982, /** * @param ACT_DOD_WALK_IDLE_TNT - no description **/ ACT_DOD_WALK_IDLE_TNT = 983, /** * @param ACT_DOD_RUN_IDLE_TNT - no description **/ ACT_DOD_RUN_IDLE_TNT = 984, /** * @param ACT_DOD_SPRINT_IDLE_TNT - no description **/ ACT_DOD_SPRINT_IDLE_TNT = 985, /** * @param ACT_DOD_PRONEWALK_IDLE_TNT - no description **/ ACT_DOD_PRONEWALK_IDLE_TNT = 986, /** * @param ACT_DOD_PLANT_TNT - no description **/ ACT_DOD_PLANT_TNT = 987, /** * @param ACT_DOD_DEFUSE_TNT - no description **/ ACT_DOD_DEFUSE_TNT = 988, /** * @param ACT_VM_FIZZLE - no description **/ ACT_VM_FIZZLE = 989, /** * @param ACT_MP_STAND_IDLE - no description **/ ACT_MP_STAND_IDLE = 990, /** * @param ACT_MP_CROUCH_IDLE - no description **/ ACT_MP_CROUCH_IDLE = 991, /** * @param ACT_MP_CROUCH_DEPLOYED_IDLE - no description **/ ACT_MP_CROUCH_DEPLOYED_IDLE = 992, /** * @param ACT_MP_CROUCH_DEPLOYED - no description **/ ACT_MP_CROUCH_DEPLOYED = 993, /** * @param ACT_MP_DEPLOYED_IDLE - no description **/ ACT_MP_DEPLOYED_IDLE = 995, /** * @param ACT_MP_RUN - no description **/ ACT_MP_RUN = 996, /** * @param ACT_MP_WALK - no description **/ ACT_MP_WALK = 997, /** * @param ACT_MP_AIRWALK - no description **/ ACT_MP_AIRWALK = 998, /** * @param ACT_MP_CROUCHWALK - no description **/ ACT_MP_CROUCHWALK = 999, /** * @param ACT_MP_SPRINT - no description **/ ACT_MP_SPRINT = 1000, /** * @param ACT_MP_JUMP - no description **/ ACT_MP_JUMP = 1001, /** * @param ACT_MP_JUMP_START - no description **/ ACT_MP_JUMP_START = 1002, /** * @param ACT_MP_JUMP_FLOAT - no description **/ ACT_MP_JUMP_FLOAT = 1003, /** * @param ACT_MP_JUMP_LAND - no description **/ ACT_MP_JUMP_LAND = 1004, /** * @param ACT_MP_DOUBLEJUMP - no description **/ ACT_MP_DOUBLEJUMP = 1005, /** * @param ACT_MP_SWIM - no description **/ ACT_MP_SWIM = 1006, /** * @param ACT_MP_DEPLOYED - no description **/ ACT_MP_DEPLOYED = 1007, /** * @param ACT_MP_SWIM_DEPLOYED - no description **/ ACT_MP_SWIM_DEPLOYED = 1008, /** * @param ACT_MP_VCD - no description **/ ACT_MP_VCD = 1009, /** * @param ACT_MP_SWIM_IDLE - no description **/ ACT_MP_SWIM_IDLE = 1010, /** * @param ACT_MP_ATTACK_STAND_PRIMARYFIRE - no description **/ ACT_MP_ATTACK_STAND_PRIMARYFIRE = 1011, /** * @param ACT_MP_ATTACK_STAND_PRIMARYFIRE_DEPLOYED - no description **/ ACT_MP_ATTACK_STAND_PRIMARYFIRE_DEPLOYED = 1012, /** * @param ACT_MP_ATTACK_STAND_SECONDARYFIRE - no description **/ ACT_MP_ATTACK_STAND_SECONDARYFIRE = 1013, /** * @param ACT_MP_ATTACK_STAND_GRENADE - no description **/ ACT_MP_ATTACK_STAND_GRENADE = 1014, /** * @param ACT_MP_ATTACK_CROUCH_PRIMARYFIRE - no description **/ ACT_MP_ATTACK_CROUCH_PRIMARYFIRE = 1015, /** * @param ACT_MP_ATTACK_CROUCH_PRIMARYFIRE_DEPLOYED - no description **/ ACT_MP_ATTACK_CROUCH_PRIMARYFIRE_DEPLOYED = 1016, /** * @param ACT_MP_ATTACK_CROUCH_SECONDARYFIRE - no description **/ ACT_MP_ATTACK_CROUCH_SECONDARYFIRE = 1017, /** * @param ACT_MP_ATTACK_CROUCH_GRENADE - no description **/ ACT_MP_ATTACK_CROUCH_GRENADE = 1018, /** * @param ACT_MP_ATTACK_SWIM_PRIMARYFIRE - no description **/ ACT_MP_ATTACK_SWIM_PRIMARYFIRE = 1019, /** * @param ACT_MP_ATTACK_SWIM_SECONDARYFIRE - no description **/ ACT_MP_ATTACK_SWIM_SECONDARYFIRE = 1020, /** * @param ACT_MP_ATTACK_SWIM_GRENADE - no description **/ ACT_MP_ATTACK_SWIM_GRENADE = 1021, /** * @param ACT_MP_ATTACK_AIRWALK_PRIMARYFIRE - no description **/ ACT_MP_ATTACK_AIRWALK_PRIMARYFIRE = 1022, /** * @param ACT_MP_ATTACK_AIRWALK_SECONDARYFIRE - no description **/ ACT_MP_ATTACK_AIRWALK_SECONDARYFIRE = 1023, /** * @param ACT_MP_ATTACK_AIRWALK_GRENADE - no description **/ ACT_MP_ATTACK_AIRWALK_GRENADE = 1024, /** * @param ACT_MP_RELOAD_STAND - no description **/ ACT_MP_RELOAD_STAND = 1025, /** * @param ACT_MP_RELOAD_STAND_LOOP - no description **/ ACT_MP_RELOAD_STAND_LOOP = 1026, /** * @param ACT_MP_RELOAD_STAND_END - no description **/ ACT_MP_RELOAD_STAND_END = 1027, /** * @param ACT_MP_RELOAD_CROUCH - no description **/ ACT_MP_RELOAD_CROUCH = 1028, /** * @param ACT_MP_RELOAD_CROUCH_LOOP - no description **/ ACT_MP_RELOAD_CROUCH_LOOP = 1029, /** * @param ACT_MP_RELOAD_CROUCH_END - no description **/ ACT_MP_RELOAD_CROUCH_END = 1030, /** * @param ACT_MP_RELOAD_SWIM - no description **/ ACT_MP_RELOAD_SWIM = 1031, /** * @param ACT_MP_RELOAD_SWIM_LOOP - no description **/ ACT_MP_RELOAD_SWIM_LOOP = 1032, /** * @param ACT_MP_RELOAD_SWIM_END - no description **/ ACT_MP_RELOAD_SWIM_END = 1033, /** * @param ACT_MP_RELOAD_AIRWALK - no description **/ ACT_MP_RELOAD_AIRWALK = 1034, /** * @param ACT_MP_RELOAD_AIRWALK_LOOP - no description **/ ACT_MP_RELOAD_AIRWALK_LOOP = 1035, /** * @param ACT_MP_RELOAD_AIRWALK_END - no description **/ ACT_MP_RELOAD_AIRWALK_END = 1036, /** * @param ACT_MP_ATTACK_STAND_PREFIRE - no description **/ ACT_MP_ATTACK_STAND_PREFIRE = 1037, /** * @param ACT_MP_ATTACK_STAND_POSTFIRE - no description **/ ACT_MP_ATTACK_STAND_POSTFIRE = 1038, /** * @param ACT_MP_ATTACK_STAND_STARTFIRE - no description **/ ACT_MP_ATTACK_STAND_STARTFIRE = 1039, /** * @param ACT_MP_ATTACK_CROUCH_PREFIRE - no description **/ ACT_MP_ATTACK_CROUCH_PREFIRE = 1040, /** * @param ACT_MP_ATTACK_CROUCH_POSTFIRE - no description **/ ACT_MP_ATTACK_CROUCH_POSTFIRE = 1041, /** * @param ACT_MP_ATTACK_SWIM_PREFIRE - no description **/ ACT_MP_ATTACK_SWIM_PREFIRE = 1042, /** * @param ACT_MP_ATTACK_SWIM_POSTFIRE - no description **/ ACT_MP_ATTACK_SWIM_POSTFIRE = 1043, /** * @param ACT_MP_STAND_PRIMARY - no description **/ ACT_MP_STAND_PRIMARY = 1044, /** * @param ACT_MP_CROUCH_PRIMARY - no description **/ ACT_MP_CROUCH_PRIMARY = 1045, /** * @param ACT_MP_RUN_PRIMARY - no description **/ ACT_MP_RUN_PRIMARY = 1046, /** * @param ACT_MP_WALK_PRIMARY - no description **/ ACT_MP_WALK_PRIMARY = 1047, /** * @param ACT_MP_AIRWALK_PRIMARY - no description **/ ACT_MP_AIRWALK_PRIMARY = 1048, /** * @param ACT_MP_CROUCHWALK_PRIMARY - no description **/ ACT_MP_CROUCHWALK_PRIMARY = 1049, /** * @param ACT_MP_JUMP_PRIMARY - no description **/ ACT_MP_JUMP_PRIMARY = 1050, /** * @param ACT_MP_JUMP_START_PRIMARY - no description **/ ACT_MP_JUMP_START_PRIMARY = 1051, /** * @param ACT_MP_JUMP_FLOAT_PRIMARY - no description **/ ACT_MP_JUMP_FLOAT_PRIMARY = 1052, /** * @param ACT_MP_JUMP_LAND_PRIMARY - no description **/ ACT_MP_JUMP_LAND_PRIMARY = 1053, /** * @param ACT_MP_SWIM_PRIMARY - no description **/ ACT_MP_SWIM_PRIMARY = 1054, /** * @param ACT_MP_DEPLOYED_PRIMARY - no description **/ ACT_MP_DEPLOYED_PRIMARY = 1055, /** * @param ACT_MP_SWIM_DEPLOYED_PRIMARY - no description **/ ACT_MP_SWIM_DEPLOYED_PRIMARY = 1056, /** * @param ACT_MP_ATTACK_STAND_PRIMARY - no description **/ ACT_MP_ATTACK_STAND_PRIMARY = 1059, /** * @param ACT_MP_ATTACK_STAND_PRIMARY_DEPLOYED - no description **/ ACT_MP_ATTACK_STAND_PRIMARY_DEPLOYED = 1060, /** * @param ACT_MP_ATTACK_CROUCH_PRIMARY - no description **/ ACT_MP_ATTACK_CROUCH_PRIMARY = 1061, /** * @param ACT_MP_ATTACK_CROUCH_PRIMARY_DEPLOYED - no description **/ ACT_MP_ATTACK_CROUCH_PRIMARY_DEPLOYED = 1062, /** * @param ACT_MP_ATTACK_SWIM_PRIMARY - no description **/ ACT_MP_ATTACK_SWIM_PRIMARY = 1063, /** * @param ACT_MP_ATTACK_AIRWALK_PRIMARY - no description **/ ACT_MP_ATTACK_AIRWALK_PRIMARY = 1064, /** * @param ACT_MP_RELOAD_STAND_PRIMARY - no description **/ ACT_MP_RELOAD_STAND_PRIMARY = 1065, /** * @param ACT_MP_RELOAD_STAND_PRIMARY_LOOP - no description **/ ACT_MP_RELOAD_STAND_PRIMARY_LOOP = 1066, /** * @param ACT_MP_RELOAD_STAND_PRIMARY_END - no description **/ ACT_MP_RELOAD_STAND_PRIMARY_END = 1067, /** * @param ACT_MP_RELOAD_CROUCH_PRIMARY - no description **/ ACT_MP_RELOAD_CROUCH_PRIMARY = 1068, /** * @param ACT_MP_RELOAD_CROUCH_PRIMARY_LOOP - no description **/ ACT_MP_RELOAD_CROUCH_PRIMARY_LOOP = 1069, /** * @param ACT_MP_RELOAD_CROUCH_PRIMARY_END - no description **/ ACT_MP_RELOAD_CROUCH_PRIMARY_END = 1070, /** * @param ACT_MP_RELOAD_SWIM_PRIMARY - no description **/ ACT_MP_RELOAD_SWIM_PRIMARY = 1071, /** * @param ACT_MP_RELOAD_SWIM_PRIMARY_LOOP - no description **/ ACT_MP_RELOAD_SWIM_PRIMARY_LOOP = 1072, /** * @param ACT_MP_RELOAD_SWIM_PRIMARY_END - no description **/ ACT_MP_RELOAD_SWIM_PRIMARY_END = 1073, /** * @param ACT_MP_RELOAD_AIRWALK_PRIMARY - no description **/ ACT_MP_RELOAD_AIRWALK_PRIMARY = 1074, /** * @param ACT_MP_RELOAD_AIRWALK_PRIMARY_LOOP - no description **/ ACT_MP_RELOAD_AIRWALK_PRIMARY_LOOP = 1075, /** * @param ACT_MP_RELOAD_AIRWALK_PRIMARY_END - no description **/ ACT_MP_RELOAD_AIRWALK_PRIMARY_END = 1076, /** * @param ACT_MP_ATTACK_STAND_GRENADE_PRIMARY - no description **/ ACT_MP_ATTACK_STAND_GRENADE_PRIMARY = 1105, /** * @param ACT_MP_ATTACK_CROUCH_GRENADE_PRIMARY - no description **/ ACT_MP_ATTACK_CROUCH_GRENADE_PRIMARY = 1106, /** * @param ACT_MP_ATTACK_SWIM_GRENADE_PRIMARY - no description **/ ACT_MP_ATTACK_SWIM_GRENADE_PRIMARY = 1107, /** * @param ACT_MP_ATTACK_AIRWALK_GRENADE_PRIMARY - no description **/ ACT_MP_ATTACK_AIRWALK_GRENADE_PRIMARY = 1108, /** * @param ACT_MP_STAND_SECONDARY - no description **/ ACT_MP_STAND_SECONDARY = 1109, /** * @param ACT_MP_CROUCH_SECONDARY - no description **/ ACT_MP_CROUCH_SECONDARY = 1110, /** * @param ACT_MP_RUN_SECONDARY - no description **/ ACT_MP_RUN_SECONDARY = 1111, /** * @param ACT_MP_WALK_SECONDARY - no description **/ ACT_MP_WALK_SECONDARY = 1112, /** * @param ACT_MP_AIRWALK_SECONDARY - no description **/ ACT_MP_AIRWALK_SECONDARY = 1113, /** * @param ACT_MP_CROUCHWALK_SECONDARY - no description **/ ACT_MP_CROUCHWALK_SECONDARY = 1114, /** * @param ACT_MP_JUMP_SECONDARY - no description **/ ACT_MP_JUMP_SECONDARY = 1115, /** * @param ACT_MP_JUMP_START_SECONDARY - no description **/ ACT_MP_JUMP_START_SECONDARY = 1116, /** * @param ACT_MP_JUMP_FLOAT_SECONDARY - no description **/ ACT_MP_JUMP_FLOAT_SECONDARY = 1117, /** * @param ACT_MP_JUMP_LAND_SECONDARY - no description **/ ACT_MP_JUMP_LAND_SECONDARY = 1118, /** * @param ACT_MP_SWIM_SECONDARY - no description **/ ACT_MP_SWIM_SECONDARY = 1119, /** * @param ACT_MP_ATTACK_STAND_SECONDARY - no description **/ ACT_MP_ATTACK_STAND_SECONDARY = 1120, /** * @param ACT_MP_ATTACK_CROUCH_SECONDARY - no description **/ ACT_MP_ATTACK_CROUCH_SECONDARY = 1121, /** * @param ACT_MP_ATTACK_SWIM_SECONDARY - no description **/ ACT_MP_ATTACK_SWIM_SECONDARY = 1122, /** * @param ACT_MP_ATTACK_AIRWALK_SECONDARY - no description **/ ACT_MP_ATTACK_AIRWALK_SECONDARY = 1123, /** * @param ACT_MP_RELOAD_STAND_SECONDARY - no description **/ ACT_MP_RELOAD_STAND_SECONDARY = 1124, /** * @param ACT_MP_RELOAD_STAND_SECONDARY_LOOP - no description **/ ACT_MP_RELOAD_STAND_SECONDARY_LOOP = 1125, /** * @param ACT_MP_RELOAD_STAND_SECONDARY_END - no description **/ ACT_MP_RELOAD_STAND_SECONDARY_END = 1126, /** * @param ACT_MP_RELOAD_CROUCH_SECONDARY - no description **/ ACT_MP_RELOAD_CROUCH_SECONDARY = 1127, /** * @param ACT_MP_RELOAD_CROUCH_SECONDARY_LOOP - no description **/ ACT_MP_RELOAD_CROUCH_SECONDARY_LOOP = 1128, /** * @param ACT_MP_RELOAD_CROUCH_SECONDARY_END - no description **/ ACT_MP_RELOAD_CROUCH_SECONDARY_END = 1129, /** * @param ACT_MP_RELOAD_SWIM_SECONDARY - no description **/ ACT_MP_RELOAD_SWIM_SECONDARY = 1130, /** * @param ACT_MP_RELOAD_SWIM_SECONDARY_LOOP - no description **/ ACT_MP_RELOAD_SWIM_SECONDARY_LOOP = 1131, /** * @param ACT_MP_RELOAD_SWIM_SECONDARY_END - no description **/ ACT_MP_RELOAD_SWIM_SECONDARY_END = 1132, /** * @param ACT_MP_RELOAD_AIRWALK_SECONDARY - no description **/ ACT_MP_RELOAD_AIRWALK_SECONDARY = 1133, /** * @param ACT_MP_RELOAD_AIRWALK_SECONDARY_LOOP - no description **/ ACT_MP_RELOAD_AIRWALK_SECONDARY_LOOP = 1134, /** * @param ACT_MP_RELOAD_AIRWALK_SECONDARY_END - no description **/ ACT_MP_RELOAD_AIRWALK_SECONDARY_END = 1135, /** * @param ACT_MP_ATTACK_STAND_GRENADE_SECONDARY - no description **/ ACT_MP_ATTACK_STAND_GRENADE_SECONDARY = 1140, /** * @param ACT_MP_ATTACK_CROUCH_GRENADE_SECONDARY - no description **/ ACT_MP_ATTACK_CROUCH_GRENADE_SECONDARY = 1141, /** * @param ACT_MP_ATTACK_SWIM_GRENADE_SECONDARY - no description **/ ACT_MP_ATTACK_SWIM_GRENADE_SECONDARY = 1142, /** * @param ACT_MP_ATTACK_AIRWALK_GRENADE_SECONDARY - no description **/ ACT_MP_ATTACK_AIRWALK_GRENADE_SECONDARY = 1143, /** * @param ACT_MP_STAND_MELEE - no description **/ ACT_MP_STAND_MELEE = 1171, /** * @param ACT_MP_CROUCH_MELEE - no description **/ ACT_MP_CROUCH_MELEE = 1172, /** * @param ACT_MP_RUN_MELEE - no description **/ ACT_MP_RUN_MELEE = 1173, /** * @param ACT_MP_WALK_MELEE - no description **/ ACT_MP_WALK_MELEE = 1174, /** * @param ACT_MP_AIRWALK_MELEE - no description **/ ACT_MP_AIRWALK_MELEE = 1175, /** * @param ACT_MP_CROUCHWALK_MELEE - no description **/ ACT_MP_CROUCHWALK_MELEE = 1176, /** * @param ACT_MP_JUMP_MELEE - no description **/ ACT_MP_JUMP_MELEE = 1177, /** * @param ACT_MP_JUMP_START_MELEE - no description **/ ACT_MP_JUMP_START_MELEE = 1178, /** * @param ACT_MP_JUMP_FLOAT_MELEE - no description **/ ACT_MP_JUMP_FLOAT_MELEE = 1179, /** * @param ACT_MP_JUMP_LAND_MELEE - no description **/ ACT_MP_JUMP_LAND_MELEE = 1180, /** * @param ACT_MP_SWIM_MELEE - no description **/ ACT_MP_SWIM_MELEE = 1181, /** * @param ACT_MP_ATTACK_STAND_MELEE - no description **/ ACT_MP_ATTACK_STAND_MELEE = 1182, /** * @param ACT_MP_ATTACK_STAND_MELEE_SECONDARY - no description **/ ACT_MP_ATTACK_STAND_MELEE_SECONDARY = 1183, /** * @param ACT_MP_ATTACK_CROUCH_MELEE - no description **/ ACT_MP_ATTACK_CROUCH_MELEE = 1184, /** * @param ACT_MP_ATTACK_CROUCH_MELEE_SECONDARY - no description **/ ACT_MP_ATTACK_CROUCH_MELEE_SECONDARY = 1185, /** * @param ACT_MP_ATTACK_SWIM_MELEE - no description **/ ACT_MP_ATTACK_SWIM_MELEE = 1186, /** * @param ACT_MP_ATTACK_AIRWALK_MELEE - no description **/ ACT_MP_ATTACK_AIRWALK_MELEE = 1187, /** * @param ACT_MP_ATTACK_STAND_GRENADE_MELEE - no description **/ ACT_MP_ATTACK_STAND_GRENADE_MELEE = 1188, /** * @param ACT_MP_ATTACK_CROUCH_GRENADE_MELEE - no description **/ ACT_MP_ATTACK_CROUCH_GRENADE_MELEE = 1189, /** * @param ACT_MP_ATTACK_SWIM_GRENADE_MELEE - no description **/ ACT_MP_ATTACK_SWIM_GRENADE_MELEE = 1190, /** * @param ACT_MP_ATTACK_AIRWALK_GRENADE_MELEE - no description **/ ACT_MP_ATTACK_AIRWALK_GRENADE_MELEE = 1191, /** * @param ACT_MP_GESTURE_FLINCH - no description **/ ACT_MP_GESTURE_FLINCH = 1258, /** * @param ACT_MP_GESTURE_FLINCH_PRIMARY - no description **/ ACT_MP_GESTURE_FLINCH_PRIMARY = 1259, /** * @param ACT_MP_GESTURE_FLINCH_SECONDARY - no description **/ ACT_MP_GESTURE_FLINCH_SECONDARY = 1260, /** * @param ACT_MP_GESTURE_FLINCH_MELEE - no description **/ ACT_MP_GESTURE_FLINCH_MELEE = 1261, /** * @param ACT_MP_GESTURE_FLINCH_HEAD - no description **/ ACT_MP_GESTURE_FLINCH_HEAD = 1264, /** * @param ACT_MP_GESTURE_FLINCH_CHEST - no description **/ ACT_MP_GESTURE_FLINCH_CHEST = 1265, /** * @param ACT_MP_GESTURE_FLINCH_STOMACH - no description **/ ACT_MP_GESTURE_FLINCH_STOMACH = 1266, /** * @param ACT_MP_GESTURE_FLINCH_LEFTARM - no description **/ ACT_MP_GESTURE_FLINCH_LEFTARM = 1267, /** * @param ACT_MP_GESTURE_FLINCH_RIGHTARM - no description **/ ACT_MP_GESTURE_FLINCH_RIGHTARM = 1268, /** * @param ACT_MP_GESTURE_FLINCH_LEFTLEG - no description **/ ACT_MP_GESTURE_FLINCH_LEFTLEG = 1269, /** * @param ACT_MP_GESTURE_FLINCH_RIGHTLEG - no description **/ ACT_MP_GESTURE_FLINCH_RIGHTLEG = 1270, /** * @param ACT_MP_GRENADE1_DRAW - no description **/ ACT_MP_GRENADE1_DRAW = 1271, /** * @param ACT_MP_GRENADE1_IDLE - no description **/ ACT_MP_GRENADE1_IDLE = 1272, /** * @param ACT_MP_GRENADE1_ATTACK - no description **/ ACT_MP_GRENADE1_ATTACK = 1273, /** * @param ACT_MP_GRENADE2_DRAW - no description **/ ACT_MP_GRENADE2_DRAW = 1274, /** * @param ACT_MP_GRENADE2_IDLE - no description **/ ACT_MP_GRENADE2_IDLE = 1275, /** * @param ACT_MP_GRENADE2_ATTACK - no description **/ ACT_MP_GRENADE2_ATTACK = 1276, /** * @param ACT_MP_PRIMARY_GRENADE1_DRAW - no description **/ ACT_MP_PRIMARY_GRENADE1_DRAW = 1277, /** * @param ACT_MP_PRIMARY_GRENADE1_IDLE - no description **/ ACT_MP_PRIMARY_GRENADE1_IDLE = 1278, /** * @param ACT_MP_PRIMARY_GRENADE1_ATTACK - no description **/ ACT_MP_PRIMARY_GRENADE1_ATTACK = 1279, /** * @param ACT_MP_PRIMARY_GRENADE2_DRAW - no description **/ ACT_MP_PRIMARY_GRENADE2_DRAW = 1280, /** * @param ACT_MP_PRIMARY_GRENADE2_IDLE - no description **/ ACT_MP_PRIMARY_GRENADE2_IDLE = 1281, /** * @param ACT_MP_PRIMARY_GRENADE2_ATTACK - no description **/ ACT_MP_PRIMARY_GRENADE2_ATTACK = 1282, /** * @param ACT_MP_SECONDARY_GRENADE1_DRAW - no description **/ ACT_MP_SECONDARY_GRENADE1_DRAW = 1283, /** * @param ACT_MP_SECONDARY_GRENADE1_IDLE - no description **/ ACT_MP_SECONDARY_GRENADE1_IDLE = 1284, /** * @param ACT_MP_SECONDARY_GRENADE1_ATTACK - no description **/ ACT_MP_SECONDARY_GRENADE1_ATTACK = 1285, /** * @param ACT_MP_SECONDARY_GRENADE2_DRAW - no description **/ ACT_MP_SECONDARY_GRENADE2_DRAW = 1286, /** * @param ACT_MP_SECONDARY_GRENADE2_IDLE - no description **/ ACT_MP_SECONDARY_GRENADE2_IDLE = 1287, /** * @param ACT_MP_SECONDARY_GRENADE2_ATTACK - no description **/ ACT_MP_SECONDARY_GRENADE2_ATTACK = 1288, /** * @param ACT_MP_MELEE_GRENADE1_DRAW - no description **/ ACT_MP_MELEE_GRENADE1_DRAW = 1289, /** * @param ACT_MP_MELEE_GRENADE1_IDLE - no description **/ ACT_MP_MELEE_GRENADE1_IDLE = 1290, /** * @param ACT_MP_MELEE_GRENADE1_ATTACK - no description **/ ACT_MP_MELEE_GRENADE1_ATTACK = 1291, /** * @param ACT_MP_MELEE_GRENADE2_DRAW - no description **/ ACT_MP_MELEE_GRENADE2_DRAW = 1292, /** * @param ACT_MP_MELEE_GRENADE2_IDLE - no description **/ ACT_MP_MELEE_GRENADE2_IDLE = 1293, /** * @param ACT_MP_MELEE_GRENADE2_ATTACK - no description **/ ACT_MP_MELEE_GRENADE2_ATTACK = 1294, /** * @param ACT_MP_STAND_BUILDING - no description **/ ACT_MP_STAND_BUILDING = 1307, /** * @param ACT_MP_CROUCH_BUILDING - no description **/ ACT_MP_CROUCH_BUILDING = 1308, /** * @param ACT_MP_RUN_BUILDING - no description **/ ACT_MP_RUN_BUILDING = 1309, /** * @param ACT_MP_WALK_BUILDING - no description **/ ACT_MP_WALK_BUILDING = 1310, /** * @param ACT_MP_AIRWALK_BUILDING - no description **/ ACT_MP_AIRWALK_BUILDING = 1311, /** * @param ACT_MP_CROUCHWALK_BUILDING - no description **/ ACT_MP_CROUCHWALK_BUILDING = 1312, /** * @param ACT_MP_JUMP_BUILDING - no description **/ ACT_MP_JUMP_BUILDING = 1313, /** * @param ACT_MP_JUMP_START_BUILDING - no description **/ ACT_MP_JUMP_START_BUILDING = 1314, /** * @param ACT_MP_JUMP_FLOAT_BUILDING - no description **/ ACT_MP_JUMP_FLOAT_BUILDING = 1315, /** * @param ACT_MP_JUMP_LAND_BUILDING - no description **/ ACT_MP_JUMP_LAND_BUILDING = 1316, /** * @param ACT_MP_SWIM_BUILDING - no description **/ ACT_MP_SWIM_BUILDING = 1317, /** * @param ACT_MP_ATTACK_STAND_BUILDING - no description **/ ACT_MP_ATTACK_STAND_BUILDING = 1318, /** * @param ACT_MP_ATTACK_CROUCH_BUILDING - no description **/ ACT_MP_ATTACK_CROUCH_BUILDING = 1319, /** * @param ACT_MP_ATTACK_SWIM_BUILDING - no description **/ ACT_MP_ATTACK_SWIM_BUILDING = 1320, /** * @param ACT_MP_ATTACK_AIRWALK_BUILDING - no description **/ ACT_MP_ATTACK_AIRWALK_BUILDING = 1321, /** * @param ACT_MP_ATTACK_STAND_GRENADE_BUILDING - no description **/ ACT_MP_ATTACK_STAND_GRENADE_BUILDING = 1322, /** * @param ACT_MP_ATTACK_CROUCH_GRENADE_BUILDING - no description **/ ACT_MP_ATTACK_CROUCH_GRENADE_BUILDING = 1323, /** * @param ACT_MP_ATTACK_SWIM_GRENADE_BUILDING - no description **/ ACT_MP_ATTACK_SWIM_GRENADE_BUILDING = 1324, /** * @param ACT_MP_ATTACK_AIRWALK_GRENADE_BUILDING - no description **/ ACT_MP_ATTACK_AIRWALK_GRENADE_BUILDING = 1325, /** * @param ACT_MP_STAND_PDA - no description **/ ACT_MP_STAND_PDA = 1345, /** * @param ACT_MP_CROUCH_PDA - no description **/ ACT_MP_CROUCH_PDA = 1346, /** * @param ACT_MP_RUN_PDA - no description **/ ACT_MP_RUN_PDA = 1347, /** * @param ACT_MP_WALK_PDA - no description **/ ACT_MP_WALK_PDA = 1348, /** * @param ACT_MP_AIRWALK_PDA - no description **/ ACT_MP_AIRWALK_PDA = 1349, /** * @param ACT_MP_CROUCHWALK_PDA - no description **/ ACT_MP_CROUCHWALK_PDA = 1350, /** * @param ACT_MP_JUMP_PDA - no description **/ ACT_MP_JUMP_PDA = 1351, /** * @param ACT_MP_JUMP_START_PDA - no description **/ ACT_MP_JUMP_START_PDA = 1352, /** * @param ACT_MP_JUMP_FLOAT_PDA - no description **/ ACT_MP_JUMP_FLOAT_PDA = 1353, /** * @param ACT_MP_JUMP_LAND_PDA - no description **/ ACT_MP_JUMP_LAND_PDA = 1354, /** * @param ACT_MP_SWIM_PDA - no description **/ ACT_MP_SWIM_PDA = 1355, /** * @param ACT_MP_ATTACK_STAND_PDA - no description **/ ACT_MP_ATTACK_STAND_PDA = 1356, /** * @param ACT_MP_ATTACK_SWIM_PDA - no description **/ ACT_MP_ATTACK_SWIM_PDA = 1357, /** * @param ACT_MP_GESTURE_VC_HANDMOUTH - no description **/ ACT_MP_GESTURE_VC_HANDMOUTH = 1377, /** * @param ACT_MP_GESTURE_VC_FINGERPOINT - no description **/ ACT_MP_GESTURE_VC_FINGERPOINT = 1378, /** * @param ACT_MP_GESTURE_VC_FISTPUMP - no description **/ ACT_MP_GESTURE_VC_FISTPUMP = 1379, /** * @param ACT_MP_GESTURE_VC_THUMBSUP - no description **/ ACT_MP_GESTURE_VC_THUMBSUP = 1380, /** * @param ACT_MP_GESTURE_VC_NODYES - no description **/ ACT_MP_GESTURE_VC_NODYES = 1381, /** * @param ACT_MP_GESTURE_VC_NODNO - no description **/ ACT_MP_GESTURE_VC_NODNO = 1382, /** * @param ACT_MP_GESTURE_VC_HANDMOUTH_PRIMARY - no description **/ ACT_MP_GESTURE_VC_HANDMOUTH_PRIMARY = 1383, /** * @param ACT_MP_GESTURE_VC_FINGERPOINT_PRIMARY - no description **/ ACT_MP_GESTURE_VC_FINGERPOINT_PRIMARY = 1384, /** * @param ACT_MP_GESTURE_VC_FISTPUMP_PRIMARY - no description **/ ACT_MP_GESTURE_VC_FISTPUMP_PRIMARY = 1385, /** * @param ACT_MP_GESTURE_VC_THUMBSUP_PRIMARY - no description **/ ACT_MP_GESTURE_VC_THUMBSUP_PRIMARY = 1386, /** * @param ACT_MP_GESTURE_VC_NODYES_PRIMARY - no description **/ ACT_MP_GESTURE_VC_NODYES_PRIMARY = 1387, /** * @param ACT_MP_GESTURE_VC_NODNO_PRIMARY - no description **/ ACT_MP_GESTURE_VC_NODNO_PRIMARY = 1388, /** * @param ACT_MP_GESTURE_VC_HANDMOUTH_SECONDARY - no description **/ ACT_MP_GESTURE_VC_HANDMOUTH_SECONDARY = 1389, /** * @param ACT_MP_GESTURE_VC_FINGERPOINT_SECONDARY - no description **/ ACT_MP_GESTURE_VC_FINGERPOINT_SECONDARY = 1390, /** * @param ACT_MP_GESTURE_VC_FISTPUMP_SECONDARY - no description **/ ACT_MP_GESTURE_VC_FISTPUMP_SECONDARY = 1391, /** * @param ACT_MP_GESTURE_VC_THUMBSUP_SECONDARY - no description **/ ACT_MP_GESTURE_VC_THUMBSUP_SECONDARY = 1392, /** * @param ACT_MP_GESTURE_VC_NODYES_SECONDARY - no description **/ ACT_MP_GESTURE_VC_NODYES_SECONDARY = 1393, /** * @param ACT_MP_GESTURE_VC_NODNO_SECONDARY - no description **/ ACT_MP_GESTURE_VC_NODNO_SECONDARY = 1394, /** * @param ACT_MP_GESTURE_VC_HANDMOUTH_MELEE - no description **/ ACT_MP_GESTURE_VC_HANDMOUTH_MELEE = 1395, /** * @param ACT_MP_GESTURE_VC_FINGERPOINT_MELEE - no description **/ ACT_MP_GESTURE_VC_FINGERPOINT_MELEE = 1396, /** * @param ACT_MP_GESTURE_VC_FISTPUMP_MELEE - no description **/ ACT_MP_GESTURE_VC_FISTPUMP_MELEE = 1397, /** * @param ACT_MP_GESTURE_VC_THUMBSUP_MELEE - no description **/ ACT_MP_GESTURE_VC_THUMBSUP_MELEE = 1398, /** * @param ACT_MP_GESTURE_VC_NODYES_MELEE - no description **/ ACT_MP_GESTURE_VC_NODYES_MELEE = 1399, /** * @param ACT_MP_GESTURE_VC_NODNO_MELEE - no description **/ ACT_MP_GESTURE_VC_NODNO_MELEE = 1400, /** * @param ACT_MP_GESTURE_VC_HANDMOUTH_BUILDING - no description **/ ACT_MP_GESTURE_VC_HANDMOUTH_BUILDING = 1413, /** * @param ACT_MP_GESTURE_VC_FINGERPOINT_BUILDING - no description **/ ACT_MP_GESTURE_VC_FINGERPOINT_BUILDING = 1414, /** * @param ACT_MP_GESTURE_VC_FISTPUMP_BUILDING - no description **/ ACT_MP_GESTURE_VC_FISTPUMP_BUILDING = 1415, /** * @param ACT_MP_GESTURE_VC_THUMBSUP_BUILDING - no description **/ ACT_MP_GESTURE_VC_THUMBSUP_BUILDING = 1416, /** * @param ACT_MP_GESTURE_VC_NODYES_BUILDING - no description **/ ACT_MP_GESTURE_VC_NODYES_BUILDING = 1417, /** * @param ACT_MP_GESTURE_VC_NODNO_BUILDING - no description **/ ACT_MP_GESTURE_VC_NODNO_BUILDING = 1418, /** * @param ACT_MP_GESTURE_VC_HANDMOUTH_PDA - no description **/ ACT_MP_GESTURE_VC_HANDMOUTH_PDA = 1419, /** * @param ACT_MP_GESTURE_VC_FINGERPOINT_PDA - no description **/ ACT_MP_GESTURE_VC_FINGERPOINT_PDA = 1420, /** * @param ACT_MP_GESTURE_VC_FISTPUMP_PDA - no description **/ ACT_MP_GESTURE_VC_FISTPUMP_PDA = 1421, /** * @param ACT_MP_GESTURE_VC_THUMBSUP_PDA - no description **/ ACT_MP_GESTURE_VC_THUMBSUP_PDA = 1422, /** * @param ACT_MP_GESTURE_VC_NODYES_PDA - no description **/ ACT_MP_GESTURE_VC_NODYES_PDA = 1423, /** * @param ACT_MP_GESTURE_VC_NODNO_PDA - no description **/ ACT_MP_GESTURE_VC_NODNO_PDA = 1424, /** * @param ACT_VM_UNUSABLE - no description **/ ACT_VM_UNUSABLE = 1428, /** * @param ACT_VM_UNUSABLE_TO_USABLE - no description **/ ACT_VM_UNUSABLE_TO_USABLE = 1429, /** * @param ACT_VM_USABLE_TO_UNUSABLE - no description **/ ACT_VM_USABLE_TO_UNUSABLE = 1430, /** * @param ACT_GMOD_GESTURE_AGREE - no description **/ ACT_GMOD_GESTURE_AGREE = 1610, /** * @param ACT_GMOD_GESTURE_BECON - no description **/ ACT_GMOD_GESTURE_BECON = 1611, /** * @param ACT_GMOD_GESTURE_BOW - no description **/ ACT_GMOD_GESTURE_BOW = 1612, /** * @param ACT_GMOD_GESTURE_DISAGREE - no description **/ ACT_GMOD_GESTURE_DISAGREE = 1613, /** * @param ACT_GMOD_TAUNT_SALUTE - no description **/ ACT_GMOD_TAUNT_SALUTE = 1614, /** * @param ACT_GMOD_GESTURE_WAVE - no description **/ ACT_GMOD_GESTURE_WAVE = 1615, /** * @param ACT_GMOD_TAUNT_PERSISTENCE - no description **/ ACT_GMOD_TAUNT_PERSISTENCE = 1616, /** * @param ACT_GMOD_TAUNT_MUSCLE - no description **/ ACT_GMOD_TAUNT_MUSCLE = 1617, /** * @param ACT_GMOD_TAUNT_LAUGH - no description **/ ACT_GMOD_TAUNT_LAUGH = 1618, /** * @param ACT_GMOD_GESTURE_POINT - no description **/ ACT_GMOD_GESTURE_POINT = 1619, /** * @param ACT_GMOD_TAUNT_CHEER - no description **/ ACT_GMOD_TAUNT_CHEER = 1620, /** * @param ACT_HL2MP_RUN_FAST - no description **/ ACT_HL2MP_RUN_FAST = 1621, /** * @param ACT_HL2MP_RUN_CHARGING - no description **/ ACT_HL2MP_RUN_CHARGING = 1622, /** * @param ACT_HL2MP_RUN_PANICKED - no description **/ ACT_HL2MP_RUN_PANICKED = 1623, /** * @param ACT_HL2MP_RUN_PROTECTED - no description **/ ACT_HL2MP_RUN_PROTECTED = 1624, /** * @param ACT_HL2MP_IDLE_MELEE_ANGRY - no description **/ ACT_HL2MP_IDLE_MELEE_ANGRY = 1625, /** * @param ACT_HL2MP_ZOMBIE_SLUMP_IDLE - no description **/ ACT_HL2MP_ZOMBIE_SLUMP_IDLE = 1626, /** * @param ACT_HL2MP_ZOMBIE_SLUMP_RISE - no description **/ ACT_HL2MP_ZOMBIE_SLUMP_RISE = 1627, /** * @param ACT_HL2MP_WALK_ZOMBIE_01 - no description **/ ACT_HL2MP_WALK_ZOMBIE_01 = 1628, /** * @param ACT_HL2MP_WALK_ZOMBIE_02 - no description **/ ACT_HL2MP_WALK_ZOMBIE_02 = 1629, /** * @param ACT_HL2MP_WALK_ZOMBIE_03 - no description **/ ACT_HL2MP_WALK_ZOMBIE_03 = 1630, /** * @param ACT_HL2MP_WALK_ZOMBIE_04 - no description **/ ACT_HL2MP_WALK_ZOMBIE_04 = 1631, /** * @param ACT_HL2MP_WALK_ZOMBIE_05 - no description **/ ACT_HL2MP_WALK_ZOMBIE_05 = 1632, /** * @param ACT_HL2MP_WALK_CROUCH_ZOMBIE_01 - no description **/ ACT_HL2MP_WALK_CROUCH_ZOMBIE_01 = 1633, /** * @param ACT_HL2MP_WALK_CROUCH_ZOMBIE_02 - no description **/ ACT_HL2MP_WALK_CROUCH_ZOMBIE_02 = 1634, /** * @param ACT_HL2MP_WALK_CROUCH_ZOMBIE_03 - no description **/ ACT_HL2MP_WALK_CROUCH_ZOMBIE_03 = 1635, /** * @param ACT_HL2MP_WALK_CROUCH_ZOMBIE_04 - no description **/ ACT_HL2MP_WALK_CROUCH_ZOMBIE_04 = 1636, /** * @param ACT_HL2MP_WALK_CROUCH_ZOMBIE_05 - no description **/ ACT_HL2MP_WALK_CROUCH_ZOMBIE_05 = 1637, /** * @param ACT_HL2MP_IDLE_CROUCH_ZOMBIE_01 - no description **/ ACT_HL2MP_IDLE_CROUCH_ZOMBIE_01 = 1638, /** * @param ACT_HL2MP_IDLE_CROUCH_ZOMBIE_02 - no description **/ ACT_HL2MP_IDLE_CROUCH_ZOMBIE_02 = 1639, /** * @param ACT_GMOD_GESTURE_RANGE_ZOMBIE - no description **/ ACT_GMOD_GESTURE_RANGE_ZOMBIE = 1640, /** * @param ACT_GMOD_GESTURE_TAUNT_ZOMBIE - no description **/ ACT_GMOD_GESTURE_TAUNT_ZOMBIE = 1641, /** * @param ACT_GMOD_TAUNT_DANCE - no description **/ ACT_GMOD_TAUNT_DANCE = 1642, /** * @param ACT_GMOD_TAUNT_ROBOT - no description **/ ACT_GMOD_TAUNT_ROBOT = 1643, /** * @param ACT_GMOD_GESTURE_RANGE_ZOMBIE_SPECIAL - no description **/ ACT_GMOD_GESTURE_RANGE_ZOMBIE_SPECIAL = 1644, /** * @param ACT_GMOD_GESTURE_RANGE_FRENZY - no description **/ ACT_GMOD_GESTURE_RANGE_FRENZY = 1645, /** * @param ACT_HL2MP_RUN_ZOMBIE_FAST - no description **/ ACT_HL2MP_RUN_ZOMBIE_FAST = 1646, /** * @param ACT_HL2MP_WALK_ZOMBIE_06 - no description **/ ACT_HL2MP_WALK_ZOMBIE_06 = 1647, /** * @param ACT_ZOMBIE_LEAP_START - no description **/ ACT_ZOMBIE_LEAP_START = 1648, /** * @param ACT_ZOMBIE_LEAPING - no description **/ ACT_ZOMBIE_LEAPING = 1649, /** * @param ACT_ZOMBIE_CLIMB_UP - no description **/ ACT_ZOMBIE_CLIMB_UP = 1650, /** * @param ACT_ZOMBIE_CLIMB_START - no description **/ ACT_ZOMBIE_CLIMB_START = 1651, /** * @param ACT_ZOMBIE_CLIMB_END - no description **/ ACT_ZOMBIE_CLIMB_END = 1652, /** * @param ACT_HL2MP_IDLE_MAGIC - no description **/ ACT_HL2MP_IDLE_MAGIC = 1653, /** * @param ACT_HL2MP_WALK_MAGIC - no description **/ ACT_HL2MP_WALK_MAGIC = 1654, /** * @param ACT_HL2MP_RUN_MAGIC - no description **/ ACT_HL2MP_RUN_MAGIC = 1655, /** * @param ACT_HL2MP_IDLE_CROUCH_MAGIC - no description **/ ACT_HL2MP_IDLE_CROUCH_MAGIC = 1656, /** * @param ACT_HL2MP_WALK_CROUCH_MAGIC - no description **/ ACT_HL2MP_WALK_CROUCH_MAGIC = 1657, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_MAGIC - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_MAGIC = 1658, /** * @param ACT_HL2MP_GESTURE_RELOAD_MAGIC - no description **/ ACT_HL2MP_GESTURE_RELOAD_MAGIC = 1659, /** * @param ACT_HL2MP_JUMP_MAGIC - no description **/ ACT_HL2MP_JUMP_MAGIC = 1660, /** * @param ACT_HL2MP_SWIM_IDLE_MAGIC - no description **/ ACT_HL2MP_SWIM_IDLE_MAGIC = 1661, /** * @param ACT_HL2MP_SWIM_MAGIC - no description **/ ACT_HL2MP_SWIM_MAGIC = 1662, /** * @param ACT_HL2MP_IDLE_REVOLVER - no description **/ ACT_HL2MP_IDLE_REVOLVER = 1663, /** * @param ACT_HL2MP_WALK_REVOLVER - no description **/ ACT_HL2MP_WALK_REVOLVER = 1664, /** * @param ACT_HL2MP_RUN_REVOLVER - no description **/ ACT_HL2MP_RUN_REVOLVER = 1665, /** * @param ACT_HL2MP_IDLE_CROUCH_REVOLVER - no description **/ ACT_HL2MP_IDLE_CROUCH_REVOLVER = 1666, /** * @param ACT_HL2MP_WALK_CROUCH_REVOLVER - no description **/ ACT_HL2MP_WALK_CROUCH_REVOLVER = 1667, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER = 1668, /** * @param ACT_HL2MP_GESTURE_RELOAD_REVOLVER - no description **/ ACT_HL2MP_GESTURE_RELOAD_REVOLVER = 1669, /** * @param ACT_HL2MP_JUMP_REVOLVER - no description **/ ACT_HL2MP_JUMP_REVOLVER = 1670, /** * @param ACT_HL2MP_SWIM_IDLE_REVOLVER - no description **/ ACT_HL2MP_SWIM_IDLE_REVOLVER = 1671, /** * @param ACT_HL2MP_SWIM_REVOLVER - no description **/ ACT_HL2MP_SWIM_REVOLVER = 1672, /** * @param ACT_HL2MP_IDLE_CAMERA - no description **/ ACT_HL2MP_IDLE_CAMERA = 1673, /** * @param ACT_HL2MP_WALK_CAMERA - no description **/ ACT_HL2MP_WALK_CAMERA = 1674, /** * @param ACT_HL2MP_RUN_CAMERA - no description **/ ACT_HL2MP_RUN_CAMERA = 1675, /** * @param ACT_HL2MP_IDLE_CROUCH_CAMERA - no description **/ ACT_HL2MP_IDLE_CROUCH_CAMERA = 1676, /** * @param ACT_HL2MP_WALK_CROUCH_CAMERA - no description **/ ACT_HL2MP_WALK_CROUCH_CAMERA = 1677, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_CAMERA - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_CAMERA = 1678, /** * @param ACT_HL2MP_GESTURE_RELOAD_CAMERA - no description **/ ACT_HL2MP_GESTURE_RELOAD_CAMERA = 1679, /** * @param ACT_HL2MP_JUMP_CAMERA - no description **/ ACT_HL2MP_JUMP_CAMERA = 1680, /** * @param ACT_HL2MP_SWIM_IDLE_CAMERA - no description **/ ACT_HL2MP_SWIM_IDLE_CAMERA = 1681, /** * @param ACT_HL2MP_SWIM_CAMERA - no description **/ ACT_HL2MP_SWIM_CAMERA = 1682, /** * @param ACT_HL2MP_IDLE_ANGRY - no description **/ ACT_HL2MP_IDLE_ANGRY = 1683, /** * @param ACT_HL2MP_WALK_ANGRY - no description **/ ACT_HL2MP_WALK_ANGRY = 1684, /** * @param ACT_HL2MP_RUN_ANGRY - no description **/ ACT_HL2MP_RUN_ANGRY = 1685, /** * @param ACT_HL2MP_IDLE_CROUCH_ANGRY - no description **/ ACT_HL2MP_IDLE_CROUCH_ANGRY = 1686, /** * @param ACT_HL2MP_WALK_CROUCH_ANGRY - no description **/ ACT_HL2MP_WALK_CROUCH_ANGRY = 1687, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_ANGRY - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_ANGRY = 1688, /** * @param ACT_HL2MP_GESTURE_RELOAD_ANGRY - no description **/ ACT_HL2MP_GESTURE_RELOAD_ANGRY = 1689, /** * @param ACT_HL2MP_JUMP_ANGRY - no description **/ ACT_HL2MP_JUMP_ANGRY = 1690, /** * @param ACT_HL2MP_SWIM_IDLE_ANGRY - no description **/ ACT_HL2MP_SWIM_IDLE_ANGRY = 1691, /** * @param ACT_HL2MP_SWIM_ANGRY - no description **/ ACT_HL2MP_SWIM_ANGRY = 1692, /** * @param ACT_HL2MP_IDLE_SCARED - no description **/ ACT_HL2MP_IDLE_SCARED = 1693, /** * @param ACT_HL2MP_WALK_SCARED - no description **/ ACT_HL2MP_WALK_SCARED = 1694, /** * @param ACT_HL2MP_RUN_SCARED - no description **/ ACT_HL2MP_RUN_SCARED = 1695, /** * @param ACT_HL2MP_IDLE_CROUCH_SCARED - no description **/ ACT_HL2MP_IDLE_CROUCH_SCARED = 1696, /** * @param ACT_HL2MP_WALK_CROUCH_SCARED - no description **/ ACT_HL2MP_WALK_CROUCH_SCARED = 1697, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_SCARED - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_SCARED = 1698, /** * @param ACT_HL2MP_GESTURE_RELOAD_SCARED - no description **/ ACT_HL2MP_GESTURE_RELOAD_SCARED = 1699, /** * @param ACT_HL2MP_JUMP_SCARED - no description **/ ACT_HL2MP_JUMP_SCARED = 1700, /** * @param ACT_HL2MP_SWIM_IDLE_SCARED - no description **/ ACT_HL2MP_SWIM_IDLE_SCARED = 1701, /** * @param ACT_HL2MP_SWIM_SCARED - no description **/ ACT_HL2MP_SWIM_SCARED = 1702, /** * @param ACT_HL2MP_IDLE_ZOMBIE - no description **/ ACT_HL2MP_IDLE_ZOMBIE = 1703, /** * @param ACT_HL2MP_WALK_ZOMBIE - no description **/ ACT_HL2MP_WALK_ZOMBIE = 1704, /** * @param ACT_HL2MP_RUN_ZOMBIE - no description **/ ACT_HL2MP_RUN_ZOMBIE = 1705, /** * @param ACT_HL2MP_IDLE_CROUCH_ZOMBIE - no description **/ ACT_HL2MP_IDLE_CROUCH_ZOMBIE = 1706, /** * @param ACT_HL2MP_WALK_CROUCH_ZOMBIE - no description **/ ACT_HL2MP_WALK_CROUCH_ZOMBIE = 1707, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_ZOMBIE - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_ZOMBIE = 1708, /** * @param ACT_HL2MP_GESTURE_RELOAD_ZOMBIE - no description **/ ACT_HL2MP_GESTURE_RELOAD_ZOMBIE = 1709, /** * @param ACT_HL2MP_JUMP_ZOMBIE - no description **/ ACT_HL2MP_JUMP_ZOMBIE = 1710, /** * @param ACT_HL2MP_SWIM_IDLE_ZOMBIE - no description **/ ACT_HL2MP_SWIM_IDLE_ZOMBIE = 1711, /** * @param ACT_HL2MP_SWIM_ZOMBIE - no description **/ ACT_HL2MP_SWIM_ZOMBIE = 1712, /** * @param ACT_HL2MP_IDLE_SUITCASE - no description **/ ACT_HL2MP_IDLE_SUITCASE = 1713, /** * @param ACT_HL2MP_WALK_SUITCASE - no description **/ ACT_HL2MP_WALK_SUITCASE = 1714, /** * @param ACT_HL2MP_RUN_SUITCASE - no description **/ ACT_HL2MP_RUN_SUITCASE = 1715, /** * @param ACT_HL2MP_IDLE_CROUCH_SUITCASE - no description **/ ACT_HL2MP_IDLE_CROUCH_SUITCASE = 1716, /** * @param ACT_HL2MP_WALK_CROUCH_SUITCASE - no description **/ ACT_HL2MP_WALK_CROUCH_SUITCASE = 1717, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_SUITCASE - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_SUITCASE = 1718, /** * @param ACT_HL2MP_GESTURE_RELOAD_SUITCASE - no description **/ ACT_HL2MP_GESTURE_RELOAD_SUITCASE = 1719, /** * @param ACT_HL2MP_JUMP_SUITCASE - no description **/ ACT_HL2MP_JUMP_SUITCASE = 1720, /** * @param ACT_HL2MP_SWIM_IDLE_SUITCASE - no description **/ ACT_HL2MP_SWIM_IDLE_SUITCASE = 1721, /** * @param ACT_HL2MP_SWIM_SUITCASE - no description **/ ACT_HL2MP_SWIM_SUITCASE = 1722, /** * @param ACT_HL2MP_IDLE - no description **/ ACT_HL2MP_IDLE = 1777, /** * @param ACT_HL2MP_WALK - no description **/ ACT_HL2MP_WALK = 1778, /** * @param ACT_HL2MP_RUN - no description **/ ACT_HL2MP_RUN = 1779, /** * @param ACT_HL2MP_IDLE_CROUCH - no description **/ ACT_HL2MP_IDLE_CROUCH = 1780, /** * @param ACT_HL2MP_WALK_CROUCH - no description **/ ACT_HL2MP_WALK_CROUCH = 1781, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK = 1782, /** * @param ACT_HL2MP_GESTURE_RELOAD - no description **/ ACT_HL2MP_GESTURE_RELOAD = 1783, /** * @param ACT_HL2MP_JUMP - no description **/ ACT_HL2MP_JUMP = 1784, /** * @param ACT_HL2MP_SWIM - no description **/ ACT_HL2MP_SWIM = 1786, /** * @param ACT_HL2MP_IDLE_PISTOL - no description **/ ACT_HL2MP_IDLE_PISTOL = 1787, /** * @param ACT_HL2MP_WALK_PISTOL - no description **/ ACT_HL2MP_WALK_PISTOL = 1788, /** * @param ACT_HL2MP_RUN_PISTOL - no description **/ ACT_HL2MP_RUN_PISTOL = 1789, /** * @param ACT_HL2MP_IDLE_CROUCH_PISTOL - no description **/ ACT_HL2MP_IDLE_CROUCH_PISTOL = 1790, /** * @param ACT_HL2MP_WALK_CROUCH_PISTOL - no description **/ ACT_HL2MP_WALK_CROUCH_PISTOL = 1791, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL = 1792, /** * @param ACT_HL2MP_GESTURE_RELOAD_PISTOL - no description **/ ACT_HL2MP_GESTURE_RELOAD_PISTOL = 1793, /** * @param ACT_HL2MP_JUMP_PISTOL - no description **/ ACT_HL2MP_JUMP_PISTOL = 1794, /** * @param ACT_HL2MP_SWIM_IDLE_PISTOL - no description **/ ACT_HL2MP_SWIM_IDLE_PISTOL = 1795, /** * @param ACT_HL2MP_SWIM_PISTOL - no description **/ ACT_HL2MP_SWIM_PISTOL = 1796, /** * @param ACT_HL2MP_IDLE_SMG1 - no description **/ ACT_HL2MP_IDLE_SMG1 = 1797, /** * @param ACT_HL2MP_WALK_SMG1 - no description **/ ACT_HL2MP_WALK_SMG1 = 1798, /** * @param ACT_HL2MP_RUN_SMG1 - no description **/ ACT_HL2MP_RUN_SMG1 = 1799, /** * @param ACT_HL2MP_IDLE_CROUCH_SMG1 - no description **/ ACT_HL2MP_IDLE_CROUCH_SMG1 = 1800, /** * @param ACT_HL2MP_WALK_CROUCH_SMG1 - no description **/ ACT_HL2MP_WALK_CROUCH_SMG1 = 1801, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_SMG1 - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_SMG1 = 1802, /** * @param ACT_HL2MP_GESTURE_RELOAD_SMG1 - no description **/ ACT_HL2MP_GESTURE_RELOAD_SMG1 = 1803, /** * @param ACT_HL2MP_JUMP_SMG1 - no description **/ ACT_HL2MP_JUMP_SMG1 = 1804, /** * @param ACT_HL2MP_SWIM_IDLE_SMG1 - no description **/ ACT_HL2MP_SWIM_IDLE_SMG1 = 1805, /** * @param ACT_HL2MP_SWIM_SMG1 - no description **/ ACT_HL2MP_SWIM_SMG1 = 1806, /** * @param ACT_HL2MP_IDLE_AR2 - no description **/ ACT_HL2MP_IDLE_AR2 = 1807, /** * @param ACT_HL2MP_WALK_AR2 - no description **/ ACT_HL2MP_WALK_AR2 = 1808, /** * @param ACT_HL2MP_RUN_AR2 - no description **/ ACT_HL2MP_RUN_AR2 = 1809, /** * @param ACT_HL2MP_IDLE_CROUCH_AR2 - no description **/ ACT_HL2MP_IDLE_CROUCH_AR2 = 1810, /** * @param ACT_HL2MP_WALK_CROUCH_AR2 - no description **/ ACT_HL2MP_WALK_CROUCH_AR2 = 1811, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_AR2 = 1812, /** * @param ACT_HL2MP_GESTURE_RELOAD_AR2 - no description **/ ACT_HL2MP_GESTURE_RELOAD_AR2 = 1813, /** * @param ACT_HL2MP_JUMP_AR2 - no description **/ ACT_HL2MP_JUMP_AR2 = 1814, /** * @param ACT_HL2MP_SWIM_IDLE_AR2 - no description **/ ACT_HL2MP_SWIM_IDLE_AR2 = 1815, /** * @param ACT_HL2MP_SWIM_AR2 - no description **/ ACT_HL2MP_SWIM_AR2 = 1816, /** * @param ACT_HL2MP_IDLE_SHOTGUN - no description **/ ACT_HL2MP_IDLE_SHOTGUN = 1817, /** * @param ACT_HL2MP_WALK_SHOTGUN - no description **/ ACT_HL2MP_WALK_SHOTGUN = 1818, /** * @param ACT_HL2MP_RUN_SHOTGUN - no description **/ ACT_HL2MP_RUN_SHOTGUN = 1819, /** * @param ACT_HL2MP_IDLE_CROUCH_SHOTGUN - no description **/ ACT_HL2MP_IDLE_CROUCH_SHOTGUN = 1820, /** * @param ACT_HL2MP_WALK_CROUCH_SHOTGUN - no description **/ ACT_HL2MP_WALK_CROUCH_SHOTGUN = 1821, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_SHOTGUN = 1822, /** * @param ACT_HL2MP_GESTURE_RELOAD_SHOTGUN - no description **/ ACT_HL2MP_GESTURE_RELOAD_SHOTGUN = 1823, /** * @param ACT_HL2MP_JUMP_SHOTGUN - no description **/ ACT_HL2MP_JUMP_SHOTGUN = 1824, /** * @param ACT_HL2MP_SWIM_IDLE_SHOTGUN - no description **/ ACT_HL2MP_SWIM_IDLE_SHOTGUN = 1825, /** * @param ACT_HL2MP_SWIM_SHOTGUN - no description **/ ACT_HL2MP_SWIM_SHOTGUN = 1826, /** * @param ACT_HL2MP_IDLE_RPG - no description **/ ACT_HL2MP_IDLE_RPG = 1827, /** * @param ACT_HL2MP_WALK_RPG - no description **/ ACT_HL2MP_WALK_RPG = 1828, /** * @param ACT_HL2MP_RUN_RPG - no description **/ ACT_HL2MP_RUN_RPG = 1829, /** * @param ACT_HL2MP_IDLE_CROUCH_RPG - no description **/ ACT_HL2MP_IDLE_CROUCH_RPG = 1830, /** * @param ACT_HL2MP_WALK_CROUCH_RPG - no description **/ ACT_HL2MP_WALK_CROUCH_RPG = 1831, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_RPG - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_RPG = 1832, /** * @param ACT_HL2MP_GESTURE_RELOAD_RPG - no description **/ ACT_HL2MP_GESTURE_RELOAD_RPG = 1833, /** * @param ACT_HL2MP_JUMP_RPG - no description **/ ACT_HL2MP_JUMP_RPG = 1834, /** * @param ACT_HL2MP_SWIM_IDLE_RPG - no description **/ ACT_HL2MP_SWIM_IDLE_RPG = 1835, /** * @param ACT_HL2MP_SWIM_RPG - no description **/ ACT_HL2MP_SWIM_RPG = 1836, /** * @param ACT_HL2MP_IDLE_GRENADE - no description **/ ACT_HL2MP_IDLE_GRENADE = 1837, /** * @param ACT_HL2MP_WALK_GRENADE - no description **/ ACT_HL2MP_WALK_GRENADE = 1838, /** * @param ACT_HL2MP_RUN_GRENADE - no description **/ ACT_HL2MP_RUN_GRENADE = 1839, /** * @param ACT_HL2MP_IDLE_CROUCH_GRENADE - no description **/ ACT_HL2MP_IDLE_CROUCH_GRENADE = 1840, /** * @param ACT_HL2MP_WALK_CROUCH_GRENADE - no description **/ ACT_HL2MP_WALK_CROUCH_GRENADE = 1841, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE = 1842, /** * @param ACT_HL2MP_GESTURE_RELOAD_GRENADE - no description **/ ACT_HL2MP_GESTURE_RELOAD_GRENADE = 1843, /** * @param ACT_HL2MP_JUMP_GRENADE - no description **/ ACT_HL2MP_JUMP_GRENADE = 1844, /** * @param ACT_HL2MP_SWIM_IDLE_GRENADE - no description **/ ACT_HL2MP_SWIM_IDLE_GRENADE = 1845, /** * @param ACT_HL2MP_SWIM_GRENADE - no description **/ ACT_HL2MP_SWIM_GRENADE = 1846, /** * @param ACT_HL2MP_IDLE_DUEL - no description **/ ACT_HL2MP_IDLE_DUEL = 1847, /** * @param ACT_HL2MP_WALK_DUEL - no description **/ ACT_HL2MP_WALK_DUEL = 1848, /** * @param ACT_HL2MP_RUN_DUEL - no description **/ ACT_HL2MP_RUN_DUEL = 1849, /** * @param ACT_HL2MP_IDLE_CROUCH_DUEL - no description **/ ACT_HL2MP_IDLE_CROUCH_DUEL = 1850, /** * @param ACT_HL2MP_WALK_CROUCH_DUEL - no description **/ ACT_HL2MP_WALK_CROUCH_DUEL = 1851, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_DUEL - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_DUEL = 1852, /** * @param ACT_HL2MP_GESTURE_RELOAD_DUEL - no description **/ ACT_HL2MP_GESTURE_RELOAD_DUEL = 1853, /** * @param ACT_HL2MP_JUMP_DUEL - no description **/ ACT_HL2MP_JUMP_DUEL = 1854, /** * @param ACT_HL2MP_SWIM_IDLE_DUEL - no description **/ ACT_HL2MP_SWIM_IDLE_DUEL = 1855, /** * @param ACT_HL2MP_SWIM_DUEL - no description **/ ACT_HL2MP_SWIM_DUEL = 1856, /** * @param ACT_HL2MP_IDLE_PHYSGUN - no description **/ ACT_HL2MP_IDLE_PHYSGUN = 1857, /** * @param ACT_HL2MP_WALK_PHYSGUN - no description **/ ACT_HL2MP_WALK_PHYSGUN = 1858, /** * @param ACT_HL2MP_RUN_PHYSGUN - no description **/ ACT_HL2MP_RUN_PHYSGUN = 1859, /** * @param ACT_HL2MP_IDLE_CROUCH_PHYSGUN - no description **/ ACT_HL2MP_IDLE_CROUCH_PHYSGUN = 1860, /** * @param ACT_HL2MP_WALK_CROUCH_PHYSGUN - no description **/ ACT_HL2MP_WALK_CROUCH_PHYSGUN = 1861, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_PHYSGUN - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_PHYSGUN = 1862, /** * @param ACT_HL2MP_GESTURE_RELOAD_PHYSGUN - no description **/ ACT_HL2MP_GESTURE_RELOAD_PHYSGUN = 1863, /** * @param ACT_HL2MP_JUMP_PHYSGUN - no description **/ ACT_HL2MP_JUMP_PHYSGUN = 1864, /** * @param ACT_HL2MP_SWIM_IDLE_PHYSGUN - no description **/ ACT_HL2MP_SWIM_IDLE_PHYSGUN = 1865, /** * @param ACT_HL2MP_SWIM_PHYSGUN - no description **/ ACT_HL2MP_SWIM_PHYSGUN = 1866, /** * @param ACT_HL2MP_IDLE_CROSSBOW - no description **/ ACT_HL2MP_IDLE_CROSSBOW = 1867, /** * @param ACT_HL2MP_WALK_CROSSBOW - no description **/ ACT_HL2MP_WALK_CROSSBOW = 1868, /** * @param ACT_HL2MP_RUN_CROSSBOW - no description **/ ACT_HL2MP_RUN_CROSSBOW = 1869, /** * @param ACT_HL2MP_IDLE_CROUCH_CROSSBOW - no description **/ ACT_HL2MP_IDLE_CROUCH_CROSSBOW = 1870, /** * @param ACT_HL2MP_WALK_CROUCH_CROSSBOW - no description **/ ACT_HL2MP_WALK_CROUCH_CROSSBOW = 1871, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW = 1872, /** * @param ACT_HL2MP_GESTURE_RELOAD_CROSSBOW - no description **/ ACT_HL2MP_GESTURE_RELOAD_CROSSBOW = 1873, /** * @param ACT_HL2MP_JUMP_CROSSBOW - no description **/ ACT_HL2MP_JUMP_CROSSBOW = 1874, /** * @param ACT_HL2MP_SWIM_IDLE_CROSSBOW - no description **/ ACT_HL2MP_SWIM_IDLE_CROSSBOW = 1875, /** * @param ACT_HL2MP_SWIM_CROSSBOW - no description **/ ACT_HL2MP_SWIM_CROSSBOW = 1876, /** * @param ACT_HL2MP_IDLE_MELEE - no description **/ ACT_HL2MP_IDLE_MELEE = 1877, /** * @param ACT_HL2MP_WALK_MELEE - no description **/ ACT_HL2MP_WALK_MELEE = 1878, /** * @param ACT_HL2MP_RUN_MELEE - no description **/ ACT_HL2MP_RUN_MELEE = 1879, /** * @param ACT_HL2MP_IDLE_CROUCH_MELEE - no description **/ ACT_HL2MP_IDLE_CROUCH_MELEE = 1880, /** * @param ACT_HL2MP_WALK_CROUCH_MELEE - no description **/ ACT_HL2MP_WALK_CROUCH_MELEE = 1881, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE = 1882, /** * @param ACT_HL2MP_GESTURE_RELOAD_MELEE - no description **/ ACT_HL2MP_GESTURE_RELOAD_MELEE = 1883, /** * @param ACT_HL2MP_JUMP_MELEE - no description **/ ACT_HL2MP_JUMP_MELEE = 1884, /** * @param ACT_HL2MP_SWIM_IDLE_MELEE - no description **/ ACT_HL2MP_SWIM_IDLE_MELEE = 1885, /** * @param ACT_HL2MP_SWIM_MELEE - no description **/ ACT_HL2MP_SWIM_MELEE = 1886, /** * @param ACT_HL2MP_IDLE_SLAM - no description **/ ACT_HL2MP_IDLE_SLAM = 1887, /** * @param ACT_HL2MP_WALK_SLAM - no description **/ ACT_HL2MP_WALK_SLAM = 1888, /** * @param ACT_HL2MP_RUN_SLAM - no description **/ ACT_HL2MP_RUN_SLAM = 1889, /** * @param ACT_HL2MP_IDLE_CROUCH_SLAM - no description **/ ACT_HL2MP_IDLE_CROUCH_SLAM = 1890, /** * @param ACT_HL2MP_WALK_CROUCH_SLAM - no description **/ ACT_HL2MP_WALK_CROUCH_SLAM = 1891, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM = 1892, /** * @param ACT_HL2MP_GESTURE_RELOAD_SLAM - no description **/ ACT_HL2MP_GESTURE_RELOAD_SLAM = 1893, /** * @param ACT_HL2MP_JUMP_SLAM - no description **/ ACT_HL2MP_JUMP_SLAM = 1894, /** * @param ACT_HL2MP_SWIM_IDLE_SLAM - no description **/ ACT_HL2MP_SWIM_IDLE_SLAM = 1895, /** * @param ACT_HL2MP_SWIM_SLAM - no description **/ ACT_HL2MP_SWIM_SLAM = 1896, /** * @param ACT_VM_CRAWL - no description **/ ACT_VM_CRAWL = 1897, /** * @param ACT_VM_CRAWL_EMPTY - no description **/ ACT_VM_CRAWL_EMPTY = 1898, /** * @param ACT_VM_HOLSTER_EMPTY - no description **/ ACT_VM_HOLSTER_EMPTY = 1899, /** * @param ACT_VM_DOWN - no description **/ ACT_VM_DOWN = 1900, /** * @param ACT_VM_DOWN_EMPTY - no description **/ ACT_VM_DOWN_EMPTY = 1901, /** * @param ACT_VM_READY - no description **/ ACT_VM_READY = 1902, /** * @param ACT_VM_ISHOOT - no description **/ ACT_VM_ISHOOT = 1903, /** * @param ACT_VM_IIN - no description **/ ACT_VM_IIN = 1904, /** * @param ACT_VM_IIN_EMPTY - no description **/ ACT_VM_IIN_EMPTY = 1905, /** * @param ACT_VM_IIDLE - no description **/ ACT_VM_IIDLE = 1906, /** * @param ACT_VM_IIDLE_EMPTY - no description **/ ACT_VM_IIDLE_EMPTY = 1907, /** * @param ACT_VM_IOUT - no description **/ ACT_VM_IOUT = 1908, /** * @param ACT_VM_IOUT_EMPTY - no description **/ ACT_VM_IOUT_EMPTY = 1909, /** * @param ACT_VM_PULLBACK_HIGH_BAKE - no description **/ ACT_VM_PULLBACK_HIGH_BAKE = 1910, /** * @param ACT_VM_HITKILL - no description **/ ACT_VM_HITKILL = 1911, /** * @param ACT_VM_DEPLOYED_IN - no description **/ ACT_VM_DEPLOYED_IN = 1912, /** * @param ACT_VM_DEPLOYED_IDLE - no description **/ ACT_VM_DEPLOYED_IDLE = 1913, /** * @param ACT_VM_DEPLOYED_FIRE - no description **/ ACT_VM_DEPLOYED_FIRE = 1914, /** * @param ACT_VM_DEPLOYED_DRYFIRE - no description **/ ACT_VM_DEPLOYED_DRYFIRE = 1915, /** * @param ACT_VM_DEPLOYED_RELOAD - no description **/ ACT_VM_DEPLOYED_RELOAD = 1916, /** * @param ACT_VM_DEPLOYED_RELOAD_EMPTY - no description **/ ACT_VM_DEPLOYED_RELOAD_EMPTY = 1917, /** * @param ACT_VM_DEPLOYED_OUT - no description **/ ACT_VM_DEPLOYED_OUT = 1918, /** * @param ACT_VM_DEPLOYED_IRON_IN - no description **/ ACT_VM_DEPLOYED_IRON_IN = 1919, /** * @param ACT_VM_DEPLOYED_IRON_IDLE - no description **/ ACT_VM_DEPLOYED_IRON_IDLE = 1920, /** * @param ACT_VM_DEPLOYED_IRON_FIRE - no description **/ ACT_VM_DEPLOYED_IRON_FIRE = 1921, /** * @param ACT_VM_DEPLOYED_IRON_DRYFIRE - no description **/ ACT_VM_DEPLOYED_IRON_DRYFIRE = 1922, /** * @param ACT_VM_DEPLOYED_IRON_OUT - no description **/ ACT_VM_DEPLOYED_IRON_OUT = 1923, /** * @param ACT_VM_DEPLOYED_LIFTED_IN - no description **/ ACT_VM_DEPLOYED_LIFTED_IN = 1924, /** * @param ACT_VM_DEPLOYED_LIFTED_IDLE - no description **/ ACT_VM_DEPLOYED_LIFTED_IDLE = 1925, /** * @param ACT_VM_DEPLOYED_LIFTED_OUT - no description **/ ACT_VM_DEPLOYED_LIFTED_OUT = 1926, /** * @param ACT_VM_RELOADEMPTY - no description **/ ACT_VM_RELOADEMPTY = 1927, /** * @param ACT_VM_IRECOIL1 - no description **/ ACT_VM_IRECOIL1 = 1928, /** * @param ACT_VM_IRECOIL2 - no description **/ ACT_VM_IRECOIL2 = 1929, /** * @param ACT_VM_FIREMODE - no description **/ ACT_VM_FIREMODE = 1930, /** * @param ACT_VM_ISHOOT_LAST - no description **/ ACT_VM_ISHOOT_LAST = 1931, /** * @param ACT_VM_IFIREMODE - no description **/ ACT_VM_IFIREMODE = 1932, /** * @param ACT_VM_DFIREMODE - no description **/ ACT_VM_DFIREMODE = 1933, /** * @param ACT_VM_DIFIREMODE - no description **/ ACT_VM_DIFIREMODE = 1934, /** * @param ACT_VM_SHOOTLAST - no description **/ ACT_VM_SHOOTLAST = 1935, /** * @param ACT_VM_ISHOOTDRY - no description **/ ACT_VM_ISHOOTDRY = 1936, /** * @param ACT_VM_DRAW_M203 - no description **/ ACT_VM_DRAW_M203 = 1937, /** * @param ACT_VM_DRAWFULL_M203 - no description **/ ACT_VM_DRAWFULL_M203 = 1938, /** * @param ACT_VM_READY_M203 - no description **/ ACT_VM_READY_M203 = 1939, /** * @param ACT_VM_IDLE_M203 - no description **/ ACT_VM_IDLE_M203 = 1940, /** * @param ACT_VM_RELOAD_M203 - no description **/ ACT_VM_RELOAD_M203 = 1941, /** * @param ACT_VM_HOLSTER_M203 - no description **/ ACT_VM_HOLSTER_M203 = 1942, /** * @param ACT_VM_HOLSTERFULL_M203 - no description **/ ACT_VM_HOLSTERFULL_M203 = 1943, /** * @param ACT_VM_IIN_M203 - no description **/ ACT_VM_IIN_M203 = 1944, /** * @param ACT_VM_IIDLE_M203 - no description **/ ACT_VM_IIDLE_M203 = 1945, /** * @param ACT_VM_IOUT_M203 - no description **/ ACT_VM_IOUT_M203 = 1946, /** * @param ACT_VM_CRAWL_M203 - no description **/ ACT_VM_CRAWL_M203 = 1947, /** * @param ACT_VM_DOWN_M203 - no description **/ ACT_VM_DOWN_M203 = 1948, /** * @param ACT_VM_ISHOOT_M203 - no description **/ ACT_VM_ISHOOT_M203 = 1949, /** * @param ACT_VM_RELOAD_INSERT - no description **/ ACT_VM_RELOAD_INSERT = 1950, /** * @param ACT_VM_RELOAD_INSERT_PULL - no description **/ ACT_VM_RELOAD_INSERT_PULL = 1951, /** * @param ACT_VM_RELOAD_END - no description **/ ACT_VM_RELOAD_END = 1952, /** * @param ACT_VM_RELOAD_END_EMPTY - no description **/ ACT_VM_RELOAD_END_EMPTY = 1953, /** * @param ACT_VM_RELOAD_INSERT_EMPTY - no description **/ ACT_VM_RELOAD_INSERT_EMPTY = 1954, /** * @param ACT_CROSSBOW_HOLSTER_UNLOADED - no description **/ ACT_CROSSBOW_HOLSTER_UNLOADED = 1955, /** * @param ACT_VM_FIRE_TO_EMPTY - no description **/ ACT_VM_FIRE_TO_EMPTY = 1956, /** * @param ACT_VM_UNLOAD - no description **/ ACT_VM_UNLOAD = 1957, /** * @param ACT_VM_RELOAD2 - no description **/ ACT_VM_RELOAD2 = 1958, /** * @param ACT_GMOD_NOCLIP_LAYER - no description **/ ACT_GMOD_NOCLIP_LAYER = 1959, /** * @param ACT_HL2MP_IDLE_FIST - no description **/ ACT_HL2MP_IDLE_FIST = 1960, /** * @param ACT_HL2MP_WALK_FIST - no description **/ ACT_HL2MP_WALK_FIST = 1961, /** * @param ACT_HL2MP_RUN_FIST - no description **/ ACT_HL2MP_RUN_FIST = 1962, /** * @param ACT_HL2MP_IDLE_CROUCH_FIST - no description **/ ACT_HL2MP_IDLE_CROUCH_FIST = 1963, /** * @param ACT_HL2MP_WALK_CROUCH_FIST - no description **/ ACT_HL2MP_WALK_CROUCH_FIST = 1964, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_FIST - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_FIST = 1965, /** * @param ACT_HL2MP_GESTURE_RELOAD_FIST - no description **/ ACT_HL2MP_GESTURE_RELOAD_FIST = 1966, /** * @param ACT_HL2MP_JUMP_FIST - no description **/ ACT_HL2MP_JUMP_FIST = 1967, /** * @param ACT_HL2MP_SWIM_IDLE_FIST - no description **/ ACT_HL2MP_SWIM_IDLE_FIST = 1968, /** * @param ACT_HL2MP_SWIM_FIST - no description **/ ACT_HL2MP_SWIM_FIST = 1969, /** * @param ACT_HL2MP_SIT - no description **/ ACT_HL2MP_SIT = 1970, /** * @param ACT_HL2MP_FIST_BLOCK - no description **/ ACT_HL2MP_FIST_BLOCK = 1971, /** * @param ACT_DRIVE_AIRBOAT - no description **/ ACT_DRIVE_AIRBOAT = 1972, /** * @param ACT_DRIVE_JEEP - no description **/ ACT_DRIVE_JEEP = 1973, /** * @param ACT_GMOD_SIT_ROLLERCOASTER - no description **/ ACT_GMOD_SIT_ROLLERCOASTER = 1974, /** * @param ACT_HL2MP_IDLE_KNIFE - no description **/ ACT_HL2MP_IDLE_KNIFE = 1975, /** * @param ACT_HL2MP_WALK_KNIFE - no description **/ ACT_HL2MP_WALK_KNIFE = 1976, /** * @param ACT_HL2MP_RUN_KNIFE - no description **/ ACT_HL2MP_RUN_KNIFE = 1977, /** * @param ACT_HL2MP_IDLE_CROUCH_KNIFE - no description **/ ACT_HL2MP_IDLE_CROUCH_KNIFE = 1978, /** * @param ACT_HL2MP_WALK_CROUCH_KNIFE - no description **/ ACT_HL2MP_WALK_CROUCH_KNIFE = 1979, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_KNIFE - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_KNIFE = 1980, /** * @param ACT_HL2MP_GESTURE_RELOAD_KNIFE - no description **/ ACT_HL2MP_GESTURE_RELOAD_KNIFE = 1981, /** * @param ACT_HL2MP_JUMP_KNIFE - no description **/ ACT_HL2MP_JUMP_KNIFE = 1982, /** * @param ACT_HL2MP_SWIM_IDLE_KNIFE - no description **/ ACT_HL2MP_SWIM_IDLE_KNIFE = 1983, /** * @param ACT_HL2MP_SWIM_KNIFE - no description **/ ACT_HL2MP_SWIM_KNIFE = 1984, /** * @param ACT_HL2MP_IDLE_PASSIVE - no description **/ ACT_HL2MP_IDLE_PASSIVE = 1985, /** * @param ACT_HL2MP_WALK_PASSIVE - no description **/ ACT_HL2MP_WALK_PASSIVE = 1986, /** * @param ACT_HL2MP_RUN_PASSIVE - no description **/ ACT_HL2MP_RUN_PASSIVE = 1987, /** * @param ACT_HL2MP_IDLE_CROUCH_PASSIVE - no description **/ ACT_HL2MP_IDLE_CROUCH_PASSIVE = 1988, /** * @param ACT_HL2MP_WALK_CROUCH_PASSIVE - no description **/ ACT_HL2MP_WALK_CROUCH_PASSIVE = 1989, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_PASSIVE - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_PASSIVE = 1990, /** * @param ACT_HL2MP_GESTURE_RELOAD_PASSIVE - no description **/ ACT_HL2MP_GESTURE_RELOAD_PASSIVE = 1991, /** * @param ACT_HL2MP_JUMP_PASSIVE - no description **/ ACT_HL2MP_JUMP_PASSIVE = 1992, /** * @param ACT_HL2MP_SWIM_PASSIVE - no description **/ ACT_HL2MP_SWIM_PASSIVE = 1993, /** * @param ACT_HL2MP_SWIM_IDLE_PASSIVE - no description **/ ACT_HL2MP_SWIM_IDLE_PASSIVE = 1994, /** * @param ACT_HL2MP_IDLE_MELEE2 - no description **/ ACT_HL2MP_IDLE_MELEE2 = 1995, /** * @param ACT_HL2MP_WALK_MELEE2 - no description **/ ACT_HL2MP_WALK_MELEE2 = 1996, /** * @param ACT_HL2MP_RUN_MELEE2 - no description **/ ACT_HL2MP_RUN_MELEE2 = 1997, /** * @param ACT_HL2MP_IDLE_CROUCH_MELEE2 - no description **/ ACT_HL2MP_IDLE_CROUCH_MELEE2 = 1998, /** * @param ACT_HL2MP_WALK_CROUCH_MELEE2 - no description **/ ACT_HL2MP_WALK_CROUCH_MELEE2 = 1999, /** * @param ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE2 - no description **/ ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE2 = 2000, /** * @param ACT_HL2MP_GESTURE_RELOAD_MELEE2 - no description **/ ACT_HL2MP_GESTURE_RELOAD_MELEE2 = 2001, /** * @param ACT_HL2MP_JUMP_MELEE2 - no description **/ ACT_HL2MP_JUMP_MELEE2 = 2002, /** * @param ACT_HL2MP_SWIM_IDLE_MELEE2 - no description **/ ACT_HL2MP_SWIM_IDLE_MELEE2 = 2003, /** * @param ACT_HL2MP_SWIM_MELEE2 - no description **/ ACT_HL2MP_SWIM_MELEE2 = 2004, /** * @param ACT_HL2MP_SIT_PISTOL - no description **/ ACT_HL2MP_SIT_PISTOL = 2005, /** * @param ACT_HL2MP_SIT_SHOTGUN - no description **/ ACT_HL2MP_SIT_SHOTGUN = 2006, /** * @param ACT_HL2MP_SIT_SMG1 - no description **/ ACT_HL2MP_SIT_SMG1 = 2007, /** * @param ACT_HL2MP_SIT_AR2 - no description **/ ACT_HL2MP_SIT_AR2 = 2008, /** * @param ACT_HL2MP_SIT_PHYSGUN - no description **/ ACT_HL2MP_SIT_PHYSGUN = 2009, /** * @param ACT_HL2MP_SIT_GRENADE - no description **/ ACT_HL2MP_SIT_GRENADE = 2010, /** * @param ACT_HL2MP_SIT_RPG - no description **/ ACT_HL2MP_SIT_RPG = 2011, /** * @param ACT_HL2MP_SIT_CROSSBOW - no description **/ ACT_HL2MP_SIT_CROSSBOW = 2012, /** * @param ACT_HL2MP_SIT_MELEE - no description **/ ACT_HL2MP_SIT_MELEE = 2013, /** * @param ACT_HL2MP_SIT_SLAM - no description **/ ACT_HL2MP_SIT_SLAM = 2014, /** * @param ACT_HL2MP_SIT_FIST - no description **/ ACT_HL2MP_SIT_FIST = 2015, /** * @param ACT_GMOD_IN_CHAT - no description **/ ACT_GMOD_IN_CHAT = 2019, /** * @param ACT_GMOD_GESTURE_ITEM_GIVE - no description **/ ACT_GMOD_GESTURE_ITEM_GIVE = 2020, /** * @param ACT_GMOD_GESTURE_ITEM_DROP - no description **/ ACT_GMOD_GESTURE_ITEM_DROP = 2021, /** * @param ACT_GMOD_GESTURE_ITEM_PLACE - no description **/ ACT_GMOD_GESTURE_ITEM_PLACE = 2022, /** * @param ACT_GMOD_GESTURE_ITEM_THROW - no description **/ ACT_GMOD_GESTURE_ITEM_THROW = 2023, /** * @param ACT_GMOD_GESTURE_MELEE_SHOVE_2HAND - no description **/ ACT_GMOD_GESTURE_MELEE_SHOVE_2HAND = 2024, /** * @param ACT_GMOD_GESTURE_MELEE_SHOVE_1HAND - no description **/ ACT_GMOD_GESTURE_MELEE_SHOVE_1HAND = 2025, /** * @param ACT_HL2MP_SWIM_IDLE - no description **/ ACT_HL2MP_SWIM_IDLE = 2026, /** * @param LAST_SHARED_ACTIVITY - The largest activity number **/ LAST_SHARED_ACTIVITY = 2027, } declare interface IWeaponHooksCustomAmmoDisplayReturn { /** * Draw - {boolean}: Whether to draw the ammo display or not **/ Draw: boolean /** * PrimaryClip - {number}: Amount of primary ammo in the clip **/ PrimaryClip: number /** * PrimaryAmmo - {number}: Amount of primary ammo in the reserves **/ PrimaryAmmo: number /** * SecondaryAmmo - {number}: Amount of secondary ammo. It is shown like alt-fire for SMG1 and AR2 are shown. **/ SecondaryAmmo: number } /** * @wiki https://wiki.garrysmod.com/page/Structures/ViewData * @interface ViewData * @description Table structure used for @render.RenderView. * Unless stated otherwise, the default values for all these keys would be inherited from the engine's CViewSetup and do not have static representations. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/VideoData * @interface VideoData * @description Table used by @video.Record. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/VehicleParamsSteering * @interface VehicleParamsSteering * @description The structure used by @VehicleParams structure. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/VehicleParamsEngine * @warning The @Vehicle:SetVehicleParams function takes this in **miles per hour**, but @Vehicle:GetVehicleParams returns this in **hammer units per second**! * 1 MPH is roughly 17.6 HU/s. * @warning Attempts to exceed the max RPM will force the active gear ratio to be that of the 1st gear, which will provide even more torque. This is the opposite of a rev limiter. This value is only used for the calculation of the effectively applied torque. * @warning The @Vehicle:SetVehicleParams function takes this in **miles per hour**, but @Vehicle:GetVehicleParams returns this in **hammer units per second**! * 1 MPH is roughly 17.6 HU/s. * @warning The @Vehicle:SetVehicleParams function takes this in **miles per hour**, but @Vehicle:GetVehicleParams returns this in **hammer units per second**! * 1 MPH is roughly 17.6 HU/s. * @interface VehicleParamsEngine * @description The structure used by @VehicleParams structure. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/VehicleParamsBody * @interface VehicleParamsBody * @description The structure used by @VehicleParams structure. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/VehicleParamsAxle * @interface VehicleParamsAxle * @description The structure used by @VehicleParams structure. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/VehicleParams * @interface VehicleParams * @description The structure used by @Vehicle:SetVehicleParams and @Vehicle:GetVehicleParams. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/Undo * @interface Undo * @description Table structure used by @undo.Do_Undo. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/UGCFileInfo * @interface UGCFileInfo * @description Table structure used by @steamworks.FileInfo. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/Trace * @warning Using a function here is super slow - try to avoid it. * @interface Trace * @description Table structure used for @util.TraceLine. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/TraceResult * @interface TraceResult * @description Table structure used as trace result. Default values are when the trace hits nothing. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/ToScreenData * @interface ToScreenData * @description Table returned by @VectorFuncs:ToScreen. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/TextureData * @interface TextureData * @description Used for @draw.TexturedQuad. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/TOOL * @note You can use the spawnmenu_reload``` console command to rebuild tool CPanels. * @interface ITool * @description The TOOL table is used in Sandbox tool creation. You can find a list of callbacks on the [TOOL Hooks](https://wiki.garrysmod.com/page/Category:TOOL%20Hooks) page and a list of methods on the [Tool Functions](https://wiki.garrysmod.com/page/Category:Tool) page. Do note that some of the fields below have no effect on server-side operations. * The tool information box drawn on the HUD while your tool is selected has 2 values that are set by @language.Add. * "tool.[tool mode].name" - The tool name (Note this is NOT the same as TOOL.Name) * "tool.[tool mode].desc" - The tool description * Ensure that all tool file names are entirely lowercase. Including capital letters can lead to unintended behavior. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/TextData * @interface TextData * @description Used for @draw.Text. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/TeamData * @interface TeamData * @description Table is one element from @team.GetAllTeams. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/SurfacePropertyData * @validate * @interface SurfacePropertyData * @description Table returned by @util.GetSurfaceData. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/SWEP * @warning The gamemode and view models **must** support this feature for it to work! * You can find more information here: [Using Viewmodel Hands](https://wiki.garrysmod.com/page/Using_Viewmodel_Hands) * @interface IWeapon * @description Information about a SWEP, used by @SandboxHooks:PlayerGiveSWEP and SWEP creation. For list of callbacks, see [Category:WEAPON_Hooks](https://wiki.garrysmod.com/page/Category:WEAPON_Hooks). * While some of the fields may be serverside or clientside only, it is recommended to provide them on both so addons could use their values. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/SunInfo * @interface SunInfo * @description Returned by @util.GetSunInfo. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/SoundData * @interface SoundData * @description Table used in @sound.Add and @sound.GetProperties. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/ServerQueryData * @interface ServerQueryData * @description Used for @serverlist.Query. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/SequenceInfo * @interface SequenceInfo * @description Used by @EntityFuncs:GetSequenceInfo. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/RenderCaptureData * @interface RenderCaptureData * @description Used for @render.Capture. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/RenderCamData * @interface RenderCamData * @description Used for @cam.Start. * Unless stated otherwise, the default values for all these keys would be inherited from the engine's current CViewSetup and do not have static representations. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/PropertyAdd * @interface PropertyAdd * @description Structure used for @properties.Add. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/PolygonVertex * @note You must pass a table of tables with this structure to the function. **You need to pass at least 3 points.** * @note Your points must be defined in a **clockwise order.** Otherwise, your shape will not render. * @interface PolygonVertex * @description A structure containing vertex information for use with @surface.DrawPoly. * UV coordinates describe which part of a given texture should be drawn at a vertex - your graphics card's interpolator will fill in space between vertices. UV coords range from 0-1, with 0 being top/left and 1 being bottom/right. If you're using a texture these are mandatory. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/PLAYER * @interface PLAYER * @description This page describes all **default** fields for a [player class](https://wiki.garrysmod.com/page/Player_Classes). **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/PhysProperties * @interface PhysProperties * @description Structure used by @construct.SetPhysProp. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/PhysicsObjectSave * @interface PhysicsObjectSave * @description Structure used in storing/restoring physics object attributes. * @duplicator.GenericDuplicatorFunction and @duplicator.DoGenericPhysics use a table of PhysicsObjectSaves with the struct's index in the table being the physics object ID. * Pos and Angle are set by the following: * ``` * Pos, Angle = WorldToLocal(phys:GetPos(), phys:GetAngle(), Vector( 0, 0, 0 ), Angle( 0, 0, 0 )) * ``` **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/PhysEnvPerformanceSettings * @interface PhysEnvPerformanceSettings * @description Table used by @physenv.SetPerformanceSettings. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/PathSegment * @interface PathSegment * @description Structure represents a path segment, returned by @PathFollower:GetCurrentGoal, @PathFollower:FirstSegment and @PathFollower:LastSegment. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/OperatingParams * @interface OperatingParams * @description The structure used by @Vehicle:GetOperatingParams. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/MeshVertex * @interface MeshVertex * @description Table used by various functions, such as @IMesh:BuildFromTriangles. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/MatProxyData * @interface MatProxyData * @description Table structure used by @matproxy.Add. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/LocalLight * @interface LocalLight * @description Table structure used for @render.SetLocalModelLights. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/HullTrace * @interface HullTrace * @description Table used by @util.TraceHull. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/HTTPRequest * @interface HTTPRequest * @description Table used by @HTTP function function. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/GM * @note It is recommended to use @DEFINE_BASECLASS function when referencing the gamemode's BaseClass to prevent unintended behavior * @note @DeriveGamemode function modifies the main gamemode's BaseClass, which is shared with parent gamemodes. Because of this, in parent gamemodes the BaseClass can be incorrect, so for instance you need to use *self.BaseClass.BaseClass* in the 1st parent instead * @interface IGamemode * @description Information about a gamemode, used in [Gamemode Creation](https://wiki.garrysmod.com/page/Gamemode%20Creation). For list of hooks, see [GM Hooks](https://wiki.garrysmod.com/page/Category:GM_Hooks). * While some of the fields may be serverside or clientside only, it is recommended to provide them on both so addons could use their values. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/FontData * @interface FontData * @description Used for @surface.CreateFont. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/EntityCopyData * @note 1=In addition to all fields listed here, any field saved on the entity will be saved as-is to this table. For example, if you set ent.FavoriteFood = "Steak" before duplicating it, this structure will also contain the field FavoriteFood with the value "Steak". * @interface EntityCopyData * @description Data structure used by the @duplicator library to store and load entity data. * It is created by @duplicator.CopyEntTable and can be loaded by @duplicator.CreateEntityFromTable. * It also shows up in several other contexts: * * @duplicator.RegisterEntityClass * * @EntityHooks:OnEntityCopyTableFinish * * @EntityHooks:OnDuplicated **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/ENT * @interface IEntity * @description Information about the ENT structure. * To learn more about scripted entities, [see this page](https://wiki.garrysmod.com/page/Scripted_Entities). * For list of callbacks, see [ENT Hooks](https://wiki.garrysmod.com/page/Category:ENTITY_Hooks). * While some of the fields may be serverside or clientside only, it is recommended to provide them on both so addons could use their values. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/EmitSoundInfo * @interface EmitSoundInfo * @description Passed as argument of @GamemodeHooks:EntityEmitSound. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/DynamicLight * @note This is an actual class named **dlight_t**, not a table. * @interface DynamicLight * @description Structure for @DynamicLight function. * All members are case insensitive. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/DebugInfo * @note If a filter is applied to @debug.getinfo, some members may not exist! * @interface DebugInfo * @description Table returned by @debug.getinfo. * For functions defined in C/C++, the following members will always have the given values: * * what = "C" * * source = "[C]" * * nparams = 0 * * isvararg = true * * namewhat = "" * * short_src = "[C]" * * linedefined = -1 * * currentline = -1 * * lastlinedefined = -1 **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/DateData * @interface DateData * @description Table returned by @os.date and used by @os.time. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/CreationMenus * @interface CreationMenus * @description Table that maintains information on the creation menu tabs. Each key of the table represents the name of the tab. See @spawnmenu.AddCreationTab and @spawnmenu.GetCreationTabs. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/Color * @interface IColor * @description Table created by the @Color function function and used in various situations. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/CollisionData * @note Sometimes, the value of 'Speed' can be different from getting the length calculated from 'OurOldVelocity', even though they should be the same, or close to same. It's recommended to do 'OurOldVelocity:Length()' instead. * ``` * ENT:PhysicsCollide( colData, collider ) * -- you may get two completely different values, and the second one should be more accurate. * print(colData.Speed) * print(colData.OurOldVelocity:Length()) * end * ``` * @interface CollisionData * @description Passed as argument of @EntityHooks:PhysicsCollide. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/CamData * @interface CamData * @description Table structure used @GamemodeHooks:CalcView and @GamemodeHooks:CalcVehicleView hook. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/Bullet * @interface Bullet * @description Tables used for bullets see @EntityFuncs:FireBullets and @GamemodeHooks:EntityFireBullets. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/BoneManipulationData * @interface BoneManipulationData * @description Structure used for storing/restoring bone manipulations. * Data is stored from @EntityFuncs:GetManipulateBoneScale, @EntityFuncs:GetManipulateBoneAngles, and @EntityFuncs:GetManipulateBonePosition. * Data is restored using @EntityFuncs:ManipulateBoneScale, @EntityFuncs:ManipulateBoneAngles, and @EntityFuncs:ManipulateBonePosition. * The function @duplicator.DoBoneManipulator and @EntityCopyData structure use a table * containing a BoneManipulationData structure for each bone (that has manipulations applied) with the bone ID as the struct index in the table. * Fields **s**, **a**, and **p** are set if they don't equal **Vector( 1, 1, 1 )**, **Angle( 0, 0, 0 )**, and **Vector( 0, 0, 0 )** respectively. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/AttachmentData * @interface AttachmentData * @description Table returned by @EntityFuncs:GetAttachments. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/BodyGroupData * @interface BodyGroupData * @description Table returned by @EntityFuncs:GetBodyGroups. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/AnimationData * @interface AnimationData * @description Table used by panel animation methods, primarily @Panel:AnimationThinkInternal, and returned by @Panel:NewAnimation. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/AngPos * @interface AngPos * @description Table used by various functions, such as @EntityFuncs:GetAttachment. **/ /** * @wiki https://wiki.garrysmod.com/page/Structures/AmmoData * @note Can also be a string pointing to a convar. The value will automatically update with the convar's. * @note Can also be a string pointing to a convar. The value will automatically update with the convar's. * @note Can also be a string pointing to a convar. The value will automatically update with the convar's. * @note gmod_maxammo will override this value if set to above 0. * @interface AmmoData * @description Table structure that describes a Source Engine ammo type. * See @game.AddAmmoType and @game.GetAmmoData. **/ declare interface Structures { } declare interface ViewData { /** * @origin {Vector}: The view's original position **/ origin: Vector /** * @angles {Angle}: The view's angles **/ angles: Angle /** * @aspectratio {number}: Default width divided by height **/ aspectratio: number /** * @x {number}: The x position of the viewport to render in **/ x: number /** * @y {number}: The y position of the viewport to render in **/ y: number /** * @w {number}: The width of the viewport to render in **/ w: number /** * @h {number}: The height of the viewport to render in **/ h: number /** * @drawhud {boolean}: Draw the HUD and call the hud painting related hooks **/ drawhud: boolean /** * @drawmonitors {boolean}: Draw monitors **/ drawmonitors: boolean /** * @drawviewmodel {boolean}: The weapon's viewmodel **/ drawviewmodel: boolean /** * @viewmodelfov {number}: The viewmodel's FOV **/ viewmodelfov: number /** * @fov {number}: The main view's FOV **/ fov: number /** * @ortho {boolean}: Render the view orthogonal. Can also be a table with these keys: ( In which case orthogonal view is automatically set to true ) * * left * * right * * top * * bottom **/ ortho: boolean /** * @ortholeft {number}: Coordinate for the left clipping plane **/ ortholeft: number /** * @orthoright {number}: Coordinate for the right clipping plane **/ orthoright: number /** * @orthotop {number}: Coordinate for the top clipping plane **/ orthotop: number /** * @orthobottom {number}: Coordinate for the bottom clipping plane **/ orthobottom: number /** * @znear {number}: The distance of the view's origin to the near clipping plane **/ znear: number /** * @zfar {number}: The distance of the view's origin to the far clipping plane **/ zfar: number /** * @znearviewmodel {number}: The distance of the view's origin to the near clipping plane for the viewmodel **/ znearviewmodel: number /** * @zfarviewmodel {number}: The distance of the view's origin to the far clipping plane for the viewmodel **/ zfarviewmodel: number /** * @dopostprocess {boolean}: Currently works identically to the "bloomtone" option (it also overrides it if you set this to false). **/ dopostprocess: boolean /** * @bloomtone {boolean}: Disables default engine bloom and pauses the "brightness changes" on HDR maps. **/ bloomtone: boolean /** * @offcenter {table}: This allows you to "zoom in" on a part of the screen - for example, the top-left quarter of the screen. This is similar to how [poster splits the screen](https://garry.tv/2012/02/25/poster-screenshots/) into separate renders. * It's a table with 4 keys, controlling what portion of the screen to draw: * * left - where the left edge starts. Natural value is 0. * * right - where the right edge ends. Natural value is equal to w (the width of the viewport). * * top - where the *bottom* edge starts. Natural value is 0. * * bottom - where the *top* edge ends. Natural value is equal to h (the height of the viewport). * Note that top and bottom are reversed. * Values outside the viewport are allowed, but not recommended - instead you should increase the view FOV. **/ offcenter: table } declare interface VideoData { /** * @container {string}: The video container format.**Valid options are:** webm, ogg **/ container: string /** * @video {string}: The video codec.**Valid options are:** vp8, theora **/ video: string /** * @audio {string}: The audio codec.**Valid options are:** vorbis **/ audio: string /** * @quality {number}: The video quality **/ quality: number /** * @bitrate {number}: The record bitrate **/ bitrate: number /** * @fps {number}: Frames per second **/ fps: number /** * @lockfps {boolean}: Lock the frame count per second **/ lockfps: boolean /** * @name {string}: The file name for the video **/ name: string /** * @width {number}: The videos width **/ width: number /** * @height {number}: The videos height **/ height: number } declare interface VehicleParamsSteering { /** * @boostSteeringRateFactor {number}: no description **/ boostSteeringRateFactor: number /** * @boostSteeringRestRateFactor {number}: no description **/ boostSteeringRestRateFactor: number /** * @brakeSteeringRateFactor {number}: no description **/ brakeSteeringRateFactor: number /** * @degreesBoost {number}: The maximum angle at which the vehicle can turn while boosting **/ degreesBoost: number /** * @degreesFast {number}: The maximum angle at which the vehicle can turn while moving at max speed and not boosting **/ degreesFast: number /** * @degreesSlow {number}: The maximum angle at which the vehicle can turn while moving slowest **/ degreesSlow: number /** * @dustCloud {boolean}: Disabled in Garry's Mod. In Half-Life 2: Episode 2 this dictates whether the vehicle should leave wheel dust effects when driving around **/ dustCloud: boolean /** * @isSkidAllowed {boolean}: Whether the vehicle is allowed to skid/drift **/ isSkidAllowed: boolean /** * @powerSlideAccel {number}: In Hammer Units **/ powerSlideAccel: number /** * @speedFast {number}: no description **/ speedFast: number /** * @speedSlow {number}: no description **/ speedSlow: number /** * @steeringExponent {number}: no description **/ steeringExponent: number /** * @steeringRateFast {number}: no description **/ steeringRateFast: number /** * @steeringRateSlow {number}: no description **/ steeringRateSlow: number /** * @steeringRestRateFast {number}: no description **/ steeringRestRateFast: number /** * @steeringRestRateSlow {number}: no description **/ steeringRestRateSlow: number /** * @throttleSteeringRestRateFactor {number}: no description **/ throttleSteeringRestRateFactor: number /** * @turnThrottleReduceFast {number}: no description **/ turnThrottleReduceFast: number /** * @turnThrottleReduceSlow {number}: no description **/ turnThrottleReduceSlow: number } declare interface VehicleParamsEngine { /** * @autobrakeSpeedFactor {number}: no description **/ autobrakeSpeedFactor: number /** * @autobrakeSpeedGain {number}: no description **/ autobrakeSpeedGain: number /** * @axleRatio {number}: This acts as the final ratio of the gearbox. * It's like a master coefficient of the gearbox. **/ axleRatio: number /** * @boostDelay {number}: Amount of seconds between being able to use the boost ( by pressing Shift key by default ) **/ boostDelay: number /** * @boostDuration {number}: Duration of the boost in seconds **/ boostDuration: number /** * @boostForce {number}: no description **/ boostForce: number /** * @boostMaxSpeed {number}: Maximum speed while boosting **/ boostMaxSpeed: number /** * @gearCount {number}: Amount of gears this vehicle has **/ gearCount: number /** * @gearRatio {table}: A table of numbers, of gear rations.Table length is equal to "gearCount" member of this table. **/ gearRatio: table /** * @horsepower {number}: The HP amount of the vehicle * This value is used to calculate the effectively applied torque, along with ratios and *maxRPM*. **/ horsepower: number /** * @isAutoTransmission {boolean}: If *true*, the gearbox shifts gears, if *false* the gearbox stays stuck to the 1st gear (gear number 0). **/ isAutoTransmission: boolean /** * @maxRPM {number}: Maximum RPM of the vehicle.Despite this being a maximum value, the vehicle can exceed it. **/ maxRPM: number /** * @maxRevSpeed {number}: Maximum reverse speed of the vehicle **/ maxRevSpeed: number /** * @maxSpeed {number}: Maximum forward going speed of the vehicle without boosting **/ maxSpeed: number /** * @shiftDownRPM {number}: Amount of RPM to automatically shift one gear down **/ shiftDownRPM: number /** * @shiftUpRPM {number}: Amount of RPM to automatically shift one gear up **/ shiftUpRPM: number /** * @throttleTime {number}: no description **/ throttleTime: number /** * @torqueBoost {boolean}: no description **/ torqueBoost: boolean } declare interface VehicleParamsBody { /** * @addGravity {number}: Additional gravity to be applied to the vehicle **/ addGravity: number /** * @counterTorqueFactor {number}: no description **/ counterTorqueFactor: number /** * @keepUprightTorque {number}: no description **/ keepUprightTorque: number /** * @massCenterOverride {Vector}: Mass center override **/ massCenterOverride: Vector /** * @massOverride {number}: Mass override **/ massOverride: number /** * @maxAngularVelocity {number}: Maximum angular velocity **/ maxAngularVelocity: number /** * @tiltForce {number}: no description **/ tiltForce: number /** * @tiltForceHeight {number}: no description **/ tiltForceHeight: number } declare interface VehicleParamsAxle { /** * @brakeFactor {number}: no description **/ brakeFactor: number /** * @offset {Vector}: no description **/ offset: Vector /** * @raytraceCenterOffset {Vector}: no description **/ raytraceCenterOffset: Vector /** * @raytraceOffset {Vector}: no description **/ raytraceOffset: Vector /** * @suspension_maxBodyForce {number}: no description **/ suspension_maxBodyForce: number /** * @suspension_springConstant {number}: no description **/ suspension_springConstant: number /** * @suspension_springDamping {number}: no description **/ suspension_springDamping: number /** * @suspension_springDampingCompression {number}: no description **/ suspension_springDampingCompression: number /** * @suspension_stabilizerConstant {number}: no description **/ suspension_stabilizerConstant: number /** * @torqueFactor {number}: no description **/ torqueFactor: number /** * @wheelOffset {Vector}: no description **/ wheelOffset: Vector /** * @wheels_brakeMaterialIndex {number}: Material index of braking material of the wheels. Upon braking, the wheels will be set to this material. **/ wheels_brakeMaterialIndex: number /** * @wheels_damping {number}: no description **/ wheels_damping: number /** * @wheels_frictionScale {number}: no description **/ wheels_frictionScale: number /** * @wheels_inertia {number}: no description **/ wheels_inertia: number /** * @wheels_mass {number}: Mass of each wheel. **/ wheels_mass: number /** * @wheels_materialIndex {number}: Material index of the wheels by default. **/ wheels_materialIndex: number /** * @wheels_radius {number}: Radius of the wheels. **/ wheels_radius: number /** * @wheels_rotdamping {number}: no description **/ wheels_rotdamping: number /** * @wheels_skidMaterialIndex {number}: Material index of skid material of the wheels. Upon skidding ( pressing Space and sliding the vehicle ), the wheels will be set to this material. **/ wheels_skidMaterialIndex: number /** * @wheels_springAdditionalLength {number}: no description **/ wheels_springAdditionalLength: number } declare interface VehicleParams { /** * @wheelsPerAxle {number}: Wheels per axle **/ wheelsPerAxle: number /** * @axleCount {number}: Number of axles **/ axleCount: number /** * @axles {VehicleParamsAxle[]}: A table of @VehicleParamsAxle structure tables. **/ axles: VehicleParamsAxle[] /** * @body {VehicleParamsBody}: See @VehicleParamsBody structure **/ body: VehicleParamsBody /** * @engine {VehicleParamsEngine}: See @VehicleParamsEngine structure **/ engine: VehicleParamsEngine /** * @steering {VehicleParamsSteering}: See @VehicleParamsSteering structure **/ steering: VehicleParamsSteering } declare interface Undo { /** * @Owner {Player}: The player responsible who owns the undo **/ Owner: Player /** * @Name {string}: The name of the text to report to the player **/ Name: string /** * @Entities {table}: A table of entities to be removed by the undo **/ Entities: table /** * @Functions {table}: A table of {function_to_call, func_arg2, func_arg3} **/ Functions: table /** * @CustomUndoText {string}: A custom undo text to show the client **/ CustomUndoText: string } declare interface UGCFileInfo { /** * @id {number}: The Workshop item ID **/ id: number /** * @title {string}: The title of the Workshop item **/ title: string /** * @description {string}: The description of the Workshop item **/ description: string /** * @fileid {number}: The internal File ID of the workshop item, if any **/ fileid: number /** * @previewid {number}: The internal File ID of the workshop item preview, if any **/ previewid: number /** * @owner {number}: The SteamID64 of the original uploader of the addon **/ owner: number /** * @created {number}: Unix timestamp of when the item was created **/ created: number /** * @updated {number}: Unix timestamp of when the file was last updated **/ updated: number /** * @banned {boolean}: Whether the file is banned or not **/ banned: boolean /** * @tags {string}: Comma (,) separated list of tags, may be truncated to some length **/ tags: string /** * @size {number}: File size of the workshop item contents **/ size: number /** * @previewsize {number}: Filesize of the preview file **/ previewsize: number /** * @installed {boolean}: If the addon is subscribed, this value represents whether it is installed on the client and its files are accessible, false otherwise. **/ installed: boolean /** * @disabled {boolean}: If the addon is subscribed, this value represents whether it is disabled on the client, false otherwise. **/ disabled: boolean /** * @children {table}: A list of child Workshop Items for this item. * For collections this will be sub-collections, for workshop items this will be the items they depend on. **/ children: table /** * @ownername {string}: The "nice" name of the Uploader, or "Unnammed Player" if we failed to get the data for some reason. * Do not use this field as it will most likely not be updated in time. Use @steamworks.RequestPlayerInfo instead. **/ ownername: string /** * @error {number}: If this key is set, no other data will be present in the response. * Values above 0 represent Steam Error codes, values below 0 mean the following: * * -1 means Failed to create query * * -2 means Failed to send query * * -3 means Received 0 or more than 1 result * * -4 means Failed to get item data from the response * * -5 means Workshop item ID in the response is invalid * * -6 means Workshop item ID in response is mismatching the requested file ID **/ error: number } declare interface Trace { /** * @start {Vector}: The start position of the trace **/ start: Vector /** * @endpos {Vector}: The end position of the trace **/ endpos: Vector /** * @filter {Entity}: Things the trace should not hit. Can also be a table of entities or a function with one argument: * Return true in the function to hit the entity, false to skip it. **/ filter: Entity /** * @mask {MASK | CONTENTS}: The trace mask @MASK enum. This determines what the trace should hit and what it shouldn't hit. A mask is a combination of @CONTENTS enum - you can use these for more advanced masks. **/ mask: MASK | CONTENTS /** * @collisiongroup {COLLISION_GROUP}: The collision group @COLLISION_GROUP enum. This determines what the trace should hit in regards to the entity's collision group. **/ collisiongroup: COLLISION_GROUP /** * @ignoreworld {boolean}: Should the trace ignore world or not **/ ignoreworld: boolean /** * @output {table}: If set, the trace result will be written to the supplied table instead of returning a new table **/ output: table } declare interface TraceResult { /** * @Entity {Entity}: The entity hit by the trace. **/ Entity: Entity /** * @Fraction {number}: This indicates the how much of your trace length was used from 0-1 (resultLength/originalLength). **/ Fraction: number /** * @FractionLeftSolid {number}: Given the trace started in a solid enviroment, this will return at what distance the trace left the solid from 0-1. Doesn't work if the trace hit a non-worldspawn entity. **/ FractionLeftSolid: number /** * @Hit {boolean}: Indicates whether the trace hit something. **/ Hit: boolean /** * @HitBox {number}: The ID of the hitbox hit by the trace. **/ HitBox: number /** * @HitGroup {HITGROUP}: @HITGROUP enum describing what hitgroup the trace hit (not the same as HitBox). **/ HitGroup: HITGROUP /** * @HitNoDraw {boolean}: Indicates whenever the trace hit a no-draw brush. **/ HitNoDraw: boolean /** * @HitNonWorld {boolean}: Indicates whenever the trace did not hit the world. **/ HitNonWorld: boolean /** * @HitNormal {Vector}: The direction of the surface that was hit as a normal vector (vector with [length](https://wiki.garrysmod.com/page/Vector/Length) of 1). **/ HitNormal: Vector /** * @HitPos {Vector}: The position the trace stopped. This will be the provided endpos if the trace hit nothing. **/ HitPos: Vector /** * @HitSky {boolean}: Indicates whenever the trace hit the sky. **/ HitSky: boolean /** * @HitTexture {string}: The surface material (not texture) of whatever the trace hit. Will be "**displacement**" if the trace hit a displacement, and **studio** if it hit a prop. **/ HitTexture: string /** * @HitWorld {boolean}: Indicates whenever the trace hit the world. **/ HitWorld: boolean /** * @MatType {MAT}: @MAT enum of the material hit by the trace. **/ MatType: MAT /** * @Normal {Vector}: The direction of the trace as a normal vector (vector with [length](https://wiki.garrysmod.com/page/Vector/Length) of 1). **/ Normal: Vector /** * @PhysicsBone {number}: The @PhysObj type ID that was hit. * Used for @EntityFuncs:GetPhysicsObjectNum. **/ PhysicsBone: number /** * @StartPos {Vector}: The origin of the trace. Will match the provided startpos. **/ StartPos: Vector /** * @SurfaceProps {number}: ID of hit surface property from scripts/surfaceproperties.txt. * You can get the name using @util.GetSurfacePropName. * Used for @CEffectData:SetSurfaceProp. **/ SurfaceProps: number /** * @StartSolid {boolean}: Indicates whenever the trace started in a solid enviroment. **/ StartSolid: boolean /** * @AllSolid {boolean}: True if the entire trace is inside a solid. **/ AllSolid: boolean /** * @SurfaceFlags {SURF}: The surface flags of the hit surface. See @SURF enum. **/ SurfaceFlags: SURF /** * @DispFlags {DISPSURF}: The displacement flags of the hit surface. See @DISPSURF enum. **/ DispFlags: DISPSURF /** * @Contents {CONTENTS}: The contents of the hit surface. See @CONTENTS enum. **/ Contents: CONTENTS } declare interface ToScreenData { /** * @x {number}: The x coordinate on the players screen **/ x: number /** * @y {number}: The y coordinate on the players screen **/ y: number /** * @visible {boolean}: The coordinate is not behind the player. **This does not mean the coordinate is on the screen.** When this is false, it means that the coordinate would not be on the screen even if the player had a full 180 degree FOV. **/ visible: boolean } declare interface TextureData { /** * @texture {number}: surface.GetTextureID number of the texture to be drawn. **/ texture: number /** * @x {number}: The x Coordinate. **/ x: number /** * @y {number}: The y Coordinate. **/ y: number /** * @w {number}: The width of the texture. **/ w: number /** * @h {number}: The height of the texture. **/ h: number /** * @color {Color}: The texture color. See @IColor structure. **/ color: Color } declare interface ITool { /** * @AddToMenu {boolean}: If set to false, the tool won't be added to the tool menu and players will have to access it by other means. **/ AddToMenu: boolean /** * @Category {string}: The tool menu category under which the tool should be listed. **/ Category: string /** * @Command {string}: The console command to execute upon being selected in the Q menu. **/ Command: string /** * @Name {string}: The name of the tool in the Q menu. * Common practice is to set this to "#tool.[lua filename].name" to match the name displayed in the tool information box. **/ Name: string /** * @ClientConVar {table}: A key-value ( convar name-default value ) table containing the client-side convars to create. All convars will be prefixed with the filename of the tool. * You can later use @ToolFuncs:GetClientNumber or @ToolFuncs:GetClientInfo to retrieve these values. **/ ClientConVar: table /** * @ServerConVar {table}: Same as above, but created server-side instead. **/ ServerConVar: table /** * @BuildCPanel {DForm}: The function that is called to build the context menu for your tool. It has one argument, namely the context menu's base panel to which all of your custom panels are going to be parented to. * While it might sound like a hook, it isn't - you won't receive a self argument inside the function. The only argument you will receive is a @DForm type that represents the CPanel. **/ BuildCPanel: DForm /** * @Information {table}: Allows you to override the tool usage information shown when the tool is equipped. * See [Tool Information Display](https://wiki.garrysmod.com/page/Tool%20Information%20Display) for more information. **/ Information: table /** * @Mode {string}: Class name of the tool. (name of the .lua file) * This is set automatically. **/ Mode: string } declare interface TextData { /** * @text {string}: Text to be drawn. **/ text: string /** * @font {string}: The font to draw with. List of default fonts can be found [here](https://wiki.garrysmod.com/page/Default_Fonts). **/ font: string /** * @pos {table}: This holds the X and Y coordinates. Key value 1 is x, key value 2 is y. **/ pos: table /** * @xalign {TEXT_ALIGN}: The alignment of the X position. See @TEXT_ALIGN enum **/ xalign: TEXT_ALIGN /** * @yalign {TEXT_ALIGN}: The alignment of the Y position. See @TEXT_ALIGN enum **/ yalign: TEXT_ALIGN /** * @color {Color}: The text color **/ color: Color } declare interface TeamData { /** * @Color {Color}: Color of the team **/ Color: Color /** * @Joinable {boolean}: Whether the team is joinable or not. **/ Joinable: boolean /** * @Name {string}: Name of the team **/ Name: string /** * @Score {number}: Score of the team **/ Score: number } declare interface SurfacePropertyData { /** * @name {string}: The name of the surface property, identical to @util.GetSurfacePropName. **/ name: string /** * @hardnessFactor {number}: How hard a surface is. If this is greater than or equal to another surfaces's hardThreshold, a hard impact sound will be used. **/ hardnessFactor: number /** * @hardThreshold {number}: Hardness threshold for impact sounds. HitSurface.hardnessFactor >= InflictorSurface.hardThreshold - hard impact sound (depends on hardVelocityThreshold's value), HitSurface.hardnessFactor = HitSurface.hardVelocityThreshold - hard impact sound (depends on hardThreshold's value), impactSpeed = InflictorSurface.roughThreshold - rough friction sound, HitSurface.roughnessFactor 0 - true. **/ hardThreshold: number /** * @jumpFactor {number}: Scalar multiplier for player jump height - or more accurately, applied z-axis velocity on a surface. For example, 1 - normal jump, 2 - twice as high, and 0.5 - half as high. **/ jumpFactor: number /** * @material {MAT}: The surface material. See @MAT enum. **/ material: MAT /** * @maxSpeedFactor {number}: Scalar multiplier for player speed. Achieves this by multiplying @CMoveData:SetMaxSpeed in @GamemodeHooks:Move. **/ maxSpeedFactor: number /** * @dampening {number}: This is the physical drag on an object when in contact with this surface (0 - x, 0 none to x a lot). **/ dampening: number /** * @density {number}: Material density in kg / m^3 (water is 1000). If a surface's density is < 1000, it will float in water. This is used to calculate the total mass of an object. **/ density: number /** * @elasticity {number}: Collision elasticity - used to compute coefficient of restitution represented as a number 0.0 - 1.0. 0.01 is soft, 1.0 is hard. **/ elasticity: number /** * @friction {number}: Physical friction used to slow entities touching the surface represented as a number 0.0 - 1.0. 0.01 is slick, 1.0 is completely rough. **/ friction: number /** * @thickness {number}: Material thickness. If this is 0, the material is not volumetrically solid, and thus the object mass will be calculated as "volume * 0.0254^3 * density" where 0.0254 is meters per inch. If non-zero, the mass will be "surfacearea * thickness * 0.0254^3 * density". **/ thickness: number /** * @breakSound {string}: Sound to play when a prop or func_breakable is broken. **/ breakSound: string /** * @bulletImpactSound {string}: Bullet impact sound with this surface. **/ bulletImpactSound: string /** * @impactHardSound {string}: Physical impact sound when hitting surfaces hard. **/ impactHardSound: string /** * @impactSoftSound {string}: Physical impact sound when hitting surfaces softly. **/ impactSoftSound: string /** * @rollingSound {string}: Unused sound. **/ rollingSound: string /** * @scrapeRoughSound {string}: Friction sound when roughly scraping against an entity. **/ scrapeRoughSound: string /** * @scrapeSmoothSound {string}: Friction sound when smoothly scraping against an entity. **/ scrapeSmoothSound: string /** * @stepLeftSound {string}: Footstep sound for left foot. **/ stepLeftSound: string /** * @stepRightSound {string}: Footstep sound for right foot. **/ stepRightSound: string /** * @strainSound {string}: Unused sound. **/ strainSound: string } declare interface IWeapon { /** * @ClassName {string}: Entity class name of the SWEP (file or folder name of your SWEP). This is set automatically **/ ClassName: string /** * @Category {string}: (Clientside) Category the SWEP is in **/ Category: string /** * @Spawnable {boolean}: Whether this SWEP should be displayed in the Q menu **/ Spawnable: boolean /** * @AdminOnly {boolean}: Whether or not only admins can spawn the SWEP from their Q menu **/ AdminOnly: boolean /** * @PrintName {string}: Nice name of the SWEP **/ PrintName: string /** * @Base {string}: The base weapon to derive from. This **must** be a Lua weapon **/ Base: string /** * @m_WeaponDeploySpeed {number}: Multiplier of deploy speed **/ m_WeaponDeploySpeed: number /** * @Owner {Entity}: The entity that owns/wields this SWEP, if any **/ Owner: Entity /** * @Author {string}: (Clientside) The author of the SWEP to be shown in weapon selection **/ Author: string /** * @Contact {string}: (Clientside) The contacts of the SWEP creator to be shown in weapon selection **/ Contact: string /** * @Purpose {string}: (Clientside) The purpose of the SWEP creator to be shown in weapon selection **/ Purpose: string /** * @Instructions {string}: (Clientside) How to use your weapon, to be shown in weapon selection **/ Instructions: string /** * @ViewModel {string}: Path to the view model for your SWEP (what the wielder will see) **/ ViewModel: string /** * @ViewModelFlip {boolean}: (Clientside) Should we flip the view model? This is needed for some CS:S view models **/ ViewModelFlip: boolean /** * @ViewModelFlip1 {boolean}: (Clientside) Same as ViewModelFlip, but for the second viewmodel **/ ViewModelFlip1: boolean /** * @ViewModelFlip2 {boolean}: (Clientside) Same as ViewModelFlip, but for the third viewmodel **/ ViewModelFlip2: boolean /** * @ViewModelFOV {number}: (Clientside) An angle of FOV used for the view model (Half-Life value is 90; Half-Life 2 is 54; Counter-Strike: Source is 74; Day of Defeat: Source is 45) **/ ViewModelFOV: number /** * @WorldModel {string}: The world model for your SWEP (what you will see in other players hands) **/ WorldModel: string /** * @AutoSwitchFrom {boolean}: (Serverside) Whether this weapon can be autoswitched away from when the player runs out of ammo in this weapon or picks up another weapon or ammo **/ AutoSwitchFrom: boolean /** * @AutoSwitchTo {boolean}: (Serverside) Whether this weapon can be autoswitched to when the player runs out of ammo in their current weapon or they pick this weapon up **/ AutoSwitchTo: boolean /** * @Weight {number}: (Serverside) Decides whether we should switch from/to this **/ Weight: number /** * @BobScale {number}: (Clientside) The scale of the viewmodel bob (viewmodel movement from left to right when walking around) **/ BobScale: number /** * @SwayScale {number}: (Clientside) The scale of the viewmodel sway (viewmodel position lerp when looking around). **/ SwayScale: number /** * @BounceWeaponIcon {boolean}: (Clientside) Should the weapon icon bounce in weapon selection? **/ BounceWeaponIcon: boolean /** * @DrawWeaponInfoBox {boolean}: (Clientside) Should draw the weapon selection info box, containing SWEP.Instructions, etc. **/ DrawWeaponInfoBox: boolean /** * @DrawAmmo {boolean}: (Clientside) Should we draw the default HL2 ammo counter? **/ DrawAmmo: boolean /** * @DrawCrosshair {boolean}: (Clientside) Should we draw the default crosshair? **/ DrawCrosshair: boolean /** * @RenderGroup {RENDERGROUP}: (Clientside) The SWEP render group, see @RENDERGROUP enum **/ RenderGroup: RENDERGROUP /** * @Slot {number}: Slot in the weapon selection menu, starts with 0 **/ Slot: number /** * @SlotPos {number}: Position in the slot, should be in the range 0-128 **/ SlotPos: number /** * @SpeechBubbleLid {number}: (Clientside) Internal variable for drawing the info box in weapon selection **/ SpeechBubbleLid: number /** * @WepSelectIcon {number}: (Clientside) Path to an texture. Override this in your SWEP to set the icon in the weapon selection. This must be the texture ID, see @surface.GetTextureID **/ WepSelectIcon: number /** * @CSMuzzleFlashes {boolean}: (Clientside) Should we use Counter-Strike muzzle flashes upon firing? This is required for DoD:S or CS:S view models to fix their muzzle flashes. **/ CSMuzzleFlashes: boolean /** * @CSMuzzleX {boolean}: (Clientside) Use the X shape muzzle flash instead of the default Counter-Strike muzzle flash. Requires CSMuzzleFlashes to be set to true **/ CSMuzzleX: boolean /** * @Primary {IStructuresIWeaponPrimary}: Primary attack settings. The table contains these fields: **/ Primary: IStructuresIWeaponPrimary /** * @Secondary {table}: Secondary attack settings, has same fields as Primary attack settings **/ Secondary: table /** * @UseHands {boolean}: (Clientside) Makes the player models hands bonemerged onto the view model **/ UseHands: boolean /** * @Folder {string}: The folder from where the weapon was loaded. This should always be "weapons/weapon_myweapon", regardless whether your SWEP is stored as a file, or multiple files in a folder. It is set automatically on load **/ Folder: string /** * @AccurateCrosshair {boolean}: (Clientside) Makes the default SWEP crosshair be positioned in 3D space where your aim actually is (like on Jeep), instead of simply sitting in the middle of the screen at all times **/ AccurateCrosshair: boolean /** * @DisableDuplicator {boolean}: Disable the ability for players to duplicate this SWEP **/ DisableDuplicator: boolean /** * @ScriptedEntityType {string}: (Clientside) Sets the spawnmenu content icon type for the entity, used by spawnmenu in the Sandbox-derived gamemodes. * See @spawnmenu.AddContentType for more information. **/ ScriptedEntityType: string /** * @m_bPlayPickupSound {boolean}: If set to false, the weapon will not play the weapon pick up sound when picked up. **/ m_bPlayPickupSound: boolean } declare interface IStructuresIWeaponPrimary { /** * Ammo - {string}: Ammo type ("Pistol", "SMG1" etc) **/ Ammo: string /** * ClipSize - {number}: The maximum amount of bullets one clip can hold **/ ClipSize: number /** * DefaultClip - {number}: Default ammo in the clip, making it higher than ClipSize will give player additional ammo on spawn **/ DefaultClip: number /** * Automatic - {boolean}: If true makes the weapon shoot automatically as long as the player has primary attack button held down **/ Automatic: boolean } declare interface SunInfo { /** * @direction {Vector}: The suns direction relative to 0,0,0 **/ direction: Vector /** * @obstruction {number}: Indicates how obstructed the sun is, 1 not visible, 0 fully visible **/ obstruction: number } declare interface SoundData { /** * @channel {CHAN}: The sound channel to play in. See @CHAN enum **/ channel: CHAN /** * @name {string}: The name of the sound. **/ name: string /** * @pitchend {number}: The pitch end. Deprecated, use pitch. **/ pitchend: number /** * @pitchstart {number}: The initial pitch. Deprecated, use pitch. **/ pitchstart: number /** * @level {SNDLVL}: The soundlevel of the sound in dB. See @SNDLVL enum. **/ level: SNDLVL /** * @sound {string}: The sound file to be used in this sound effect. Can be a table of sound files. Relative to "sound" directory (must be in a subfolder, so sound/test.wav will not work). **/ sound: string /** * @volume {number}: The volume of the sound as a decimal between 0 and 1. Can be a table of two numbers, a minimum and a maximum value. **/ volume: number /** * @pitch {number}: The pitch of the sound. Can be a table of two numbers, a minimum and a maximum value. **/ pitch: number } declare interface ServerQueryData { /** * @GameDir {string}: The game directory to get the servers for **/ GameDir: string /** * @Type {string}: Type of servers to retrieve. Valid values are: * * "internet" * * "favorite" * * "history" * * "lan" **/ Type: string /** * @AppID {number}: Steam application ID to get the servers for **/ AppID: number /** * @Callback {function}: Called when a new server is found and queried. Arguments: * Return false to stop the query. **/ Callback: StructuresServerQueryDataCallback /** * @Finished {function}: Called when the query is finished. No arguments **/ Finished: UnknownFunc } declare interface SequenceInfo { /** * @label {string}: Name of the sequence. **/ label: string /** * @activityname {string}: Name of the activity this sequence is attached to. **/ activityname: string /** * @activity {ACT}: The activity ID associated with this sequence. See @ACT enum. **/ activity: ACT /** * @actweight {number}: How likely this sequence is to be picked when playing an activity its attached to. -1 means this is the only sequence for that activity. (needs validation) **/ actweight: number /** * @flags {number}: The looping and other flags of this sequence. **/ flags: number /** * @numevents {number}: Number of animation events this sequence has. **/ numevents: number /** * @numblends {number}: no description **/ numblends: number /** * @bbmin {number}: Mins part of the bounding box for this sequence **/ bbmin: number /** * @bbmax {number}: Maxs part of the bounding box for this sequence **/ bbmax: number /** * @fadeintime {number}: ideal cross fade in time (0.2 default) **/ fadeintime: number /** * @fadeouttime {number}: ideal cross fade out time (0.2 default) **/ fadeouttime: number /** * @localentrynode {number}: transition node at entry **/ localentrynode: number /** * @localexitnode {number}: transition node at exit **/ localexitnode: number /** * @nodeflags {number}: Transition rules **/ nodeflags: number /** * @lastframe {number}: Frame that should generate EndOFSequence **/ lastframe: number /** * @nextseq {number}: If non 0, the next sequence for auto advancing sequences **/ nextseq: number /** * @pose {number}: no description **/ pose: number /** * @cycleposeindex {number}: If non 0, index of pose parameter to be used as cycle index. This means that the sequence playback will be controlled by a pose parameter. **/ cycleposeindex: number /** * @anims {table}: A 1-based array of all animationIDs associated with this sequence. For use with @EntityFuncs:GetAnimInfo. **/ anims: table } declare interface RenderCaptureData { /** * @format {string}: Format of the capture. Valid formats are: jpeg, png **/ format: string /** * @x {number}: X coordinate of the capture origin **/ x: number /** * @y {number}: Y coordinate of the capture origin **/ y: number /** * @w {number}: Width of the capture **/ w: number /** * @h {number}: Height of the capture **/ h: number /** * @quality {number}: The quality of the capture. Affects jpeg only. **/ quality: number /** * @alpha {boolean}: Set to false to capture an image with alpha channel set to fully opaque. Affects png only. **/ alpha: boolean } declare interface RenderCamData { /** * @x {number}: The x position of the view port **/ x: number /** * @y {number}: The y position of the view port **/ y: number /** * @w {number}: The width of the view port **/ w: number /** * @h {number}: The height of the view port **/ h: number /** * @type {string}: The type of cam. Valid types are: * * "2D" - No additional arguments are required * * "3D" - Only origin and angles are needed, all other parameters are optional. **/ type: string /** * @origin {Vector}: The position to render from **/ origin: Vector /** * @angles {Angle}: The angles to render from **/ angles: Angle /** * @fov {number}: The field of view **/ fov: number /** * @aspect {number}: The aspect ratio of the view port (Note that this is NOT set to w/h by default) **/ aspect: number /** * @zfar {number}: The distance to the far clipping plane **/ zfar: number /** * @znear {number}: The distance to the near clipping plane **/ znear: number /** * @subrect {boolean}: Set to true if this is to draw into a subrect of the larger screen. **/ subrect: boolean /** * @bloomtone {boolean}: m_bDoBloomAndToneMapping **/ bloomtone: boolean /** * @offcenter {table}: A table having these keys: ( all floats ) * * left * * right * * bottom * * top **/ offcenter: table /** * @ortho {table}: If set, makes the view/camera orthogonal. A table having these keys: ( all floats ) * * left * * right * * bottom * * top **/ ortho: table } declare interface PropertyAdd { /** * @Type {string}: Can be set to "toggle" to make this property a toggle property. **/ Type: string /** * @MenuLabel {string}: Label to show on opened menu **/ MenuLabel: string /** * @MenuIcon {string}: Icon to show on opened menu for this item. Optional for simple properties and unused for toggle properties. **/ MenuIcon: string /** * @Order {number}: Where in the list should the property be positioned, relative to other properties. * For reference, here are the default properties and their Order values: * { * class="mw-collapsible mw-collapsed wikitable" * ! Property * ! Order * *- * * Make Persistent * * 400 * *- * * Bone Manipulate * * 500 * *- * * Bodygroups * * 600 * *- * * Skin * * 601 * *- * * Keep Upright * * 900 * *- * * Ignite/Extinguish * * 999 * *- * * Remove * * 1000 * *- * * Gravity * * 1001 * *- * * Drive * * 1100 * *- * * Collision * * 1500 * *- * * Statue * * 1501 * *- * * NPC Biggify/Smallify * * 1799, 1800 * *- * * Motion Control (Kinect) * * 2500 * *- * * [Edit Properties](https://wiki.garrysmod.com/page/Editable%20Entities) * * 90001 * * } **/ Order: number /** * @PrependSpacer {boolean}: Whether to add a spacer before this property. This should generally be true for the first property in a group of properties. **/ PrependSpacer: boolean /** * @Filter {function}: Used **clientside** to decide whether this property should be shown for an entity. Gets these arguments: * Return true if the property should be shown for this entity. It's good practice to call @SandboxHooks:CanProperty in this hook via @gamemode.Call or @hook.Run. **/ Filter: StructuresPropertyAddFilter /** * @Checked {function}: Required for toggle properties (clientside). Must return a boolean value to either check or uncheck the toggle property. **/ Checked: StructuresPropertyAddChecked /** * @Action {function}: Called **clientside** when the property is clicked with these arguments: * When appropriate, within this function you can call self:MsgStart(), write data with the @net library 'Write' functions, and finish with self:MsgEnd(). This will activate the 'Receive' function on the server. In most cases, you will want to send the entity to the server, as it's not done by default. **/ Action: StructuresPropertyAddAction /** * @Receive {function}: Called **serverside** if the client sends a message in the 'Action' function (see above). * You can read data received from the client with the @net library 'Read' functions. It's good practice to check @SandboxHooks:CanProperty here via @gamemode.Call or @hook.Run. **/ Receive: StructuresPropertyAddReceive /** * @MenuOpen {function}: Called **clientside** when the property option has been created in the right-click menu. This is not called for toggle properties! **/ MenuOpen: StructuresPropertyAddMenuOpen /** * @OnCreate {function}: Same as MenuOpen, but also called for toggle properties and has different arguments. This is called immediately after MenuOpen, but nothing happens in between so you should only ever use one or the other. **/ OnCreate: StructuresPropertyAddOnCreate } declare interface PolygonVertex { /** * @x {number}: The x coordinate of the vertex. **/ x: number /** * @y {number}: The y coordinate of the vertex. **/ y: number /** * @u {number}: The u texture coordinate of the vertex. *Can be left blank.* **/ u: number /** * @v {number}: The v texture coordinate of the vertex. *Can be left blank.* **/ v: number } declare interface PLAYER { /** * @DisplayName {string}: The 'nice' name of the player class for display in User Interface and such. **/ DisplayName: string /** * @WalkSpeed {number}: How fast to move when not running **/ WalkSpeed: number /** * @RunSpeed {number}: How fast to move when running/sprinting **/ RunSpeed: number /** * @CrouchedWalkSpeed {number}: Multiply walk speed by this when crouching **/ CrouchedWalkSpeed: number /** * @DuckSpeed {number}: How fast to go from not ducking, to ducking **/ DuckSpeed: number /** * @UnDuckSpeed {number}: How fast to go from ducking, to not ducking **/ UnDuckSpeed: number /** * @JumpPower {number}: How powerful a jump should be **/ JumpPower: number /** * @CanUseFlashlight {boolean}: Can the player use the flashlight **/ CanUseFlashlight: boolean /** * @MaxHealth {number}: Max health we can have **/ MaxHealth: number /** * @StartHealth {number}: How much health we start with **/ StartHealth: number /** * @StartArmor {number}: How much armour we start with **/ StartArmor: number /** * @DropWeaponOnDie {boolean}: Do we drop our weapon when we die **/ DropWeaponOnDie: boolean /** * @TeammateNoCollide {boolean}: Do we collide with teammates or run straight through them **/ TeammateNoCollide: boolean /** * @AvoidPlayers {boolean}: Automatically swerves around other players **/ AvoidPlayers: boolean /** * @UseVMHands {boolean}: Uses viewmodel hands **/ UseVMHands: boolean } declare interface PhysProperties { /** * @GravityToggle {boolean}: Enables or disables gravity for the entity **/ GravityToggle: boolean /** * @Material {string}: Sets the physics material for the entity **/ Material: string } declare interface PhysicsObjectSave { /** * @Pos {Vector}: The entity's world position made local with @WorldToLocal function **/ Pos: Vector /** * @Angle {Angle}: The entity's world angles made local with @WorldToLocal function **/ Angle: Angle /** * @Frozen {boolean}: Whether the entity is moveable. Equal to (*not* @PhysObj:IsMoveable) **/ Frozen: boolean /** * @NoGrav {boolean}: Whether the entity's gravity is affected by gravity or not. @PhysObj:IsGravityEnabled **/ NoGrav: boolean /** * @Sleep {boolean}: Whether the entity is dormant or not. @PhysObj:IsAsleep **/ Sleep: boolean } declare interface PhysEnvPerformanceSettings { /** * @LookAheadTimeObjectsVsObject {number}: Maximum amount of seconds to precalculate collisions with objects. **/ LookAheadTimeObjectsVsObject: number /** * @LookAheadTimeObjectsVsWorld {number}: Maximum amount of seconds to precalculate collisions with world. **/ LookAheadTimeObjectsVsWorld: number /** * @MaxAngularVelocity {number}: Maximum rotation velocity. **/ MaxAngularVelocity: number /** * @MaxCollisionChecksPerTimestep {number}: Maximum collision checks per tick. **/ MaxCollisionChecksPerTimestep: number /** * @MaxCollisionsPerObjectPerTimestep {number}: Maximum collision per object per tick. **/ MaxCollisionsPerObjectPerTimestep: number /** * @MaxFrictionMass {number}: Maximum mass of an object to be affected by friction. **/ MaxFrictionMass: number /** * @MaxVelocity {number}: Maximum speed of an object. **/ MaxVelocity: number /** * @MinFrictionMass {number}: Minimum mass of an object to be affected by friction. **/ MinFrictionMass: number } declare interface PathSegment { /** * @area {CNavArea}: The navmesh area this segment occupies. **/ area: CNavArea /** * @curvature {number}: How much of a curve should the bot execute when navigating this segment. 0 = none, 1 = 180° **/ curvature: number /** * @distanceFromStart {number}: Distance of this segment from the start of the path. **/ distanceFromStart: number /** * @forward {Vector}: The direction of travel to reach the end of this segment from the start, represented as a normalised vector. **/ forward: Vector /** * @how {number}: The direction of travel to reach the end of this segment from the start, represented as a cardinal direction integer 0 to 3, or 9 for vertical movement. **/ how: number /** * @ladder {CNavLadder}: The navmesh ladder this segment occupies, if any. **/ ladder: CNavLadder /** * @length {number}: Length of this segment. **/ length: number /** * @m_portalCenter {Vector}: no description **/ m_portalCenter: Vector /** * @m_portalHalfWidth {number}: no description **/ m_portalHalfWidth: number /** * @pos {Vector}: The position of the end of this segment. **/ pos: Vector /** * @type {number}: The movement type of this segment, indicating how bots are expected to move along this segment. * * 0 is ground movement * * 1 is falling down * * 2 is climbing up or jumping * * 3 is jumping over a gap * * 4 is climbing a ladder up (unused) * * 5 is climbing a ladder down (unused) **/ type: number } declare interface OperatingParams { /** * @RPM {number}: The current RPM of the vehicle **/ RPM: number /** * @gear {number}: The current gear of the vehicle, starting from 0 **/ gear: number /** * @isTorqueBoosting {boolean}: Is the vehicle boosting? **/ isTorqueBoosting: boolean /** * @speed {number}: The current speed, in inches per second **/ speed: number /** * @steeringAngle {number}: Steering angle **/ steeringAngle: number /** * @wheelsInContact {number}: Wheels on ground **/ wheelsInContact: number } declare interface MeshVertex { /** * @color {Color}: The vertex color. Uses the @IColor structure. **/ color: Color /** * @normal {Vector}: The triangles normal required to calculate lighting(optional). **/ normal: Vector /** * @tangent {Vector}: The triangles tangent. Not used by the VertexLitGeneric shader. **/ tangent: Vector /** * @binormal {Vector}: The triangles binormal. Not used by the VertexLitGeneric shader. **/ binormal: Vector /** * @pos {Vector}: The vertex position. **/ pos: Vector /** * @u {number}: The u texture scale. **/ u: number /** * @v {number}: The v texture scale. **/ v: number /** * @userdata {table}: A table of four numbers. This is used by most shaders in Source to hold tangent information of the vertex ( tangentX, tangentY, tangentZ, tangentHandedness ). **/ userdata: table } declare interface MatProxyData { /** * @name {string}: The name of the material proxy **/ name: string /** * @init {function}: The function used to get variables from the ".vmt". Called once per each ".vmt". Arguments are: **/ init: StructuresMatProxyDataInit /** * @bind {function}: The function used to apply the proxy. This is called every frame while any materials with this proxy are used in world. Arguments are: **/ bind: StructuresMatProxyDataBind } declare interface LocalLight { /** * @type {MATERIAL_LIGHT}: The type of the light source, see @MATERIAL_LIGHT enum. **/ type: MATERIAL_LIGHT /** * @color {Vector}: The color of the light source (x is red, y is green, z is blue). Values are not restricted to a specific range, higher values will result in a brighter light. **/ color: Vector /** * @pos {Vector}: The origin of the light in world coordinates. **/ pos: Vector /** * @dir {Vector}: The direction of the light. Only required for directional and spot lights. **/ dir: Vector /** * @range {number}: The maximum range of the light source. Does not actually control light attenuation. Usually left at 0 for infinite range. **/ range: number /** * @angularFalloff {number}: Angular falloff exponent for spot lights. Higher values result in a sharper transition between the inner cone and the outer cone. **/ angularFalloff: number /** * @innerAngle {number}: The inner cone angle for spot lights, in degrees. No angular falloff will occur inside that cone. **/ innerAngle: number /** * @outerAngle {number}: The outer cone angle for spot lights, in degrees. **/ outerAngle: number /** * @fiftyPercentDistance {number}: The distance at which the light will fade to 50% of its brightness. **/ fiftyPercentDistance: number /** * @zeroPercentDistance {number}: The distance at which the light will completely fade out. **/ zeroPercentDistance: number /** * @quadraticFalloff {number}: The quadratic term of the light falloff. This will only be used if fiftyPercentDistance and zeroPercentDistance are not supplied, and allows finer control over light attenuation. **/ quadraticFalloff: number /** * @linearFalloff {number}: The linear term of the light falloff. This will only be used if fiftyPercentDistance and zeroPercentDistance are not supplied, and allows finer control over light attenuation. **/ linearFalloff: number /** * @constantFalloff {number}: The constant term of the light falloff. This will only be used if fiftyPercentDistance and zeroPercentDistance are not supplied, and allows finer control over light attenuation. **/ constantFalloff: number } declare interface HullTrace { /** * @start {Vector}: The start position of the trace **/ start: Vector /** * @endpos {Vector}: The end position of the trace **/ endpos: Vector /** * @maxs {Vector}: The 3D vector local to the start/endpos with the highest values. This will represent the corner with the upper bounds of the box. **/ maxs: Vector /** * @mins {Vector}: The 3D vector local to the start/endpos with the lowest (often negative) values. This will represent the corner with the lower bounds of the box. **/ mins: Vector /** * @filter {Entity}: Things the trace should not hit. Can also be a table of entities or a function with one argument: * Using a function here is super slow. Try to avoid it. **/ filter: Entity /** * @mask {MASK}: The trace mask @MASK enum. This determines what the trace should hit and what it shouldn't hit. **/ mask: MASK /** * @collisiongroup {COLLISION_GROUP}: The collision group @COLLISION_GROUP enum. This determines what the trace should hit in regards to the entity's collision group. **/ collisiongroup: COLLISION_GROUP /** * @ignoreworld {boolean}: Should the trace ignore world or not. **/ ignoreworld: boolean /** * @output {table}: If set, the trace result will be written to the supplied table instead of returning a new table **/ output: table } declare interface HTTPRequest { /** * @failed {function}: Function to be called on failure. Arguments are **/ failed: StructuresHTTPRequestFailed /** * @success {function}: Function to be called on success. Arguments are **/ success: StructuresHTTPRequestSuccess /** * @method {string}: Request method, case insensitive. Possible values are: * * GET * * POST * * HEAD * * PUT * * DELETE * * PATCH * * OPTIONS **/ method: string /** * @url {string}: The target url **/ url: string /** * @parameters {table}: KeyValue table for parameters. This is only applicable to the following request methods: * * GET * * POST * * HEAD **/ parameters: table /** * @headers {table}: KeyValue table for headers **/ headers: table /** * @body {string}: Body string for POST data. If set, will override parameters **/ body: string /** * @type {string}: Content type for body. **/ type: string } declare interface IGamemode { /** * @Name {string}: The fancy name of your gamemode. **/ Name: string /** * @Author {string}: The name/contact info of the gamemode author. **/ Author: string /** * @Email {string}: The contact email associated with the gamemode. **/ Email: string /** * @Website {string}: The website associated with the gamemode. **/ Website: string /** * @FolderName {string}: The name of the gamemode folder, automatically set. **/ FolderName: string /** * @Folder {string}: The name of the gamemode folder prepended with "gamemodes/" (such as "gamemodes/sandbox"), automatically set. **/ Folder: string /** * @TeamBased {boolean}: Set this to true if your gamemode is team-based. Used to enable/disable the base gamemode team system. **/ TeamBased: boolean /** * @IsSandboxDerived {boolean}: True if the gamemode is derived from sandbox. **/ IsSandboxDerived: boolean /** * @ThisClass {string}: The name of the gamemode folder prepended with "gamemode_" (such as "gamemode_sandbox"), automatically set. **/ ThisClass: string /** * @BaseClass {table}: The table of the base gamemode to derive from, set automatically by @DeriveGamemode function. **/ BaseClass: table } declare interface FontData { /** * @font {string}: The font source. This must be the actual name of the font, not a file name. * Font files are stored in resource/fonts/. This cannot be an existing game font, i.e. "ChatText", "Trebuchet18", etc. ([Default Fonts](https://wiki.garrysmod.com/page/Default%20Fonts)) * The length is limited to 31 characters maximum. **/ font: string /** * @extended {boolean}: Allow the font to display glyphs that are outside of the Latin-1 range. Unicode code points above 0xFFFF are not supported. **/ extended: boolean /** * @size {number}: The font height in pixels * *Range:* 4 - 255 **/ size: number /** * @weight {number}: The font boldness **/ weight: number /** * @blursize {number}: The strength of the font blurring * *Range:* 0 - 80 **/ blursize: number /** * @scanlines {number}: The "scanline" interval * Must be > 1 to work. This setting is per blursize per font - so if you create a font using "Arial" without scanlines, you cannot create an Arial font using scanlines with the same blursize **/ scanlines: number /** * @antialias {boolean}: Smooth the font **/ antialias: boolean /** * @underline {boolean}: Add an underline to the font **/ underline: boolean /** * @italic {boolean}: Make the font italic **/ italic: boolean /** * @strikeout {boolean}: Add a strike through **/ strikeout: boolean /** * @symbol {boolean}: Enables the use of symbolic fonts such as Webdings **/ symbol: boolean /** * @rotary {boolean}: Seems to add a line in the middle of each letter **/ rotary: boolean /** * @shadow {boolean}: Add shadow casting to the font **/ shadow: boolean /** * @additive {boolean}: Additive rendering **/ additive: boolean /** * @outline {boolean}: Add a black outline to the font. * This does not work well with antialias, and only allows black 1-pixel outlines. It may be preferable to not use this parameter, and instead use @draw.SimpleTextOutlined when drawing text that you want outlined. **/ outline: boolean } declare interface EntityCopyData { /** * @Name {string}: The entity's name, see @EntityFuncs:GetName. **/ Name: string /** * @cls {string}: The entity's class name, see @EntityFuncs:GetClass. **/ cls: string /** * @Pos {Vector}: The entity's position, relative to the duplication origin point. **/ Pos: Vector /** * @Angle {Angle}: The entity's angle, relative to the duplication angle. **/ Angle: Angle /** * @DT {table}: The entity's Network Vars, see @EntityHooks:SetupDataTables and [Networking Entities](https://wiki.garrysmod.com/page/Networking%20Entities). **/ DT: table /** * @Model {string}: The entity's model, see @EntityFuncs:GetModel. **/ Model: string /** * @ModelScale {number}: The entity's model scale, see @EntityFuncs:GetModelScale. This will only be present if the model scale isn't 1. **/ ModelScale: number /** * @Skin {number}: The entity's active skin, see @EntityFuncs:GetSkin. **/ Skin: number /** * @ColGroup {COLLISION_GROUP}: The entity's collision group, see @EntityFuncs:GetCollisionGroup. Uses the @COLLISION_GROUP enum. **/ ColGroup: COLLISION_GROUP /** * @Mins {Vector}: The entity's collision bound minimums, see @EntityFuncs:GetCollisionBounds. **/ Mins: Vector /** * @Maxs {Vector}: The entity's collision bound maximums, see @EntityFuncs:GetCollisionBounds. **/ Maxs: Vector /** * @PhysicsObjects {PhysicsObjectSave}: Data about the entity's @PhysObj types, see @EntityFuncs:GetPhysicsObjectNum. The key is the physics object index (starts from 0), and the value is a @PhysicsObjectSave structure. Unlike other tables in this structure, if there are no physics objects for this entity this will be an empty table. **/ PhysicsObjects: PhysicsObjectSave /** * @FlexScale {number}: The entity's Flex Scale, see @EntityFuncs:GetFlexScale. **/ FlexScale: number /** * @Flex {table}: Each flex bone's flex weight, see @EntityFuncs:GetFlexWeight. The key is the flex's index and the value is the weight. Only flexes with a non-default (nonzero) weight are listed, and if none exist, this field will be nil. **/ Flex: table /** * @BodyG {table}: The entity's body groups, see @EntityFuncs:GetBodygroup. The key is the bodygroup ID and the value is the assigned bodygroup number. Only body groups with a non-default (> 0) value are listed, and if none exist, this field will be nil. **/ BodyG: table /** * @BoneManip {BoneManipulationData}: Bone manipulation data, see @EntityFuncs:HasBoneManipulations. The key is the bone index and the value is a @BoneManipulationData structure. Only bones that have been manipulated with non-default values are listed, and if none exist, this field will be nil. **/ BoneManip: BoneManipulationData /** * @MapCreationID {number}: The entity's MapCreationID, only exists for entities that were created by the map. See @EntityFuncs:MapCreationID. **/ MapCreationID: number /** * @WorkshopID {number}: Deprecated, always 0. See @EntityFuncs:GetWorkshopID. **/ WorkshopID: number } declare interface IEntity { /** * @Base {string}: The base entity to derive from. This **must** be a valid Lua entity **/ Base: string /** * @Type {string}: Type of the entity. This **must be one of these:** * * **anim** * * **brush** * * **point** * * **ai** * * **nextbot** * * **filter** * See [Scripted Entities](https://wiki.garrysmod.com/page/Scripted%20Entities) for a more detailed explanation of what each one is. **/ Type: string /** * @ClassName {string}: Entity class name of the entity (File or folder name of your entity). * **This is set automatically *after* the entity file is loaded.** **/ ClassName: string /** * @Folder {string}: The folder from where the entity was loaded. This should always be "entity/ent_myentity", regardless whether your entity is stored as a file, or multiple files in a folder. **This is set automatically *before* the entity file is loaded.** **/ Folder: string /** * @AutomaticFrameAdvance {boolean}: (Clientside) Set this to true if your entity has animations. You should also apply changes to the @EntityHooks:Think function from the example on that page. **/ AutomaticFrameAdvance: boolean /** * @Category {string}: (Clientside) Spawnmenu category to put the entity into **/ Category: string /** * @Spawnable {boolean}: Whether this entity should be displayed and is spawnable in the spawn menu **/ Spawnable: boolean /** * @Editable {boolean}: Whether the entity supports Editing. See [Editable Entities](https://wiki.garrysmod.com/page/Editable%20Entities) for more info. **/ Editable: boolean /** * @AdminOnly {boolean}: Whether or not only admins can spawn the entity from their spawn menu **/ AdminOnly: boolean /** * @PrintName {string}: (Clientside) Nice name of the entity to appear in the spawn menu **/ PrintName: string /** * @Author {string}: (Clientside) The author of the entity **/ Author: string /** * @Contact {string}: (Clientside) The contacts of the entity creator **/ Contact: string /** * @Purpose {string}: (Clientside) The purpose of the entity creation **/ Purpose: string /** * @Instructions {string}: (Clientside) How to use your entity **/ Instructions: string /** * @RenderGroup {RENDERGROUP}: (Clientside) The entity's render group, see @RENDERGROUP enum. **/ RenderGroup: RENDERGROUP /** * @DisableDuplicator {boolean}: (Serverside) Disable the ability for players to duplicate this entity. **/ DisableDuplicator: boolean /** * @ScriptedEntityType {string}: (Clientside) Sets the spawnmenu content icon type for the entity, used by spawnmenu in the Sandbox-derived gamemodes. * See @spawnmenu.AddContentType for more information. **/ ScriptedEntityType: string /** * @DoNotDuplicate {boolean}: (Serverside) If set, the entity will not be duplicated via the built-in duplicator system. **/ DoNotDuplicate: boolean } declare interface EmitSoundInfo { /** * @SoundName {string}: The file path of the played sound. * Sounds prefixed with ) tell the sound engine that it is a spatial sound; this allows the sound to emit from a specific location within the world. * Sounds prefixed with ^ tell the sound engine that it is a distance based sound. The left channel of the .wav is the 'near' sound that will play when the sound originates close to you, and the right channel is the 'far' sound that will play when the sound originates far from you. **/ SoundName: string /** * @OriginalSoundName {string}: The original file path or soundscript name. * Even if the SoundName value is changed, the OriginalSoundName value will remain the same. * Sounds may be returned as soundscripts (for example, "Weapon_357.Single") instead of the sound's file path. You can use @sound.GetProperties to retrieve the actual file path. **/ OriginalSoundName: string /** * @SoundTime {number}: The time at which the sound should be played. * If equal to 0 or CurTime(), the sound is played immediately. If greater than CurTime(), the sound is played with a delay. If less than CurTime(), part of the sound is skipped. **/ SoundTime: number /** * @DSP {number}: The DSP (digital signal processing) preset applied to the sound. * There are approximately 134 different presets defined by the Source engine between 0 and 133. These presets represent different types of 'rooms' or environments. * [List of DSP's](https://developer.valvesoftware.com/wiki/Dsp_presets) **/ DSP: number /** * @SoundLevel {SNDLVL}: The sound's attenuation, a number between 0 (low) and 511 (high) * This determines how fast the sound drops away. A higher value means the sound can be heard farther away. * See @SNDLVL enum. **/ SoundLevel: SNDLVL /** * @Pitch {number}: The pitch of the played sound, a number between 0 (low) and 255 (high), where 100 is the sound's original pitch. **/ Pitch: number /** * @Flags {SND}: The bit flags of the played sound. See @SND enum for available options. **/ Flags: SND /** * @Channel {CHAN}: The sound's channel. See @CHAN enum for available options. **/ Channel: CHAN /** * @Volume {number}: The volume of the played sound, return as a decimal number between 0 (low) and 1 (high). **/ Volume: number /** * @Entity {Entity}: The entity that played the sound. **/ Entity: Entity /** * @Pos {Vector}: The origin of the played sound. **/ Pos: Vector } declare interface DynamicLight { /** * @brightness {number}: The brightness of the light. **/ brightness: number /** * @decay {number}: Fade out speed. * Here's a formula for calculating Decay for your light: 1000 / fadeOutTimeInSeconds. For example setting decay to 1000 would fade out the light in 1 second, 2000 - 0.5 seconds. **/ decay: number /** * @dietime {number}: Time after which light will be removed. * This is relative to @CurTime function. If you put in a value that is less than or equal to @CurTime function, the light will not behave properly. * Note, that it does not affect fading out. Light will be removed regardless of it being fully faded out or not. **/ dietime: number /** * @dir {Vector}: The light direction. Used with **InnerAngle** and **OuterAngle**. **/ dir: Vector /** * @innerangle {number}: The closer this is to zero, the smoother the light will be. Requires **Dir** and **OuterAngle** to be set. **/ innerangle: number /** * @outerangle {number}: The angle of the Dynamic Light. Requires **Dir** to be set. **/ outerangle: number /** * @key {number}: Makes the light brighter and flicker? Changing the value does not seem to affect anything. **/ key: number /** * @minlight {number}: Minimum light **/ minlight: number /** * @noworld {boolean}: Don't light the world. Has no effect for elights since they never light the world. **/ noworld: boolean /** * @nomodel {boolean}: Don't light models **/ nomodel: boolean /** * @pos {Vector}: Position of the light **/ pos: Vector /** * @size {number}: Radius of the light **/ size: number /** * @style {number}: Flicker style, see [this page](https://developer.valvesoftware.com/wiki/Light_dynamic#Appearances) for examples. **/ style: number /** * @b {number}: The blue part of the color **/ b: number /** * @g {number}: The green part of the color **/ g: number /** * @r {number}: The red part of the color **/ r: number } declare interface DebugInfo { /** * @func {function}: Reference to the function that was passed in. If a stack level was specified, this will be the function at that stack level. 0 = debug.getinfo, 1 = function that called debug.getinfo, etc. * **Option: f** **/ func: UnknownFunc /** * @linedefined {number}: The line where the function definiton starts (where "function" is located). * **Option: S** **/ linedefined: number /** * @lastlinedefined {number}: The line the function definition ended (where "end" is located). * **Option: S** **/ lastlinedefined: number /** * @source {string}: The path to the file where the passed function is defined prepended by an @ (ex. "@lua/autorun/mytestfile.lua"). This will be the @CompileString function or @RunString function identifier if the function wasn't defined in a file, also prepended by an @. * **Option: S** **/ source: string /** * @short_src {string}: The shortened name of the source (without the @). May be truncated if the source path is long. * **Option: S** **/ short_src: string /** * @what {string}: The language used. Either "Lua" or "C". * **Option: S** **/ what: string /** * @currentline {number}: The current line. This will be -1 if the code is not executed from a file. * **Option: l** (lowercase L) **/ currentline: number /** * @name {string}: The function name. This will be nil if the name cannot be found. Only works if stack level is passed rather than function pointer. * **Option: n** **/ name: string /** * @namewhat {string}: The function "type". This will be "global", "local", "method", "field". Can also be an empty string if the function name could not be found. Only works if stack level is passed rather than function pointer. * **Option: n** **/ namewhat: string /** * @isvararg {boolean}: Whether the function is variadic (has a ... argument). * **Option: u** **/ isvararg: boolean /** * @nparams {number}: The number of arguments the function uses excluding varargs. * **Option: u** **/ nparams: number /** * @nups {number}: Upvalue count. Max index that can be used with @debug.getupvalue. C functions can have upvalues but they cannot be accessed from Lua. * **Option: u** **/ nups: number /** * @activelines {table}: A table of all the active lines in the function - that is, lines with code that actually does something (not blank lines or lines with comments only). * The table keys will be line numbers, and their values will all be true. Lines that are inactive are simply not included in the table - they have the value nil. * It doesn't check for activeline in subfunctions. * **Option: L** **/ activelines: table } declare interface DateData { /** * @day {number}: Day of the month **/ day: number /** * @hour {number}: Hour **/ hour: number /** * @isdst {boolean}: Daylight saving enabled **/ isdst: boolean /** * @min {number}: Minute **/ min: number /** * @month {number}: Month * January: 1, December: 12 **/ month: number /** * @sec {number}: Second **/ sec: number /** * @wday {number}: Day of the week * Sunday: 1, Saturday: 7 **/ wday: number /** * @yday {number}: Day of the year **/ yday: number /** * @year {number}: Year **/ year: number } declare interface CreationMenus { /** * @func {function}: The function used to generate the content of the tab. **/ func: UnknownFunc /** * @Icon {string}: The icon material that will accompany the title of the tab. **/ Icon: string /** * @Order {number}: The order in which a tab will be displayed relative to the other tabs. **/ Order: number /** * @Tooltip {string}: The tooltip to be shown with the tab. **/ Tooltip: string } declare interface IColor { /** * @r {number}: The red channel **/ r: number /** * @g {number}: The green channel **/ g: number /** * @b {number}: The blue channel **/ b: number /** * @a {number}: The alpha channel **/ a: number } declare interface CollisionData { /** * @HitPos {Vector}: The collision position **/ HitPos: Vector /** * @HitEntity {Entity}: The other collision entity **/ HitEntity: Entity /** * @OurOldVelocity {Vector}: The entity's velocity before the collision **/ OurOldVelocity: Vector /** * @HitObject {PhysObj}: Other entity's physics object **/ HitObject: PhysObj /** * @DeltaTime {number}: Time since the last collision *with this HitEntity* **/ DeltaTime: number /** * @TheirOldVelocity {Vector}: Speed of the other entity before the collision **/ TheirOldVelocity: Vector /** * @Speed {number}: The speed of the entity before the collision **/ Speed: number /** * @HitNormal {Vector}: Normal of the surface that hit the other entity **/ HitNormal: Vector /** * @PhysObject {PhysObj}: Entity's physics object **/ PhysObject: PhysObj } declare interface CamData { /** * @origin {Vector}: The camera's position **/ origin: Vector /** * @angles {Angle}: The camera's angles **/ angles: Angle /** * @fov {number}: The camera's FOV **/ fov: number /** * @znear {number}: Distance to near clipping plane **/ znear: number /** * @zfar {number}: Distance to far clipping plane **/ zfar: number /** * @drawviewer {boolean}: Set true to draw local players player model. **/ drawviewer: boolean /** * @ortho {IStructuresCamDataOrtho}: If set, enables orthographic mode. The table has following arguments: **/ ortho: IStructuresCamDataOrtho } declare interface IStructuresCamDataOrtho { /** * left - {number}: no description **/ left: number /** * right - {number}: no description **/ right: number /** * top - {number}: no description **/ top: number /** * bottom - {number}: no description **/ bottom: number } declare interface Bullet { /** * @Attacker {Entity}: The entity that should be reported as attacker eg. a player * By default this would be set to the entity @EntityFuncs:FireBullets is called on. **/ Attacker: Entity /** * @Callback {function}: Function to be called **after** the bullet was fired. The arguments are: **/ Callback: StructuresBulletCallback /** * @Damage {number}: The damage dealt by the bullet **/ Damage: number /** * @Force {number}: The force of the bullets **/ Force: number /** * @Distance {number}: Maximum distance the bullet can travel **/ Distance: number /** * @HullSize {number}: The hull size of the bullet **/ HullSize: number /** * @Num {number}: The amount of bullets to fire **/ Num: number /** * @Tracer {number}: Show tracer for every x bullets **/ Tracer: number /** * @AmmoType {string}: The ammunition name **/ AmmoType: string /** * @TracerName {string}: The tracer name. You can find a list of default effects [here](https://wiki.garrysmod.com/page/Effects). **/ TracerName: string /** * @Dir {Vector}: The fire direction **/ Dir: Vector /** * @Spread {Vector}: The spread, only x and y are needed **/ Spread: Vector /** * @Src {Vector}: The position to fire the bullets from **/ Src: Vector /** * @IgnoreEntity {Entity}: The entity that the bullet will ignore when it will be shot. **/ IgnoreEntity: Entity } declare interface BoneManipulationData { /** * @s {Vector}: The entity's scale manipulation of the bone **/ s: Vector /** * @a {Angle}: The entity's angle manipulation of the bone **/ a: Angle /** * @p {Vector}: The entity's position manipulation of the given bone **/ p: Vector } declare interface AttachmentData { /** * @id {number}: Index of the attachment. **/ id: number /** * @name {string}: Name of the attachment. **/ name: string } declare interface BodyGroupData { /** * @id {number}: Index of the body group. **/ id: number /** * @name {string}: Name of the body group. **/ name: string /** * @num {number}: Amount of subgroups. **/ num: number } declare interface AnimationData { /** * @StartTime {number}: The system time value returned by @SysTime function when the animation starts/will start. **/ StartTime: number /** * @EndTime {number}: The system time value returned by @SysTime function when the animation ends/will end. **/ EndTime: number /** * @Ease {number}: The ease in/out level of the animation. **/ Ease: number /** * @OnEnd {function}: The callback function that will be called upon completion of the animation. The arguments passed to it are: **/ OnEnd: StructuresAnimationDataOnEnd /** * @Think {function}: The *think* function called every frame that will animate the panel object. This varies based on the animation. You can create a custom function for this if you aren't using the stock panel methods. The arguments passed to it are: **/ Think: StructuresAnimationDataThink /** * @Pos {Vector}: The target position, or target translation of the panel object. Used by @Panel:MoveTo and @Panel:MoveBy respectively. **/ Pos: Vector /** * @StartPos {Vector}: The position of the panel object when the animation started. Used by @Panel:MoveTo and @Panel:MoveBy. **/ StartPos: Vector /** * @SizeX {boolean}: Whether to resize the panel horizontally or not. Only used by @Panel:SizeTo. **/ SizeX: boolean /** * @SizeY {boolean}: Whether to resize the panel vertically or not. Only used by @Panel:SizeTo. **/ SizeY: boolean /** * @Size {Vector}: The target size of the panel object. Only used by @Panel:SizeTo. **/ Size: Vector /** * @StartSize {Vector}: The size of the panel object when the animation started. Only used by @Panel:SizeTo. **/ StartSize: Vector /** * @Color {Color}: The target colour of the panel object. Only used by @Panel:ColorTo. **/ Color: Color /** * @StartColor {Color}: The colour of the panel object when the animation started. Only used by @Panel:ColorTo. **/ StartColor: Color /** * @Alpha {number}: The target alpha (0-255) of the panel object. Only used by @Panel:AlphaTo. **/ Alpha: number /** * @StartAlpha {number}: The alpha (0-255) of the panel object when the animation started. Only used by @Panel:AlphaTo. **/ StartAlpha: number /** * @Speed {number}: The speed to use for transitions when using linear interpolation (Lerp) animations. Only used by @Panel:LerpPositions. **/ Speed: number /** * @UseGravity {boolean}: Whether or not to use easing to make the panel 'jump' at its target, slowing as it approaches. Only used by @Panel:LerpPositions. **/ UseGravity: boolean } declare interface AngPos { /** * @Ang {Angle}: Angle object **/ Ang: Angle /** * @Pos {Vector}: Vector object **/ Pos: Vector } declare interface AmmoData { /** * @dmgtype {DMG}: Damage type using @DMG enum. * Related function is @game.GetAmmoDamageType. **/ dmgtype: DMG /** * @force {number}: The force of the ammo. * Related function is @game.GetAmmoForce. **/ force: number /** * @maxsplash {number}: The maximum water splash size. **/ maxsplash: number /** * @minsplash {number}: The minimum water splash size. **/ minsplash: number /** * @name {string}: Name of the ammo. * Related functions are @game.GetAmmoName and @game.GetAmmoID. **/ name: string /** * @npcdmg {number}: The damage dealt to NPCs. * Related function is @game.GetAmmoNPCDamage. **/ npcdmg: number /** * @plydmg {number}: The damage dealt to players. * Related function is @game.GetAmmoPlayerDamage. **/ plydmg: number /** * @tracer {TRACER}: Tracer type using @TRACER enum. **/ tracer: TRACER /** * @maxcarry {number}: Maximum amount of ammo of this type the player should be able to carry in reserve. * Related function is @game.GetAmmoMax. **/ maxcarry: number /** * @flags {AMMO}: Flags for the ammo type using @AMMO enum. **/ flags: AMMO } /** * @wiki https://wiki.garrysmod.com/page/Shaders/sobel * @interface sobel * @description Applies a "sobel" effect. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g texturize * @interface g_texturize * @description Replaces every pixel with a part of the texture set by $basetexture. * The texture used must be power of 2 and be 8 times as high as wide in order to function. * The shader replaces every pixel with a part of the texture depending on it's brightness. * Dark areas will use the upper parts of the texture and brighter parts the lower parts of the texture. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g sunbeams * @interface g_sunbeams * @description Creates a "sun beam" effect. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g sky * @interface g_sky * @description This shader was especially designed to be used with with maps, in particular the cube maps(up, down, front, back, left, right), they allow to modify the ambiance of a map. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g sharpen * @interface g_sharpen * @description Sharpens the contents of the screenspace **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g refract * @interface g_refract * @description Shader used for the now-absent Morph post-processing effect. This effect can be restored with an [addon](http://steamcommunity.com/sharedfiles/filedetails/?id=501088470) available on the Workshop. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g premultiplied * @interface g_premultiplied * @description Renders a texture using premultiplied alpha blending. This is used by Awesomium panels. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g downsample * @interface g_downsample * @description Downsamples the screenspace **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g colourmodify * @interface g_colourmodify * @description Allows modifying the coloring of the screenspace. A material with this shader exists at @Material function( "pp/colour" ), which is used by @DrawColorModify function. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g bokehblur * @interface g_bokehblur * @description A bokeh blur shader which applies screen blur depending on distance. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g blury * @interface g_blury * @description Blurs the screenspace on the y axis **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g blurx * @interface g_blurx * @description Blurs $basetexture in the x direction. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/g bloom * @interface g_bloom * @description A simple bloom shader. See @DrawBloom function if you wish to use it in your code. **/ /** * @wiki https://wiki.garrysmod.com/page/Shaders/gmodscreenspace * @interface gmodscreenspace * @description The shader used for screenspace effects. **/ declare interface Shaders { } declare interface sobel { /** * @param {number} threshold The threshold of the edge finding **/ threshold: number } declare interface g_texturize { /** * @param {number} scalex The size of the texturing on the x axis **/ scalex: number /** * @param {number} scaley The size of the texturing on the y axis **/ scaley: number } declare interface g_sunbeams { /** * @param {number} darken The strength of the darkening **/ darken: number /** * @param {number} multiply The strength of the multplier **/ multiply: number /** * @param {number} sunx The screen x position of the sun (from 0 - 1) **/ sunx: number /** * @param {number} suny The screen y position of the sun (from 0 - 1) **/ suny: number /** * @param {number} sunsize The "size" of the sun **/ sunsize: number } declare interface g_sky { /** * @param {Vector} bottomcolor The top bottom of the texture(used for gradient) **/ bottomcolor: Vector /** * @param {Vector} duskcolor The dusk color **/ duskcolor: Vector /** * @param {number} duskscale The scale of the dusk **/ duskscale: number /** * @param {number} duskintensity The intensity of the dusk **/ duskintensity: number /** * @param {number} fadebias The fade bias **/ fadebias: number /** * @param {number} hdrscale The HDR scale **/ hdrscale: number /** * @param {Vector} suncolor The color of the sun **/ suncolor: Vector /** * @param {Vector} sunnormal The normal of the sun **/ sunnormal: Vector /** * @param {number} sunsize The size of the sun **/ sunsize: number /** * @param {Vector} topcolor The top color of the texture(used for gradient) **/ topcolor: Vector } declare interface g_sharpen { /** * @param {number} contrast The contrast to use **/ contrast: number /** * @param {number} distance The distance to assume **/ distance: number } declare interface g_refract { /** * @param {number} refractamount Refract amount **/ refractamount: number /** * @param {number} bluramount no description **/ bluramount: number /** * @param {ITexture} fbtexture Texture/Render target to apply the morph to **/ fbtexture: ITexture /** * @param {ITexture} normalmap Texture that holds the morph directions - red channel for X, green channel for Y. **/ normalmap: ITexture } declare interface g_premultiplied { /** * @param {ITexture} basetexture The texture to render. **/ basetexture: ITexture } declare interface g_downsample { /** * @param {number} darken The strength of the darkening **/ darken: number /** * @param {number} multiply The strength of the multiplier **/ multiply: number } declare interface g_colourmodify { /** * @param {number} pp_colour_addr The add color's red value. 0 (black) means no change. **/ pp_colour_addr: number /** * @param {number} pp_colour_addg The add color's green value. 0 (black) means no change. **/ pp_colour_addg: number /** * @param {number} pp_colour_addb The add color's blue value. 0 (black) means no change. **/ pp_colour_addb: number /** * @param {number} pp_colour_brightness This value will be added to every pixel's R, G, and B values. 0 means no change. **/ pp_colour_brightness: number /** * @param {number} pp_colour_colour The saturation value. Setting this to 0 will turn the image to grey-scale. 1 means no change. **/ pp_colour_colour: number /** * @param {number} pp_colour_contrast Every pixel's R, G, and B values will each be multiplied by this number. 1 means no change. **/ pp_colour_contrast: number /** * @param {number} pp_colour_mulr The multiply color's red value. 0 (black) means no change. **/ pp_colour_mulr: number /** * @param {number} pp_colour_mulg The multiply color's green value. 0 (black) means no change. **/ pp_colour_mulg: number /** * @param {number} pp_colour_mulb The multiply color's blue value. 0 (black) means no change. **/ pp_colour_mulb: number /** * @param {ITexture} fbtexture The texture to apply the color modifications to. It is expected, but not required, that the material will be drawn onto this texture. * "fbtexture" most likely stands for "frame buffer texture", but this works with any texture, including @render.GetSuperFPTex. **/ fbtexture: ITexture } declare interface g_bokehblur { /** * @param {IMaterial} depthtext The depth texture, usually should be "_rt_FullFrameFB" **/ depthtext: IMaterial /** * @param {number} focus The focus distance? **/ focus: number /** * @param {number} focusradius The focus radius? **/ focusradius: number /** * @param {number} size The strength of the blur **/ size: number } declare interface g_blury { /** * @param {number} size The strength of the blur **/ size: number } declare interface g_blurx { /** * @param {ITexture} basetexture The texture to blur. **/ basetexture: ITexture /** * @param {number} size The strength of the blur. Actually the number of pixels between samples from $basetexture. **/ size: number } declare interface g_bloom { /** * @param {number} levelb The multiplier for blue **/ levelb: number /** * @param {number} levelg The multiplier for the green **/ levelg: number /** * @param {number} levelr The multiplier for the red **/ levelr: number /** * @param {number} colormul The general multiplier for all colors **/ colormul: number } declare interface gmodscreenspace { /** * @param {boolean} texturealpha Use Texture Alpha **/ texturealpha: boolean /** * @param {boolean} vertexalpha Use Vertex Alpha **/ vertexalpha: boolean /** * @param {boolean} vertexcolor Use Vertex Color **/ vertexcolor: boolean /** * @param {number} blur Blur this buffer **/ blur: number } declare interface IPanelRebuildSpawnIconExData { /** * cam_pos - {Vector}: The relative camera position the model is viewed from. **/ cam_pos: Vector /** * cam_ang - {Angle}: The camera angle the model is viewed from. **/ cam_ang: Angle /** * cam_fov - {number}: The camera's field of view (FOV). **/ cam_fov: number /** * ent - {Entity}: The entity object of the model. **/ ent: Entity } declare interface IPanelGWEN_SetSizeSize { /** * w - {number}: The width. **/ w: number /** * h - {number}: The height. **/ h: number } declare interface IPanelGWEN_SetPositionPos { /** * x - {number}: The x coordinate. **/ x: number /** * y - {number}: The y coordinate. **/ y: number } declare interface IPanelGWEN_SetMarginMargins { /** * left - {number}: The left margin. **/ left: number /** * top - {number}: The top margin. **/ top: number /** * right - {number}: The right margin. **/ right: number /** * bottom - {number}: The bottom margin. **/ bottom: number } declare interface IPathFollowerGetCursorDataReturn { /** * curvature - {number}: no description **/ curvature: number /** * forward - {Vector}: no description **/ forward: Vector /** * pos - {Vector}: no description **/ pos: Vector } declare interface INextBotMoveToPosOptions { /** * lookahead - {number}: Minimum look ahead distance. **/ lookahead: number /** * tolerance - {number}: How close we must be to the goal before it can be considered complete. **/ tolerance: number /** * draw - {boolean}: Draw the path. Only visible on listen servers and single player. **/ draw: boolean /** * maxage - {number}: Maximum age of the path before it times out. **/ maxage: number /** * repath - {number}: Rebuilds the path after this number of seconds. **/ repath: number } declare interface INextBotFindSpotsSpecs { /** * type - {string}: The type (optional, only 'hiding' supported) **/ type: string /** * pos - {Vector}: the position to search. **/ pos: Vector /** * radius - {number}: the radius to search. **/ radius: number /** * stepup - {number}: the highest step to step up. **/ stepup: number /** * stepdown - {number}: the highest we can step down without being hurt. **/ stepdown: number } declare interface INextBotFindSpotOptions { /** * type - {string}: The type (Only'hiding' for now) **/ type: string /** * pos - {Vector}: the position to search. **/ pos: Vector /** * radius - {number}: the radius to search. **/ radius: number /** * stepup - {number}: the highest step to step up. **/ stepup: number /** * stepdown - {number}: the highest we can step down without being hurt. **/ stepdown: number } declare interface IEntityHooksGetRenderMeshReturn { /** * Mesh - {IMesh}: Required **/ Mesh: IMesh /** * Material - {IMaterial}: Required **/ Material: IMaterial /** * Matrix - {VMatrix}: Optional **/ Matrix: VMatrix } declare interface IDProperty_ComboSetupData { /** * text - {string}: The default label for this combo box **/ text: string /** * values - {table}: The values to add to the combo box **/ values: table } declare interface IDPropertySheetAddSheetReturn { /** * Tab - {DTab}: The created @DTab type. **/ Tab: DTab /** * Name - {string}: Name of the created tab **/ Name: string /** * Panel - {Panel}: The contents panel of the tab **/ Panel: Panel } declare interface IDColumnSheetAddSheetReturn { /** * Button - {Panel}: The created tab button that will switch to the given panel **/ Button: Panel /** * Panel - {Panel}: The given panel to switch to when the button is pressed **/ Panel: Panel } declare interface IControlPanelControlValuesData { /** * closed - {boolean}: Sets if the control panel should be unexpanded. **/ closed: boolean /** * label - {string}: The text to display inside the control's label. **/ label: string } declare interface IContextBaseControlValuesContextData { /** * convar - {string}: The console variable to use. Calls @ContextBase:SetConVar. **/ convar: string /** * label - {string}: The text to display inside the control's label. **/ label: string } declare interface ICNavAreaGetExtentInfoReturn { /** * hi - {Vector}: no description **/ hi: Vector /** * lo - {Vector}: no description **/ lo: Vector /** * SizeX - {number}: no description **/ SizeX: number /** * SizeY - {number}: no description **/ SizeY: number /** * SizeZ - {number}: no description **/ SizeZ: number } declare interface WeaponHooks { /** * * Called straight after the view model has been drawn. This is called before @GamemodeHooks:PostDrawViewModel and @WeaponHooks:PostDrawViewModel. * * @name WeaponHooks:ViewModelDrawn * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/ViewModelDrawn * @param {Weapon} this - no description * @param {Entity} ViewModel - Players view model * @returns {void} **/ ViewModelDrawn(this: Weapon, ViewModel: Entity): void /** * * Allows to change players field of view while player holds the weapon. * * @name WeaponHooks:TranslateFOV * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/TranslateFOV * @note This hook must be defined shared and return same value on both to properly affect Area Portals. * @param {Weapon} this - no description * @param {number} fov - The current/default FOV. * @returns {number} - The target FOV. **/ TranslateFOV(this: Weapon, fov: number): number /** * * Translate a player's Activity into a weapon's activity, depending on how you want the player to be holding the weapon. * For example, ACT_MP_RUN becomes ACT_HL2MP_RUN_PISTOL. * * @name WeaponHooks:TranslateActivity * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/TranslateActivity * @param {Weapon} this - no description * @param {number} act - The activity to translate * @returns {number} - The translated activity **/ TranslateActivity(this: Weapon, act: number): number /** * * A convenience function to remove secondary ammo from clip. * * @name WeaponHooks:TakeSecondaryAmmo * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/TakeSecondaryAmmo * @param {Weapon} this - no description * @param {number} amount - How much of secondary ammo to remove * @returns {void} **/ TakeSecondaryAmmo(this: Weapon, amount: number): void /** * * Called when the swep thinks. * This hook won't be called during the deploy animation and when using @WeaponFuncs:DefaultReload. * * @name WeaponHooks:Think * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/Think * @note Despite being a predicted hook, this hook is called clientside in single player, however it will not be recognized as a predicted hook to @Player:GetCurrentCommand. * @note This hook will be called before Player movement is processed on the client, and after on the server. * @bug #2855 This will not be run during deploy animations after a serverside-only deploy. This usually happens after picking up and dropping an object with +use. * @param {Weapon} this - no description * @returns {void} **/ Think(this: Weapon): void /** * * A convenience function to remove primary ammo from clip. * * @name WeaponHooks:TakePrimaryAmmo * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/TakePrimaryAmmo * @param {Weapon} this - no description * @param {number} amount - Amount of primary ammo to remove * @returns {void} **/ TakePrimaryAmmo(this: Weapon, amount: number): void /** * * Should this weapon be dropped when its owner dies? * This only works if the player has @Player:ShouldDropWeapon set to true. * * @name WeaponHooks:ShouldDropOnDie * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/ShouldDropOnDie * @param {Weapon} this - no description * @returns {boolean} - Return true to drop the weapon, false otherwise. Default ( if you don't return anything ) is false. **/ ShouldDropOnDie(this: Weapon): boolean /** * * A convenience function to create shoot effects. * * @name WeaponHooks:ShootEffects * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/ShootEffects * @param {Weapon} this - no description * @returns {void} **/ ShootEffects(this: Weapon): void /** * * A convenience function to shoot bullets. * * @name WeaponHooks:ShootBullet * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/ShootBullet * @param {Weapon} this - no description * @param {number} damage - The damage of the bullet * @param {number} num_bullets - Amount of bullets to shoot * @param {number} aimcone - Spread of bullets * @param {string} ammo_type - Ammo type of the bullets * @param {number} force - Force of the bullets * @param {number} tracer - Show a tracer on every x bullets * @returns {void} **/ ShootBullet(this: Weapon, damage: number, num_bullets: number, aimcone: number, ammo_type?: string, force?: number, tracer?: number): void /** * * Called to determine if the view model should be drawn or not. * * @name WeaponHooks:ShouldDrawViewModel * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/ShouldDrawViewModel * @param {Weapon} this - no description * @returns {boolean} - Return true to draw the view model, false otherwise. **/ ShouldDrawViewModel(this: Weapon): boolean /** * * Sets the hold type of the weapon. This must be called on **both** the server and the client to work properly. * **NOTE:** You should avoid calling this function and call @WeaponFuncs:SetHoldType now. * * @name WeaponHooks:SetWeaponHoldType * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/SetWeaponHoldType * @param {Weapon} this - no description * @param {string} name - Name of the hold type. You can find all default hold types [here](https://wiki.garrysmod.com/page/Hold_Types) * @returns {void} **/ SetWeaponHoldType(this: Weapon, name: string): void /** * * Called when the SWEP should set up its [ Data Tables](https://wiki.garrysmod.com/page/Networking%20Entities). * * @name WeaponHooks:SetupDataTables * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/SetupDataTables * @param {Weapon} this - no description * @returns {void} **/ SetupDataTables(this: Weapon): void /** * * Sets the weapon deploy speed. This value needs to match on client and server. * * @name WeaponHooks:SetDeploySpeed * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/SetDeploySpeed * @param {Weapon} this - no description * @param {number} speed - The value to set deploy speed to. Negative will slow down playback. * @returns {void} **/ SetDeploySpeed(this: Weapon, speed: number): void /** * * Called when secondary attack button ( +attack2 ) is pressed. * For issues with this hook being called rapidly on the client side, see the global function @IsFirstTimePredicted function. * * @name WeaponHooks:SecondaryAttack * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/SecondaryAttack * @param {Weapon} this - no description * @returns {void} **/ SecondaryAttack(this: Weapon): void /** * * Called every frame just before @GamemodeHooks:RenderScene. * Used by the Tool Gun to render view model screens (@ToolHooks:DrawToolScreen). * * @name WeaponHooks:RenderScreen * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/RenderScreen * @note Materials rendered in this hook require $ignorez parameter to draw properly. * @param {Weapon} this - no description * @returns {void} **/ RenderScreen(this: Weapon): void /** * * Called when the reload key ( +reload ) is pressed. * * @name WeaponHooks:Reload * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/Reload * @param {Weapon} this - no description * @returns {void} **/ Reload(this: Weapon): void /** * * A convenience function that draws the weapon info box, used in @WeaponHooks:DrawWeaponSelection. * * @name WeaponHooks:PrintWeaponInfo * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/PrintWeaponInfo * @param {Weapon} this - no description * @param {number} x - The x co-ordinate of box position * @param {number} y - The y co-ordinate of box position * @param {number} alpha - Alpha value for the box * @returns {void} **/ PrintWeaponInfo(this: Weapon, x: number, y: number, alpha: number): void /** * * Called when primary attack button ( +attack ) is pressed. * Since this is a [predicted](https://wiki.garrysmod.com/page/Prediction) hook, as mentioned on the bottom of the page, it has some additional behaviour to it. This is the same with all [predicted SWEP hooks](https://wiki.garrysmod.com/page/Category:Predicted_Hooks). * When in singleplayer, this function is only called in the server realm. When in multiplayer, the hook will be called on both the server and the client in order to allow for [prediction](https://wiki.garrysmod.com/page/Prediction). * You can force the hook to always be called on client like this: * ``` * if ( game.SinglePlayer() ) then self:CallOnClient( "PrimaryAttack" ) end * ``` * Note that due to prediction, in multiplayer SWEP:PrimaryAttack is called multiple times per one "shot" with the gun. To work around that, use @IsFirstTimePredicted function. * * @name WeaponHooks:PrimaryAttack * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/PrimaryAttack * @param {Weapon} this - no description * @returns {void} **/ PrimaryAttack(this: Weapon): void /** * * Allows you to modify viewmodel while the weapon in use before it is drawn. This hook only works if you haven't overridden @GamemodeHooks:PreDrawViewModel. * * @name WeaponHooks:PreDrawViewModel * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/PreDrawViewModel * @param {Weapon} this - no description * @param {Entity} vm - This is the view model entity before it is drawn. * @param {Weapon} weapon - This is the weapon that is from the view model. * @param {Player} ply - The the owner of the view model. * @returns {void} **/ PreDrawViewModel(this: Weapon, vm: Entity, weapon: Weapon, ply: Player): void /** * * Called when weapon is dropped or picked up by a new player. * See also @WeaponHooks:OnDrop. * * @name WeaponHooks:OwnerChanged * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/OwnerChanged * @param {Weapon} this - no description * @returns {void} **/ OwnerChanged(this: Weapon): void /** * * Called after the view model has been drawn while the weapon in use. This hook is called from the default implementation of @GamemodeHooks:PostDrawViewModel, and as such, will not occur if it has been overridden. * @WeaponHooks:ViewModelDrawn is an alternative hook which is always called before @GamemodeHooks:PostDrawViewModel. * * @name WeaponHooks:PostDrawViewModel * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/PostDrawViewModel * @param {Weapon} this - no description * @param {Entity} vm - This is the view model entity after it is drawn * @param {Weapon} weapon - This is the weapon that is from the view model (same as self) * @param {Player} ply - The owner of the view model * @returns {void} **/ PostDrawViewModel(this: Weapon, vm: Entity, weapon: Weapon, ply: Player): void /** * * Called when the weapon entity is reloaded from a Source Engine save (not the Sandbox saves or dupes) or on a changelevel (for example Half-Life 2 campaign level transitions). * For the @duplicator library callbacks, see @EntityHooks:OnDuplicated. * See also @saverestore library for relevant functions. * * @name WeaponHooks:OnRestore * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/OnRestore * @param {Weapon} this - no description * @returns {void} **/ OnRestore(this: Weapon): void /** * * Called when the swep is about to be removed. * * @name WeaponHooks:OnRemove * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/OnRemove * @param {Weapon} this - no description * @returns {void} **/ OnRemove(this: Weapon): void /** * * Called whenever the weapons Lua script is reloaded. * * @name WeaponHooks:OnReloaded * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/OnReloaded * @param {Weapon} this - no description * @returns {void} **/ OnReloaded(this: Weapon): void /** * * Called when weapon is dropped by @Player:DropWeapon. * See also @WeaponHooks:OwnerChanged. * * @name WeaponHooks:OnDrop * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/OnDrop * @param {Weapon} this - no description * @returns {void} **/ OnDrop(this: Weapon): void /** * * Called when the weapon entity is created. * * @name WeaponHooks:Initialize * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/Initialize * @note @EntityFuncs:GetOwner will return NULL at this point because the weapon is not equpped by a player or NPC yet. Use @WeaponHooks:Equip or @WeaponHooks:Deploy if you need the owner to be valid. * @bug #2732 This is sometimes not called clientside. You can work around this by setting a variable in Initialize and check if it exists in @WeaponHooks:Think. See the example below. * @bug #3015 This is not called serverside after a quicksave. * @param {Weapon} this - no description * @returns {void} **/ Initialize(this: Weapon): void /** * * This hook determines which parts of the HUD to draw. * * @name WeaponHooks:HUDShouldDraw * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/HUDShouldDraw * @param {Weapon} this - no description * @param {string} element - The HUD element in question * @returns {boolean} - Return false to hide this HUD element **/ HUDShouldDraw(this: Weapon, element: string): boolean /** * * Called when weapon tries to holster. * * @name WeaponHooks:Holster * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/Holster * @bug #2854 This is called twice for every holster clientside, one in [prediction](https://wiki.garrysmod.com/page/Prediction) and one not. * @bug #3133 Before @WeaponHooks:OnRemove is called, this function is only called serverside. * @param {Weapon} this - no description * @param {Entity} weapon - The weapon we are trying switch to. * @returns {boolean} - Return true to allow weapon to holster **/ Holster(this: Weapon, weapon: Entity): boolean /** * * This hook allows you to adjust view model position and angles. * * @name WeaponHooks:GetViewModelPosition * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/GetViewModelPosition * @param {Weapon} this - no description * @param {Vector} EyePos - Current position * @param {Angle} EyeAng - Current angle * @returns {Vector} - New position * @returns {Angle} - New angle * @tupleReturn **/ GetViewModelPosition(this: Weapon, EyePos: Vector, EyeAng: Angle): [Vector, Angle] /** * * Allows you to override where the tracer effect comes from. ( Visual bullets ) * * @name WeaponHooks:GetTracerOrigin * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/GetTracerOrigin * @param {Weapon} this - no description * @returns {Vector} - The new position to start tracer effect from **/ GetTracerOrigin(this: Weapon): Vector /** * * Called when the engine sets a value for this scripted weapon. * See @GamemodeHooks:EntityKeyValue for a hook that works for all entities. * See @EntityHooks:KeyValue for an [SENT](https://wiki.garrysmod.com/page/Category:WEAPON%20Hooks) hook that works for scripted entities. * * @name WeaponHooks:KeyValue * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/KeyValue * @param {Weapon} this - no description * @param {string} key - The key that was affected. * @param {string} value - The new value. * @returns {boolean} - Return true to suppress this KeyValue or return false or nothing to apply this key value. **/ KeyValue(this: Weapon, key: string, value: string): boolean /** * * 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. * * @name WeaponHooks:GetNPCRestTimes * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/GetNPCRestTimes * @param {Weapon} this - no description * @returns {number} - Minimum amount of time the NPC can rest (not shoot) between bursts in seconds. Default is 0.3 seconds. * @returns {number} - Maximum amount of time the NPC can rest (not shoot) between bursts in seconds. Default is 0.66 seconds. * @tupleReturn **/ GetNPCRestTimes(this: Weapon): [number, number] /** * * 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. * * @name WeaponHooks:GetNPCBurstSettings * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/GetNPCBurstSettings * @param {Weapon} this - no description * @returns {number} - Minimum amount of bullets per burst. Default is 1. * @returns {number} - Maximum amount of bullets per burst. Default is 1. * @returns {number} - Delay between each shot, aka firerate. Default is 1. * @tupleReturn **/ GetNPCBurstSettings(this: Weapon): [number, number, number] /** * * Called when the weapon is used by NPCs to determine how accurate the bullets fired should be. * The inaccuracy is simulated by changing the @NPC:GetAimVector based on the value returned from this hook. * * @name WeaponHooks:GetNPCBulletSpread * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/GetNPCBulletSpread * @param {Weapon} this - no description * @param {WEAPON_PROFICIENCY} proficiency - How proficient the NPC is with this gun. See @WEAPON_PROFICIENCY enum * @returns {number} - An amount of degrees the bullets should deviate from the NPC's @NPC:GetAimVector. Default is 15. **/ GetNPCBulletSpread(this: Weapon, proficiency: WEAPON_PROFICIENCY): number /** * * This hook is for NPCs, you return what they should try to do with it. * * @name WeaponHooks:GetCapabilities * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/GetCapabilities * @param {Weapon} this - no description * @returns {CAP} - A number defining what NPC should do with the weapon. Use the @CAP enum. **/ GetCapabilities(this: Weapon): CAP /** * * This hook allows you to freeze players screen. * * @name WeaponHooks:FreezeMovement * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/FreezeMovement * @note Player will still be able to move or shoot * @param {Weapon} this - no description * @returns {boolean} - Return true to freeze moving the view **/ FreezeMovement(this: Weapon): boolean /** * * Called before firing animation events, such as muzzle flashes or shell ejections. * This will only be called serverside for 3000-range events, and clientside for 5000-range and other events. * * @name WeaponHooks:FireAnimationEvent * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/FireAnimationEvent * @param {Weapon} this - no description * @param {Vector} pos - Position of the effect. * @param {Angle} ang - Angle of the effect. * @param {number} event - The event ID of happened even. See [this page](http://developer.valvesoftware.com/wiki/Animation_Events). * @param {string} options - Name or options of the event. * @returns {boolean} - Return true to disable the effect. **/ FireAnimationEvent(this: Weapon, pos: Vector, ang: Angle, event: number, options: string): boolean /** * * Called when a player or NPC has picked the weapon up. * * @name WeaponHooks:Equip * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/Equip * @param {Weapon} this - no description * @param {Player | NPC} NewOwner - The one who picked the weapon up. Can be @Player type or @NPC type. * @returns {void} **/ Equip(this: Weapon, NewOwner: Player | NPC): void /** * * The player has picked up the weapon and has taken the ammo from it. * The weapon will be removed immidiately after this call. * * @name WeaponHooks:EquipAmmo * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/EquipAmmo * @param {Weapon} this - no description * @param {Player} ply - The player who picked up the weapon * @returns {void} **/ EquipAmmo(this: Weapon, ply: Player): void /** * * Called when we are about to draw the translucent world model. * * @name WeaponHooks:DrawWorldModelTranslucent * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/DrawWorldModelTranslucent * @param {Weapon} this - no description * @returns {void} **/ DrawWorldModelTranslucent(this: Weapon): void /** * * Called when we are about to draw the world model. * * @name WeaponHooks:DrawWorldModel * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/DrawWorldModel * @param {Weapon} this - no description * @returns {void} **/ DrawWorldModel(this: Weapon): void /** * * This hook allows you to draw on screen while this weapon is in use. This hook is called **before** @WeaponHooks:DrawHUD and is equivalent of @GamemodeHooks:HUDPaintBackground. * * @name WeaponHooks:DrawHUDBackground * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/DrawHUDBackground * @param {Weapon} this - no description * @returns {void} **/ DrawHUDBackground(this: Weapon): void /** * * This hook draws the selection icon in the weapon selection menu. * * @name WeaponHooks:DrawWeaponSelection * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/DrawWeaponSelection * @param {Weapon} this - no description * @param {number} x - X coordinate of the selection panel * @param {number} y - Y coordinate of the selection panel * @param {number} width - Width of the selection panel * @param {number} height - Height of the selection panel * @param {number} alpha - Alpha value of the selection panel * @returns {void} **/ DrawWeaponSelection(this: Weapon, x: number, y: number, width: number, height: number, alpha: number): void /** * * This hook allows you to draw on screen while this weapon is in use. * If you want to draw a custom crosshair, consider using @WeaponHooks:DoDrawCrosshair instead. * * @name WeaponHooks:DrawHUD * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/DrawHUD * @param {Weapon} this - no description * @returns {void} **/ DrawHUD(this: Weapon): void /** * * Called so the weapon can override the impact effects it makes. * * @name WeaponHooks:DoImpactEffect * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/DoImpactEffect * @param {Weapon} this - no description * @param {TraceResult} tr - A @TraceResult structure from player's eyes to the impact point * @param {DMG} damageType - The damage type of bullet. See @DMG enum * @returns {boolean} - Return true to not do the default thing - which is to call UTIL_ImpactTrace in C++ **/ DoImpactEffect(this: Weapon, tr: TraceResult, damageType: DMG): boolean /** * * Called when the crosshair is about to get drawn, and allows you to override it. * * @name WeaponHooks:DoDrawCrosshair * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/DoDrawCrosshair * @note This function will not be called if **SWEP.DrawCrosshair** set to false. * @note This function will not be called if player was affected by @Player:CrosshairDisable. * @bug #2117 The arguments passed to this function are not affected by **SWEP.AccurateCrosshair**. * @param {Weapon} this - no description * @param {number} x - X coordinate of the crosshair. * @param {number} y - Y coordinate of the crosshair. * @returns {boolean} - Return true to override the default crosshair. **/ DoDrawCrosshair(this: Weapon, x: number, y: number): boolean /** * * Called when player has just switched to this weapon. * * @name WeaponHooks:Deploy * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/Deploy * @note Due to this hook being predicted, it is not called clientside in singleplayer at all, and in multiplayer it will not be called clientside if the weapon is switched with @Player:SelectWeapon or the "use" console command, however it will be called clientside with the default weapon selection menu and when using @CUserCmd:SelectWeapon * @param {Weapon} this - no description * @returns {boolean} - Return true to allow switching away from this weapon using lastinv command **/ Deploy(this: Weapon): boolean /** * * Allows you to use any numbers you want for the ammo display on the HUD. * Can be useful for weapons that don't use standard ammo. * * @name WeaponHooks:CustomAmmoDisplay * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/CustomAmmoDisplay * @param {Weapon} this - no description * @returns {IWeaponHooksCustomAmmoDisplayReturn} - The new ammo display settings. A table with 4 possible keys: * There is **no** SecondaryClip! **/ CustomAmmoDisplay(this: Weapon): IWeaponHooksCustomAmmoDisplayReturn /** * * Helper function for checking for no ammo. * * @name WeaponHooks:CanSecondaryAttack * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/CanSecondaryAttack * @param {Weapon} this - no description * @returns {boolean} - Can use secondary attack **/ CanSecondaryAttack(this: Weapon): boolean /** * * Helper function for checking for no ammo. * * @name WeaponHooks:CanPrimaryAttack * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/CanPrimaryAttack * @param {Weapon} this - no description * @returns {boolean} - Can use primary attack **/ CanPrimaryAttack(this: Weapon): boolean /** * * Called when a Citizen NPC is looking around to a (better) weapon to pickup. * * @name WeaponHooks:CanBePickedUpByNPCs * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/CanBePickedUpByNPCs * @param {Weapon} this - no description * @returns {boolean} - Return true to allow this weapon to be picked up by NPCs. **/ CanBePickedUpByNPCs(this: Weapon): boolean /** * * Allows overriding the position and angle of the viewmodel. This hook only works if you haven't overridden @GamemodeHooks:CalcViewModelView. * * @name WeaponHooks:CalcViewModelView * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/CalcViewModelView * @param {Weapon} this - no description * @param {Entity} ViewModel - The viewmodel entity * @param {Vector} OldEyePos - Original position (before viewmodel bobbing and swaying) * @param {Angle} OldEyeAng - Original angle (before viewmodel bobbing and swaying) * @param {Vector} EyePos - Current position * @param {Angle} EyeAng - Current angle * @returns {Vector} - New position * @returns {Angle} - New angle * @tupleReturn **/ CalcViewModelView(this: Weapon, ViewModel: Entity, OldEyePos: Vector, OldEyeAng: Angle, EyePos: Vector, EyeAng: Angle): [Vector, Angle] /** * * Returns how much of secondary ammo the player has. * * @name WeaponHooks:Ammo2 * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/Ammo2 * @param {Weapon} this - no description * @returns {number} - The amount of secondary ammo player has **/ Ammo2(this: Weapon): number /** * * Allows you to adjust player view while this weapon in use. * This hook is called from the default implementation of @GamemodeHooks:CalcView ([](https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/base/gamemode/cl_init.lua#L376-L383)). Therefore, it will not be called if any other hook added to CalcView returns any value, or if the current gamemode overrides the default hook and does not call the SWEP function. * * @name WeaponHooks:CalcView * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/CalcView * @bug SWEPs that define this function will not work with the [taunt camera.](https://wiki.garrysmod.com/page/Global/TauntCamera) * @param {Weapon} this - no description * @param {Player} ply - The owner of weapon * @param {Vector} pos - Current position of players view * @param {Angle} ang - Current angles of players view * @param {number} fov - Current FOV of players view * @returns {Vector} - New position of players view * @returns {Angle} - New angle of players view * @returns {number} - New FOV of players view * @tupleReturn **/ CalcView(this: Weapon, ply: Player, pos: Vector, ang: Angle, fov: number): [Vector, Angle, number] /** * * Returns how much of primary ammo the player has. * * @name WeaponHooks:Ammo1 * @realm client, server * @wiki https://wiki.garrysmod.com/page/WEAPON/Ammo1 * @param {Weapon} this - no description * @returns {number} - The amount of primary ammo player has **/ Ammo1(this: Weapon): number /** * * Called when another entity fires an event to this entity. * * @name WeaponHooks:AcceptInput * @realm server * @wiki https://wiki.garrysmod.com/page/WEAPON/AcceptInput * @param {Weapon} this - no description * @param {string} inputName - The name of the input that was triggered. * @param {Entity} activator - The initial cause for the input getting triggered. * @param {Entity} called - The entity that directly trigger the input. * @param {string} data - The data passed. * @returns {boolean} - Should we suppress the default action for this input? **/ AcceptInput(this: Weapon, inputName: string, activator: Entity, called: Entity, data: string): boolean /** * * Allows you to adjust the mouse sensitivity. This hook only works if you haven't overridden @GamemodeHooks:AdjustMouseSensitivity. * * @name WeaponHooks:AdjustMouseSensitivity * @realm client * @wiki https://wiki.garrysmod.com/page/WEAPON/AdjustMouseSensitivity * @param {Weapon} this - no description * @returns {number} - Sensitivity scale **/ AdjustMouseSensitivity(this: Weapon): number } declare interface WeaponFuncs extends Entity { /** * * Sets when the weapon can alt-fire again. Time should be based on @CurTime function. * * @name WeaponFuncs:SetNextSecondaryFire * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/SetNextSecondaryFire * @param {Weapon} this - no description * @param {number} time - Time when player should be able to use secondary fire again * @returns {void} **/ SetNextSecondaryFire(this: Weapon, time: number): void /** * * Sets when the weapon can fire again. Time should be based on @CurTime function. * * @name WeaponFuncs:SetNextPrimaryFire * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/SetNextPrimaryFire * @bug #3786 This will fire extra bullets if the time is set to less than @CurTime function. * @param {Weapon} this - no description * @param {number} time - Time when player should be able to use primary fire again * @returns {void} **/ SetNextPrimaryFire(this: Weapon, time: number): void /** * * Sets the time since this weapon last fired in seconds. Used in conjunction with @WeaponFuncs:LastShootTime * * @name WeaponFuncs:SetLastShootTime * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/SetLastShootTime * @param {Weapon} this - no description * @param {number} time - The time in seconds when the last time the weapon was fired. * @returns {void} **/ SetLastShootTime(this: Weapon, time?: number): void /** * * Sets the hold type of the weapon. This function also calls @WeaponHooks:SetWeaponHoldType and properly networks it to all clients. * * @name WeaponFuncs:SetHoldType * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/SetHoldType * @note This only works on scripted weapons. * @bug Using this function on weapons held by bots will not network holdtype changes to clients if the world model is set to an empty string (SWEP.WorldModel = ""). * @param {Weapon} this - no description * @param {string} name - Name of the hold type. You can find all default hold types [here](https://wiki.garrysmod.com/page/Hold_Types) * @returns {void} **/ SetHoldType(this: Weapon, name: string): void /** * * Lets you change the number of bullets in the given weapons secondary clip. * * @name WeaponFuncs:SetClip2 * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/SetClip2 * @param {Weapon} this - no description * @param {number} ammo - The amount of bullets the clip should contain * @returns {void} **/ SetClip2(this: Weapon, ammo: number): void /** * * Lets you change the number of bullets in the given weapons primary clip. * * @name WeaponFuncs:SetClip1 * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/SetClip1 * @param {Weapon} this - no description * @param {number} ammo - The amount of bullets the clip should contain * @returns {void} **/ SetClip1(this: Weapon, ammo: number): void /** * * Forces weapon to play activity/animation. * * @name WeaponFuncs:SendWeaponAnim * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/SendWeaponAnim * @param {Weapon} this - no description * @param {ACT} act - Activity to play. See the @ACT enum (specifically ACT_VM_). * @returns {void} **/ SendWeaponAnim(this: Weapon, act: ACT): void /** * * Returns the time since this weapon last fired a bullet with @EntityFuncs:FireBullets in seconds. It is not networked. * * @name WeaponFuncs:LastShootTime * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/LastShootTime * @param {Weapon} this - no description * @returns {number} - The time in seconds when the last bullet was fired. **/ LastShootTime(this: Weapon): number /** * * 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. * * @name WeaponFuncs:IsWeaponVisible * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/IsWeaponVisible * @param {Weapon} this - no description * @returns {boolean} - Is visible or not **/ IsWeaponVisible(this: Weapon): boolean /** * * Checks if the weapon is a SWEP or a built-in weapon. * * @name WeaponFuncs:IsScripted * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/IsScripted * @param {Weapon} this - no description * @returns {boolean} - Returns true if weapon is scripted ( SWEP ), false if not ( A built-in HL2 weapon ) **/ IsScripted(this: Weapon): boolean /** * * Returns whenever the weapon is carried by the local player. * * @name WeaponFuncs:IsCarriedByLocalPlayer * @realm client * @wiki https://wiki.garrysmod.com/page/Weapon/IsCarriedByLocalPlayer * @param {Weapon} this - no description * @returns {boolean} - Is the weapon is carried by the local player or not **/ IsCarriedByLocalPlayer(this: Weapon): boolean /** * * 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. * * @name WeaponFuncs:HasAmmo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/HasAmmo * @note This will return true for weapons like crowbar, gravity gun, etc. * @param {Weapon} this - no description * @returns {boolean} - Whether the weapon has ammo or not. **/ HasAmmo(this: Weapon): boolean /** * * Returns the "weight" of the weapon, which is used when deciding which @Weapon type is better by the engine. * * @name WeaponFuncs:GetWeight * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetWeight * @param {Weapon} this - no description * @returns {number} - The weapon "weight". **/ GetWeight(this: Weapon): number /** * * Returns the world model of the weapon. * * @name WeaponFuncs:GetWeaponWorldModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetWeaponWorldModel * @param {Weapon} this - no description * @returns {string} - The world model of the weapon. **/ GetWeaponWorldModel(this: Weapon): string /** * * Returns the view model of the weapon. * * @name WeaponFuncs:GetWeaponViewModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetWeaponViewModel * @param {Weapon} this - no description * @returns {string} - The view model of the weapon. **/ GetWeaponViewModel(this: Weapon): string /** * * Returns slot position of the weapon * * @name WeaponFuncs:GetSlotPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetSlotPos * @param {Weapon} this - no description * @returns {number} - The slot position of the weapon **/ GetSlotPos(this: Weapon): number /** * * Returns the slot of the weapon (slot numbers start from 0) * * @name WeaponFuncs:GetSlot * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetSlot * @param {Weapon} this - no description * @returns {number} - The slot of the weapon **/ GetSlot(this: Weapon): number /** * * Gets the ammo type of the given weapons secondary fire. * * @name WeaponFuncs:GetSecondaryAmmoType * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetSecondaryAmmoType * @param {Weapon} this - no description * @returns {number} - The secondary ammo type ID, or -1 if not found. **/ GetSecondaryAmmoType(this: Weapon): number /** * * Returns the non-internal name of the weapon, that should be for displaying. * * @name WeaponFuncs:GetPrintName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetPrintName * @note If that returns an untranslated message (#HL2_XX), use @language.GetPhrase to see the "nice" name. * @note If SWEP.PrintName is not set in the Weapon or the Weapon Base then "" will be returned. * @param {Weapon} this - no description * @returns {string} - The "nice" name of the weapon. **/ GetPrintName(this: Weapon): string /** * * Gets the primary ammo type of the given weapon. * * @name WeaponFuncs:GetPrimaryAmmoType * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetPrimaryAmmoType * @param {Weapon} this - no description * @returns {number} - The ammo type ID, or -1 if not found. **/ GetPrimaryAmmoType(this: Weapon): number /** * * Gets the next time the weapon can secondary fire. ( Can call @WeaponHooks:SecondaryAttack ) * * @name WeaponFuncs:GetNextSecondaryFire * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetNextSecondaryFire * @param {Weapon} this - no description * @returns {number} - The time, relative to @CurTime function **/ GetNextSecondaryFire(this: Weapon): number /** * * Returns maximum secondary clip size * * @name WeaponFuncs:GetMaxClip2 * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetMaxClip2 * @param {Weapon} this - no description * @returns {number} - Maximum secondary clip size **/ GetMaxClip2(this: Weapon): number /** * * Returns maximum primary clip size * * @name WeaponFuncs:GetMaxClip1 * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetMaxClip1 * @param {Weapon} this - no description * @returns {number} - Maximum primary clip size **/ GetMaxClip1(this: Weapon): number /** * * Returns the hold type of the weapon. * * @name WeaponFuncs:GetHoldType * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetHoldType * @param {Weapon} this - no description * @returns {string} - The hold type of the weapon. You can find a list of default hold types [here](https://wiki.garrysmod.com/page/Hold_Types). **/ GetHoldType(this: Weapon): string /** * * Returns the sequence enumeration number that the weapon is playing. * * @name WeaponFuncs:GetActivity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetActivity * @bug #2543 This can return inconsistent results between the server and client. * @param {Weapon} this - no description * @returns {ACT} - Current activity, see @ACT enum. Returns 0 if the weapon doesn't have active sequence. **/ GetActivity(this: Weapon): ACT /** * * Forces the weapon to reload while playing given animation. * * @name WeaponFuncs:DefaultReload * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/DefaultReload * @param {Weapon} this - no description * @param {ACT} act - Sequence to use as reload animation. Uses the @ACT enum. * @returns {boolean} - Did reloading actually take place **/ DefaultReload(this: Weapon, act: ACT): boolean /** * * Returns how much primary ammo is in the magazine. * * @name WeaponFuncs:Clip1 * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/Clip1 * @param {Weapon} this - no description * @returns {number} - The amount of primary ammo in the magazine. **/ Clip1(this: Weapon): number /** * * Gets the next time the weapon can primary fire. ( Can call @WeaponHooks:PrimaryAttack ) * * @name WeaponFuncs:GetNextPrimaryFire * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/GetNextPrimaryFire * @param {Weapon} this - no description * @returns {number} - The time, relative to @CurTime function **/ GetNextPrimaryFire(this: Weapon): number /** * * Returns how much secondary ammo is in magazine. * * @name WeaponFuncs:Clip2 * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/Clip2 * @param {Weapon} this - no description * @returns {number} - The amount of secondary ammo in the magazine. **/ Clip2(this: Weapon): number /** * * Calls a SWEP function on client. * * @name WeaponFuncs:CallOnClient * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/CallOnClient * @note Only the second argument is passed as argument and must be a string * @warning This uses the @usermessage library internally, because of that, the combined length of the arguments of this function may not exceed 254 bytes/characters or the function will cease to function! * @param {Weapon} this - no description * @param {string} functionName - Name of function to call. If you want to call SWEP:MyFunc() on client, you type in "MyFunc" * @param {string} arguments - Arguments for the function, separated by spaces. * @returns {void} **/ CallOnClient(this: Weapon, functionName: string, arguments?: string): void /** * * Returns whether the weapon allows to being switched from when a better ( @WeaponFuncs:GetWeight ) weapon is being picked up. * * @name WeaponFuncs:AllowsAutoSwitchFrom * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/AllowsAutoSwitchFrom * @param {Weapon} this - no description * @returns {boolean} - Whether the weapon allows to being switched from. **/ AllowsAutoSwitchFrom(this: Weapon): boolean /** * * Returns whether the weapon allows to being switched to when a better ( @WeaponFuncs:GetWeight ) weapon is being picked up. * * @name WeaponFuncs:AllowsAutoSwitchTo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Weapon/AllowsAutoSwitchTo * @param {Weapon} this - no description * @returns {boolean} - Whether the weapon allows to being switched to. **/ AllowsAutoSwitchTo(this: Weapon): boolean } declare interface VMatrix { /** * * Sets all components of the matrix to 0, also known as a [null matrix](https://en.wikipedia.org/wiki/Zero_matrix). * This function is more efficient than setting each element manually. * * @name VMatrix:Zero * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Zero * @param {VMatrix} this - no description * @returns {void} **/ Zero(this: VMatrix): void /** * * Returns each component of the matrix, expanding rows before columns. * * @name VMatrix:Unpack * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Unpack * @param {VMatrix} this - no description * @returns {number} - @VMatrix:GetField(1, 1) * @returns {number} - @VMatrix:GetField(1, 2) * @returns {number} - @VMatrix:GetField(1, 3) * @returns {number} - @VMatrix:GetField(1, 4) * @returns {number} - @VMatrix:GetField(2, 1) * @returns {number} - @VMatrix:GetField(2, 2) * @returns {number} - @VMatrix:GetField(2, 3) * @returns {number} - @VMatrix:GetField(2, 4) * @returns {number} - @VMatrix:GetField(3, 1) * @returns {number} - @VMatrix:GetField(3, 2) * @returns {number} - @VMatrix:GetField(3, 3) * @returns {number} - @VMatrix:GetField(3, 4) * @returns {number} - @VMatrix:GetField(4, 1) * @returns {number} - @VMatrix:GetField(4, 2) * @returns {number} - @VMatrix:GetField(4, 3) * @returns {number} - @VMatrix:GetField(4, 4) * @tupleReturn **/ Unpack(this: VMatrix): [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number] /** * * Translates the matrix by the given vector aka. adds the vector to the translation. * Postmultiplies the matrix by a translation matrix (A = AT). * * @name VMatrix:Translate * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Translate * @param {VMatrix} this - no description * @param {Vector} translation - Vector to translate the matrix by. * @returns {void} **/ Translate(this: VMatrix, translation: Vector): void /** * * Converts the matrix to a 4x4 table. See @Matrix function function. * * @name VMatrix:ToTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/ToTable * @param {VMatrix} this - no description * @returns {table} - The 4x4 table. **/ ToTable(this: VMatrix): table /** * * Sets the up direction of the matrix. * ie. The third column of the matrix, excluding the w coordinate. * * @name VMatrix:SetUp * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetUp * @param {VMatrix} this - no description * @param {Vector} forward - The up direction of the matrix. * @returns {void} **/ SetUp(this: VMatrix, forward: Vector): void /** * * Sets each component of the matrix. * * @name VMatrix:SetUnpacked * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetUnpacked * @param {VMatrix} this - no description * @param {number} e11 - no description * @param {number} e12 - no description * @param {number} e13 - no description * @param {number} e14 - no description * @param {number} e21 - no description * @param {number} e22 - no description * @param {number} e23 - no description * @param {number} e24 - no description * @param {number} e31 - no description * @param {number} e32 - no description * @param {number} e33 - no description * @param {number} e34 - no description * @param {number} e41 - no description * @param {number} e42 - no description * @param {number} e43 - no description * @param {number} e44 - no description * @returns {void} **/ SetUnpacked(this: VMatrix, e11: number, e12: number, e13: number, e14: number, e21: number, e22: number, e23: number, e24: number, e31: number, e32: number, e33: number, e34: number, e41: number, e42: number, e43: number, e44: number): void /** * * Sets the absolute translation of the matrix. * * @name VMatrix:SetTranslation * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetTranslation * @param {VMatrix} this - no description * @param {Vector} translation - New translation. * @returns {void} **/ SetTranslation(this: VMatrix, translation: Vector): void /** * * Modifies the scale of the matrix while preserving the rotation and translation. * * @name VMatrix:SetScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetScale * @param {VMatrix} this - no description * @param {Vector} scale - The scale to set. * @returns {void} **/ SetScale(this: VMatrix, scale: Vector): void /** * * Sets the right direction of the matrix. * ie. The second column of the matrix, negated, excluding the w coordinate. * * @name VMatrix:SetRight * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetRight * @param {VMatrix} this - no description * @param {Vector} forward - The right direction of the matrix. * @returns {void} **/ SetRight(this: VMatrix, forward: Vector): void /** * * Sets the forward direction of the matrix. * ie. The first column of the matrix, excluding the w coordinate. * * @name VMatrix:SetForward * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetForward * @param {VMatrix} this - no description * @param {Vector} forward - The forward direction of the matrix. * @returns {void} **/ SetForward(this: VMatrix, forward: Vector): void /** * * Sets a specific field in the matrix. * * @name VMatrix:SetField * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetField * @param {VMatrix} this - no description * @param {number} row - Row of the field to be set, from 1 to 4 * @param {number} column - Column of the field to be set, from 1 to 4 * @param {number} value - The value to set in that field * @returns {void} **/ SetField(this: VMatrix, row: number, column: number, value: number): void /** * * Sets the absolute rotation of the matrix. * * @name VMatrix:SetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/SetAngles * @param {VMatrix} this - no description * @param {Angle} angle - New angles. * @returns {void} **/ SetAngles(this: VMatrix, angle: Angle): void /** * * Copies values from the given matrix object. * * @name VMatrix:Set * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Set * @param {VMatrix} this - no description * @param {VMatrix} src - The matrix to copy values from. * @returns {void} **/ Set(this: VMatrix, src: VMatrix): void /** * * Scales the absolute translation with the given value. * * @name VMatrix:ScaleTranslation * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/ScaleTranslation * @param {VMatrix} this - no description * @param {number} scale - Value to scale the translation with. * @returns {void} **/ ScaleTranslation(this: VMatrix, scale: number): void /** * * Scales the matrix by the given vector. * Postmultiplies the matrix by a scaling matrix (A = AS). * * @name VMatrix:Scale * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Scale * @param {VMatrix} this - no description * @param {Vector} scale - Vector to scale with matrix with. * @returns {void} **/ Scale(this: VMatrix, scale: Vector): void /** * * Rotates the matrix by the given angle. * Postmultiplies the matrix by a rotation matrix (A = AR). * * @name VMatrix:Rotate * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Rotate * @param {VMatrix} this - no description * @param {Angle} rotation - Rotation. * @returns {void} **/ Rotate(this: VMatrix, rotation: Angle): void /** * * Checks whenever all fields of the matrix are 0, aka if this is a [null matrix](https://en.wikipedia.org/wiki/Zero_matrix). * * @name VMatrix:IsZero * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/IsZero * @param {VMatrix} this - no description * @returns {boolean} - If the matrix is a null matrix. **/ IsZero(this: VMatrix): boolean /** * * Returns whether the matrix is a rotation matrix or not. * Technically it checks if the forward, right and up vectors are orthogonal and normalized. * * @name VMatrix:IsRotationMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/IsRotationMatrix * @param {VMatrix} this - no description * @returns {boolean} - Is the matrix a rotation matrix or not **/ IsRotationMatrix(this: VMatrix): boolean /** * * Returns whether the matrix is equal to Identity matrix or not. * * @name VMatrix:IsIdentity * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/IsIdentity * @param {VMatrix} this - no description * @returns {boolean} - Is the matrix an Identity matrix or not **/ IsIdentity(this: VMatrix): boolean /** * * Inverts the matrix. This function will not fail, but only works correctly on matrices that contain only translation and/or rotation. * Using this function on a matrix with modified scale may return an incorrect inverted matrix. * To invert a matrix that contains other modifications, see @VMatrix:Invert. * * @name VMatrix:InvertTR * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/InvertTR * @param {VMatrix} this - no description * @returns {void} **/ InvertTR(this: VMatrix): void /** * * Inverts the matrix. * Inverting the matrix will fail if its [determinant](https://en.wikipedia.org/wiki/Determinant) is 0 or close to 0. (ie. its "scale" in any direction is 0.) * If the matrix cannot be inverted, it does not get modified. * See also @VMatrix:InvertTR. * * @name VMatrix:Invert * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Invert * @param {VMatrix} this - no description * @returns {boolean} - Whether the matrix was inverted or not **/ Invert(this: VMatrix): boolean /** * * Initializes the matrix as Identity matrix. * * @name VMatrix:Identity * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/Identity * @param {VMatrix} this - no description * @returns {void} **/ Identity(this: VMatrix): void /** * * Returns the absolute translation of the matrix. * * @name VMatrix:GetTranslation * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetTranslation * @param {VMatrix} this - no description * @returns {Vector} - Absolute translation of the matrix **/ GetTranslation(this: VMatrix): Vector /** * * Returns the absolute scale of the matrix. * * @name VMatrix:GetScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetScale * @param {VMatrix} this - no description * @returns {Vector} - Absolute scale of the matrix **/ GetScale(this: VMatrix): Vector /** * * Gets the up direction of the matrix. * ie. The third column of the matrix, excluding the w coordinate. * * @name VMatrix:GetUp * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetUp * @param {VMatrix} this - no description * @returns {Vector} - The up direction of the matrix. **/ GetUp(this: VMatrix): Vector /** * * Gets the right direction of the matrix. * ie. The second column of the matrix, negated, excluding the w coordinate. * * @name VMatrix:GetRight * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetRight * @param {VMatrix} this - no description * @returns {Vector} - The right direction of the matrix. **/ GetRight(this: VMatrix): Vector /** * * Returns an inverted matrix without modifying the original matrix. This function will not fail, but only works correctly on matrices that contain only translation and/or rotation. * Using this function on a matrix with modified scale may return an incorrect inverted matrix. * To get the inverse of a matrix that contains other modifications, see @VMatrix:GetInverse. * * @name VMatrix:GetInverseTR * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetInverseTR * @param {VMatrix} this - no description * @returns {VMatrix} - The inverted matrix. **/ GetInverseTR(this: VMatrix): VMatrix /** * * Returns an inverted matrix without modifying the original matrix. * Inverting the matrix will fail if its [determinant](https://en.wikipedia.org/wiki/Determinant) is 0 or close to 0. (ie. its "scale" in any direction is 0.) * See also @VMatrix:GetInverseTR. * * @name VMatrix:GetInverse * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetInverse * @param {VMatrix} this - no description * @returns {VMatrix} - The inverted matrix if possible, nil otherwise **/ GetInverse(this: VMatrix): VMatrix /** * * Returns the absolute rotation of the matrix. * * @name VMatrix:GetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetAngles * @param {VMatrix} this - no description * @returns {Angle} - Absolute rotation of the matrix **/ GetAngles(this: VMatrix): Angle /** * * Returns a specific field in the matrix. * * @name VMatrix:GetField * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetField * @param {VMatrix} this - no description * @param {number} row - Row of the field whose value is to be retrieved, from 1 to 4 * @param {number} column - Column of the field whose value is to be retrieved, from 1 to 4 * @returns {number} - The value of the specified field **/ GetField(this: VMatrix, row: number, column: number): number /** * * Gets the forward direction of the matrix. * ie. The first column of the matrix, excluding the w coordinate. * * @name VMatrix:GetForward * @realm client, server * @wiki https://wiki.garrysmod.com/page/VMatrix/GetForward * @param {VMatrix} this - no description * @returns {Vector} - The forward direction of the matrix. **/ GetForward(this: VMatrix): Vector } declare interface Vehicle extends Entity { /** * * Starts or stops the engine. * * @name Vehicle:StartEngine * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/StartEngine * @param {Vehicle} this - no description * @param {boolean} start - True to start, false to stop. * @returns {void} **/ StartEngine(this: Vehicle, start: boolean): void /** * * Sets friction of given wheel. This function may be broken. * * @name Vehicle:SetWheelFriction * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetWheelFriction * @validate * @param {Vehicle} this - no description * @param {number} wheel - The wheel to change the friction of * @param {number} friction - The new friction to set * @returns {void} **/ SetWheelFriction(this: Vehicle, wheel: number, friction: number): void /** * * Sets the vehicle parameters for given vehicle. * * @name Vehicle:SetVehicleParams * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetVehicleParams * @note Not all variables from the @VehicleParams structure can be set. * @bug #2625 Because this method uses miles per hour but @Vehicle:GetVehicleParams returns Hammer units per second, this method incorrectly modifies the vehicle engine's "boostMaxSpeed", "maxRevSpeed" and "maxSpeed" even when not explicitly set in a call to this method. * **Workaround**: In order to retain the original values for these fields, call @Vehicle:GetVehicleParams yourself, convert the mentioned fields from Hammer units per second to miles per hour (1 MPH ≈ 17.6 HU/s in this case) and add them to the table passed into the call to this setter. Avoid doing this repeatedly to avoid floating point inaccuracies over time (store the ready-calculated value for next time if possible). * @param {Vehicle} this - no description * @param {VehicleParams} params - The new new vehicle parameters. See @VehicleParams structure * @returns {void} **/ SetVehicleParams(this: Vehicle, params: VehicleParams): void /** * * Sets whether the entry or exit camera animation should be played or not. * * @name Vehicle:SetVehicleEntryAnim * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetVehicleEntryAnim * @param {Vehicle} this - no description * @param {boolean} bOn - Whether the entry or exit camera animation should be played or not. * @returns {void} **/ SetVehicleEntryAnim(this: Vehicle, bOn: boolean): void /** * * Sets the throttle of the vehicle. It is possible that this function does not work with a valid driver in it. * * @name Vehicle:SetThrottle * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetThrottle * @param {Vehicle} this - no description * @param {number} throttle - The new throttle. * @returns {void} **/ SetThrottle(this: Vehicle, throttle: number): void /** * * Sets the vehicle class name. * * @name Vehicle:SetVehicleClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetVehicleClass * @internal * @param {Vehicle} this - no description * @param {string} cls - The vehicle class name to set * @returns {void} **/ SetVehicleClass(this: Vehicle, cls: string): void /** * * Sets the third person mode state. * * @name Vehicle:SetThirdPersonMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetThirdPersonMode * @param {Vehicle} this - no description * @param {boolean} enable - Enable or disable the third person mode for this vehicle * @returns {void} **/ SetThirdPersonMode(this: Vehicle, enable: boolean): void /** * * Sets the maximum steering degrees of the vehicle * * @name Vehicle:SetSteeringDegrees * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetSteeringDegrees * @param {Vehicle} this - no description * @param {number} steeringDegrees - The new maximum steering degree * @returns {void} **/ SetSteeringDegrees(this: Vehicle, steeringDegrees: number): void /** * * Sets the steering of the vehicle. * * @name Vehicle:SetSteering * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetSteering * @validate * @param {Vehicle} this - no description * @param {number} front - Angle of the front wheels (-1 to 1) * @param {number} rear - Angle of the rear wheels (-1 to 1) * @returns {void} **/ SetSteering(this: Vehicle, front: number, rear: number): void /** * * Sets spring length of given wheel * * @name Vehicle:SetSpringLength * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetSpringLength * @param {Vehicle} this - no description * @param {number} wheel - The wheel to change spring length of * @param {number} length - The new spring length * @returns {void} **/ SetSpringLength(this: Vehicle, wheel: number, length: number): void /** * * Sets maximum forward throttle * * @name Vehicle:SetMaxThrottle * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetMaxThrottle * @param {Vehicle} this - no description * @param {number} maxThrottle - The new maximum throttle. * @returns {void} **/ SetMaxThrottle(this: Vehicle, maxThrottle: number): void /** * * Sets maximum reverse throttle * * @name Vehicle:SetMaxReverseThrottle * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetMaxReverseThrottle * @param {Vehicle} this - no description * @param {number} maxRevThrottle - The new maximum throttle. This number must be negative. * @returns {void} **/ SetMaxReverseThrottle(this: Vehicle, maxRevThrottle: number): void /** * * Sets whether this vehicle has a brake pedal. * * @name Vehicle:SetHasBrakePedal * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetHasBrakePedal * @param {Vehicle} this - no description * @param {boolean} brakePedal - Whether this vehicle has a brake pedal * @returns {void} **/ SetHasBrakePedal(this: Vehicle, brakePedal: boolean): void /** * * Turns on or off the Jeep handbrake so it can roll without a driver inside. * Does nothing while the vehicle has a driver in it. * * @name Vehicle:SetHandbrake * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetHandbrake * @param {Vehicle} this - no description * @param {boolean} handbrake - true to turn on, false to turn off. * @returns {void} **/ SetHandbrake(this: Vehicle, handbrake: boolean): void /** * * Sets the third person camera distance of the vehicle. * * @name Vehicle:SetCameraDistance * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetCameraDistance * @param {Vehicle} this - no description * @param {number} distance - Camera distance to set to * @returns {void} **/ SetCameraDistance(this: Vehicle, distance: number): void /** * * Sets the boost. It is possible that this function does not work while the vehicle has a valid driver in it. * * @name Vehicle:SetBoost * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/SetBoost * @param {Vehicle} this - no description * @param {number} boost - The new boost value * @returns {void} **/ SetBoost(this: Vehicle, boost: number): void /** * * Releases the vehicle's handbrake (Jeep) so it can roll without any passengers. * This will be overwritten if the vehicle has a driver. Same as @Vehicle:SetHandbrake( false ) * * @name Vehicle:ReleaseHandbrake * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/ReleaseHandbrake * @param {Vehicle} this - no description * @returns {void} **/ ReleaseHandbrake(this: Vehicle): void /** * * Returns whether this vehicle's engine is underwater or not. ( Internally the attachment point "engine" or "vehicle_engine" is checked ) * * @name Vehicle:IsVehicleBodyInWater * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/IsVehicleBodyInWater * @param {Vehicle} this - no description * @returns {boolean} - Whether this vehicle's engine is underwater or not. **/ IsVehicleBodyInWater(this: Vehicle): boolean /** * * Returns true if the vehicle object is a valid or not. This will return false when @Vehicle type functions are not usable on the vehicle. * * @name Vehicle:IsValidVehicle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vehicle/IsValidVehicle * @param {Vehicle} this - no description * @returns {boolean} - Is the vehicle a valid vehicle or not **/ IsValidVehicle(this: Vehicle): boolean /** * * Returns whether the engine is started or not. * * @name Vehicle:IsEngineStarted * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/IsEngineStarted * @param {Vehicle} this - no description * @returns {boolean} - Whether the engine is started or not. **/ IsEngineStarted(this: Vehicle): boolean /** * * Returns whether the engine is enabled or not, i.e. whether it can be started. * * @name Vehicle:IsEngineEnabled * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/IsEngineEnabled * @param {Vehicle} this - no description * @returns {boolean} - Whether the engine is enabled **/ IsEngineEnabled(this: Vehicle): boolean /** * * Returns whether this vehicle is currently boosting or not. * * @name Vehicle:IsBoosting * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/IsBoosting * @param {Vehicle} this - no description * @returns {boolean} - Whether this vehicle is currently boosting or not. **/ IsBoosting(this: Vehicle): boolean /** * * Returns whether this vehicle has a brake pedal. See @Vehicle:SetHasBrakePedal. * * @name Vehicle:HasBrakePedal * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/HasBrakePedal * @param {Vehicle} this - no description * @returns {boolean} - Whether this vehicle has a brake pedal or not. **/ HasBrakePedal(this: Vehicle): boolean /** * * Returns whether this vehicle has boost at all. * * @name Vehicle:HasBoost * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/HasBoost * @param {Vehicle} this - no description * @returns {boolean} - Whether this vehicle has boost at all. **/ HasBoost(this: Vehicle): boolean /** * * Returns the total wheel height. * * @name Vehicle:GetWheelTotalHeight * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetWheelTotalHeight * @param {Vehicle} this - no description * @param {number} wheel - The wheel to get the base wheel height of. * @returns {number} - The total wheel height. **/ GetWheelTotalHeight(this: Vehicle, wheel: number): number /** * * Returns the wheel count of the vehicle * * @name Vehicle:GetWheelCount * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetWheelCount * @param {Vehicle} this - no description * @returns {number} - The amount of wheels **/ GetWheelCount(this: Vehicle): number /** * * Returns the wheel contact point. * * @name Vehicle:GetWheelContactPoint * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetWheelContactPoint * @param {Vehicle} this - no description * @param {number} wheel - The wheel to check * @returns {Vector} - The contact position * @returns {number} - The Surface Properties ID of hit surface. * @returns {boolean} - Whether the wheel is on ground or not * @tupleReturn **/ GetWheelContactPoint(this: Vehicle, wheel: number): [Vector, number, boolean] /** * * Returns the base wheel height. * * @name Vehicle:GetWheelBaseHeight * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetWheelBaseHeight * @param {Vehicle} this - no description * @param {number} wheel - The wheel to get the base wheel height of. * @returns {number} - The base wheel height. **/ GetWheelBaseHeight(this: Vehicle, wheel: number): number /** * * Returns the @PhysObj type of given wheel. * * @name Vehicle:GetWheel * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetWheel * @param {Vehicle} this - no description * @param {number} wheel - The wheel to retrieve * @returns {PhysObj} - The wheel **/ GetWheel(this: Vehicle, wheel: number): PhysObj /** * * Returns the view position and forward angle of a given passenger seat. * * @name Vehicle:GetVehicleViewPosition * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetVehicleViewPosition * @param {Vehicle} this - no description * @param {number} role - The passenger role. 0 is the driver. This parameter seems to be ignored by the game engine and is therefore optional. * @returns {Vector} - The view position, will be 0, 0, 0 on failure * @returns {Angle} - The view angles, will be 0, 0, 0 on failure * @returns {number} - The field of view, will be 0 on failure * @tupleReturn **/ GetVehicleViewPosition(this: Vehicle, role?: number): [Vector, Angle, number] /** * * Returns the vehicle parameters of given vehicle. * * @name Vehicle:GetVehicleParams * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetVehicleParams * @param {Vehicle} this - no description * @returns {VehicleParams} - The vehicle parameters. See @VehicleParams structure **/ GetVehicleParams(this: Vehicle): VehicleParams /** * * Returns the vehicle class name. This is only useful for Sandbox spawned vehicles or any vehicle that properly sets the vehicle class with @Vehicle:SetVehicleClass. * * @name Vehicle:GetVehicleClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetVehicleClass * @param {Vehicle} this - no description * @returns {string} - The class name of the vehicle. **/ GetVehicleClass(this: Vehicle): string /** * * Returns the current throttle of the vehicle. * * @name Vehicle:GetThrottle * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetThrottle * @param {Vehicle} this - no description * @returns {number} - The current throttle of the vehicle **/ GetThrottle(this: Vehicle): number /** * * Returns if vehicle has thirdperson mode enabled or not. * * @name Vehicle:GetThirdPersonMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetThirdPersonMode * @param {Vehicle} this - no description * @returns {boolean} - Returns true if third person mode enabled, false otherwise **/ GetThirdPersonMode(this: Vehicle): boolean /** * * Returns the current steering of the vehicle. * * @name Vehicle:GetSteering * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetSteering * @param {Vehicle} this - no description * @returns {number} - The current steering of the vehicle. **/ GetSteering(this: Vehicle): number /** * * Returns the maximum steering degree of the vehicle * * @name Vehicle:GetSteeringDegrees * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetSteeringDegrees * @param {Vehicle} this - no description * @returns {number} - The maximum steering degree of the vehicle **/ GetSteeringDegrees(this: Vehicle): number /** * * Returns the current speed of the vehicle in MPH. * * @name Vehicle:GetSpeed * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetSpeed * @param {Vehicle} this - no description * @returns {number} - The speed of the vehicle in MPH **/ GetSpeed(this: Vehicle): number /** * * Returns the current RPM of the vehicle. This value is fake and doesn't actually affect the vehicle movement. * * @name Vehicle:GetRPM * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetRPM * @param {Vehicle} this - no description * @returns {number} - The RPM. **/ GetRPM(this: Vehicle): number /** * * Returns the seat position and angle of a given passenger seat. * * @name Vehicle:GetPassengerSeatPoint * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetPassengerSeatPoint * @param {Vehicle} this - no description * @param {number} role - The passenger role. ( 1 is the driver ) * @returns {Vector} - The seat position * @returns {Angle} - The seat angle * @tupleReturn **/ GetPassengerSeatPoint(this: Vehicle, role: number): [Vector, Angle] /** * * Gets the passenger of the vehicle, returns NULL if no drivers is present. * * @name Vehicle:GetPassenger * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetPassenger * @param {Vehicle} this - no description * @param {number} passenger - The index of the passenger * @returns {Entity} - The passenger **/ GetPassenger(this: Vehicle, passenger: number): Entity /** * * Returns some info about the vehicle. * * @name Vehicle:GetOperatingParams * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetOperatingParams * @param {Vehicle} this - no description * @returns {OperatingParams} - The operating params. See @OperatingParams structure. **/ GetOperatingParams(this: Vehicle): OperatingParams /** * * Returns the max speed of the vehicle in MPH. * * @name Vehicle:GetMaxSpeed * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetMaxSpeed * @param {Vehicle} this - no description * @returns {number} - The max speed of the vehicle in MPH **/ GetMaxSpeed(this: Vehicle): number /** * * Returns the current speed of the vehicle in Half-Life Hammer Units (in/s). Same as @EntityFuncs:GetVelocity + @VectorFuncs:Length. * * @name Vehicle:GetHLSpeed * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetHLSpeed * @param {Vehicle} this - no description * @returns {number} - The speed of the vehicle **/ GetHLSpeed(this: Vehicle): number /** * * Gets the driver of the vehicle, returns NULL if no driver is present. * * @name Vehicle:GetDriver * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetDriver * @param {Vehicle} this - no description * @returns {Entity} - The driver of the vehicle **/ GetDriver(this: Vehicle): Entity /** * * Returns third person camera distance. * * @name Vehicle:GetCameraDistance * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vehicle/GetCameraDistance * @param {Vehicle} this - no description * @returns {number} - Camera distance **/ GetCameraDistance(this: Vehicle): number /** * * Returns information about the ammo of the vehicle * * @name Vehicle:GetAmmo * @realm client * @wiki https://wiki.garrysmod.com/page/Vehicle/GetAmmo * @param {Vehicle} this - no description * @returns {number} - Ammo type of the vehicle ammo * @returns {number} - Clip size * @returns {number} - Count * @tupleReturn **/ GetAmmo(this: Vehicle): [number, number, number] /** * * Sets whether the engine is enabled or disabled, i.e. can be started or not. * * @name Vehicle:EnableEngine * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/EnableEngine * @param {Vehicle} this - no description * @param {boolean} enable - Enable or disable the engine * @returns {void} **/ EnableEngine(this: Vehicle, enable: boolean): void /** * * Tries to find an Exit Point for leaving vehicle, if one is unobstructed in the direction given. * * @name Vehicle:CheckExitPoint * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/CheckExitPoint * @param {Vehicle} this - no description * @param {number} yaw - Yaw/roll from vehicle angle to check for exit * @param {number} distance - Distance from origin to drop player * @returns {Vector} - Returns the vector for exit position or nil if cannot exit that way. **/ CheckExitPoint(this: Vehicle, yaw: number, distance: number): Vector /** * * Returns the remaining boosting time left. * * @name Vehicle:BoostTimeLeft * @realm server * @wiki https://wiki.garrysmod.com/page/Vehicle/BoostTimeLeft * @param {Vehicle} this - no description * @returns {number} - The remaining boosting time left **/ BoostTimeLeft(this: Vehicle): number } declare interface VectorFuncs { /** * * Sets x, y and z to 0. * * @name VectorFuncs:Zero * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Zero * @param {Vector} this - no description * @returns {void} **/ Zero(this: Vector): void /** * * Returns whenever the given vector is in a box created by the 2 other vectors. * * @name VectorFuncs:WithinAABox * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/WithinAABox * @param {Vector} this - no description * @param {Vector} boxStart - The first vector. * @param {Vector} boxEnd - The second vector. * @returns {boolean} - Is the vector in the box or not **/ WithinAABox(this: Vector, boxStart: Vector, boxEnd: Vector): boolean /** * * Returns the x, y, and z of the vector. * * @name VectorFuncs:Unpack * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Unpack * @param {Vector} this - no description * @returns {number} - x or Vector[1]. * @returns {number} - y or Vector[2]. * @returns {number} - z or Vector[3]. * @tupleReturn **/ Unpack(this: Vector): [number, number, number] /** * * Returns the vector as a table with three elements. * * @name VectorFuncs:ToTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/ToTable * @param {Vector} this - no description * @returns {table} - The table with elements 1 = x, 2 = y, 3 = z. **/ ToTable(this: Vector): table /** * * Returns where on the screen the specified position vector would appear. A related function is @gui.ScreenToVector, which converts a 2D coordinate to a 3D direction. * * @name VectorFuncs:ToScreen * @realm client * @wiki https://wiki.garrysmod.com/page/Vector/ToScreen * @note Should be called from a 3D rendering environment or after @cam.Start3D or it may not work correctly. * @bug #462 Errors in a render hook can make this value incorrect until the player restarts their game. * @bug #1404 @cam.Start3D or 3D context @cam.Start with non-default parameters incorrectly sets the reference FOV for this function, causing incorrect return values. This can be fixed by creating and ending a default 3D context (@cam.Start3D with no arguments). * @param {Vector} this - no description * @returns {ToScreenData} - The created @ToScreenData structure. **/ ToScreen(this: Vector): ToScreenData /** * * Translates the @Vector type (values ranging from 0 to 1) into a @IColor structure. This will also range the values from 0 - 1 to 0 - 255. * x * 255 -> r * y * 255 -> g * z * 255 -> b * This is the opposite of @ColorFuncs:ToVector * * @name VectorFuncs:ToColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/ToColor * @param {Vector} this - no description * @returns {IColor} - The created @IColor structure. **/ ToColor(this: Vector): IColor /** * * Substracts the values of the second vector from the orignal vector, this function can be used to avoid garbage collection. * * @name VectorFuncs:Sub * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Sub * @param {Vector} this - no description * @param {Vector} vector - The other vector. * @returns {void} **/ Sub(this: Vector, vector: Vector): void /** * * Sets the x, y, and z of the vector. * * @name VectorFuncs:SetUnpacked * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/SetUnpacked * @param {Vector} this - no description * @param {number} x - The x component * @param {number} y - The y component * @param {number} z - The z component * @returns {void} **/ SetUnpacked(this: Vector, x: number, y: number, z: number): void /** * * Copies the values from the second vector to the first vector. * * @name VectorFuncs:Set * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Set * @param {Vector} this - no description * @param {Vector} vector - The vector to copy from. * @returns {void} **/ Set(this: Vector, vector: Vector): void /** * * Rotates a vector by the given angle. * Doesn't return anything, but rather changes the original vector. * * @name VectorFuncs:Rotate * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Rotate * @param {Vector} this - no description * @param {Angle} rotation - The angle to rotate the vector by. * @returns {void} **/ Rotate(this: Vector, rotation: Angle): void /** * * Normalizes the given vector. This changes the vector you call it on, if you want to return a normalized copy without affecting the original, use @VectorFuncs:GetNormalized. * * @name VectorFuncs:Normalize * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Normalize * @param {Vector} this - no description * @returns {void} **/ Normalize(this: Vector): void /** * * Scales the vector by the given number, that means x, y and z are multiplied by that value. * * @name VectorFuncs:Mul * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Mul * @param {Vector} this - no description * @param {number} multiplier - The value to scale the vector with. * @returns {void} **/ Mul(this: Vector, multiplier: number): void /** * * Returns the squared length of the vector, x² + y² + z². * This is faster than @VectorFuncs:Length as calculating the square root is an expensive process. * * @name VectorFuncs:LengthSqr * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/LengthSqr * @param {Vector} this - no description * @returns {number} - Squared length of the vector **/ LengthSqr(this: Vector): number /** * * Returns the squared length of the vectors x and y value, x² + y². * This is faster than @VectorFuncs:Length2D as calculating the square root is an expensive process. * * @name VectorFuncs:Length2DSqr * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Length2DSqr * @param {Vector} this - no description * @returns {number} - Squared length of the vector in two dimensions **/ Length2DSqr(this: Vector): number /** * * Returns the length of the vector in two dimensions, without the Z axis. * * @name VectorFuncs:Length2D * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Length2D * @param {Vector} this - no description * @returns {number} - Length of the vector in two dimensions, √ x² + y² **/ Length2D(this: Vector): number /** * * Returns the Euclidean length of the vector: √ x² + y² + z² * * @name VectorFuncs:Length * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Length * @param {Vector} this - no description * @returns {number} - Length of the vector. **/ Length(this: Vector): number /** * * Checks whenever all fields of the vector are 0. * * @name VectorFuncs:IsZero * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/IsZero * @param {Vector} this - no description * @returns {boolean} - Do all fields of the vector equal 0 or not **/ IsZero(this: Vector): boolean /** * * Returns if the vector is equal to another vector with the given tolerance. * * @name VectorFuncs:IsEqualTol * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/IsEqualTol * @param {Vector} this - no description * @param {Vector} compare - The vector to compare to. * @param {number} tolerance - The tolerance range. * @returns {boolean} - Are the vectors equal or not. **/ IsEqualTol(this: Vector, compare: Vector, tolerance: number): boolean /** * * Returns a normalized version of the vector. Normalized means vector with same direction but with length of 1. * This does not affect the vector you call it on; to do this, use @VectorFuncs:Normalize. * * @name VectorFuncs:GetNormalized * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/GetNormalized * @param {Vector} this - no description * @returns {Vector} - Normalized version of the vector. **/ GetNormalized(this: Vector): Vector /** * * Returns a normalized version of the vector. This is a alias of @VectorFuncs:GetNormalized. * * @name VectorFuncs:GetNormal * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/GetNormal * @param {Vector} this - no description * @returns {Vector} - Normalized version of the vector. **/ GetNormal(this: Vector): Vector /** * * Returns the dot product of the two vectors. * * @name VectorFuncs:DotProduct * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/DotProduct * @param {Vector} this - no description * @param {Vector} Vector - The other vector. * @returns {number} - Dot Product **/ DotProduct(this: Vector, Vector: Vector): number /** * * Returns the [dot product](https://en.wikipedia.org/wiki/Dot%20product#Geometric%20definition) of this vector and the passed one. * The dot product of two vectors is the product of their magnitudes (lengths), and the cosine of the angle between them: * :**a · b** = * * @name VectorFuncs:Dot * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Dot * @param {Vector} this - no description * @param {Vector} otherVector - The vector to calculate the dot product with * @returns {number} - The dot product between the two vectors **/ Dot(this: Vector, otherVector: Vector): number /** * * Divide the vector by the given number, that means x, y and z are divided by that value. This will change the value of the original vector, see example 2 for division without changing the value. * * @name VectorFuncs:Div * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Div * @param {Vector} this - no description * @param {number} divisor - The value to divide the vector with. * @returns {void} **/ Div(this: Vector, divisor: number): void /** * * Returns the squared distance of 2 vectors, this is faster than @VectorFuncs:Distance as calculating the square root is an expensive process. * * @name VectorFuncs:DistToSqr * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/DistToSqr * @param {Vector} this - no description * @param {Vector} otherVec - The vector to calculate the distance to. * @returns {number} - Squared distance to the vector **/ DistToSqr(this: Vector, otherVec: Vector): number /** * * Returns the pythagorean distance between the vector and the other vector. * * @name VectorFuncs:Distance * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Distance * @warning This is a relatively expensive process since it uses the square root. It is recommended that you use @VectorFuncs:DistToSqr whenever possible. * @param {Vector} this - no description * @param {Vector} otherVector - The vector to get the distance to. * @returns {number} - Distance between the vectors. **/ Distance(this: Vector, otherVector: Vector): number /** * * Calculates the cross product of this vector and the passed one. * The cross product of two vectors is a 3-dimensional vector with a direction perpendicular (at right angles) to both of them (according to the right-hand rule), and magnitude equal to the area of parallelogram they span. This is defined as the product of the magnitudes, the sine of the angle between them, and unit (normal) vector *n* defined by the right-hand rule: * :**a** × **b** = * * @name VectorFuncs:Cross * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Cross * @param {Vector} this - no description * @param {Vector} otherVector - Vector to calculate the cross product with. * @returns {Vector} - The cross product of the two vectors. **/ Cross(this: Vector, otherVector: Vector): Vector /** * * Returns the angle of the vector, but instead of assuming that up is @Vector function( 0, 0, 1 ) (Like @VectorFuncs:Angle does) you can specify which direction is 'up' for the angle. * * @name VectorFuncs:AngleEx * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/AngleEx * @param {Vector} this - no description * @param {Vector} up - The up direction vector * @returns {Angle} - The angle **/ AngleEx(this: Vector, up: Vector): Angle /** * * Returns an angle representing the normal of the vector. * * @name VectorFuncs:Angle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Angle * @param {Vector} this - no description * @returns {Angle} - The angle/direction of the vector. **/ Angle(this: Vector): Angle /** * * Adds the values of the argument vector to the orignal vector. This functions the same as vector1 + vector2 without creating a new vector object, skipping object construction and garbage collection. * * @name VectorFuncs:Add * @realm client, server * @wiki https://wiki.garrysmod.com/page/Vector/Add * @param {Vector} this - no description * @param {Vector} vector - The vector to add. * @returns {void} **/ Add(this: Vector, vector: Vector): void } declare interface ToolFuncs extends Entity { /** * * Updates the position and orientation of the ghost entity based on where the toolgun owner is looking along with data from object with id 1 set by @ToolFuncs:SetObject. * This should be called in the tool's @ToolHooks:Think hook. * This command is only used for tools that move props, such as easy weld, axis and motor. If you want to update a ghost like the thruster tool does it for example, check its [source code](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/thruster.lua#L179). * * @name ToolFuncs:UpdateGhostEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/UpdateGhostEntity * @param {ToolFuncs} this - no description * @returns {void} **/ UpdateGhostEntity(this: ToolFuncs): void /** * * Sets the tool's stage to how many stored objects the tool has. * * @name ToolFuncs:UpdateData * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/UpdateData * @internal Called on deploy automatically * @param {ToolFuncs} this - no description * @returns {void} **/ UpdateData(this: ToolFuncs): void /** * * Initializes the ghost entity based on the supplied entity. * * @name ToolFuncs:StartGhostEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/StartGhostEntity * @param {ToolFuncs} this - no description * @param {Entity} ent - The entity to copy ghost parameters off * @returns {void} **/ StartGhostEntity(this: ToolFuncs, ent: Entity): void /** * * Sets the current stage of the tool. Does nothing clientside. * See also @ToolFuncs:SetOperation. * * @name ToolFuncs:SetStage * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/SetStage * @param {ToolFuncs} this - no description * @param {number} stage - The new stage to set. * @returns {void} **/ SetStage(this: ToolFuncs, stage: number): void /** * * Sets the current operation of the tool. Does nothing clientside. See also @ToolFuncs:SetStage. * Operations and stages work as follows: * * Operation 1 * ** Stage 1 * ** Stage 2 * ** Stage 3 * * Operation 2 * ** Stage 1 * ** Stage 2 * ** Stage ... * * @name ToolFuncs:SetOperation * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/SetOperation * @param {ToolFuncs} this - no description * @param {number} operation - The new operation ID to set. * @returns {void} **/ SetOperation(this: ToolFuncs, operation: number): void /** * * Stores an @Entity type for later use in the tool. * The stored values can be retrieved by @ToolFuncs:GetEnt, @ToolFuncs:GetPos, @ToolFuncs:GetLocalPos, @ToolFuncs:GetPhys, @ToolFuncs:GetBone and @ToolFuncs:GetNormal * * @name ToolFuncs:SetObject * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/SetObject * @note this position is in **global space** and is internally converted to **local space** relative to the object, so when you retrieve it later it will be corrected to the object's new position * @param {ToolFuncs} this - no description * @param {number} id - The id of the object to store. * @param {Entity} ent - The entity to store. * @param {Vector} pos - The position to store. * @param {PhysObj} phys - The physics object to store. * @param {number} bone - The hit bone to store. * @param {Vector} normal - The hit normal to store. * @returns {void} **/ SetObject(this: ToolFuncs, id: number, ent: Entity, pos: Vector, phys: PhysObj, bone: number, normal: Vector): void /** * * Removes any ghost entity created for this tool. * * @name ToolFuncs:ReleaseGhostEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/ReleaseGhostEntity * @param {ToolFuncs} this - no description * @returns {void} **/ ReleaseGhostEntity(this: ToolFuncs): void /** * * Returns the amount of stored objects ( @Entity types ) the tool has. * * @name ToolFuncs:NumObjects * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/NumObjects * @validate * @param {ToolFuncs} this - no description * @returns {number} - The amount of stored objects, or @ToolFuncs:GetStage clientide. **/ NumObjects(this: ToolFuncs): number /** * * Initializes the ghost entity with the given model. Removes any old ghost entity if called multiple times. * The ghost is a regular prop_physics entity in singleplayer games, and a clientside prop in multiplayer games. * * @name ToolFuncs:MakeGhostEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/MakeGhostEntity * @param {ToolFuncs} this - no description * @param {string} model - The model of the new ghost entity * @param {Vector} pos - Position to initialize the ghost entity at, usually not needed since this is updated in @ToolFuncs:UpdateGhostEntity. * @param {Angle} angle - Angle to initialize the ghost entity at, usually not needed since this is updated in @ToolFuncs:UpdateGhostEntity. * @returns {void} **/ MakeGhostEntity(this: ToolFuncs, model: string, pos: Vector, angle: Angle): void /** * * Returns the current stage of the tool set by @ToolFuncs:SetStage. * * @name ToolFuncs:GetStage * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetStage * @param {ToolFuncs} this - no description * @returns {number} - The current stage of the current operation the tool is at. **/ GetStage(this: ToolFuncs): number /** * * Attempts to grab a serverside tool @ConVar type. * This will not do anything on client, despite the function being defined shared. * * @name ToolFuncs:GetServerInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetServerInfo * @param {ToolFuncs} this - no description * @param {string} name - Name of the convar to retrieve. The function will automatically add the "mytoolfilename_" part to it. * @returns {string} - The value of the requested @ConVar type. **/ GetServerInfo(this: ToolFuncs, name: string): string /** * * Retrieves an vector previously stored using @ToolFuncs:SetObject. See also @ToolFuncs:GetLocalPos. * * @name ToolFuncs:GetPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetPos * @param {ToolFuncs} this - no description * @param {number} id - The id of the object which was set in @ToolFuncs:SetObject. * @returns {Vector} - Associated vector with given id. The vector is converted from @ToolFuncs:GetLocalPos. **/ GetPos(this: ToolFuncs, id?: number): Vector /** * * Retrieves an @PhysObj type previously stored using @ToolFuncs:SetObject. * See also @ToolFuncs:GetEnt. * * @name ToolFuncs:GetPhys * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetPhys * @param {ToolFuncs} this - no description * @param {number} id - The id of the object which was set in @ToolFuncs:SetObject. * @returns {PhysObj} - Associated PhysObj with given id. If it wasn't specified, returns current @PhysObj type of associated Entity **/ GetPhys(this: ToolFuncs, id: number): PhysObj /** * * Returns the owner of this tool. * * @name ToolFuncs:GetOwner * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetOwner * @param {ToolFuncs} this - no description * @returns {Entity} - Player using the tool **/ GetOwner(this: ToolFuncs): Entity /** * * Returns the current operation of the tool set by @ToolFuncs:SetOperation. * * @name ToolFuncs:GetOperation * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetOperation * @param {ToolFuncs} this - no description * @returns {number} - The current operation the tool is at. **/ GetOperation(this: ToolFuncs): number /** * * Retrieves an normal vector previously stored using @ToolFuncs:SetObject. * * @name ToolFuncs:GetNormal * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetNormal * @param {ToolFuncs} this - no description * @param {number} id - The id of the object which was set in @ToolFuncs:SetObject. * @returns {Vector} - Associated normal vector with given id. **/ GetNormal(this: ToolFuncs, id: number): Vector /** * * Returns the name of the current tool mode. * * @name ToolFuncs:GetMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetMode * @param {ToolFuncs} this - no description * @returns {string} - The current tool mode. **/ GetMode(this: ToolFuncs): string /** * * Retrieves an local vector previously stored using @ToolFuncs:SetObject. * See also @ToolFuncs:GetPos. * * @name ToolFuncs:GetLocalPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetLocalPos * @param {ToolFuncs} this - no description * @param {number} id - The id of the object which was set in @ToolFuncs:SetObject. * @returns {Vector} - Associated local vector with given id. **/ GetLocalPos(this: ToolFuncs, id?: number): Vector /** * * Returns a language key based on this tool's name and the current stage it is on. * * @name ToolFuncs:GetHelpText * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetHelpText * @param {ToolFuncs} this - no description * @returns {string} - The returned language key, for example "#tool.weld.1"``` **/ GetHelpText(this: ToolFuncs): string /** * * Retrieves an Entity previously stored using @ToolFuncs:SetObject. * * @name ToolFuncs:GetEnt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetEnt * @param {ToolFuncs} this - no description * @param {number} id - The id of the object which was set in @ToolFuncs:SetObject. * @returns {Entity} - Associated Entity with given id. **/ GetEnt(this: ToolFuncs, id: number): Entity /** * * Attempts to grab a clientside tool @ConVar type. * * @name ToolFuncs:GetClientNumber * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetClientNumber * @param {ToolFuncs} this - no description * @param {string} name - Name of the convar to retrieve. The function will automatically add the "mytoolfilename_" part to it. * @param {number} def - The default value to return in case the lookup fails. * @returns {number} - The value of the requested @ConVar type. **/ GetClientNumber(this: ToolFuncs, name: string, def?: number): number /** * * Attempts to grab a clientside tool @ConVar type. * * @name ToolFuncs:GetClientInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetClientInfo * @param {ToolFuncs} this - no description * @param {string} name - Name of the convar to retrieve. The function will automatically add the "mytoolfilename_" part to it. * @returns {string} - The value of the requested @ConVar type. **/ GetClientInfo(this: ToolFuncs, name: string): string /** * * Retrieves a physics bone number previously stored using @ToolFuncs:SetObject. * * @name ToolFuncs:GetBone * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/GetBone * @param {ToolFuncs} this - no description * @param {number} id - The id of the object which was set in @ToolFuncs:SetObject. * @returns {number} - Associated physics bone with given id. **/ GetBone(this: ToolFuncs, id: number): number /** * * Creates clientside ConVars based on the ClientConVar table specified in the tool structure. Also creates the 'toolmode_allow_X' ConVar. * * @name ToolFuncs:CreateConVars * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/CreateConVars * @internal This is called automatically for all tools. * @param {ToolFuncs} this - no description * @returns {void} **/ CreateConVars(this: ToolFuncs): void /** * * Initializes the tool object * * @name ToolFuncs:Create * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/Create * @internal This is called automatically for all tools. * @param {ToolFuncs} this - no description * @returns {Tool} - The created tool object. **/ Create(this: ToolFuncs): Tool /** * * Clears all objects previously set with @ToolFuncs:SetObject. * * @name ToolFuncs:ClearObjects * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/ClearObjects * @param {ToolFuncs} this - no description * @returns {void} **/ ClearObjects(this: ToolFuncs): void /** * * Checks all added objects to see if they're still valid, if not, clears the list of objects. * * @name ToolFuncs:CheckObjects * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/CheckObjects * @internal This is called automatically for most toolgun actions so you shouldn't need to use it. * @param {ToolFuncs} this - no description * @returns {void} **/ CheckObjects(this: ToolFuncs): void /** * * Builds a list of all ConVars set via the ClientConVar variable on the @ITool structure and their default values. This is used for the preset system. * * @name ToolFuncs:BuildConVarList * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/BuildConVarList * @param {ToolFuncs} this - no description * @returns {table} - A list of all convars and their default values. **/ BuildConVarList(this: ToolFuncs): table /** * * Checks whether the tool is allowed on the server. This will always return true clientside and will not be affected by @SandboxHooks:CanTool. * This function uses **TOOL.AllowedCVar** which is a @ConVar type object pointing to **toolmode_allow_**toolname**** convar. * * @name ToolFuncs:Allowed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Tool/Allowed * @param {ToolFuncs} this - no description * @returns {boolean} - Returns true if the tool is allowed. **/ Allowed(this: ToolFuncs): boolean } declare interface ToolHooks { /** * * Called when @WeaponHooks:Think of the toolgun is called. This only happens when the tool gun is currently equipped/selected by the player and the selected tool is this tool. * * @name ToolHooks:Think * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/TOOL/Think * @param {_TOOL} this - no description * @returns {void} **/ Think(this: _TOOL): void /** * * Called when the user right clicks with the tool. * * @name ToolHooks:RightClick * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/TOOL/RightClick * @param {_TOOL} this - no description * @param {TraceResult} tr - A trace from users eyes to wherever he aims at. See @TraceResult structure * @returns {boolean} - Return true to make the tool gun beam and play fire animations, false otherwise **/ RightClick(this: _TOOL, tr: TraceResult): boolean /** * * Called when the user presses the reload key with the tool out. * * @name ToolHooks:Reload * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/TOOL/Reload * @param {_TOOL} this - no description * @param {TraceResult} tr - A trace from users eyes to wherever he aims at. See @TraceResult structure * @returns {boolean} - Return true to make the tool gun beam and play fire animations, false otherwise **/ Reload(this: _TOOL, tr: TraceResult): boolean /** * * Called when the user left clicks with the tool * * @name ToolHooks:LeftClick * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/TOOL/LeftClick * @param {_TOOL} this - no description * @param {TraceResult} tr - A trace from users eyes to wherever he aims at. See @TraceResult structure * @returns {boolean} - Return true to make the tool gun beam and play fire animations, false otherwise **/ LeftClick(this: _TOOL, tr: TraceResult): boolean /** * * Called when @WeaponHooks:Holster of the toolgun is called, as well as when switching between different toolguns. * * @name ToolHooks:Holster * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/TOOL/Holster * @param {_TOOL} this - no description * @returns {void} **/ Holster(this: _TOOL): void /** * * Called when @WeaponHooks:Think of the toolgun is called, only when the user has this tool selected. * * @name ToolHooks:FreezeMovement * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/TOOL/FreezeMovement * @param {_TOOL} this - no description * @returns {boolean} - Return true to freeze the player **/ FreezeMovement(this: _TOOL): boolean /** * * Called after the default tool screen has been drawn from @WeaponHooks:RenderScreen. * * @name ToolHooks:DrawToolScreen * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/TOOL/DrawToolScreen * @note If this method exists on the TOOL object table, the default scrolling text will not be drawn * @note Materials rendered in this hook require $ignorez parameter to draw properly. * @param {_TOOL} this - no description * @param {number} width - The width of the tool's screen in pixels. * @param {number} height - The height of the tool's screen in pixels. * @returns {void} **/ DrawToolScreen(this: _TOOL, width: number, height: number): void /** * * Called when @WeaponHooks:DrawHUD of the toolgun is called, only when the user has this tool selected. * * @name ToolHooks:DrawHUD * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/TOOL/DrawHUD * @param {_TOOL} this - no description * @returns {void} **/ DrawHUD(this: _TOOL): void /** * * Called when @WeaponHooks:Deploy of the toolgun is called. * This is also called when switching from another tool on the server. * * @name ToolHooks:Deploy * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/TOOL/Deploy * @param {_TOOL} this - no description * @returns {void} **/ Deploy(this: _TOOL): void } declare interface Task { /** * * Starts the AI task as an NPC method. * * @name Task:Start_FName * @realm server * @wiki https://wiki.garrysmod.com/page/Task/Start FName * @internal * @param {Task} this - no description * @param {NPC} target - The NPC to start the task on. * @returns {void} **/ Start_FName(this: Task, target: NPC): void /** * * Starts the AI task. * * @name Task:Start * @realm server * @wiki https://wiki.garrysmod.com/page/Task/Start * @param {Task} this - no description * @param {NPC} target - The NPC to start the task on. * @returns {void} **/ Start(this: Task, target: NPC): void /** * * Runs the AI task as an NPC method. This requires the task to be of type *TYPE_FNAME*. * * @name Task:Run_FName * @realm server * @wiki https://wiki.garrysmod.com/page/Task/Run FName * @internal * @param {Task} this - no description * @param {NPC} target - The NPC to run the task on. * @returns {void} **/ Run_FName(this: Task, target: NPC): void /** * * Runs the AI task. * * @name Task:Run * @realm server * @wiki https://wiki.garrysmod.com/page/Task/Run * @param {Task} this - no description * @param {NPC} target - The NPC to run the task on. * @returns {void} **/ Run(this: Task, target: NPC): void /** * * Determines if the task is an NPC method-based task (*TYPE_FNAME*, 2). * * @name Task:IsFNameType * @realm server * @wiki https://wiki.garrysmod.com/page/Task/IsFNameType * @param {Task} this - no description * @returns {void} **/ IsFNameType(this: Task): void /** * * Determines if the task is an engine task (*TYPE_ENGINE*, 1). * * @name Task:IsEngineType * @realm server * @wiki https://wiki.garrysmod.com/page/Task/IsEngineType * @param {Task} this - no description * @returns {void} **/ IsEngineType(this: Task): void /** * * Initialises the AI task as NPC method-based. * * @name Task:InitFunctionName * @realm server * @wiki https://wiki.garrysmod.com/page/Task/InitFunctionName * @param {Task} this - no description * @param {string} startname - The name of the NPC method to call on task start. * @param {string} runname - The name of the NPC method to call on task run. * @param {number} taskdata - no description * @returns {void} **/ InitFunctionName(this: Task, startname: string, runname: string, taskdata: number): void /** * * Initialises the AI task as an engine task. * * @name Task:InitEngine * @realm server * @wiki https://wiki.garrysmod.com/page/Task/InitEngine * @param {Task} this - no description * @param {string} taskname - The name of the task. * @param {number} taskdata - no description * @returns {void} **/ InitEngine(this: Task, taskname: string, taskdata: number): void /** * * Initialises the AI task. Called by @ai_task.New. * * @name Task:Init * @realm server * @wiki https://wiki.garrysmod.com/page/Task/Init * @internal * @param {Task} this - no description * @returns {void} **/ Init(this: Task): void } declare interface SurfaceInfo { /** * * Checks if the brush surface is water. * This internally checks the **SURFDRAW_WATER** flag. * * @name SurfaceInfo:IsWater * @realm client, server * @wiki https://wiki.garrysmod.com/page/SurfaceInfo/IsWater * @param {SurfaceInfo} this - no description * @returns {boolean} - Returns true if the surface is water. **/ IsWater(this: SurfaceInfo): boolean /** * * Checks if the brush surface is displaying the skybox. * This internally checks the **SURFDRAW_SKY** flag. * * @name SurfaceInfo:IsSky * @realm client, server * @wiki https://wiki.garrysmod.com/page/SurfaceInfo/IsSky * @param {SurfaceInfo} this - no description * @returns {boolean} - Returns true if the surface is the sky. **/ IsSky(this: SurfaceInfo): boolean /** * * Checks if the brush surface is a nodraw surface, meaning it will not be drawn by the engine. * This internally checks the SURFDRAW_NODRAW flag. * * @name SurfaceInfo:IsNoDraw * @realm client, server * @wiki https://wiki.garrysmod.com/page/SurfaceInfo/IsNoDraw * @param {SurfaceInfo} this - no description * @returns {boolean} - Returns true if this surface won't be drawn. **/ IsNoDraw(this: SurfaceInfo): boolean /** * * Returns the brush surface's material. * * @name SurfaceInfo:GetMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/SurfaceInfo/GetMaterial * @param {SurfaceInfo} this - no description * @returns {IMaterial} - Material of one portion of a brush model. **/ GetMaterial(this: SurfaceInfo): IMaterial /** * * Returns a list of vertices the brush surface is built from. * * @name SurfaceInfo:GetVertices * @realm client, server * @wiki https://wiki.garrysmod.com/page/SurfaceInfo/GetVertices * @param {SurfaceInfo} this - no description * @returns {Vector[]} - A list of @Vector type points. This will usually be 4 corners of a quadrilateral in counter-clockwise order. **/ GetVertices(this: SurfaceInfo): Vector[] } declare interface Stack { /** * * Get the item at the top of the stack * * @name Stack:Top * @realm client, server * @wiki https://wiki.garrysmod.com/page/Stack/Top * @param {Stack} this - no description * @returns {any} - The item at the top of the stack **/ Top(this: Stack): any /** * * Returns the size of the stack * * @name Stack:Size * @realm client, server * @wiki https://wiki.garrysmod.com/page/Stack/Size * @param {Stack} this - no description * @returns {number} - The size of the stack **/ Size(this: Stack): number /** * * Push an item onto the stack * * @name Stack:Push * @realm client, server * @wiki https://wiki.garrysmod.com/page/Stack/Push * @param {Stack} this - no description * @param {any} object - The item you want to push * @returns {void} **/ Push(this: Stack, object: any): void /** * * Pop an item from the stack * * @name Stack:Pop * @realm client, server * @wiki https://wiki.garrysmod.com/page/Stack/Pop * @param {Stack} this - no description * @param {number} amount - Amount of items you want to pop. * @returns {void} **/ Pop(this: Stack, amount?: number): void } declare interface Schedule { /** * * Returns the number of tasks in the schedule. * * @name Schedule:NumTasks * @realm server * @wiki https://wiki.garrysmod.com/page/Schedule/NumTasks * @param {Schedule} this - no description * @returns {number} - The number of tasks in this schedule. **/ NumTasks(this: Schedule): number /** * * Initialises the Schedule. Called by @ai_schedule.New when the Schedule is created. * * @name Schedule:Init * @realm server * @wiki https://wiki.garrysmod.com/page/Schedule/Init * @internal * @param {Schedule} this - no description * @param {string} debugName - The name passed from @ai_schedule.New. * @returns {void} **/ Init(this: Schedule, debugName: string): void /** * * Returns the task at the given index. * * @name Schedule:GetTask * @realm server * @wiki https://wiki.garrysmod.com/page/Schedule/GetTask * @param {Schedule} this - no description * @param {number} num - Task index. * @returns {void} **/ GetTask(this: Schedule, num: number): void /** * * Adds an engine task to the schedule. * * @name Schedule:EngTask * @realm server * @wiki https://wiki.garrysmod.com/page/Schedule/EngTask * @param {Schedule} this - no description * @param {string} taskname - Task name, see [ai_task.h](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/server/ai_task.h#L89-L502) * @param {number} taskdata - Task data, can be a float. * @returns {void} **/ EngTask(this: Schedule, taskname: string, taskdata: number): void /** * * Adds a task to the schedule with completely custom function names. * See also @Schedule:AddTask. * * @name Schedule:AddTaskEx * @realm server * @wiki https://wiki.garrysmod.com/page/Schedule/AddTaskEx * @param {Schedule} this - no description * @param {string} start - The full name of a function on the entity's table to be ran when the task is started. * @param {string} run - The full name of a function on the entity's table to be ran when the task is continuously running. * @param {number} data - Task data to be passed into the NPC's functions * @returns {void} **/ AddTaskEx(this: Schedule, start: string, run: string, data: number): void /** * * Adds a task to the schedule. See also @Schedule:AddTaskEx if you wish to customize task start and run function names. * See also @EntityHooks:StartSchedule, @NPC:StartEngineTask, and @NPC:RunEngineTask. * * @name Schedule:AddTask * @realm server * @wiki https://wiki.garrysmod.com/page/Schedule/AddTask * @param {Schedule} this - no description * @param {string} taskname - Custom task name * @param {any} taskdata - Task data to be passed into the NPC's functions * @returns {void} **/ AddTask(this: Schedule, taskname: string, taskdata: any): void } declare interface SandboxHooks extends Gamemode { /** * * Called when spawnmenu is trying to be opened. * * @name SandboxHooks:SpawnMenuOpen * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/SpawnMenuOpen * @note Hiding the spawnmenu will not stop people from being able to use the various console commands to spawn in items, etc. See GM:PlayerSpawn* hooks for blocking actual spawning. * @param {_SANDBOX} this - no description * @returns {boolean} - Return false to dissallow opening the spawnmenu **/ SpawnMenuOpen(this: _SANDBOX): boolean /** * * If false is returned then the spawn menu is never created. This saves load times if your mod doesn't actually use the spawn menu for any reason. * * @name SandboxHooks:SpawnMenuEnabled * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/SpawnMenuEnabled * @param {_SANDBOX} this - no description * @returns {boolean} - Whether to create spawnmenu or not. **/ SpawnMenuEnabled(this: _SANDBOX): boolean /** * * Called right before the Lua Loaded tool menus are reloaded. * * @name SandboxHooks:PreReloadToolsMenu * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/PreReloadToolsMenu * @param {_SANDBOX} this - no description * @returns {void} **/ PreReloadToolsMenu(this: _SANDBOX): void /** * * Called right after the Lua Loaded tool menus are reloaded. This is a good place to set up any ControlPanels. * * @name SandboxHooks:PostReloadToolsMenu * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/PostReloadToolsMenu * @param {_SANDBOX} this - no description * @returns {void} **/ PostReloadToolsMenu(this: _SANDBOX): void /** * * Add the STOOLS to the tool menu. You want to call @spawnmenu.AddToolMenuOption in this hook. * * @name SandboxHooks:PopulateToolMenu * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/PopulateToolMenu * @param {_SANDBOX} this - no description * @returns {void} **/ PopulateToolMenu(this: _SANDBOX): void /** * * Called to populate the Scripted Tool menu. * * @name SandboxHooks:PopulateSTOOLMenu * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/PopulateSTOOLMenu * @param {_SANDBOX} this - no description * @returns {void} **/ PopulateSTOOLMenu(this: _SANDBOX): void /** * * This hook makes the engine load the spawnlist text files. * It calls @spawnmenu.PopulateFromEngineTextFiles by default. * * @name SandboxHooks:PopulatePropMenu * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/PopulatePropMenu * @param {_SANDBOX} this - no description * @returns {void} **/ PopulatePropMenu(this: _SANDBOX): void /** * * Called to ask if player allowed to spawn a particular vehicle or not. * * @name SandboxHooks:PlayerSpawnVehicle * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnVehicle * @param {_SANDBOX} this - no description * @param {Player} ply - The player that wants to spawn that vehicle * @param {string} model - The vehicle model that player wants to spawn * @param {string} name - Vehicle name * @param {table} table - Table of that vehicle, containing info about it * @returns {boolean} - Return false to disallow spawning that vehicle **/ PlayerSpawnVehicle(this: _SANDBOX, ply: Player, model: string, name: string, table: table): boolean /** * * Called when a player attempts to spawn a weapon from the Q menu. ( Mouse wheel clicks on an icon ) * * @name SandboxHooks:PlayerSpawnSWEP * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnSWEP * @param {_SANDBOX} this - no description * @param {Player} ply - The player who attempted to spawn a weapon. * @param {string} weapon - Class name of the weapon the player tried to spawn. * @param {IWeapon} swep - Information about the weapon the player is trying to spawn, see @IWeapon structure * @returns {boolean} - Can the SWEP be spawned **/ PlayerSpawnSWEP(this: _SANDBOX, ply: Player, weapon: string, swep: IWeapon): boolean /** * * Called when a player attempts to spawn an Entity from the Q menu. * * @name SandboxHooks:PlayerSpawnSENT * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnSENT * @param {_SANDBOX} this - no description * @param {Player} ply - The player who attempted to spawn the entity. * @param {string} cls - Class name of the entity the player tried to spawn. * @returns {boolean} - can_spawn **/ PlayerSpawnSENT(this: _SANDBOX, ply: Player, cls: string): boolean /** * * Called when a player attempts to spawn a ragdoll from the Q menu. * * @name SandboxHooks:PlayerSpawnRagdoll * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnRagdoll * @param {_SANDBOX} this - no description * @param {Player} ply - The player who attempted to spawn a ragdoll. * @param {string} model - Path to the model of the ragdoll the player is attempting to spawn. * @returns {boolean} - Should the player be able to spawn the ragdoll or not. **/ PlayerSpawnRagdoll(this: _SANDBOX, ply: Player, model: string): boolean /** * * Called when a player attempts to spawn a prop from the Q menu. * * @name SandboxHooks:PlayerSpawnProp * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnProp * @param {_SANDBOX} this - no description * @param {Player} ply - The player who attempted to spawn a prop. * @param {string} model - Path to the model of the prop the player is attempting to spawn. * @returns {boolean} - Should the player be able to spawn the prop or not. **/ PlayerSpawnProp(this: _SANDBOX, ply: Player, model: string): boolean /** * * Called to ask whether player is allowed to spawn a given model. This includes props, effects and ragdolls and is called before the respective PlayerSpawn* hook. * * @name SandboxHooks:PlayerSpawnObject * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnObject * @param {_SANDBOX} this - no description * @param {Player} ply - The player in question * @param {string} model - Model path * @param {number} skin - Skin number * @returns {boolean} - Return false to disallow the player to spawn the given model. **/ PlayerSpawnObject(this: _SANDBOX, ply: Player, model: string, skin: number): boolean /** * * Called to ask if player allowed to spawn a particular NPC or not. * * @name SandboxHooks:PlayerSpawnNPC * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnNPC * @param {_SANDBOX} this - no description * @param {Player} ply - The player that wants to spawn that NPC * @param {string} npc_type - The npc type that player is trying to spawn * @param {string} weapon - The weapon of that NPC * @returns {boolean} - Return false to disallow spawning that NPC **/ PlayerSpawnNPC(this: _SANDBOX, ply: Player, npc_type: string, weapon: string): boolean /** * * Called to ask if player allowed to spawn a particular effect or not. * * @name SandboxHooks:PlayerSpawnEffect * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnEffect * @param {_SANDBOX} this - no description * @param {Player} ply - The player that wants to spawn an effect * @param {string} model - The effect model that player wants to spawn * @returns {boolean} - Return false to disallow spawning that effect **/ PlayerSpawnEffect(this: _SANDBOX, ply: Player, model: string): boolean /** * * Called after the player has spawned a scripted weapon from the spawnmenu with a middle mouse click. * For left mouse click spawns, see @SandboxHooks:PlayerGiveSWEP. * * @name SandboxHooks:PlayerSpawnedSWEP * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedSWEP * @param {_SANDBOX} this - no description * @param {Player} ply - The player that spawned the SWEP * @param {Entity} ent - The SWEP itself * @returns {void} **/ PlayerSpawnedSWEP(this: _SANDBOX, ply: Player, ent: Entity): void /** * * Called after the player spawned a vehicle. * * @name SandboxHooks:PlayerSpawnedVehicle * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedVehicle * @param {_SANDBOX} this - no description * @param {Player} ply - The player that spawned the vehicle * @param {Entity} ent - The vehicle itself * @returns {void} **/ PlayerSpawnedVehicle(this: _SANDBOX, ply: Player, ent: Entity): void /** * * Called after the player has spawned a scripted entity. * * @name SandboxHooks:PlayerSpawnedSENT * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedSENT * @param {_SANDBOX} this - no description * @param {Player} ply - The player that spawned the SENT * @param {Entity} ent - The spawned SENT * @returns {void} **/ PlayerSpawnedSENT(this: _SANDBOX, ply: Player, ent: Entity): void /** * * Called when a player has successfully spawned a prop from the Q menu. * * @name SandboxHooks:PlayerSpawnedProp * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedProp * @param {_SANDBOX} this - no description * @param {Player} ply - The player who spawned a prop. * @param {string} model - Path to the model of the prop the player is attempting to spawn. * @param {Entity} entity - The entity that was spawned. * @returns {void} **/ PlayerSpawnedProp(this: _SANDBOX, ply: Player, model: string, entity: Entity): void /** * * Called after the player spawned a ragdoll. * * @name SandboxHooks:PlayerSpawnedRagdoll * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedRagdoll * @param {_SANDBOX} this - no description * @param {Player} ply - The player that spawned the ragdoll * @param {string} model - The ragdoll model that player wants to spawn * @param {Entity} ent - The spawned ragdoll itself * @returns {void} **/ PlayerSpawnedRagdoll(this: _SANDBOX, ply: Player, model: string, ent: Entity): void /** * * Called after the player spawned an NPC. * * @name SandboxHooks:PlayerSpawnedNPC * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedNPC * @param {_SANDBOX} this - no description * @param {Player} ply - The player that spawned the NPC * @param {Entity} ent - The spawned NPC itself * @returns {void} **/ PlayerSpawnedNPC(this: _SANDBOX, ply: Player, ent: Entity): void /** * * Called after the player spawned an effect. * * @name SandboxHooks:PlayerSpawnedEffect * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerSpawnedEffect * @param {_SANDBOX} this - no description * @param {Player} ply - The player that spawned the effect * @param {string} model - The model of spawned effect * @param {Entity} ent - The spawned effect itself * @returns {void} **/ PlayerSpawnedEffect(this: _SANDBOX, ply: Player, model: string, ent: Entity): void /** * * Called when a player attempts to give themselves a weapon from the Q menu. ( Left mouse clicks on an icon ) * * @name SandboxHooks:PlayerGiveSWEP * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PlayerGiveSWEP * @param {_SANDBOX} this - no description * @param {Player} ply - The player who attempted to give themselves a weapon. * @param {string} weapon - Class name of the weapon the player tried to give themselves. * @param {IWeapon[]} swep - The swep table of this weapon, see @IWeapon structure * @returns {boolean} - Can the SWEP be given to the player **/ PlayerGiveSWEP(this: _SANDBOX, ply: Player, weapon: string, swep: IWeapon[]): boolean /** * * Called when persistent props are saved. * * @name SandboxHooks:PersistenceSave * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PersistenceSave * @param {_SANDBOX} this - no description * @returns {void} **/ PersistenceSave(this: _SANDBOX): void /** * * Called when persistent props are loaded. * * @name SandboxHooks:PersistenceLoad * @realm server * @wiki https://wiki.garrysmod.com/page/SANDBOX/PersistenceLoad * @param {_SANDBOX} this - no description * @returns {void} **/ PersistenceLoad(this: _SANDBOX): void /** * * Called from @GamemodeHooks:HUDPaint to draw world tips. By default, enabling cl_drawworldtooltips will stop world tips from being drawn here. * See @AddWorldTip function for more information. * * @name SandboxHooks:PaintWorldTips * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/PaintWorldTips * @note This cannot be used with @hook.Add * @param {_SANDBOX} this - no description * @returns {void} **/ PaintWorldTips(this: _SANDBOX): void /** * * Called from @GamemodeHooks:HUDPaint; does nothing by default. * * @name SandboxHooks:PaintNotes * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/PaintNotes * @note This cannot be used with @hook.Add * @param {_SANDBOX} this - no description * @returns {void} **/ PaintNotes(this: _SANDBOX): void /** * * Called when the context menu is trying to be opened. Return false to disallow it. * * @name SandboxHooks:ContextMenuOpen * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/ContextMenuOpen * @param {_SANDBOX} this - no description * @returns {boolean} - Allow menu to open. **/ ContextMenuOpen(this: _SANDBOX): boolean /** * * Called when the context menu is created. * * @name SandboxHooks:ContextMenuCreated * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/ContextMenuCreated * @param {_SANDBOX} this - no description * @param {Panel} g_ContextMenu - The created context menu panel * @returns {void} **/ ContextMenuCreated(this: _SANDBOX, g_ContextMenu: Panel): void /** * * Called when player selects an item on the spawnmenu sidebar at the left. * * @name SandboxHooks:ContentSidebarSelection * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/ContentSidebarSelection * @param {_SANDBOX} this - no description * @param {Panel} parent - The panel that holds spawnicons and the sidebar of spawnmenu * @param {Panel} node - The item player selected * @returns {void} **/ ContentSidebarSelection(this: _SANDBOX, parent: Panel, node: Panel): void /** * * Controls if a property can be used or not. * * @name SandboxHooks:CanProperty * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/SANDBOX/CanProperty * @warning This is not guaranteed to be the internal property name used in @properties.Add! * @param {_SANDBOX} this - no description * @param {Player} ply - Player, that tried to use the property * @param {string} property - Class of the property that is tried to use, for example - bonemanipulate * @param {Entity} ent - The entity, on which property is tried to be used on * @returns {boolean} - Return false to disallow using that property **/ CanProperty(this: _SANDBOX, ply: Player, property: string, ent: Entity): boolean /** * * Called when a player attempts to fire their tool gun. Return true to specifically allow the attempt, false to block it. * * @name SandboxHooks:CanTool * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/SANDBOX/CanTool * @param {_SANDBOX} this - no description * @param {Player} ply - The player who attempted to use their toolgun. * @param {TraceResult} tr - A trace from the players eye to where in the world their crosshair/cursor is pointing. See @TraceResult structure * @param {string} tool - The tool mode the player currently has selected. * @returns {boolean} - Can use toolgun or not. **/ CanTool(this: _SANDBOX, ply: Player, tr: TraceResult, tool: string): boolean /** * * Called when a player attempts to drive a prop via Prop Drive * * @name SandboxHooks:CanDrive * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/SANDBOX/CanDrive * @param {_SANDBOX} this - no description * @param {Player} ply - The player who attempted to use Prop Drive. * @param {Entity} ent - The entity the player is attempting to drive * @returns {boolean} - Return true to allow driving, false to disallow **/ CanDrive(this: _SANDBOX, ply: Player, ent: Entity): boolean /** * * This hook is used to add new tool tabs to spawnmenu. * * @name SandboxHooks:AddToolMenuTabs * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/AddToolMenuTabs * @param {_SANDBOX} this - no description * @returns {void} **/ AddToolMenuTabs(this: _SANDBOX): void /** * * This hook is used to add new categories to spawnmenu tool tabs. * * @name SandboxHooks:AddToolMenuCategories * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/AddToolMenuCategories * @param {_SANDBOX} this - no description * @returns {void} **/ AddToolMenuCategories(this: _SANDBOX): void /** * * This hook is used to add default tool tabs to spawnmenu. * Do not override or hook this function, use @SandboxHooks:AddToolMenuTabs! * * @name SandboxHooks:AddGamemodeToolMenuTabs * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/AddGamemodeToolMenuTabs * @internal * @param {_SANDBOX} this - no description * @returns {void} **/ AddGamemodeToolMenuTabs(this: _SANDBOX): void /** * * This hook is used to add default categories to spawnmenu tool tabs. * Do not override or hook this function, use @SandboxHooks:AddToolMenuCategories! * * @name SandboxHooks:AddGamemodeToolMenuCategories * @realm client * @wiki https://wiki.garrysmod.com/page/SANDBOX/AddGamemodeToolMenuCategories * @internal * @param {_SANDBOX} this - no description * @returns {void} **/ AddGamemodeToolMenuCategories(this: _SANDBOX): void } declare interface ProjectedTexture { /** * * Updates the Projected Light and applies all previously set parameters. * * @name ProjectedTexture:Update * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/Update * @param {ProjectedTexture} this - no description * @returns {void} **/ Update(this: ProjectedTexture): void /** * * Sets the vertical angle of projection without affecting the horizontal angle. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetVerticalFOV * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetVerticalFOV * @param {ProjectedTexture} this - no description * @param {number} vFOV - The new vertical Field Of View for the projected texture. Must be in range between 0 and 180. * @returns {void} **/ SetVerticalFOV(this: ProjectedTexture, vFOV: number): void /** * * For animated textures, this will choose which frame in the animation will be projected. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetTextureFrame * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetTextureFrame * @param {ProjectedTexture} this - no description * @param {number} frame - The frame index to use. * @returns {void} **/ SetTextureFrame(this: ProjectedTexture, frame: number): void /** * * Sets the texture to be projected. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetTexture * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetTexture * @param {ProjectedTexture} this - no description * @param {string} texture - The name of the texture. Can also be an @ITexture type. * @returns {void} **/ SetTexture(this: ProjectedTexture, texture: string): void /** * * Sets the quadratic attenuation of the projected texture. * See also @ProjectedTexture:SetLinearAttenuation and @ProjectedTexture:SetConstantAttenuation. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetQuadraticAttenuation * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetQuadraticAttenuation * @param {ProjectedTexture} this - no description * @param {number} quadAtten - no description * @returns {void} **/ SetQuadraticAttenuation(this: ProjectedTexture, quadAtten: number): void /** * * Move the Projected Texture to the specified position. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetPos * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetPos * @param {ProjectedTexture} this - no description * @param {Vector} position - no description * @returns {void} **/ SetPos(this: ProjectedTexture, position: Vector): void /** * * Changes the current projected texture between orthographic and perspective projection. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetOrthographic * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetOrthographic * @param {ProjectedTexture} this - no description * @param {boolean} orthographic - When false, all other arguments are ignored and the texture is reset to perspective projection. * @param {number} left - The amount of units left from the projected texture's origin to project. * @param {number} top - The amount of units upwards from the projected texture's origin to project. * @param {number} right - The amount of units right from the projected texture's origin to project. * @param {number} bottom - The amount of units downwards from the projected texture's origin to project. * @returns {void} **/ SetOrthographic(this: ProjectedTexture, orthographic: boolean, left: number, top: number, right: number, bottom: number): void /** * * Sets the distance at which the projected texture begins its projection. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetNearZ * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetNearZ * @note Setting this to 0 will disable the projected texture completely! This may be useful if you want to disable a projected texture without actually removing it * @note This seems to affect the rendering of shadows - a higher Near Z value will have shadows begin to render closer to their casting object. Comparing a low Near Z value (like 1) with a normal one (12) or high one (1000) is the easiest way to understand this artifact * @param {ProjectedTexture} this - no description * @param {number} nearZ - no description * @returns {void} **/ SetNearZ(this: ProjectedTexture, nearZ: number): void /** * * Sets the linear attenuation of the projected texture. * See also @ProjectedTexture:SetConstantAttenuation and @ProjectedTexture:SetQuadraticAttenuation. * The default value of linear attenuation when the projected texture is created is 100. (others are 0, as you are not supposed to mix them) * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetLinearAttenuation * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetLinearAttenuation * @param {ProjectedTexture} this - no description * @param {number} linearAtten - no description * @returns {void} **/ SetLinearAttenuation(this: ProjectedTexture, linearAtten: number): void /** * * Sets the horizontal angle of projection without affecting the vertical angle. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetHorizontalFOV * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetHorizontalFOV * @param {ProjectedTexture} this - no description * @param {number} hFOV - The new horizontal Field Of View for the projected texture. Must be in range between 0 and 180. * @returns {void} **/ SetHorizontalFOV(this: ProjectedTexture, hFOV: number): void /** * * Sets the angle of projection. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetFOV * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetFOV * @param {ProjectedTexture} this - no description * @param {number} fov - Must be higher than 0 and lower than 180 * @returns {void} **/ SetFOV(this: ProjectedTexture, fov: number): void /** * * Sets the distance at which the projected texture ends. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetFarZ * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetFarZ * @param {ProjectedTexture} this - no description * @param {number} farZ - no description * @returns {void} **/ SetFarZ(this: ProjectedTexture, farZ: number): void /** * * Enable or disable shadows cast from the projected texture. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetEnableShadows * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetEnableShadows * @note as with all types of projected textures (including the player's flashlight and env_projectedtexture), there can only be 8 projected textures with shadows enabled in total. This limit can be increased with the launch parameter: * -numshadowtextures limit * where limit is the new limit. Naturally, many projected lights with shadows enabled will drastically decrease framerate. * @param {ProjectedTexture} this - no description * @param {boolean} newState - no description * @returns {void} **/ SetEnableShadows(this: ProjectedTexture, newState: boolean): void /** * * Sets the constant attenuation of the projected texture. * See also @ProjectedTexture:SetLinearAttenuation and @ProjectedTexture:SetQuadraticAttenuation. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetConstantAttenuation * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetConstantAttenuation * @param {ProjectedTexture} this - no description * @param {number} constAtten - no description * @returns {void} **/ SetConstantAttenuation(this: ProjectedTexture, constAtten: number): void /** * * Sets the color of the projected texture. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetColor * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetColor * @param {ProjectedTexture} this - no description * @param {Color} color - Must be a @IColor structure. * Unlike other projected textures, this color can only go up to 255. * @returns {void} **/ SetColor(this: ProjectedTexture, color: Color): void /** * * Sets the brightness of the projected texture. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetBrightness * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetBrightness * @param {ProjectedTexture} this - no description * @param {number} brightness - The brightness to give the projected texture. * @returns {void} **/ SetBrightness(this: ProjectedTexture, brightness: number): void /** * * Sets the angles (direction) of the projected texture. * You must call @ProjectedTexture:Update after using this function for it to take effect. * * @name ProjectedTexture:SetAngles * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/SetAngles * @param {ProjectedTexture} this - no description * @param {Angle} angle - no description * @returns {void} **/ SetAngles(this: ProjectedTexture, angle: Angle): void /** * * Removes the projected texture. After calling this, @ProjectedTexture:IsValid will return false, and any hooks with the projected texture as the identifier will be automatically deleted. * * @name ProjectedTexture:Remove * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/Remove * @param {ProjectedTexture} this - no description * @returns {void} **/ Remove(this: ProjectedTexture): void /** * * Returns true if the projected texture is valid (i.e. has not been removed), false otherwise. * Instead of calling this directly it's a good idea to call @IsValid function in case the variable is nil. * ```IsValid( ptexture )``` * This not only checks whether the projected texture is valid - but also checks whether it's nil. * * @name ProjectedTexture:IsValid * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/IsValid * @param {ProjectedTexture} this - no description * @returns {boolean} - Whether the projected texture is valid. **/ IsValid(this: ProjectedTexture): boolean /** * * Returns the vertical FOV of the ProjectedTexture, which was previously set by @ProjectedTexture:SetVerticalFOV or @ProjectedTexture:SetFOV * * @name ProjectedTexture:GetVerticalFOV * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetVerticalFOV * @param {ProjectedTexture} this - no description * @returns {number} - The vertical FOV of the ProjectedTexture. **/ GetVerticalFOV(this: ProjectedTexture): number /** * * Returns the texture frame of the ProjectedTexture, which was previously set by @ProjectedTexture:SetTextureFrame * * @name ProjectedTexture:GetTextureFrame * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetTextureFrame * @param {ProjectedTexture} this - no description * @returns {number} - The texture frame. **/ GetTextureFrame(this: ProjectedTexture): number /** * * Returns the texture of the ProjectedTexture, which was previously set by @ProjectedTexture:SetTexture * * @name ProjectedTexture:GetTexture * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetTexture * @param {ProjectedTexture} this - no description * @returns {ITexture} - The texture of the ProjectedTexture. **/ GetTexture(this: ProjectedTexture): ITexture /** * * Returns the quadratic attenuation of the projected texture, which can also be set by @ProjectedTexture:SetQuadraticAttenuation. * * @name ProjectedTexture:GetQuadraticAttenuation * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetQuadraticAttenuation * @param {ProjectedTexture} this - no description * @returns {number} - The quadratic attenuation **/ GetQuadraticAttenuation(this: ProjectedTexture): number /** * * Returns the position of the ProjectedTexture, which was previously set by @ProjectedTexture:SetPos * * @name ProjectedTexture:GetPos * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetPos * @param {ProjectedTexture} this - no description * @returns {Vector} - The position of the ProjectedTexture. **/ GetPos(this: ProjectedTexture): Vector /** * * Returns the current orthographic settings of the Projected Texture. To set these values, use @ProjectedTexture:SetOrthographic. * * @name ProjectedTexture:GetOrthographic * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetOrthographic * @param {ProjectedTexture} this - no description * @returns {boolean} - Whether or not this projected texture is orthographic. When false, nothing else is returned. * @returns {number} - left * @returns {number} - top * @returns {number} - right * @returns {number} - bottom * @tupleReturn **/ GetOrthographic(this: ProjectedTexture): [boolean, number, number, number, number] /** * * Returns the NearZ value of the ProjectedTexture, which was previously set by @ProjectedTexture:SetNearZ * * @name ProjectedTexture:GetNearZ * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetNearZ * @param {ProjectedTexture} this - no description * @returns {number} - NearZ of the ProjectedTexture. **/ GetNearZ(this: ProjectedTexture): number /** * * Returns the linear attenuation of the projected texture, which can also be set by @ProjectedTexture:SetLinearAttenuation. * * @name ProjectedTexture:GetLinearAttenuation * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetLinearAttenuation * @param {ProjectedTexture} this - no description * @returns {number} - The linear attenuation. **/ GetLinearAttenuation(this: ProjectedTexture): number /** * * Returns the horizontal FOV of the ProjectedTexture, which was previously set by @ProjectedTexture:SetHorizontalFOV or @ProjectedTexture:SetFOV * * @name ProjectedTexture:GetHorizontalFOV * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetHorizontalFOV * @param {ProjectedTexture} this - no description * @returns {number} - The horizontal FOV of the ProjectedTexture. **/ GetHorizontalFOV(this: ProjectedTexture): number /** * * Returns the projection distance of the ProjectedTexture, which was previously set by @ProjectedTexture:SetFarZ * * @name ProjectedTexture:GetFarZ * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetFarZ * @param {ProjectedTexture} this - no description * @returns {number} - The projection distance of the ProjectedTexture. **/ GetFarZ(this: ProjectedTexture): number /** * * Returns whether shadows are enabled for this ProjectedTexture, which was previously set by @ProjectedTexture:SetEnableShadows * * @name ProjectedTexture:GetEnableShadows * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetEnableShadows * @param {ProjectedTexture} this - no description * @returns {boolean} - Whether shadows are enabled. **/ GetEnableShadows(this: ProjectedTexture): boolean /** * * Returns the constant attenuation of the projected texture, which can also be set by @ProjectedTexture:SetConstantAttenuation. * * @name ProjectedTexture:GetConstantAttenuation * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetConstantAttenuation * @param {ProjectedTexture} this - no description * @returns {number} - The constant attenuation **/ GetConstantAttenuation(this: ProjectedTexture): number /** * * Returns the color of the ProjectedTexture, which was previously set by @ProjectedTexture:SetColor. * * @name ProjectedTexture:GetColor * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetColor * @bug #2407 The returned color will not have the color metatable. * @param {ProjectedTexture} this - no description * @returns {IColor} - @IColor structure, the color of the ProjectedTexture. **/ GetColor(this: ProjectedTexture): IColor /** * * Returns the brightness of the ProjectedTexture, which was previously set by @ProjectedTexture:SetBrightness * * @name ProjectedTexture:GetBrightness * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetBrightness * @param {ProjectedTexture} this - no description * @returns {number} - The brightness of the ProjectedTexture. **/ GetBrightness(this: ProjectedTexture): number /** * * Returns the angle of the ProjectedTexture, which were previously set by @ProjectedTexture:SetAngles * * @name ProjectedTexture:GetAngles * @realm client * @wiki https://wiki.garrysmod.com/page/ProjectedTexture/GetAngles * @param {ProjectedTexture} this - no description * @returns {Angle} - The angles of the ProjectedTexture. **/ GetAngles(this: ProjectedTexture): Angle } declare interface Player { /** * * Returns the players voice volume, how loud the player's voice communication currently is, as a normal number. Doesn't work on local player unless the voice_loopback convar is set to 1. * * @name Player:VoiceVolume * @realm client * @wiki https://wiki.garrysmod.com/page/Player/VoiceVolume * @param {Player} this - no description * @returns {number} - The voice volume. **/ VoiceVolume(this: Player): number /** * * Resets the player's view punch ( @Player:ViewPunch ) effect back to normal. * * @name Player:ViewPunchReset * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/ViewPunchReset * @param {Player} this - no description * @param {number} tolerance - Reset all ViewPunch below this threshold. * @returns {void} **/ ViewPunchReset(this: Player, tolerance?: number): void /** * * Simulates a push on the client's screen. * * @name Player:ViewPunch * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/ViewPunch * @param {Player} this - no description * @param {Angle} PunchAngle - The angle in which to push the player's screen. * @returns {void} **/ ViewPunch(this: Player, PunchAngle: Angle): void /** * * Returns the player's ID. * You can use @Player function() to get the player by their ID. * * @name Player:UserID * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/UserID * @param {Player} this - no description * @returns {number} - The player's user ID **/ UserID(this: Player): number /** * * Stops the player from spectating another entity. * * @name Player:UnSpectate * @realm server * @wiki https://wiki.garrysmod.com/page/Player/UnSpectate * @param {Player} this - no description * @returns {void} **/ UnSpectate(this: Player): void /** * * Unlocks the player movement if locked previously. * Will disable godmode for the player if locked previously. * * @name Player:UnLock * @realm server * @wiki https://wiki.garrysmod.com/page/Player/UnLock * @param {Player} this - no description * @returns {void} **/ UnLock(this: Player): void /** * * Returns a table that will stay allocated for the specific player between connects until the server shuts down. Note, that this table is not synchronized between client and server. * * @name Player:UniqueIDTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/UniqueIDTable * @param {Player} this - no description * @param {any} key - Unique table key. * @returns {table} - The table that contains any info you have put in it. **/ UniqueIDTable(this: Player, key: any): table /** * * Returns a 32 bit integer that remains constant for a player across joins/leaves and across different servers. This can be used when a string is inappropriate - e.g. in a database primary key. * * @name Player:UniqueID * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/UniqueID * @note In Singleplayer, this function will always return 1. * @warning **This function has collisions,** where more than one player has the same UniqueID. It is **highly** recommended to use @Player:AccountID, @Player:SteamID or @Player:SteamID64 instead, which are guaranteed to be unique to each player. * @param {Player} this - no description * @returns {number} - The player's Unique ID **/ UniqueID(this: Player): number /** * * Unfreezes all objects the player has frozen with their Physics Gun. Same as double pressing R while holding Physics Gun. * * @name Player:UnfreezePhysicsObjects * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/UnfreezePhysicsObjects * @param {Player} this - no description * @returns {void} **/ UnfreezePhysicsObjects(this: Player): void /** * * Translates @ACT enum according to the holdtype of players currently held weapon. * * @name Player:TranslateWeaponActivity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/TranslateWeaponActivity * @param {Player} this - no description * @param {ACT} act - The initial @ACT enum * @returns {ACT} - Translated @ACT enum **/ TranslateWeaponActivity(this: Player, act: ACT): ACT /** * * Performs a trace hull and applies damage to the entities hit, returns the first entity hit. * * @name Player:TraceHullAttack * @realm server * @wiki https://wiki.garrysmod.com/page/Player/TraceHullAttack * @warning Hitting the victim entity with this function in @EntityHooks:OnTakeDamage can cause infinite loops. * @param {Player} this - no description * @param {Vector} startPos - The start position of the hull trace. * @param {Vector} endPos - The end position of the hull trace. * @param {Vector} mins - The minimum coordinates of the hull. * @param {Vector} maxs - The maximum coordinates of the hull. * @param {number} damage - The damage to be applied. * @param {Vector} damageFlags - Bitflag specifying the damage type, see @DMG enum. * @param {number} damageForce - The force to be applied to the hit object. * @param {boolean} damageAllNPCs - Whether to apply damage to all hit NPCs or not. * @returns {Entity} - The hit entity **/ TraceHullAttack(this: Player, startPos: Vector, endPos: Vector, mins: Vector, maxs: Vector, damage: number, damageFlags: Vector, damageForce: number, damageAllNPCs: boolean): Entity /** * * Returns the time in seconds since the player connected. * * @name Player:TimeConnected * @realm server * @wiki https://wiki.garrysmod.com/page/Player/TimeConnected * @param {Player} this - no description * @returns {number} - connectTime **/ TimeConnected(this: Player): number /** * * Returns the player's team ID. * Returns 0 clientside when the game is not fully loaded. * * @name Player:Team * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Team * @param {Player} this - no description * @returns {TEAM} - The player's team's index number, as in the @TEAM enum or a custom team defined in @team.SetUp. **/ Team(this: Player): TEAM /** * * Attempts to switch the player weapon to the one specified in the "cl_defaultweapon" convar, if the player does not own the specified weapon nothing will happen. * If you want to switch to a specific weapon, use: @Player:SetActiveWeapon * * @name Player:SwitchToDefaultWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SwitchToDefaultWeapon * @param {Player} this - no description * @returns {void} **/ SwitchToDefaultWeapon(this: Player): void /** * * Prevents a hint from showing up. * * @name Player:SuppressHint * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SuppressHint * @note This function is only available in Sandbox and its derivatives * @param {Player} this - no description * @param {string} name - Hint name/class/index to prevent from showing up * @returns {void} **/ SuppressHint(this: Player, name: string): void /** * * Removes all weapons from a certain player * * @name Player:StripWeapons * @realm server * @wiki https://wiki.garrysmod.com/page/Player/StripWeapons * @param {Player} this - no description * @returns {void} **/ StripWeapons(this: Player): void /** * * Removes the specified weapon class from a certain player * * @name Player:StripWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/Player/StripWeapon * @param {Player} this - no description * @param {string} weapon - The weapon class to remove * @returns {void} **/ StripWeapon(this: Player, weapon: string): void /** * * Removes all ammo from the player. * * @name Player:StripAmmo * @realm server * @wiki https://wiki.garrysmod.com/page/Player/StripAmmo * @param {Player} this - no description * @returns {void} **/ StripAmmo(this: Player): void /** * * Turns off the zoom mode of the player. (+zoom console command) * Basically equivalent of entering "-zoom" into player's console. * * @name Player:StopZooming * @realm server * @wiki https://wiki.garrysmod.com/page/Player/StopZooming * @param {Player} this - no description * @returns {void} **/ StopZooming(this: Player): void /** * * When used in a @GamemodeHooks:SetupMove hook, this function behaves unexpectedly by preventing the player from sprinting similar to @Player:StopSprinting. * * @name Player:StopWalking * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/StopWalking * @param {Player} this - no description * @returns {void} **/ StopWalking(this: Player): void /** * * When used in a @GamemodeHooks:SetupMove hook, this function will prevent the player from sprinting. * When +walk is engaged, the player will still be able to sprint to half speed (normal run speed) as opposed to full sprint speed without this function. * * @name Player:StopSprinting * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/StopSprinting * @param {Player} this - no description * @returns {void} **/ StopSprinting(this: Player): void /** * * Returns the player's 64bit SteamID aka CommunityID. * In singleplayer, this will return no value serverside. * In a multirun environment, this will return no value serverside for all "copies" of a player. * For bots, this will return 90071996842377216 (equivalent to STEAM_0:0:0) for the first bot to join. * For each additional bot, the number increases by 1. So the next bot will be 90071996842377217 (STEAM_0:1:0) then 90071996842377218 (STEAM_0:0:1) and so on. * On the client it returns no value for bots. * Use @Player:AccountID for a shorter version of the SteamID. * * @name Player:SteamID64 * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SteamID64 * @param {Player} this - no description * @returns {string} - Player's 64bit SteamID aka CommunityID. **/ SteamID64(this: Player): string /** * * Returns the player's SteamID. In singleplayer, this will be STEAM_ID_PENDING serverside. * For Bots this will return "BOT" on the server and on the client it returns "NULL". * Use @Player:AccountID for a shorter version of the SteamID. * * @name Player:SteamID * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SteamID * @param {Player} this - no description * @returns {string} - SteamID **/ SteamID(this: Player): string /** * * When used in a @GamemodeHooks:SetupMove hook, this function will force the player to walk, as well as preventing the player from sprinting. * * @name Player:StartWalking * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/StartWalking * @param {Player} this - no description * @returns {void} **/ StartWalking(this: Player): void /** * * Doesn't appear to do anything. * * @name Player:StartSprinting * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/StartSprinting * @param {Player} this - no description * @returns {void} **/ StartSprinting(this: Player): void /** * * Enables the sprint on the player. * * @name Player:SprintEnable * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SprintEnable * @bug #2390 Not working - use @Player:SetRunSpeed or @CMoveData:SetMaxSpeed in a @GamemodeHooks:Move hook, instead. * @param {Player} this - no description * @returns {void} **/ SprintEnable(this: Player): void /** * * Disables the sprint on the player. * * @name Player:SprintDisable * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SprintDisable * @bug #2390 Not working - use @Player:SetRunSpeed or @CMoveData:SetMaxSpeed in a @GamemodeHooks:Move hook, instead. * @param {Player} this - no description * @returns {void} **/ SprintDisable(this: Player): void /** * * Makes a player spray their decal. * * @name Player:SprayDecal * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SprayDecal * @param {Player} this - no description * @param {Vector} sprayOrigin - The location to spray from * @param {Vector} sprayEndPos - The location to spray to * @returns {void} **/ SprayDecal(this: Player, sprayOrigin: Vector, sprayEndPos: Vector): void /** * * Makes the player spectate the entity * To get the applied spectated entity, use @Player:GetObserverTarget(). * * @name Player:SpectateEntity * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SpectateEntity * @bug #3267 The player's position will not update while spectating, causing area portals and other map optimisations to not work properly. You can fix this by setting the player's position to the spectated entity's each tick. * @param {Player} this - no description * @param {Entity} entity - Entity to spectate. * @returns {void} **/ SpectateEntity(this: Player, entity: Entity): void /** * * Starts spectate mode for given player. This will also affect the players movetype in some cases. * * @name Player:Spectate * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Spectate * @param {Player} this - no description * @param {OBS_MODE} mode - Spectate mode, see @OBS_MODE enum. * @returns {void} **/ Spectate(this: Player, mode: OBS_MODE): void /** * * Signals the entity that it was dropped by the gravity gun. * * @name Player:SimulateGravGunDrop * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SimulateGravGunDrop * @param {Player} this - no description * @param {Entity} ent - Entity that was dropped. * @returns {void} **/ SimulateGravGunDrop(this: Player, ent: Entity): void /** * * Signals the entity that it was picked up by the gravity gun. This call is only required if you want to simulate the situation of picking up objects. * * @name Player:SimulateGravGunPickup * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SimulateGravGunPickup * @param {Player} this - no description * @param {Entity} ent - The entity picked up * @returns {void} **/ SimulateGravGunPickup(this: Player, ent: Entity): void /** * * Opens the player steam profile page in the steam overlay browser. * * @name Player:ShowProfile * @realm client * @wiki https://wiki.garrysmod.com/page/Player/ShowProfile * @param {Player} this - no description * @returns {void} **/ ShowProfile(this: Player): void /** * * Sets whether the player's current weapon should drop on death. * * @name Player:ShouldDropWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/Player/ShouldDropWeapon * @note This is reset on spawn to the [player class](https://wiki.garrysmod.com/page/Player_Classes)'s **DropWeaponOnDie** field by @player_manager.OnPlayerSpawn. * @param {Player} this - no description * @param {boolean} drop - Whether to drop the player's current weapon or not * @returns {void} **/ ShouldDropWeapon(this: Player, drop: boolean): void /** * * Polls the engine to request if the player should be drawn at the time the function is called. * * @name Player:ShouldDrawLocalPlayer * @realm client * @wiki https://wiki.garrysmod.com/page/Player/ShouldDrawLocalPlayer * @param {Player} this - no description * @returns {boolean} - shouldDraw **/ ShouldDrawLocalPlayer(this: Player): boolean /** * * Sets the player weapon's color. The part of the model that is colored is determined by the model itself, and is different for each model. * * @name Player:SetWeaponColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetWeaponColor * @param {Player} this - no description * @param {Vector} Color - This is the color to be set. The format is Vector(r,g,b), and each color should be between 0 and 1. * @returns {void} **/ SetWeaponColor(this: Player, Color: Vector): void /** * * Sets client's view punch. See @Player:ViewPunch * * @name Player:SetViewPunchAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetViewPunchAngles * @param {Player} this - no description * @param {Angle} punchAngle - The angle to set. * @returns {void} **/ SetViewPunchAngles(this: Player, punchAngle: Angle): void /** * * Sets the player's normal walking speed. Not sprinting, not slow walking @+walk key. * There currently is no way to modify the slow walking @+walk key speed. * See also @Player:GetWalkSpeed, @Player:SetCrouchedWalkSpeed, @Player:SetMaxSpeed and @Player:SetRunSpeed. * * @name Player:SetWalkSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetWalkSpeed * @bug #2030 Using a speed of 0 can lead to prediction errors. * @param {Player} this - no description * @param {number} walkSpeed - The new walk speed when sv_friction is below 10. Higher sv_friction values will result in slower speed. * Has to be 7 or above or the player won't be able to move. * @returns {void} **/ SetWalkSpeed(this: Player, walkSpeed: number): void /** * * Sets the **desired** view offset which equals the difference between the players actual position and their view when standing. * If you want to set **actual** view offset, use @Player:SetCurrentViewOffset * See also @Player:SetViewOffsetDucked for **desired** view offset when crouching. * * @name Player:SetViewOffset * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetViewOffset * @param {Player} this - no description * @param {Vector} viewOffset - The new desired view offset when standing. * @returns {void} **/ SetViewOffset(this: Player, viewOffset: Vector): void /** * * Sets the **desired** view offset which equals the difference between the players actual position and their view when crouching. * If you want to set **actual** view offset, use @Player:SetCurrentViewOffset * See also @Player:SetViewOffset for **desired** view offset when standing. * * @name Player:SetViewOffsetDucked * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetViewOffsetDucked * @param {Player} this - no description * @param {Vector} viewOffset - The new desired view offset when crouching. * @returns {void} **/ SetViewOffsetDucked(this: Player, viewOffset: Vector): void /** * * Sets the usergroup of the player. * * @name Player:SetUserGroup * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetUserGroup * @param {Player} this - no description * @param {string} groupName - The user group of the player. * @returns {void} **/ SetUserGroup(this: Player, groupName: string): void /** * * Attaches the players view to the position and angles of the specified entity. * * @name Player:SetViewEntity * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetViewEntity * @param {Player} this - no description * @param {Entity} viewEntity - The entity to attach the player view to. * @returns {void} **/ SetViewEntity(this: Player, viewEntity: Entity): void /** * * Sets up the players view model hands. Calls @GamemodeHooks:PlayerSetHandsModel to set the model of the hands. * * @name Player:SetupHands * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetupHands * @param {Player} this - no description * @param {Entity} ent - If the player is spectating an entity, this should be the entity the player is spectating, so we can use its hands model instead. * @returns {void} **/ SetupHands(this: Player, ent: Entity): void /** * * Sets how quickly a player un-ducks * * @name Player:SetUnDuckSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetUnDuckSpeed * @param {Player} this - no description * @param {number} UnDuckSpeed - How quickly the player will un-duck * @returns {void} **/ SetUnDuckSpeed(this: Player, UnDuckSpeed: number): void /** * * Sets whenever to suppress the pickup notification for the player. * * @name Player:SetSuppressPickupNotices * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetSuppressPickupNotices * @param {Player} this - no description * @param {boolean} doSuppress - Whenever to suppress the notice or not. * @returns {void} **/ SetSuppressPickupNotices(this: Player, doSuppress: boolean): void /** * * Sets the player to the chosen team. * * @name Player:SetTeam * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetTeam * @param {Player} this - no description * @param {number} Team - The team that the player is being set to. * @returns {void} **/ SetTeam(this: Player, Team: number): void /** * * Sets the player's HEV suit power. * * @name Player:SetSuitPower * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetSuitPower * @bug #3449 This will only work for the local player when used clientside. * @param {Player} this - no description * @param {number} power - The new suit power. * @returns {void} **/ SetSuitPower(this: Player, power: number): void /** * * Sets the maximum height a player can step onto without jumping. * * @name Player:SetStepSize * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetStepSize * @param {Player} this - no description * @param {number} stepHeight - The new maximum height the player can step onto without jumping * @returns {void} **/ SetStepSize(this: Player, stepHeight: number): void /** * * Sets the player's sprint speed. * See also @Player:GetRunSpeed, @Player:SetWalkSpeed and @Player:SetMaxSpeed. * * @name Player:SetRunSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetRunSpeed * @param {Player} this - no description * @param {number} runSpeed - The new sprint speed when sv_friction is below 10. Higher sv_friction values will result in slower speed. * Has to be 7 or above or the player won't be able to move. * @returns {void} **/ SetRunSpeed(this: Player, runSpeed: number): void /** * * Sets the render angles of a player. * * @name Player:SetRenderAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetRenderAngles * @param {Player} this - no description * @param {Angle} ang - The new render angles to set * @returns {void} **/ SetRenderAngles(this: Player, ang: Angle): void /** * * Sets the widget that is currently in use by the player's mouse. * Having a pressed widget stops the player from firing his weapon to allow input to be passed onto the widget. * * @name Player:SetPressedWidget * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetPressedWidget * @param {Player} this - no description * @param {Entity} pressedWidget - The widget the player is currently using. * @returns {void} **/ SetPressedWidget(this: Player, pressedWidget?: Entity): void /** * * Sets the player model's color. The part of the model that is colored is determined by the model itself, and is different for each model. * * @name Player:SetPlayerColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetPlayerColor * @param {Player} this - no description * @param {Vector} Color - This is the color to be set. The format is Vector(r,g,b), and each color should be between 0 and 1. * @returns {void} **/ SetPlayerColor(this: Player, Color: Vector): void /** * * Writes a **P**layer **Data** key-value pair to the SQL database. (sv.db when called on server, cl.db when called on client) * Internally uses the @sql library. * * @name Player:SetPData * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetPData * @note PData is not networked from servers to clients! * @warning This function internally uses @Player:UniqueID, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information. * @param {Player} this - no description * @param {string} key - Name of the PData key * @param {any} value - Value to write to the key (**must** be an SQL valid data type, such as a string or integer) * @returns {boolean} - Whether the operation was successful or not **/ SetPData(this: Player, key: string, value: any): boolean /** * * Sets the players visibility towards NPCs. * Internally this toggles the [FL_NOTARGET](https://wiki.garrysmod.com/page/Enums/FL) flag, which you can manually test for using @EntityFuncs:IsFlagSet * * @name Player:SetNoTarget * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetNoTarget * @param {Player} this - no description * @param {boolean} visibility - The visibility. * @returns {void} **/ SetNoTarget(this: Player, visibility: boolean): void /** * * Sets the players observer mode. You must start the spectating first with @Player:Spectate. * * @name Player:SetObserverMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetObserverMode * @param {Player} this - no description * @param {OBS_MODE} mode - Spectator mode using @OBS_MODE enum. * @returns {void} **/ SetObserverMode(this: Player, mode: OBS_MODE): void /** * * Sets if the player should be muted locally. * * @name Player:SetMuted * @realm client * @wiki https://wiki.garrysmod.com/page/Player/SetMuted * @param {Player} this - no description * @param {boolean} mute - Mute or unmute. * @returns {void} **/ SetMuted(this: Player, mute: boolean): void /** * * Sets whenever the player should not collide with their teammates. * * @name Player:SetNoCollideWithTeammates * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetNoCollideWithTeammates * @bug #2757 This only works with @Player:Team IDs 1-4. This also has major collision issues. * @param {Player} this - no description * @param {boolean} shouldNotCollide - True to disable, false to enable collision. * @returns {void} **/ SetNoCollideWithTeammates(this: Player, shouldNotCollide: boolean): void /** * * Sets the maximum speed which the player can move at. * * @name Player:SetMaxSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetMaxSpeed * @note This is called automatically by the engine. If you wish to limit player speed without setting their run/sprint speeds, see @CMoveData:SetMaxClientSpeed. * @param {Player} this - no description * @param {number} walkSpeed - The maximum speed. * @returns {void} **/ SetMaxSpeed(this: Player, walkSpeed: number): void /** * * Sets the mins and maxs of the AABB of the players collision when ducked. * * @name Player:SetHullDuck * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetHullDuck * @param {Player} this - no description * @param {Vector} hullMins - The min coordinates of the hull. * @param {Vector} hullMaxs - The max coordinates of the hull. * @returns {void} **/ SetHullDuck(this: Player, hullMins: Vector, hullMaxs: Vector): void /** * * Slows down the player movement simulation by the timescale, this is used internally in the HL2 weapon stripping sequence. * It achieves such behavior by multiplying the @FrameTime function by the specified timescale at the start of the movement simulation and then restoring it afterwards. * * @name Player:SetLaggedMovementValue * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetLaggedMovementValue * @note This is reset to 1 on spawn * @note There is no weapon counterpart to this, you'll have to hardcode the multiplier in the weapon or call @WeaponFuncs:SetNextPrimaryFire / @WeaponFuncs:SetNextSecondaryFire manually from a [Predicted Hook](https://wiki.garrysmod.com/page/Category:Predicted_Hooks) * @param {Player} this - no description * @param {number} timescale - The timescale multiplier. * @returns {void} **/ SetLaggedMovementValue(this: Player, timescale: number): void /** * * Sets the mins and maxs of the AABB of the players collision. * * @name Player:SetHull * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetHull * @bug #3365 Setting both the mins and maxs to @Vector function(0,0,0) will crash the game. * @param {Player} this - no description * @param {Vector} hullMins - The min coordinates of the hull. * @param {Vector} hullMaxs - The max coordinates of the hull. * @returns {void} **/ SetHull(this: Player, hullMins: Vector, hullMaxs: Vector): void /** * * Sets the jump power, eg. the velocity the player will applied to when he jumps. * * @name Player:SetJumpPower * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetJumpPower * @param {Player} this - no description * @param {number} jumpPower - The new jump velocity. * @returns {void} **/ SetJumpPower(this: Player, jumpPower: number): void /** * * Sets the hands entity of a player. * The hands entity is an entity introduced in Garry's Mod 13 and it's used to show the player's hands attached to the viewmodel. * This is similar to the approach used in L4D and CS:GO, for more information on how to implement this system in your gamemode visit [Using Viewmodel Hands](https://wiki.garrysmod.com/page/Using%20Viewmodel%20Hands). * * @name Player:SetHands * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetHands * @param {Player} this - no description * @param {Entity} hands - The hands entity to set * @returns {void} **/ SetHands(this: Player, hands: Entity): void /** * * Sets the widget that is currently hovered by the player's mouse. * * @name Player:SetHoveredWidget * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetHoveredWidget * @param {Player} this - no description * @param {Entity} widget - The widget entity that the player is hovering. * @returns {void} **/ SetHoveredWidget(this: Player, widget?: Entity): void /** * * Sets a player's frags (kills) * * @name Player:SetFrags * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetFrags * @param {Player} this - no description * @param {number} fragcount - Number of frags (positive or negative) * @returns {void} **/ SetFrags(this: Player, fragcount: number): void /** * * Set a player's FOV (Field Of View) over a certain amount of time. * * @name Player:SetFOV * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetFOV * @param {Player} this - no description * @param {number} fov - the angle of perception (FOV). Set to 0 to return to default user FOV. ( Which is ranging from 75 to 90, depending on user settings ) * @param {number} time - the time it takes to transition to the FOV expressed in a floating point. * @returns {void} **/ SetFOV(this: Player, fov: number, time?: number): void /** * * Sets the angle of the player's view (may rotate body too if angular difference is large) * * @name Player:SetEyeAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetEyeAngles * @param {Player} this - no description * @param {Angle} angle - Angle to set the view to * @returns {void} **/ SetEyeAngles(this: Player, angle: Angle): void /** * * Sets how quickly a player ducks. * * @name Player:SetDuckSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetDuckSpeed * @bug #2722 This will not work for values >= 1. * @param {Player} this - no description * @param {number} duckSpeed - How quickly the player will duck. * @returns {void} **/ SetDuckSpeed(this: Player, duckSpeed: number): void /** * * Applies the specified sound filter to the player. * * @name Player:SetDSP * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetDSP * @param {Player} this - no description * @param {number} soundFilter - The index of the sound filter to apply. * Pick from the [list of DSP's](https://developer.valvesoftware.com/wiki/Dsp_presets). * @param {boolean} fastReset - If set to true the sound filter will be removed faster. * @returns {void} **/ SetDSP(this: Player, soundFilter: number, fastReset: boolean): void /** * * Sets the driving entity and driving mode. * Use @drive.PlayerStartDriving instead, see [Entity Driving](https://wiki.garrysmod.com/page/Entity%20Driving). * * @name Player:SetDrivingEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetDrivingEntity * @internal * @param {Player} this - no description * @param {Entity} drivingEntity - The entity the player should drive. * @param {number} drivingMode - The driving mode index. * @returns {void} **/ SetDrivingEntity(this: Player, drivingEntity?: Entity, drivingMode: number): void /** * * Sets a player's death count * * @name Player:SetDeaths * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetDeaths * @param {Player} this - no description * @param {number} deathcount - Number of deaths (positive or negative) * @returns {void} **/ SetDeaths(this: Player, deathcount: number): void /** * * Sets the **actual** view offset which equals the difference between the players actual position and their view when standing. * Do not confuse with @Player:SetViewOffset and @Player:SetViewOffsetDucked * * @name Player:SetCurrentViewOffset * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetCurrentViewOffset * @param {Player} this - no description * @param {Vector} viewOffset - The new view offset. * @returns {void} **/ SetCurrentViewOffset(this: Player, viewOffset: Vector): void /** * * Sets the crouched walk speed multiplier. * Doesn't work for values above 1. * See also @Player:SetWalkSpeed and @Player:GetCrouchedWalkSpeed. * * @name Player:SetCrouchedWalkSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetCrouchedWalkSpeed * @param {Player} this - no description * @param {number} speed - The walk speed multiplier that crouch speed should be. * @returns {void} **/ SetCrouchedWalkSpeed(this: Player, speed: number): void /** * * Sets the player's class id. * * @name Player:SetClassID * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetClassID * @param {Player} this - no description * @param {number} classID - The class id the player is being set with. * @returns {void} **/ SetClassID(this: Player, classID: number): void /** * * Sets whether the player can use the HL2 suit zoom ("+zoom" bind) or not. * * @name Player:SetCanZoom * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetCanZoom * @param {Player} this - no description * @param {boolean} canZoom - Whether to make the player able or unable to zoom. * @returns {void} **/ SetCanZoom(this: Player, canZoom: boolean): void /** * * Set if the player should be allowed to walk using the (default) alt key. * * @name Player:SetCanWalk * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetCanWalk * @param {Player} this - no description * @param {boolean} abletowalk - True allows the player to walk. * @returns {void} **/ SetCanWalk(this: Player, abletowalk: boolean): void /** * * Sets the player armor to the argument. * * @name Player:SetArmor * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetArmor * @param {Player} this - no description * @param {number} Amount - The amount that the player armor is going to be set to. * @returns {void} **/ SetArmor(this: Player, Amount: number): void /** * * Pushes the player away from another player whenever it's inside the other players bounding box. * * @name Player:SetAvoidPlayers * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetAvoidPlayers * @param {Player} this - no description * @param {boolean} avoidPlayers - Avoid or not avoid. * @returns {void} **/ SetAvoidPlayers(this: Player, avoidPlayers: boolean): void /** * * Sets the amount of the specified ammo for the player. * * @name Player:SetAmmo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetAmmo * @param {Player} this - no description * @param {number} ammoCount - The amount of ammunition to set. * @param {number | string} ammoType - The ammunition type. Can be either @number type ammo ID or @string type ammo name. * @returns {void} **/ SetAmmo(this: Player, ammoCount: number, ammoType: number | string): void /** * * Allows player to use his weapons in a vehicle. You need to call this before entering a vehicle. * * @name Player:SetAllowWeaponsInVehicle * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetAllowWeaponsInVehicle * @bug #1277 Shooting in a vehicle fires two bullets. * @bug #3261 Weapon viewpunch does not decay while in a vehicle, leading to incorrect aim angles. * @param {Player} this - no description * @param {boolean} allow - Show we allow player to use his weapons in a vehicle or not. * @returns {void} **/ SetAllowWeaponsInVehicle(this: Player, allow: boolean): void /** * * Set if the players' model is allowed to rotate around the pitch and roll axis. * * @name Player:SetAllowFullRotation * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/SetAllowFullRotation * @param {Player} this - no description * @param {boolean} Allowed - Allowed to rotate * @returns {void} **/ SetAllowFullRotation(this: Player, Allowed: boolean): void /** * * Sets the player's active weapon. You should use @CUserCmd:SelectWeapon or @Player:SelectWeapon, instead in most cases. * * @name Player:SetActiveWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SetActiveWeapon * @note This function will not trigger the weapon switch event or associated equip animations. You can achieve this using @Player:SelectWeapon with @EntityFuncs:GetClass. * @note This will not call @GamemodeHooks:PlayerSwitchWeapon. * @param {Player} this - no description * @param {Weapon} weapon - The weapon to equip. * @returns {void} **/ SetActiveWeapon(this: Player, weapon: Weapon): void /** * * Executes a simple Lua string on the player. * * @name Player:SendLua * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SendLua * @note The string is limited to 254 bytes. Instead of sending Lua code with this function, consider using the @net library for more advanced server-client interaction, see example 2 for SendLua replacement * @param {Player} this - no description * @param {string} script - The script to execute. * @returns {void} **/ SendLua(this: Player, script: string): void /** * * Sends a hint to a player. * * @name Player:SendHint * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SendHint * @note This function is only available in Sandbox and its derivatives. Since this adds *#Hint_* to the beginning of each message, you should only use it with default hint messages, or those cached with @language.Add. For hints with custom text, look at @notification.AddLegacy * @param {Player} this - no description * @param {string} name - Name/class/index of the hint. The text of the hint will contain this value. ( "#Hint_" .. name ) An example is *PhysgunFreeze*. * @param {number} delay - Delay in seconds before showing the hint * @returns {void} **/ SendHint(this: Player, name: string, delay: number): void /** * * Sets the active weapon of the player by its class name. * * @name Player:SelectWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/Player/SelectWeapon * @note This will trigger the weapon switch event and associated animations. To switch weapons silently, use @Player:SetActiveWeapon. * @warning This will switch the weapon out of prediction, causing delay on the client and @WeaponHooks:Deploy to be called out of prediction. Try using @CUserCmd:SelectWeapon or @input.SelectWeapon, instead. * @param {Player} this - no description * @param {string} className - The class name of the weapon to switch to. * If the player doesn't have the specified weapon, nothing will happen. You can use @Player:Give to give the weapon first. * @returns {void} **/ SelectWeapon(this: Player, className: string): void /** * * Fades the screen * * @name Player:ScreenFade * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/ScreenFade * @param {Player} this - no description * @param {SCREENFADE} flags - Fade flags defined with @SCREENFADE enum. * @param {number} clr - The color of the screenfade * @param {number} fadeTime - Fade(in/out) effect transition time ( From no fade to full fade and vice versa ) * @param {number} fadeHold - Fade effect hold time * @returns {void} **/ ScreenFade(this: Player, flags: SCREENFADE, clr?: number, fadeTime: number, fadeHold: number): void /** * * Forces the player to say whatever the first argument is. Works on bots too. * * @name Player:Say * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Say * @note This function ignores the default chat message cooldown * @param {Player} this - no description * @param {string} text - The text to force the player to say. * @param {boolean} teamOnly - Whether to send this message to our own team only. * @returns {void} **/ Say(this: Player, text: string, teamOnly?: boolean): void /** * * Resets both normal and duck hulls to their default values. * * @name Player:ResetHull * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/ResetHull * @param {Player} this - no description * @returns {void} **/ ResetHull(this: Player): void /** * * Strips the player's suit item. * * @name Player:RemoveSuit * @realm server * @wiki https://wiki.garrysmod.com/page/Player/RemoveSuit * @param {Player} this - no description * @returns {void} **/ RemoveSuit(this: Player): void /** * * Removes a **P**layer **Data** key-value pair from the SQL database. (sv.db when called on server, cl.db when called on client) * Internally uses the @sql library. * * @name Player:RemovePData * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/RemovePData * @warning This function internally uses @Player:UniqueID, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information. * @param {Player} this - no description * @param {string} key - Key to remove * @returns {boolean} - true is succeeded, false otherwise **/ RemovePData(this: Player, key: string): boolean /** * * Removes the amount of the specified ammo from the player. * * @name Player:RemoveAmmo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/RemoveAmmo * @param {Player} this - no description * @param {number} ammoCount - The amount of ammunition to remove. * @param {string} ammoName - The name of the ammunition to remove from. This can also be a @number type ammoID. * @returns {void} **/ RemoveAmmo(this: Player, ammoCount: number, ammoName: string): void /** * * Removes all weapons and ammo from the player. * * @name Player:RemoveAllItems * @realm server * @wiki https://wiki.garrysmod.com/page/Player/RemoveAllItems * @param {Player} this - no description * @returns {void} **/ RemoveAllItems(this: Player): void /** * * Removes all ammo from a certain player * * @name Player:RemoveAllAmmo * @realm server * @wiki https://wiki.garrysmod.com/page/Player/RemoveAllAmmo * @param {Player} this - no description * @returns {void} **/ RemoveAllAmmo(this: Player): void /** * * Displays a message either in their chat, console, or center of the screen. See also @PrintMessage function. * * @name Player:PrintMessage * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/PrintMessage * @note When called serverside, this uses the archaic user message system (the @umsg library) and hence is limited to ≈250 characters. * @note *HUD_PRINTCENTER* will not work when this is called clientside. * @param {Player} this - no description * @param {HUD} type - Which type of message should be sent to the player (@HUD enum) * @param {string} message - Message to be sent to the player * @returns {void} **/ PrintMessage(this: Player, type: HUD, message: string): void /** * * Plays the correct step sound according to what the player is staying on. * * @name Player:PlayStepSound * @realm server * @wiki https://wiki.garrysmod.com/page/Player/PlayStepSound * @param {Player} this - no description * @param {number} volume - Volume for the sound, in range from 0 to 1 * @returns {void} **/ PlayStepSound(this: Player, volume: number): void /** * * This makes the player hold ( same as pressing @E key on a small prop ) the provided entity. * * @name Player:PickupObject * @realm server * @wiki https://wiki.garrysmod.com/page/Player/PickupObject * @note Don't get this confused with picking up items like ammo or health kits * @note This picks up the passed entity regardless of its mass or distance from the player * @param {Player} this - no description * @param {Entity} entity - Entity to pick up. * @returns {void} **/ PickupObject(this: Player, entity: Entity): void /** * * Returns the player's ping to server. * * @name Player:Ping * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Ping * @param {Player} this - no description * @returns {number} - The player's ping. **/ Ping(this: Player): number /** * * Returns the packet loss of the client. It is not networked so it only returns 0 when run clientside. * * @name Player:PacketLoss * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/PacketLoss * @param {Player} this - no description * @returns {number} - Packets lost **/ PacketLoss(this: Player): number /** * * Unfreezes the props player is looking at. This is essentially the same as pressing reload with the physics gun, including double press for unfreeze all. * * @name Player:PhysgunUnfreeze * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/PhysgunUnfreeze * @param {Player} this - no description * @returns {number} - Number of props unfrozen. **/ PhysgunUnfreeze(this: Player): number /** * * Returns the player's nickname. * * @name Player:Nick * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Nick * @bug #3178 This is limited to 31 characters even though Steam names can have 32. * @param {Player} this - no description * @returns {string} - Player's Steam name **/ Nick(this: Player): string /** * * Returns the players name. Identical to @Player:Nick and @Player:GetName. * * @name Player:Name * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Name * @bug #3178 This is limited to 31 characters even though Steam names can have 32. * @param {Player} this - no description * @returns {string} - Player's Steam name. **/ Name(this: Player): string /** * * Returns the position of a Kinect bone. * * @name Player:MotionSensorPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/MotionSensorPos * @param {Player} this - no description * @param {number} bone - Bone to get the position of. Must be from 0 to 19. * @returns {Vector} - Position of the bone. **/ MotionSensorPos(this: Player, bone: number): Vector /** * * Stops a player from using any inputs, such as moving, turning, or attacking. Key binds are still called. Similar to @Player:Freeze but the player takes no damage. * Adds the [FL_FROZEN](https://wiki.garrysmod.com/page/Enums/FL) and [FL_GODMODE](https://wiki.garrysmod.com/page/Enums/FL) flags to the player. * * @name Player:Lock * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Lock * @bug Frozen bots will still be able to look around. * @param {Player} this - no description * @returns {void} **/ Lock(this: Player): void /** * * Returns the hitgroup where the player was last hit. * * @name Player:LastHitGroup * @realm server * @wiki https://wiki.garrysmod.com/page/Player/LastHitGroup * @param {Player} this - no description * @returns {HITGROUP} - Hitgroup, see @HITGROUP enum **/ LastHitGroup(this: Player): HITGROUP /** * * Shows "limit hit" notification in sandbox. * * @name Player:LimitHit * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/LimitHit * @note This function is only available in Sandbox and its derivatives * @param {Player} this - no description * @param {string} type - Type of hit limit * @returns {void} **/ LimitHit(this: Player, type: string): void /** * * This allows the server to mitigate the lag of the player by moving back all the entities that can be lag compensated to the time the player attacked with his weapon. * This technique is most commonly used on things that hit other entities instantaneously, such as traces. * Lag compensation only works for players and entities that have been enabled with @EntityFuncs:SetLagCompensated * Despite being defined shared, it can only be used server side in a [Predicted Hook](https://wiki.garrysmod.com/page/Category:Predicted_Hooks). * * @name Player:LagCompensation * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/LagCompensation * @note @EntityFuncs:FireBullets calls this function internally. * @warning This function NEEDS to be disabled after you're done with it or it will break the movement of the entities affected! * @bug #3683 Lag compensation does not support pose parameters. * @param {Player} this - no description * @param {boolean} lagCompensation - The state of the lag compensation, true to enable and false to disable. * @returns {void} **/ LagCompensation(this: Player, lagCompensation: boolean): void /** * * Kills a player without notifying the rest of the server. * This will call @GamemodeHooks:PlayerSilentDeath instead of @GamemodeHooks:PlayerDeath. * * @name Player:KillSilent * @realm server * @wiki https://wiki.garrysmod.com/page/Player/KillSilent * @param {Player} this - no description * @returns {void} **/ KillSilent(this: Player): void /** * * Gets whether a key was just released this tick * * @name Player:KeyReleased * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/KeyReleased * @param {Player} this - no description * @param {IN} key - The key, see @IN enum * @returns {boolean} - Was released or not **/ KeyReleased(this: Player, key: IN): boolean /** * * Kills a player and calls @GamemodeHooks:PlayerDeath. * * @name Player:Kill * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Kill * @param {Player} this - no description * @returns {void} **/ Kill(this: Player): void /** * * Gets whether a key was just pressed this tick * * @name Player:KeyPressed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/KeyPressed * @param {Player} this - no description * @param {IN} key - Corresponds to an @IN enum * @returns {boolean} - Was pressed or not **/ KeyPressed(this: Player, key: IN): boolean /** * * Kicks the player from the server. * * @name Player:Kick * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Kick * @note This can not be run before the player has fully joined in. Use @game.KickID for that. * @warning This will be shortened to ~512 chars, though this includes the command itself and the player index so will realistically be more around ~498. It is recommended to avoid going near the limit to avoid truncation. * @param {Player} this - no description * @param {string} reason - Reason to show for disconnection. * @returns {void} **/ Kick(this: Player, reason?: string): void /** * * Gets whether a key was down one tick ago. * * @name Player:KeyDownLast * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/KeyDownLast * @param {Player} this - no description * @param {IN} key - The key, see @IN enum * @returns {boolean} - Is key down **/ KeyDownLast(this: Player, key: IN): boolean /** * * Gets whether a key is down. This is not networked to other players, meaning only the local client can see the keys they are pressing. * * @name Player:KeyDown * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/KeyDown * @param {Player} this - no description * @param {IN} key - The key, see @IN enum * @returns {boolean} - isDown **/ KeyDown(this: Player, key: IN): boolean /** * * Returns if the player can be heard by the local player. * * @name Player:IsVoiceAudible * @realm client * @wiki https://wiki.garrysmod.com/page/Player/IsVoiceAudible * @param {Player} this - no description * @returns {boolean} - isAudible **/ IsVoiceAudible(this: Player): boolean /** * * Returns if the player is in the context menu. * * @name Player:IsWorldClicking * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsWorldClicking * @note Although this is shared, it will only work properly on the CLIENT for the local player. Using this serverside or on other players will return false. * @param {Player} this - no description * @returns {boolean} - Is the player world clicking or not. **/ IsWorldClicking(this: Player): boolean /** * * Returns true/false if the player is in specified group or not. * * @name Player:IsUserGroup * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsUserGroup * @param {Player} this - no description * @param {string} groupname - Group to check the player for. * @returns {boolean} - isInUserGroup **/ IsUserGroup(this: Player, groupname: string): boolean /** * * Returns whether the player is typing in their chat. * This may not work properly if the server uses a custom chatbox. * * @name Player:IsTyping * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsTyping * @param {Player} this - no description * @returns {boolean} - Whether the player is typing in their chat or not. **/ IsTyping(this: Player): boolean /** * * Returns true if the player is timing out (i.e. is losing connection), false otherwise. * * @name Player:IsTimingOut * @realm server * @wiki https://wiki.garrysmod.com/page/Player/IsTimingOut * @param {Player} this - no description * @returns {boolean} - isTimingOut **/ IsTimingOut(this: Player): boolean /** * * Returns whether the player is a superadmin. * * @name Player:IsSuperAdmin * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsSuperAdmin * @param {Player} this - no description * @returns {boolean} - True if the player is a superadmin. **/ IsSuperAdmin(this: Player): boolean /** * * Returns whenever the player is equipped with the suit item. * * @name Player:IsSuitEquipped * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsSuitEquipped * @bug #3449 This will only work for the local player when used clientside. * @param {Player} this - no description * @returns {boolean} - Is the suit equipped or not. **/ IsSuitEquipped(this: Player): boolean /** * * Returns whether the player is currently sprinting or not. * * @name Player:IsSprinting * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsSprinting * @param {Player} this - no description * @returns {boolean} - Is the player sprinting or not **/ IsSprinting(this: Player): boolean /** * * Returns whenever the player is heard by the local player. * * @name Player:IsSpeaking * @realm client * @wiki https://wiki.garrysmod.com/page/Player/IsSpeaking * @param {Player} this - no description * @returns {boolean} - isSpeaking **/ IsSpeaking(this: Player): boolean /** * * Returns true if the player is playing a taunt. * * @name Player:IsPlayingTaunt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsPlayingTaunt * @param {Player} this - no description * @returns {boolean} - Whether the player is playing a taunt. **/ IsPlayingTaunt(this: Player): boolean /** * * Returns whether or not the player is muted locally. * * @name Player:IsMuted * @realm client * @wiki https://wiki.garrysmod.com/page/Player/IsMuted * @param {Player} this - no description * @returns {boolean} - whether or not the player is muted locally. **/ IsMuted(this: Player): boolean /** * * Returns if a player is the host of the current session. * * @name Player:IsListenServerHost * @realm server * @wiki https://wiki.garrysmod.com/page/Player/IsListenServerHost * @param {Player} this - no description * @returns {boolean} - True if the player is the listen server host, false otherwise. * This will always be true in single player, and false on a dedicated server. **/ IsListenServerHost(this: Player): boolean /** * * Returns whether the player identity was confirmed by the steam network. * * @name Player:IsFullyAuthenticated * @realm server * @wiki https://wiki.garrysmod.com/page/Player/IsFullyAuthenticated * @param {Player} this - no description * @returns {boolean} - Whether the player has been fully authenticated or not. * This will always be true for singleplayer and the listen server host. * This will always be false for bots. **/ IsFullyAuthenticated(this: Player): boolean /** * * Returns whether the players movement is currently frozen, contolled by @Player:Freeze. * * @name Player:IsFrozen * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsFrozen * @param {Player} this - no description * @returns {boolean} - Whether the players movement is currently frozen or not. **/ IsFrozen(this: Player): boolean /** * * Used to find out if a player is currently 'driving' an entity (by which we mean 'right click > drive' ). * * @name Player:IsDrivingEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsDrivingEntity * @param {Player} this - no description * @returns {boolean} - A value representing whether or not the player is 'driving' an entity. **/ IsDrivingEntity(this: Player): boolean /** * * Returns if the player is an bot or not * * @name Player:IsBot * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsBot * @param {Player} this - no description * @returns {boolean} - True if the player is a bot. **/ IsBot(this: Player): boolean /** * * Returns true from the point when the player is sending client info but not fully in the game until they disconnect. * * @name Player:IsConnected * @realm server * @wiki https://wiki.garrysmod.com/page/Player/IsConnected * @param {Player} this - no description * @returns {boolean} - isConnected **/ IsConnected(this: Player): boolean /** * * Returns whether the player is an admin or not * * @name Player:IsAdmin * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/IsAdmin * @param {Player} this - no description * @returns {boolean} - True if the player is an admin **/ IsAdmin(this: Player): boolean /** * * Returns the player's IP address and connection port in ip:port form * * @name Player:IPAddress * @realm server * @wiki https://wiki.garrysmod.com/page/Player/IPAddress * @param {Player} this - no description * @returns {string} - The player's IP address and connection port **/ IPAddress(this: Player): string /** * * Returns if the player is in a vehicle * * @name Player:InVehicle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/InVehicle * @param {Player} this - no description * @returns {boolean} - Whether the player is in a vehicle. **/ InVehicle(this: Player): boolean /** * * Returns if the player has the specified weapon * * @name Player:HasWeapon * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/HasWeapon * @param {Player} this - no description * @param {string} className - Class name of the weapon * @returns {boolean} - True if the player has the weapon **/ HasWeapon(this: Player, className: string): boolean /** * * Returns whether the player has god mode or not, contolled by @Player:GodEnable and @Player:GodDisable. * * @name Player:HasGodMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/HasGodMode * @bug #2038 This is not synced between the client and server. This will cause the client to always return false even in godmode. * @param {Player} this - no description * @returns {boolean} - Whether the player has god mode or not. **/ HasGodMode(this: Player): boolean /** * * Disables god mode on the player. * * @name Player:GodDisable * @realm server * @wiki https://wiki.garrysmod.com/page/Player/GodDisable * @param {Player} this - no description * @returns {void} **/ GodDisable(this: Player): void /** * * Enables god mode on the player. * * @name Player:GodEnable * @realm server * @wiki https://wiki.garrysmod.com/page/Player/GodEnable * @param {Player} this - no description * @returns {void} **/ GodEnable(this: Player): void /** * * Gives ammo to a player * * @name Player:GiveAmmo * @realm server * @wiki https://wiki.garrysmod.com/page/Player/GiveAmmo * @param {Player} this - no description * @param {number} amount - Amount of ammo * @param {string} type - Type of ammo. * This can also be a number for ammo ID, useful for custom ammo types. * You can find a list of default ammo types [here](https://wiki.garrysmod.com/page/Default_Ammo_Types). * @param {boolean} hidePopup - Hide display popup when giving the ammo * @returns {number} - Ammo given. **/ GiveAmmo(this: Player, amount: number, type: string, hidePopup?: boolean): number /** * * Gives the player a weapon. * * @name Player:Give * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Give * @note While this function is meant for weapons/pickupables only, it is **not** restricted to weapons. Any entity can be spawned using this function, including NPCs and SENTs. * @param {Player} this - no description * @param {string} weaponClassName - Class name of weapon to give the player * @param {boolean} bNoAmmo - Set to true to not give any ammo on weapon spawn. (Reserve ammo set by DefaultClip) * @returns {Weapon} - The weapon given to the player, if one was given. It will return NULL if the player already has the weapon, or the weapon entity (entity with given classname) doesn't exist. **/ Give(this: Player, weaponClassName: string, bNoAmmo?: boolean): Weapon /** * * Returns a player's weapon color. The part of the model that is colored is determined by the model itself, and is different for each model. The format is Vector(r,g,b), and each color should be between 0 and 1. * * @name Player:GetWeaponColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetWeaponColor * @param {Player} this - no description * @returns {Vector} - color **/ GetWeaponColor(this: Player): Vector /** * * Returns a table of the player's weapons. * * @name Player:GetWeapons * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetWeapons * @param {Player} this - no description * @returns {table} - All the weapons the player currently has. **/ GetWeapons(this: Player): table /** * * Returns the weapon for the specified class * * @name Player:GetWeapon * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetWeapon * @param {Player} this - no description * @param {string} className - Class name of weapon * @returns {Weapon} - The weapon for the specified class. **/ GetWeapon(this: Player, className: string): Weapon /** * * Returns the player's normal walking speed. Not sprinting, not slow walking. (+walk) * See also @Player:SetWalkSpeed, @Player:GetMaxSpeed and @Player:GetRunSpeed. * * @name Player:GetWalkSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetWalkSpeed * @param {Player} this - no description * @returns {number} - The normal walking speed. **/ GetWalkSpeed(this: Player): number /** * * Returns the view offset of the player which equals the difference between the players actual position and their view when ducked. * See also @Player:GetViewOffset. * * @name Player:GetViewOffsetDucked * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetViewOffsetDucked * @param {Player} this - no description * @returns {Vector} - New crouching view offset, must be local vector to players @EntityFuncs:GetPos **/ GetViewOffsetDucked(this: Player): Vector /** * * Returns players screen punch effect angle. * * @name Player:GetViewPunchAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetViewPunchAngles * @param {Player} this - no description * @returns {Angle} - The punch angle **/ GetViewPunchAngles(this: Player): Angle /** * * Returns the view offset of the player which equals the difference between the players actual position and their view. * See also @Player:GetViewOffsetDucked. * * @name Player:GetViewOffset * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetViewOffset * @param {Player} this - no description * @returns {Vector} - New view offset, must be local vector to players @EntityFuncs:GetPos **/ GetViewOffset(this: Player): Vector /** * * Returns the player's view model entity by the index. * Each player has 3 view models by default, but only the first one is used. * To use the other viewmodels in your SWEP, see @EntityFuncs:SetWeaponModel. * * @name Player:GetViewModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetViewModel * @note In the Client [realm](https://wiki.garrysmod.com/page/States), other players' viewmodels are not available unless they are being spectated. * @param {Player} this - no description * @param {number} index - optional index of the view model to return, can range from 0 to 2 * @returns {Entity} - The view model entity **/ GetViewModel(this: Player, index?: number): Entity /** * * Returns the entity the player is using to see from (such as the player itself, the camera, or another entity). * * @name Player:GetViewEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetViewEntity * @param {Player} this - no description * @returns {Entity} - The entity the player is using to see from **/ GetViewEntity(this: Player): Entity /** * * Returns the player's user group. * * @name Player:GetUserGroup * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetUserGroup * @param {Player} this - no description * @returns {string} - The user group of the player. This will return "user" if player has no user group. **/ GetUserGroup(this: Player): string /** * * Gets the vehicle the player is driving, returns NULL ENTITY if the player is not driving. * * @name Player:GetVehicle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetVehicle * @param {Player} this - no description * @returns {Vehicle} - vehicle **/ GetVehicle(this: Player): Vehicle /** * * Returns a player's unduck speed (in seconds) * * @name Player:GetUnDuckSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetUnDuckSpeed * @param {Player} this - no description * @returns {number} - unduck speed **/ GetUnDuckSpeed(this: Player): number /** * * Returns TOOL table of players current tool, or of the one specified. * * @name Player:GetTool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetTool * @param {Player} this - no description * @param {string} mode - Classname of the tool to retrieve. ( Filename of the tool in gmod_tool/stools/ ) * @returns {table} - TOOL table, or nil if the table wasn't found or the player doesn't have a tool gun. **/ GetTool(this: Player, mode?: string): table /** * * Returns the number of seconds that the player has been timing out for. You can check if a player is timing out with @Player:IsTimingOut. * * @name Player:GetTimeoutSeconds * @realm server * @wiki https://wiki.garrysmod.com/page/Player/GetTimeoutSeconds * @param {Player} this - no description * @returns {number} - Timeout seconds. **/ GetTimeoutSeconds(this: Player): number /** * * Returns the maximum height player can step onto. * * @name Player:GetStepSize * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetStepSize * @param {Player} this - no description * @returns {number} - The maximum height player can get up onto without jumping, in hammer units. **/ GetStepSize(this: Player): number /** * * Returns the position of a Player's view * * @name Player:GetShootPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetShootPos * @note This is the same as calling @EntityFuncs:EyePos on the player. * @param {Player} this - no description * @returns {Vector} - aim pos **/ GetShootPos(this: Player): Vector /** * * Returns the player's HEV suit power. * * @name Player:GetSuitPower * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetSuitPower * @bug #3449 This will only work for the local player when used clientside. * @param {Player} this - no description * @returns {number} - The current suit power. **/ GetSuitPower(this: Player): number /** * * Returns the player's sprint speed. * See also @Player:SetRunSpeed, @Player:GetWalkSpeed and @Player:GetMaxSpeed. * * @name Player:GetRunSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetRunSpeed * @param {Player} this - no description * @returns {number} - The sprint speed **/ GetRunSpeed(this: Player): number /** * * Returns the render angles for the player. * * @name Player:GetRenderAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetRenderAngles * @param {Player} this - no description * @returns {Angle} - The render angles of the player. Only **yaw** part of the angle seems to be present. **/ GetRenderAngles(this: Player): Angle /** * * Returns players death ragdoll. The ragdoll is created by @Player:CreateRagdoll. * * @name Player:GetRagdollEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetRagdollEntity * @param {Player} this - no description * @returns {Entity} - The ragdoll. * Unlike normal clientside ragdolls (C_ClientRagdoll), this will be a C_HL2MPRagdoll on the client, and hl2mp_ragdoll on the server. **/ GetRagdollEntity(this: Player): Entity /** * * Returns players screen punch effect angle. * * @name Player:GetPunchAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetPunchAngle * @param {Player} this - no description * @returns {Angle} - The punch angle **/ GetPunchAngle(this: Player): Angle /** * * Returns the preferred carry angles of an object, if any are set. * Calls @GamemodeHooks:GetPreferredCarryAngles with the target entity and returns the carry angles. * * @name Player:GetPreferredCarryAngles * @realm server * @wiki https://wiki.garrysmod.com/page/Player/GetPreferredCarryAngles * @param {Player} this - no description * @param {Entity} carryEnt - Entity to retrieve the carry angles of. * @returns {Angle} - Carry angles or nil if the entity has no preferred carry angles. **/ GetPreferredCarryAngles(this: Player, carryEnt: Entity): Angle /** * * Returns a table containing player information. * * @name Player:GetPlayerInfo * @realm client * @wiki https://wiki.garrysmod.com/page/Player/GetPlayerInfo * @param {Player} this - no description * @returns {table} - A table containing player information. **/ GetPlayerInfo(this: Player): table /** * * Returns the weapon the player previously had equipped. * * @name Player:GetPreviousWeapon * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetPreviousWeapon * @warning This is not guaranteed to be a weapon entity so it should be checked with @EntityFuncs:IsWeapon for safety. * @param {Player} this - no description * @returns {Entity} - The previous weapon of the player. **/ GetPreviousWeapon(this: Player): Entity /** * * Returns the widget entity the player is using. * Having a pressed widget stops the player from firing his weapon to allow input to be passed onto the widget. * * @name Player:GetPressedWidget * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetPressedWidget * @param {Player} this - no description * @returns {Entity} - The pressed widget. **/ GetPressedWidget(this: Player): Entity /** * * Returns a player model's color. The part of the model that is colored is determined by the model itself, and is different for each model. The format is Vector(r,g,b), and each color should be between 0 and 1. * * @name Player:GetPlayerColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetPlayerColor * @param {Player} this - no description * @returns {Vector} - color **/ GetPlayerColor(this: Player): Vector /** * * Returns a **P**layer **Data** key-value pair from the SQL database. (sv.db when called on server, cl.db when called on client) * Internally uses the @sql library. * * @name Player:GetPData * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetPData * @note PData is not networked from servers to clients! * @warning This function internally uses @Player:UniqueID, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information. * @param {Player} this - no description * @param {string} key - Name of the PData key * @param {any} def - Default value if PData key doesn't exist. * @returns {string} - The data in the SQL database or the default value given. **/ GetPData(this: Player, key: string, def?: any): string /** * * Returns the entity the player is currently observing. * Set using @Player:SpectateEntity. * * @name Player:GetObserverTarget * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetObserverTarget * @param {Player} this - no description * @returns {Entity} - The entity the player is currently spectating, or [NULL](https://wiki.garrysmod.com/page/Global_Variables) if the player has no target. **/ GetObserverTarget(this: Player): Entity /** * * Returns the the observer mode of the player * * @name Player:GetObserverMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetObserverMode * @param {Player} this - no description * @returns {OBS_MODE} - Observe mode of that player, see @OBS_MODE enum. **/ GetObserverMode(this: Player): OBS_MODE /** * * Returns whenever the player is set not to collide with their teammates. * * @name Player:GetNoCollideWithTeammates * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetNoCollideWithTeammates * @param {Player} this - no description * @returns {boolean} - noCollideWithTeammates **/ GetNoCollideWithTeammates(this: Player): boolean /** * * Returns the player's maximum movement speed. * See also @Player:SetMaxSpeed, @Player:GetWalkSpeed and @Player:GetRunSpeed. * * @name Player:GetMaxSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetMaxSpeed * @param {Player} this - no description * @returns {number} - The maximum movement speed the player can go at. **/ GetMaxSpeed(this: Player): number /** * * Returns the player's name, this is an alias of @Player:Nick. * * @name Player:GetName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetName * @note This function overrides @EntityFuncs:GetName (in the Lua metatable, not in c++), keep it in mind when dealing with @ents.FindByName or any engine function which requires the mapping name. * @bug #3178 This is limited to 31 characters even though Steam names can have 32. * @param {Player} this - no description * @returns {string} - The player's name. **/ GetName(this: Player): string /** * * Returns the timescale multiplier of the player movement. * * @name Player:GetLaggedMovementValue * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetLaggedMovementValue * @param {Player} this - no description * @returns {number} - The timescale multiplier, defaults to 1. **/ GetLaggedMovementValue(this: Player): number /** * * Returns the jump power of the player * * @name Player:GetJumpPower * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetJumpPower * @param {Player} this - no description * @returns {number} - Jump power **/ GetJumpPower(this: Player): number /** * * Retrieves the numeric value of a client-side convar, returns nil if value is not convertible to a number. The @ConVar type must have a [FCVAR_USERINFO](https://wiki.garrysmod.com/page/Enums/FCVAR) flag for this to work. * * @name Player:GetInfoNum * @realm server * @wiki https://wiki.garrysmod.com/page/Player/GetInfoNum * @param {Player} this - no description * @param {string} cVarName - The name of the @ConVar type to query the value of * @param {number} def - Default value if we failed to retrieve the number. * @returns {number} - The value of the @ConVar type or the default value **/ GetInfoNum(this: Player, cVarName: string, def: number): number /** * * Retrieves the value of a client-side @ConVar type. The @ConVar type must have a [FCVAR_USERINFO](https://wiki.garrysmod.com/page/Enums/FCVAR) flag for this to work. * * @name Player:GetInfo * @realm server * @wiki https://wiki.garrysmod.com/page/Player/GetInfo * @warning The returned value is truncated to 31 bytes. * @param {Player} this - no description * @param {string} cVarName - The name of the client-side @ConVar type * @returns {string} - The value of the @ConVar type **/ GetInfo(this: Player, cVarName: string): string /** * * Gets the bottom base and the top base size of the player's crouch hull. * * @name Player:GetHullDuck * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetHullDuck * @param {Player} this - no description * @returns {Vector} - Player's crouch hull bottom base size * @returns {Vector} - Player's crouch hull top base size * @tupleReturn **/ GetHullDuck(this: Player): [Vector, Vector] /** * * Gets the bottom base and the top base size of the player's hull. * * @name Player:GetHull * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetHull * @param {Player} this - no description * @returns {Vector} - Player's hull bottom base size * @returns {Vector} - Player's hull top base size * @tupleReturn **/ GetHull(this: Player): [Vector, Vector] /** * * Gets the hands entity of a player * * @name Player:GetHands * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetHands * @param {Player} this - no description * @returns {Entity} - The hands entity if players has one **/ GetHands(this: Player): Entity /** * * Returns the widget the player is hovering with his mouse. * * @name Player:GetHoveredWidget * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetHoveredWidget * @param {Player} this - no description * @returns {Entity} - The hovered widget. **/ GetHoveredWidget(this: Player): Entity /** * * Returns the steam "relationship" towards the player. * * @name Player:GetFriendStatus * @realm client * @wiki https://wiki.garrysmod.com/page/Player/GetFriendStatus * @param {Player} this - no description * @returns {string} - Should return one of four different things depending on their status on your friends list: "friend", "blocked", "none" or "requested". **/ GetFriendStatus(this: Player): string /** * * Returns the FOV of the player. * * @name Player:GetFOV * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetFOV * @param {Player} this - no description * @returns {number} - Field of view as a float **/ GetFOV(this: Player): number /** * * Returns a table with information of what the player is looking at. * The results of this function are cached every frame. * See also @Player:GetEyeTraceNoCursor * * @name Player:GetEyeTrace * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetEyeTrace * @param {Player} this - no description * @returns {TraceResult} - Trace information, see @TraceResult structure **/ GetEyeTrace(this: Player): TraceResult /** * * Returns the trace according to the players view direction, ignoring their mouse ( Holding C and moving the mouse in Sandbox ). * The results of this function are cached every frame. * See also @Player:GetEyeTrace * * @name Player:GetEyeTraceNoCursor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetEyeTraceNoCursor * @param {Player} this - no description * @returns {TraceResult} - Trace result. See @TraceResult structure **/ GetEyeTraceNoCursor(this: Player): TraceResult /** * * Returns the entity the player is currently using, like func_tank mounted turrets or +use prop pickups. * * @name Player:GetEntityInUse * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetEntityInUse * @param {Player} this - no description * @returns {Entity} - Entity in use, or NULL entity otherwise. For +use prop pickups, this will be NULL clientside. **/ GetEntityInUse(this: Player): Entity /** * * Returns a player's duck speed (in seconds) * * @name Player:GetDuckSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetDuckSpeed * @param {Player} this - no description * @returns {number} - duckspeed **/ GetDuckSpeed(this: Player): number /** * * Returns driving mode of the player. See [Entity Driving](https://wiki.garrysmod.com/page/Entity%20Driving). * * @name Player:GetDrivingMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetDrivingMode * @param {Player} this - no description * @returns {number} - The drive mode ID or 0 if player doesn't use the drive system. **/ GetDrivingMode(this: Player): number /** * * Gets the entity the player is currently driving. * * @name Player:GetDrivingEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetDrivingEntity * @param {Player} this - no description * @returns {Entity} - DriveEntity **/ GetDrivingEntity(this: Player): Entity /** * * Gets the **actual** view offset which equals the difference between the players actual position and their view when standing. * Do not confuse with @Player:GetViewOffset and @Player:GetViewOffsetDucked * * @name Player:GetCurrentViewOffset * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetCurrentViewOffset * @param {Player} this - no description * @returns {Vector} - The actual view offset. **/ GetCurrentViewOffset(this: Player): Vector /** * * Returns the last command which was sent by the specified player. Can only be used in a [Predicted Hook](https://wiki.garrysmod.com/page/Category:Predicted_Hooks). * * @name Player:GetCurrentCommand * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetCurrentCommand * @note When called clientside in singleplayer during @WeaponHooks:Think, it will return nothing as the hook is not technically predicted in that instance. See the note on the page. * @bug #3302 This will fail in @GamemodeHooks:StartCommand. * @param {Player} this - no description * @returns {CUserCmd} - Last user commands **/ GetCurrentCommand(this: Player): CUserCmd /** * * Returns the crouched walk speed multiplier. * See also @Player:GetWalkSpeed and @Player:SetCrouchedWalkSpeed. * * @name Player:GetCrouchedWalkSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetCrouchedWalkSpeed * @param {Player} this - no description * @returns {number} - The crouched walk speed multiplier. **/ GetCrouchedWalkSpeed(this: Player): number /** * * Gets total count of entities of same class. * * @name Player:GetCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetCount * @param {Player} this - no description * @param {string} type - Entity type to get count of. * @param {number} minus - If specified, it will reduce the counter by this value. Works only serverside. * @returns {void} **/ GetCount(this: Player, type: string, minus?: number): void /** * * Returns the player's class id. * * @name Player:GetClassID * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetClassID * @param {Player} this - no description * @returns {number} - The player's class id. **/ GetClassID(this: Player): number /** * * Returns true if the player is able to walk using the (default) alt key. * * @name Player:GetCanWalk * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetCanWalk * @param {Player} this - no description * @returns {boolean} - AbleToWalk **/ GetCanWalk(this: Player): boolean /** * * Determines whenever the player is allowed to use the zoom functionality. * * @name Player:GetCanZoom * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetCanZoom * @param {Player} this - no description * @returns {boolean} - canZoom **/ GetCanZoom(this: Player): boolean /** * * Gets the amount of ammo the player has. * * @name Player:GetAmmoCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetAmmoCount * @param {Player} this - no description * @param {number | string} ammotype - The ammunition type. Can be either @number type ammo ID or @string type ammo name. * @returns {number} - The amount of ammo player has in reserve. **/ GetAmmoCount(this: Player, ammotype: number | string): number /** * * Returns a table of all ammo the player has. * * @name Player:GetAmmo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetAmmo * @param {Player} this - no description * @returns {table} - @number type Key: AmmoID to be used with functions like @game.GetAmmoName. * @number type Value: Amount of ammo the player has of this kind. **/ GetAmmo(this: Player): table /** * * Gets if the player will be pushed out of nocollided players. * * @name Player:GetAvoidPlayers * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetAvoidPlayers * @param {Player} this - no description * @returns {boolean} - pushed **/ GetAvoidPlayers(this: Player): boolean /** * * Returns true if the players' model is allowed to rotate around the pitch and roll axis. * * @name Player:GetAllowFullRotation * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetAllowFullRotation * @param {Player} this - no description * @returns {boolean} - Allowed **/ GetAllowFullRotation(this: Player): boolean /** * * Returns whether the player is allowed to use his weapons in a vehicle or not. * * @name Player:GetAllowWeaponsInVehicle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetAllowWeaponsInVehicle * @param {Player} this - no description * @returns {boolean} - Whether the player is allowed to use his weapons in a vehicle or not. **/ GetAllowWeaponsInVehicle(this: Player): boolean /** * * Returns the direction that the player is aiming. * * @name Player:GetAimVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetAimVector * @param {Player} this - no description * @returns {Vector} - The direction vector of players aim **/ GetAimVector(this: Player): Vector /** * * Freeze the player. Frozen players cannot move, look around, or attack. Key bindings are still called. Similar to @Player:Lock but the player can still take damage. * Adds or removes the [FL_FROZEN](https://wiki.garrysmod.com/page/Enums/FL) flag from the player. * * @name Player:Freeze * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Freeze * @bug Frozen bots will still be able to look around. * @param {Player} this - no description * @param {boolean} frozen - Whether the player should be frozen. * @returns {void} **/ Freeze(this: Player, frozen?: boolean): void /** * * Returns the amount of kills a player has. * * @name Player:Frags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Frags * @param {Player} this - no description * @returns {number} - kills **/ Frags(this: Player): number /** * * Returns the player's active weapon. * * @name Player:GetActiveWeapon * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/GetActiveWeapon * @param {Player} this - no description * @returns {Weapon} - The weapon the player is currently has equipped. **/ GetActiveWeapon(this: Player): Weapon /** * * Returns true if the player's flashlight is on. * * @name Player:FlashlightIsOn * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/FlashlightIsOn * @param {Player} this - no description * @returns {boolean} - Whether the player's flashlight is on. **/ FlashlightIsOn(this: Player): boolean /** * * Enables/Disables the player's flashlight * * @name Player:Flashlight * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Flashlight * @param {Player} this - no description * @param {boolean} isOn - Turns the flashlight on/off * @returns {void} **/ Flashlight(this: Player, isOn: boolean): void /** * * Makes the player exit the vehicle if they're in one. * * @name Player:ExitVehicle * @realm server * @wiki https://wiki.garrysmod.com/page/Player/ExitVehicle * @param {Player} this - no description * @returns {void} **/ ExitVehicle(this: Player): void /** * * Equips the player with the HEV suit. * Allows the player to zoom, walk slowly, sprint, pickup armor batteries, use the health and armor stations and also shows the HUD. * The player also emits a flatline sound on death, which can be overridden with @GamemodeHooks:PlayerDeathSound. * The player is automatically equipped with the suit on spawn, if you wish to stop that, use @Player:RemoveSuit. * * @name Player:EquipSuit * @realm server * @wiki https://wiki.garrysmod.com/page/Player/EquipSuit * @param {Player} this - no description * @returns {void} **/ EquipSuit(this: Player): void /** * * Enters the player into specified vehicle * * @name Player:EnterVehicle * @realm server * @wiki https://wiki.garrysmod.com/page/Player/EnterVehicle * @param {Player} this - no description * @param {Vehicle} vehicle - Vehicle the player will enter * @returns {void} **/ EnterVehicle(this: Player, vehicle: Vehicle): void /** * * Forces the player to drop the specified weapon * * @name Player:DropWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/Player/DropWeapon * @param {Player} this - no description * @param {Weapon} weapon - Weapon to be dropped. If unset, will default to the currently equipped weapon. * @param {Vector} target - If set, launches the weapon at given position. There is a limit to how far it is willing to throw the weapon. Overrides velocity argument. * @param {Vector} velocity - If set and previous argument is unset, launches the weapon with given velocity. If the velocity is higher than 400, it will be clamped to 400. * @returns {void} **/ DropWeapon(this: Player, weapon?: Weapon, target?: Vector, velocity?: Vector): void /** * * Drops any object the player is currently holding with either gravitygun or +Use (E key) * * @name Player:DropObject * @realm server * @wiki https://wiki.garrysmod.com/page/Player/DropObject * @param {Player} this - no description * @returns {void} **/ DropObject(this: Player): void /** * * Show/Hide the player's weapon's worldmodel. * * @name Player:DrawWorldModel * @realm server * @wiki https://wiki.garrysmod.com/page/Player/DrawWorldModel * @param {Player} this - no description * @param {boolean} draw - Should draw * @returns {void} **/ DrawWorldModel(this: Player, draw: boolean): void /** * * Drops the players' weapon of a specific class. * * @name Player:DropNamedWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/Player/DropNamedWeapon * @param {Player} this - no description * @param {string} cls - The class to drop. * @param {Vector} target - If set, launches the weapon at given position. There is a limit to how far it is willing to throw the weapon. Overrides velocity argument. * @param {Vector} velocity - If set and previous argument is unset, launches the weapon with given velocity. If the velocity is higher than 400, it will be clamped to 400. * @returns {void} **/ DropNamedWeapon(this: Player, cls: string, target?: Vector, velocity?: Vector): void /** * * Show/Hide the player's weapon's viewmodel. * * @name Player:DrawViewModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/DrawViewModel * @param {Player} this - no description * @param {boolean} draw - Should draw * @param {number} vm - Which view model to show/hide, 0-2. * @returns {void} **/ DrawViewModel(this: Player, draw: boolean, vm?: number): void /** * * Sends a third person secondary fire animation event to the player. * Similar to other animation event functions, calls @GamemodeHooks:DoAnimationEvent with [PLAYERANIMEVENT_ATTACK_SECONDARY](https://wiki.garrysmod.com/page/Enums/PLAYERANIMEVENT%20) as the event and no extra data. * * @name Player:DoSecondaryAttack * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/DoSecondaryAttack * @param {Player} this - no description * @returns {void} **/ DoSecondaryAttack(this: Player): void /** * * Sends a third person reload animation event to the player. * Similar to other animation event functions, calls @GamemodeHooks:DoAnimationEvent with [PLAYERANIMEVENT_RELOAD](https://wiki.garrysmod.com/page/Enums/PLAYERANIMEVENT%20) as the event and no extra data. * * @name Player:DoReloadEvent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/DoReloadEvent * @param {Player} this - no description * @returns {void} **/ DoReloadEvent(this: Player): void /** * * Sends a specified third person animation event to the player. * Calls @GamemodeHooks:DoAnimationEvent with specified arguments. * * @name Player:DoCustomAnimEvent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/DoCustomAnimEvent * @param {Player} this - no description * @param {PLAYERANIMEVENT} event - The event to send. See @PLAYERANIMEVENT enum. * @param {number} data - The data to send alongside the event. * @returns {void} **/ DoCustomAnimEvent(this: Player, event: PLAYERANIMEVENT, data: number): void /** * * Detonates all tripmines belonging to the player. * * @name Player:DetonateTripmines * @realm server * @wiki https://wiki.garrysmod.com/page/Player/DetonateTripmines * @param {Player} this - no description * @returns {void} **/ DetonateTripmines(this: Player): void /** * * Starts the player's attack animation. The attack animation is determined by the weapon's HoldType. * Similar to other animation event functions, calls @GamemodeHooks:DoAnimationEvent with [PLAYERANIMEVENT_ATTACK_PRIMARY](https://wiki.garrysmod.com/page/Enums/PLAYERANIMEVENT%20) as the event and no extra data. * * @name Player:DoAttackEvent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/DoAttackEvent * @param {Player} this - no description * @returns {void} **/ DoAttackEvent(this: Player): void /** * * Sends a third person animation event to the player. * Calls @GamemodeHooks:DoAnimationEvent with [PLAYERANIMEVENT_CUSTOM_GESTURE](https://wiki.garrysmod.com/page/Enums/PLAYERANIMEVENT%20) as the event, data as the given data. * * @name Player:DoAnimationEvent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/DoAnimationEvent * @param {Player} this - no description * @param {number} data - The data to send. * @returns {void} **/ DoAnimationEvent(this: Player, data: number): void /** * * Prints the players' name and position to the console. * * @name Player:DebugInfo * @realm server * @wiki https://wiki.garrysmod.com/page/Player/DebugInfo * @param {Player} this - no description * @returns {void} **/ DebugInfo(this: Player): void /** * * Returns the player's death count * * @name Player:Deaths * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Deaths * @param {Player} this - no description * @returns {number} - The number of deaths the player has had. **/ Deaths(this: Player): number /** * * Returns whether the player is crouching or not * * @name Player:Crouching * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Crouching * @param {Player} this - no description * @returns {boolean} - Whether the player is crouching **/ Crouching(this: Player): boolean /** * * Enables the player's crosshair, if it was previously disabled via @Player:CrosshairDisable. * * @name Player:CrosshairEnable * @realm server * @wiki https://wiki.garrysmod.com/page/Player/CrosshairEnable * @param {Player} this - no description * @returns {void} **/ CrosshairEnable(this: Player): void /** * * Disables the default player's crosshair. Can be reenabled with @Player:CrosshairEnable. This will affect @WeaponHooks:DoDrawCrosshair. * * @name Player:CrosshairDisable * @realm server * @wiki https://wiki.garrysmod.com/page/Player/CrosshairDisable * @param {Player} this - no description * @returns {void} **/ CrosshairDisable(this: Player): void /** * * Creates the player's death ragdoll entity and deletes the old one. * This is normally used when a player dies, to create their death ragdoll. * The ragdoll will be created with the player's properties such as [Position](https://wiki.garrysmod.com/page/Entity/GetPos), [Angles](https://wiki.garrysmod.com/page/Entity/GetAngles), [PlayerColor](https://wiki.garrysmod.com/page/Player/GetPlayerColor), [Velocity](https://wiki.garrysmod.com/page/Entity/GetVelocity) and [Model](https://wiki.garrysmod.com/page/Entity/GetModel). * You can retrieve the entity this creates with @Player:GetRagdollEntity. * * @name Player:CreateRagdoll * @realm server * @wiki https://wiki.garrysmod.com/page/Player/CreateRagdoll * @param {Player} this - no description * @returns {void} **/ CreateRagdoll(this: Player): void /** * * Runs the concommand on the player. This does not work on bots. * If you wish to directly modify the movement input of bots, use @GamemodeHooks:StartCommand instead. * * @name Player:ConCommand * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/ConCommand * @note Some commands/convars are blocked from being ran/changed using this function, usually to prevent harm/annoyance to clients. For a list of blocked commands, see [Blocked ConCommands](https://wiki.garrysmod.com/page/Blocked%20ConCommands). * @param {Player} this - no description * @param {string} command - command to run * @returns {void} **/ ConCommand(this: Player, command: string): void /** * * Checks if the limit is hit or not. If it is, it will throw a notification saying so. * * @name Player:CheckLimit * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/CheckLimit * @param {Player} this - no description * @param {string} limitType - Limit type. In unmodified Sandbox possible values are: * * "props" * * "ragdolls" * * "vehicles" * * "effects" * * "balloons" * * "cameras" * * "npcs" * * "sents" * * "dynamite" * * "lamps" * * "lights" * * "wheels" * * "thrusters" * * "hoverballs" * * "buttons" * * "emitters" * @returns {boolean} - Returns true if limit is not hit, false if it is hit **/ CheckLimit(this: Player, limitType: string): boolean /** * * Returns true if the player's flashlight hasn't been disabled by @ Player:AllowFlashlight. * * @name Player:CanUseFlashlight * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/CanUseFlashlight * @note This is not synchronized between clients and server automatically! * @param {Player} this - no description * @returns {boolean} - Whether the player can use flashlight. **/ CanUseFlashlight(this: Player): boolean /** * * Bans the player from the server for a certain amount of minutes. * * @name Player:Ban * @realm server * @wiki https://wiki.garrysmod.com/page/Player/Ban * @param {Player} this - no description * @param {number} minutes - Duration of the ban in minutes (0 is permanent) * @param {boolean} kick - Whether to kick the player after banning them or not * @returns {void} **/ Ban(this: Player, minutes: number, kick?: boolean): void /** * * Prints a string to the chatbox of the client. * * @name Player:ChatPrint * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/ChatPrint * @warning Just like the @usermessage library, this function is affected by the 255 byte limit! * @param {Player} this - no description * @param {string} message - String to be printed * @returns {void} **/ ChatPrint(this: Player, message: string): void /** * * Returns the player's armor. * * @name Player:Armor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Armor * @param {Player} this - no description * @returns {number} - The player's armor. **/ Armor(this: Player): number /** * * Sets the weight of the animation playing in the given gesture slot. * * @name Player:AnimSetGestureWeight * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AnimSetGestureWeight * @param {Player} this - no description * @param {GESTURE_SLOT} slot - The gesture slot. See @GESTURE_SLOT enum * @param {number} weight - The weight this slot should be set to. Value must be ranging from 0 to 1. * @returns {void} **/ AnimSetGestureWeight(this: Player, slot: GESTURE_SLOT, weight: number): void /** * * Sets the sequence of the animation playing in the given gesture slot. * * @name Player:AnimSetGestureSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AnimSetGestureSequence * @param {Player} this - no description * @param {GESTURE_SLOT} slot - The gesture slot. See @GESTURE_SLOT enum * @param {number} sequenceID - Sequence ID to set. * @returns {void} **/ AnimSetGestureSequence(this: Player, slot: GESTURE_SLOT, sequenceID: number): void /** * * Restarts the main animation on the player, has the same effect as calling @EntityFuncs:SetCycle( 0 ). * * @name Player:AnimRestartMainSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AnimRestartMainSequence * @param {Player} this - no description * @returns {void} **/ AnimRestartMainSequence(this: Player): void /** * * Restart a gesture on a player, within a gesture slot. * * @name Player:AnimRestartGesture * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AnimRestartGesture * @warning This is not automatically networked. This function has to be called on the client to be seen by said client. * @param {Player} this - no description * @param {GESTURE_SLOT} slot - Gesture slot using @GESTURE_SLOT enum * @param {ACT} activity - The activity ( see @ACT enum ) or sequence that should be played * @param {boolean} autokill - Whether the animation should be automatically stopped. true = stops the animation, false = the animation keeps playing/looping * @returns {void} **/ AnimRestartGesture(this: Player, slot: GESTURE_SLOT, activity: ACT, autokill?: boolean): void /** * * Resets player gesture in selected slot. * * @name Player:AnimResetGestureSlot * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AnimResetGestureSlot * @param {Player} this - no description * @param {GESTURE_SLOT} slot - Slot to reset. See the @GESTURE_SLOT enum. * @returns {void} **/ AnimResetGestureSlot(this: Player, slot: GESTURE_SLOT): void /** * * Lets the player spray his decal without delay * * @name Player:AllowImmediateDecalPainting * @realm server * @wiki https://wiki.garrysmod.com/page/Player/AllowImmediateDecalPainting * @param {Player} this - no description * @param {boolean} allow - Allow or disallow * @returns {void} **/ AllowImmediateDecalPainting(this: Player, allow: boolean): void /** * * Sets if the player can toggle his flashlight. Function exists on both the server and client but has no effect when ran on the client. * * @name Player:AllowFlashlight * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AllowFlashlight * @param {Player} this - no description * @param {boolean} canFlashlight - True allows flashlight toggling * @returns {void} **/ AllowFlashlight(this: Player, canFlashlight: boolean): void /** * * Plays a sequence directly from a sequence number, similar to @Player:AnimRestartGesture. This function has the advantage to play sequences that haven't been bound to an existing @ACT enum * * @name Player:AddVCDSequenceToGestureSlot * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AddVCDSequenceToGestureSlot * @param {Player} this - no description * @param {GESTURE_SLOT} slot - Gesture slot using @GESTURE_SLOT enum * @param {number} sequenceId - The sequence ID to play, can be retrieved with @EntityFuncs:LookupSequence. * @param {number} cycle - The cycle to start the animation at, ranges from 0 to 1. * @param {boolean} autokill - If the animation should not loop. true = stops the animation, false = the animation keeps playing. * @returns {void} **/ AddVCDSequenceToGestureSlot(this: Player, slot: GESTURE_SLOT, sequenceId: number, cycle: number, autokill?: boolean): void /** * * Checks if the player is alive. * * @name Player:Alive * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/Alive * @param {Player} this - no description * @returns {boolean} - Whether the player is alive **/ Alive(this: Player): boolean /** * * Sets up the voting system for the player. * This is a really barebone system. By calling this a vote gets started, when the player presses 0-9 the callback function gets called along with the key the player pressed. Use the draw callback to draw the vote panel. * * @name Player:AddPlayerOption * @realm client * @wiki https://wiki.garrysmod.com/page/Player/AddPlayerOption * @param {Player} this - no description * @param {string} name - Name of the vote * @param {number} timeout - Time until the vote expires * @param {function} vote_callback - The function to be run when the player presses 0-9 while a vote is active. * @param {function} draw_callback - Used to draw the vote panel. * @returns {void} **/ AddPlayerOption(this: Player, name: string, timeout: number, vote_callback: UnknownFunc, draw_callback: UnknownFunc): void /** * * Add a certain amount to the player's death count * * @name Player:AddDeaths * @realm server * @wiki https://wiki.garrysmod.com/page/Player/AddDeaths * @param {Player} this - no description * @param {number} count - number of deaths to add * @returns {void} **/ AddDeaths(this: Player, count: number): void /** * * Adds a entity to the players list of frozen objects. * * @name Player:AddFrozenPhysicsObject * @realm server * @wiki https://wiki.garrysmod.com/page/Player/AddFrozenPhysicsObject * @param {Player} this - no description * @param {Entity} ent - Entity * @param {PhysObj} physobj - Physics object belonging to ent * @returns {void} **/ AddFrozenPhysicsObject(this: Player, ent: Entity, physobj: PhysObj): void /** * * Add a certain amount to the player's frag count (or kills count) * * @name Player:AddFrags * @realm server * @wiki https://wiki.garrysmod.com/page/Player/AddFrags * @param {Player} this - no description * @param {number} count - number of frags to add * @returns {void} **/ AddFrags(this: Player, count: number): void /** * * Adds an entity to the total count of entities of same class. * * @name Player:AddCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AddCount * @param {Player} this - no description * @param {string} str - Entity type * @param {Entity} ent - Entity * @returns {void} **/ AddCount(this: Player, str: string, ent: Entity): void /** * * Returns the player's AccountID aka SteamID3. * For bots and in singleplayer, this will return no value. * * @name Player:AccountID * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AccountID * @param {Player} this - no description * @returns {number} - Player's SteamID3 aka AccountID. **/ AccountID(this: Player): number /** * * Adds an entity to the players clean up list. * * @name Player:AddCleanup * @realm client, server * @wiki https://wiki.garrysmod.com/page/Player/AddCleanup * @param {Player} this - no description * @param {string} type - Cleanup type * @param {Entity} ent - Entity to add * @returns {void} **/ AddCleanup(this: Player, type: string, ent: Entity): void } declare interface PlayerHooks extends Player { /** * * Called when the player changes their weapon to another one causing their viewmodel model to change * * @name PlayerHooks:ViewModelChanged * @realm client * @wiki https://wiki.garrysmod.com/page/PLAYER/ViewModelChanged * @param {Player} this - no description * @param {Entity} viewmodel - The viewmodel that is changing * @param {string} prev - The old model * @param {string} next - The new model * @returns {void} **/ ViewModelChanged(this: Player, viewmodel: Entity, prev: string, next: string): void /** * * Called from @GamemodeHooks:CreateMove. * * @name PlayerHooks:StartMove * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PLAYER/StartMove * @note This hook is run after the @drive.StartMove has been called. * @warning This hook will not work if the current gamemode overrides @GamemodeHooks:SetupMove and does not call this hook. * @param {Player} this - no description * @param {CMoveData} mv - no description * @param {CUserCmd} cmd - no description * @returns {boolean} - Return true to prevent default action **/ StartMove(this: Player, mv: CMoveData, cmd: CUserCmd): boolean /** * * Called when the player spawns * * @name PlayerHooks:Spawn * @realm server * @wiki https://wiki.garrysmod.com/page/PLAYER/Spawn * @param {Player} this - no description * @returns {void} **/ Spawn(this: Player): void /** * * Setup the network table accessors. * * @name PlayerHooks:SetupDataTables * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/PLAYER/SetupDataTables * @param {Player} this - no description * @returns {void} **/ SetupDataTables(this: Player): void /** * * Called when we need to set player model from the class. * * @name PlayerHooks:SetModel * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/PLAYER/SetModel * @note This will only be called if you have not overridden @GamemodeHooks:PlayerSetModel or call this function from it or anywhere else using @player_manager.RunClass * @param {Player} this - no description * @returns {void} **/ SetModel(this: Player): void /** * * Called before the viewmodel is drawn * * @name PlayerHooks:PreDrawViewModel * @realm client * @wiki https://wiki.garrysmod.com/page/PLAYER/PreDrawViewModel * @param {Player} this - no description * @param {Entity} viewmodel - The viewmodel * @param {Entity} weapon - The weapon * @returns {void} **/ PreDrawViewModel(this: Player, viewmodel: Entity, weapon: Entity): void /** * * Called after the viewmodel has been drawn * * @name PlayerHooks:PostDrawViewModel * @realm client * @wiki https://wiki.garrysmod.com/page/PLAYER/PostDrawViewModel * @param {Player} this - no description * @param {Entity} viewmodel - The viewmodel * @param {Entity} weapon - The weapon * @returns {void} **/ PostDrawViewModel(this: Player, viewmodel: Entity, weapon: Entity): void /** * * Called from @GamemodeHooks:Move. * * @name PlayerHooks:Move * @realm client * @wiki https://wiki.garrysmod.com/page/PLAYER/Move * @note This hook is run after the @drive.Move has been called. * @warning This hook will not work if the current gamemode overrides @GamemodeHooks:Move and does not call this hook. * @param {Player} this - no description * @param {CMoveData} mv - Movement information * @returns {boolean} - Return true to prevent default action **/ Move(this: Player, mv: CMoveData): boolean /** * * Called on spawn to give the player their default loadout * * @name PlayerHooks:Loadout * @realm server * @wiki https://wiki.garrysmod.com/page/PLAYER/Loadout * @param {Player} this - no description * @returns {void} **/ Loadout(this: Player): void /** * * Called when the class object is created * * @name PlayerHooks:Init * @realm client, server * @wiki https://wiki.garrysmod.com/page/PLAYER/Init * @param {Player} this - no description * @returns {void} **/ Init(this: Player): void /** * * Called on player spawn to determine which hand model to use * * @name PlayerHooks:GetHandsModel * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PLAYER/GetHandsModel * @param {Player} this - no description * @returns {table} - A table containing info about view model hands model to be set. See examples. **/ GetHandsModel(this: Player): table /** * * Called from @GamemodeHooks:FinishMove. * * @name PlayerHooks:FinishMove * @realm client * @wiki https://wiki.garrysmod.com/page/PLAYER/FinishMove * @note This hook is run after the @drive.FinishMove has been called. * @warning This hook will not work if the current gamemode overrides @GamemodeHooks:FinishMove and does not call this hook. * @param {Player} this - no description * @param {CMoveData} mv - no description * @returns {boolean} - Return true to prevent default action **/ FinishMove(this: Player, mv: CMoveData): boolean } declare interface PhysObj { /** * * Rotate a vector from the world frame to the local frame of the physics object. * * @name PhysObj:WorldToLocalVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/WorldToLocalVector * @note This function only rotates the vector, without any translation operation. * @param {PhysObj} this - no description * @param {Vector} WorldVec - A vector in the world frame * @returns {Vector} - The corresponding vector relative to the PhysObj **/ WorldToLocalVector(this: PhysObj, WorldVec: Vector): Vector /** * * Converts a vector to a relative to the physics object coordinate system. * * @name PhysObj:WorldToLocal * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/WorldToLocal * @param {PhysObj} this - no description * @param {Vector} vec - The vector in world space coordinates. * @returns {Vector} - The vector local to @PhysObj:GetPos. **/ WorldToLocal(this: PhysObj, vec: Vector): Vector /** * * Wakes the physics object. * See @PhysObj:Sleep for more information. * * @name PhysObj:Wake * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/Wake * @param {PhysObj} this - no description * @returns {void} **/ Wake(this: PhysObj): void /** * * Unlike @PhysObj:SetPos and @PhysObj:SetAngles, this allows the movement of a physobj while leaving physics interactions intact. * This is used internally by the motion controller of the Gravity Gun , the +use pickup and the Physics Gun, and entities such as the crane. * * @name PhysObj:UpdateShadow * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/UpdateShadow * @note This is the ideal function to move a physics shadow created with @EntityFuncs:PhysicsInitShadow or @EntityFuncs:MakePhysicsObjectAShadow. * @param {PhysObj} this - no description * @param {Vector} targetPosition - The position we should move to. * @param {Angle} targetAngles - The angle we should rotate towards. * @param {number} frameTime - The frame time to use for this movement, can be generally filled with @FrameTime function or @EntityHooks:PhysicsSimulate with the deltaTime. * Can be set to 0 when you need to update the physics object just once. * @returns {void} **/ UpdateShadow(this: PhysObj, targetPosition: Vector, targetAngles: Angle, frameTime: number): void /** * * Makes the physics object "sleep". * The physics object will no longer be moving unless it is "woken up" by either a collision with another moving object, or by @PhysObj:Wake. This is an optimization feature of the physics engine. * * @name PhysObj:Sleep * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/Sleep * @param {PhysObj} this - no description * @returns {void} **/ Sleep(this: PhysObj): void /** * * Sets the velocity of the physics object. * * @name PhysObj:SetVelocityInstantaneous * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetVelocityInstantaneous * @param {PhysObj} this - no description * @param {Vector} velocity - The new velocity of the physics object. * @returns {void} **/ SetVelocityInstantaneous(this: PhysObj, velocity: Vector): void /** * * Sets the velocity of the physics object for the next iteration. * * @name PhysObj:SetVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetVelocity * @param {PhysObj} this - no description * @param {Vector} velocity - The new velocity of the physics object. * @returns {void} **/ SetVelocity(this: PhysObj, velocity: Vector): void /** * * Sets the position of the physobject. * * @name PhysObj:SetPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetPos * @param {PhysObj} this - no description * @param {Vector} position - The new position of the physobject. * @param {boolean} teleport - no description * @returns {void} **/ SetPos(this: PhysObj, position: Vector, teleport?: boolean): void /** * * Sets the material of the physobject. * * @name PhysObj:SetMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetMaterial * @note Impact sounds will only change if this is called on client * @param {PhysObj} this - no description * @param {string} materialName - The name of the phys material to use. From this list: [Valve Developer](https://developer.valvesoftware.com/wiki/Material_surface_properties) * @returns {void} **/ SetMaterial(this: PhysObj, materialName: string): void /** * * Sets the directional inertia. * * @name PhysObj:SetInertia * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetInertia * @param {PhysObj} this - no description * @param {Vector} directionalInertia - The directional inertia of the object. * A value of Vector(0,0,0) makes the physobject go invalid. * @returns {void} **/ SetInertia(this: PhysObj, directionalInertia: Vector): void /** * * Modifies how much drag (air resistance) affects the object. * * @name PhysObj:SetDragCoefficient * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetDragCoefficient * @param {PhysObj} this - no description * @param {number} drag - The drag coefficient * It can be positive or negative. * @returns {void} **/ SetDragCoefficient(this: PhysObj, drag: number): void /** * * Sets the mass of the physics object. * * @name PhysObj:SetMass * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetMass * @param {PhysObj} this - no description * @param {number} mass - The mass in kilograms. * @returns {void} **/ SetMass(this: PhysObj, mass: number): void /** * * Sets the linear and angular damping of the physics object. * * @name PhysObj:SetDamping * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetDamping * @param {PhysObj} this - no description * @param {number} linearDamping - Linear damping. * @param {number} angularDamping - Angular damping. * @returns {void} **/ SetDamping(this: PhysObj, linearDamping: number, angularDamping: number): void /** * * Sets the contents flag of the @PhysObj type. * * @name PhysObj:SetContents * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetContents * @param {PhysObj} this - no description * @param {CONTENTS} contents - The @CONTENTS enum. * @returns {void} **/ SetContents(this: PhysObj, contents: CONTENTS): void /** * * Sets the buoyancy ratio of the physics object. (How well it floats in water) * * @name PhysObj:SetBuoyancyRatio * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetBuoyancyRatio * @param {PhysObj} this - no description * @param {number} buoyancy - Buoyancy ratio, where 0 is not buoyant at all (like a rock), and 1 is very buoyant (like wood) * @returns {void} **/ SetBuoyancyRatio(this: PhysObj, buoyancy: number): void /** * * Sets the angles of the physobject. * * @name PhysObj:SetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetAngles * @param {PhysObj} this - no description * @param {Angle} angles - The new angles of the physobject. * @returns {void} **/ SetAngles(this: PhysObj, angles: Angle): void /** * * A convinience function for @AngleFuncs:RotateAroundAxis. * * @name PhysObj:RotateAroundAxis * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/RotateAroundAxis * @param {PhysObj} this - no description * @param {Vector} dir - Direction, around which we will rotate * @param {number} ang - Amount of rotation, in degrees * @returns {Angle} - The resulting angle **/ RotateAroundAxis(this: PhysObj, dir: Vector, ang: number): Angle /** * * Sets the amount of [drag](https://en.wikipedia.org/wiki/Drag_(physics)) to apply to a physics object when attempting to rotate. * * @name PhysObj:SetAngleDragCoefficient * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/SetAngleDragCoefficient * @param {PhysObj} this - no description * @param {number} coefficient - [Drag coefficient](https://en.wikipedia.org/wiki/Drag_coefficient). The bigger this value is, the slower the angles will change. * @returns {void} **/ SetAngleDragCoefficient(this: PhysObj, coefficient: number): void /** * * Call this when the collision filter conditions change due to this object's state (e.g. changing solid type or collision group) * * @name PhysObj:RecheckCollisionFilter * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/RecheckCollisionFilter * @param {PhysObj} this - no description * @returns {void} **/ RecheckCollisionFilter(this: PhysObj): void /** * * Prints debug info about the state of the physics object to the console. * * @name PhysObj:OutputDebugInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/OutputDebugInfo * @param {PhysObj} this - no description * @returns {void} **/ OutputDebugInfo(this: PhysObj): void /** * * Rotate a vector from the local frame of the physics object to world frame. * * @name PhysObj:LocalToWorldVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/LocalToWorldVector * @note This function only rotates the vector, without any translation operation. * @param {PhysObj} this - no description * @param {Vector} LocalVec - A vector in the physics object's local frame * @returns {Vector} - The corresponding vector in world frame **/ LocalToWorldVector(this: PhysObj, LocalVec: Vector): Vector /** * * Mapping a vector in local frame of the physics object to world frame. * * @name PhysObj:LocalToWorld * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/LocalToWorld * @note this function does translation and rotation, with translation done first. * @param {PhysObj} this - no description * @param {Vector} LocalVec - A vector in the physics object's local frame * @returns {Vector} - The corresponding vector in world frame **/ LocalToWorld(this: PhysObj, LocalVec: Vector): Vector /** * * Returns if the physics object is valid/not NULL. * * @name PhysObj:IsValid * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsValid * @param {PhysObj} this - no description * @returns {boolean} - isValid **/ IsValid(this: PhysObj): boolean /** * * Returns whenever the physics object is penetrating another physics object. * This is internally implemented as PhysObj:HasGameFlag( FVPHYSICS_PENETRATING )``` and thus is only updated for non-static physics objects. * * @name PhysObj:IsPenetrating * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsPenetrating * @param {PhysObj} this - no description * @returns {boolean} - Whether the physics object is penetrating another object. **/ IsPenetrating(this: PhysObj): boolean /** * * Returns whenever the entity is able to move. * * @name PhysObj:IsMoveable * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsMoveable * @param {PhysObj} this - no description * @returns {boolean} - movable **/ IsMoveable(this: PhysObj): boolean /** * * Returns if the physics object can move itself (by velocity, acceleration) * * @name PhysObj:IsMotionEnabled * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsMotionEnabled * @param {PhysObj} this - no description * @returns {boolean} - motionEnabled **/ IsMotionEnabled(this: PhysObj): boolean /** * * Returns whenever the entity is affected by gravity. * * @name PhysObj:IsGravityEnabled * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsGravityEnabled * @param {PhysObj} this - no description * @returns {boolean} - gravitated **/ IsGravityEnabled(this: PhysObj): boolean /** * * Returns whenever the entity is affected by drag. * * @name PhysObj:IsDragEnabled * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsDragEnabled * @param {PhysObj} this - no description * @returns {boolean} - dragEnabled **/ IsDragEnabled(this: PhysObj): boolean /** * * Returns whenever the entity is able to collide or not. * * @name PhysObj:IsCollisionEnabled * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsCollisionEnabled * @param {PhysObj} this - no description * @returns {boolean} - isCollisionEnabled **/ IsCollisionEnabled(this: PhysObj): boolean /** * * Returns whether the physics object is "sleeping". * See @PhysObj:Sleep for more information. * * @name PhysObj:IsAsleep * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/IsAsleep * @param {PhysObj} this - no description * @returns {boolean} - Whether the physics object is sleeping. **/ IsAsleep(this: PhysObj): boolean /** * * Returns whenever the specified flag(s) is/are set. * * @name PhysObj:HasGameFlag * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/HasGameFlag * @param {PhysObj} this - no description * @param {FVPHYSICS} flags - Bitflag, see @FVPHYSICS enum. * @returns {boolean} - If flag was set or not **/ HasGameFlag(this: PhysObj, flags: FVPHYSICS): boolean /** * * Returns the volume in source units³. Or nil if the PhysObj is a generated sphere or box. * * @name PhysObj:GetVolume * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetVolume * @param {PhysObj} this - no description * @returns {number} - The volume or nil if the PhysObj is a generated sphere or box. **/ GetVolume(this: PhysObj): number /** * * Returns the world velocity of a point in world coordinates about the object. * * @name PhysObj:GetVelocityAtPoint * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetVelocityAtPoint * @param {PhysObj} this - no description * @param {Vector} point - no description * @returns {Vector} - no description **/ GetVelocityAtPoint(this: PhysObj, point: Vector): Vector /** * * Returns the absolute directional velocity of the physobject. * * @name PhysObj:GetVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetVelocity * @param {PhysObj} this - no description * @returns {Vector} - velocity **/ GetVelocity(this: PhysObj): Vector /** * * Returns the surface area of the physics object in source-units². Or nil if the PhysObj is a generated sphere or box. * * @name PhysObj:GetSurfaceArea * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetSurfaceArea * @param {PhysObj} this - no description * @returns {number} - The surface area or nil if the PhysObj is a generated sphere or box. **/ GetSurfaceArea(this: PhysObj): number /** * * Returns the stress of the entity. * * @name PhysObj:GetStress * @realm server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetStress * @param {PhysObj} this - no description * @returns {number} - exertedStress **/ GetStress(this: PhysObj): number /** * * Returns the speed damping of the physics object. * * @name PhysObj:GetSpeedDamping * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetSpeedDamping * @param {PhysObj} this - no description * @returns {number} - speedDamping **/ GetSpeedDamping(this: PhysObj): number /** * * Returns the position of the @PhysObj type shadow. See @PhysObj:UpdateShadow. * * @name PhysObj:GetShadowPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetShadowPos * @param {PhysObj} this - no description * @returns {PhysObj} - The position of the @PhysObj type shadow. **/ GetShadowPos(this: PhysObj): PhysObj /** * * Returns the angles of the @PhysObj type shadow. See @PhysObj:UpdateShadow. * * @name PhysObj:GetShadowAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetShadowAngles * @param {PhysObj} this - no description * @returns {PhysObj} - The angles of the @PhysObj type shadow. **/ GetShadowAngles(this: PhysObj): PhysObj /** * * Returns the rotation damping of the physics object. * * @name PhysObj:GetRotDamping * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetRotDamping * @param {PhysObj} this - no description * @returns {number} - The rotation damping **/ GetRotDamping(this: PhysObj): number /** * * Returns the position and angle of the physics object as a 3x4 matrix (@VMatrix type is 4x4 so the fourth row goes unused). The first three columns store the angle as a [rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix), and the fourth column stores the position vector. * * @name PhysObj:GetPositionMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetPositionMatrix * @param {PhysObj} this - no description * @returns {VMatrix} - The position and angle matrix. **/ GetPositionMatrix(this: PhysObj): VMatrix /** * * Returns the position of the physics object. * * @name PhysObj:GetPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetPos * @param {PhysObj} this - no description * @returns {Vector} - The position **/ GetPos(this: PhysObj): Vector /** * * Returns the name of the physics object. * * @name PhysObj:GetName * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetName * @param {PhysObj} this - no description * @returns {string} - The name of the physics object. **/ GetName(this: PhysObj): string /** * * Returns all convex physics meshes of the object. See @EntityFuncs.PhysicsInitMultiConvex for more information. * * @name PhysObj:GetMeshConvexes * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetMeshConvexes * @param {PhysObj} this - no description * @returns {MeshVertex[]} - Table of @MeshVertex structures where each @MeshVertex structure is an independent convex mesh and each three vertices represent a triangle. Returns nil if the physics object is a sphere. **/ GetMeshConvexes(this: PhysObj): MeshVertex[] /** * * Returns the physics mesh of the object which is used for physobj-on-physobj collision. * * @name PhysObj:GetMesh * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetMesh * @param {PhysObj} this - no description * @returns {MeshVertex[]} - Table of @MeshVertex structures where each three vertices represent a triangle. Returns nil if the physics object is a sphere. **/ GetMesh(this: PhysObj): MeshVertex[] /** * * Returns the physical material of the physics object. * * @name PhysObj:GetMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetMaterial * @param {PhysObj} this - no description * @returns {string} - The physical material **/ GetMaterial(this: PhysObj): string /** * * Returns the center of mass of the physics object as a local vector. * * @name PhysObj:GetMassCenter * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetMassCenter * @param {PhysObj} this - no description * @returns {Vector} - The center of mass of the physics object. **/ GetMassCenter(this: PhysObj): Vector /** * * Returns the mass of the physics object. * * @name PhysObj:GetMass * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetMass * @param {PhysObj} this - no description * @returns {number} - The mass in kilograms. **/ GetMass(this: PhysObj): number /** * * Returns 1 divided by the inertia. * * @name PhysObj:GetInvInertia * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetInvInertia * @param {PhysObj} this - no description * @returns {number} - The inverted inertia **/ GetInvInertia(this: PhysObj): number /** * * Returns 1 divided by the physics object's mass. * * @name PhysObj:GetInvMass * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetInvMass * @param {PhysObj} this - no description * @returns {number} - The inverted mass. **/ GetInvMass(this: PhysObj): number /** * * Returns the directional inertia of the physics object. * * @name PhysObj:GetInertia * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetInertia * @param {PhysObj} this - no description * @returns {Vector} - directionalInertia **/ GetInertia(this: PhysObj): Vector /** * * Returns the linear and angular damping of the physics object. * * @name PhysObj:GetDamping * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetDamping * @param {PhysObj} this - no description * @returns {number} - The linear damping * @returns {number} - The angular damping * @tupleReturn **/ GetDamping(this: PhysObj): [number, number] /** * * Returns the parent entity of the physics object. * * @name PhysObj:GetEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetEntity * @param {PhysObj} this - no description * @returns {Entity} - parent **/ GetEntity(this: PhysObj): Entity /** * * Returns the kinetic energy of the physobject. * * @name PhysObj:GetEnergy * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetEnergy * @param {PhysObj} this - no description * @returns {number} - The kinetic energy **/ GetEnergy(this: PhysObj): number /** * * Returns the contents flag of the @PhysObj type. * * @name PhysObj:GetContents * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetContents * @param {PhysObj} this - no description * @returns {CONTENTS} - The @CONTENTS enum. **/ GetContents(this: PhysObj): CONTENTS /** * * Gets the angular velocity of the object in degrees per second. * * @name PhysObj:GetAngleVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetAngleVelocity * @param {PhysObj} this - no description * @returns {Vector} - The angular velocity **/ GetAngleVelocity(this: PhysObj): Vector /** * * Returns the angles of the physics object. * * @name PhysObj:GetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetAngles * @param {PhysObj} this - no description * @returns {Angle} - The angles of the physics object. **/ GetAngles(this: PhysObj): Angle /** * * Returns the mins and max of the physics object. * * @name PhysObj:GetAABB * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/GetAABB * @param {PhysObj} this - no description * @returns {Vector} - Mins * @returns {Vector} - Maxs * @tupleReturn **/ GetAABB(this: PhysObj): [Vector, Vector] /** * * Sets whenever the physics object should be affected by drag. * * @name PhysObj:EnableDrag * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/EnableDrag * @param {PhysObj} this - no description * @param {boolean} enable - True to enable, false to disable. * @returns {void} **/ EnableDrag(this: PhysObj, enable: boolean): void /** * * Sets whether the PhysObject should be affected by gravity * * @name PhysObj:EnableGravity * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/EnableGravity * @param {PhysObj} this - no description * @param {boolean} enable - True to enable, false to disable. * @returns {void} **/ EnableGravity(this: PhysObj, enable: boolean): void /** * * Sets whether the physobject should be able to move or not. * This is the exact method the Physics Gun uses to freeze props. If a motion-disabled physics object is grabbed with the physics gun, the object will be able to move again. To disallow this, use @GamemodeHooks:PhysgunPickup. * * @name PhysObj:EnableMotion * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/EnableMotion * @param {PhysObj} this - no description * @param {boolean} enable - True to enable, false to disable. * @returns {void} **/ EnableMotion(this: PhysObj, enable: boolean): void /** * * Sets whether the physics object should collide with anything or not, including world. * * @name PhysObj:EnableCollisions * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/EnableCollisions * @warning This function currently has major problems with player collisions, and as such should be avoided at all costs.A better alternative to this function would be using @EntityFuncs:SetCollisionGroup( COLLISION_GROUP_WORLD ). * @param {PhysObj} this - no description * @param {boolean} enable - True to enable, false to disable. * @returns {void} **/ EnableCollisions(this: PhysObj, enable: boolean): void /** * * Allows you to move a PhysObj to a point and angle in 3D space. * * @name PhysObj:ComputeShadowControl * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/ComputeShadowControl * @param {PhysObj} this - no description * @param {table} shadowparams - The parameters for the shadow. See example code to see how its used. * @returns {void} **/ ComputeShadowControl(this: PhysObj, shadowparams: table): void /** * * Calculates the linear and angular velocities on the center of mass for an offset force impulse. The outputs can be directly passed to @PhysObj:AddVelocity and @PhysObj:AddAngleVelocity, respectively. * * @name PhysObj:CalculateVelocityOffset * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/CalculateVelocityOffset * @param {PhysObj} this - no description * @param {Vector} force - The initial force * @param {Vector} pos - The location of the force in world coordinates * @returns {Vector} - The calculated linear velocity from the force on the physics object's center of mass * @returns {Vector} - The calculated angular velocity from the force on the physics object's center of mass * @tupleReturn **/ CalculateVelocityOffset(this: PhysObj, force: Vector, pos: Vector): [Vector, Vector] /** * * Removes one of more specified flags. * * @name PhysObj:ClearGameFlag * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/ClearGameFlag * @param {PhysObj} this - no description * @param {FVPHYSICS} flags - Bitflag, see @FVPHYSICS enum. * @returns {void} **/ ClearGameFlag(this: PhysObj, flags: FVPHYSICS): void /** * * Calculates the force and torque on the center of mass for an offset force impulse. The outputs can be directly passed to @PhysObj:ApplyForceCenter and @PhysObj:ApplyTorqueCenter, respectively. * * @name PhysObj:CalculateForceOffset * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/CalculateForceOffset * @param {PhysObj} this - no description * @param {Vector} force - The initial force * @param {Vector} pos - The location of the force in world coordinates * @returns {Vector} - The calculated force on the physics object's center of mass * @returns {Vector} - The calculated torque on the physics object's center of mass * @tupleReturn **/ CalculateForceOffset(this: PhysObj, force: Vector, pos: Vector): [Vector, Vector] /** * * Applies specified torque to the physics object. * * @name PhysObj:ApplyTorqueCenter * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/ApplyTorqueCenter * @param {PhysObj} this - no description * @param {Vector} torque - The torque to be applied in kg * degrees / s. * @returns {void} **/ ApplyTorqueCenter(this: PhysObj, torque: Vector): void /** * * Applies the specified force on the physics object at the specified position * * @name PhysObj:ApplyForceOffset * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/ApplyForceOffset * @param {PhysObj} this - no description * @param {Vector} force - The force to be applied. * @param {Vector} position - The position in world coordinates where the force is applied to the physics object. * @returns {void} **/ ApplyForceOffset(this: PhysObj, force: Vector, position: Vector): void /** * * Applies the specified force to the physics object. (in Newtons) * * @name PhysObj:ApplyForceCenter * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/ApplyForceCenter * @note This will not work on players, use @EntityFuncs:SetVelocity instead. * @note -9.80665 (meters / second^2) Is the approximate acceleration of objects on Earth due to gravity. (It is negative because gravity pushes things downwards.) * @param {PhysObj} this - no description * @param {Vector} force - The force to be applied. * @returns {void} **/ ApplyForceCenter(this: PhysObj, force: Vector): void /** * * Rotates the object so that it's angles are aligned to the ones inputted. * * @name PhysObj:AlignAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/AlignAngles * @param {PhysObj} this - no description * @param {Angle} from - no description * @param {Angle} to - no description * @returns {Angle} - no description **/ AlignAngles(this: PhysObj, from: Angle, to: Angle): Angle /** * * Adds the specified velocity to the current. * * @name PhysObj:AddVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/AddVelocity * @param {PhysObj} this - no description * @param {Vector} velocity - Additional velocity. * @returns {void} **/ AddVelocity(this: PhysObj, velocity: Vector): void /** * * Adds one or more bit flags. * * @name PhysObj:AddGameFlag * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/AddGameFlag * @param {PhysObj} this - no description * @param {FVPHYSICS} flags - Bitflag, see @FVPHYSICS enum. * @returns {void} **/ AddGameFlag(this: PhysObj, flags: FVPHYSICS): void /** * * Adds the specified velocity to the current. * * @name PhysObj:AddAngleVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysObj/AddAngleVelocity * @param {PhysObj} this - no description * @param {Vector} angularVelocity - Additional velocity. * @returns {void} **/ AddAngleVelocity(this: PhysObj, angularVelocity: Vector): void } declare interface PhysCollide { /** * * Performs a trace against this PhysCollide with the given parameters. This can be used for both line traces and box traces. * * @name PhysCollide:TraceBox * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysCollide/TraceBox * @param {PhysCollide} this - no description * @param {Vector} origin - The origin for the PhysCollide during the trace * @param {Angle} angles - The angles for the PhysCollide during the trace * @param {Vector} rayStart - The start position of the trace * @param {Vector} rayEnd - The end position of the trace * @param {Vector} rayMins - The mins of the trace's bounds * @param {Vector} rayMaxs - The maxs of the trace's bounds * @returns {Vector} - Hit position of the trace. This is false if the trace did not hit. * @returns {Vector} - Hit normal of the trace * @returns {number} - Fraction of the trace. This is calculated from the distance between startPos, hitPos, and endPos. * @tupleReturn **/ TraceBox(this: PhysCollide, origin: Vector, angles: Angle, rayStart: Vector, rayEnd: Vector, rayMins: Vector, rayMaxs: Vector): [Vector, Vector, number] /** * * Destroys the @PhysCollide type object. * * @name PhysCollide:Destroy * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysCollide/Destroy * @param {PhysCollide} this - no description * @returns {void} **/ Destroy(this: PhysCollide): void /** * * Checks whether this @PhysCollide type object is valid or not. * You should just use @IsValid function instead. * * @name PhysCollide:IsValid * @realm client, server * @wiki https://wiki.garrysmod.com/page/PhysCollide/IsValid * @param {PhysCollide} this - no description * @returns {boolean} - Is valid or not. **/ IsValid(this: PhysCollide): boolean } declare interface Panel { /** * * Forcibly updates the panels' HTML Material, similar to when Paint is called on it.This is only useful if the panel is not normally visible, i.e the panel exists purely for its HTML Material. * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML)[Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:UpdateHTMLTexture * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/UpdateHTMLTexture * @note Only works on with panels that have a HTML Material. See @Panel:GetHTMLMaterial for more details. * @note A good place to call this is in the @GamemodeHooks:PreRender hook * @param {Panel} this - no description * @returns {void} **/ UpdateHTMLTexture(this: Panel): void /** * * Returns if a given panel is valid or not. * * @name Panel:Valid * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Valid * @param {Panel} this - no description * @returns {boolean} - Whether the panel is valid or not, true being it is, false being it isn't. **/ Valid(this: Panel): boolean /** * * Recursively deselects this panel object and all of its children. This will cascade to all child objects at every level below the parent. * * @name Panel:UnselectAll * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/UnselectAll * @param {Panel} this - no description * @returns {void} **/ UnselectAll(this: Panel): void /** * * Restores the last saved state (caret position and the text inside) of a @TextEntry type. Should act identically to pressing CTRL+Z in a @TextEntry type. * See also @Panel:SaveUndoState. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:Undo * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Undo * @param {Panel} this - no description * @returns {void} **/ Undo(this: Panel): void /** * * Toggles the selected state of a selectable panel object. This functionality is set with @Panel:SetSelectable and checked with @Panel:IsSelectable. To check whether the object is selected or not, @Panel:IsSelected is used. * * @name Panel:ToggleSelection * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ToggleSelection * @param {Panel} this - no description * @returns {void} **/ ToggleSelection(this: Panel): void /** * * Toggles the visibility of a panel and all its children. * * @name Panel:ToggleVisible * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ToggleVisible * @param {Panel} this - no description * @returns {void} **/ ToggleVisible(this: Panel): void /** * * Sets the dimensions of the panel to fill its parent. It will only stretch in directions that aren't nil. * * @name Panel:StretchToParent * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/StretchToParent * @param {Panel} this - no description * @param {number} offsetLeft - The left offset to the parent. * @param {number} offsetTop - The top offset to the parent. * @param {number} offsetRight - The right offset to the parent. * @param {number} offsetBottom - The bottom offset to the parent. * @returns {void} **/ StretchToParent(this: Panel, offsetLeft: number, offsetTop: number, offsetRight: number, offsetBottom: number): void /** * * Resizes the panel object's width so that its right edge is aligned with the left of the passed panel. An offset greater than zero will reduce the panel's width to leave a gap between it and the passed panel. * * @name Panel:StretchRightTo * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/StretchRightTo * @param {Panel} this - no description * @param {Panel} tgtPanel - The panel to align the right edge of this one with. * @param {number} offset - The gap to leave between this and the passed panel. Negative values will cause the panel's width to increase, forming an overlap. * @returns {void} **/ StretchRightTo(this: Panel, tgtPanel: Panel, offset?: number): void /** * * Resizes the panel object's height so that its bottom is aligned with the top of the passed panel. An offset greater than zero will reduce the panel's height to leave a gap between it and the passed panel. * * @name Panel:StretchBottomTo * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/StretchBottomTo * @param {Panel} this - no description * @param {Panel} tgtPanel - The panel to align the bottom of this one with. * @param {number} offset - The gap to leave between this and the passed panel. Negative values will cause the panel's height to increase, forming an overlap. * @returns {void} **/ StretchBottomTo(this: Panel, tgtPanel: Panel, offset?: number): void /** * * Stops all panel animations by clearing its animation list. This also clears all delayed animations. * * @name Panel:Stop * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Stop * @param {Panel} this - no description * @returns {void} **/ Stop(this: Panel): void /** * * Begins a box selection, enables mouse capture for the panel object, and sets the start point of the selection box to the mouse cursor's position, relative to this object. For this to work, either the object or its parent must be enabled as a selection canvas. This is set using @Panel:SetSelectionCanvas. * * @name Panel:StartBoxSelection * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/StartBoxSelection * @param {Panel} this - no description * @returns {void} **/ StartBoxSelection(this: Panel): void /** * * Slides the panel out to the top. * * @name Panel:SlideUp * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SlideUp * @param {Panel} this - no description * @param {number} Length - Time to complete the animation. * @returns {void} **/ SlideUp(this: Panel, Length: number): void /** * * Resizes the panel object's height to accommodate all child objects/contents. * Only works on @Label type derived panels such as @DLabel type by default, and on any panel that manually implemented @Panel:GetContentSize method. * * @name Panel:SizeToContentsY * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SizeToContentsY * @note You must call this function **AFTER** setting text/font or adjusting child panels. * @param {Panel} this - no description * @param {number} addVal - The number of extra pixels to add to the height. * @returns {void} **/ SizeToContentsY(this: Panel, addVal?: number): void /** * * Slides the panel in from above. * * @name Panel:SlideDown * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SlideDown * @param {Panel} this - no description * @param {number} Length - Time to complete the animation. * @returns {void} **/ SlideDown(this: Panel, Length: number): void /** * * Resizes the panel object's width to accommodate all child objects/contents. * Only works on @Label type derived panels such as @DLabel type by default, and on any panel that manually implemented @Panel:GetContentSize method. * * @name Panel:SizeToContentsX * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SizeToContentsX * @note You must call this function **AFTER** setting text/font or adjusting child panels. * @param {Panel} this - no description * @param {number} addVal - The number of extra pixels to add to the width. Can be a negative number, to reduce the width. * @returns {void} **/ SizeToContentsX(this: Panel, addVal?: number): void /** * * Resizes the panel so that its width and height fit all of the content inside. * [Category:DImage](https://wiki.garrysmod.com/page/Category:DImage) * [Category:DImageButton](https://wiki.garrysmod.com/page/Category:DImageButton) * [Category:DNumberWang](https://wiki.garrysmod.com/page/Category:DNumberWang) * [Category:DListView](https://wiki.garrysmod.com/page/Category:DListView) * * @name Panel:SizeToContents * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SizeToContents * @note Only works on @Label type derived panels such as @DLabel type by default, and on any panel that manually implemented the @Panel:SizeToContents method, such as @DNumberWang type and @DImage type. * @warning You must call this function **AFTER** setting text/font, adjusting child panels or otherwise altering the panel. * @param {Panel} this - no description * @returns {void} **/ SizeToContents(this: Panel): void /** * * Resizes the panel to fit the bounds of its children. * * @name Panel:SizeToChildren * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SizeToChildren * @note Your panel must have its layout updated (@Panel:InvalidateLayout) for this function to work properly. * @note The sizeW and sizeH parameters are false by default. Therefore, calling this function with no arguments will result in a no-op. * @param {Panel} this - no description * @param {boolean} sizeW - Resize with width of the panel. * @param {boolean} sizeH - Resize the height of the panel. * @returns {void} **/ SizeToChildren(this: Panel, sizeW?: boolean, sizeH?: boolean): void /** * * Uses animation to resize the panel to the specified size. * * @name Panel:SizeTo * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SizeTo * @param {Panel} this - no description * @param {number} sizeW - The target width of the panel. Use -1 to retain the current width. * @param {number} sizeH - The target height of the panel. Use -1 to retain the current height. * @param {number} time - The time to perform the animation within. * @param {number} delay - The delay before the animation starts. * @param {number} ease - Easing of the start and/or end speed of the animation. See @Panel:NewAnimation for how this works. * @param {function} callback - The function to be called once the animation finishes. Arguments are: * @returns {void} **/ SizeTo(this: Panel, sizeW?: number, sizeH?: number, time: number, delay?: number, ease?: number, callback: PanelSizeToCallback): void /** * * Makes a panel visible. * * @name Panel:Show * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Show * @param {Panel} this - no description * @returns {void} **/ Show(this: Panel): void /** * * Sets the panels z position which determines the rendering order. * Panels with lower z positions appear behind panels with higher z positions. * This also controls in which order panels docked with @Panel:Dock appears. * * @name Panel:SetZPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetZPos * @param {Panel} this - no description * @param {number} zIndex - The z position of the panel. * Can't be lower than -32768 or higher than 32767. * @returns {void} **/ SetZPos(this: Panel, zIndex: number): void /** * * Sets whether text wrapping should be enabled or disabled on @Label type and @DLabel type panels. * Use @DLabel:SetAutoStretchVertical to automatically correct vertical size; @Panel:SizeToContents will not set the correct height. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * [Category:DLabel](https://wiki.garrysmod.com/page/Category:DLabel) * * @name Panel:SetWrap * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetWrap * @param {Panel} this - no description * @param {boolean} wrap - True to enable text wrapping, false otherwise. * @returns {void} **/ SetWrap(this: Panel, wrap: boolean): void /** * * This makes it so that when you're hovering over this panel you can `click` on the world. Your viewmodel will aim etc. This is primarily used for the Sandbox context menu. * * @name Panel:SetWorldClicker * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetWorldClicker * @bug #3467 This function doesn't scale with custom FOV specified by @GamemodeHooks:CalcView or @WeaponHooks:TranslateFOV. * @param {Panel} this - no description * @param {boolean} enabled - no description * @returns {void} **/ SetWorldClicker(this: Panel, enabled: boolean): void /** * * Sets the width of the panel. * Calls @PanelHooks:OnSizeChanged and marks this panel for layout (@Panel:InvalidateLayout). * See also @Panel:SetSize. * * @name Panel:SetWidth * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetWidth * @param {Panel} this - no description * @param {number} width - The new width of the panel. * @returns {void} **/ SetWidth(this: Panel, width: number): void /** * * Sets width of a panel. An alias of @Panel:SetWidth. * * @name Panel:SetWide * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetWide * @param {Panel} this - no description * @param {number} width - Desired width to set * @returns {void} **/ SetWide(this: Panel, width: number): void /** * * Sets the visibility of the vertical scrollbar. * Works for @RichText type and @TextEntry type. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SetVerticalScrollbarEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetVerticalScrollbarEnabled * @param {Panel} this - no description * @param {boolean} display - True to display the vertical text scroll bar, false to hide it. * @returns {void} **/ SetVerticalScrollbarEnabled(this: Panel, display?: boolean): void /** * * [Category:DLabelURL](https://wiki.garrysmod.com/page/Category:DLabelURL)[Category:URLLabel](https://wiki.garrysmod.com/page/Category:URLLabel)Sets the URL of a link-based panel such as @DLabelURL type. * * @name Panel:SetURL * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetURL * @param {Panel} this - no description * @param {string} url - The URL to set. This **must** begin with *http://*. * @returns {void} **/ SetURL(this: Panel, url: string): void /** * * Sets the "visibility" of the panel. * * @name Panel:SetVisible * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetVisible * @param {Panel} this - no description * @param {boolean} visible - The visibility of the panel. * @returns {void} **/ SetVisible(this: Panel, visible: boolean): void /** * * Sets the panel to be displayed as a tooltip when a player hovers over the panel object with their cursor. Note that it will not override the default @DTooltip type panel. * * @name Panel:SetTooltipPanel * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetTooltipPanel * @note @Panel:SetTooltip will override this functionality. * @warning Calling this from @PanelHooks:OnCursorEntered is too late! The tooltip will not be displayed or be updated. * @warning Given panel or the previously set one will NOT be automatically removed. * @param {Panel} this - no description * @param {Panel} tooltipPanel - The panel to use as the tooltip. * @returns {void} **/ SetTooltipPanel(this: Panel, tooltipPanel?: Panel): void /** * @name Panel:SetToolTipPanel * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetToolTipPanel * @param {Panel} this - no description * @returns {void} **/ SetToolTipPanel(this: Panel): void /** * * Sets the tooltip to be displayed when a player hovers over the panel object with their cursor. * * @name Panel:SetTooltip * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetTooltip * @param {Panel} this - no description * @param {string} str - The text to be displayed in the tooltip. Set false to disable it. * @returns {void} **/ SetTooltip(this: Panel, str: string): void /** * @name Panel:SetToolTip * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetToolTip * @param {Panel} this - no description * @returns {void} **/ SetToolTip(this: Panel): void /** * * Sets the height of a @RichText type element to accommodate the text inside. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:SetToFullHeight * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetToFullHeight * @note This function internally relies on @Panel:GetNumLines, so it should be called at least a couple frames after modifying the text using @Panel:AppendText * @param {Panel} this - no description * @returns {void} **/ SetToFullHeight(this: Panel): void /** * * Sets the left and top text margins of a text-based panel object, such as a @DButton type or @DLabel type. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * * @name Panel:SetTextInset * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetTextInset * @param {Panel} this - no description * @param {number} insetX - The left margin for the text, in pixels. This will only affect centered text if the margin is greater than its x-coordinate. * @param {number} insetY - The top margin for the text, in pixels. * @returns {void} **/ SetTextInset(this: Panel, insetX: number, insetY: number): void /** * * Sets the text value of a panel object containing text, such as a @Label type, @TextEntry type or @RichText type and their derivatives, such as @DLabel type, @DTextEntry type or @DButton type. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * [Category:DLabel](https://wiki.garrysmod.com/page/Category:DLabel) * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * [Category:DTree_Node](https://wiki.garrysmod.com/page/Category:DTree_Node) * * @name Panel:SetText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetText * @warning When used on a @Label type or its derivatives ( @DLabel type and @DButton type ), it will automatically call @Panel:InvalidateLayout, meaning that you should avoid running this function every frame on these panels to avoid unnecessary performance loss. * @param {Panel} this - no description * @param {string} text - The text value to set. * @returns {void} **/ SetText(this: Panel, text: string): void /** * * Removes the panel after given time in seconds. * * @name Panel:SetTerm * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetTerm * @note This function will not work if @PanelHooks:AnimationThink is overridden, unless @Panel:AnimationThinkInternal is called every frame. * @param {Panel} this - no description * @param {number} delay - Delay in seconds after which the panel should be removed. * @returns {void} **/ SetTerm(this: Panel, delay: number): void /** * * Sets height of a panel. An alias of @Panel:SetHeight. * * @name Panel:SetTall * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetTall * @param {Panel} this - no description * @param {number} height - Desired height to set * @returns {void} **/ SetTall(this: Panel, height: number): void /** * * When TAB is pressed, the next selectable panel in the number sequence is selected. * * @name Panel:SetTabPosition * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetTabPosition * @param {Panel} this - no description * @param {number} position - no description * @returns {void} **/ SetTabPosition(this: Panel, position: number): void /** * * Used by @AvatarImage type panels to load an avatar by its 64-bit Steam ID (community ID).[Category:AvatarImage](https://wiki.garrysmod.com/page/Category:AvatarImage) * * @name Panel:SetSteamID * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetSteamID * @param {Panel} this - no description * @param {string} steamid - The 64bit SteamID of the player to load avatar of * @param {number} size - The size of the avatar to use. Acceptable sizes are 32, 64, 184. * @returns {void} **/ SetSteamID(this: Panel, steamid: string, size: number): void /** * * [Category:ModelImage](https://wiki.garrysmod.com/page/Category:ModelImage)[Category:SpawnIcon](https://wiki.garrysmod.com/page/Category:SpawnIcon)Sets the .png image to be displayed on a @SpawnIcon type or the panel it is based on @ModelImage type. * Only .png images can be used with this function. * * @name Panel:SetSpawnIcon * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetSpawnIcon * @param {Panel} this - no description * @param {string} icon - A path to the .png material, for example one of the [Silkicons](https://wiki.garrysmod.com/page/Silkicons) shipped with the game. * @returns {void} **/ SetSpawnIcon(this: Panel, icon: string): void /** * * Sets the derma skin that the panel object will use, and refreshes all panels with @derma.RefreshSkins. * * @name Panel:SetSkin * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetSkin * @param {Panel} this - no description * @param {string} skinName - The name of the skin to use. The default derma skin is *Default*. * @returns {void} **/ SetSkin(this: Panel, skinName: string): void /** * * Sets the size of the panel. * Calls @PanelHooks:OnSizeChanged and marks this panel for layout (@Panel:InvalidateLayout). * See also @Panel:SetWidth and @Panel:SetHeight. * * @name Panel:SetSize * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetSize * @note If you wish to position and re-size panels without much guesswork and have them look good on different screen resolutions, you may find @Panel:Dock useful * @param {Panel} this - no description * @param {number} width - The width of the panel. * @param {number} height - The height of the panel. * @returns {void} **/ SetSize(this: Panel, width: number, height: number): void /** * * Enables the panel object for selection (much like the spawn menu). * * @name Panel:SetSelectionCanvas * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetSelectionCanvas * @param {Panel} this - no description * @param {any} selCanvas - Any value other than *nil* or *false* will enable the panel object for selection. It is recommended to pass *true*. * @returns {void} **/ SetSelectionCanvas(this: Panel, selCanvas: any): void /** * * Sets the selected state of a selectable panel object. This functionality is set with @Panel:SetSelectable and checked with @Panel:IsSelectable. * * @name Panel:SetSelected * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetSelected * @param {Panel} this - no description * @param {number | boolean} selected - Whether the object should be selected or deselected. @Panel:IsSelected can be used to determine the selected state of the object. * @returns {void} **/ SetSelected(this: Panel, selected?: number | boolean): void /** * * Sets whether the panel object can be selected or not (like icons in the Spawn Menu, holding @Shift key). If enabled, this will affect the function of a @DButton type whilst @Shift key is pressed. @Panel:SetSelected can be used to select/deselect the object. * * @name Panel:SetSelectable * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetSelectable * @param {Panel} this - no description * @param {boolean} selectable - Whether the panel object should be selectable or not. * @returns {void} **/ SetSelectable(this: Panel, selectable: boolean): void /** * * Sets whenever the panel should be rendered in the next screenshot. * * @name Panel:SetRenderInScreenshots * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetRenderInScreenshots * @param {Panel} this - no description * @param {boolean} renderInScreenshot - Whenever to render or not. * @returns {void} **/ SetRenderInScreenshots(this: Panel, renderInScreenshot: boolean): void /** * * Sets the position of the panel. * This will trigger @PanelHooks:PerformLayout. You should avoid calling this function in @PanelHooks:PerformLayout to avoid infinite loops. * * @name Panel:SetPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetPos * @note If you wish to position and re-size panels without much guesswork and have them look good on different screen resolutions, you may find @Panel:Dock useful * @param {Panel} this - no description * @param {number} posX - The x coordinate of the position. * @param {number} posY - The y coordinate of the position. * @returns {void} **/ SetPos(this: Panel, posX: number, posY: number): void /** * * If this panel object has been made a popup with @Panel:MakePopup, this method will prevent it from drawing in front of other panels when it receives input focus. * * @name Panel:SetPopupStayAtBack * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetPopupStayAtBack * @param {Panel} this - no description * @param {boolean} stayAtBack - If *true*, the popup panel will not draw in front of others when it gets focus, for example when it is clicked. * @returns {void} **/ SetPopupStayAtBack(this: Panel, stayAtBack: boolean): void /** * * Used by @AvatarImage type to load an avatar for given player.[Category:AvatarImage](https://wiki.garrysmod.com/page/Category:AvatarImage) * * @name Panel:SetPlayer * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetPlayer * @param {Panel} this - no description * @param {Player} player - The player to use avatar of. * @param {number} size - The size of the avatar to use. Acceptable sizes are 32, 64, 184. * @returns {void} **/ SetPlayer(this: Panel, player: Player, size: number): void /** * * Sets the parent of the panel. * * @name Panel:SetParent * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetParent * @param {Panel} this - no description * @param {Panel} parent - The new parent of the panel. * @returns {void} **/ SetParent(this: Panel, parent: Panel): void /** * * This function does nothing. * * @name Panel:SetPaintFunction * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetPaintFunction * @param {Panel} this - no description * @returns {void} **/ SetPaintFunction(this: Panel): void /** * * Enables or disables painting of the panel manually with @Panel:PaintManual. * * @name Panel:SetPaintedManually * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetPaintedManually * @param {Panel} this - no description * @param {boolean} paintedManually - True if the panel should be painted manually. * @returns {void} **/ SetPaintedManually(this: Panel, paintedManually: boolean): void /** * * Sets whenever all the default border of the panel should be drawn or not. * * @name Panel:SetPaintBorderEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetPaintBorderEnabled * @param {Panel} this - no description * @param {boolean} paintBorder - Whenever to draw the border or not. * @returns {void} **/ SetPaintBorderEnabled(this: Panel, paintBorder: boolean): void /** * * Sets whenever all the default background of the panel should be drawn or not. * * @name Panel:SetPaintBackgroundEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetPaintBackgroundEnabled * @param {Panel} this - no description * @param {boolean} paintBackground - Whenever to draw the background or not. * @returns {void} **/ SetPaintBackgroundEnabled(this: Panel, paintBackground: boolean): void /** * * Sets the internal name of the panel. * * @name Panel:SetName * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetName * @param {Panel | DForm} this - no description * @param {string} name - The new name of the panel. * @returns {void} **/ SetName(this: Panel | DForm, name: string): void /** * * Enables or disables the multi-line functionality of a text object, such as a @DTextEntry type. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SetMultiline * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetMultiline * @param {Panel} this - no description * @param {boolean} multiline - Whether to enable multiline or not. * @returns {void} **/ SetMultiline(this: Panel, multiline: boolean): void /** * * Enables or disables the mouse input for the panel. * * @name Panel:SetMouseInputEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetMouseInputEnabled * @param {Panel} this - no description * @param {boolean} mouseInput - Whenever to enable or disable mouse input. * @returns {void} **/ SetMouseInputEnabled(this: Panel, mouseInput: boolean): void /** * * [Category:ModelImage](https://wiki.garrysmod.com/page/Category:ModelImage)[Category:SpawnIcon](https://wiki.garrysmod.com/page/Category:SpawnIcon)Sets the model to be displayed by @SpawnIcon type. * * @name Panel:SetModel * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetModel * @note This must be called after setting size if you wish to use a different size spawnicon * @param {Panel} this - no description * @param {string} ModelPath - The path of the model to set * @param {number} skin - The skin to set * @param {string} bodygroups - The body groups to set. Each single-digit number in the string represents a separate bodygroup, **up to 9 in total**. * @returns {void} **/ SetModel(this: Panel, ModelPath: string, skin?: number, bodygroups?: string): void /** * * Sets the minimum dimensions of the panel or object. * You can restrict either or both values. * Calling the function without arguments will remove the minimum size. * * @name Panel:SetMinimumSize * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetMinimumSize * @param {Panel} this - no description * @param {number} minW - The minimum width of the object. * @param {number} minH - The minimum height of the object. * @returns {void} **/ SetMinimumSize(this: Panel, minW?: number, minH?: number): void /** * * Allows or disallows the panel to receive keyboard focus and input. This is recursively applied to all children. * * @name Panel:SetKeyboardInputEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetKeyboardInputEnabled * @param {Panel} this - no description * @param {boolean} enable - Whether keyboard input should be enabled for this panel. * @returns {void} **/ SetKeyboardInputEnabled(this: Panel, enable: boolean): void /** * * Enables or disables the keyboard input for the panel. * * @name Panel:SetKeyBoardInputEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetKeyBoardInputEnabled * @param {Panel} this - no description * @param {boolean} keyboardInput - Whether to enable or disable keyboard input. * @returns {void} **/ SetKeyBoardInputEnabled(this: Panel, keyboardInput: boolean): void /** * * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML)[Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium)Allows you to set HTML code within a panel. * * @name Panel:SetHTML * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetHTML * @param {Panel} this - no description * @param {string | Panel} HTML_code - The code to set. * @returns {void} **/ SetHTML(this: Panel, HTML_code: string | Panel): void /** * * Sets the height of the panel. * Calls @PanelHooks:OnSizeChanged and marks this panel for layout (@Panel:InvalidateLayout). * See also @Panel:SetSize. * * @name Panel:SetHeight * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetHeight * @param {Panel} this - no description * @param {number} height - The height to be set. * @returns {void} **/ SetHeight(this: Panel, height: number): void /** * * Sets the font used to render this panel's text. * To retrieve the font used by a panel, call @Panel:GetFont. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:SetFontInternal * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetFontInternal * @param {Panel} this - no description * @param {string} fontName - The name of the font. * See [here](https://wiki.garrysmod.com/page/Default_Fonts) for a list of existing fonts. * Alternatively, use @surface.CreateFont to create your own custom font. * @returns {void} **/ SetFontInternal(this: Panel, fontName: string): void /** * * Sets the panel that owns this FocusNavGroup to be the root in the focus traversal hierarchy. * [Category:EditablePanel](https://wiki.garrysmod.com/page/Category:EditablePanel) * * @name Panel:SetFocusTopLevel * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetFocusTopLevel * @param {Panel} this - no description * @param {boolean} state - no description * @returns {void} **/ SetFocusTopLevel(this: Panel, state: boolean): void /** * * Sets the foreground color of the panel. * For labels, this is the color of their text. * * @name Panel:SetFGColorEx * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetFGColorEx * @internal * @param {Panel} this - no description * @param {number} r - The red channel of the color. * @param {number} g - The green channel of the color. * @param {number} b - The blue channel of the color. * @param {number} a - The alpha channel of the color. * @returns {void} **/ SetFGColorEx(this: Panel, r: number, g: number, b: number, a: number): void /** * * Adds a shadow falling to the bottom right corner of the panel's text. This has no effect on panels that do not derive from Label. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * * @name Panel:SetExpensiveShadow * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetExpensiveShadow * @param {Panel} this - no description * @param {number} distance - The distance of the shadow from the panel. * @param {Color} Color - The color of the shadow. Uses the @IColor structure. * @returns {void} **/ SetExpensiveShadow(this: Panel, distance: number, Color: Color): void /** * * Sets the foreground color of a panel. * For a @Label type or @RichText type, this is the color of its text. * This function calls @Panel:SetFGColorEx internally. * * @name Panel:SetFGColor * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetFGColor * @note This doesn't apply to all VGUI elements (such as @DLabel type) and its function varies between them * @param {Panel} this - no description * @param {number | Color} r - The red channel of the color, or a @IColor structure. If you pass the latter, the following three arguments are ignored. * @param {number} g - The green channel of the color. * @param {number} b - The blue channel of the color. * @param {number} a - The alpha channel of the color. * @returns {void} **/ SetFGColor(this: Panel, r: number | Color, g?: number, b?: number, a?: number): void /** * * Sets the enabled state of a disable-able panel object, such as a @DButton type or @DTextEntry type. * See @Panel:IsEnabled for a function that retrieves the "enabled" state of a panel. * * @name Panel:SetEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetEnabled * @param {Panel} this - no description * @param {boolean} enable - Whether to enable or disable the panel object. * @returns {void} **/ SetEnabled(this: Panel, enable: boolean): void /** * * Sets the target area for dropping when an object is being dragged around this panel using the @dragndrop library. * This draws a target box of the specified size and position, until @Panel:DragHoverEnd is called. It uses @Panel:DrawDragHover to draw this area. * * @name Panel:SetDropTarget * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetDropTarget * @param {Panel} this - no description * @param {number} x - The x coordinate of the top-left corner of the drop area. * @param {number} y - The y coordinate of the top-left corner of the drop area. * @param {number} width - The width of the drop area. * @param {number} height - The height of the drop area. * @returns {void} **/ SetDropTarget(this: Panel, x: number, y: number, width: number, height: number): void /** * * Makes the panel render in front of all others, including the spawn menu and main menu. * Priority is given based on the last call, so of two panels that call this method, the second will draw in front of the first. * * @name Panel:SetDrawOnTop * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetDrawOnTop * @note This only makes the panel **draw** above other panels. If there's another panel that would have otherwise covered it, users will not be able to interact with it. * @param {Panel} this - no description * @param {boolean} drawOnTop - Whether or not to draw the panel in front of all others. * @returns {void} **/ SetDrawOnTop(this: Panel, drawOnTop?: boolean): void /** * * Sets where to draw the language selection box. * See @Panel:SetDrawLanguageID for a function that hides or shows the language selection box. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SetDrawLanguageIDAtLeft * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetDrawLanguageIDAtLeft * @param {Panel} this - no description * @param {boolean} left - true = left, false = right * @returns {void} **/ SetDrawLanguageIDAtLeft(this: Panel, left: boolean): void /** * * Sets the visibility of the language selection box in a TextEntry when typing in non-English mode. * See @Panel:SetDrawLanguageIDAtLeft for a function that changes the position of the language selection box. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SetDrawLanguageID * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetDrawLanguageID * @param {Panel} this - no description * @param {boolean} visible - true to make it visible, false to hide it. * @returns {void} **/ SetDrawLanguageID(this: Panel, visible: boolean): void /** * * Sets the drag parent. * Drag parent means that when we start to drag this panel, we'll really start dragging the defined parent. * * @name Panel:SetDragParent * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetDragParent * @param {Panel} this - no description * @param {Panel} parent - The panel to set as drag parent. * @returns {void} **/ SetDragParent(this: Panel, parent: Panel): void /** * * Sets the panel's cookie name. Calls @PanelHooks:LoadCookies if defined. * * @name Panel:SetCookieName * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetCookieName * @param {Panel} this - no description * @param {string} name - The panel's cookie name. Used as prefix for @Panel:SetCookie * @returns {void} **/ SetCookieName(this: Panel, name: string): void /** * * Sets the appearance of the cursor. * * @name Panel:SetCursor * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetCursor * @param {Panel} this - no description * @param {string} cursor - The cursor to be set. Can be one of the following: * * arrow * * beam * * hourglass * * waitarrow * * crosshair * * up * * sizenwse * * sizenesw * * sizewe * * sizens * * sizeall * * no * * hand * * blank * Set to anything else to set it to "none", the default fallback. Do note that a value of "none" does not, as one might assume, result in no cursor being drawn - hiding the cursor requires a value of "blank" instead. * @returns {void} **/ SetCursor(this: Panel, cursor: string): void /** * * Sets this panel's convar. When the convar changes this panel will update automatically. * For developer implementation, see @Derma_Install_Convar_Functions function. * * @name Panel:SetConVar * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetConVar * @note Blocked convars will not work with this, see [Blocked ConCommands](https://wiki.garrysmod.com/page/Blocked%20ConCommands) * @warning This function does not exist on all panels * @warning This function cannot interact with serverside convars unless you are host * @param {Panel} this - no description * @param {string} convar - The console variable to check. * @returns {void} **/ SetConVar(this: Panel, convar: string): void /** * * Stores a string in the named cookie using @Panel:GetCookieName as prefix. * You can also retrieve and modify this cookie by using the @cookie library. Cookies are stored in this format: * ```panelCookieName.cookieName``` * * @name Panel:SetCookie * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetCookie * @warning The panel's cookie name MUST be set for this function to work. See @Panel:SetCookieName. * @param {Panel} this - no description * @param {string} cookieName - The unique name used to retrieve the cookie later. * @param {string} value - The value to store in the cookie. This can be retrieved later as a @string type or @number type. * @returns {void} **/ SetCookie(this: Panel, cookieName: string, value: string): void /** * * Sets the alignment of the contents. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * [Category:DLabel](https://wiki.garrysmod.com/page/Category:DLabel) * * @name Panel:SetContentAlignment * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetContentAlignment * @param {Panel} this - no description * @param {number} alignment - The direction of the content, based on the number pad. * @7 key: **top-left**@8 key: **top-center**@9 key: **top-right** * @4 key: **middle-left**@5 key: **center**@6 key: **middle-right** * @1 key: **bottom-left**@2 key: **bottom-center**@3 key: **bottom-right** * [File:DLabel_SetContentAlignment.gif](https://wiki.garrysmod.com/page/File:DLabel_SetContentAlignment.gif) * @returns {void} **/ SetContentAlignment(this: Panel, alignment: number): void /** * * Sets the action signal command that's fired when a @Button type is clicked. The hook @PanelHooks:ActionSignal is called as the click response. * This has no effect on buttons unless it has had its *AddActionSignalTarget* method called (an internal function not available by default in Garry's Mod LUA). * A better alternative is calling @Panel:Command when a @DButton type is clicked. * * @name Panel:SetCommand * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetCommand * @param {Panel} this - no description * @returns {void} **/ SetCommand(this: Panel): void /** * * Sets the position of the caret (or text cursor) in a text-based panel object. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SetCaretPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetCaretPos * @param {Panel} this - no description * @param {number} offset - Caret position/offset from the start of text. A value of *0* places the caret before the first character. * @returns {void} **/ SetCaretPos(this: Panel, offset: number): void /** * * Sets the background color of the panel. * * @name Panel:SetBGColorEx * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetBGColorEx * @internal * @param {Panel} this - no description * @param {number} r - The red channel of the color. * @param {number} g - The green channel of the color. * @param {number} b - The blue channel of the color. * @param {number} a - The alpha channel of the color. * @returns {void} **/ SetBGColorEx(this: Panel, r: number, g: number, b: number, a: number): void /** * * Sets whenever the panel should be removed if the parent was removed. * * @name Panel:SetAutoDelete * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetAutoDelete * @param {Panel} this - no description * @param {boolean} autoDelete - Whenever to delete if the parent was removed or not. * @returns {void} **/ SetAutoDelete(this: Panel, autoDelete: boolean): void /** * * Sets the background color of a panel such as a @RichText type, @Label type or @DColorCube type. * For @DLabel type elements, you must use @Panel:SetPaintBackgroundEnabled( true ) before applying the color. * This will not work on setup of the panel - you should use this function in a hook like @PanelHooks:ApplySchemeSettings or @PanelHooks:PerformLayout. * * @name Panel:SetBGColor * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetBGColor * @note This doesn't apply to all VGUI elements and its function varies between them * @param {Panel} this - no description * @param {number | Color} r - The red channel of the color, or a @IColor structure. If you pass the latter, the following three arguments are ignored. * @param {number} g - The green channel of the color. * @param {number} b - The blue channel of the color. * @param {number} a - The alpha channel of the color. * @returns {void} **/ SetBGColor(this: Panel, r: number | Color, g?: number, b?: number, a?: number): void /** * * Enables or disables animations for the panel object by overriding the @PanelHooks:AnimationThink hook to nil and back. * * @name Panel:SetAnimationEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetAnimationEnabled * @param {Panel} this - no description * @param {boolean} enable - Whether to enable or disable animations. * @returns {void} **/ SetAnimationEnabled(this: Panel, enable: boolean): void /** * * Sets the alpha multiplier for the panel * * @name Panel:SetAlpha * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetAlpha * @param {Panel} this - no description * @param {number} alpha - The alpha value in the range of 0-255. * @returns {void} **/ SetAlpha(this: Panel, alpha: number): void /** * * Configures a text input to allow user to type characters that are not included in the US-ASCII (7-bit ASCII) character set. * Characters not included in US-ASCII are multi-byte characters in UTF-8. They can be accented characters, non-Latin characters and special characters. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SetAllowNonAsciiCharacters * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetAllowNonAsciiCharacters * @param {Panel} this - no description * @param {boolean} allowed - Set to true in order not to restrict input characters. * @returns {void} **/ SetAllowNonAsciiCharacters(this: Panel, allowed: boolean): void /** * * Used in @Button type to call a function when the button is clicked and in @Slider type when the value changes. * [Category:Button](https://wiki.garrysmod.com/page/Category:Button) * [Category:Slider](https://wiki.garrysmod.com/page/Category:Slider) * * @name Panel:SetActionFunction * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetActionFunction * @param {Panel} this - no description * @param {Button | Slider} func - Function to call when the @Button type is clicked or the @Slider type value is changed. * Arguments given are: * @returns {void} **/ SetActionFunction(this: Panel, func: Button | Slider): void /** * * Sets the achievement to be displayed by @AchievementIcon type.[Category:AchievementIcon](https://wiki.garrysmod.com/page/Category:AchievementIcon) * * @name Panel:SetAchievement * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SetAchievement * @param {Panel} this - no description * @param {number} id - Achievement number ID * @returns {void} **/ SetAchievement(this: Panel, id: number): void /** * * Deselects all items in a panel object. For text-based objects, this will deselect all text. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SelectNone * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SelectNone * @param {Panel} this - no description * @returns {void} **/ SelectNone(this: Panel): void /** * * Selects all the text in a panel object. Will not select non-text items; for this, use @Panel:SelectAll. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SelectAllText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SelectAllText * @param {Panel} this - no description * @returns {void} **/ SelectAllText(this: Panel): void /** * * If called on a text entry, clicking the text entry for the first time will automatically select all of the text ready to be copied by the user. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SelectAllOnFocus * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SelectAllOnFocus * @param {Panel} this - no description * @returns {void} **/ SelectAllOnFocus(this: Panel): void /** * * Selects all items within a panel or object. For text-based objects, selects all text. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SelectAll * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SelectAll * @param {Panel} this - no description * @returns {void} **/ SelectAll(this: Panel): void /** * * Translates global screen coordinate to coordinates relative to the panel. * See also @Panel:LocalToScreen. * * @name Panel:ScreenToLocal * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ScreenToLocal * @warning This function uses a cached value for the screen position of the panel, computed at the end of the last VGUI Think/Layout pass. * ie. inaccurate results may be returned if the panel or any of its ancestors have been repositioned outside of @PanelHooks:Think or @PanelHooks:PerformLayout within the last frame. * @param {Panel} this - no description * @param {number} screenX - The x coordinate of the screen position to be translated. * @param {number} screenY - The y coordinate of the screed position be to translated. * @returns {number} - Relativeposition X * @returns {number} - Relativeposition Y * @tupleReturn **/ ScreenToLocal(this: Panel, screenX: number, screenY: number): [number, number] /** * * Saves the current state (caret position and the text inside) of a @TextEntry type as an undo state. * See also @Panel:Undo. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:SaveUndoState * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/SaveUndoState * @param {Panel} this - no description * @returns {void} **/ SaveUndoState(this: Panel): void /** * * Resets all text fades in a @RichText type element made with @Panel:InsertFade. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:ResetAllFades * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ResetAllFades * @param {Panel} this - no description * @param {boolean} hold - True to reset fades, false otherwise. * @param {boolean} expiredOnly - Any value equating to *true* will reset fades only on text segments that are completely faded out. * @param {number} newSustain - The new sustain value of each faded text segment. Set to -1 to keep the old sustain value. * @returns {void} **/ ResetAllFades(this: Panel, hold: boolean, expiredOnly: boolean, newSustain: number): void /** * * Runs/Executes a string as JavaScript code in [DHTML](https://wiki.garrysmod.com/page/Category:DHTML) panel. * * @name Panel:RunJavascript * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/RunJavascript * @note This function does **NOT** evaluate expression (i.e. allow you to pass variables from JavaScript (JS) to Lua context). * Because a return value is nil/no value (a.k.a. void). * If you wish to pass/return values from JS to Lua, you may want to use @DHTML.AddFunction function to accomplish that job. * @param {Panel} this - no description * @param {string} js - Specify JavaScript code to be executed. * @returns {void} **/ RunJavascript(this: Panel, js: string): void /** * * Attempts to obtain focus for this panel. * * @name Panel:RequestFocus * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/RequestFocus * @param {Panel} this - no description * @returns {void} **/ RequestFocus(this: Panel): void /** * * Marks a panel for deletion so it will be deleted on the next frame. * Will automatically call @Panel:InvalidateParent. * * @name Panel:Remove * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Remove * @param {Panel} this - no description * @returns {void} **/ Remove(this: Panel): void /** * * Refreshes the HTML panel's current page. * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:Refresh * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Refresh * @param {Panel} this - no description * @param {boolean} ignoreCache - If true, the refresh will ignore cached content similar to "ctrl+f5" in most browsers. * @returns {void} **/ Refresh(this: Panel, ignoreCache?: boolean): void /** * * Allows the panel to receive drag and drop events. Can be called multiple times with different names to receive multiple different draggable panel events. * * @name Panel:Receiver * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Receiver * @param {Panel} this - no description * @param {string} name - Name of DnD panels to receive. This is set on the drag'n'drop-able panels via @Panel:Droppable * @param {function} func - This function is called whenever a panel with valid name is hovering above and dropped on this panel. It has next arguments: * @param {table} menu - A table of strings that will act as a menu if drag'n'drop was performed with a right click * @returns {void} **/ Receiver(this: Panel, name: string, func: PanelReceiverFunc, menu: table): void /** * * Re-renders a spawn icon with customized cam data. * @PositionSpawnIcon function can be used to easily calculate the necessary camera parameters. * [Category:ModelImage](https://wiki.garrysmod.com/page/Category:ModelImage)[Category:SpawnIcon](https://wiki.garrysmod.com/page/Category:SpawnIcon) * * @name Panel:RebuildSpawnIconEx * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/RebuildSpawnIconEx * @note This function does **not** accept the standard @CamData structure. * @param {Panel} this - no description * @param {IPanelRebuildSpawnIconExData} data - A four-membered table containing the information needed to re-render: * See the example below for how to retrieve these values. * @returns {void} **/ RebuildSpawnIconEx(this: Panel, data: IPanelRebuildSpawnIconExData): void /** * * Causes a @SpawnIcon type to rebuild its model image. * [Category:ModelImage](https://wiki.garrysmod.com/page/Category:ModelImage)[Category:SpawnIcon](https://wiki.garrysmod.com/page/Category:SpawnIcon) * * @name Panel:RebuildSpawnIcon * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/RebuildSpawnIcon * @param {Panel} this - no description * @returns {void} **/ RebuildSpawnIcon(this: Panel): void /** * * Enables the queue for panel animations. If enabled, the next new animation will begin after all current animations have ended. This must be called before @Panel:NewAnimation to work, and only applies to the next new animation. If you want to queue many, you must call this before each. * * @name Panel:Queue * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Queue * @param {Panel} this - no description * @returns {void} **/ Queue(this: Panel): void /** * * Installs Lua defined functions into the panel. * * @name Panel:Prepare * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Prepare * @internal * @param {Panel} this - no description * @returns {void} **/ Prepare(this: Panel): void /** * * Sends a command to the panel. * [Category:Slider](https://wiki.garrysmod.com/page/Category:Slider) * * @name Panel:PostMessage * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/PostMessage * @param {Panel} this - no description * @param {string} messageName - The name of the message. * @param {string} valueType - The type of the variable to post. * @param {string} value - The value to post. * @returns {void} **/ PostMessage(this: Panel, messageName: string, valueType: string, value: string): void /** * * Sets the width and position of a @DLabel type and places the passed panel object directly to the right of it. Returns the *y* value of the bottom of the tallest object. The panel on which this method is run is not relevant; only the passed objects are affected. * * @name Panel:PositionLabel * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/PositionLabel * @param {Panel} this - no description * @param {number} lblWidth - The width to set the label to. * @param {number} x - The horizontal (x) position at which to place the label. * @param {number} y - The vertical (y) position at which to place the label. * @param {Panel} lbl - The label to resize and position. * @param {Panel} panelObj - The panel object to place to the right of the label. * @returns {number} - The distance from the top of the parent panel to the bottom of the tallest object (the *y* position plus the height of the label or passed panel, depending on which is tallest). **/ PositionLabel(this: Panel, lblWidth: number, x: number, y: number, lbl: Panel, panelObj: Panel): number /** * * Only works for TextEntries. * Pastes the contents of the clipboard into the TextEntry. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:Paste * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Paste * @note Tab characters will be dropped from the pasted text * @warning Due to privacy concerns, this function has been disabled * @param {Panel} this - no description * @returns {void} **/ Paste(this: Panel): void /** * * Parents the panel to the HUD. * Makes it invisible on the escape-menu and disables controls. * * @name Panel:ParentToHUD * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ParentToHUD * @param {Panel} this - no description * @returns {void} **/ ParentToHUD(this: Panel): void /** * * Paints the panel at its current position. To use this you must call @Panel:SetPaintedManually(true). * * @name Panel:PaintManual * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/PaintManual * @param {Panel} this - no description * @returns {void} **/ PaintManual(this: Panel): void /** * * Paints a ghost copy of the panel at the given position. * * @name Panel:PaintAt * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/PaintAt * @param {Panel} this - no description * @param {number} posX - The x coordinate to draw the panel from. * @param {number} posY - The y coordinate to draw the panel from. * @returns {void} **/ PaintAt(this: Panel, posX: number, posY: number): void /** * * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML)[Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium)Instructs a HTML control to download and parse a HTML script using the passed URL. * * @name Panel:OpenURL * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/OpenURL * @param {Panel} this - no description * @param {string} URL - URL to open * @returns {void} **/ OpenURL(this: Panel, URL: string): void /** * * Returns the number of children of the panel object that are selected. This is equivalent to calling @Panel:IsSelected on all child objects and counting the number of returns that are *true*. * * @name Panel:NumSelectedChildren * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/NumSelectedChildren * @param {Panel} this - no description * @returns {number} - The number of child objects that are currently selected. This does not include the parent object you are calling the method from. **/ NumSelectedChildren(this: Panel): number /** * * Sets whether this panel's drawings should be clipped within the parent panel's bounds. * See also @DisableClipping function and @surface.DisableClipping. * * @name Panel:NoClipping * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/NoClipping * @param {Panel} this - no description * @param {boolean} clip - Whether to clip or not. * @returns {void} **/ NoClipping(this: Panel, clip: boolean): void /** * * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:NewObjectCallback * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/NewObjectCallback * @internal * @param {Panel} this - no description * @param {string} objectName - no description * @param {string} callbackName - no description * @returns {void} **/ NewObjectCallback(this: Panel, objectName: string, callbackName: string): void /** * * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:NewObject * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/NewObject * @internal * @param {Panel} this - no description * @param {string} objectName - no description * @returns {void} **/ NewObject(this: Panel, objectName: string): void /** * * Moves the panel in front of all other panels on screen. Unless the panel has been made a pop-up using @Panel:MakePopup, it will still draw behind any that have. * * @name Panel:MoveToFront * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveToFront * @param {Panel} this - no description * @returns {void} **/ MoveToFront(this: Panel): void /** * * Creates a new animation for the panel object. * Methods that use this function: * * @Panel:MoveTo * * @Panel:SizeTo * * @Panel:SlideUp * * @Panel:SlideDown * * @Panel:ColorTo * * @Panel:AlphaTo * * @Panel:MoveBy * * @Panel:LerpPositions * * @name Panel:NewAnimation * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/NewAnimation * @param {Panel} this - no description * @param {number} length - The length of the animation in seconds. * @param {number} delay - The delay before the animation starts. * @param {number} ease - The power/index to use for easing. * *Positive values greater than 1 will ease in; the higher the number, the sharper the curve's gradient (less linear). * *A value of 1 removes all easing. * *Positive values between 0 and 1 ease out; values closer to 0 increase the curve's gradient (less linear). * *A value of 0 will break the animation and should be avoided. * *Any value less than zero will ease in/out; the value has no effect on the gradient. * @param {function} callback - The function to be called when the animation ends. Arguments passed are: * @returns {AnimationData} - Partially filled @AnimationData structure with members: **/ NewAnimation(this: Panel, length: number, delay?: number, ease?: number, callback?: PanelNewAnimationCallback): AnimationData /** * * Moves this panel object behind the specified sibling (child of the same parent) in the render order, and shuffles up the @Panel:SetZPos of siblings now in front. * * @name Panel:MoveToBefore * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveToBefore * @param {Panel} this - no description * @param {Panel} siblingPanel - The panel to move this one behind. Must be a child of the same parent panel. * @returns {boolean} - *false* if the passed panel is not a sibling, otherwise *nil*. **/ MoveToBefore(this: Panel, siblingPanel: Panel): boolean /** * * Moves the panel object behind all other panels on screen. If the panel has been made a pop-up with @Panel:MakePopup, it will still draw in front of any panels that haven't. * * @name Panel:MoveToBack * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveToBack * @param {Panel} this - no description * @returns {void} **/ MoveToBack(this: Panel): void /** * * Moves this panel object in front of the specified sibling (child of the same parent) in the render order, and shuffles up the Z-positions of siblings now behind. * * @name Panel:MoveToAfter * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveToAfter * @param {Panel} this - no description * @param {Panel} siblingPanel - The panel to move this one in front of. Must be a child of the same parent panel. * @returns {boolean} - *false* if the passed panel is not a sibling, otherwise *nil*. **/ MoveToAfter(this: Panel, siblingPanel: Panel): boolean /** * * Moves the panel to the specified position using animation. * * @name Panel:MoveTo * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveTo * @param {Panel} this - no description * @param {number} posX - The target x coordinate of the panel. * @param {number} posY - The target y coordinate of the panel. * @param {number} time - The time to perform the animation within. * @param {number} delay - The delay before the animation starts. * @param {number} ease - The easing of the start and/or end speed of the animation. See @Panel:NewAnimation for how this works. * @param {function} callback - The function to be called once the animation finishes. Arguments are: * @returns {void} **/ MoveTo(this: Panel, posX: number, posY: number, time: number, delay?: number, ease?: number, callback: PanelMoveToCallback): void /** * * Places the panel right to the passed panel with the specified offset. * * @name Panel:MoveRightOf * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveRightOf * @param {Panel} this - no description * @param {Panel} panel - Panel to position relatively to. * @param {number} offset - The align offset. * @returns {void} **/ MoveRightOf(this: Panel, panel: Panel, offset?: number): void /** * * Places the panel left to the passed panel with the specified offset. * * @name Panel:MoveLeftOf * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveLeftOf * @param {Panel} this - no description * @param {Panel} panel - Panel to position relatively to. * @param {number} offset - The align offset. * @returns {void} **/ MoveLeftOf(this: Panel, panel: Panel, offset?: number): void /** * * Moves the panel by the specified coordinates using animation. * * @name Panel:MoveBy * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveBy * @param {Panel} this - no description * @param {number} moveX - The number of pixels to move by in the horizontal (x) direction. * @param {number} moveY - The number of pixels to move by in the vertical (y) direction. * @param {number} time - The time (in seconds) in which to perform the animation. * @param {number} delay - The delay (in seconds) before the animation begins. * @param {number} ease - The easing of the start and/or end speed of the animation. See @Panel:NewAnimation for how this works. * @param {function} callback - The function to be called once the animation is complete. Arguments are: * @returns {void} **/ MoveBy(this: Panel, moveX: number, moveY: number, time: number, delay?: number, ease?: number, callback?: PanelMoveByCallback): void /** * * Places the panel below the passed panel with the specified offset. * * @name Panel:MoveBelow * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveBelow * @param {Panel} this - no description * @param {Panel} panel - Panel to position relatively to. * @param {number} offset - The align offset. * @returns {void} **/ MoveBelow(this: Panel, panel: Panel, offset?: number): void /** * * Places the panel above the passed panel with the specified offset. * * @name Panel:MoveAbove * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MoveAbove * @param {Panel} this - no description * @param {Panel} panel - Panel to position relatively to. * @param {number} offset - The align offset. * @returns {void} **/ MoveAbove(this: Panel, panel: Panel, offset?: number): void /** * * Allows the panel to receive mouse input even if the mouse cursor is outside the bounds of the panel. * * @name Panel:MouseCapture * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MouseCapture * @param {Panel} this - no description * @param {boolean} doCapture - Set to true to enable, set to false to disable. * @returns {void} **/ MouseCapture(this: Panel, doCapture: boolean): void /** * * Focuses the panel and enables it to receive input. * This automatically calls @Panel:SetMouseInputEnabled and @Panel:SetKeyboardInputEnabled and sets them to true. * * @name Panel:MakePopup * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/MakePopup * @note Panels derived from @Panel type will not work properly with this function. Due to this, any children will not be intractable with keyboard. Derive from @EditablePanel type instead. * @param {Panel} this - no description * @returns {void} **/ MakePopup(this: Panel): void /** * * Gets the absolute screen position of the position specified relative to the panel. * See also @Panel:ScreenToLocal. * * @name Panel:LocalToScreen * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/LocalToScreen * @note If the panel uses @Panel:Dock, this function will return 0, 0 when the panel was created. The position will be updated in the next frame. * @warning This function uses a cached value for the screen position of the panel, computed at the end of the last VGUI Think/Layout pass. * ie. inaccurate results may be returned if the panel or any of its ancestors have been repositioned outside of @PanelHooks:Think or @PanelHooks:PerformLayout within the last frame. * @param {Panel} this - no description * @param {number} posX - The X coordinate of the position on the panel to translate. * @param {number} posY - The Y coordinate of the position on the panel to translate. * @returns {number} - The X coordinate relative to the screen. * @returns {number} - The Y coordinate relative to the screen. * @tupleReturn **/ LocalToScreen(this: Panel, posX: number, posY: number): [number, number] /** * * Returns the cursor position local to the position of the panel (usually the upper-left corner). * * @name Panel:LocalCursorPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/LocalCursorPos * @param {Panel} this - no description * @returns {number} - The x coordinate * @returns {number} - The y coordinate * @tupleReturn **/ LocalCursorPos(this: Panel): [number, number] /** * * Sets a new image to be loaded by a @TGAImage type. * [Category:TGAImage](https://wiki.garrysmod.com/page/Category:TGAImage) * * @name Panel:LoadTGAImage * @wiki https://wiki.garrysmod.com/page/Panel/LoadTGAImage * @param {Panel} this - no description * @param {string} imageName - The file path. * @param {string} strPath - The PATH to search in. See [File Search Paths](https://wiki.garrysmod.com/page/File%20Search%20Paths). * This isn't used internally. * @returns {void} **/ LoadTGAImage(this: Panel, imageName: string, strPath: string): void /** * * Loads controls for the panel from a JSON string. * * @name Panel:LoadGWENString * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/LoadGWENString * @param {Panel} this - no description * @param {string} str - JSON string containing information about controls to create. * @returns {void} **/ LoadGWENString(this: Panel, str: string): void /** * * Loads controls(positions, etc) from given data. This is what the default options menu uses. * [Category:EditablePanel](https://wiki.garrysmod.com/page/Category:EditablePanel) * * @name Panel:LoadControlsFromString * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/LoadControlsFromString * @internal * @param {Panel} this - no description * @param {string} data - The data to load controls from. Format unknown. * @returns {void} **/ LoadControlsFromString(this: Panel, data: string): void /** * * Redefines the panel object's @Panel:SetPos method to operate using frame-by-frame linear interpolation (Lerp). When the panel's position is changed, it will move to the target position at the speed defined. You can undo this with @Panel:DisableLerp. * Unlike the other panel animation functions, such as @Panel:MoveTo, this animation method will not operate whilst the game is paused. This is because it relies on @FrameTime function. * * @name Panel:LerpPositions * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/LerpPositions * @param {Panel} this - no description * @param {number} speed - The speed at which to move the panel. This is affected by the value of *easeOut*. Recommended values are: * * **0.1 - 10** when *easeOut* is *false*. * * **0.1 - 1** when *easeOut* is *true*. * @param {boolean} easeOut - This causes the panel object to 'jump' at the target, slowing as it approaches. This affects the *speed* value significantly, see above. * @returns {void} **/ LerpPositions(this: Panel, speed: number, easeOut: boolean): void /** * * Loads a .gwen file (created by GWEN Designer) and calls @Panel:LoadGWENString with the contents of the loaded file. * Used to load panel controls from a file. * * @name Panel:LoadGWENFile * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/LoadGWENFile * @param {Panel} this - no description * @param {string} filename - The file to open. The path is relative to garrysmod/garrysmod/. * @param {string} path - The path used to look up the file. * * "GAME" Structured like base folder (garrysmod/), searches all the mounted content (main folder, addons, mounted games etc) * * "LUA" or "lsv" - All Lua folders (lua/) including gamesmodes and addons * * "DATA" Data folder (garrysmod/data) * * "MOD" Strictly the game folder (garrysmod/), ignores mounting. * @returns {void} **/ LoadGWENFile(this: Panel, filename: string, path?: string): void /** * * Similar to @Panel:LoadControlsFromString but loads controls from a file. * [Category:EditablePanel](https://wiki.garrysmod.com/page/Category:EditablePanel) * * @name Panel:LoadControlsFromFile * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/LoadControlsFromFile * @internal * @param {Panel} this - no description * @param {string} path - The path to load the controls from. * @returns {void} **/ LoadControlsFromFile(this: Panel, path: string): void /** * * Remove the focus from the panel. * * @name Panel:KillFocus * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/KillFocus * @param {Panel} this - no description * @returns {void} **/ KillFocus(this: Panel): void /** * * Returns if a panel allows world clicking set by @Panel:SetWorldClicker. * * @name Panel:IsWorldClicker * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsWorldClicker * @param {Panel} this - no description * @returns {boolean} - If the panel allows world clicking. **/ IsWorldClicker(this: Panel): boolean /** * * Returns if the panel is visible. * * @name Panel:IsVisible * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsVisible * @param {Panel} this - no description * @returns {boolean} - isVisible **/ IsVisible(this: Panel): boolean /** * * Returns if the panel is valid and not marked for deletion. * * @name Panel:IsValid * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsValid * @param {Panel} this - no description * @returns {boolean} - True if the object is valid. **/ IsValid(this: Panel): boolean /** * * Determines if the panel object is a selection canvas or not. This is set with @Panel:SetSelectionCanvas. * * @name Panel:IsSelectionCanvas * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsSelectionCanvas * @param {Panel} this - no description * @returns {any} - The value (if any) set by @Panel:SetSelectionCanvas. **/ IsSelectionCanvas(this: Panel): any /** * * Returns if the panel object is selected (like icons in the Spawn Menu, holding @Shift key). This can be set in Lua using @Panel:SetSelected. * * @name Panel:IsSelected * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsSelected * @param {Panel} this - no description * @returns {boolean} - Whether the panel object is selected or not. Always returns false if the object is not selectable. This can be modified using @Panel:SetSelectable. **/ IsSelected(this: Panel): boolean /** * * Determines if the panel object is selectable (like icons in the Spawn Menu, holding @Shift key). This is set with @Panel:SetSelectable. * * @name Panel:IsSelectable * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsSelectable * @param {Panel} this - no description * @returns {boolean} - Whether the panel is selectable or not. **/ IsSelectable(this: Panel): boolean /** * * Returns whether the panel contains the given panel, recursively. * * @name Panel:IsOurChild * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsOurChild * @param {Panel} this - no description * @param {Panel} childPanel - no description * @returns {boolean} - True if the panel contains childPanel. **/ IsOurChild(this: Panel, childPanel: Panel): boolean /** * * Determines whether or not a text-based panel object, such as a @DTextEntry type, is in multi-line mode. This is set with @Panel:SetMultiline. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:IsMultiline * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsMultiline * @param {Panel} this - no description * @returns {boolean} - Whether the object is in multi-line mode or not. **/ IsMultiline(this: Panel): boolean /** * * Returns if the panel is going to be deleted in the next frame. * * @name Panel:IsMarkedForDeletion * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsMarkedForDeletion * @param {Panel} this - no description * @returns {boolean} - markedForDeletion **/ IsMarkedForDeletion(this: Panel): boolean /** * * Returns true if the panel can receive mouse input. * * @name Panel:IsMouseInputEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsMouseInputEnabled * @param {Panel} this - no description * @returns {boolean} - mouseInputEnabled **/ IsMouseInputEnabled(this: Panel): boolean /** * * Determines whether or not a @HTML type or @DHTML type element is currently loading a page. * * @name Panel:IsLoading * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsLoading * @param {Panel} this - no description * @returns {boolean} - Whether or not the (D)HTML object is loading. **/ IsLoading(this: Panel): boolean /** * * Returns true if the panel can receive keyboard input. * * @name Panel:IsKeyboardInputEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsKeyboardInputEnabled * @param {Panel} this - no description * @returns {boolean} - keyboardInputEnabled **/ IsKeyboardInputEnabled(this: Panel): boolean /** * * Returns whether the mouse cursor is hovering over this panel or not * Uses @vgui.GetHoveredPanel internally. * Requires @Panel:SetMouseInputEnabled to be set to true. * * @name Panel:IsHovered * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsHovered * @param {Panel} this - no description * @returns {boolean} - true if the panel is hovered **/ IsHovered(this: Panel): boolean /** * * Returns whether the the panel is enabled or disabled. * See @Panel:SetEnabled for a function that makes the panel enabled or disabled. * * @name Panel:IsEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsEnabled * @param {Panel} this - no description * @returns {boolean} - Whether the panel is enabled or disabled. **/ IsEnabled(this: Panel): boolean /** * * Returns whether this panel is currently being dragged or not. * * @name Panel:IsDragging * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsDragging * @param {Panel} this - no description * @returns {boolean} - Whether this panel is currently being dragged or not. **/ IsDragging(this: Panel): boolean /** * * Returns whether this panel is draggable ( if user is able to drag it ) or not. * * @name Panel:IsDraggable * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsDraggable * @param {Panel} this - no description * @returns {boolean} - Whether this panel is draggable ( if user is able to drag it ) or not. **/ IsDraggable(this: Panel): boolean /** * * Determines whether the mouse cursor is hovered over one of this panel object's children. This is a reverse process using @vgui.GetHoveredPanel, and looks upward to find the parent. * * @name Panel:IsChildHovered * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/IsChildHovered * @param {Panel} this - no description * @param {boolean} immediate - Set to true to check only the immediate children of given panel ( first level ) * @returns {boolean} - Whether or not one of this panel object's children is being hovered over. **/ IsChildHovered(this: Panel, immediate?: boolean): boolean /** * * Invalidates the layout of the parent of this panel object. This will cause it to re-layout, calling @PanelHooks:PerformLayout. * * @name Panel:InvalidateParent * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/InvalidateParent * @param {Panel} this - no description * @param {boolean} layoutNow - If *true*, the re-layout will occur immediately, otherwise it will be performed in the next frame. * @returns {void} **/ InvalidateParent(this: Panel, layoutNow?: boolean): void /** * * Causes the panel to re-layout in the next frame. During the layout process @PanelHooks:PerformLayout will be called on the target panel. * You should avoid calling this function every frame. * * @name Panel:InvalidateLayout * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/InvalidateLayout * @bug #2574 Using this on a panel after clicking on a docked element will cause docked elements to reorient themselves incorrectly. This can be fixed by assigning a unique @Panel.SetZPos to each docked element. * @param {Panel} this - no description * @param {boolean} layoutNow - If true the panel will re-layout instantly and not wait for the next frame. * @returns {void} **/ InvalidateLayout(this: Panel, layoutNow?: boolean): void /** * * Invalidates the layout of this panel object and all its children. This will cause these objects to re-layout immediately, calling @PanelHooks:PerformLayout. If you want to perform the layout in the next frame, you will have loop manually through all children, and call @Panel:InvalidateLayout on each. * * @name Panel:InvalidateChildren * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/InvalidateChildren * @param {Panel} this - no description * @param {boolean} recursive - If *true*, the method will recursively invalidate the layout of all children. Otherwise, only immediate children are affected. * @returns {void} **/ InvalidateChildren(this: Panel, recursive?: boolean): void /** * * Begins a text fade for a @RichText type element where the last appended text segment is fully faded out after a specific amount of time, at a specific speed. * The alpha of the text at any given time is determined by the text's base alpha * ((*sustain* - @CurTime function) / *length*) where @CurTime function is added to *sustain* when this method is called. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:InsertFade * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/InsertFade * @param {Panel} this - no description * @param {number} sustain - The number of seconds the text remains visible. * @param {number} length - The number of seconds it takes the text to fade out. * If set **lower** than *sustain*, the text will not begin fading out until (*sustain* - *length*) seconds have passed. * If set **higher** than *sustain*, the text will begin fading out immediately at a fraction of the base alpha. * If set to **-1**, the text doesn't fade out. * @returns {void} **/ InsertFade(this: Panel, sustain: number, length: number): void /** * * Inserts a color change in a @RichText type element, which affects the color of all text added with @Panel:AppendText until another color change is applied. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:InsertColorChange * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/InsertColorChange * @param {Panel} this - no description * @param {number} r - The red value (0 - 255). * @param {number} g - The green value (0 - 255). * @param {number} b - The blue value (0 - 255). * @param {number} a - The alpha value (0 - 255). * @returns {void} **/ InsertColorChange(this: Panel, r: number, g: number, b: number, a: number): void /** * * Starts the insertion of clickable text for a @RichText type element. Any text appended with @Panel:AppendText between this call and @Panel:InsertClickableTextEnd will become clickable text. * The hook @PanelHooks:ActionSignal is called when the text is clicked, with "TextClicked" as the signal name and *signalValue* as the signal value. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:InsertClickableTextStart * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/InsertClickableTextStart * @note The clickable text is a separate Derma panel which will not inherit the current font from the *RichText*. * @param {Panel} this - no description * @param {string} signalValue - The text passed as the action signal's value. * @returns {void} **/ InsertClickableTextStart(this: Panel, signalValue: string): void /** * * Marks the end of a clickable text segment in a @RichText type element, started with @Panel:InsertClickableTextStart. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:InsertClickableTextEnd * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/InsertClickableTextEnd * @param {Panel} this - no description * @returns {void} **/ InsertClickableTextEnd(this: Panel): void /** * * Makes a panel invisible. * * @name Panel:Hide * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Hide * @param {Panel} this - no description * @returns {void} **/ Hide(this: Panel): void /** * * Returns whether the panel is a descendent of the given panel. * * @name Panel:HasParent * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/HasParent * @param {Panel} this - no description * @param {Panel} parentPanel - no description * @returns {boolean} - True if the panel is contained within parentPanel. **/ HasParent(this: Panel, parentPanel: Panel): boolean /** * * Returns if the panel or any of its children(sub children and so on) has the focus. * * @name Panel:HasHierarchicalFocus * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/HasHierarchicalFocus * @param {Panel} this - no description * @returns {boolean} - hasHierarchicalFocus **/ HasHierarchicalFocus(this: Panel): boolean /** * * Returns if the panel is focused. * * @name Panel:HasFocus * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/HasFocus * @param {Panel} this - no description * @returns {boolean} - hasFocus **/ HasFocus(this: Panel): boolean /** * * Returns whenever the panel has child panels. * * @name Panel:HasChildren * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/HasChildren * @param {Panel} this - no description * @returns {boolean} - hasChilds **/ HasChildren(this: Panel): boolean /** * * Used by @Panel:ApplyGWEN to apply the *Text* property to a panel. * * @name Panel:GWEN_SetText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetText * @internal * @param {Panel} this - no description * @param {string} txt - The text to be applied to the panel. * @returns {void} **/ GWEN_SetText(this: Panel, txt: string): void /** * * Used by @Panel:ApplyGWEN to apply the *Size* property to a panel object. This calls @Panel:SetSize. * * @name Panel:GWEN_SetSize * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetSize * @internal * @param {Panel} this - no description * @param {IPanelGWEN_SetSizeSize} size - A two-membered table containing the width and heights as numbers: * @returns {void} **/ GWEN_SetSize(this: Panel, size: IPanelGWEN_SetSizeSize): void /** * * Used by @Panel:ApplyGWEN to apply the *Position* property to a panel object. This calls @Panel:SetPos. * * @name Panel:GWEN_SetPosition * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetPosition * @internal * @param {Panel} this - no description * @param {IPanelGWEN_SetPositionPos} pos - A two-membered table containing the x and y coordinates as numbers: * @returns {void} **/ GWEN_SetPosition(this: Panel, pos: IPanelGWEN_SetPositionPos): void /** * * Used by @Panel:ApplyGWEN to apply the *Min* property to a @DNumberWang type, @Slider type, @DNumSlider type or @DNumberScratch type. This calls *SetMin* on one of the previously listed methods. * * @name Panel:GWEN_SetMin * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetMin * @internal * @param {Panel} this - no description * @param {number} minValue - The minimum value the element is to permit. * @returns {void} **/ GWEN_SetMin(this: Panel, minValue: number): void /** * * Used by @Panel:ApplyGWEN to apply the *Max* property to a @DNumberWang type, @Slider type, @DNumSlider type or @DNumberScratch type. This calls *SetMax* on one of the previously listed methods. * * @name Panel:GWEN_SetMax * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetMax * @internal * @param {Panel} this - no description * @param {number} maxValue - The maximum value the element is to permit. * @returns {void} **/ GWEN_SetMax(this: Panel, maxValue: number): void /** * * Used by @Panel:ApplyGWEN to apply the *Margin* property to a panel object. This calls @Panel:DockMargin. * * @name Panel:GWEN_SetMargin * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetMargin * @internal * @param {Panel} this - no description * @param {IPanelGWEN_SetMarginMargins} margins - A four-membered table containing the margins as numbers: * @returns {void} **/ GWEN_SetMargin(this: Panel, margins: IPanelGWEN_SetMarginMargins): void /** * * Used by @Panel:ApplyGWEN to apply the *HorizontalAlign* property to a panel object. This calls @Panel:SetContentAlignment. * * @name Panel:GWEN_SetHorizontalAlign * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetHorizontalAlign * @internal * @param {Panel} this - no description * @param {string} hAlign - The alignment, as a string, to pass to @Panel:SetContentAlignment. Accepts: * * *Right*: Align mid-right. * * *Left*: Align mid-left. * * *Center*: Align mid-center. * @returns {void} **/ GWEN_SetHorizontalAlign(this: Panel, hAlign: string): void /** * * Used by @Panel:ApplyGWEN to apply the *Dock* property to a panel object. This calls @Panel:Dock. * * @name Panel:GWEN_SetDock * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetDock * @internal * @param {Panel} this - no description * @param {string} dockState - The dock mode to pass to the panel's *Dock* method. This reads a string and applies the approriate @DOCK enum. * * *Right*: Dock right. * * *Left*: Dock left. * * *Bottom*: Dock at the bottom. * * *Top*: Dock at the top. * * *Fill*: Fill the parent panel. * @returns {void} **/ GWEN_SetDock(this: Panel, dockState: string): void /** * * Used by @Panel:ApplyGWEN to apply the *ControlName* property to a panel. This calls @Panel:SetName. * * @name Panel:GWEN_SetControlName * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetControlName * @internal * @param {Panel} this - no description * @param {string} name - The new name to apply to the panel. * @returns {void} **/ GWEN_SetControlName(this: Panel, name: string): void /** * * Causes a @RichText type element to scroll to the top of its text. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:GotoTextStart * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GotoTextStart * @bug #2239 This does not work on the same frame as @Panel:SetText. * @param {Panel} this - no description * @returns {void} **/ GotoTextStart(this: Panel): void /** * * Used by @Panel:ApplyGWEN to apply the *CheckboxText* property to a @DCheckBoxLabel type. This does exactly the same as @Panel:GWEN_SetText, but exists to cater for the seperate GWEN properties. * * @name Panel:GWEN_SetCheckboxText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GWEN SetCheckboxText * @internal * @param {Panel} this - no description * @param {string} txt - The text to be applied to the DCheckBoxLabel. * @returns {void} **/ GWEN_SetCheckboxText(this: Panel, txt: string): void /** * * Causes a @RichText type element to scroll to the bottom of its text. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:GotoTextEnd * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GotoTextEnd * @param {Panel} this - no description * @returns {void} **/ GotoTextEnd(this: Panel): void /** * * Goes to the page in the HTML panel's history at the specified relative offset. * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:GoToHistoryOffset * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GoToHistoryOffset * @param {Panel} this - no description * @param {number} offset - The offset in the panel's back/forward history, relative to the current page, that you would like to skip to. Because this is relative, 0 = current page while negative goes back and positive goes forward. For example, -2 will go back 2 pages in the history. * @returns {void} **/ GoToHistoryOffset(this: Panel, offset: number): void /** * * Goes forward one page in the HTML panel's history if available. * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:GoForward * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GoForward * @param {Panel} this - no description * @returns {void} **/ GoForward(this: Panel): void /** * * Goes back one page in the HTML panel's history if available. * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:GoBack * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GoBack * @param {Panel} this - no description * @returns {void} **/ GoBack(this: Panel): void /** * * Returns the Z position of the panel. * * @name Panel:GetZPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetZPos * @param {Panel} this - no description * @returns {number} - The Z order position of the panel. **/ GetZPos(this: Panel): number /** * * Returns the width of the panel. * * @name Panel:GetWide * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetWide * @param {Panel} this - no description * @returns {number} - width **/ GetWide(this: Panel): number /** * * Returns the value the panel holds. * In engine is only implemented for @CheckButton type, @Label type (limited to 8192 characters) and @TextEntry type as a string. * If using with @DTextEntry type, you should use @Panel:GetText instead. * * @name Panel:GetValue * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetValue * @param {Panel} this - no description * @returns {any} - The value the panel holds. **/ GetValue(this: Panel): any /** * * Gets valid receiver slot of currently dragged panel. * * @name Panel:GetValidReceiverSlot * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetValidReceiverSlot * @param {Panel} this - no description * @returns {Panel} - The panel this was called on if a valid receiver slot exists, otherwise false. * @returns {table} - The slot table. * @tupleReturn **/ GetValidReceiverSlot(this: Panel): [Panel, table] /** * * Gets the size of the text within a @Label type derived panel. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * * @name Panel:GetTextSize * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetTextSize * @bug #2576 This can return 0 incorrectly. * @param {Panel} this - no description * @returns {number} - The width of the text in the DLabel. * @returns {number} - The height of the text in the DLabel. * @tupleReturn **/ GetTextSize(this: Panel): [number, number] /** * * Gets the left and top text margins of a text-based panel object, such as a @DButton type or @DLabel type. This is set with @Panel:SetTextInset. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * * @name Panel:GetTextInset * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetTextInset * @param {Panel} this - no description * @returns {number} - The left margin of the text, in pixels. * @returns {number} - The top margin of the text, in pixels. * @tupleReturn **/ GetTextInset(this: Panel): [number, number] /** * * Returns the panel's text (where applicable). * This method returns a maximum of 1023 bytes, except for @DTextEntry type. * * @name Panel:GetText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetText * @param {Panel} this - no description * @returns {string} - The panel's text. **/ GetText(this: Panel): string /** * * Returns the height of the panel. * * @name Panel:GetTall * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetTall * @param {Panel} this - no description * @returns {number} - height **/ GetTall(this: Panel): number /** * * Returns the internal Lua table of the panel. * * @name Panel:GetTable * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetTable * @param {Panel} this - no description * @returns {table} - A table containing all the members of given panel object. **/ GetTable(this: Panel): table /** * * Returns the table for the derma skin currently being used by this panel object. * * @name Panel:GetSkin * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetSkin * @param {Panel} this - no description * @returns {table} - The derma skin table currently being used by this object. **/ GetSkin(this: Panel): table /** * * Returns the size of the panel. * If you require both the panel's position and size, consider using @Panel:GetBounds instead. * * @name Panel:GetSize * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetSize * @param {Panel} this - no description * @returns {number} - width * @returns {number} - height * @tupleReturn **/ GetSize(this: Panel): [number, number] /** * * Returns the panel object (*self*) if it has been enabled as a selection canvas. This is achieved using @Panel:SetSelectionCanvas. * * @name Panel:GetSelectionCanvas * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetSelectionCanvas * @param {Panel} this - no description * @returns {Panel} - The panel object this method was called on if enabled as a selection canvas, otherwise *nil*. **/ GetSelectionCanvas(this: Panel): Panel /** * * Returns a table of all children of the panel object that are selected. This is recursive, and the returned table will include tables for any child objects that also have children. This means that not all first-level members in the returned table will be of type @Panel type. * * @name Panel:GetSelectedChildren * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetSelectedChildren * @param {Panel} this - no description * @returns {table} - A table of any child objects that are selected, including tables for children of the child objects (These tables may also contain table members, as the method is recursive). **/ GetSelectedChildren(this: Panel): table /** * * Returns the position of the panel relative to its @Panel:GetParent. * If you require the panel's position **and** size, consider using @Panel:GetBounds instead. * If you need the position in screen space, see @Panel:LocalToScreen. * * @name Panel:GetPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetPos * @param {Panel} this - no description * @returns {number} - X coordinate, relative to this panels parents top left corner. * @returns {number} - Y coordinate, relative to this panels parents top left corner. * @tupleReturn **/ GetPos(this: Panel): [number, number] /** * * Returns the parent of the panel, returns nil if there is no parent. * * @name Panel:GetParent * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetParent * @param {Panel} this - no description * @returns {Panel} - The parent of given panel **/ GetParent(this: Panel): Panel /** * * Returns the number of lines in a @RichText type. You must wait a couple frames before calling this after using @Panel:AppendText or @Panel:SetText, otherwise it will return the number of text lines before the text change. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:GetNumLines * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetNumLines * @note Even though this function can be called on any panel, it will only work with @RichText type * @param {Panel} this - no description * @returns {number} - The number of lines. **/ GetNumLines(this: Panel): number /** * * Returns the internal name of the panel. * * @name Panel:GetName * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetName * @param {Panel} this - no description * @returns {string} - name **/ GetName(this: Panel): string /** * * Returns the panel's HTML material. Only works with @Awesomium type, @HTML type and @DHTML type panels that have been fully loaded. * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name Panel:GetHTMLMaterial * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetHTMLMaterial * @param {Panel} this - no description * @returns {IMaterial} - The HTML material used by the panel. Typically starts with "__vgui_texture_" followed by an incremental number. **/ GetHTMLMaterial(this: Panel): IMaterial /** * * Returns the name of the font that the panel renders its text with. * This is the same font name set with @Panel:SetFontInternal. * * @name Panel:GetFont * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetFont * @param {Panel} this - no description * @returns {string} - fontName **/ GetFont(this: Panel): string /** * * Returns the docked padding of the panel. (set by @Panel:DockPadding) * * @name Panel:GetDockPadding * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetDockPadding * @param {Panel} this - no description * @returns {number} - Left padding. * @returns {number} - Top padding. * @returns {number} - Right padding. * @returns {number} - Bottom padding. * @tupleReturn **/ GetDockPadding(this: Panel): [number, number, number, number] /** * * Returns the docked margins of the panel. (set by @Panel:DockMargin) * * @name Panel:GetDockMargin * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetDockMargin * @param {Panel} this - no description * @returns {number} - Left margin. * @returns {number} - Top margin. * @returns {number} - Right margin. * @returns {number} - Bottom margin. * @tupleReturn **/ GetDockMargin(this: Panel): [number, number, number, number] /** * * Returns a dock enum for the panel's current docking type. * * @name Panel:GetDock * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetDock * @param {Panel} this - no description * @returns {DOCK} - The dock enum for the panel. See @DOCK enum. **/ GetDock(this: Panel): DOCK /** * * Gets the value of a cookie stored by the panel object, as a number. This can also be done with @cookie.GetNumber, using the panel's cookie name, a fullstop, and then the actual name of the cookie. * Make sure the panel's cookie name has not changed since writing, or the cookie will not be accessible. This can be done with @Panel:GetCookieName and @Panel:SetCookieName. * * @name Panel:GetCookieNumber * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetCookieNumber * @param {Panel} this - no description * @param {string} cookieName - The name of the cookie from which to retrieve the value. * @param {number} def - The default value to return if the cookie does not exist. * @returns {number} - The number value of the stored cookie, or the default value should the cookie not exist. **/ GetCookieNumber(this: Panel, cookieName: string, def: number): number /** * * Gets the name the panel uses to store cookies. This is set with @Panel:SetCookieName. * * @name Panel:GetCookieName * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetCookieName * @param {Panel} this - no description * @returns {string} - The name the panel uses when reading or writing cookies. The format used is as follows: ```panelCookieName.individualCookieName``` **/ GetCookieName(this: Panel): string /** * * Gets the value of a cookie stored by the panel object. This can also be done with @cookie.GetString, using the panel's cookie name, a fullstop, and then the actual name of the cookie. * Make sure the panel's cookie name has not changed since writing, or the cookie will not be accessible. This can be done with @Panel:GetCookieName and @Panel:SetCookieName. * * @name Panel:GetCookie * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetCookie * @param {Panel} this - no description * @param {string} cookieName - The name of the cookie from which to retrieve the value. * @param {string} def - The default value to return if the cookie does not exist. * @returns {string} - The value of the stored cookie, or the default value should the cookie not exist. **/ GetCookie(this: Panel, cookieName: string, def: string): string /** * * Gets the size of the content/children within a panel object. * Only works with @Label type derived panels by default such as @DLabel type. * Will also work on any panel that manually implements this method. * [Category:Label](https://wiki.garrysmod.com/page/Category:Label) * * @name Panel:GetContentSize * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetContentSize * @param {Panel} this - no description * @returns {number} - The content width of the object. * @returns {number} - The content height of the object. * @tupleReturn **/ GetContentSize(this: Panel): [number, number] /** * * Returns the child of this panel object that is closest to the specified point. The point is relative to the object on which the method is called. The distance the child is from this point is also returned. * * @name Panel:GetClosestChild * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetClosestChild * @param {Panel} this - no description * @param {number} x - The horizontal (x) position of the point. * @param {number} y - The vertical (y) position of the point. * @returns {Panel} - The child object that was closest to the specified point. * @returns {number} - The distance that this child was from the point. * @tupleReturn **/ GetClosestChild(this: Panel, x: number, y: number): [Panel, number] /** * * Returns the class name of the panel. * * @name Panel:GetClassName * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetClassName * @param {Panel} this - no description * @returns {string} - className **/ GetClassName(this: Panel): string /** * * Returns a table of all visible, selectable children of the panel object that lie at least partially within the specified rectangle. * * @name Panel:GetChildrenInRect * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetChildrenInRect * @param {Panel} this - no description * @param {number} x - The horizontal (x) position of the top-left corner of the rectangle, relative to the panel object. * @param {number} y - The vertical (y) position of the top-left corner of the rectangle, relative to the panel object. * @param {number} w - The width of the rectangle. * @param {number} h - The height of the rectangle. * @returns {table} - A table of panel objects that lie at least partially within the specified rectangle. **/ GetChildrenInRect(this: Panel, x: number, y: number, w: number, h: number): table /** * * Returns a table with all the child panels of the panel. * * @name Panel:GetChildren * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetChildren * @param {Panel} this - no description * @returns {table} - children **/ GetChildren(this: Panel): table /** * * Gets a child object's position relative to this panel object. The number of levels is not relevant; the child may have many parents between itself and the object on which the method is called. * * @name Panel:GetChildPosition * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetChildPosition * @param {Panel} this - no description * @param {Panel} pnl - The panel to get the position of. * @returns {number} - The horizontal (x) position of the child relative to this panel object. * @returns {number} - The vertical (y) position of the child relative to this panel object. * @tupleReturn **/ GetChildPosition(this: Panel, pnl: Panel): [number, number] /** * * Gets a child by its index. * * @name Panel:GetChild * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetChild * @note This index starts at 0, except when you use this on a @DMenu type. * @param {Panel} this - no description * @param {number} childIndex - The index of the child to get. * @returns {void} **/ GetChild(this: Panel, childIndex: number): void /** * * Returns the position/offset of the caret (or text cursor) in a text-based panel object. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:GetCaretPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetCaretPos * @param {Panel} this - no description * @returns {number} - The caret position/offset from the start of the text. A value of *0* means the caret sits before the first character. **/ GetCaretPos(this: Panel): number /** * * Returns the position and size of the panel. * This is equivalent to calling @Panel:GetPos and @Panel:GetSize together. * * @name Panel:GetBounds * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetBounds * @param {Panel} this - no description * @returns {number} - The x coordinate of the panel, relative to its parent's top left. * @returns {number} - The y coordinate of the panel, relative to its parent's top left. * @returns {number} - The width of the panel. * @returns {number} - The height of the panel. * @tupleReturn **/ GetBounds(this: Panel): [number, number, number, number] /** * * Returns the alpha multiplier for this panel. * * @name Panel:GetAlpha * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/GetAlpha * @param {Panel} this - no description * @returns {number} - alphaMul **/ GetAlpha(this: Panel): number /** * * Focuses the previous panel in the focus queue. * * @name Panel:FocusPrevious * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/FocusPrevious * @param {Panel} this - no description * @returns {void} **/ FocusPrevious(this: Panel): void /** * * Focuses the next panel in the focus queue. * * @name Panel:FocusNext * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/FocusNext * @param {Panel} this - no description * @returns {void} **/ FocusNext(this: Panel): void /** * * Finds a panel in its children(and sub children) with the given name. * * @name Panel:Find * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Find * @param {Panel} this - no description * @param {string} panelName - The name of the panel that should be found. * @returns {Panel} - foundPanel **/ Find(this: Panel, panelName: string): Panel /** * * Completes a box selection. If the end point of the selection box is within the selection canvas, mouse capture is disabled for the panel object, and the selected state of each child object within the selection box is toggled. * * @name Panel:EndBoxSelection * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/EndBoxSelection * @param {Panel} this - no description * @returns {boolean} - Whether the end point of the selection box was within the selection canvas. **/ EndBoxSelection(this: Panel): boolean /** * * Used to run commands within a @DHTML type window. * * @name Panel:Exec * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Exec * @internal * @param {Panel} this - no description * @param {string} cmd - The command to be run. * @returns {void} **/ Exec(this: Panel, cmd: string): void /** * * Makes this panel droppable. This is used with @Panel:Receiver to create drag and drop events. * Can be called multiple times with different names allowing to be dropped onto different receivers. * * @name Panel:Droppable * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Droppable * @param {Panel} this - no description * @param {string} name - Name of your droppable panel * @returns {table} - Blank table stored on the panel itself under pnl.m_DragSlot[ name ]. Is reset every time this function is called and does not appear to be used or exposed anywhere else. **/ Droppable(this: Panel, name: string): table /** * * Draws a textured rectangle to fill the panel object this method is called on. The texture is set using @surface.SetTexture or @surface.SetMaterial. This should only be called within the object's @PanelHooks:Paint or @PanelHooks:PaintOver hooks, as a shortcut for @surface.DrawTexturedRect. * * @name Panel:DrawTexturedRect * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DrawTexturedRect * @param {Panel} this - no description * @returns {void} **/ DrawTexturedRect(this: Panel): void /** * * Used to draw the text in a @DTextEntry type within a derma skin. This should be called within the @SKIN:PaintTextEntry skin hook. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:DrawTextEntryText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DrawTextEntryText * @param {Panel} this - no description * @param {table} textCol - The colour of the main text. * @param {table} highlightCol - The colour of the selection highlight (when selecting text). * @param {table} cursorCol - The colour of the text cursor (or caret). * @returns {void} **/ DrawTextEntryText(this: Panel, textCol: table, highlightCol: table, cursorCol: table): void /** * * Used to draw the magenta highlight colour of a panel object when it is selected. This should be called in the object's @PanelHooks:PaintOver hook. Once this is implemented, the highlight colour will be displayed only when the object is selectable and selected. This is achieved using @Panel:SetSelectable and @Panel:SetSelected respectively. * * @name Panel:DrawSelections * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DrawSelections * @param {Panel} this - no description * @returns {void} **/ DrawSelections(this: Panel): void /** * * Draws a hollow rectangle the size of the panel object this method is called on, with a border width of 1 px. The border colour is set using @surface.SetDrawColor. This should only be called within the object's @PanelHooks:Paint or @PanelHooks:PaintOver hooks, as a shortcut for @surface.DrawOutlinedRect. * * @name Panel:DrawOutlinedRect * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DrawOutlinedRect * @param {Panel} this - no description * @returns {void} **/ DrawOutlinedRect(this: Panel): void /** * * Draws a coloured rectangle to fill the panel object this method is called on. The colour is set using @surface.SetDrawColor. This should only be called within the object's @PanelHooks:Paint or @PanelHooks:PaintOver hooks, as a shortcut for @surface.DrawRect. * * @name Panel:DrawFilledRect * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DrawFilledRect * @param {Panel} this - no description * @returns {void} **/ DrawFilledRect(this: Panel): void /** * * Called to inform the @dragndrop library that a mouse button has been depressed on a panel object. * * @name Panel:DragMouseRelease * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DragMouseRelease * @param {Panel} this - no description * @param {MOUSE} mouseCode - The code for the mouse button pressed, passed by, for example, @PanelHooks:OnMouseReleased. See the @MOUSE enum. * @returns {boolean} - *true* if an object was being dragged, otherwise *false*. **/ DragMouseRelease(this: Panel, mouseCode: MOUSE): boolean /** * * Called to draw the drop target when an object is being dragged across another. See @Panel:SetDropTarget. * * @name Panel:DrawDragHover * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DrawDragHover * @internal * @param {Panel} this - no description * @param {number} x - The x coordinate of the top-left corner of the drop area. * @param {number} y - The y coordinate of the top-left corner of the drop area. * @param {number} width - The width of the drop area. * @param {number} height - The height of the drop area. * @returns {void} **/ DrawDragHover(this: Panel, x: number, y: number, width: number, height: number): void /** * * Called to inform the @dragndrop library that a mouse button is being held down on a panel object. * * @name Panel:DragMousePress * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DragMousePress * @param {Panel} this - no description * @param {MOUSE} mouseCode - The code for the mouse button pressed, passed by, for example, @PanelHooks:OnMousePressed. See the @MOUSE enum. * @returns {void} **/ DragMousePress(this: Panel, mouseCode: MOUSE): void /** * * Called to end a drag and hover action. This resets the panel's @PanelHooks:PaintOver method, and is primarily used by @dragndrop.StopDragging. * * @name Panel:DragHoverEnd * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DragHoverEnd * @internal * @param {Panel} this - no description * @returns {void} **/ DragHoverEnd(this: Panel): void /** * * Called by @dragndrop.HoverThink to perform actions on an object that is dragged and hovered over another. * * @name Panel:DragHover * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DragHover * @internal * @param {Panel} this - no description * @param {number} HoverTime - If this time is greater than 0.1, @PanelHooks:DragHoverClick is called, passing it as an argument. * @returns {void} **/ DragHover(this: Panel, HoverTime: number): void /** * * Called by @Panel:DragMouseRelease when a user clicks one mouse button whilst dragging with another. * * @name Panel:DragClick * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DragClick * @internal * @param {Panel} this - no description * @returns {boolean} - Always returns *true*. **/ DragClick(this: Panel): boolean /** * * Makes the panel "lock" the screen until it is removed. It will silently fail if used while cursor is not visible. Call @Panel:MakePopup before calling this function. * * @name Panel:DoModal * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DoModal * @bug #3457 You can still click in the world even if locked. * @param {Panel} this - no description * @returns {void} **/ DoModal(this: Panel): void /** * * Sets the dock padding of the panel. * The dock padding is the extra space that will be left around the edge when child elements are docked inside this element. * * @name Panel:DockPadding * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DockPadding * @param {Panel} this - no description * @param {number} paddingLeft - The left padding to the parent. * @param {number} paddingTop - The top padding to the parent. * @param {number} paddingRight - The right padding to the parent. * @param {number} paddingBottom - The bottom padding to the parent. * @returns {void} **/ DockPadding(this: Panel, paddingLeft: number, paddingTop: number, paddingRight: number, paddingBottom: number): void /** * * Sets the dock margin of the panel. * The dock margin is the extra space that will be left around the edge when this element is docked inside its parent element. * * @name Panel:DockMargin * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DockMargin * @param {Panel} this - no description * @param {number} marginLeft - The left margin to the parent. * @param {number} marginTop - The top margin to the parent. * @param {number} marginRight - The right margin to the parent. * @param {number} marginBottom - The bottom margin to the parent. * @returns {void} **/ DockMargin(this: Panel, marginLeft: number, marginTop: number, marginRight: number, marginBottom: number): void /** * * Sets the dock type of the panel. * * @name Panel:Dock * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Dock * @note After using this function, if you want to get the correct panel's bounds (position, size), use @Panel:InvalidateParent (use **true** as argument if you need to update immediately) * @param {Panel} this - no description * @param {DOCK} dockType - Dock type using @DOCK enum. * @returns {void} **/ Dock(this: Panel, dockType: DOCK): void /** * * Returns the distance between the centre of this panel object and a specified point (local to the parent panel). * * @name Panel:DistanceFrom * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DistanceFrom * @param {Panel} this - no description * @param {number} posX - The horizontal (x) position in pixels of the point to compare with. Local to the parent panel, or container. * @param {number} posY - The vertical (y) position in pixels of the point to compare with. Local to the parent panel, or container. * @returns {number} - The linear (straight-line) distance between the specified point and the centre of the panel object. **/ DistanceFrom(this: Panel, posX: number, posY: number): number /** * * Returns the linear distance from the centre of this panel object and another. * * @name Panel:Distance * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Distance * @param {Panel} this - no description * @param {Panel} tgtPanel - The target object with which to compare position. * @returns {number} - The linear (straight-line) distance between the centres of the two objects. **/ Distance(this: Panel, tgtPanel: Panel): number /** * * Resets the panel object's @Panel:SetPos method and removes its animation table (*Panel.LerpAnim*). This effectively undoes the changes made by @Panel:LerpPositions. * In order to use Lerp animation again, you must call @Panel:Stop before setting its *SetPosReal* property to 'nil'. See the example below. * * @name Panel:DisableLerp * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DisableLerp * @param {Panel} this - no description * @returns {void} **/ DisableLerp(this: Panel): void /** * * Deletes a cookie value using the panel's cookie name ( @Panel:GetCookieName ) and the passed extension. * * @name Panel:DeleteCookie * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/DeleteCookie * @param {Panel} this - no description * @param {string} cookieName - The unique cookie name to delete. * @returns {void} **/ DeleteCookie(this: Panel, cookieName: string): void /** * * Performs the "CONTROL + X" ( delete text and copy it to clipboard buffer ) action on selected text. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:CutSelected * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CutSelected * @param {Panel} this - no description * @returns {void} **/ CutSelected(this: Panel): void /** * * Returns the cursor position relative to the top left of the panel. * This is equivalent to calling @gui.MousePos and then @Panel:ScreenToLocal. * * @name Panel:CursorPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CursorPos * @warning This function uses a cached value for the screen position of the panel, computed at the end of the last VGUI Think/Layout pass. * ie. inaccurate results may be returned if the panel or any of its ancestors have been repositioned outside of @PanelHooks:Think or @PanelHooks:PerformLayout within the last frame. * @param {Panel} this - no description * @returns {number} - X coordinate of the cursor, relative to the top left of the panel. * @returns {number} - Y coordinate of the cursor, relative to the top left of the panel. * @tupleReturn **/ CursorPos(this: Panel): [number, number] /** * * Copies the width of the panel. * * @name Panel:CopyWidth * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CopyWidth * @param {Panel} this - no description * @param {Panel} base - Panel to copy the width from. * @returns {void} **/ CopyWidth(this: Panel, base: Panel): void /** * * Performs the "CONTROL + C" key combination effect ( Copy selection to clipboard ) on selected text. * [Category:TextEntry](https://wiki.garrysmod.com/page/Category:TextEntry) * * @name Panel:CopySelected * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CopySelected * @param {Panel} this - no description * @returns {void} **/ CopySelected(this: Panel): void /** * * Copies the position of the panel. * * @name Panel:CopyPos * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CopyPos * @param {Panel} this - no description * @param {Panel} base - Panel to position the width from. * @returns {void} **/ CopyPos(this: Panel, base: Panel): void /** * * Copies the height of the panel. * * @name Panel:CopyHeight * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CopyHeight * @param {Panel} this - no description * @param {Panel} base - Panel to copy the height from. * @returns {void} **/ CopyHeight(this: Panel, base: Panel): void /** * * Copies position and size of the panel. * * @name Panel:CopyBounds * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CopyBounds * @param {Panel} this - no description * @param {Panel} base - The panel to copy size and position from. * @returns {void} **/ CopyBounds(this: Panel, base: Panel): void /** * * Gets the size, position and dock state of the passed panel object, and applies it to this one. * * @name Panel:CopyBase * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CopyBase * @param {Panel} this - no description * @param {Panel} srcPanel - The panel to copy the boundary and dock settings from. * @returns {void} **/ CopyBase(this: Panel, srcPanel: Panel): void /** * * A think hook for [panels](https://wiki.garrysmod.com/page/Panel) using ConVars as a value. Call it in the Think hook. Sets the panel's value should the convar change. * This function is best for: text inputs, read-only inputs, dropdown selects * For a number alternative, see [Panel.ConVarNumberThink](https://wiki.garrysmod.com/page/Panel/ConVarNumberThink). * *Important*: Make sure your Panel has a SetValue function, else you may get errors. * * @name Panel:ConVarStringThink * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ConVarStringThink * @param {Panel} this - no description * @returns {void} **/ ConVarStringThink(this: Panel): void /** * * Updates a panel object's associated console variable. This must first be set up with @Derma_Install_Convar_Functions function, and have a ConVar set using @Panel:SetConVar. * * @name Panel:ConVarChanged * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ConVarChanged * @param {Panel} this - no description * @param {string} newValue - The new value to set the associated console variable to. * @returns {void} **/ ConVarChanged(this: Panel, newValue: string): void /** * * Sends an action command signal to the panel. The response is handled by @PanelHooks:ActionSignal. * * @name Panel:Command * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Command * @param {Panel} this - no description * @param {string} command - The command to send to the panel. * @returns {void} **/ Command(this: Panel, command: string): void /** * * Fades panels color to specified one. It won't work unless panel has SetColor function. * * @name Panel:ColorTo * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ColorTo * @param {Panel} this - no description * @param {Color} color - The color to fade to * @param {number} length - Length of the animation * @param {number} delay - Delay before start fading * @param {function} callback - Function to execute when finished * @returns {void} **/ ColorTo(this: Panel, color: Color, length: number, delay: number, callback: UnknownFunc): void /** * * A think hook for @Panel types using ConVars as a value. Call it in the Think hook. Sets the panel's value should the convar change. * This function is best for: checkboxes, sliders, number wangs * For a string alternative, see [Panel.ConVarStringThink](https://wiki.garrysmod.com/page/Panel/ConVarStringThink). * *Important*: Make sure your Panel has a SetValue function, else you may get errors. * * @name Panel:ConVarNumberThink * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ConVarNumberThink * @param {Panel} this - no description * @returns {void} **/ ConVarNumberThink(this: Panel): void /** * * Marks all of the panel's children for deletion. * * @name Panel:Clear * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Clear * @param {Panel} this - no description * @returns {void} **/ Clear(this: Panel): void /** * * Returns the width and height of the space between the position of the panel (upper-left corner) and the max bound of the children panels (farthest reaching lower-right corner). * * @name Panel:ChildrenSize * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ChildrenSize * @param {Panel} this - no description * @returns {number} - The children size width. * @returns {number} - The children size height. * @tupleReturn **/ ChildrenSize(this: Panel): [number, number] /** * * Returns the amount of children of the of panel. * * @name Panel:ChildCount * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ChildCount * @param {Panel} this - no description * @returns {number} - The amount of children the panel has. **/ ChildCount(this: Panel): number /** * * Centers the panel vertically with specified fraction. * * @name Panel:CenterVertical * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CenterVertical * @param {Panel} this - no description * @param {number} fraction - The center fraction. * @returns {void} **/ CenterVertical(this: Panel, fraction?: number): void /** * * Centers the panel horizontally with specified fraction. * * @name Panel:CenterHorizontal * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/CenterHorizontal * @param {Panel} this - no description * @param {number} fraction - The center fraction. * @returns {void} **/ CenterHorizontal(this: Panel, fraction?: number): void /** * * Centers the panel on its parent. * * @name Panel:Center * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Center * @param {Panel} this - no description * @returns {void} **/ Center(this: Panel): void /** * * Used by @Panel:LoadGWENFile and @Panel:LoadGWENString to apply a GWEN controls table to a panel object. * You can do this manually using @file.Read and @util.JSONToTable to import and create a GWEN table structure from a *.gwen* file. This method can then be called, passing the GWEN table's *Controls* member. * * @name Panel:ApplyGWEN * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/ApplyGWEN * @param {Panel} this - no description * @param {table} GWENTable - The GWEN controls table to apply to the panel. * @returns {void} **/ ApplyGWEN(this: Panel, GWENTable: table): void /** * * Appends text to a @RichText type element. This does not automatically add a new line. * [Category:RichText](https://wiki.garrysmod.com/page/Category:RichText) * * @name Panel:AppendText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AppendText * @param {Panel} this - no description * @param {string} txt - The text to append (add on). * @returns {void} **/ AppendText(this: Panel, txt: string): void /** * * Returns the @SysTime function value when all animations for this panel object will end. * * @name Panel:AnimTail * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AnimTail * @param {Panel} this - no description * @returns {number} - The system time value when all animations will end for this panel. **/ AnimTail(this: Panel): number /** * * Performs the per-frame operations required for panel animations. * This is called every frame by @PanelHooks:AnimationThink. * * @name Panel:AnimationThinkInternal * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AnimationThinkInternal * @internal * @param {Panel} this - no description * @returns {void} **/ AnimationThinkInternal(this: Panel): void /** * * Uses animation to transition the current alpha value of a panel to a new alpha, over a set period of time and after a specified delay. * * @name Panel:AlphaTo * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AlphaTo * @param {Panel} this - no description * @param {number} alpha - The alpha value (0-255) to approach. * @param {number} duration - The time in seconds it should take to reach the alpha. * @param {number} delay - The delay before the animation starts. * @param {function} callback - The function to be called once the animation finishes. Arguments are: * @returns {void} **/ AlphaTo(this: Panel, alpha: number, duration: number, delay?: number, callback: PanelAlphaToCallback): void /** * * Aligns the panel on the top of its parent with the specified offset. * * @name Panel:AlignTop * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AlignTop * @param {Panel} this - no description * @param {number} offset - The align offset. * @returns {void} **/ AlignTop(this: Panel, offset?: number): void /** * * Aligns the panel on the right of its parent with the specified offset. * * @name Panel:AlignRight * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AlignRight * @param {Panel} this - no description * @param {number} offset - The align offset. * @returns {void} **/ AlignRight(this: Panel, offset?: number): void /** * * Aligns the panel on the left of its parent with the specified offset. * * @name Panel:AlignLeft * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AlignLeft * @param {Panel} this - no description * @param {number} offset - The align offset. * @returns {void} **/ AlignLeft(this: Panel, offset?: number): void /** * * Aligns the panel on the bottom of its parent with the specified offset. * * @name Panel:AlignBottom * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AlignBottom * @param {Panel} this - no description * @param {number} offset - The align offset. * @returns {void} **/ AlignBottom(this: Panel, offset?: number): void /** * * This function does nothing. * * @name Panel:AddText * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/AddText * @param {Panel} this - no description * @returns {void} **/ AddText(this: Panel): void /** * * Adds the specified object to the panel. * * @name Panel:Add * @realm client * @wiki https://wiki.garrysmod.com/page/Panel/Add * @param {Panel} this - no description * @param {string | Panel} object - The panel to be added (parented). Can also be: * @returns {Panel} - New panel **/ Add(this: Panel, object: string | Panel): Panel } declare interface PanelHooks { /** * * Called every frame while @Panel:IsVisible is true. * * @name PanelHooks:Think * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/Think * @param {Panel} this - no description * @returns {void} **/ Think(this: Panel): void /** * * Only works on elements defined with @derma.DefineControl and only if the panel has **AllowAutoRefresh** set to true. * Called when @derma.DefineControl is called with this panel's class name before applying changes to this panel. * See also @PanelHooks:PostAutoRefresh * * @name PanelHooks:PreAutoRefresh * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/PreAutoRefresh * @param {Panel} this - no description * @returns {void} **/ PreAutoRefresh(this: Panel): void /** * * Only works on elements defined with @derma.DefineControl and only if the panel has **AllowAutoRefresh** set to true. * Called after @derma.DefineControl is called with panel's class name. * See also @PanelHooks:PreAutoRefresh * * @name PanelHooks:PostAutoRefresh * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/PostAutoRefresh * @param {Panel} this - no description * @returns {void} **/ PostAutoRefresh(this: Panel): void /** * * Called whenever the panels layout was invalidated. This means all child panels must be re-positioned to fit the possibly new size of this panel. * * @name PanelHooks:PerformLayout * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/PerformLayout * @warning Do **NOT** call this function directly. Use @Panel:InvalidateLayout instead! * @param {Panel} this - no description * @param {number} width - The panels current width. * @param {number} height - The panels current height. * @returns {void} **/ PerformLayout(this: Panel, width: number, height: number): void /** * * Called whenever the panel and all its children were drawn, return true to override the default drawing. * * @name PanelHooks:PaintOver * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/PaintOver * @param {Panel} this - no description * @param {number} width - The panels current width. * @param {number} height - The panels current height. * @returns {boolean} - Should we disable default PaintOver rendering? This is useful in case with Derma panels that use Derma hooks. **/ PaintOver(this: Panel, width: number, height: number): boolean /** * * Called whenever the panel should be drawn. * You can create panels with a customized appearance by overriding their Paint() function, which will prevent the default appearance from being drawn. * * @name PanelHooks:Paint * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/Paint * @note Render operations from the @surface library (and consequentially the @draw library) are always offset by the global position of this panel, as seen in the example below * @note This hook will not run if the panel is completely off the screen. The hook will still run however if any parts of the panel are still on screen. * @param {Panel} this - no description * @param {number} width - The panel's width. * @param {number} height - The panel's height. * @returns {boolean} - Returning true prevents the background from being drawn. **/ Paint(this: Panel, width: number, height: number): boolean /** * * Called by @Panel:DragMouseRelease when the panel object is released after being dragged. * * @name PanelHooks:OnStopDragging * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnStopDragging * @internal * @param {Panel} this - no description * @returns {void} **/ OnStopDragging(this: Panel): void /** * * Called by @dragndrop.StartDragging when the panel starts being dragged. * * @name PanelHooks:OnStartDragging * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnStartDragging * @internal * @param {Panel} this - no description * @returns {void} **/ OnStartDragging(this: Panel): void /** * * Called just after the panel size changes. * All size functions will return the new values when this hook is called. * * @name PanelHooks:OnSizeChanged * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnSizeChanged * @warning Changing the panel size in this hook will cause an infinite loop! * @param {Panel} this - no description * @param {number} newWidth - The new width of the panel * @param {number} newHeight - The new height of the panel * @returns {void} **/ OnSizeChanged(this: Panel, newWidth: number, newHeight: number): void /** * * Called when the player's screen resolution of the game changes. * @ScrW function and @ScrH function will return the new values when this hook is called. * * @name PanelHooks:OnScreenSizeChanged * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnScreenSizeChanged * @param {Panel} this - no description * @param {number} oldWidth - The previous width of the game's window * @param {number} oldHeight - The previous height of the game's window * @returns {void} **/ OnScreenSizeChanged(this: Panel, oldWidth: number, oldHeight: number): void /** * * Called when the panel is about to be removed. * * @name PanelHooks:OnRemove * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnRemove * @param {Panel} this - no description * @returns {void} **/ OnRemove(this: Panel): void /** * * Called whenever the mouse wheel was used. * * @name PanelHooks:OnMouseWheeled * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnMouseWheeled * @param {Panel} this - no description * @param {number} scrollDelta - The scroll delta, indicating how much the user turned the mouse wheel. * @returns {boolean} - Return true to suppress default action. **/ OnMouseWheeled(this: Panel, scrollDelta: number): boolean /** * * Called whenever a mouse key was released while the panel is focused. * * @name PanelHooks:OnMouseReleased * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnMouseReleased * @param {Panel} this - no description * @param {MOUSE} keyCode - They key code of the key released, see @MOUSE enum. * @returns {boolean} - Return true to suppress default action. **/ OnMouseReleased(this: Panel, keyCode: MOUSE): boolean /** * * Called whenever a mouse key was pressed while the panel is focused. * * @name PanelHooks:OnMousePressed * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnMousePressed * @param {Panel} this - no description * @param {MOUSE} keyCode - They key code of the key pressed, see @MOUSE enum. * @returns {boolean} - Return true to suppress default action such as right click opening edit menu for @DTextEntry type. **/ OnMousePressed(this: Panel, keyCode: MOUSE): boolean /** * * Called whenever a keyboard key was released while the panel is focused. * * @name PanelHooks:OnKeyCodeReleased * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnKeyCodeReleased * @bug #2886 This is not run for TILDE/"toggleconsole" binding. * @param {Panel} this - no description * @param {KEY} keyCode - The key code of the released key, see @KEY enum. * @returns {boolean} - Return true to suppress default action. **/ OnKeyCodeReleased(this: Panel, keyCode: KEY): boolean /** * * Called whenever a keyboard key was pressed while the panel is focused. * * @name PanelHooks:OnKeyCodePressed * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnKeyCodePressed * @bug #2886 This is not run for ESC/"cancelselect" binding. * @param {Panel} this - no description * @param {KEY} keyCode - The key code of the pressed key, see @KEY enum. * @returns {boolean} - Return true to suppress default action. **/ OnKeyCodePressed(this: Panel, keyCode: KEY): boolean /** * * Called whenever the panel gained or lost focus. * * @name PanelHooks:OnFocusChanged * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnFocusChanged * @note @Panel:HasFocus will only be updated on the next frame and will return the "old" value at the time this hook is run. Same goes for @vgui.GetKeyboardFocus. * @param {Panel} this - no description * @param {boolean} gained - Is the focus was gained ( true ) or lost ( false ) * @returns {void} **/ OnFocusChanged(this: Panel, gained: boolean): void /** * * We're being dropped on something * We can create a new panel here and return it, so that instead of dropping us - it drops the new panel instead! We remain where we are! * Only works for panels derived from @DDragBase type. * * @name PanelHooks:OnDrop * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnDrop * @param {Panel} this - no description * @returns {Panel} - The panel to drop instead of us. By default you should return self. **/ OnDrop(this: Panel): Panel /** * * Called by HTML panels when the panel's DOM has been set up. You can run JavaScript in here. * * @name PanelHooks:OnDocumentReady * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnDocumentReady * @param {Panel} this - no description * @param {string} url - The URL of the current page. * @returns {void} **/ OnDocumentReady(this: Panel, url: string): void /** * * Called when we are deactivated during level load. Used by the loading screen panel. * * @name PanelHooks:OnDeactivate * @predicted false * @realm client, menu * @wiki https://wiki.garrysmod.com/page/PANEL/OnDeactivate * @internal * @param {Panel} this - no description * @returns {void} **/ OnDeactivate(this: Panel): void /** * * Called whenever the cursor was moved with the panels bounds. * * @name PanelHooks:OnCursorMoved * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnCursorMoved * @param {Panel} this - no description * @param {number} cursorX - The new x position of the cursor relative to the panels origin. * @param {number} cursorY - The new y position of the cursor relative to the panels origin. * @returns {boolean} - Return true to suppress default action. **/ OnCursorMoved(this: Panel, cursorX: number, cursorY: number): boolean /** * * Called whenever the cursor left the panels bounds. * * @name PanelHooks:OnCursorExited * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnCursorExited * @param {Panel} this - no description * @returns {void} **/ OnCursorExited(this: Panel): void /** * * Called whenever the cursor entered the panels bounds. * * @name PanelHooks:OnCursorEntered * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnCursorEntered * @param {Panel} this - no description * @returns {void} **/ OnCursorEntered(this: Panel): void /** * * Called by HTML panels when the page attempts to open a new child view (such as a popup or new tab). * * @name PanelHooks:OnChildViewCreated * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnChildViewCreated * @param {Panel} this - no description * @param {string} sourceURL - The URL of the page requesting to create a child. * @param {string} targetURL - The URL of the requested child. * @param {boolean} isPopup - True if the requested view is a popup. * @returns {void} **/ OnChildViewCreated(this: Panel, sourceURL: string, targetURL: string, isPopup: boolean): void /** * * Called whenever a child of the panel is about to removed. * * @name PanelHooks:OnChildRemoved * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnChildRemoved * @param {Panel} this - no description * @param {Panel} child - The child which is about to be removed. * @returns {void} **/ OnChildRemoved(this: Panel, child: Panel): void /** * * Called whenever a child was parented to the panel. * * @name PanelHooks:OnChildAdded * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnChildAdded * @bug #2759 This is called before the panel's metatable is set. * @param {Panel} this - no description * @param {Panel} child - The child which was added. * @returns {void} **/ OnChildAdded(this: Panel, child: Panel): void /** * * Called by HTML panels when the title of the loaded page has been changed. * * @name PanelHooks:OnChangeTitle * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnChangeTitle * @param {Panel} this - no description * @param {string} newTitle - The new title of the page. * @returns {void} **/ OnChangeTitle(this: Panel, newTitle: string): void /** * * Called by HTML panels when the target URL of the frame has changed, this happens when you hover over a link. * * @name PanelHooks:OnChangeTitle * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/OnChangeTargetURL * @param {Panel} this - no description * @param {string} targetURL - New target URL. * @returns {void} **/ OnChangeTitle(this: Panel, targetURL: string): void /** * * Called when we are activated during level load. Used by the loading screen panel. * * @name PanelHooks:OnActivate * @predicted false * @realm client, menu * @wiki https://wiki.garrysmod.com/page/PANEL/OnActivate * @internal * @param {Panel} this - no description * @returns {void} **/ OnActivate(this: Panel): void /** * * Called after @Panel:SetCookieName is called on this panel to apply the just loaded cookie values for this panel. * * @name PanelHooks:LoadCookies * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/LoadCookies * @param {Panel} this - no description * @returns {void} **/ LoadCookies(this: Panel): void /** * * Called when the panel is created. This is called for each base type that the panel has. * * @name PanelHooks:Init * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/Init * @param {Panel} this - no description * @returns {void} **/ Init(this: Panel): void /** * * Called when the panel should generate example use case / example code to use for this panel. Used in the panel opened by **derma_controls** console command. * * @name PanelHooks:GenerateExample * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/GenerateExample * @param {Panel} this - no description * @param {string} cls - The classname of the panel to generate example for. This will be the class name of your panel. * @param {DPropertySheet} dpropertysheet - A @DPropertySheet type to add your example to. See examples below. * @param {number} width - Width of the property sheet? * @param {number} height - Width of the property sheet? * @returns {void} **/ GenerateExample(this: Panel, cls: string, dpropertysheet: DPropertySheet, width: number, height: number): void /** * * Called when this panel is dropped onto another panel. * Only works for panels derived from @DDragBase type. * * @name PanelHooks:DroppedOn * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/DroppedOn * @param {Panel} this - no description * @param {Panel} pnl - The panel we are dropped onto * @returns {void} **/ DroppedOn(this: Panel, pnl: Panel): void /** * * Called when an object is dragged and hovered over this panel for 0.1 seconds. * This is used by @DPropertySheet type and @DTree type, for example to open a tab or expand a node when an object is hovered over it. * * @name PanelHooks:DragHoverClick * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/DragHoverClick * @param {Panel} this - no description * @param {number} hoverTime - The time the object was hovered over this panel. * @returns {void} **/ DragHoverClick(this: Panel, hoverTime: number): void /** * * Called whenever the panel should apply its scheme(style). * * @name PanelHooks:ApplySchemeSettings * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/ApplySchemeSettings * @param {Panel} this - no description * @returns {void} **/ ApplySchemeSettings(this: Panel): void /** * * Called every frame unless @Panel:IsVisible is set to false. Similar to @PanelHooks:Think, but can be disabled by @Panel:SetAnimationEnabled as explained below. * If you are overriding this, you must call @Panel:AnimationThinkInternal every frame, else animations will cease to work. * If you want to "disable" this hook with @Panel:SetAnimationEnabled, you must call it after defining this hook. Once disabled, a custom hook **will not** be re-enabled by @Panel:SetAnimationEnabled again - the hook will have to be re-defined. * * @name PanelHooks:AnimationThink * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/AnimationThink * @param {Panel} this - no description * @returns {void} **/ AnimationThink(this: Panel): void /** * * Called whenever a panel receives a command signal from one of its children. * This hook is called when using @Panel:Command, when clicking a @Button type with @Panel:SetCommand set, and when clicking text within a @RichText type panel that is marked as click-able. * * @name PanelHooks:ActionSignal * @realm client * @wiki https://wiki.garrysmod.com/page/PANEL/ActionSignal * @param {Panel} this - no description * @param {string} signalName - The name of the signal, usually the sender of the signal or the command name. * @param {string} signalValue - The value of the signal, usually a command argument. * @returns {void} **/ ActionSignal(this: Panel, signalName: string, signalValue: string): void } declare interface PathFollower { /** * * Move the bot along the path. * * @name PathFollower:Update * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/Update * @param {PathFollower} this - no description * @param {NextBot} bot - The bot to update along the path * @returns {void} **/ Update(this: PathFollower, bot: NextBot): void /** * * Sets minimum range movement goal must be along path * * @name PathFollower:SetMinLookAheadDistance * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/SetMinLookAheadDistance * @param {PathFollower} this - no description * @param {number} mindist - The minimum look ahead distance * @returns {void} **/ SetMinLookAheadDistance(this: PathFollower, mindist: number): void /** * * How close we can get to the goal to call it done * * @name PathFollower:SetGoalTolerance * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/SetGoalTolerance * @param {PathFollower} this - no description * @param {number} distance - The distance we're setting it to * @returns {void} **/ SetGoalTolerance(this: PathFollower, distance: number): void /** * * Moves the cursor to the end of the path * * @name PathFollower:MoveCursorToStart * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/MoveCursorToStart * @param {PathFollower} this - no description * @returns {void} **/ MoveCursorToStart(this: PathFollower): void /** * * Resets the age which is retrieved by @PathFollower:GetAge to 0. * * @name PathFollower:ResetAge * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/ResetAge * @param {PathFollower} this - no description * @returns {void} **/ ResetAge(this: PathFollower): void /** * * Moves the cursor to the end of the path * * @name PathFollower:MoveCursorToEnd * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/MoveCursorToEnd * @param {PathFollower} this - no description * @returns {void} **/ MoveCursorToEnd(this: PathFollower): void /** * * Moves the cursor of the path to the closest position compared to given vector. * * @name PathFollower:MoveCursorToClosestPosition * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/MoveCursorToClosestPosition * @param {PathFollower} this - no description * @param {Vector} pos - no description * @param {number} type - Seek type * 0 = SEEK_ENTIRE_PATH - Search the entire path length * 1 = SEEK_AHEAD - Search from current cursor position forward toward end of path * 2 = SEEK_BEHIND - Search from current cursor position backward toward path start * @param {number} alongLimit - no description * @returns {void} **/ MoveCursorToClosestPosition(this: PathFollower, pos: Vector, type?: number, alongLimit?: number): void /** * * Sets the cursor position to given distance. * For relative distance, see @PathFollower:MoveCursor. * * @name PathFollower:MoveCursorTo * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/MoveCursorTo * @param {PathFollower} this - no description * @param {number} distance - The distance to move the cursor (in world units) * @returns {void} **/ MoveCursorTo(this: PathFollower, distance: number): void /** * * Moves the cursor by give distance. * For a function that sets the distance, see @PathFollower:MoveCursorTo. * * @name PathFollower:MoveCursor * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/MoveCursor * @param {PathFollower} this - no description * @param {number} distance - The distance to move the cursor (in relative world units) * @returns {void} **/ MoveCursor(this: PathFollower, distance: number): void /** * * Returns the last segment of the path. * * @name PathFollower:LastSegment * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/LastSegment * @param {PathFollower} this - no description * @returns {PathSegment} - A table with @PathSegment structure. **/ LastSegment(this: PathFollower): PathSegment /** * * Returns true if the path is valid * * @name PathFollower:IsValid * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/IsValid * @param {PathFollower} this - no description * @returns {boolean} - Wether the path is valid or not. **/ IsValid(this: PathFollower): boolean /** * * Invalidates the current path * * @name PathFollower:Invalidate * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/Invalidate * @param {PathFollower} this - no description * @returns {void} **/ Invalidate(this: PathFollower): void /** * * Returns the path start position * * @name PathFollower:GetStart * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetStart * @param {PathFollower} this - no description * @returns {Vector} - The start position **/ GetStart(this: PathFollower): Vector /** * * Returns the vector position of distance along path * * @name PathFollower:GetPositionOnPath * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetPositionOnPath * @param {PathFollower} this - no description * @param {number} distance - The distance along the path to query * @returns {Vector} - The position **/ GetPositionOnPath(this: PathFollower, distance: number): Vector /** * * Returns the minimum range movement goal must be along path. * * @name PathFollower:GetMinLookAheadDistance * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetMinLookAheadDistance * @param {PathFollower} this - no description * @returns {number} - The minimum look ahead distance **/ GetMinLookAheadDistance(this: PathFollower): number /** * * Returns the total length of the path * * @name PathFollower:GetLength * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetLength * @param {PathFollower} this - no description * @returns {number} - The length of the path **/ GetLength(this: PathFollower): number /** * @name PathFollower:GetHindrance * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetHindrance * @param {PathFollower} this - no description * @returns {Entity} - no description **/ GetHindrance(this: PathFollower): Entity /** * * Returns how close we can get to the goal to call it done. * * @name PathFollower:GetGoalTolerance * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetGoalTolerance * @param {PathFollower} this - no description * @returns {number} - The distance we're setting it to **/ GetGoalTolerance(this: PathFollower): number /** * * Returns the path end position * * @name PathFollower:GetEnd * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetEnd * @param {PathFollower} this - no description * @returns {Vector} - The end position **/ GetEnd(this: PathFollower): Vector /** * * Returns the current progress along the path * * @name PathFollower:GetCursorPosition * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetCursorPosition * @param {PathFollower} this - no description * @returns {number} - The current progress **/ GetCursorPosition(this: PathFollower): number /** * * Returns the cursor data * * @name PathFollower:GetCursorData * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetCursorData * @param {PathFollower} this - no description * @returns {IPathFollowerGetCursorDataReturn} - A table with 3 keys: **/ GetCursorData(this: PathFollower): IPathFollowerGetCursorDataReturn /** * * Returns the current goal data. Can return nil if the current goal is invalid, for example immediately after @PathFollower:Update. * * @name PathFollower:GetCurrentGoal * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetCurrentGoal * @param {PathFollower} this - no description * @returns {PathSegment} - A table with @PathSegment structure. **/ GetCurrentGoal(this: PathFollower): PathSegment /** * * The closest position along the path to a position * * @name PathFollower:GetClosestPosition * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetClosestPosition * @param {PathFollower} this - no description * @param {Vector} position - The point we're querying for * @returns {Vector} - The closest position on the path **/ GetClosestPosition(this: PathFollower, position: Vector): Vector /** * * Returns the age since the path was built * * @name PathFollower:GetAge * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetAge * @param {PathFollower} this - no description * @returns {number} - Path age **/ GetAge(this: PathFollower): number /** * * Returns the first segment of the path. * * @name PathFollower:FirstSegment * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/FirstSegment * @param {PathFollower} this - no description * @returns {PathSegment} - A table with @PathSegment structure. **/ FirstSegment(this: PathFollower): PathSegment /** * * Draws the path. This is meant for debugging - and uses debug overlay. * * @name PathFollower:Draw * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/Draw * @param {PathFollower} this - no description * @returns {void} **/ Draw(this: PathFollower): void /** * * Compute shortest path from bot to 'goal' via A* algorithm. * * @name PathFollower:Compute * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/Compute * @param {PathFollower} this - no description * @param {NextBot} from - The nextbot we're generating for * @param {Vector} to - To point * @param {function} generator - A funtion that allows you to alter the path generation. See example below for the default function. * @returns {boolean} - * If returns true, path was found to the goal position. * * If returns false, path may either be invalid (use IsValid() to check), or valid but doesn't reach all the way to the goal. **/ Compute(this: PathFollower, from: NextBot, to: Vector, generator?: UnknownFunc): boolean /** * * If you created your path with type "Chase" this functions should be used in place of @PathFollower:Update to cause the bot to chase the specified entity. * * @name PathFollower:Chase * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/Chase * @param {PathFollower} this - no description * @param {NextBot} bot - The bot to update along the path * @param {Entity} ent - The entity we want to chase * @returns {void} **/ Chase(this: PathFollower, bot: NextBot, ent: Entity): void /** * * Returns all of the segments of the given path. * * @name PathFollower:GetAllSegments * @realm server * @wiki https://wiki.garrysmod.com/page/PathFollower/GetAllSegments * @param {PathFollower} this - no description * @returns {table[]} - A table of tables with @PathSegment structure. **/ GetAllSegments(this: PathFollower): table[] } declare interface NPC extends Entity { /** * * Undoes the other Use*Behavior functions. * Only usable on "ai" base entities. * * @name NPC:UseNoBehavior * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/UseNoBehavior * @param {NPC} this - no description * @returns {void} **/ UseNoBehavior(this: NPC): void /** * @name NPC:UseLeadBehavior * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/UseLeadBehavior * @param {NPC} this - no description * @returns {boolean} - no description **/ UseLeadBehavior(this: NPC): boolean /** * @name NPC:UseFuncTankBehavior * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/UseFuncTankBehavior * @param {NPC} this - no description * @returns {boolean} - no description **/ UseFuncTankBehavior(this: NPC): boolean /** * * Only usable on "ai" base entities. * * @name NPC:UseFollowBehavior * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/UseFollowBehavior * @param {NPC} this - no description * @returns {boolean} - If we succeeded setting the behavior. **/ UseFollowBehavior(this: NPC): boolean /** * @name NPC:UseAssaultBehavior * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/UseAssaultBehavior * @param {NPC} this - no description * @returns {boolean} - no description **/ UseAssaultBehavior(this: NPC): boolean /** * * Only usable on "ai" base entities. * * @name NPC:UseActBusyBehavior * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/UseActBusyBehavior * @param {NPC} this - no description * @returns {boolean} - If we succeeded setting the behavior. **/ UseActBusyBehavior(this: NPC): boolean /** * * Force the NPC to update information on the supplied enemy, as if it had line of sight to it. * * @name NPC:UpdateEnemyMemory * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/UpdateEnemyMemory * @param {NPC} this - no description * @param {Entity} enemy - The enemy to update. * @param {Vector} pos - The last known position of the enemy. * @returns {void} **/ UpdateEnemyMemory(this: NPC, enemy: Entity, pos: Vector): void /** * * Marks the current NPC task as failed. * This is meant to be used alongside @NPC:TaskComplete to complete or fail custom Lua defined tasks. (@Schedule:AddTask) * * @name NPC:TaskFail * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/TaskFail * @param {NPC} this - no description * @param {string} task - A string most likely defined as a Source Task, for more information on Tasks go to https://developer.valvesoftware.com/wiki/Task * @returns {void} **/ TaskFail(this: NPC, task: string): void /** * * Marks the current NPC task as completed. * This is meant to be used alongside @NPC:TaskFail to complete or fail custom Lua defined tasks. (@Schedule:AddTask) * * @name NPC:TaskComplete * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/TaskComplete * @param {NPC} this - no description * @returns {void} **/ TaskComplete(this: NPC): void /** * * Cancels @NPC:MoveOrder basically. * Only works on Citizens (npc_citizen) and is a part of the Half-Life 2 squad system. * The NPC **must** be in the player's squad for this to work. * * @name NPC:TargetOrder * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/TargetOrder * @param {NPC} this - no description * @param {Entity} target - Must be a player, does nothing otherwise. * @returns {void} **/ TargetOrder(this: NPC, target: Entity): void /** * * Resets the NPC's movement animation and velocity. Does not actually stop the NPC from moving. * * @name NPC:StopMoving * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/StopMoving * @param {NPC} this - no description * @returns {void} **/ StopMoving(this: NPC): void /** * * Forces the NPC to start an engine task, this has different results for every NPC. * * @name NPC:StartEngineTask * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/StartEngineTask * @param {NPC} this - no description * @param {number} task - The id of the task to start, see [ai_task.h](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/server/ai_task.h#L89-L502) * @param {number} taskData - The task data as a float, not all tasks make use of it. * @returns {void} **/ StartEngineTask(this: NPC, task: number, taskData: number): void /** * * Sets the NPC's target. This is used in some engine schedules. * * @name NPC:SetTarget * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetTarget * @param {NPC} this - no description * @param {Entity} entity - The target of the NPC. * @returns {void} **/ SetTarget(this: NPC, entity: Entity): void /** * * Sets the NPC's current schedule. * * @name NPC:SetSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetSchedule * @param {NPC} this - no description * @param {SCHED} schedule - The NPC schedule, see @SCHED enum. * @returns {void} **/ SetSchedule(this: NPC, schedule: SCHED): void /** * * Sets the state the NPC is in to help it decide on a ideal schedule. * * @name NPC:SetNPCState * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetNPCState * @param {NPC} this - no description * @param {NPC_STATE} state - New NPC state, see @NPC_STATE enum * @returns {void} **/ SetNPCState(this: NPC, state: NPC_STATE): void /** * * Sets the sequence the NPC navigation path uses for speed calculation. Doesn't seem to have any visible effect on NPC movement. * * @name NPC:SetMovementSequence * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetMovementSequence * @param {NPC} this - no description * @param {number} sequenceId - The movement sequence index * @returns {void} **/ SetMovementSequence(this: NPC, sequenceId: number): void /** * * Sets the activity the NPC uses when it moves. * * @name NPC:SetMovementActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetMovementActivity * @param {NPC} this - no description * @param {ACT} activity - The movement activity, see @ACT enum. * @returns {void} **/ SetMovementActivity(this: NPC, activity: ACT): void /** * * Sets how how long to try rebuilding path before failing task. * * @name NPC:SetMaxRouteRebuildTime * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetMaxRouteRebuildTime * @param {NPC} this - no description * @param {number} time - How long to try rebuilding path before failing task * @returns {void} **/ SetMaxRouteRebuildTime(this: NPC, time: number): void /** * * Sets the last registered or memorized position for an npc. When using scheduling, the NPC will focus on navigating to the last position via nodes. * * @name NPC:SetLastPosition * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetLastPosition * @note The navigation requires ground nodes to function properly, otherwise the NPC could only navigate in a small area. (https://developer.valvesoftware.com/wiki/Info_node) * @param {NPC} this - no description * @param {Vector} Position - Where the NPC's last position will be set. * @returns {void} **/ SetLastPosition(this: NPC, Position: Vector): void /** * * Updates the NPC's hull and physics hull in order to match its model scale. @EntityFuncs:SetModelScale seems to take care of this regardless. * * @name NPC:SetHullSizeNormal * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetHullSizeNormal * @param {NPC} this - no description * @returns {void} **/ SetHullSizeNormal(this: NPC): void /** * * Sets the hull type for the NPC. * * @name NPC:SetHullType * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetHullType * @param {NPC} this - no description * @param {HULL} hullType - Hull type. See @HULL enum * @returns {void} **/ SetHullType(this: NPC, hullType: HULL): void /** * * Sets the NPC's .vcd expression. Similar to @EntityFuncs:PlayScene except the scene is looped until it's interrupted by default NPC behavior or @NPC:ClearExpression. * * @name NPC:SetExpression * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetExpression * @param {NPC} this - no description * @param {string} expression - The expression filepath. * @returns {number} - no description **/ SetExpression(this: NPC, expression: string): number /** * * Sets the target for an NPC. * * @name NPC:SetEnemy * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetEnemy * @param {NPC} this - no description * @param {Entity} enemy - The enemy that the NPC should target * @param {boolean} newenemy - Calls @NPC:SetCondition(COND_NEW_ENEMY) if the new enemy is valid and not equal to the last enemy. * @returns {void} **/ SetEnemy(this: NPC, enemy: Entity, newenemy?: boolean): void /** * * Sets the weapon proficiency of an NPC (how skilled an NPC is with its current weapon). * * @name NPC:SetCurrentWeaponProficiency * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetCurrentWeaponProficiency * @param {NPC} this - no description * @param {WEAPON_PROFICIENCY} proficiency - The proficiency for the NPC's current weapon. See @WEAPON_PROFICIENCY enum. * @returns {void} **/ SetCurrentWeaponProficiency(this: NPC, proficiency: WEAPON_PROFICIENCY): void /** * * Sets an NPC condition. * * @name NPC:SetCondition * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetCondition * @param {NPC} this - no description * @param {COND} condition - The condition index, see @COND enum. * @returns {void} **/ SetCondition(this: NPC, condition: COND): void /** * @name NPC:SetArrivalSpeed * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetArrivalSpeed * @param {NPC} this - no description * @returns {void} **/ SetArrivalSpeed(this: NPC): void /** * @name NPC:SetArrivalSequence * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetArrivalSequence * @param {NPC} this - no description * @returns {void} **/ SetArrivalSequence(this: NPC): void /** * * Sets the distance to goal at which the NPC should stop moving and continue to other business such as doing the rest of their tasks in a schedule. * * @name NPC:SetArrivalDistance * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetArrivalDistance * @param {NPC} this - no description * @param {number} dist - The distance to goal that is close enough for the NPC * @returns {void} **/ SetArrivalDistance(this: NPC, dist: number): void /** * @name NPC:SetArrivalActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetArrivalActivity * @param {NPC} this - no description * @param {number} act - no description * @returns {void} **/ SetArrivalActivity(this: NPC, act: number): void /** * @name NPC:SetArrivalDirection * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SetArrivalDirection * @param {NPC} this - no description * @returns {void} **/ SetArrivalDirection(this: NPC): void /** * * Stops any sounds (speech) the NPC is currently palying. * Equivalent to Entity:EmitSound( "AI_BaseNPC.SentenceStop" )``` * * @name NPC:SentenceStop * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/SentenceStop * @param {NPC} this - no description * @returns {void} **/ SentenceStop(this: NPC): void /** * * Starts an engine task. * Used internally by the @ai_task library. * * @name NPC:RunEngineTask * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/RunEngineTask * @param {NPC} this - no description * @param {number} taskID - The task ID, see [ai_task.h](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/server/ai_task.h#L89-L502) * @param {number} taskData - The task data. * @returns {void} **/ RunEngineTask(this: NPC, taskID: number, taskData: number): void /** * * This function crashes the game no matter how it is used and will be removed in a future update. * Use @NPC:ClearEnemyMemory instead. * * @name NPC:RemoveMemory * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/RemoveMemory * @param {NPC} this - no description * @returns {void} **/ RemoveMemory(this: NPC): void /** * * Forces the NPC to play a sentence from scripts/sentences.txt * * @name NPC:PlaySentence * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/PlaySentence * @param {NPC} this - no description * @param {string} sentence - The sentence string to speak. * @param {number} delay - Delay in seconds until the sentence starts playing. * @param {number} volume - The volume of the sentence, from 0 to 1. * @returns {number} - Returns the sentence index, -1 if the sentence couldn't be played. **/ PlaySentence(this: NPC, sentence: string, delay: number, volume: number): number /** * * Sets a goal in x, y offsets for the npc to wander to * * @name NPC:NavSetWanderGoal * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/NavSetWanderGoal * @param {NPC} this - no description * @param {number} xoffset - X offset * @param {number} yoffset - Y offset * @returns {void} **/ NavSetWanderGoal(this: NPC, xoffset: number, yoffset: number): void /** * * Creates a random path of specified minimum length between a closest start node and random node in the specified direction. * * @name NPC:NavSetRandomGoal * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/NavSetRandomGoal * @param {NPC} this - no description * @param {number} minPathLength - Minimum length of path in units * @param {Vector} dir - Unit vector pointing in the direction of the target random node * @returns {void} **/ NavSetRandomGoal(this: NPC, minPathLength: number, dir: Vector): void /** * * Set the goal target for an NPC. * * @name NPC:NavSetGoalTarget * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/NavSetGoalTarget * @param {NPC} this - no description * @param {Entity} target - The targeted entity to set the goal to. * @param {Vector} offset - The offset to apply to the targeted entity's position. * @returns {void} **/ NavSetGoalTarget(this: NPC, target: Entity, offset: Vector): void /** * * Sets the goal position for the NPC. * * @name NPC:NavSetGoal * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/NavSetGoal * @param {NPC} this - no description * @param {Vector} position - The position to set as the goal * @returns {void} **/ NavSetGoal(this: NPC, position: Vector): void /** * * Makes the NPC walk toward the given position. The NPC will return to the player after amount of time set by **player_squad_autosummon_time** @ConVar type. * Only works on Citizens (npc_citizen) and is a part of the Half-Life 2 squad system. * The NPC **must** be in the player's squad for this to work. * * @name NPC:MoveOrder * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/MoveOrder * @param {NPC} this - no description * @param {Vector} position - The target position for the NPC to walk to. * @returns {void} **/ MoveOrder(this: NPC, position: Vector): void /** * * Causes the NPC to temporarily forget the current enemy and switch on to a better one. * * @name NPC:MarkEnemyAsEluded * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/MarkEnemyAsEluded * @param {NPC} this - no description * @returns {void} **/ MarkEnemyAsEluded(this: NPC): void /** * * Force an NPC to play his LostEnemy sound. * * @name NPC:LostEnemySound * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/LostEnemySound * @param {NPC} this - no description * @returns {void} **/ LostEnemySound(this: NPC): void /** * * Returns whether the entity given can be reached by this NPC. * * @name NPC:IsUnreachable * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/IsUnreachable * @param {NPC} this - no description * @param {Entity} testEntity - The entity to test. * @returns {boolean} - If the entity is reachable or not. **/ IsUnreachable(this: NPC, testEntity: Entity): boolean /** * * Tries to achieve our ideal animation state, playing any transition sequences that we need to play to get there. * * @name NPC:MaintainActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/MaintainActivity * @param {NPC} this - no description * @returns {void} **/ MaintainActivity(this: NPC): void /** * * Checks if the NPC is running an **ai_goal**. ( e.g. An npc_citizen NPC following the Player. ) * * @name NPC:IsRunningBehavior * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/IsRunningBehavior * @param {NPC} this - no description * @returns {boolean} - Returns true if running an ai_goal, otherwise returns false. **/ IsRunningBehavior(this: NPC): boolean /** * * Returns whether the NPC is moving or not. * * @name NPC:IsMoving * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/IsMoving * @param {NPC} this - no description * @returns {boolean} - Whether the NPC is moving or not. **/ IsMoving(this: NPC): boolean /** * * Returns whether or not the NPC is performing the given schedule. * * @name NPC:IsCurrentSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/IsCurrentSchedule * @param {NPC} this - no description * @param {SCHED} schedule - The schedule number, see @SCHED enum. * @returns {boolean} - True if the NPC is performing the given schedule, false otherwise. **/ IsCurrentSchedule(this: NPC, schedule: SCHED): boolean /** * * Force an NPC to play his Idle sound. * * @name NPC:IdleSound * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/IdleSound * @param {NPC} this - no description * @returns {void} **/ IdleSound(this: NPC): void /** * * Returns whether or not the NPC has the given condition. * * @name NPC:HasCondition * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/HasCondition * @param {NPC} this - no description * @param {COND} condition - The condition index, see @COND enum. * @returns {boolean} - True if the NPC has the given condition, false otherwise. **/ HasCondition(this: NPC, condition: COND): boolean /** * * Used to give a weapon to an already spawned NPC. * * @name NPC:Give * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/Give * @param {NPC} this - no description * @param {string} weapon - Class name of the weapon to equip to the NPC. * @returns {Weapon} - The weapon entity given to the NPC. **/ Give(this: NPC, weapon: string): Weapon /** * * Returns the NPC's current target set by @NPC:SetTarget. * * @name NPC:GetTarget * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetTarget * @bug #3132 This returns nil if the NPC has no target. You should use @IsValid function (which accounts for nil and NULL) on the return to verify validity of the target. * @param {NPC} this - no description * @returns {Entity} - Target entity **/ GetTarget(this: NPC): Entity /** * * Returns the amount of time it will take for the NPC to get to its Target Goal. * * @name NPC:GetPathTimeToGoal * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetPathTimeToGoal * @param {NPC} this - no description * @returns {number} - The amount of time to get to the target goal. **/ GetPathTimeToGoal(this: NPC): number /** * * Returns the shooting position of the NPC. * * @name NPC:GetShootPos * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetShootPos * @note This only works properly when called on an NPC that can hold weapons, otherwise it will return the same value as @EntityFuncs:GetPos. * @param {NPC} this - no description * @returns {Vector} - The NPC's shooting position. **/ GetShootPos(this: NPC): Vector /** * * Returns the distance the NPC is from Target Goal. * * @name NPC:GetPathDistanceToGoal * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetPathDistanceToGoal * @param {NPC} this - no description * @returns {number} - The number of hammer units the NPC is away from the Goal. **/ GetPathDistanceToGoal(this: NPC): number /** * * Returns the NPC's state. * * @name NPC:GetNPCState * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetNPCState * @param {NPC} this - no description * @returns {NPC_STATE} - The NPC's current state, see @NPC_STATE enum. **/ GetNPCState(this: NPC): NPC_STATE /** * * Returns the index of the sequence the NPC uses to move. * * @name NPC:GetMovementSequence * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetMovementSequence * @param {NPC} this - no description * @returns {number} - The movement sequence index **/ GetMovementSequence(this: NPC): number /** * * Returns the NPC's current movement activity. * * @name NPC:GetMovementActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetMovementActivity * @param {NPC} this - no description * @returns {ACT} - Current NPC movement activity, see @ACT enum. **/ GetMovementActivity(this: NPC): ACT /** * * Returns NPCs hull type set by @NPC:SetHullType. * * @name NPC:GetHullType * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetHullType * @param {NPC} this - no description * @returns {HULL} - Hull type, see @HULL enum **/ GetHullType(this: NPC): HULL /** * * Returns the expression file the NPC is currently playing. * * @name NPC:GetExpression * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetExpression * @param {NPC} this - no description * @returns {string} - The file path of the expression. **/ GetExpression(this: NPC): string /** * * Returns how proficient (skilled) an NPC is with its current weapon. * * @name NPC:GetCurrentWeaponProficiency * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetCurrentWeaponProficiency * @param {NPC} this - no description * @returns {WEAPON_PROFICIENCY} - NPC's proficiency for current weapon. See @WEAPON_PROFICIENCY enum. **/ GetCurrentWeaponProficiency(this: NPC): WEAPON_PROFICIENCY /** * * Returns the NPC's current schedule. * * @name NPC:GetCurrentSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetCurrentSchedule * @param {NPC} this - no description * @returns {SCHED} - The NPCs schedule, see @SCHED enum or -1 if we failed for some reason **/ GetCurrentSchedule(this: NPC): SCHED /** * * Returns the entity blocking the NPC along its path. * * @name NPC:GetBlockingEntity * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetBlockingEntity * @param {NPC} this - no description * @returns {Entity} - Blocking entity **/ GetBlockingEntity(this: NPC): Entity /** * * Returns the entity that this NPC is trying to fight. * * @name NPC:GetEnemy * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetEnemy * @bug #3132 This returns nil if the NPC has no enemy. You should use @IsValid function (which accounts for nil and NULL) on the return to verify validity of the enemy. * @param {NPC} this - no description * @returns {NPC} - Enemy NPC. **/ GetEnemy(this: NPC): NPC /** * * Returns the activity to be played when the NPC arrives at its goal * * @name NPC:GetArrivalActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetArrivalActivity * @param {NPC} this - no description * @returns {number} - no description **/ GetArrivalActivity(this: NPC): number /** * * Returns the sequence to be played when the NPC arrives at its goal. * * @name NPC:GetArrivalSequence * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetArrivalSequence * @param {NPC} this - no description * @returns {number} - Sequence ID to be played, or -1 if there's no sequence. **/ GetArrivalSequence(this: NPC): number /** * * Returns the aim vector of the NPC. NPC alternative of @Player:GetAimVector. * * @name NPC:GetAimVector * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetAimVector * @param {NPC} this - no description * @returns {Vector} - The aim direction of the NPC. **/ GetAimVector(this: NPC): Vector /** * * Returns the NPC's current activity. * * @name NPC:GetActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/GetActivity * @param {NPC} this - no description * @returns {ACT} - Current activity, see @ACT enum. **/ GetActivity(this: NPC): ACT /** * * Returns the weapon the NPC is currently carrying, or [NULL](http://wiki.garrysmod.com/page/Global_Variables). * * @name NPC:GetActiveWeapon * @realm client, server * @wiki https://wiki.garrysmod.com/page/NPC/GetActiveWeapon * @param {NPC} this - no description * @returns {Entity} - The NPCs current weapon **/ GetActiveWeapon(this: NPC): Entity /** * * Force an NPC to play its FoundEnemy sound. * * @name NPC:FoundEnemySound * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/FoundEnemySound * @param {NPC} this - no description * @returns {void} **/ FoundEnemySound(this: NPC): void /** * * Force an NPC to play his Fear sound. * * @name NPC:FearSound * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/FearSound * @param {NPC} this - no description * @returns {void} **/ FearSound(this: NPC): void /** * * Makes an NPC exit a scripted sequence, if one is playing. * * @name NPC:ExitScriptedSequence * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/ExitScriptedSequence * @param {NPC} this - no description * @returns {void} **/ ExitScriptedSequence(this: NPC): void /** * * Returns the way the NPC "feels" about the entity. * * @name NPC:Disposition * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/Disposition * @param {NPC} this - no description * @param {Entity} ent - The entity to get the disposition from. * @returns {D} - The NPCs disposition, see @D enum. **/ Disposition(this: NPC, ent: Entity): D /** * * Forces the NPC to drop the specified weapon. * * @name NPC:DropWeapon * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/DropWeapon * @param {NPC} this - no description * @param {Weapon} weapon - Weapon to be dropped. If unset, will default to the currently equipped weapon. * @param {Vector} target - If set, launches the weapon at given position. There is a limit to how far it is willing to throw the weapon. Overrides velocity argument. * @param {Vector} velocity - If set and previous argument is unset, launches the weapon with given velocity. If the velocity is higher than 400, it will be clamped to 400. * @returns {void} **/ DropWeapon(this: NPC, weapon?: Weapon, target?: Vector, velocity?: Vector): void /** * * Translates condition ID to a string. * * @name NPC:ConditionName * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/ConditionName * @param {NPC} this - no description * @param {COND} cond - The NPCs condition ID, see @COND enum * @returns {string} - A human understandable string equivalent of that condition. **/ ConditionName(this: NPC, cond: COND): string /** * * Stops the current schedule that the NPC is doing. * * @name NPC:ClearSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/ClearSchedule * @param {NPC} this - no description * @returns {void} **/ ClearSchedule(this: NPC): void /** * * Clears the current NPC goal or target. * * @name NPC:ClearGoal * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/ClearGoal * @param {NPC} this - no description * @returns {void} **/ ClearGoal(this: NPC): void /** * * Clears the NPC's current expression which can be set with @NPC:SetExpression. * * @name NPC:ClearExpression * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/ClearExpression * @param {NPC} this - no description * @returns {void} **/ ClearExpression(this: NPC): void /** * * Clears the Enemy from the NPC's memory, effectively forgetting it until met again with either the NPC vision or with @NPC:UpdateEnemyMemory. * * @name NPC:ClearEnemyMemory * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/ClearEnemyMemory * @param {NPC} this - no description * @returns {void} **/ ClearEnemyMemory(this: NPC): void /** * * Clears out the specified @COND enum on this NPC. * * @name NPC:ClearCondition * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/ClearCondition * @param {NPC} this - no description * @param {COND} condition - The @COND enum to clear out. * @returns {void} **/ ClearCondition(this: NPC, condition: COND): void /** * * Returns the NPC class. Do not confuse with @EntityFuncs:GetClass! * * @name NPC:Classify * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/Classify * @param {NPC} this - no description * @returns {CLASS} - See @CLASS enum **/ Classify(this: NPC): CLASS /** * * Remove a certain capability. * * @name NPC:CapabilitiesRemove * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/CapabilitiesRemove * @param {NPC} this - no description * @param {CAP} capabilities - Capabilities to remove, see @CAP enum * @returns {void} **/ CapabilitiesRemove(this: NPC, capabilities: CAP): void /** * * Returns the NPC's capabilities along the ones defined on its weapon. * * @name NPC:CapabilitiesGet * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/CapabilitiesGet * @param {NPC} this - no description * @returns {CAP} - The capabilities as a bitflag. * See @CAP enum **/ CapabilitiesGet(this: NPC): CAP /** * * Removes all of Capabilities the NPC has. * * @name NPC:CapabilitiesClear * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/CapabilitiesClear * @param {NPC} this - no description * @returns {void} **/ CapabilitiesClear(this: NPC): void /** * * Adds a capability to the NPC. * * @name NPC:CapabilitiesAdd * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/CapabilitiesAdd * @param {NPC} this - no description * @param {CAP} capabilities - Capabilities to add, see @CAP enum * @returns {void} **/ CapabilitiesAdd(this: NPC, capabilities: CAP): void /** * * Force an NPC to play his Alert sound. * * @name NPC:AlertSound * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/AlertSound * @param {NPC} this - no description * @returns {void} **/ AlertSound(this: NPC): void /** * * Makes the NPC like, hate, feel neutral towards, or fear the entity in question. If you want to setup relationship towards a certain entity *class*, use @NPC:AddRelationship. * * @name NPC:AddEntityRelationship * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/AddEntityRelationship * @note NPCs do not see @NextBot types by default. This can be fixed by adding the [FL_OBJECT](https://wiki.garrysmod.com/page/Enums/FL) flag to the NextBot. * @param {NPC} this - no description * @param {Entity} target - The entity for the relationship to be applied to. * @param {D} disposition - A @D enum representing the relationship type. * @param {number} priority - How strong the relationship is. * @returns {void} **/ AddEntityRelationship(this: NPC, target: Entity, disposition: D, priority: number): void /** * * Changes how an NPC feels towards another NPC. If you want to setup relationship towards a certain *entity*, use @NPC:AddEntityRelationship. * * @name NPC:AddRelationship * @realm server * @wiki https://wiki.garrysmod.com/page/NPC/AddRelationship * @param {NPC} this - no description * @param {string} relationstring - A string representing how the relationship should be set up. * Should be formatted as "npc_class @D enum numberPriority". * @returns {void} **/ AddRelationship(this: NPC, relationstring: string): void } declare interface NextBot { /** * * Start doing an activity (animation) * * @name NextBot:StartActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/StartActivity * @param {NextBot} this - no description * @param {ACT} activity - One of the @ACT enum * @returns {void} **/ StartActivity(this: NextBot, activity: ACT): void /** * * Sets the solid mask for given NextBot. * The default solid mask of a NextBot is [MASK_NPCSOLID](https://wiki.garrysmod.com/page/Enums/MASK). * * @name NextBot:SetSolidMask * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/SetSolidMask * @param {NextBot} this - no description * @param {CONTENTS | MASK} mask - The new mask, see @CONTENTS enum and @MASK enum * @returns {void} **/ SetSolidMask(this: NextBot, mask: CONTENTS | MASK): void /** * * To be called in the behaviour coroutine only! Plays an animation sequence and waits for it to end before returning. * * @name NextBot:PlaySequenceAndWait * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/PlaySequenceAndWait * @param {NextBot} this - no description * @param {string} name - The sequence name * @param {number} speed - Playback Rate of that sequence * @returns {void} **/ PlaySequenceAndWait(this: NextBot, name: string, speed?: number): void /** * * To be called in the behaviour coroutine only! Will yield until the bot has reached the goal or is stuck * * @name NextBot:MoveToPos * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/MoveToPos * @param {NextBot} this - no description * @param {Vector} pos - The position we want to get to * @param {INextBotMoveToPosOptions} options - A table containing a bunch of tweakable options. * @returns {string} - Either "failed", "stuck", "timeout" or "ok" - depending on how the NPC got on **/ MoveToPos(this: NextBot, pos: Vector, options: INextBotMoveToPosOptions): string /** * * Called from Lua when the NPC is stuck. This should only be called from the behaviour coroutine - so if you want to override this function and do something special that yields - then go for it. * You should always call self.loco:ClearStuck() in this function to reset the stuck status - so it knows it's unstuck. See @CLuaLocomotion:ClearStuck. * * @name NextBot:HandleStuck * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/HandleStuck * @param {NextBot} this - no description * @returns {void} **/ HandleStuck(this: NextBot): void /** * * Returns the solid mask for given NextBot. * * @name NextBot:GetSolidMask * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/GetSolidMask * @param {NextBot} this - no description * @returns {CONTENTS | MASK} - The solid mask, see @CONTENTS enum and @MASK enum **/ GetSolidMask(this: NextBot): CONTENTS | MASK /** * * Returns the distance to an entity or position. * See also @NextBot:GetRangeSquaredTo. * * @name NextBot:GetRangeTo * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/GetRangeTo * @param {NextBot} this - no description * @param {Vector} to - The position to measure distance to. Can be an entity. * @returns {number} - The distance **/ GetRangeTo(this: NextBot, to: Vector): number /** * * Returns squared distance to an entity or a position. * See also @NextBot:GetRangeTo. * * @name NextBot:GetRangeSquaredTo * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/GetRangeSquaredTo * @param {NextBot} this - no description * @param {Vector} to - The position to measure distance to. Can be an entity. * @returns {number} - The squared distance **/ GetRangeSquaredTo(this: NextBot, to: Vector): number /** * * Returns the currently running activity * * @name NextBot:GetActivity * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/GetActivity * @param {NextBot} this - no description * @returns {number} - The current activity **/ GetActivity(this: NextBot): number /** * * Returns a table of hiding spots. * * @name NextBot:FindSpots * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/FindSpots * @param {NextBot} this - no description * @param {INextBotFindSpotsSpecs} specs - This table should contain the search info. * @returns {table[]} - An unsorted table of tables containing: **/ FindSpots(this: NextBot, specs: INextBotFindSpotsSpecs): table[] /** * * Like @NextBot:FindSpots but only returns a vector. * * @name NextBot:FindSpot * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/FindSpot * @param {NextBot} this - no description * @param {string} type - Either "random", "near", "far" * @param {INextBotFindSpotOptions} options - This table should contain the search info. * @returns {Vector} - If it finds a spot it will return a vector. If not it will return nil. **/ FindSpot(this: NextBot, type: string, options: INextBotFindSpotOptions): Vector /** * * Should only be called in BodyUpdate. This sets the move_x and move_y pose parameters of the bot to fit how they're currently moving, sets the animation speed to suit the ground speed, and calls FrameAdvance. * * @name NextBot:BodyMoveXY * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/BodyMoveXY * @bug #3420 This function might cause crashes with some activities. * @param {NextBot} this - no description * @returns {void} **/ BodyMoveXY(this: NextBot): void /** * * Become a ragdoll and remove the entity. * * @name NextBot:BecomeRagdoll * @realm server * @wiki https://wiki.garrysmod.com/page/NextBot/BecomeRagdoll * @param {NextBot} this - no description * @param {CTakeDamageInfo} info - Damage info passed from an onkilled event * @returns {Entity} - The created ragdoll, if any. **/ BecomeRagdoll(this: NextBot, info: CTakeDamageInfo): Entity } declare interface NEXTBOT { /** * * A hook called to process nextbot logic. * This hook runs in a @coroutine type by default. It will only be called if @NEXTBOT:BehaveStart is not overriden. * * @name NEXTBOT:RunBehaviour * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/RunBehaviour * @param {NEXTBOT} this - no description * @returns {void} **/ RunBehaviour(this: NEXTBOT): void /** * * Called when the bot thinks it is un-stuck. * * @name NEXTBOT:OnUnStuck * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnUnStuck * @param {NEXTBOT} this - no description * @returns {void} **/ OnUnStuck(this: NEXTBOT): void /** * * Called when a trace attack is done against the nextbot, allowing override of the damage being dealt by altering the @CTakeDamageInfo type. * This is called before @NEXTBOT:OnInjured. * * @name NEXTBOT:OnTraceAttack * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnTraceAttack * @param {NEXTBOT} this - no description * @param {CTakeDamageInfo} info - The damage info * @param {Vector} dir - The direction the damage goes in * @param {TraceResult} trace - The @TraceResult structure of the attack, containing the hitgroup. * @returns {void} **/ OnTraceAttack(this: NEXTBOT, info: CTakeDamageInfo, dir: Vector, trace: TraceResult): void /** * * Called when the bot thinks it is stuck. * * @name NEXTBOT:OnStuck * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnStuck * @param {NEXTBOT} this - no description * @returns {void} **/ OnStuck(this: NEXTBOT): void /** * * Called when someone else or something else has been killed. * * @name NEXTBOT:OnOtherKilled * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnOtherKilled * @param {NEXTBOT} this - no description * @param {Entity} victim - The victim that was killed * @param {CTakeDamageInfo} info - The damage info * @returns {void} **/ OnOtherKilled(this: NEXTBOT, victim: Entity, info: CTakeDamageInfo): void /** * * Called when the nextbot enters a new navigation area. * * @name NEXTBOT:OnNavAreaChanged * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnNavAreaChanged * @param {NEXTBOT} this - no description * @param {CNavArea} prev - The navigation area the bot just left * @param {CNavArea} next - The navigation area the bot just entered * @returns {void} **/ OnNavAreaChanged(this: NEXTBOT, prev: CNavArea, next: CNavArea): void /** * * Called when the bot's feet leave the ground - for whatever reason. * * @name NEXTBOT:OnLeaveGround * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnLeaveGround * @param {NEXTBOT} this - no description * @param {Entity} ent - The entity the bot "jumped" from. * @returns {void} **/ OnLeaveGround(this: NEXTBOT, ent: Entity): void /** * * Called when the bot's feet return to the ground. * * @name NEXTBOT:OnLandOnGround * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnLandOnGround * @param {NEXTBOT} this - no description * @param {Entity} ent - The entity the nextbot has landed on. * @returns {void} **/ OnLandOnGround(this: NEXTBOT, ent: Entity): void /** * * Called when the bot gets killed. * * @name NEXTBOT:OnKilled * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnKilled * @param {NEXTBOT} this - no description * @param {CTakeDamageInfo} info - The damage info * @returns {void} **/ OnKilled(this: NEXTBOT, info: CTakeDamageInfo): void /** * * Called when the bot gets hurt. This is a good place to play hurt sounds or voice lines. * * @name NEXTBOT:OnInjured * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnInjured * @param {NEXTBOT} this - no description * @param {CTakeDamageInfo} info - The damage info * @returns {void} **/ OnInjured(this: NEXTBOT, info: CTakeDamageInfo): void /** * * Called when the bot is ignited. * * @name NEXTBOT:OnIgnite * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnIgnite * @param {NEXTBOT} this - no description * @returns {void} **/ OnIgnite(this: NEXTBOT): void /** * * Called when the nextbot touches another entity. * * @name NEXTBOT:OnContact * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/OnContact * @param {NEXTBOT} this - no description * @param {Entity} ent - The entity the nextbot came in contact with. * @returns {void} **/ OnContact(this: NEXTBOT, ent: Entity): void /** * * Called to update the bot's animation. * * @name NEXTBOT:BodyUpdate * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/BodyUpdate * @param {NEXTBOT} this - no description * @returns {void} **/ BodyUpdate(this: NEXTBOT): void /** * * Called to update the bot's behaviour. * * @name NEXTBOT:BehaveUpdate * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/BehaveUpdate * @param {NEXTBOT} this - no description * @param {number} interval - How long since the last update * @returns {void} **/ BehaveUpdate(this: NEXTBOT, interval: number): void /** * * Called to initialize the behaviour. * This is called automatically when the NextBot is created, you should not call it manually. * * @name NEXTBOT:BehaveStart * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/NEXTBOT/BehaveStart * @note You shouldn't override this unless you know what you are doing - it's used to kick off the @coroutine type that runs the bot's behaviour. See @NEXTBOT:RunBehaviour instead. * @param {NEXTBOT} this - no description * @returns {void} **/ BehaveStart(this: NEXTBOT): void } declare interface Material extends Button { /** * * Sets the material used by the panel. * * @name Material:SetMaterial * @wiki https://wiki.garrysmod.com/page/Material/SetMaterial * @note If the material is not showing up as the correct size, try setting the Material panel's *AutoSize* variable to **false** * @param {Material} this - no description * @param {string} matname - The file path of the material to set (relative to "garrysmod/materials/"). * @returns {void} **/ SetMaterial(this: Material, matname: string): void /** * * Sets the alpha value of the Material panel. * * @name Material:SetAlpha * @wiki https://wiki.garrysmod.com/page/Material/SetAlpha * @param {Material} this - no description * @param {number} alpha - The alpha value, from 0 to 255. * @returns {void} **/ SetAlpha(this: Material, alpha: number): void } declare interface MarkupObject { /** * * Gets computed the width and height of the markupobject. * * @name MarkupObject:Size * @realm client * @wiki https://wiki.garrysmod.com/page/MarkupObject/Size * @param {MarkupObject} this - no description * @returns {number} - The computed width. * @returns {number} - The computed height. * @tupleReturn **/ Size(this: MarkupObject): [number, number] /** * * Gets computed the height of the markupobject. * * @name MarkupObject:GetHeight * @realm client * @wiki https://wiki.garrysmod.com/page/MarkupObject/GetHeight * @param {MarkupObject} this - no description * @returns {number} - The computed height. **/ GetHeight(this: MarkupObject): number /** * * Gets computed the width of the markupobject. * * @name MarkupObject:GetWidth * @realm client * @wiki https://wiki.garrysmod.com/page/MarkupObject/GetWidth * @param {MarkupObject} this - no description * @returns {number} - The computed width. **/ GetWidth(this: MarkupObject): number /** * * Draws the computed markupobject to the screen. * * @name MarkupObject:Draw * @realm client * @wiki https://wiki.garrysmod.com/page/MarkupObject/Draw * @param {MarkupObject} this - no description * @param {number} xOffset - The X coordinate on the screen. * @param {number} yOffset - The Y coordinate on the screen. * @param {TEXT_ALIGN} xAlign - The alignment of the x coordinate using @TEXT_ALIGN enum * @param {TEXT_ALIGN} yAlign - The alignment of the y coordinate using @TEXT_ALIGN enum * @param {number} alphaoverride - Sets the alpha of all drawn objects to this. * @returns {void} **/ Draw(this: MarkupObject, xOffset: number, yOffset: number, xAlign: TEXT_ALIGN, yAlign: TEXT_ALIGN, alphaoverride?: number): void } declare interface IVideoWriter { /** * * Returns the width of the video stream. * * @name IVideoWriter:Width * @realm client * @wiki https://wiki.garrysmod.com/page/IVideoWriter/Width * @param {IVideoWriter} this - no description * @returns {number} - width **/ Width(this: IVideoWriter): number /** * * Sets whether to record sound or not. * * @name IVideoWriter:SetRecordSound * @realm client * @wiki https://wiki.garrysmod.com/page/IVideoWriter/SetRecordSound * @param {IVideoWriter} this - no description * @param {boolean} record - Record. * @returns {void} **/ SetRecordSound(this: IVideoWriter, record: boolean): void /** * * Returns the height of the video stream. * * @name IVideoWriter:Height * @realm client * @wiki https://wiki.garrysmod.com/page/IVideoWriter/Height * @param {IVideoWriter} this - no description * @returns {number} - height **/ Height(this: IVideoWriter): number /** * * Ends the video recording and dumps it to disk. * * @name IVideoWriter:Finish * @realm client * @wiki https://wiki.garrysmod.com/page/IVideoWriter/Finish * @param {IVideoWriter} this - no description * @returns {void} **/ Finish(this: IVideoWriter): void /** * * Adds the current framebuffer to the video stream. * * @name IVideoWriter:AddFrame * @realm client * @wiki https://wiki.garrysmod.com/page/IVideoWriter/AddFrame * @param {IVideoWriter} this - no description * @param {number} frameTime - Usually set to what @FrameTime function is, or simply 1/fps. * @param {boolean} downsample - If true it will downsample the whole screenspace to the videos width and height, otherwise it will just record from the top left corner to the given width and height and therefor not the whole screen. * @returns {void} **/ AddFrame(this: IVideoWriter, frameTime: number, downsample: boolean): void } declare interface ITexture { /** * * Returns the modified width of the texture, this value may be affected by mipmapping and other factors. * * @name ITexture:Width * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/Width * @param {ITexture} this - no description * @returns {number} - width **/ Width(this: ITexture): number /** * * Returns whenever the texture is the error texture (pink and black checkerboard pattern). * * @name ITexture:IsErrorTexture * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/IsErrorTexture * @param {ITexture} this - no description * @returns {boolean} - Whether the texture is the error texture or not. **/ IsErrorTexture(this: ITexture): boolean /** * * Returns whenever the texture is valid. (i.e. was loaded successfully or not) * * @name ITexture:IsError * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/IsError * @note The "error" texture is a valid texture, and therefore this function will return false when used on it. Use @ITexture:IsErrorTexture, instead. * @param {ITexture} this - no description * @returns {boolean} - Whether the texture was loaded successfully or not. **/ IsError(this: ITexture): boolean /** * * Returns the modified height of the texture, this value may be affected by mipmapping and other factors. * * @name ITexture:Height * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/Height * @param {ITexture} this - no description * @returns {number} - height **/ Height(this: ITexture): number /** * * Returns the name of the texture, in most cases the path. * * @name ITexture:GetName * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/GetName * @param {ITexture} this - no description * @returns {string} - name **/ GetName(this: ITexture): string /** * * Returns the true unmodified width of the texture. * * @name ITexture:GetMappingWidth * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/GetMappingWidth * @param {ITexture} this - no description * @returns {number} - width **/ GetMappingWidth(this: ITexture): number /** * * Returns the true unmodified height of the texture. * * @name ITexture:GetMappingHeight * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/GetMappingHeight * @param {ITexture} this - no description * @returns {number} - height **/ GetMappingHeight(this: ITexture): number /** * * Returns the color of the specified pixel, only works for textures created from PNG files. * * @name ITexture:GetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/GetColor * @bug #2407 The returned color will not have the color metatable. * @param {ITexture} this - no description * @param {number} x - The X coordinate. * @param {number} y - The Y coordinate. * @returns {IColor} - The color of the pixel as a @IColor structure. **/ GetColor(this: ITexture, x: number, y: number): IColor /** * * Invokes the generator of the texture. Reloads file based textures from disk and clears render target textures. * * @name ITexture:Download * @realm client, server * @wiki https://wiki.garrysmod.com/page/ITexture/Download * @param {ITexture} this - no description * @returns {void} **/ Download(this: ITexture): void } declare interface ISave { /** * * Writes a @Vector type to the save object. * * @name ISave:WriteVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/WriteVector * @param {ISave} this - no description * @param {Vector} vec - The vector to write. * @returns {void} **/ WriteVector(this: ISave, vec: Vector): void /** * * Writes a @string type to the save object. * * @name ISave:WriteString * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/WriteString * @param {ISave} this - no description * @param {string} str - The string to write. Maximum length is 1024. * @returns {void} **/ WriteString(this: ISave, str: string): void /** * * Writes an integer @number type to the save object. * * @name ISave:WriteInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/WriteInt * @param {ISave} this - no description * @param {number} int - The integer number to write. * @returns {void} **/ WriteInt(this: ISave, int: number): void /** * * Writes a floating point @number type to the save object. * * @name ISave:WriteFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/WriteFloat * @param {ISave} this - no description * @param {number} float - The floating point number to write. * @returns {void} **/ WriteFloat(this: ISave, float: number): void /** * * Writes an @Entity type to the save object. * * @name ISave:WriteEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/WriteEntity * @param {ISave} this - no description * @param {Entity} ent - The entity to write. * @returns {void} **/ WriteEntity(this: ISave, ent: Entity): void /** * * Writes a @boolean type to the save object. * * @name ISave:WriteBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/WriteBool * @param {ISave} this - no description * @param {boolean} bool - The boolean to write. * @returns {void} **/ WriteBool(this: ISave, bool: boolean): void /** * * Writes an @Angle type to the save object. * * @name ISave:WriteAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/WriteAngle * @param {ISave} this - no description * @param {Angle} ang - The angle to write. * @returns {void} **/ WriteAngle(this: ISave, ang: Angle): void /** * * Starts a new block of data that you can write to inside current block. Blocks **must** be ended with @ISave:EndBlock. * * @name ISave:StartBlock * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/StartBlock * @param {ISave} this - no description * @param {string} name - Name of the new block. Used for determining which block is which, returned by @IRestore:StartBlock during game load. * @returns {void} **/ StartBlock(this: ISave, name: string): void /** * * Ends current data block started with @ISave:StartBlock and returns to the parent block. * To avoid all sorts of errors, you **must** end all blocks you start. * * @name ISave:EndBlock * @realm client, server * @wiki https://wiki.garrysmod.com/page/ISave/EndBlock * @param {ISave} this - no description * @returns {void} **/ EndBlock(this: ISave): void } declare interface IRestore { /** * * Loads next block of data to be read inside current block. Blocks **must** be ended with @IRestore:EndBlock. * * @name IRestore:StartBlock * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/StartBlock * @param {IRestore} this - no description * @returns {string} - The name of the next data block to be read. **/ StartBlock(this: IRestore): string /** * * Reads next bytes from the restore object as a @Vector type. * * @name IRestore:ReadVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/ReadVector * @param {IRestore} this - no description * @returns {Vector} - The read vector. **/ ReadVector(this: IRestore): Vector /** * * Reads next bytes from the restore object as a @string type. * * @name IRestore:ReadString * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/ReadString * @param {IRestore} this - no description * @returns {string} - The read string. Maximum length is 1024. **/ ReadString(this: IRestore): string /** * * Reads next bytes from the restore object as an integer @number type. * * @name IRestore:ReadInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/ReadInt * @param {IRestore} this - no description * @returns {number} - The read integer number. **/ ReadInt(this: IRestore): number /** * * Reads next bytes from the restore object as a floating point @number type. * * @name IRestore:ReadFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/ReadFloat * @param {IRestore} this - no description * @returns {number} - The read floating point number. **/ ReadFloat(this: IRestore): number /** * * Reads next bytes from the restore object as an @Entity type. * * @name IRestore:ReadEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/ReadEntity * @param {IRestore} this - no description * @returns {Entity} - The entity that has been read. **/ ReadEntity(this: IRestore): Entity /** * * Reads next bytes from the restore object as a @boolean type. * * @name IRestore:ReadBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/ReadBool * @param {IRestore} this - no description * @returns {boolean} - The boolean that has been read **/ ReadBool(this: IRestore): boolean /** * * Ends current data block started with @IRestore:StartBlock and returns to the parent block. * To avoid all sorts of errors, you **must** end all blocks you start. * * @name IRestore:EndBlock * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/EndBlock * @param {IRestore} this - no description * @returns {void} **/ EndBlock(this: IRestore): void /** * * Reads next bytes from the restore object as an @Angle type. * * @name IRestore:ReadAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/IRestore/ReadAngle * @param {IRestore} this - no description * @returns {Angle} - The angle that has been read **/ ReadAngle(this: IRestore): Angle } declare interface IMesh { /** * * Renders the mesh with the active matrix. * * @name IMesh:Draw * @realm client * @wiki https://wiki.garrysmod.com/page/IMesh/Draw * @param {IMesh} this - no description * @returns {void} **/ Draw(this: IMesh): void /** * * Deletes the mesh and frees the memory used by it. * * @name IMesh:Destroy * @realm client * @wiki https://wiki.garrysmod.com/page/IMesh/Destroy * @param {IMesh} this - no description * @returns {void} **/ Destroy(this: IMesh): void /** * * Builds the mesh from a table mesh vertexes. * See @Mesh function and @util.GetModelMeshes for examples. * * @name IMesh:BuildFromTriangles * @realm client * @wiki https://wiki.garrysmod.com/page/IMesh/BuildFromTriangles * @param {IMesh} this - no description * @param {MeshVertex} vertexes - A table consisting of @MeshVertex structures. * @returns {void} **/ BuildFromTriangles(this: IMesh, vertexes: MeshVertex): void } declare interface IMaterial { /** * * Returns the width of the member texture set for $basetexture. * * @name IMaterial:Width * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/Width * @param {IMaterial} this - no description * @returns {number} - width **/ Width(this: IMaterial): number /** * * Unsets the value for the specified material value. * * @name IMaterial:SetUndefined * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetUndefined * @param {IMaterial} this - no description * @param {string} materialValueName - The name of the material value to be unset. * @returns {void} **/ SetUndefined(this: IMaterial, materialValueName: string): void /** * * Sets the specified material vector to the specified vector, does nothing on a type mismatch. * * @name IMaterial:SetVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetVector * @param {IMaterial} this - no description * @param {string} MaterialVector - The name of the material vector. * @param {Vector} vec - The new vector. * @returns {void} **/ SetVector(this: IMaterial, MaterialVector: string, vec: Vector): void /** * * Sets the specified material texture to the specified texture, does nothing on a type mismatch. * * @name IMaterial:SetTexture * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetTexture * @param {IMaterial} this - no description * @param {string} materialTexture - The name of the keyvalue on the material to store the texture on. * @param {ITexture} texture - The new texture. This can also be a string, the name of the new texture. * @returns {void} **/ SetTexture(this: IMaterial, materialTexture: string, texture: ITexture): void /** * * Sets the specified material value to the specified string, does nothing on a type mismatch. * * @name IMaterial:SetString * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetString * @param {IMaterial} this - no description * @param {string} materialString - The name of the material string. * @param {string} str - The new string. * @returns {void} **/ SetString(this: IMaterial, materialString: string, str: string): void /** * * The functionality of this function was removed due to the amount of crashes it caused. * * @name IMaterial:SetShader * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetShader * @param {IMaterial} this - no description * @param {string} shaderName - Name of the shader * @returns {void} **/ SetShader(this: IMaterial, shaderName: string): void /** * * Sets the specified material value to the specified matrix, does nothing on a type mismatch. * * @name IMaterial:SetMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetMatrix * @param {IMaterial} this - no description * @param {string} materialMatrix - The name of the material int. * @param {VMatrix} matrix - The new matrix. * @returns {void} **/ SetMatrix(this: IMaterial, materialMatrix: string, matrix: VMatrix): void /** * * Sets the specified material value to the specified int, does nothing on a type mismatch. * * @name IMaterial:SetInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetInt * @param {IMaterial} this - no description * @param {string} materialInt - The name of the material int. * @param {number} int - The new int value. * @returns {void} **/ SetInt(this: IMaterial, materialInt: string, int: number): void /** * * Sets the specified material float to the specified float, does nothing on a type mismatch. * * @name IMaterial:SetFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/SetFloat * @param {IMaterial} this - no description * @param {string} materialFloat - The name of the material float. * @param {number} float - The new float value. * @returns {void} **/ SetFloat(this: IMaterial, materialFloat: string, float: number): void /** * * Recomputes the material's snapshot. This needs to be called if you have changed variables on your material and it isn't changing. * Be careful though - this function is slow - so try to call it only when needed! * * @name IMaterial:Recompute * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/Recompute * @param {IMaterial} this - no description * @returns {void} **/ Recompute(this: IMaterial): void /** * * Returns whenever the material is valid, i.e. whether it was not loaded successfully from disk or not. * * @name IMaterial:IsError * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/IsError * @param {IMaterial} this - no description * @returns {boolean} - Is this material the error material? (___error) **/ IsError(this: IMaterial): boolean /** * * Returns the height of the member texture set for $basetexture. * * @name IMaterial:Height * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/Height * @param {IMaterial} this - no description * @returns {number} - height **/ Height(this: IMaterial): number /** * * Returns the specified material linear color vector, or nil if the value is not set. * See https://en.wikipedia.org/wiki/Gamma_correction * See also @IMaterial:GetVector * * @name IMaterial:GetVectorLinear * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetVectorLinear * @param {IMaterial} this - no description * @param {string} materialVector - The name of the material vector. * @returns {Vector} - The linear color vector **/ GetVectorLinear(this: IMaterial, materialVector: string): Vector /** * * Returns the specified material vector, or nil if the value is not set. * See also @IMaterial:GetVectorLinear * * @name IMaterial:GetVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetVector * @param {IMaterial} this - no description * @param {string} materialVector - The name of the material vector. * @returns {Vector} - The color vector **/ GetVector(this: IMaterial, materialVector: string): Vector /** * * Returns an @ITexture type based on the passed shader parameter. * * @name IMaterial:GetTexture * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetTexture * @param {IMaterial} this - no description * @param {string} param - The [shader parameter](https://developer.valvesoftware.com/wiki/Category:List_of_Shader_Parameters) to retrieve. This should normally be *$basetexture*. * @returns {ITexture} - The value of the shader parameter. Returns nothing if the param doesn't exist. **/ GetTexture(this: IMaterial, param: string): ITexture /** * * Returns the specified material string, or nil if the value is not set or if the value can not be converted to a string. * * @name IMaterial:GetString * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetString * @param {IMaterial} this - no description * @param {string} materialString - The name of the material string. * @returns {string} - The value as a string **/ GetString(this: IMaterial, materialString: string): string /** * * Returns the name of the materials shader. * * @name IMaterial:GetShader * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetShader * @bug #3256 This function does not work serverside on Linux SRCDS. * @param {IMaterial} this - no description * @returns {string} - shaderName **/ GetShader(this: IMaterial): string /** * * Returns the name of the material, in most cases the path. * * @name IMaterial:GetName * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetName * @param {IMaterial} this - no description * @returns {string} - Material name/path **/ GetName(this: IMaterial): string /** * * Returns the specified material matrix as a int, or nil if the value is not set or is not a matrix. * * @name IMaterial:GetMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetMatrix * @param {IMaterial} this - no description * @param {string} materialMatrix - The name of the material matrix. * @returns {VMatrix} - matrix **/ GetMatrix(this: IMaterial, materialMatrix: string): VMatrix /** * * Gets all the key values defined for the material. * * @name IMaterial:GetKeyValues * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetKeyValues * @param {IMaterial} this - no description * @returns {table} - The material's key values. **/ GetKeyValues(this: IMaterial): table /** * * Returns the specified material value as a int, rounds the value if its a float, or nil if the value is not set. * * @name IMaterial:GetInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetInt * @param {IMaterial} this - no description * @param {string} materialInt - The name of the material integer. * @returns {number} - int **/ GetInt(this: IMaterial, materialInt: string): number /** * * Returns the specified material value as a float, or nil if the value is not set. * * @name IMaterial:GetFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetFloat * @param {IMaterial} this - no description * @param {string} materialFloat - The name of the material value. * @returns {number} - float **/ GetFloat(this: IMaterial, materialFloat: string): number /** * * Returns the color of the specified pixel of the $basetexture, only works for materials created from PNG files. * Basically identical to @ITexture:GetColor used on @IMaterial:GetTexture( "$basetexture" ). * * @name IMaterial:GetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/IMaterial/GetColor * @bug #2407 The returned color will not have the color metatable. * @param {IMaterial} this - no description * @param {number} x - The X coordinate. * @param {number} y - The Y coordinate. * @returns {IColor} - The color of the pixel as a @IColor structure. **/ GetColor(this: IMaterial, x: number, y: number): IColor } declare interface ImageCheckBox extends Button { /** * * Sets the checked state of the checkbox. * Checked state can be obtained via @ImageCheckBox:GetChecked * * @name ImageCheckBox:SetChecked * @wiki https://wiki.garrysmod.com/page/ImageCheckBox/SetChecked * @param {ImageCheckBox} this - no description * @param {boolean} bOn - true for checked, false otherwise * @returns {void} **/ SetChecked(this: ImageCheckBox, bOn: boolean): void /** * * Sets the material that will be visible when the @ImageCheckBox type is checked. * Internally calls @Material:SetMaterial. * * @name ImageCheckBox:SetMaterial * @wiki https://wiki.garrysmod.com/page/ImageCheckBox/SetMaterial * @note Will error if no material was set. * @param {ImageCheckBox} this - no description * @param {string} mat - The file path of the material to set (relative to "garrysmod/materials/"). * @returns {void} **/ SetMaterial(this: ImageCheckBox, mat: string): void /** * * Sets the checked state of the checkbox. * Checked state can be obtained by @ImageCheckBox type.State. * * @name ImageCheckBox:Set * @wiki https://wiki.garrysmod.com/page/ImageCheckBox/Set * @param {ImageCheckBox} this - no description * @param {boolean} OnOff - true for checked, false otherwise * @returns {void} **/ Set(this: ImageCheckBox, OnOff: boolean): void /** * * Returns the checked state of the @ImageCheckBox type * * @name ImageCheckBox:GetChecked * @wiki https://wiki.garrysmod.com/page/ImageCheckBox/GetChecked * @param {ImageCheckBox} this - no description * @returns {boolean} - true for checked, false otherwise **/ GetChecked(this: ImageCheckBox): boolean } declare interface IGModAudioChannel { /** * * Stop the stream. It can be started again using @IGModAudioChannel:Play. * * @name IGModAudioChannel:Stop * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Stop * @bug #1497 Calling this invalidates the IGModAudioChannel object rendering it unusable for further functions. * @param {IGModAudioChannel} this - no description * @returns {void} **/ Stop(this: IGModAudioChannel): void /** * * Sets the volume of a sound channel * * @name IGModAudioChannel:SetVolume * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/SetVolume * @param {IGModAudioChannel} this - no description * @param {number} volume - Volume to set. 1 meaning 100% volume, 0.5 is 50% and 3 is 300%, etc. * @returns {void} **/ SetVolume(this: IGModAudioChannel, volume: number): void /** * * Sets the sound channel to specified time ( Rewind to that position of the song ). Does not work on online radio streams. * Streamed sounds must have "noblock" parameter for this to work. * * @name IGModAudioChannel:SetTime * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/SetTime * @param {IGModAudioChannel} this - no description * @param {number} secs - The time to set the stream to, in seconds. * @returns {void} **/ SetTime(this: IGModAudioChannel, secs: number): void /** * * Sets position of sound channel in case the sound channel has a 3d option set. * * @name IGModAudioChannel:SetPos * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/SetPos * @param {IGModAudioChannel} this - no description * @param {Vector} pos - The position to put the sound into * @param {Vector} dir - The direction of the sound * @returns {void} **/ SetPos(this: IGModAudioChannel, pos: Vector, dir?: Vector): void /** * * Sets the playback rate of the sound channel. May not work with high values for radio streams. * * @name IGModAudioChannel:SetPlaybackRate * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/SetPlaybackRate * @param {IGModAudioChannel} this - no description * @param {number} rate - Playback rate to set to. 1 is normal speed, 0.5 is half the normal speed, etc. * @returns {void} **/ SetPlaybackRate(this: IGModAudioChannel, rate: number): void /** * * Sets 3D fade distances of a sound channel. * * @name IGModAudioChannel:Set3DFadeDistance * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Set3DFadeDistance * @param {IGModAudioChannel} this - no description * @param {number} min - The minimum distance. The channel's volume is at maximum when the listener is within this distance. * 0 or less = leave current. * @param {number} max - The maximum distance. The channel's volume stops decreasing when the listener is beyond this distance. * 0 or less = leave current. * @returns {void} **/ Set3DFadeDistance(this: IGModAudioChannel, min: number, max: number): void /** * * Sets 3D cone of the sound channel. * * @name IGModAudioChannel:Set3DCone * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Set3DCone * @param {IGModAudioChannel} this - no description * @param {number} innerAngle - The angle of the inside projection cone in degrees. * Range is from 0 (no cone) to 360 (sphere), -1 = leave current. * @param {number} outerAngle - The angle of the outside projection cone in degrees. * Range is from 0 (no cone) to 360 (sphere), -1 = leave current. * @param {number} outerVolume - The delta-volume outside the outer projection cone. * Range is from 0 (silent) to 1 (same as inside the cone), less than 0 = leave current. * @returns {void} **/ Set3DCone(this: IGModAudioChannel, innerAngle: number, outerAngle: number, outerVolume: number): void /** * * Starts playing the stream. * * @name IGModAudioChannel:Play * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Play * @param {IGModAudioChannel} this - no description * @returns {void} **/ Play(this: IGModAudioChannel): void /** * * Pauses the stream. It can be started again using @IGModAudioChannel:Play * * @name IGModAudioChannel:Pause * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Pause * @param {IGModAudioChannel} this - no description * @returns {void} **/ Pause(this: IGModAudioChannel): void /** * * Returns if the sound channel is valid or not. * * @name IGModAudioChannel:IsValid * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/IsValid * @param {IGModAudioChannel} this - no description * @returns {boolean} - Is the sound channel valid or not **/ IsValid(this: IGModAudioChannel): boolean /** * * Returns if the sound channel is streamed from the Internet or not. * * @name IGModAudioChannel:IsOnline * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/IsOnline * @param {IGModAudioChannel} this - no description * @returns {boolean} - Is online or not. **/ IsOnline(this: IGModAudioChannel): boolean /** * * Returns if the sound channel is looping or not. * * @name IGModAudioChannel:IsLooping * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/IsLooping * @param {IGModAudioChannel} this - no description * @returns {boolean} - Is looping or not. **/ IsLooping(this: IGModAudioChannel): boolean /** * * Returns whether the audio stream is block streamed or not. * * @name IGModAudioChannel:IsBlockStreamed * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/IsBlockStreamed * @param {IGModAudioChannel} this - no description * @returns {boolean} - Is the audio stream block streamed or not. **/ IsBlockStreamed(this: IGModAudioChannel): boolean /** * * Returns if the sound channel is in 3D mode or not. * * @name IGModAudioChannel:Is3D * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Is3D * @param {IGModAudioChannel} this - no description * @returns {boolean} - Is 3D or not. **/ Is3D(this: IGModAudioChannel): boolean /** * * Returns volume of a sound channel * * @name IGModAudioChannel:GetVolume * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetVolume * @param {IGModAudioChannel} this - no description * @returns {number} - The volume of the sound channel **/ GetVolume(this: IGModAudioChannel): number /** * * Returns the current time of the sound channel * * @name IGModAudioChannel:GetTime * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetTime * @param {IGModAudioChannel} this - no description * @returns {number} - The current time of the stream **/ GetTime(this: IGModAudioChannel): number /** * * Returns the state of a sound channel * * @name IGModAudioChannel:GetState * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetState * @param {IGModAudioChannel} this - no description * @returns {GMOD_CHANNEL} - The state of the sound channel, see @GMOD_CHANNEL enum **/ GetState(this: IGModAudioChannel): GMOD_CHANNEL /** * * Returns the sample rate for currently playing sound. * * @name IGModAudioChannel:GetSamplingRate * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetSamplingRate * @param {IGModAudioChannel} this - no description * @returns {number} - The sample rate in Hz. This should always be 44100. **/ GetSamplingRate(this: IGModAudioChannel): number /** * * Returns position of the sound channel * * @name IGModAudioChannel:GetPos * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetPos * @param {IGModAudioChannel} this - no description * @returns {Vector} - The position of the sound channel, previously set by @IGModAudioChannel:SetPos **/ GetPos(this: IGModAudioChannel): Vector /** * * Returns the playback rate of the sound channel. * * @name IGModAudioChannel:GetPlaybackRate * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetPlaybackRate * @param {IGModAudioChannel} this - no description * @returns {number} - The current playback rate of the sound channel **/ GetPlaybackRate(this: IGModAudioChannel): number /** * * Returns the right and left levels of sound played by the sound channel. * * @name IGModAudioChannel:GetLevel * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetLevel * @param {IGModAudioChannel} this - no description * @returns {number} - The left sound level. The value is between 0 and 1. * @returns {number} - The right sound level. The value is between 0 and 1. * @tupleReturn **/ GetLevel(this: IGModAudioChannel): [number, number] /** * * Returns the length of sound played by the sound channel. * * @name IGModAudioChannel:GetLength * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetLength * @param {IGModAudioChannel} this - no description * @returns {number} - The length of the sound. This value seems to be less then 0 for continuous radio streams. **/ GetLength(this: IGModAudioChannel): number /** * * Returns the filename for the sound channel. * * @name IGModAudioChannel:GetFileName * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetFileName * @param {IGModAudioChannel} this - no description * @returns {string} - The file name. This will not be always what you have put into the @sound.PlayURL as first argument. **/ GetFileName(this: IGModAudioChannel): string /** * * Retrieves the number of bits per sample of the sound channel. * Doesn't work for mp3 and ogg files. * * @name IGModAudioChannel:GetBitsPerSample * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetBitsPerSample * @param {IGModAudioChannel} this - no description * @returns {number} - Number of bits per sample, or 0 if unknown. **/ GetBitsPerSample(this: IGModAudioChannel): number /** * * Returns the average bit rate of the sound channel. * * @name IGModAudioChannel:GetAverageBitRate * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/GetAverageBitRate * @param {IGModAudioChannel} this - no description * @returns {number} - The average bit rate of the sound channel. **/ GetAverageBitRate(this: IGModAudioChannel): number /** * * Returns 3D fade distances of a sound channel. * * @name IGModAudioChannel:Get3DFadeDistance * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Get3DFadeDistance * @param {IGModAudioChannel} this - no description * @returns {number} - The minimum distance. The channel's volume is at maximum when the listener is within this distance * @returns {number} - The maximum distance. The channel's volume stops decreasing when the listener is beyond this distance * @tupleReturn **/ Get3DFadeDistance(this: IGModAudioChannel): [number, number] /** * * Returns 3D cone of the sound channel. See @IGModAudioChannel:Set3DCone. * * @name IGModAudioChannel:Get3DCone * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/Get3DCone * @param {IGModAudioChannel} this - no description * @returns {number} - The angle of the inside projection cone in degrees. * @returns {number} - The angle of the outside projection cone in degrees. * @returns {number} - The delta-volume outside the outer projection cone. * @tupleReturn **/ Get3DCone(this: IGModAudioChannel): [number, number, number] /** * * Computes the [DFT (discrete Fourier transform)](https://en.wikipedia.org/wiki/Discrete_Fourier_transform) of the sound channel. * The size parameter specifies the number of consecutive audio samples to use as the input to the DFT and is restricted to a power of two. A [Hann window](https://en.wikipedia.org/wiki/Hann_function) is applied to the input data. * The computed DFT has the same number of frequency bins as the number of samples. Only half of this DFT is returned, since [the DFT magnitudes are symmetric for real input data](https://en.wikipedia.org/wiki/Discrete_Fourier_transform#The_real-input_DFT). The magnitudes of the DFT (values from 0 to 1) are used to fill the output table, starting at index 1. * **Visualization protip:** For a size N DFT, bin k (1-indexed) corresponds to a frequency of (k - 1) / N * sampleRate. * **Visualization protip:** Sound energy is proportional to the square of the magnitudes. Adding magnitudes together makes no sense physically, but adding energies does. * **Visualization protip:** The human ear works on a logarithmic amplitude scale. You can convert to [decibels](https://en.wikipedia.org/wiki/Decibel) by taking 20 log10 of frequency magnitudes, or 10 log10 of energy. The decibel values will range from -infinity to 0. * * @name IGModAudioChannel:FFT * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/FFT * @param {IGModAudioChannel} this - no description * @param {table} tbl - The table to output the DFT magnitudes (numbers between 0 and 1) into. Indices start from 1. * @param {FFT} size - The number of samples to use. See @FFT enum * @returns {number} - The number of frequency bins that have been filled in the output table. **/ FFT(this: IGModAudioChannel, tbl: table, size: FFT): number /** * * Enables or disables looping of audio channel, requires noblock flag. * * @name IGModAudioChannel:EnableLooping * @realm client * @wiki https://wiki.garrysmod.com/page/IGModAudioChannel/EnableLooping * @param {IGModAudioChannel} this - no description * @param {boolean} enable - Enable or disable looping of this audio channel. * @returns {void} **/ EnableLooping(this: IGModAudioChannel, enable: boolean): void } declare interface IconEditor extends DFrame { /** * * Updates the entity being rendered in the internal @DAdjustableModelPanel type. Called by the model panel's @DModelPanel:LayoutEntity method. * * @name IconEditor:UpdateEntity * @wiki https://wiki.garrysmod.com/page/IconEditor/UpdateEntity * @internal * @param {IconEditor} this - no description * @param {Entity} ent - The entity being rendered within the model panel. * @returns {void} **/ UpdateEntity(this: IconEditor, ent: Entity): void /** * * Sets the @SpawnIcon type to modify. You should call @Panel:Refresh immediately after this, as the user will not be able to make changes to the icon beforehand. * * @name IconEditor:SetIcon * @wiki https://wiki.garrysmod.com/page/IconEditor/SetIcon * @param {IconEditor} this - no description * @param {SpawnIcon} icon - The @SpawnIcon type object to be modified. * @returns {void} **/ SetIcon(this: IconEditor, icon: SpawnIcon): void /** * * Sets the editor's model and icon from an entity. Alternative to @IconEditor:SetIcon, with uses a @SpawnIcon type. * You do not need to call @IconEditor:Refresh after this. * * @name IconEditor:SetFromEntity * @wiki https://wiki.garrysmod.com/page/IconEditor/SetFromEntity * @param {IconEditor} this - no description * @param {Entity} ent - The entity to retrieve the model and skin from. * @returns {void} **/ SetFromEntity(this: IconEditor, ent: Entity): void /** * * Sets up the default ambient and directional lighting for the @DAdjustableModelPanel type. Called by @IconEditor:Refresh. * * @name IconEditor:SetDefaultLighting * @wiki https://wiki.garrysmod.com/page/IconEditor/SetDefaultLighting * @internal * @param {IconEditor} this - no description * @returns {void} **/ SetDefaultLighting(this: IconEditor): void /** * * Applies the right side view camera settings for the model in the @DAdjustableModelPanel type. * Called when a user clicks the *Right* (fourth) button (See the [example](https://wiki.garrysmod.com/page/Category:IconEditor)). (Note: The icon for this points left.) * * @name IconEditor:RightLayout * @wiki https://wiki.garrysmod.com/page/IconEditor/RightLayout * @param {IconEditor} this - no description * @returns {void} **/ RightLayout(this: IconEditor): void /** * * Re-renders the @SpawnIcon type. * Called when a user clicks the *RENDER* button, this retrieves the render data from the internal @DAdjustableModelPanel type and passes it as a table to @Panel:RebuildSpawnIconEx. * * @name IconEditor:RenderIcon * @wiki https://wiki.garrysmod.com/page/IconEditor/RenderIcon * @param {IconEditor} this - no description * @returns {void} **/ RenderIcon(this: IconEditor): void /** * * Updates the internal @DAdjustableModelPanel type and @SpawnIcon type. * This should be called immediately after setting the SpawnIcon with @IconEditor:SetIcon. * * @name IconEditor:Refresh * @wiki https://wiki.garrysmod.com/page/IconEditor/Refresh * @param {IconEditor} this - no description * @returns {void} **/ Refresh(this: IconEditor): void /** * * Places the camera at the origin (0,0,0), relative to the entity, in the @DAdjustableModelPanel type. * Called when a user clicks the *Center* (fifth) button (See the [example](https://wiki.garrysmod.com/page/Category:IconEditor)). * * @name IconEditor:OriginLayout * @wiki https://wiki.garrysmod.com/page/IconEditor/OriginLayout * @param {IconEditor} this - no description * @returns {void} **/ OriginLayout(this: IconEditor): void /** * * Applies the front view camera settings for the model in the @DAdjustableModelPanel type. * Called when a user clicks the *Front* (second) button (See the [example](https://wiki.garrysmod.com/page/Category:IconEditor)). * * @name IconEditor:FullFrontalLayout * @wiki https://wiki.garrysmod.com/page/IconEditor/FullFrontalLayout * @param {IconEditor} this - no description * @returns {void} **/ FullFrontalLayout(this: IconEditor): void /** * * Fills the @DListView type on the left of the editor with the model entity's animation list. Called by @IconEditor:Refresh. * * @name IconEditor:FillAnimations * @wiki https://wiki.garrysmod.com/page/IconEditor/FillAnimations * @internal * @param {IconEditor} this - no description * @param {Entity} ent - The entity being rendered within the model panel. * @returns {void} **/ FillAnimations(this: IconEditor, ent: Entity): void /** * * Applies the best camera settings for the model in the @DAdjustableModelPanel type, using the values returned by @PositionSpawnIcon function. * Called when a user clicks the *wand* button (See the [example](https://wiki.garrysmod.com/page/Category:IconEditor)) and when @IconEditor:Refresh is called. * * @name IconEditor:BestGuessLayout * @wiki https://wiki.garrysmod.com/page/IconEditor/BestGuessLayout * @param {IconEditor} this - no description * @returns {void} **/ BestGuessLayout(this: IconEditor): void /** * * Applies the top-down view camera settings for the model in the @DAdjustableModelPanel type. * Called when a user clicks the *Above* (third) button (See the [example](https://wiki.garrysmod.com/page/Category:IconEditor)). * * @name IconEditor:AboveLayout * @wiki https://wiki.garrysmod.com/page/IconEditor/AboveLayout * @param {IconEditor} this - no description * @returns {void} **/ AboveLayout(this: IconEditor): void } declare interface GamemodeHooks { /** * * Called by the engine when the game initially fetches subscriptions to be displayed on the bottom of the main menu screen. * * @name GamemodeHooks:WorkshopSubscriptionsProgress * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/WorkshopSubscriptionsProgress * @internal * @param {Gamemode} this - no description * @param {number} num - Amount of subscribed addons that have info retrieved. * @param {number} max - Total amount of subscribed addons that need their info retrieved. * @returns {void} **/ WorkshopSubscriptionsProgress(this: Gamemode, num: number, max: number): void /** * * Called when downloading content from Steam workshop begins. Used by default to show fancy workshop downloading panel. * The order of Workshop hooks is this: * * WorkshopStart * * WorkshopDownloadTotals * ** These are called for each new item: * *** WorkshopDownloadFile * *** WorkshopDownloadProgress - This is called until the file is finished * *** WorkshopDownloadedFile * * WorkshopEnd * * @name GamemodeHooks:WorkshopStart * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/WorkshopStart * @param {Gamemode} this - no description * @returns {void} **/ WorkshopStart(this: Gamemode): void /** * * Called when downloading content from Steam workshop ends. Used by default to hide fancy workshop downloading panel. * * @name GamemodeHooks:WorkshopEnd * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/WorkshopEnd * @param {Gamemode} this - no description * @returns {void} **/ WorkshopEnd(this: Gamemode): void /** * * Called after @GamemodeHooks:WorkshopStart. * * @name GamemodeHooks:WorkshopDownloadTotals * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/WorkshopDownloadTotals * @param {Gamemode} this - no description * @param {number} remain - Remaining addons to download * @param {number} total - Total addons needing to be downloaded * @returns {void} **/ WorkshopDownloadTotals(this: Gamemode, remain: number, total: number): void /** * * Called while an addon from the Steam workshop is downloading. Used by default to update details on the fancy workshop download panel. * * @name GamemodeHooks:WorkshopDownloadProgress * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/WorkshopDownloadProgress * @param {Gamemode} this - no description * @param {number} id - Workshop ID of addon. * @param {number} imageID - ID of addon's preview image. * For example, for **Extended Spawnmenu** addon, the image URL is * http://cloud-4.steamusercontent.com/ugc/702859018846106764/9E7E1946296240314751192DA0AD15B6567FF92D/ * So, the value of this argument would be **702859018846106764**. * @param {string} title - Name of addon. * @param {number} downloaded - Current bytes of addon downloaded. * @param {number} expected - Expected file size of addon in bytes. * @returns {void} **/ WorkshopDownloadProgress(this: Gamemode, id: number, imageID: number, title: string, downloaded: number, expected: number): void /** * * Called when an addon from the Steam workshop begins downloading. Used by default to place details on the workshop downloading panel. * * @name GamemodeHooks:WorkshopDownloadFile * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/WorkshopDownloadFile * @param {Gamemode} this - no description * @param {number} id - Workshop ID of addon. * @param {number} imageID - ID of addon's preview image. * For example, for **Extended Spawnmenu** addon, the image URL is * http://cloud-4.steamusercontent.com/ugc/702859018846106764/9E7E1946296240314751192DA0AD15B6567FF92D/ * So, the value of this argument would be **702859018846106764**. * @param {string} title - Name of addon. * @param {number} size - File size of addon in bytes. * @returns {void} **/ WorkshopDownloadFile(this: Gamemode, id: number, imageID: number, title: string, size: number): void /** * * Called when an addon from the Steam workshop finishes downloading. Used by default to update details on the workshop downloading panel. * * @name GamemodeHooks:WorkshopDownloadedFile * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/WorkshopDownloadedFile * @param {Gamemode} this - no description * @param {number} id - Workshop ID of addon. * @param {string} title - Name of addon. * @returns {void} **/ WorkshopDownloadedFile(this: Gamemode, id: number, title: string): void /** * * Called as a weapon entity is picked up by a player. * See also @GamemodeHooks:PlayerDroppedWeapon. * * @name GamemodeHooks:WeaponEquip * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/WeaponEquip * @note At the time when this hook is called @EntityFuncs:GetOwner will return NULL. The owner is set on the next frame * @note This will not be called when picking up a weapon you already have as the weapon will be removed and @WeaponHooks:EquipAmmo will be called instead * @param {Gamemode} this - no description * @param {Weapon} weapon - The equipped weapon. * @param {Player} owner - The player that is picking up the weapon. * @returns {void} **/ WeaponEquip(this: Gamemode, weapon: Weapon, owner: Player): void /** * * [Category:Menu_Hooks](https://wiki.garrysmod.com/page/Category:Menu_Hooks) Called when a mouse button is pressed on a VGUI element or menu. * * @name GamemodeHooks:VGUIMousePressed * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/VGUIMousePressed * @param {Gamemode} this - no description * @param {Panel} pnl - Panel that currently has focus. * @param {MOUSE} mouseCode - The key that the player pressed using @MOUSE enum. * @returns {void} **/ VGUIMousePressed(this: Gamemode, pnl: Panel, mouseCode: MOUSE): void /** * * [Category:Menu_Hooks](https://wiki.garrysmod.com/page/Category:Menu_Hooks) Called when user clicks on a VGUI panel. * * @name GamemodeHooks:VGUIMousePressAllowed * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/VGUIMousePressAllowed * @param {Gamemode} this - no description * @param {MOUSE} button - The button that was pressed, see @MOUSE enum * @returns {boolean} - Return true if the mouse click should be ignored or not. **/ VGUIMousePressAllowed(this: Gamemode, button: MOUSE): boolean /** * * Called when you are driving a vehicle. This hook works just like @GamemodeHooks:Move. * This hook is called before @GamemodeHooks:Move and will be called when @GamemodeHooks:PlayerTick is not. * * @name GamemodeHooks:VehicleMove * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/VehicleMove * @param {Gamemode} this - no description * @param {Player} ply - Player who is driving the vehicle * @param {Vehicle} veh - The vehicle being driven * @param {CMoveData} mv - Move data * @returns {void} **/ VehicleMove(this: Gamemode, ply: Player, veh: Vehicle, mv: CMoveData): void /** * * Called when a variable is edited on an Entity (called by Edit Properties... menu) * * @name GamemodeHooks:VariableEdited * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/VariableEdited * @param {Gamemode} this - no description * @param {Entity} ent - The entity being edited * @param {Player} ply - The player doing the editing * @param {string} key - The name of the variable * @param {string} val - The new value, as a string which will later be converted to its appropriate type * @param {table} editor - The edit table defined in @EntityFuncs:NetworkVar * @returns {void} **/ VariableEdited(this: Gamemode, ent: Entity, ply: Player, key: string, val: string, editor: table): void /** * * Animation updates (pose params etc) should be done here. * * @name GamemodeHooks:UpdateAnimation * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/UpdateAnimation * @param {Gamemode} this - no description * @param {Player} ply - The player to update the animation info for. * @param {Vector} velocity - The player's velocity. * @param {number} maxSeqGroundSpeed - Speed of the animation - used for playback rate scaling. * @returns {void} **/ UpdateAnimation(this: Gamemode, ply: Player, velocity: Vector, maxSeqGroundSpeed: number): void /** * * Allows you to translate player activities. * * @name GamemodeHooks:TranslateActivity * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/TranslateActivity * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {ACT} act - The activity. See @ACT enum * @returns {number} - The new, translated activity **/ TranslateActivity(this: Gamemode, ply: Player, act: ACT): number /** * * Called every server tick. Serverside, this is similar to @GamemodeHooks:Think. * * @name GamemodeHooks:Tick * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/Tick * @param {Gamemode} this - no description * @returns {void} **/ Tick(this: Gamemode): void /** * * Called every frame on client and every tick on server. * See @GamemodeHooks:Tick for a hook that runs every tick on both the client and server. * * @name GamemodeHooks:Think * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/Think * @note This hook **WILL NOT** run if the server is empty, unless you set the @ConVar type *sv_hibernate_think* to 1 * @param {Gamemode} this - no description * @returns {void} **/ Think(this: Gamemode): void /** * * Called when you start a new game via the menu. * * @name GamemodeHooks:StartGame * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/StartGame * @param {Gamemode} this - no description * @returns {void} **/ StartGame(this: Gamemode): void /** * * Called right before an entity starts driving. Overriding this hook will cause it to not call @drive.Start and the player will not begin driving the entity. * * @name GamemodeHooks:StartEntityDriving * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/StartEntityDriving * @param {Gamemode} this - no description * @param {Entity} ent - The entity that is going to be driven * @param {Player} ply - The player that is going to drive the entity * @returns {void} **/ StartEntityDriving(this: Gamemode, ent: Entity, ply: Player): void /** * * Runs when the user tries to open the chat box. * * @name GamemodeHooks:StartChat * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/StartChat * @bug #855 Returning true won't stop the chatbox from taking VGUI focus. * @param {Gamemode} this - no description * @param {boolean} isTeamChat - Whether the message was sent through team chat. * @returns {boolean} - Return true to hide the default chat box. **/ StartChat(this: Gamemode, isTeamChat: boolean): boolean /** * * Allows you to change the players inputs before they are processed by the server. * This is basically a shared version of @GamemodeHooks:CreateMove. * * @name GamemodeHooks:StartCommand * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/StartCommand * @note This function is also called for bots, making it the best solution to control them so far * @note This hook is predicted, but not by usual means, this hook is called when a @CUserCmd type is generated on the client, and on the server when it is received, so it is necessary for this hook to be called clientside even on singleplayer * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {CUserCmd} ucmd - The usercommand * @returns {void} **/ StartCommand(this: Gamemode, ply: Player, ucmd: CUserCmd): void /** * * Called when spawn icon is generated. * * @name GamemodeHooks:SpawniconGenerated * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/SpawniconGenerated * @param {Gamemode} this - no description * @param {string} lastmodel - File path of previously generated model. * @param {string} imagename - File path of the generated icon. * @param {number} modelsleft - Amount of models left to generate. * @returns {void} **/ SpawniconGenerated(this: Gamemode, lastmodel: string, imagename: string, modelsleft: number): void /** * * 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. * * @name GamemodeHooks:ShutDown * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/ShutDown * @param {Gamemode} this - no description * @returns {void} **/ ShutDown(this: Gamemode): void /** * * Called when a player executes gm_showteam console command. ( Default bind is F2 ) * * @name GamemodeHooks:ShowTeam * @realm server * @wiki https://wiki.garrysmod.com/page/GM/ShowTeam * @param {Gamemode} this - no description * @param {Player} ply - Player who executed the command * @returns {void} **/ ShowTeam(this: Gamemode, ply: Player): void /** * * Called when a player executes gm_showspare2 console command. ( Default bind is F4 ) * * @name GamemodeHooks:ShowSpare2 * @realm server * @wiki https://wiki.garrysmod.com/page/GM/ShowSpare2 * @param {Gamemode} this - no description * @param {Player} ply - Player who executed the command * @returns {void} **/ ShowSpare2(this: Gamemode, ply: Player): void /** * * Called when a player executes gm_showspare1 console command. ( Default bind is F3 ) * * @name GamemodeHooks:ShowSpare1 * @realm server * @wiki https://wiki.garrysmod.com/page/GM/ShowSpare1 * @param {Gamemode} this - no description * @param {Player} ply - Player who executed the command * @returns {void} **/ ShowSpare1(this: Gamemode, ply: Player): void /** * * Called when a player executes gm_showhelp console command. ( Default bind is F1 ) * * @name GamemodeHooks:ShowHelp * @realm server * @wiki https://wiki.garrysmod.com/page/GM/ShowHelp * @param {Gamemode} this - no description * @param {Player} ply - Player who executed the command * @returns {void} **/ ShowHelp(this: Gamemode, ply: Player): void /** * * Called to determine if the @LocalPlayer function should be drawn. * Due to an [optimization](https://garry.tv/2012/10/30/optimising-gmod/), this hook is only called once per frame ([github issue](https://github.com/Facepunch/garrysmod-issues/issues/3092)). This is problematic if you need to have the player drawn only in certain contexts, such as within @render.RenderView or based on the render target. As a workaround, you can call @cam.Start3D() @cam.End3D() within this hook to force the engine to call it every time. * * @name GamemodeHooks:ShouldDrawLocalPlayer * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/ShouldDrawLocalPlayer * @note If you're using this hook to draw a player for a @GamemodeHooks:CalcView hook, then you may want to consider using the drawviewer variable you can use in your @CamData structure table instead. * @param {Gamemode} this - no description * @param {Player} ply - The player * @returns {boolean} - True to draw the player, false to hide. **/ ShouldDrawLocalPlayer(this: Gamemode, ply: Player): boolean /** * * Called to decide whether a pair of entities should collide with each other. This is only called if @EntityFuncs:SetCustomCollisionCheck was used on one or both entities. * Where applicable, consider using @constraint.NoCollide instead - it is considerably easier to use. * * @name GamemodeHooks:ShouldCollide * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/ShouldCollide * @warning This hook **must** return the same value consistently for the same pair of entities. If an entity changed in such a way that its collision rules change, you **must** call @EntityFuncs:CollisionRulesChanged on that entity immediately - **not in this hook.** * @bug #642 This hook can cause all physics to break under certain conditions. * @param {Gamemode} this - no description * @param {Entity} ent1 - The first entity in the collision poll. * @param {Entity} ent2 - The second entity in the collision poll. * @returns {boolean} - Whether the entities should collide. **/ ShouldCollide(this: Gamemode, ent1: Entity, ent2: Entity): boolean /** * * Allows you to use render.Fog* functions to manipulate world fog. * * @name GamemodeHooks:SetupWorldFog * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/SetupWorldFog * @param {Gamemode} this - no description * @returns {boolean} - Return true to tell the engine that fog is set up **/ SetupWorldFog(this: Gamemode): boolean /** * * Allows you to use render.Fog* functions to manipulate skybox fog. * * @name GamemodeHooks:SetupSkyboxFog * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/SetupSkyboxFog * @param {Gamemode} this - no description * @param {number} scale - The scale of 3D skybox * @returns {boolean} - Return true to tell the engine that fog is set up **/ SetupSkyboxFog(this: Gamemode, scale: number): boolean /** * * Allows you to add extra positions to the player's PVS. This is the place to call @AddOriginToPVS function. * * @name GamemodeHooks:SetupPlayerVisibility * @realm server * @wiki https://wiki.garrysmod.com/page/GM/SetupPlayerVisibility * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {Entity} viewEntity - Players @Player:GetViewEntity * @returns {void} **/ SetupPlayerVisibility(this: Gamemode, ply: Player, viewEntity: Entity): void /** * * SetupMove is called before the engine process movements. This allows us to override the players movement. * See [Game Movement](https://wiki.garrysmod.com/page/Game%20Movement) for an explanation on the move system. * * @name GamemodeHooks:SetupMove * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/SetupMove * @param {Gamemode} this - no description * @param {Player} ply - The player whose movement we are about to process * @param {CMoveData} mv - The move data to override/use * @param {CUserCmd} cmd - The command data * @returns {void} **/ SetupMove(this: Gamemode, ply: Player, mv: CMoveData, cmd: CUserCmd): void /** * * Sets player run and sprint speeds. * * @name GamemodeHooks:SetPlayerSpeed * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/SetPlayerSpeed * @warning This is not a hook. Treat this as a utility function to set the player's speed. * @param {Gamemode} this - no description * @param {Player} ply - The player to set the speed of. * @param {number} walkSpeed - The walk speed. * @param {number} runSpeed - The run speed. * @returns {void} **/ SetPlayerSpeed(this: Gamemode, ply: Player, walkSpeed: number, runSpeed: number): void /** * * Called when player presses the scoreboard button. ( TAB by default ) * * @name GamemodeHooks:ScoreboardShow * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/ScoreboardShow * @param {Gamemode} this - no description * @returns {void} **/ ScoreboardShow(this: Gamemode): void /** * * This hook allows you to change how much damage a player receives when one takes damage to a specific body part. * * @name GamemodeHooks:ScalePlayerDamage * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/ScalePlayerDamage * @note This is not called for all damage a player receives ( For example fall damage or NPC melee damage ), so you should use @GamemodeHooks:EntityTakeDamage instead if you need to detect ALL damage. * @param {Gamemode} this - no description * @param {Player} ply - The player taking damage. * @param {HITGROUP} hitgroup - The hitgroup where the player took damage. See @HITGROUP enum * @param {CTakeDamageInfo} dmginfo - The damage info. * @returns {boolean} - Return true to prevent damage that this hook is called for, stop blood particle effects and blood decals. * It is possible to return true only on client ( This will work **only in multiplayer** ) to stop the effects but still take damage. **/ ScalePlayerDamage(this: Gamemode, ply: Player, hitgroup: HITGROUP, dmginfo: CTakeDamageInfo): boolean /** * * Called when player released the scoreboard button. ( TAB by default ) * * @name GamemodeHooks:ScoreboardHide * @realm client * @wiki https://wiki.garrysmod.com/page/GM/ScoreboardHide * @param {Gamemode} this - no description * @returns {void} **/ ScoreboardHide(this: Gamemode): void /** * * Called when an NPC takes damage. * * @name GamemodeHooks:ScaleNPCDamage * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/ScaleNPCDamage * @note This hook is called only when a specific hit group of the NPC is hit. In cases where the hitgroup doesn't matter, you should use @GamemodeHooks:EntityTakeDamage instead! * @param {Gamemode} this - no description * @param {NPC} npc - The NPC that takes damage * @param {HITGROUP} hitgroup - The hitgroup (hitbox) enum where the NPC took damage. See @HITGROUP enum * @param {CTakeDamageInfo} dmginfo - Damage info * @returns {void} **/ ScaleNPCDamage(this: Gamemode, npc: NPC, hitgroup: HITGROUP, dmginfo: CTakeDamageInfo): void /** * * Called when the game is saved using the Source Engine save system (not the Sandbox saves or dupes). * See @GamemodeHooks:Restored for a hook that is called when such a save file is loaded. * See also the @saverestore library for relevant functions. * * @name GamemodeHooks:Saved * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/Saved * @param {Gamemode} this - no description * @returns {void} **/ Saved(this: Gamemode): void /** * * Called when the game is reloaded from a Source Engine save system ( not the Sandbox saves or dupes ). * See @GamemodeHooks:Saved for a hook that is called when such a save file is created. * * @name GamemodeHooks:Restored * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/Restored * @param {Gamemode} this - no description * @returns {void} **/ Restored(this: Gamemode): void /** * * Used to render post processing effects. * * @name GamemodeHooks:RenderScreenspaceEffects * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/RenderScreenspaceEffects * @rendering hook:2d * @param {Gamemode} this - no description * @returns {void} **/ RenderScreenspaceEffects(this: Gamemode): void /** * * Render the scene. Used by the "Stereoscopy" Post-processing effect. * [Category:Render Hooks](https://wiki.garrysmod.com/page/Category:Render%20Hooks) * * @name GamemodeHooks:RenderScene * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/RenderScene * @note Materials rendered in this hook require $ignorez parameter to draw properly. * @param {Gamemode} this - no description * @param {Vector} origin - View origin * @param {Angle} angles - View angles * @param {number} fov - View FOV * @returns {boolean} - Return true to override drawing the scene **/ RenderScene(this: Gamemode, origin: Vector, angles: Angle, fov: number): boolean /** * * Called when a prop has been destroyed. * * @name GamemodeHooks:PropBreak * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PropBreak * @param {Gamemode} this - no description * @param {Player} attacker - The person who broke the prop. * @param {Entity} prop - The entity that has been broken by the attacker. * @returns {void} **/ PropBreak(this: Gamemode, attacker: Player, prop: Entity): void /** * * This will prevent IN_ATTACK from sending to server when player tries to shoot from C menu. * * @name GamemodeHooks:PreventScreenClicks * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreventScreenClicks * @param {Gamemode} this - no description * @returns {boolean} - Return true to prevent screen clicks **/ PreventScreenClicks(this: Gamemode): boolean /** * * Called before the renderer is about to start rendering the next frame. * [Category:Render Hooks](https://wiki.garrysmod.com/page/Category:Render%20Hooks) * * @name GamemodeHooks:PreRender * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreRender * @param {Gamemode} this - no description * @returns {boolean} - Return true to prevent all rendering. This can make the whole game stop rendering anything. **/ PreRender(this: Gamemode): boolean /** * * Called before the player is drawn. * * @name GamemodeHooks:PrePlayerDraw * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PrePlayerDraw * @param {Gamemode} this - no description * @param {Player} player - The player that is about to be drawn. * @returns {boolean} - Prevent default player rendering. Return true to hide the player. **/ PrePlayerDraw(this: Gamemode, player: Player): boolean /** * * Called before the gamemode is loaded. * * @name GamemodeHooks:PreGamemodeLoaded * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PreGamemodeLoaded * @param {Gamemode} this - no description * @returns {void} **/ PreGamemodeLoaded(this: Gamemode): void /** * * Called before the view model has been drawn. This hook by default also calls this on weapons, so you can use @WeaponHooks:PreDrawViewModel. * * @name GamemodeHooks:PreDrawViewModel * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawViewModel * @rendering hook:3d * @bug #3024 This is also called once a frame with no arguments. * @param {Gamemode} this - no description * @param {Entity} vm - This is the view model entity before it is drawn. On server-side, this entity is the predicted view model. * @param {Player} ply - The the owner of the view model. * @param {Weapon} weapon - This is the weapon that is from the view model. * @returns {boolean} - Return true to prevent the default view model rendering. This also affects @GamemodeHooks:PostDrawViewModel. **/ PreDrawViewModel(this: Gamemode, vm: Entity, ply: Player, weapon: Weapon): boolean /** * * Called before all the translucent entities are drawn. * See also @GamemodeHooks:PreDrawOpaqueRenderables and @GamemodeHooks:PostDrawTranslucentRenderables. * * @name GamemodeHooks:PreDrawTranslucentRenderables * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawTranslucentRenderables * @rendering hook:3d * @bug #3295 This is still called when r_drawentities or r_drawopaquerenderables is disabled. * @bug #3296 This is not called when r_drawtranslucentworld is disabled. * @param {Gamemode} this - no description * @param {boolean} isDrawingDepth - Whether the current draw is writing depth. * @param {boolean} isDrawSkybox - Whether the current draw is drawing the skybox. * @returns {boolean} - Return true to prevent translucent renderables from drawing. **/ PreDrawTranslucentRenderables(this: Gamemode, isDrawingDepth: boolean, isDrawSkybox: boolean): boolean /** * * Called before the sky box is drawn. * * @name GamemodeHooks:PreDrawSkyBox * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawSkyBox * @rendering hook:3d * @param {Gamemode} this - no description * @returns {boolean} - Return true to disable skybox drawing (both 2D and 3D skybox) **/ PreDrawSkyBox(this: Gamemode): boolean /** * * Called before the player hands are drawn. * * @name GamemodeHooks:PreDrawPlayerHands * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawPlayerHands * @param {Gamemode} this - no description * @param {Entity} hands - This is the gmod_hands entity before it is drawn. * @param {Entity} vm - This is the view model entity before it is drawn. * @param {Player} ply - The the owner of the view model. * @param {Weapon} weapon - This is the weapon that is from the view model. * @returns {boolean} - Return true to prevent the viewmodel hands from rendering **/ PreDrawPlayerHands(this: Gamemode, hands: Entity, vm: Entity, ply: Player, weapon: Weapon): boolean /** * * Called before all opaque entities are drawn. * See also @GamemodeHooks:PreDrawTranslucentRenderables and @GamemodeHooks:PostDrawOpaqueRenderables. * * @name GamemodeHooks:PreDrawOpaqueRenderables * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawOpaqueRenderables * @rendering hook:3d * @param {Gamemode} this - no description * @param {boolean} isDrawingDepth - Whether the current draw is writing depth. * @param {boolean} isDrawSkybox - Whether the current draw is drawing the skybox. * @returns {boolean} - Return true to prevent opaque renderables from drawing. **/ PreDrawOpaqueRenderables(this: Gamemode, isDrawingDepth: boolean, isDrawSkybox: boolean): boolean /** * * Called before any of 2D drawing functions. Drawing anything in it seems to work incorrectly. * * @name GamemodeHooks:PreDrawHUD * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawHUD * @param {Gamemode} this - no description * @returns {void} **/ PreDrawHUD(this: Gamemode): void /** * * Called before rendering the halos. This is the place to call @halo.Add. This hook is actually running inside of @GamemodeHooks:PostDrawEffects. * * @name GamemodeHooks:PreDrawHalos * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawHalos * @rendering hook:3d * @param {Gamemode} this - no description * @returns {void} **/ PreDrawHalos(this: Gamemode): void /** * * Called just after @GamemodeHooks:PreDrawViewModel and can technically be considered "PostDrawAllViewModels". * * @name GamemodeHooks:PreDrawEffects * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PreDrawEffects * @rendering hook:3d * @param {Gamemode} this - no description * @returns {void} **/ PreDrawEffects(this: Gamemode): void /** * * Called right before the map cleans up (usually because @game.CleanUpMap was called) * See also @GamemodeHooks:PostCleanupMap. * * @name GamemodeHooks:PreCleanupMap * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PreCleanupMap * @param {Gamemode} this - no description * @returns {void} **/ PreCleanupMap(this: Gamemode): void /** * * Called after the VGUI has been drawn. * * @name GamemodeHooks:PostRenderVGUI * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostRenderVGUI * @rendering hook:2d * @param {Gamemode} this - no description * @returns {void} **/ PostRenderVGUI(this: Gamemode): void /** * * Called after the frame has been rendered. * [Category:Render Hooks](https://wiki.garrysmod.com/page/Category:Render%20Hooks) * * @name GamemodeHooks:PostRender * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostRender * @param {Gamemode} this - no description * @returns {void} **/ PostRender(this: Gamemode): void /** * * Allows you to suppress post processing effect drawing. * * @name GamemodeHooks:PostProcessPermitted * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostProcessPermitted * @param {Gamemode} this - no description * @param {string} ppeffect - The classname of Post Processing effect * @returns {boolean} - Return true/false depending on whether this post process should be allowed **/ PostProcessPermitted(this: Gamemode, ppeffect: string): boolean /** * * Called after the player was drawn. * * @name GamemodeHooks:PostPlayerDraw * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostPlayerDraw * @rendering hook:3d * @param {Gamemode} this - no description * @param {Player} ply - The player that was drawn. * @returns {void} **/ PostPlayerDraw(this: Gamemode, ply: Player): void /** * * Called after the gamemode has loaded. * * @name GamemodeHooks:PostGamemodeLoaded * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PostGamemodeLoaded * @param {Gamemode} this - no description * @returns {void} **/ PostGamemodeLoaded(this: Gamemode): void /** * * Called right after @GamemodeHooks:DoPlayerDeath, @GamemodeHooks:PlayerDeath and @GamemodeHooks:PlayerSilentDeath. * This hook will be called for all deaths, including @Player:KillSilent * * @name GamemodeHooks:PostPlayerDeath * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PostPlayerDeath * @note The player is considered dead when this is hook is called, @Player:Alive will return false. * @param {Gamemode} this - no description * @param {Player} ply - The player * @returns {void} **/ PostPlayerDeath(this: Gamemode, ply: Player): void /** * * Called after view model is drawn. * * @name GamemodeHooks:PostDrawViewModel * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDrawViewModel * @rendering hook:3d * @note The 3D rendering context in this event is different from the main view. Every render operation will only be accurate with the view model entity. * @param {Gamemode} this - no description * @param {Entity} viewmodel - Players view model * @param {Player} player - The owner of the weapon/view model * @param {Weapon} weapon - The weapon the player is currently holding * @returns {void} **/ PostDrawViewModel(this: Gamemode, viewmodel: Entity, player: Player, weapon: Weapon): void /** * * Called after all translucent entities are drawn. * See also @GamemodeHooks:PostDrawOpaqueRenderables and @GamemodeHooks:PreDrawTranslucentRenderables. * * @name GamemodeHooks:PostDrawTranslucentRenderables * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDrawTranslucentRenderables * @rendering hook:3d * @bug #3295 This is still called when r_drawentities or r_drawopaquerenderables is disabled. * @bug #3296 This is not called when r_drawtranslucentworld is disabled. * @param {Gamemode} this - no description * @param {boolean} bDrawingDepth - Whether the current call is writing depth. * @param {boolean} bDrawingSkybox - Whether the current call is drawing skybox. * @returns {void} **/ PostDrawTranslucentRenderables(this: Gamemode, bDrawingDepth: boolean, bDrawingSkybox: boolean): void /** * * Called after drawing the skybox. * * @name GamemodeHooks:PostDrawSkyBox * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDrawSkyBox * @rendering hook:3d * @param {Gamemode} this - no description * @returns {void} **/ PostDrawSkyBox(this: Gamemode): void /** * * Called after the player hands are drawn. * * @name GamemodeHooks:PostDrawPlayerHands * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDrawPlayerHands * @param {Gamemode} this - no description * @param {Entity} hands - This is the gmod_hands entity. * @param {Entity} vm - This is the view model entity. * @param {Player} ply - The the owner of the view model. * @param {Weapon} weapon - This is the weapon that is from the view model. * @returns {void} **/ PostDrawPlayerHands(this: Gamemode, hands: Entity, vm: Entity, ply: Player, weapon: Weapon): void /** * * Called after drawing opaque entities. * See also @GamemodeHooks:PostDrawTranslucentRenderables and @GamemodeHooks:PreDrawOpaqueRenderables. * * @name GamemodeHooks:PostDrawOpaqueRenderables * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDrawOpaqueRenderables * @rendering hook:3d * @param {Gamemode} this - no description * @param {boolean} bDrawingDepth - Whether the current draw is writing depth. * @param {boolean} bDrawingSkybox - Whether the current draw is drawing the skybox. * @returns {void} **/ PostDrawOpaqueRenderables(this: Gamemode, bDrawingDepth: boolean, bDrawingSkybox: boolean): void /** * * Called after @GamemodeHooks:PreDrawHUD, @GamemodeHooks:HUDPaintBackground and @GamemodeHooks:HUDPaint but before @GamemodeHooks:DrawOverlay. * * @name GamemodeHooks:PostDrawHUD * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDrawHUD * @rendering hook:2d * @param {Gamemode} this - no description * @returns {void} **/ PostDrawHUD(this: Gamemode): void /** * * Called after rendering effects. This is where halos are drawn. Called just before @GamemodeHooks:PreDrawHUD. * * @name GamemodeHooks:PostDrawEffects * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDrawEffects * @rendering hook:2d * @param {Gamemode} this - no description * @returns {void} **/ PostDrawEffects(this: Gamemode): void /** * * Called right after the 2D skybox has been drawn - allowing you to draw over it. * * @name GamemodeHooks:PostDraw2DSkyBox * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PostDraw2DSkyBox * @rendering hook:3d * @param {Gamemode} this - no description * @returns {void} **/ PostDraw2DSkyBox(this: Gamemode): void /** * * Called right after the map has cleaned up (usually because @game.CleanUpMap was called) * See also @GamemodeHooks:PreCleanupMap. * * @name GamemodeHooks:PostCleanupMap * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PostCleanupMap * @param {Gamemode} this - no description * @returns {void} **/ PostCleanupMap(this: Gamemode): void /** * * 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. * * @name GamemodeHooks:PlayerUse * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerUse * @param {Gamemode} this - no description * @param {Player} ply - The player pressing the "use" key. * @param {Entity} ent - The entity which the player is looking at / activating USE on. * @returns {boolean} - Return false if the player is not allowed to USE the entity. * Do not return true if using a hook, otherwise other mods may not get a chance to block a player's use. **/ PlayerUse(this: Gamemode, ply: Player, ent: Entity): boolean /** * * Called when it's time to populate the context menu menu bar at the top. * * @name GamemodeHooks:PopulateMenuBar * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PopulateMenuBar * @param {Gamemode} this - no description * @param {DMenuBar} menubar - The @DMenuBar type itself. * @returns {void} **/ PopulateMenuBar(this: Gamemode, menubar: DMenuBar): void /** * * Called when a player unfreezes an object. * * @name GamemodeHooks:PlayerUnfrozeObject * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerUnfrozeObject * @param {Gamemode} this - no description * @param {Player} ply - Player who has unfrozen an object * @param {Entity} ent - The unfrozen object * @param {PhysObj} physobj - The frozen physics object of the unfrozen entity ( For ragdolls ) * @returns {void} **/ PlayerUnfrozeObject(this: Gamemode, ply: Player, ent: Entity, physobj: PhysObj): void /** * * 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 @GamemodeHooks:ScalePlayerDamage from being called. * * @name GamemodeHooks:PlayerTraceAttack * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerTraceAttack * @param {Gamemode} this - no description * @param {Player} ply - The player that has been hit * @param {CTakeDamageInfo} dmginfo - The damage info of the bullet * @param {Vector} dir - Normalized vector direction of the bullet's path * @param {TraceResult} trace - The trace of the bullet's path, see @TraceResult structure * @returns {boolean} - Override engine handling **/ PlayerTraceAttack(this: Gamemode, ply: Player, dmginfo: CTakeDamageInfo, dir: Vector, trace: TraceResult): boolean /** * * The Move hook is called for you to manipulate the player's @CMoveData type. This hook is called moments before @GamemodeHooks:Move and @GamemodeHooks:PlayerNoClip. * * @name GamemodeHooks:PlayerTick * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerTick * @warning This hook will not run when inside a vehicle. @GamemodeHooks:VehicleMove will be called instead. * @param {Gamemode} this - no description * @param {Player} player - The player * @param {CMoveData} mv - The current movedata for the player. * @returns {void} **/ PlayerTick(this: Gamemode, player: Player, mv: CMoveData): void /** * * Called when a player switches their weapon. * * @name GamemodeHooks:PlayerSwitchWeapon * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSwitchWeapon * @bug #2922 This can be NULL on the client if the weapon hasn't been created over the network yet. * @param {Gamemode} this - no description * @param {Player} player - The player switching weapons. * @param {Weapon} oldWeapon - The previous weapon. Will be NULL if the previous weapon was removed or the player is switching from nothing. * @param {Weapon} newWeapon - The weapon the player switched to. Will be NULL if the player is switching to nothing. * @returns {boolean} - Return true to prevent weapon switch **/ PlayerSwitchWeapon(this: Gamemode, player: Player, oldWeapon: Weapon, newWeapon: Weapon): boolean /** * * Called whenever a player attempts to either turn on or off their flashlight, returning false will deny the change. * * @name GamemodeHooks:PlayerSwitchFlashlight * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSwitchFlashlight * @note Also gets called when using @Player:Flashlight. * @param {Gamemode} this - no description * @param {Player} ply - The player who attempts to change their flashlight state. * @param {boolean} enabled - The new state the player requested, true for on, false for off. * @returns {boolean} - Can toggle the flashlight or not **/ PlayerSwitchFlashlight(this: Gamemode, ply: Player, enabled: boolean): boolean /** * * Allows you to override the time between footsteps. * * @name GamemodeHooks:PlayerStepSoundTime * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerStepSoundTime * @param {Gamemode} this - no description * @param {Player} ply - Player who is walking * @param {STEPSOUNDTIME} type - The type of footsteps, see @STEPSOUNDTIME enum * @param {boolean} walking - Is the player walking or not ( +walk? ) * @returns {number} - Time between footsteps, in ms **/ PlayerStepSoundTime(this: Gamemode, ply: Player, type: STEPSOUNDTIME, walking: boolean): number /** * * Called when a player starts using voice chat. * * @name GamemodeHooks:PlayerStartVoice * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PlayerStartVoice * @param {Gamemode} this - no description * @param {Player} ply - Player who started using voice chat * @returns {void} **/ PlayerStartVoice(this: Gamemode, ply: Player): void /** * * Called when player starts taunting. * * @name GamemodeHooks:PlayerStartTaunt * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerStartTaunt * @param {Gamemode} this - no description * @param {Player} ply - The player who is taunting * @param {number} act - The sequence ID of the taunt * @param {number} length - Length of the taunt * @returns {void} **/ PlayerStartTaunt(this: Gamemode, ply: Player, act: number, length: number): void /** * * Determines if the player can spray using the "impulse 201" console command. * * @name GamemodeHooks:PlayerSpray * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSpray * @param {Gamemode} this - no description * @param {Player} sprayer - The player * @returns {boolean} - Return false to allow spraying, return true to prevent spraying. **/ PlayerSpray(this: Gamemode, sprayer: Player): boolean /** * * Called to spawn the player as a spectator. * * @name GamemodeHooks:PlayerSpawnAsSpectator * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSpawnAsSpectator * @param {Gamemode} this - no description * @param {Player} ply - The player to spawn as a spectator * @returns {void} **/ PlayerSpawnAsSpectator(this: Gamemode, ply: Player): void /** * * Called whenever a player spawns, including respawns. * See @GamemodeHooks:PlayerInitialSpawn for a hook called only the first time a player spawns. * See the [player_spawn gameevent](https://wiki.garrysmod.com/page/Game_Events) for a shared version of this hook. * * @name GamemodeHooks:PlayerSpawn * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSpawn * @warning By default, in "base" derived gamemodes, this hook will also call @GamemodeHooks:PlayerLoadout and @GamemodeHooks:PlayerSetModel, which may override your @EntityFuncs:SetModel and @Player:Give calls. Consider using the other hooks or a 0-second timer. * @param {Gamemode} this - no description * @param {Player} player - The player who spawned. * @param {boolean} transition - If true, the player just spawned from a map transition. You probably want to not touch player's weapons if this is set to true from this hook. * @returns {void} **/ PlayerSpawn(this: Gamemode, player: Player, transition: boolean): void /** * * Called when the player is killed by @Player:KillSilent. * The player is already considered dead when this hook is called. * * See @GamemodeHooks:PlayerDeath for a hook which handles all other death causes. * * @GamemodeHooks:PostPlayerDeath is called **after** this hook. * * @name GamemodeHooks:PlayerSilentDeath * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSilentDeath * @note @Player:Alive will return true in this hook. * @param {Gamemode} this - no description * @param {Player} ply - The player who was killed * @returns {void} **/ PlayerSilentDeath(this: Gamemode, ply: Player): void /** * * Allows to suppress player taunts. * * @name GamemodeHooks:PlayerShouldTaunt * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerShouldTaunt * @param {Gamemode} this - no description * @param {Player} ply - Player who tried to taunt * @param {ACT} act - Act ID of the taunt player tries to do, see @ACT enum * @returns {boolean} - Return false to disallow player taunting **/ PlayerShouldTaunt(this: Gamemode, ply: Player, act: ACT): boolean /** * * Returns true if the player should take damage from the given attacker. * * @name GamemodeHooks:PlayerShouldTakeDamage * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerShouldTakeDamage * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {Entity} attacker - The attacker * @returns {boolean} - Allow damage **/ PlayerShouldTakeDamage(this: Gamemode, ply: Player, attacker: Entity): boolean /** * * Called whenever a player spawns and must choose a model. A good place to assign a model to a player. * * @name GamemodeHooks:PlayerSetModel * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSetModel * @note This function may not work in your custom gamemode if you have overridden your @GamemodeHooks:PlayerSpawn and you do not use self.BaseClass.PlayerSpawn or @hook.Call. * @param {Gamemode} this - no description * @param {Player} ply - The player being chosen * @returns {void} **/ PlayerSetModel(this: Gamemode, ply: Player): void /** * * Called whenever view model hands needs setting a model. By default this calls @PlayerHooks:GetHandsModel and if that fails, sets the hands model according to his player model. * * @name GamemodeHooks:PlayerSetHandsModel * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSetHandsModel * @param {Gamemode} this - no description * @param {Player} ply - The player whose hands needs a model set * @param {Entity} ent - The hands to set model of * @returns {void} **/ PlayerSetHandsModel(this: Gamemode, ply: Player, ent: Entity): void /** * * Find a team spawn point entity for this player. * * @name GamemodeHooks:PlayerSelectTeamSpawn * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSelectTeamSpawn * @param {Gamemode} this - no description * @param {number} team - Players team * @param {Player} ply - The player * @returns {Entity} - The entity to use as a spawn point. **/ PlayerSelectTeamSpawn(this: Gamemode, team: number, ply: Player): Entity /** * * Called to determine a spawn point for a player to spawn at. * * @name GamemodeHooks:PlayerSelectSpawn * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSelectSpawn * @param {Gamemode} this - no description * @param {Player} ply - The player who needs a spawn point * @param {boolean} transition - If true, the player just spawned from a map transition. You probably want to not return an entity for that case to not override player's position. * @returns {Entity} - The spawnpoint entity to spawn the player at **/ PlayerSelectSpawn(this: Gamemode, ply: Player, transition: boolean): Entity /** * * Called when a player dispatched a chat message. For the clientside equivalent, see @GamemodeHooks:OnPlayerChat. * * @name GamemodeHooks:PlayerSay * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerSay * @param {Gamemode} this - no description * @param {Player} sender - The player which sent the message. * @param {string} text - The message's content * @param {boolean} teamChat - Is team chat? * @returns {string} - What to show instead of original text. * Set to "" to stop the message from displaying. **/ PlayerSay(this: Gamemode, sender: Player, text: string, teamChat: boolean): string /** * * Called after the player's think. * * @name GamemodeHooks:PlayerPostThink * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerPostThink * @param {Gamemode} this - no description * @param {Player} ply - The player * @returns {void} **/ PlayerPostThink(this: Gamemode, ply: Player): void /** * * Request a player to join the team. This function will check if the team is available to join or not. * This hook is called when the player runs "changeteam" in the console. * To prevent the player from changing teams, see @GamemodeHooks:PlayerCanJoinTeam * * @name GamemodeHooks:PlayerRequestTeam * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerRequestTeam * @param {Gamemode} this - no description * @param {Player} ply - The player to try to put into a team * @param {number} team - Team to put the player into if the checks succeeded * @returns {void} **/ PlayerRequestTeam(this: Gamemode, ply: Player, team: number): void /** * * Called when a player tries to switch noclip mode. * * @name GamemodeHooks:PlayerNoClip * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerNoClip * @param {Gamemode} this - no description * @param {Player} ply - The person who entered/exited noclip * @param {boolean} desiredState - Represents the noclip state (on/off) the user will enter if this hook allows them to. * @returns {boolean} - Return false to disallow the switch. **/ PlayerNoClip(this: Gamemode, ply: Player, desiredState: boolean): boolean /** * * Called to give players the default set of weapons. * * @name GamemodeHooks:PlayerLoadout * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerLoadout * @note This function may not work in your custom gamemode if you have overridden your @GamemodeHooks:PlayerSpawn and you do not use self.BaseClass.PlayerSpawn or @hook.Call. * @param {Gamemode} this - no description * @param {Player} ply - Player to give weapons to. * @returns {void} **/ PlayerLoadout(this: Gamemode, ply: Player): void /** * * Called when a player leaves a vehicle. * * @name GamemodeHooks:PlayerLeaveVehicle * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerLeaveVehicle * @note For vehicles with exit animations, this will be called **at the end** of the animation, **not at the start**! * @bug #2619 This is not called when a different vehicle is immediately entered with @Player:EnterVehicle. * @param {Gamemode} this - no description * @param {Player} ply - Player who left a vehicle. * @param {Vehicle} veh - Vehicle the player left. * @returns {void} **/ PlayerLeaveVehicle(this: Gamemode, ply: Player, veh: Vehicle): void /** * * Makes the player join a specified team. This is a convenience function that calls @Player:SetTeam and runs the @GamemodeHooks:OnPlayerChangedTeam hook. * * @name GamemodeHooks:PlayerJoinTeam * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerJoinTeam * @param {Gamemode} this - no description * @param {Player} ply - Player to force * @param {number} team - The team to put player into * @returns {void} **/ PlayerJoinTeam(this: Gamemode, ply: Player, team: number): void /** * * Called when the player spawns for the first time. * See @GamemodeHooks:PlayerSpawn for a hook called every player spawn. * * @name GamemodeHooks:PlayerInitialSpawn * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerInitialSpawn * @note This hook is called before the player has fully loaded, when the player is still in seeing the "Starting Lua" screen. For example, trying to use the @EntityFuncs:GetModel function will return the default model ("player/default.mdl") * @warning Due to the above note, sending @net library messages to the spawned player in this hook is highly unreliable, and they most likely won't be received. See https://github.com/Facepunch/garrysmod-requests/issues/718. A quick and dirty work-around is to delay any sending using @timer.Simple with at least 5 seconds delay. * @param {Gamemode} this - no description * @param {Player} player - The player who spawned. * @param {boolean} transition - If true, the player just spawned from a map transition. * @returns {void} **/ PlayerInitialSpawn(this: Gamemode, player: Player, transition: boolean): void /** * * Called when a player gets hurt. * * @name GamemodeHooks:PlayerHurt * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerHurt * @param {Gamemode} this - no description * @param {Player} victim - Victim * @param {Entity} attacker - Attacker Entity * @param {number} healthRemaining - Remaining Health * @param {number} damageTaken - Damage Taken * @returns {void} **/ PlayerHurt(this: Gamemode, victim: Player, attacker: Entity, healthRemaining: number, damageTaken: number): void /** * * Called when a player freezes an object. * * @name GamemodeHooks:PlayerFrozeObject * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerFrozeObject * @param {Gamemode} this - no description * @param {Player} ply - Player who has frozen an object * @param {Entity} ent - The frozen object * @param {PhysObj} physobj - The frozen physics object of the frozen entity ( For ragdolls ) * @returns {void} **/ PlayerFrozeObject(this: Gamemode, ply: Player, ent: Entity, physobj: PhysObj): void /** * * Called whenever a player steps. Return true to mute the normal sound. * * @name GamemodeHooks:PlayerFootstep * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerFootstep * @param {Gamemode} this - no description * @param {Player} ply - The stepping player * @param {Vector} pos - The position of the step * @param {number} foot - Foot that is stepped. 0 for left, 1 for right * @param {string} sound - Sound that is going to play * @param {number} volume - Volume of the footstep * @param {CRecipientFilter} filter - The Recipient filter of players who can hear the footstep * @returns {boolean} - Prevent default step sound **/ PlayerFootstep(this: Gamemode, ply: Player, pos: Vector, foot: number, sound: string, volume: number, filter: CRecipientFilter): boolean /** * * Called when a player enters a vehicle. * Called just after @GamemodeHooks:CanPlayerEnterVehicle. * See also @GamemodeHooks:PlayerLeaveVehicle. * * @name GamemodeHooks:PlayerEnteredVehicle * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerEnteredVehicle * @param {Gamemode} this - no description * @param {Player} ply - Player who entered vehicle * @param {Vehicle} veh - Vehicle the player entered * @param {number} role - no description * @returns {void} **/ PlayerEnteredVehicle(this: Gamemode, ply: Player, veh: Vehicle, role: number): void /** * * Called when a weapon is dropped by a player via @Player:DropWeapon. * See also @GamemodeHooks:WeaponEquip for a hook when a player picks up a weapon. * The weapon's @EntityFuncs:GetOwner will be NULL at the time this hook is called. * @WeaponHooks:OnDrop will be called before this hook is. * * @name GamemodeHooks:PlayerDroppedWeapon * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerDroppedWeapon * @param {Gamemode} this - no description * @param {Player} owner - The player who owned this weapon before it was dropped * @param {Weapon} wep - The weapon that was dropped * @returns {void} **/ PlayerDroppedWeapon(this: Gamemode, owner: Player, wep: Weapon): void /** * * Called when player stops using voice chat. * * @name GamemodeHooks:PlayerEndVoice * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PlayerEndVoice * @param {Gamemode} this - no description * @param {Player} ply - Player who stopped talking * @returns {void} **/ PlayerEndVoice(this: Gamemode, ply: Player): void /** * * Called to update the player's animation during a drive. * * @name GamemodeHooks:PlayerDriveAnimate * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerDriveAnimate * @param {Gamemode} this - no description * @param {Player} ply - The driving player * @returns {void} **/ PlayerDriveAnimate(this: Gamemode, ply: Player): void /** * * Called when a player leaves the server. See the [player_disconnect gameevent](https://wiki.garrysmod.com/page/Game_Events) for a shared version of this hook. * * @name GamemodeHooks:PlayerDisconnected * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerDisconnected * @bug #3523 This is not called in single-player or listen servers for the host. * @param {Gamemode} this - no description * @param {Player} ply - the player * @returns {void} **/ PlayerDisconnected(this: Gamemode, ply: Player): void /** * * Returns whether or not the default death sound should be muted. * * @name GamemodeHooks:PlayerDeathSound * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerDeathSound * @param {Gamemode} this - no description * @returns {boolean} - Mute death sound **/ PlayerDeathSound(this: Gamemode): boolean /** * * Called every think while the player is dead. The return value will determine if the player respawns. * Overwriting this function will prevent players from respawning by pressing space or clicking. * * @name GamemodeHooks:PlayerDeathThink * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerDeathThink * @bug #1577 This hook is not called for players with the [FL_FROZEN](https://wiki.garrysmod.com/page/Enums/FL) flag applied. * @param {Gamemode} this - no description * @param {Player} ply - The player affected in the hook. * @returns {boolean} - Allow spawn **/ PlayerDeathThink(this: Gamemode, ply: Player): boolean /** * * Called when a player is killed by @Player:Kill or any other normal means. * This hook is **not** called if the player is killed by @Player:KillSilent. See @GamemodeHooks:PlayerSilentDeath for that. * * @GamemodeHooks:DoPlayerDeath is called **before** this hook. * * @GamemodeHooks:PostPlayerDeath is called **after** this hook. * See @Player:LastHitGroup if you need to get the last hit hitgroup of the player. * * @name GamemodeHooks:PlayerDeath * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerDeath * @note @Player:Alive will return true in this hook. * @param {Gamemode} this - no description * @param {Player} victim - The player who died * @param {Entity} inflictor - Item used to kill the victim * @param {Entity} attacker - Player or entity that killed the victim * @returns {void} **/ PlayerDeath(this: Gamemode, victim: Player, inflictor: Entity, attacker: Entity): void /** * * Executes when a player connects to the server. Called before the player has been assigned a [UserID](https://wiki.garrysmod.com/page/Player/UserID) and entity. See the [player_connect gameevent](https://wiki.garrysmod.com/page/Game_Events) for a version of this hook called after the player entity has been created. * * @name GamemodeHooks:PlayerConnect * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerConnect * @note This is only called clientside for listen server hosts. * @note This is not called clientside for the local player. * @note This argument will only be passed serverside. * @param {Gamemode} this - no description * @param {string} name - The player's name. * @param {string} ip - The player's IP address. Will be "none" for bots. * @returns {void} **/ PlayerConnect(this: Gamemode, name: string, ip: string): void /** * * Called whenever a player's class is changed on the server-side with @player_manager.SetPlayerClass. * * @name GamemodeHooks:PlayerClassChanged * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PlayerClassChanged * @internal * @param {Gamemode} this - no description * @param {Player} ply - The player whose class has been changed. * @param {number} newID - The network ID of the player class's name string, or 0 if we are clearing a player class from the player. * Pass this into @util.NetworkIDToString to retrieve the proper name of the player class. * @returns {void} **/ PlayerClassChanged(this: Gamemode, ply: Player, newID: number): void /** * * Returns whether or not a player is allowed to pick up a weapon. * * @name GamemodeHooks:PlayerCanPickupWeapon * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerCanPickupWeapon * @param {Gamemode} this - no description * @param {Player} ply - The player attempting to pick up the weapon * @param {Weapon} wep - The weapon entity in question * @returns {boolean} - Allowed pick up or not **/ PlayerCanPickupWeapon(this: Gamemode, ply: Player, wep: Weapon): boolean /** * * Returns whether or not the player can see the other player's chat. * * @name GamemodeHooks:PlayerCanSeePlayersChat * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerCanSeePlayersChat * @param {Gamemode} this - no description * @param {string} text - The chat text * @param {boolean} teamOnly - If the message is team-only * @param {Player} listener - The player receiving the message * @param {Player} speaker - The player sending the message * @returns {boolean} - Can see other player's chat **/ PlayerCanSeePlayersChat(this: Gamemode, text: string, teamOnly: boolean, listener: Player, speaker: Player): boolean /** * * Returns whether or not a player is allowed to pick an item up. * * @name GamemodeHooks:PlayerCanPickupItem * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerCanPickupItem * @param {Gamemode} this - no description * @param {Player} ply - Player attempting to pick up * @param {Entity} item - The item the player is attempting to pick up * @returns {boolean} - Allow pick up **/ PlayerCanPickupItem(this: Gamemode, ply: Player, item: Entity): boolean /** * * Returns whether or not a player is allowed to join a team * * @name GamemodeHooks:PlayerCanJoinTeam * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerCanJoinTeam * @param {Gamemode} this - no description * @param {Player} ply - Player attempting to switch teams * @param {number} team - Index of the team * @returns {boolean} - Allowed to switch **/ PlayerCanJoinTeam(this: Gamemode, ply: Player, team: number): boolean /** * * Decides whether a player can hear another player using voice chat. * * @name GamemodeHooks:PlayerCanHearPlayersVoice * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerCanHearPlayersVoice * @note This hook is called several times a tick, so ensure your code is efficient. * @param {Gamemode} this - no description * @param {Player} listener - The listening player. * @param {Player} talker - The talking player. * @returns {boolean} - Return true if the listener should hear the talker, false if they shouldn't. * @returns {boolean} - 3D sound. If set to true, will fade out the sound the further away listener is from the talker, the voice will also be in stereo, and not mono. * @tupleReturn **/ PlayerCanHearPlayersVoice(this: Gamemode, listener: Player, talker: Player): [boolean, boolean] /** * * Called when a player releases a button. * * @name GamemodeHooks:PlayerButtonUp * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerButtonUp * @param {Gamemode} this - no description * @param {Player} ply - Player who released the button * @param {BUTTON_CODE} button - The button, see @BUTTON_CODE enum * @returns {void} **/ PlayerButtonUp(this: Gamemode, ply: Player, button: BUTTON_CODE): void /** * * Runs when a bind has been pressed. Allows to block commands. * * @name GamemodeHooks:PlayerBindPress * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/PlayerBindPress * @note By using the "alias" console command, this hook can be effectively circumvented * @note To stop the user from using +attack, +left and any other movement commands of the sort, please look into using @GamemodeHooks:StartCommand instead * @bug #1176 The third argument will always be true. * @bug #2888 This does not run for function keys binds (F1-F12). * @param {Gamemode} this - no description * @param {Player} ply - The player who used the command; this will always be equal to @LocalPlayer function * @param {string} bind - The bind command * @param {boolean} pressed - If the bind was activated or deactivated * @returns {boolean} - Return true to prevent the bind **/ PlayerBindPress(this: Gamemode, ply: Player, bind: string, pressed: boolean): boolean /** * * Called when a player presses a button. * * @name GamemodeHooks:PlayerButtonDown * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PlayerButtonDown * @param {Gamemode} this - no description * @param {Player} ply - Player who pressed the button * @param {BUTTON_CODE} button - The button, see @BUTTON_CODE enum * @returns {void} **/ PlayerButtonDown(this: Gamemode, ply: Player, button: BUTTON_CODE): void /** * * Called once when the player is authenticated. * * @name GamemodeHooks:PlayerAuthed * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/PlayerAuthed * @bug #3026 @CurTime function returns 0 in this hook. * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {string} steamid - The player's SteamID * @param {string} uniqueid - The player's UniqueID * @returns {void} **/ PlayerAuthed(this: Gamemode, ply: Player, steamid: string, uniqueid: string): void /** * * Called to determine if a player should be able to pick up an entity with the Physics Gun. * See @GamemodeHooks:OnPhysgunPickup for a hook which is called when a player has successfully picked up an entity. * * @name GamemodeHooks:PhysgunPickup * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PhysgunPickup * @param {Gamemode} this - no description * @param {Player} player - The player that is picking up using the Physics Gun. * @param {Entity} entity - The entity that is being picked up. * @returns {boolean} - Returns whether the player can pick up the entity or not. **/ PhysgunPickup(this: Gamemode, player: Player, entity: Entity): boolean /** * * Called when a player drops an entity with the Physgun. * * @name GamemodeHooks:PhysgunDrop * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/PhysgunDrop * @param {Gamemode} this - no description * @param {Player} ply - The player who dropped an entitiy * @param {Entity} ent - The dropped entity * @returns {void} **/ PhysgunDrop(this: Gamemode, ply: Player, ent: Entity): void /** * * Called when the player changes their weapon to another one - and their viewmodel model changes. * * @name GamemodeHooks:OnViewModelChanged * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/OnViewModelChanged * @bug #2473 This is not always called clientside. * @param {Gamemode} this - no description * @param {Entity} viewmodel - The viewmodel that is changing * @param {string} oldModel - The old model * @param {string} newModel - The new model * @returns {void} **/ OnViewModelChanged(this: Gamemode, viewmodel: Entity, oldModel: string, newModel: string): void /** * * Called when the player undoes something. * * @name GamemodeHooks:OnUndo * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnUndo * @param {Gamemode} this - no description * @param {string} name - The name of the undo action * @param {string} customText - The custom text for the undo, set by @undo.SetCustomUndoText * @returns {void} **/ OnUndo(this: Gamemode, name: string, customText: string): void /** * * Called when DTextEntry loses focus. * * @name GamemodeHooks:OnTextEntryLoseFocus * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnTextEntryLoseFocus * @param {Gamemode} this - no description * @param {Panel} panel - The panel that lost focus * @returns {void} **/ OnTextEntryLoseFocus(this: Gamemode, panel: Panel): void /** * * Called when a @DTextEntry type gets focus. * This hook is run from @DTextEntry:OnGetFocus and @PanelHooks:OnMousePressed of @DTextEntry type. * * @name GamemodeHooks:OnTextEntryGetFocus * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnTextEntryGetFocus * @param {Gamemode} this - no description * @param {Panel} panel - The panel that got focus * @returns {void} **/ OnTextEntryGetFocus(this: Gamemode, panel: Panel): void /** * * Called when a player presses the "+menu" bind on their keyboard, which is bound to Q by default. * * @name GamemodeHooks:OnSpawnMenuOpen * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnSpawnMenuOpen * @param {Gamemode} this - no description * @returns {void} **/ OnSpawnMenuOpen(this: Gamemode): void /** * * Called when a player releases the "+menu" bind on their keyboard, which is bound to Q by default. * * @name GamemodeHooks:OnSpawnMenuClose * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnSpawnMenuClose * @param {Gamemode} this - no description * @returns {void} **/ OnSpawnMenuClose(this: Gamemode): void /** * * Called when gamemode has been reloaded by auto refresh. * * @name GamemodeHooks:OnReloaded * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/OnReloaded * @note It seems that this event can be triggered more than once for a single refresh event. * @param {Gamemode} this - no description * @returns {void} **/ OnReloaded(this: Gamemode): void /** * * Called when a player makes contact with the ground. * * @name GamemodeHooks:OnPlayerHitGround * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/OnPlayerHitGround * @param {Gamemode} this - no description * @param {Entity} player - Player * @param {boolean} inWater - Did the player land in water? * @param {boolean} onFloater - Did the player land on an object floating in the water? * @param {number} speed - The speed at which the player hit the ground * @returns {boolean} - Return true to suppress default action **/ OnPlayerHitGround(this: Gamemode, player: Entity, inWater: boolean, onFloater: boolean, speed: number): boolean /** * * Called whenever a player sends a chat message. For the serverside equivalent, see @GamemodeHooks:PlayerSay. * * @name GamemodeHooks:OnPlayerChat * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnPlayerChat * @note The text input of this hook depends on @GamemodeHooks:PlayerSay. If it is suppressed on the server, it will be suppressed on the client. * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {string} text - The message's text * @param {boolean} teamChat - Is the player typing in team chat? * @param {boolean} isDead - Is the player dead? * @returns {boolean} - Should the message be suppressed? **/ OnPlayerChat(this: Gamemode, ply: Player, text: string, teamChat: boolean, isDead: boolean): boolean /** * * Called when a player has changed team using @GamemodeHooks:PlayerJoinTeam. * * @name GamemodeHooks:OnPlayerChangedTeam * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/OnPlayerChangedTeam * @warning This hook will not work with @hook.Add and it is only called manually from @GamemodeHooks:PlayerJoinTeam by the base gamemode * @param {Gamemode} this - no description * @param {Player} ply - Player who has changed team * @param {number} oldTeam - Index of the team the player was originally in * @param {number} newTeam - Index of the team the player has changed to * @returns {void} **/ OnPlayerChangedTeam(this: Gamemode, ply: Player, oldTeam: number, newTeam: number): void /** * * Called when a player reloads with the physgun. Override this to disable default unfreezing behavior. * * @name GamemodeHooks:OnPhysgunReload * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/OnPhysgunReload * @param {Gamemode} this - no description * @param {Weapon} physgun - The physgun in question * @param {Player} ply - The player wielding the physgun * @returns {boolean} - Whether the player can reload with the physgun or not **/ OnPhysgunReload(this: Gamemode, physgun: Weapon, ply: Player): boolean /** * * Called to when a player has successfully picked up an entity with their Physics Gun. * Not to be confused with @GamemodeHooks:PhysgunPickup which is called multiple times to ask if the player should be able to pick up an entity. * * @name GamemodeHooks:OnPhysgunPickup * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/OnPhysgunPickup * @param {Gamemode} this - no description * @param {Player} ply - The player that has picked up something using the physics gun. * @param {Entity} ent - The entity that was picked up. * @returns {void} **/ OnPhysgunPickup(this: Gamemode, ply: Player, ent: Entity): void /** * * Called when a player freezes an entity with the physgun. * * @name GamemodeHooks:OnPhysgunFreeze * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/OnPhysgunFreeze * @bug #723 This is not called for players or NPCs being held with the physgun. * @param {Gamemode} this - no description * @param {Entity} weapon - The weapon that was used to freeze the entity. * @param {PhysObj} physobj - Physics object of the entity. * @param {Entity} ent - The target entity. * @param {Player} ply - The player who tried to freeze the entity. * @returns {boolean} - Allows you to override whether the player can freeze the entity **/ OnPhysgunFreeze(this: Gamemode, weapon: Entity, physobj: PhysObj, ent: Entity, ply: Player): boolean /** * * Called whenever an NPC is killed. * * @name GamemodeHooks:OnNPCKilled * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/OnNPCKilled * @param {Gamemode} this - no description * @param {NPC} npc - The killed NPC * @param {Entity} attacker - The NPCs attacker, the entity that gets the kill credit, for example a player or an NPC. * @param {Entity} inflictor - Death inflictor. The entity that did the killing. Not necessarily a weapon. * @returns {void} **/ OnNPCKilled(this: Gamemode, npc: NPC, attacker: Entity, inflictor: Entity): void /** * * Called when a Lua error occurs, only works in the Menu realm. * * @name GamemodeHooks:OnLuaError * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/OnLuaError * @warning Modify menu state Lua code at your own risk! * @param {Gamemode} this - no description * @param {string} error - The error that occurred. * @param {number} realm - Where the Lua error took place * @param {string} name - Title of the addon that is creating the Lua errors * @param {number} id - Steam Workshop ID of the addon creating Lua errors, if it is an addon. * @returns {void} **/ OnLuaError(this: Gamemode, error: string, realm: number, name: string, id: number): void /** * * Called when the gamemode is loaded. * @LocalPlayer function() returns NULL at the time this is run. * * @name GamemodeHooks:OnGamemodeLoaded * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/OnGamemodeLoaded * @param {Gamemode} this - no description * @returns {void} **/ OnGamemodeLoaded(this: Gamemode): void /** * * Called when the entity is created. * * @name GamemodeHooks:OnEntityCreated * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/OnEntityCreated * @note Some entities on initial map spawn are passed through this hook, and then removed in the same frame. This is used by the engine to precache things like models and sounds, so always check their validity with @IsValid function. * @warning Removing the created entity during this event can lead to unexpected problems. Use @timer.Simple( 0, .... ) to safely remove the entity. * @param {Gamemode} this - no description * @param {Entity} entity - The entity * @returns {void} **/ OnEntityCreated(this: Gamemode, entity: Entity): void /** * * Called when the context menu keybind (+menu_context) is pressed, which by default is C. * See also @GamemodeHooks:OnContextMenuClose. * * @name GamemodeHooks:OnContextMenuOpen * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnContextMenuOpen * @param {Gamemode} this - no description * @returns {void} **/ OnContextMenuOpen(this: Gamemode): void /** * * Called when the context menu keybind (+menu_context) is released, which by default is C. * This hook will not run if @input.IsKeyTrapping returns true. * See also @GamemodeHooks:OnContextMenuOpen. * * @name GamemodeHooks:OnContextMenuClose * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnContextMenuClose * @param {Gamemode} this - no description * @returns {void} **/ OnContextMenuClose(this: Gamemode): void /** * * Called when a player has been hurt by an explosion. Override to disable default sound effect. * * @name GamemodeHooks:OnDamagedByExplosion * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/OnDamagedByExplosion * @param {Gamemode} this - no description * @param {Player} ply - Player who has been hurt * @param {CTakeDamageInfo} dmginfo - Damage info from explsion * @returns {void} **/ OnDamagedByExplosion(this: Gamemode, ply: Player, dmginfo: CTakeDamageInfo): void /** * * Called when a player has achieved an achievement. You can get the name and other information from an achievement ID with the @achievements type library. * * @name GamemodeHooks:OnAchievementAchieved * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnAchievementAchieved * @param {Gamemode} this - no description * @param {Player} ply - The player that earned the achievement * @param {number} achievement - The index of the achievement * @returns {void} **/ OnAchievementAchieved(this: Gamemode, ply: Player, achievement: number): void /** * * Called when the local player presses TAB while having their chatbox opened. * * @name GamemodeHooks:OnChatTab * @realm client * @wiki https://wiki.garrysmod.com/page/GM/OnChatTab * @param {Gamemode} this - no description * @param {string} text - The currently typed into chatbox text * @returns {string} - What should be placed into the chatbox instead of what currently is when player presses tab **/ OnChatTab(this: Gamemode, text: string): string /** * * Called whenever this entity changes its transmission state for this @LocalPlayer function, such as exiting or re entering the PVS. * * @name GamemodeHooks:NotifyShouldTransmit * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/NotifyShouldTransmit * @note This is the best place to handle the reset of @EntityFuncs:SetPredictable, as this would be usually called when the player lags and requests a full packet update * @note When the entity stops transmitting, @EntityFuncs:IsDormant will only return true **after** this hook * @param {Gamemode} this - no description * @param {Entity} ent - The entity that changed its transmission state. * @param {boolean} shouldtransmit - True if we started transmitting to this client and false if we stopped. * @returns {void} **/ NotifyShouldTransmit(this: Gamemode, ent: Entity, shouldtransmit: boolean): void /** * * Called when a player has been validated by Steam. * * @name GamemodeHooks:NetworkIDValidated * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/NetworkIDValidated * @param {Gamemode} this - no description * @param {string} name - Player name * @param {string} steamID - Player SteamID * @returns {void} **/ NetworkIDValidated(this: Gamemode, name: string, steamID: string): void /** * * Returning true in this hook will cause it to render depth buffers defined with @render.GetResolvedFullFrameDepth. * * @name GamemodeHooks:NeedsDepthPass * @realm client * @wiki https://wiki.garrysmod.com/page/GM/NeedsDepthPass * @param {Gamemode} this - no description * @returns {boolean} - Render depth buffer **/ NeedsDepthPass(this: Gamemode): boolean /** * * Called when an entity has been created over the network. * * @name GamemodeHooks:NetworkEntityCreated * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/NetworkEntityCreated * @param {Gamemode} this - no description * @param {Entity} ent - Created entity * @returns {void} **/ NetworkEntityCreated(this: Gamemode, ent: Entity): void /** * * The Move hook is called for you to manipulate the player's MoveData. * You shouldn't adjust the player's position in any way in the move hook. This is because due to prediction errors, the netcode might run the move hook multiple times as packets arrive late. Therefore you should only adjust the movedata construct in this hook. * Generally you shouldn't have to use this hook - if you want to make a custom move type you should look at the drive system. * This hook is called after @GamemodeHooks:PlayerTick. * See [Game Movement](https://wiki.garrysmod.com/page/Game%20Movement) for an explanation on the move system. * * @name GamemodeHooks:Move * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/Move * @param {Gamemode} this - no description * @param {Player} ply - Player * @param {CMoveData} mv - Movement information * @returns {boolean} - Return true to suppress default engine action **/ Move(this: Gamemode, ply: Player, mv: CMoveData): boolean /** * * Override this gamemode function to disable mouth movement when talking on voice chat. * * @name GamemodeHooks:MouthMoveAnimation * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/MouthMoveAnimation * @param {Gamemode} this - no description * @param {Player} ply - Player in question * @returns {void} **/ MouthMoveAnimation(this: Gamemode, ply: Player): void /** * * Called when *menu.lua* has finished loading. * * @name GamemodeHooks:MenuStart * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/MenuStart * @param {Gamemode} this - no description * @returns {void} **/ MenuStart(this: Gamemode): void /** * * Called from gm_load when the game should load a map. * * @name GamemodeHooks:LoadGModSave * @realm server * @wiki https://wiki.garrysmod.com/page/GM/LoadGModSave * @param {Gamemode} this - no description * @param {string} data - no description * @param {string} map - no description * @param {number} timestamp - no description * @returns {void} **/ LoadGModSave(this: Gamemode, data: string, map: string, timestamp: number): void /** * * Runs when a IN key was released by a player. * For a more general purpose function that handles all kinds of input, see @GamemodeHooks:PlayerButtonUp * * @name GamemodeHooks:KeyRelease * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/KeyRelease * @param {Gamemode} this - no description * @param {Player} ply - The player releasing the key. If running client-side, this will always be @LocalPlayer function * @param {IN} key - The key that the player released using @IN enum. * @returns {void} **/ KeyRelease(this: Gamemode, ply: Player, key: IN): void /** * * Called whenever a player pressed a key included within the IN keys. * For a more general purpose function that handles all kinds of input, see @GamemodeHooks:PlayerButtonDown * * @name GamemodeHooks:KeyPress * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/KeyPress * @warning Due to this being a predicted hook, @ParticleEffect functions created only serverside from this hook will not be networked to the client, so make sure to do that on both realms * @param {Gamemode} this - no description * @param {Player} ply - The player pressing the key. If running client-side, this will always be @LocalPlayer function * @param {IN} key - The key that the player pressed using @IN enum. * @returns {void} **/ KeyPress(this: Gamemode, ply: Player, key: IN): void /** * * Check if a player can spawn at a certain spawnpoint. * * @name GamemodeHooks:IsSpawnpointSuitable * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/IsSpawnpointSuitable * @param {Gamemode} this - no description * @param {Player} ply - The player who is spawned * @param {Entity} spawnpoint - The spawnpoint entity (on the map) * @param {boolean} makeSuitable - If this is true, it'll kill any players blocking the spawnpoint * @returns {boolean} - Return true to indicate that the spawnpoint is suitable (Allow for the player to spawn here), false to prevent spawning **/ IsSpawnpointSuitable(this: Gamemode, ply: Player, spawnpoint: Entity, makeSuitable: boolean): boolean /** * * 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. * * @name GamemodeHooks:InputMouseApply * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/InputMouseApply * @param {Gamemode} this - no description * @param {CUserCmd} cmd - User command * @param {number} x - The amount of mouse movement across the X axis this frame * @param {number} y - The amount of mouse movement across the Y axis this frame * @param {Angle} ang - The current view angle * @returns {boolean} - Return true if we modified something **/ InputMouseApply(this: Gamemode, cmd: CUserCmd, x: number, y: number, ang: Angle): boolean /** * * Called after all the entities are initialized. * * @name GamemodeHooks:InitPostEntity * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/InitPostEntity * @note At this point the client only knows about the entities that are within the spawnpoints' [PVS](https://en.wikipedia.org/wiki/Potentially_visible_set). For instance, if the server sends an entity that is not within this PVS, the client will receive it as NULL entity. * @param {Gamemode} this - no description * @returns {void} **/ InitPostEntity(this: Gamemode): void /** * * Called after the gamemode loads and starts. * * @name GamemodeHooks:Initialize * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/Initialize * @param {Gamemode} this - no description * @returns {void} **/ Initialize(this: Gamemode): void /** * * Called when a weapon has been picked up. Override to disable the default HUD notification. * * @name GamemodeHooks:HUDWeaponPickedUp * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDWeaponPickedUp * @param {Gamemode} this - no description * @param {Weapon} weapon - The picked up weapon * @returns {void} **/ HUDWeaponPickedUp(this: Gamemode, weapon: Weapon): void /** * * Called when the Gamemode is about to draw a given element on the client's HUD (heads-up display). * * @name GamemodeHooks:HUDShouldDraw * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDShouldDraw * @note This hook is called HUNDREDS of times per second (more than 5 times per frame on average). You shouldn't be performing any computationally intensive operations. * @param {Gamemode} this - no description * @param {string} name - The name of the HUD element. You can find a full list of HUD elements for this hook [here](https://wiki.garrysmod.com/page/HUD_Element_List). * @returns {boolean} - Return false to prevent the given element from being drawn on the client's screen. **/ HUDShouldDraw(this: Gamemode, name: string): boolean /** * * Called before @GamemodeHooks:HUDPaint when the HUD background is being drawn. * Things rendered in this hook will **always** appear behind things rendered in @GamemodeHooks:HUDPaint. * * @name GamemodeHooks:HUDPaintBackground * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDPaintBackground * @rendering hook:2d * @param {Gamemode} this - no description * @returns {void} **/ HUDPaintBackground(this: Gamemode): void /** * * Called whenever the HUD should be drawn. Called right before @GamemodeHooks:HUDDrawScoreBoard and after @GamemodeHooks:HUDPaintBackground. * Not called when the Camera SWEP is equipped. See also @GamemodeHooks:DrawOverlay. * * @name GamemodeHooks:HUDPaint * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDPaint * @rendering hook:2d * @note Only be called when r_drawvgui is enabled and the game is not paused * @param {Gamemode} this - no description * @returns {void} **/ HUDPaint(this: Gamemode): void /** * * Called when an item has been picked up. Override to disable the default HUD notification. * * @name GamemodeHooks:HUDItemPickedUp * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDItemPickedUp * @param {Gamemode} this - no description * @param {string} itemName - Name of the picked up item * @returns {void} **/ HUDItemPickedUp(this: Gamemode, itemName: string): void /** * * Called from @GamemodeHooks:HUDPaint to draw player info when you hover over a player with your crosshair or mouse. * * @name GamemodeHooks:HUDDrawTargetID * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDDrawTargetID * @param {Gamemode} this - no description * @returns {void} **/ HUDDrawTargetID(this: Gamemode): void /** * * Called every frame to render the scoreboard. * It is recommended to use Derma and VGUI for this job instead of this hook. Called right after @GamemodeHooks:HUDPaint. * * @name GamemodeHooks:HUDDrawScoreBoard * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDDrawScoreBoard * @rendering hook:2d * @param {Gamemode} this - no description * @returns {void} **/ HUDDrawScoreBoard(this: Gamemode): void /** * * Renders the HUD pick-up history. Override to hide default or draw your own HUD. * * @name GamemodeHooks:HUDDrawPickupHistory * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDDrawPickupHistory * @param {Gamemode} this - no description * @returns {void} **/ HUDDrawPickupHistory(this: Gamemode): void /** * * Called when the client has picked up ammo. Override to disable default HUD notification. * * @name GamemodeHooks:HUDAmmoPickedUp * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HUDAmmoPickedUp * @param {Gamemode} this - no description * @param {string} itemName - Name of the item (ammo) picked up * @param {number} amount - Amount of the item (ammo) picked up * @returns {void} **/ HUDAmmoPickedUp(this: Gamemode, itemName: string, amount: number): void /** * * Hides the team selection panel. * * @name GamemodeHooks:HideTeam * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/HideTeam * @param {Gamemode} this - no description * @returns {void} **/ HideTeam(this: Gamemode): void /** * * Allows to override player flying ( in mid-air, not noclipping ) animations. * * @name GamemodeHooks:HandlePlayerVaulting * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/HandlePlayerVaulting * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {number} velocity - Players velocity * @returns {boolean} - Return true if we've changed/set the animation, false otherwise **/ HandlePlayerVaulting(this: Gamemode, ply: Player, velocity: number): boolean /** * * Allows to override player swimming animations. * * @name GamemodeHooks:HandlePlayerSwimming * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/HandlePlayerSwimming * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {number} velocity - Players velocity * @returns {boolean} - Return true if we've changed/set the animation, false otherwise **/ HandlePlayerSwimming(this: Gamemode, ply: Player, velocity: number): boolean /** * * Allows to override player noclip animations. * * @name GamemodeHooks:HandlePlayerNoClipping * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/HandlePlayerNoClipping * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {number} velocity - Players velocity * @returns {boolean} - Return true if we've changed/set the animation, false otherwise **/ HandlePlayerNoClipping(this: Gamemode, ply: Player, velocity: number): boolean /** * * Allows to override player jumping animations. * * @name GamemodeHooks:HandlePlayerJumping * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/HandlePlayerJumping * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {number} velocity - Players velocity * @returns {boolean} - Return true if we've changed/set the animation, false otherwise **/ HandlePlayerJumping(this: Gamemode, ply: Player, velocity: number): boolean /** * * Allows to override player crouch animations. * * @name GamemodeHooks:HandlePlayerDucking * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/HandlePlayerDucking * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {number} velocity - Players velocity * @returns {boolean} - Return true if we've changed/set the animation, false otherwise **/ HandlePlayerDucking(this: Gamemode, ply: Player, velocity: number): boolean /** * * Allows to override player landing animations. * * @name GamemodeHooks:HandlePlayerLanding * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/HandlePlayerLanding * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {number} velocity - Players velocity * @param {boolean} onGround - Was the player on ground? * @returns {boolean} - Return true if we've changed/set the animation, false otherwise **/ HandlePlayerLanding(this: Gamemode, ply: Player, velocity: number, onGround: boolean): boolean /** * * Allows to override player driving animations. * * @name GamemodeHooks:HandlePlayerDriving * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/HandlePlayerDriving * @param {Gamemode} this - no description * @param {Player} ply - Player to process * @returns {boolean} - Return true if we've changed/set the animation, false otherwise **/ HandlePlayerDriving(this: Gamemode, ply: Player): boolean /** * * 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 and the panel used by @Panel:ParentToHUD. * * @name GamemodeHooks:GUIMouseReleased * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/GUIMouseReleased * @param {Gamemode} this - no description * @param {MOUSE} mouseCode - The key the player released, see @MOUSE enum * @param {Vector} aimVector - A normalized direction vector local to the camera. Internally this is @gui.ScreenToVector( @gui.MousePos() ). * @returns {void} **/ GUIMouseReleased(this: Gamemode, mouseCode: MOUSE, aimVector: Vector): void /** * * 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 and the panel used by @Panel:ParentToHUD. * See @GamemodeHooks:VGUIMousePressed for a hook that is called on all VGUI elements. * * @name GamemodeHooks:GUIMousePressed * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/GUIMousePressed * @param {Gamemode} this - no description * @param {MOUSE} mouseCode - The key that the player pressed using @MOUSE enum. * @param {Vector} aimVector - A normalized direction vector local to the camera. Internally, this is @gui.ScreenToVector( @gui.MousePos() ). * @returns {void} **/ GUIMousePressed(this: Gamemode, mouseCode: MOUSE, aimVector: Vector): void /** * * Called when the mouse has been double clicked on any panel derived from CGModBase, such as the panel used by @gui.EnableScreenClicker and the panel used by @Panel:ParentToHUD. * By default this hook calls @GamemodeHooks:GUIMousePressed. * * @name GamemodeHooks:GUIMouseDoublePressed * @realm client * @wiki https://wiki.garrysmod.com/page/GM/GUIMouseDoublePressed * @param {Gamemode} this - no description * @param {MOUSE} mouseCode - The code of the mouse button pressed, see @MOUSE enum * @param {Vector} aimVector - A normalized vector pointing in the direction the client has clicked * @returns {void} **/ GUIMouseDoublePressed(this: Gamemode, mouseCode: MOUSE, aimVector: Vector): void /** * * Called when an entity is about to be punted with the gravity gun (primary fire). * By default this function makes @EntityHooks:GravGunPunt work in Sandbox derived gamemodes. * * @name GamemodeHooks:GravGunPunt * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/GravGunPunt * @param {Gamemode} this - no description * @param {Player} ply - The player wielding the gravity gun * @param {Entity} ent - The entity the player is attempting to punt * @returns {boolean} - Return true to allow and false to disallow. **/ GravGunPunt(this: Gamemode, ply: Player, ent: Entity): boolean /** * * Called every tick to poll whether a player is allowed to pick up an entity with the gravity gun or not. * See @GamemodeHooks:AllowPlayerPickup for the +USE pickup variant. * Calls @EntityHooks:GravGunPickupAllowed on the entity being hovered every frame in Sandbox-derived gamemodes. * * @name GamemodeHooks:GravGunPickupAllowed * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/GravGunPickupAllowed * @param {Gamemode} this - no description * @param {Player} ply - The player wielding the gravity gun * @param {Entity} ent - The entity the player is attempting to pick up * @returns {boolean} - Return true to allow entity pick up **/ GravGunPickupAllowed(this: Gamemode, ply: Player, ent: Entity): boolean /** * * Called when an entity is picked up by a gravity gun. * * @name GamemodeHooks:GravGunOnPickedUp * @realm server * @wiki https://wiki.garrysmod.com/page/GM/GravGunOnPickedUp * @param {Gamemode} this - no description * @param {Player} ply - The player wielding the gravity gun * @param {Entity} ent - The entity that has been picked up by the gravity gun * @returns {void} **/ GravGunOnPickedUp(this: Gamemode, ply: Player, ent: Entity): void /** * * Called when an entity is released by a gravity gun. * * @name GamemodeHooks:GravGunOnDropped * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/GravGunOnDropped * @param {Gamemode} this - no description * @param {Player} ply - Player who is wielding the gravity gun * @param {Entity} ent - The entity that has been dropped * @returns {void} **/ GravGunOnDropped(this: Gamemode, ply: Player, ent: Entity): void /** * * Override this hook to disable/change ear-grabbing in your gamemode. * * @name GamemodeHooks:GrabEarAnimation * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/GrabEarAnimation * @param {Gamemode} this - no description * @param {Player} ply - Player * @returns {void} **/ GrabEarAnimation(this: Gamemode, ply: Player): void /** * * Returns the team color for the given team index. * * @name GamemodeHooks:GetTeamNumColor * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/GetTeamNumColor * @param {Gamemode} this - no description * @param {number} team - Team index * @returns {table} - Team @Color function **/ GetTeamNumColor(this: Gamemode, team: number): table /** * * Returns the color for the given entity's team. This is used in chat and deathnotice text. * * @name GamemodeHooks:GetTeamColor * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/GetTeamColor * @param {Gamemode} this - no description * @param {Entity} ent - Entity * @returns {table} - Team @Color function **/ GetTeamColor(this: Gamemode, ent: Entity): table /** * * Allows you to modify the Source Engine's motion blur shaders. * * @name GamemodeHooks:GetMotionBlurValues * @realm client * @wiki https://wiki.garrysmod.com/page/GM/GetMotionBlurValues * @param {Gamemode} this - no description * @param {number} horizontal - The amount of horizontal blur. * @param {number} vertical - The amount of vertical blur. * @param {number} forward - The amount of forward/radial blur. * @param {number} rotational - The amount of rotational blur. * @returns {number} - New amount of horizontal blur. * @returns {number} - New amount of vertical blur. * @returns {number} - New amount of forward/radial blur. * @returns {number} - New amount of rotational blur. * @tupleReturn **/ GetMotionBlurValues(this: Gamemode, horizontal: number, vertical: number, forward: number, rotational: number): [number, number, number, number] /** * * Called to determine preferred carry angles for the entity. It works for both, +use pickup and gravity gun pickup. * * @name GamemodeHooks:GetPreferredCarryAngles * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/GetPreferredCarryAngles * @note This hook can **not** override preferred carry angles of props such as the sawblade and the harpoon. * @warning Due to nature of the gravity gun coding in multiplayer, this hook **MAY** seem to not work ( but rest assured it does ), due to clientside prediction not knowing the carry angles. The +use pickup doesn't present this issue as it doesn't predict the player carrying the object clientside ( as you may notice by the prop lagging behind in multiplayer ) * @param {Gamemode} this - no description * @param {Entity} ent - The entity to generate carry angles for * @returns {Angle} - The preferred carry angles for the entity. **/ GetPreferredCarryAngles(this: Gamemode, ent: Entity): Angle /** * * Called when the game(server) needs to update the text shown in the server browser as the gamemode. * * @name GamemodeHooks:GetGameDescription * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/GetGameDescription * @param {Gamemode} this - no description * @returns {string} - The text to be shown in the server browser as the gamemode **/ GetGameDescription(this: Gamemode): string /** * * Called when a player takes damage from falling, allows to override the damage. * * @name GamemodeHooks:GetFallDamage * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/GetFallDamage * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {number} speed - The fall speed * @returns {number} - New fall damage **/ GetFallDamage(this: Gamemode, ply: Player, speed: number): number /** * * Called to refresh menu content once it has initialized or something has been mounted. * * @name GamemodeHooks:GameContentChanged * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/GameContentChanged * @param {Gamemode} this - no description * @returns {void} **/ GameContentChanged(this: Gamemode): void /** * * Runs when user cancels/finishes typing. * * @name GamemodeHooks:FinishChat * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/FinishChat * @param {Gamemode} this - no description * @returns {void} **/ FinishChat(this: Gamemode): void /** * * Called after @GamemodeHooks:Move, applies all the changes from the @CMoveData type to the player. * See [Game Movement](https://wiki.garrysmod.com/page/Game%20Movement) for an explanation on the move system. * * @name GamemodeHooks:FinishMove * @predicted true * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/FinishMove * @param {Gamemode} this - no description * @param {Player} ply - Player * @param {CMoveData} mv - Movement data * @returns {boolean} - Return true to suppress default engine behavior, i.e. declare that you have already moved the player according to the move data in a custom way. **/ FinishMove(this: Gamemode, ply: Player, mv: CMoveData): boolean /** * * This hook polls the entity the player use action should be applied to. * * @name GamemodeHooks:FindUseEntity * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/FindUseEntity * @note The default behavior of this hook is in [CBasePlayer::FindUseEntity](https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/shared/baseplayer_shared.cpp#L1068-L1270). Despite CBasePlayer::FindUseEntity being defined shared, it is only called serverside in practice, so this hook will be only called serverside, as well. It is possible for modules to call it clientside, so the Lua code should still be treated as shared. * @param {Gamemode} this - no description * @param {Player} ply - The player who initiated the use action. * @param {Entity} defaultEnt - The entity that was chosen by the engine. * @returns {Entity} - The entity to use instead of default entity **/ FindUseEntity(this: Gamemode, ply: Player, defaultEnt: Entity): Entity /** * * Called to allow override of the default Derma skin for all panels. * * @name GamemodeHooks:ForceDermaSkin * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/ForceDermaSkin * @note This hook is only called on Lua start up, changing its value (or adding new hooks) after it has been already called will not have any effect. * @param {Gamemode} this - no description * @returns {string} - A **case sensitive** Derma skin name to be used as default, registered previously via @derma.DefineSkin. * Returning nothing, nil or invalid name will make it fallback to the "Default" skin. **/ ForceDermaSkin(this: Gamemode): string /** * * Called when an entity takes damage. You can modify all parts of the damage info in this hook. * * @name GamemodeHooks:EntityTakeDamage * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/EntityTakeDamage * @param {Gamemode} this - no description * @param {Entity} target - The entity taking damage * @param {CTakeDamageInfo} dmg - Damage info * @returns {boolean} - Return true to completely block the damage event **/ EntityTakeDamage(this: Gamemode, target: Entity, dmg: CTakeDamageInfo): boolean /** * * Called when an NWVar is changed. * * @name GamemodeHooks:EntityNetworkedVarChanged * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/EntityNetworkedVarChanged * @note Currently this hook only works for the NW2Var system (accessed by adding a 2 in between NW and Var for most NWVar functions), which will replace the original one at some point in the future * @note This hook is fired before the client value is actually changed. Calling the GetNW function for the specified variable name within this hook will return the old value, not the current/updated one. * @param {Gamemode} this - no description * @param {Entity} ent - The owner entity of changed NWVar * @param {string} name - The name if changed NWVar * @param {any} oldval - The old value of the NWVar * @param {any} newval - The new value of the NWVar * @returns {void} **/ EntityNetworkedVarChanged(this: Gamemode, ent: Entity, name: string, oldval: any, newval: any): void /** * * Called when a key-value pair is set on an entity, either by the engine (for example when map spawns) or @EntityFuncs:SetKeyValue. * See @EntityHooks:KeyValue for a hook that works for scripted entities. * See @WeaponHooks:KeyValue for a hook that works for scripted weapons. * * @name GamemodeHooks:EntityKeyValue * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/EntityKeyValue * @param {Gamemode} this - no description * @param {Entity} ent - Entity that the keyvalue is being set on * @param {string} key - Key of the key/value pair * @param {string} value - Value of the key/value pair * @returns {string} - If set, the value of the key-value pair will be overridden by this string. **/ EntityKeyValue(this: Gamemode, ent: Entity, key: string, value: string): string /** * * Called right before the removal of an entity. * * @name GamemodeHooks:EntityRemoved * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/EntityRemoved * @param {Gamemode} this - no description * @param {Entity} ent - Entity being removed * @returns {void} **/ EntityRemoved(this: Gamemode, ent: Entity): void /** * * Called every time a bullet is fired from an entity. * * @name GamemodeHooks:EntityFireBullets * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/EntityFireBullets * @warning This hook is called directly from @EntityFuncs:FireBullets. Due to this, you cannot call @EntityFuncs:FireBullets inside this hook or an infinite loop will occur crashing the game. * @param {Gamemode} this - no description * @param {Entity} ent - The entity that fired the bullet * @param {Bullet} data - The bullet data. See @Bullet structure * @returns {boolean} - Return true to apply all changes done to the bullet table.Return false to suppress the bullet. **/ EntityFireBullets(this: Gamemode, ent: Entity, data: Bullet): boolean /** * * Called whenever a sound has been played. This will not be called clientside if the server played the sound without the client also calling @EntityFuncs:EmitSound. * * @name GamemodeHooks:EntityEmitSound * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/EntityEmitSound * @bug #1021 This is not called for scripted sequences. * @param {Gamemode} this - no description * @param {EmitSoundInfo} data - Information about the played sound. Changes done to this table can be applied by returning true from this hook.See @EmitSoundInfo structure. * @returns {boolean} - Return true to apply all changes done to the data table.Return false to prevent the sound from playing.Return nil or nothing to play the sound without altering it. **/ EntityEmitSound(this: Gamemode, data: EmitSoundInfo): boolean /** * * Called right before an entity stops driving. Overriding this hook will cause it to not call @drive.End and the player will not stop driving. * * @name GamemodeHooks:EndEntityDriving * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/EndEntityDriving * @param {Gamemode} this - no description * @param {Entity} ent - The entity being driven * @param {Player} ply - The player driving the entity * @returns {void} **/ EndEntityDriving(this: Gamemode, ent: Entity, ply: Player): void /** * * Allows you to override physgun beam drawing. * * @name GamemodeHooks:DrawPhysgunBeam * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/DrawPhysgunBeam * @bug #3294 This is still called when physgun_drawbeams is disabled. * @param {Gamemode} this - no description * @param {Player} ply - Physgun owner * @param {Weapon} physgun - The physgun * @param {boolean} enabled - Is the beam enabled * @param {Entity} target - Entity we are grabbing. This will be NULL if nothing is being held * @param {number} physBone - ID of the physics bone (@PhysObj type) we are grabbing at. Use @EntityFuncs:TranslatePhysBoneToBone to translate to an actual bone. * @param {PhysObj} hitPos - Beam hit position relative to the physics bone (@PhysObj type) we are grabbing. * @returns {boolean} - Return false to hide default beam **/ DrawPhysgunBeam(this: Gamemode, ply: Player, physgun: Weapon, enabled: boolean, target: Entity, physBone: number, hitPos: PhysObj): boolean /** * * Called after all other 2D draw hooks are called. Draws over all VGUI Panels and HUDs. * Unlike @GamemodeHooks:HUDPaint, this hook is called with the game paused and while the Camera SWEP is equipped. * * @name GamemodeHooks:DrawOverlay * @predicted false * @realm client, menu * @wiki https://wiki.garrysmod.com/page/GM/DrawOverlay * @rendering hook:2d * @note Only be called when r_drawvgui is enabled * @param {Gamemode} this - no description * @returns {void} **/ DrawOverlay(this: Gamemode): void /** * * This hook is called every frame to draw all of the current death notices. * * @name GamemodeHooks:DrawDeathNotice * @realm client * @wiki https://wiki.garrysmod.com/page/GM/DrawDeathNotice * @param {Gamemode} this - no description * @param {number} x - X position to draw death notices as a ratio * @param {number} y - Y position to draw death notices as a ratio * @returns {void} **/ DrawDeathNotice(this: Gamemode, x: number, y: number): void /** * * Handles the player's death. * This hook is **not** called if the player is killed by @Player:KillSilent. See @GamemodeHooks:PlayerSilentDeath for that. * * @GamemodeHooks:PlayerDeath is called after this hook * * @GamemodeHooks:PostPlayerDeath is called after that * * @name GamemodeHooks:DoPlayerDeath * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/DoPlayerDeath * @note @Player:Alive returns true when this is called * @param {Gamemode} this - no description * @param {Player} ply - The player * @param {Entity} attacker - The entity that killed the player * @param {CTakeDamageInfo} dmg - Damage info * @returns {void} **/ DoPlayerDeath(this: Gamemode, ply: Player, attacker: Entity, dmg: CTakeDamageInfo): void /** * * 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. * [Category:Render Hooks](https://wiki.garrysmod.com/page/Category:Render%20Hooks) * * @name GamemodeHooks:DrawMonitors * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/DrawMonitors * @param {Gamemode} this - no description * @returns {void} **/ DrawMonitors(this: Gamemode): void /** * * Called upon an animation event, this is the ideal place to call player animation functions such as @Player:AddVCDSequenceToGestureSlot, @Player:AnimRestartGesture and so on. * * @name GamemodeHooks:DoAnimationEvent * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/DoAnimationEvent * @param {Gamemode} this - no description * @param {Player} ply - Player who is being animated * @param {PLAYERANIMEVENT} event - Animation event. See @PLAYERANIMEVENT enum * @param {ACT} data - The data for the event. This is interpreted as an @ACT enum by PLAYERANIMEVENT_CUSTOM and PLAYERANIMEVENT_CUSTOM_GESTURE, or a sequence by PLAYERANIMEVENT_CUSTOM_SEQUENCE. * @returns {ACT} - The translated activity to send to the weapon. See @ACT enum. Return ACT_INVALID if you don't want to send an activity. **/ DoAnimationEvent(this: Gamemode, ply: Player, event: PLAYERANIMEVENT, data?: ACT): ACT /** * * Teams are created within this hook using @team.SetUp. * * @name GamemodeHooks:CreateTeams * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/CreateTeams * @note This hook is called before @GamemodeHooks:PreGamemodeLoaded. * @param {Gamemode} this - no description * @returns {void} **/ CreateTeams(this: Gamemode): void /** * * Allows you to change the players movements before they're sent to the server. * See [Game Movement](https://wiki.garrysmod.com/page/Game%20Movement) for an explanation on the move system. * * @name GamemodeHooks:CreateMove * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/CreateMove * @note Due to this hook being clientside only, it could be overridden by the user allowing them to completely skip your logic, it is recommended to use @GamemodeHooks:StartCommand in a shared file instead. * @param {Gamemode} this - no description * @param {CUserCmd} cmd - The User Command data * @returns {boolean} - Return true to: * * Disable Sandbox C menu "screen clicking" * * Disable Teammate nocollide (verification required) * * Prevent calling of C_BaseHLPlayer::CreateMove & subsequently C_BasePlayer::CreateMove **/ CreateMove(this: Gamemode, cmd: CUserCmd): boolean /** * * Called when a serverside ragdoll of an entity has been created. * See @GamemodeHooks:CreateClientsideRagdoll for clientside ragdolls. * * @name GamemodeHooks:CreateEntityRagdoll * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/CreateEntityRagdoll * @param {Gamemode} this - no description * @param {Entity} owner - Entity that owns the ragdoll * @param {Entity} ragdoll - The ragdoll entity * @returns {void} **/ CreateEntityRagdoll(this: Gamemode, owner: Entity, ragdoll: Entity): void /** * * Called whenever an entity becomes a clientside ragdoll. * See @GamemodeHooks:CreateEntityRagdoll for serverside ragdolls. * * @name GamemodeHooks:CreateClientsideRagdoll * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/CreateClientsideRagdoll * @param {Gamemode} this - no description * @param {Entity} entity - The Entity that created the ragdoll * @param {Entity} ragdoll - The ragdoll being created. * @returns {void} **/ CreateClientsideRagdoll(this: Gamemode, entity: Entity, ragdoll: Entity): void /** * * Called when derma menus are closed with @CloseDermaMenus function. * * @name GamemodeHooks:CloseDermaMenus * @predicted false * @realm client, menu * @wiki https://wiki.garrysmod.com/page/GM/CloseDermaMenus * @param {Gamemode} this - no description * @returns {void} **/ CloseDermaMenus(this: Gamemode): void /** * * Called when a non local player connects to allow the Lua system to check the password. * The default behaviour in the base gamemodes emulates what would normally happen. If sv_password is set and its value matches the password passed in by the client - then they are allowed to join. If it isn't set it lets them in too. * * @name GamemodeHooks:CheckPassword * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/CheckPassword * @param {Gamemode} this - no description * @param {string} steamID64 - The 64bit Steam ID of the joining player, use @util.SteamIDFrom64 to convert it to a "STEAM_0:" one. * @param {string} ipAddress - The IP of the connecting client * @param {string} svPassword - The current value of sv_password (the password set by the server) * @param {string} clPassword - The password provided by the client * @param {string} name - The name of the joining player * @returns {boolean} - If the hook returns false then the player is disconnected * @returns {string} - If returning false in the first argument, then this should be the disconnect message. This will default to "#GameUI_ServerRejectBadPassword", which is "Bad Password." translated to the client's language. * @tupleReturn **/ CheckPassword(this: Gamemode, steamID64: string, ipAddress: string, svPassword: string, clPassword: string, name: string): [boolean, string] /** * * Called whenever the content of the user's chat input box is changed. * * @name GamemodeHooks:ChatTextChanged * @realm client * @wiki https://wiki.garrysmod.com/page/GM/ChatTextChanged * @param {Gamemode} this - no description * @param {string} text - The new contents of the input box * @returns {void} **/ ChatTextChanged(this: Gamemode, text: string): void /** * * Called each frame to record demos to video using @IVideoWriter type. * * @name GamemodeHooks:CaptureVideo * @predicted false * @realm menu * @wiki https://wiki.garrysmod.com/page/GM/CaptureVideo * @note This hook is called every frame regardless of whether or not a demo is being recorded * @param {Gamemode} this - no description * @returns {void} **/ CaptureVideo(this: Gamemode): void /** * * 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. * For player messages see @GamemodeHooks:PlayerSay and @GamemodeHooks:OnPlayerChat * * @name GamemodeHooks:ChatText * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/ChatText * @param {Gamemode} this - no description * @param {number} index - The index of the player. * @param {string} name - The name of the player. * @param {string} text - The text that is being sent. * @param {string} type - Chat filter type. Possible values are: * * joinleave - Player join and leave messages * * namechange - Player name change messages * * servermsg - Server messages such as convar changes * * teamchange - Team changes? * * chat - (Obsolete?) Player chat? * * none - A fallback value * @returns {boolean} - Return true to suppress the chat message **/ ChatText(this: Gamemode, index: number, name: string, text: string, type: string): boolean /** * * Determines if the player can unfreeze the entity. * * @name GamemodeHooks:CanPlayerUnfreeze * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/CanPlayerUnfreeze * @param {Gamemode} this - no description * @param {Player} player - The player * @param {Entity} entity - The entity * @param {PhysObj} phys - The physics object of the entity * @returns {boolean} - True if they can unfreeze. **/ CanPlayerUnfreeze(this: Gamemode, player: Player, entity: Entity, phys: PhysObj): boolean /** * * Determines if the player can kill themselves using the concommands "kill" or "explode". * * @name GamemodeHooks:CanPlayerSuicide * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/CanPlayerSuicide * @param {Gamemode} this - no description * @param {Player} player - The player * @returns {boolean} - True if they can suicide. **/ CanPlayerSuicide(this: Gamemode, player: Player): boolean /** * * Determines if the player can exit the vehicle. * * @name GamemodeHooks:CanExitVehicle * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/CanExitVehicle * @param {Gamemode} this - no description * @param {Vehicle} veh - The vehicle entity * @param {Player} ply - The player * @returns {boolean} - True if the player can exit the vehicle. **/ CanExitVehicle(this: Gamemode, veh: Vehicle, ply: Player): boolean /** * * Determines whether or not the player can enter the vehicle. * Called just before @GamemodeHooks:PlayerEnteredVehicle. * * @name GamemodeHooks:CanPlayerEnterVehicle * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/CanPlayerEnterVehicle * @param {Gamemode} this - no description * @param {Player} player - The player * @param {Vehicle} vehicle - The vehicle * @param {number} role - no description * @returns {boolean} - False if the player is not allowed to enter the vehicle. **/ CanPlayerEnterVehicle(this: Gamemode, player: Player, vehicle: Vehicle, role: number): boolean /** * * Called when a variable is edited on an Entity (called by Edit Properties... menu), to determine if the edit should be permitted. * See [Editable entities](https://wiki.garrysmod.com/page/Editable_Entities) for more details about the system. * * @name GamemodeHooks:CanEditVariable * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/CanEditVariable * @param {Gamemode} this - no description * @param {Entity} ent - The entity being edited * @param {Player} ply - The player doing the editing * @param {string} key - The name of the variable * @param {string} val - The new value, as a string which will later be converted to its appropriate type * @param {table} editor - The edit table defined in @EntityFuncs:NetworkVar * @returns {boolean} - Return true to allow editing **/ CanEditVariable(this: Gamemode, ent: Entity, ply: Player, key: string, val: string, editor: table): boolean /** * * Allows overriding the position and angle of the viewmodel. * * @name GamemodeHooks:CalcViewModelView * @realm client * @wiki https://wiki.garrysmod.com/page/GM/CalcViewModelView * @param {Gamemode} this - no description * @param {Weapon} wep - The weapon entity * @param {Entity} vm - The viewmodel entity * @param {Vector} oldPos - Original position (before viewmodel bobbing and swaying) * @param {Angle} oldAng - Original angle (before viewmodel bobbing and swaying) * @param {Vector} pos - Current position * @param {Angle} ang - Current angle * @returns {Vector} - New position * @returns {Angle} - New angle * @tupleReturn **/ CalcViewModelView(this: Gamemode, wep: Weapon, vm: Entity, oldPos: Vector, oldAng: Angle, pos: Vector, ang: Angle): [Vector, Angle] /** * * Allows override of the default view. * * @name GamemodeHooks:CalcView * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/CalcView * @param {Gamemode} this - no description * @param {Player} ply - The local player. * @param {Vector} origin - The player's view position. * @param {Angle} angles - The player's view angles. * @param {number} fov - Field of view. * @param {number} znear - Distance to near clipping plane. * @param {number} zfar - Distance to far clipping plane. * @returns {CamData} - View data table. See @CamData structure **/ CalcView(this: Gamemode, ply: Player, origin: Vector, angles: Angle, fov: number, znear: number, zfar: number): CamData /** * * Called from @GamemodeHooks:CalcView when player is in driving a vehicle. * This hook may not be called in gamemodes that override @GamemodeHooks:CalcView. * * @name GamemodeHooks:CalcVehicleView * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/CalcVehicleView * @param {Gamemode} this - no description * @param {Vehicle} veh - The vehicle the player is driving * @param {Player} ply - The vehicle driver * @param {CamData} view - The view data containing players FOV, view position and angles, see @CamData structure * @returns {CamData} - The modified view table containing new values, see @CamData structure **/ CalcVehicleView(this: Gamemode, veh: Vehicle, ply: Player, view: CamData): CamData /** * * This hook is used to calculate animations for a player. * * @name GamemodeHooks:CalcMainActivity * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/GM/CalcMainActivity * @warning This hook must return the same values at the same time on both, client **and** server. On client for players to see the animations, on server for hit detection to work properly. * @bug #3322 This can return the incorrect velocity when on a moving object. * @param {Gamemode} this - no description * @param {Player} ply - The player to apply the animation. * @param {Vector} vel - The velocity of the player. * @returns {ACT} - @ACT enum for the activity the player should use. A nil return will be treated as ACT_INVALID. * @returns {number} - Sequence for the player to use. This takes precedence over the activity (the activity is still used for layering). Return -1 or nil to let the activity determine the sequence. * @tupleReturn **/ CalcMainActivity(this: Gamemode, ply: Player, vel: Vector): [ACT, number] /** * * Called when a player tries to pick up something using the "use" key, return to override. * See @GamemodeHooks:GravGunPickupAllowed for the Gravity Gun pickup variant. * * @name GamemodeHooks:AllowPlayerPickup * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/AllowPlayerPickup * @param {Gamemode} this - no description * @param {Player} ply - The player trying to pick up something. * @param {Entity} ent - The Entity the player attempted to pick up. * @returns {boolean} - Allow the player to pick up the entity or not. **/ AllowPlayerPickup(this: Gamemode, ply: Player, ent: Entity): boolean /** * * Allows you to adjust the mouse sensitivity. * * @name GamemodeHooks:AdjustMouseSensitivity * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/AdjustMouseSensitivity * @param {Gamemode} this - no description * @param {number} defaultSensitivity - The old sensitivity * In general it will be 0, which is equivalent to a sensitivity of 1. * @returns {number} - A fraction of the normal sensitivity (0.5 would be half as sensitive), return -1 to not override. **/ AdjustMouseSensitivity(this: Gamemode, defaultSensitivity: number): number /** * * Adds a death notice entry. * * @name GamemodeHooks:AddDeathNotice * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/GM/AddDeathNotice * @bug #2611 You cannot use @hook.Add on this hook yet. * @param {Gamemode} this - no description * @param {string} attacker - The name of the attacker * @param {number} attackerTeam - The team of the attacker * @param {string} inflictor - Class name of the entity inflicting the damage * @param {string} victim - Name of the victim * @param {number} victimTeam - Team of the victim * @returns {void} **/ AddDeathNotice(this: Gamemode, attacker: string, attackerTeam: number, inflictor: string, victim: string, victimTeam: number): void /** * * Called when a map I/O event occurs. * See also @EntityFuncs:Fire and @EntityFuncs:Input for functions to fire Inputs on entities. * * @name GamemodeHooks:AcceptInput * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/GM/AcceptInput * @param {Gamemode} this - no description * @param {Entity} ent - Entity that receives the input * @param {string} input - The input name. Is not guaranteed to be a valid input on the entity. * @param {Entity} activator - Activator of the input * @param {Entity} caller - Caller of the input * @param {string | number | boolean} value - Data provided with the input. Will be either a @string type, a @number type, a @boolean type or a @nil type. * @returns {boolean} - Return true to prevent this input from being processed. **/ AcceptInput(this: Gamemode, ent: Entity, input: string, activator: Entity, caller: Entity, value?: string | number | boolean): boolean } declare interface File { /** * * Writes an unsigned 16-bit integer to the file. * * @name File:WriteUShort * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteUShort * @param {File} this - no description * @param {number} uint16 - The unsigned 16-bit integer to the file. * @returns {void} **/ WriteUShort(this: File, uint16: number): void /** * * Writes an unsigned 32-bit integer to the file. * * @name File:WriteULong * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteULong * @param {File} this - no description * @param {number} uint32 - The unsigned 32-bit integer to be written to the file. * @returns {void} **/ WriteULong(this: File, uint32: number): void /** * * Writes a 16-bit signed integer to the file. * * @name File:WriteShort * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteShort * @param {File} this - no description * @param {number} int16 - The 16-bit signed integer to be written to the file. * @returns {void} **/ WriteShort(this: File, int16: number): void /** * * Writes a 32-bit signed integer to the file. * * @name File:WriteLong * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteLong * @param {File} this - no description * @param {number} int32 - The 32-bit signed integer to be written to the file. * @returns {void} **/ WriteLong(this: File, int32: number): void /** * * Writes a 4byte float to the file. * * @name File:WriteFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteFloat * @param {File} this - no description * @param {number} float - The float to be written to the file. * @returns {void} **/ WriteFloat(this: File, float: number): void /** * * Writes a 8byte floating point double to the file. * * @name File:WriteDouble * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteDouble * @param {File} this - no description * @param {number} double - The double to be written to the file. * @returns {void} **/ WriteDouble(this: File, double: number): void /** * * Write an 8-bit unsigned integer to the file. * * @name File:WriteByte * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteByte * @param {File} this - no description * @param {number} uint8 - The 8-bit unsigned integer to be written to the file. * @returns {void} **/ WriteByte(this: File, uint8: number): void /** * * Writes a boolean value to the file as one **byte**. * * @name File:WriteBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/WriteBool * @param {File} this - no description * @param {boolean} bool - The bool to be written to the file. * @returns {void} **/ WriteBool(this: File, bool: boolean): void /** * * Writes the given string into the file. * * @name File:Write * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Write * @param {File} this - no description * @param {string} data - Binary data to write to the file. * @returns {void} **/ Write(this: File, data: string): void /** * * Returns the current position of the file pointer. * * @name File:Tell * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Tell * @param {File} this - no description * @returns {number} - pos **/ Tell(this: File): number /** * * Moves the file pointer by the specified amount of chars. * * @name File:Skip * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Skip * @param {File} this - no description * @param {number} amount - The amount of chars to skip, can be negative to skip backwards. * @returns {number} - amount **/ Skip(this: File, amount: number): number /** * * Returns the size of the file in bytes. * * @name File:Size * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Size * @param {File} this - no description * @returns {number} - size **/ Size(this: File): number /** * * Sets the file pointer to the specified position. * * @name File:Seek * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Seek * @param {File} this - no description * @param {number} pos - Pointer position. * @returns {void} **/ Seek(this: File, pos: number): void /** * * Reads a unsigned 16-bit integer from the file. * * @name File:ReadUShort * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadUShort * @param {File} this - no description * @returns {number} - The 16-bit integer **/ ReadUShort(this: File): number /** * * Reads a unsigned 32-bit integer from the file. * * @name File:ReadULong * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadULong * @param {File} this - no description * @returns {number} - An unsigned 32-bit integer **/ ReadULong(this: File): number /** * * Reads a signed 16-bit integer from the file. * * @name File:ReadShort * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadShort * @param {File} this - no description * @returns {number} - int16 **/ ReadShort(this: File): number /** * * Reads a signed 32-bit integer from the file. * * @name File:ReadLong * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadLong * @param {File} this - no description * @returns {number} - A signed 32-bit integer **/ ReadLong(this: File): number /** * * Returns the contents of the file from the current position up until the end of the current line. * * @name File:ReadLine * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadLine * @note This function will look specifically for *Line Feed* characters \n``` and will **completely ignore *Carriage Return* characters** \r```. * @note This function will not return more than 8192 characters. * @param {File} this - no description * @returns {string} - The string of data from the read line. **/ ReadLine(this: File): string /** * * Reads 4 bytes from the file converts them to a float and returns them. * * @name File:ReadFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadFloat * @param {File} this - no description * @returns {number} - The read value **/ ReadFloat(this: File): number /** * * Reads 8 bytes from the file converts them to a double and returns them. * * @name File:ReadDouble * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadDouble * @param {File} this - no description * @returns {number} - value **/ ReadDouble(this: File): number /** * * Reads one unsigned 8-bit integer from the file. * * @name File:ReadByte * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadByte * @param {File} this - no description * @returns {number} - The unsigned 8-bit integer from the file. **/ ReadByte(this: File): number /** * * Reads one byte of the file and returns whether that byte was not 0. * * @name File:ReadBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/ReadBool * @param {File} this - no description * @returns {boolean} - val **/ ReadBool(this: File): boolean /** * * Reads the specified amount of chars and returns them as a binary string. * * @name File:Read * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Read * @param {File} this - no description * @param {number} length - Reads the specified amount of chars. * @returns {string} - data **/ Read(this: File, length: number): string /** * * Dumps the file changes to disk and saves the file. * * @name File:Flush * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Flush * @param {File} this - no description * @returns {void} **/ Flush(this: File): void /** * * Dumps the file changes to disk and closes the file handle which makes the handle useless. * * @name File:Close * @realm client, server * @wiki https://wiki.garrysmod.com/page/File/Close * @param {File} this - no description * @returns {void} **/ Close(this: File): void } declare interface EntityFuncs { /** * * Converts world angles to local angles ( local to the entity ) * * @name EntityFuncs:WorldToLocalAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/WorldToLocalAngles * @param {Entity} this - no description * @param {Angle} ang - The world angles * @returns {Angle} - The local angles **/ WorldToLocalAngles(this: Entity, ang: Angle): Angle /** * * Converts a worldspace vector into a vector local to an entity * * @name EntityFuncs:WorldToLocal * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/WorldToLocal * @param {Entity} this - no description * @param {Vector} wpos - The world vector * @returns {Vector} - The local vector **/ WorldToLocal(this: Entity, wpos: Vector): Vector /** * * Returns the center of the entity according to its collision model. * * @name EntityFuncs:WorldSpaceCenter * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/WorldSpaceCenter * @param {Entity} this - no description * @returns {Vector} - The center of the entity **/ WorldSpaceCenter(this: Entity): Vector /** * * Returns two vectors representing the minimum and maximum extent of the entity's bounding box. * * @name EntityFuncs:WorldSpaceAABB * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/WorldSpaceAABB * @param {Entity} this - no description * @returns {Vector} - The minimum vector for the entity's bounding box. * @returns {Vector} - The maximum vector for the entity's bounding box. * @tupleReturn **/ WorldSpaceAABB(this: Entity): [Vector, Vector] /** * * Calls and returns @WeaponHooks:TranslateActivity on the weapon the entity ( player or NPC ) carries. * Despite existing on client, it doesn't actually do anything on client. * * @name EntityFuncs:Weapon_TranslateActivity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/Weapon TranslateActivity * @param {Entity} this - no description * @param {number} act - The activity to translate * @returns {number} - The translated activity **/ Weapon_TranslateActivity(this: Entity, act: number): number /** * * Sets the activity of the entity's active weapon. * * @name EntityFuncs:Weapon_SetActivity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/Weapon SetActivity * @note This does nothing on the client. * @note Only works for CBaseCombatCharacter entities, which includes players and NPCs. * @param {Entity} this - no description * @param {ACT} act - Activity number. See @ACT enum. * @param {number} duration - How long the animation should take in seconds. * @returns {void} **/ Weapon_SetActivity(this: Entity, act: ACT, duration: number): void /** * * Returns true if supplied vector is visible from the entity's line of sight. * This is achieved similarly to a trace. * * @name EntityFuncs:VisibleVec * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/VisibleVec * @param {Entity} this - no description * @param {Vector} pos - The position to check for visibility * @returns {boolean} - Within line of sight **/ VisibleVec(this: Entity, pos: Vector): boolean /** * * Returns an integer that represents how deep in water the entity is. * * **0** - The entity isn't in water. * * **1** - Slightly submerged (at least to the feet). * * **2** - The majority of the entity is submerged (at least to the waist). * * **3** - Completely submerged. * * @name EntityFuncs:WaterLevel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/WaterLevel * @param {Entity} this - no description * @returns {number} - The water level. **/ WaterLevel(this: Entity): number /** * * Returns whether the target/given entity is visible from the this entity. * This is meant to be used only with NPCs. * Differences from a simple trace include: * * If target has **FL_NOTARGET**, returns false * * If **ai_ignoreplayers** is turned on and target is a player, returns false * * Reacts to **ai_LOS_mode**: * ** If 1, does a simple trace with **COLLISION_GROUP_NONE** and **MASK_BLOCKLOS** * ** If not, does a trace with **MASK_BLOCKLOS_AND_NPCS** ( - **CONTENTS_BLOCKLOS** is target is player ) and a custom LOS filter ( **CTraceFilterLOS** ) * * Returns true if hits a vehicle the target is driving * * @name EntityFuncs:Visible * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Visible * @param {Entity} this - no description * @param {Entity} target - Entity to check for visibility to. * @returns {boolean} - If the entities can see each other. **/ Visible(this: Entity, target: Entity): boolean /** * * Enables or disables trigger bounds. * This will give the entity a "trigger box" that extends around its bounding box by boundSize units in X/Y and (boundSize / 2) in +Z (-Z remains the same). * The trigger box is world aligned and will work regardless of the object's solidity and collision group. * Valve use trigger boxes for all pickup items. Their bloat size is 24, a surprisingly large figure. * * @name EntityFuncs:UseTriggerBounds * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/UseTriggerBounds * @note The trigger boxes can be made visible as a light blue box by using the **ent_bbox** console command while looking at the entity. Alternatively a classname or entity index can be used as the first argument. * This requires **developer** to be set to **1**. * @param {Entity} this - no description * @param {boolean} enable - Enable or disable the bounds. * @param {number} boundSize - The distance/size of the trigger bounds. * @returns {void} **/ UseTriggerBounds(this: Entity, enable: boolean, boundSize?: number): void /** * * Returns the index of this view model, it can be used to identify which one of the player's view models this entity is. * * @name EntityFuncs:ViewModelIndex * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ViewModelIndex * @param {Entity} this - no description * @returns {number} - View model index, ranges from 0 to 2, nil if the entity is not a view model **/ ViewModelIndex(this: Entity): number /** * * Animations will be handled purely clientside instead of a fixed animtime, enabling interpolation. This does not affect layers and gestures. * * @name EntityFuncs:UseClientSideAnimation * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/UseClientSideAnimation * @note Does nothing on server. * @param {Entity} this - no description * @returns {void} **/ UseClientSideAnimation(this: Entity): void /** * * Activates the entity, as if a player pressed the Use key (Default @E key) on it. * * @name EntityFuncs:Use * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Use * @param {Entity} this - no description * @param {Player} activator - The player who is using the entity * @param {Entity} caller - This should be the same as *activator*. * This is supposed to be the entity that is acting as a proxy for the player (eg a button), but due to confusion over the difference between activator and caller, third party code may expect caller to be the activator and vice versa. * Therefore, the only safe thing to do is to set both arguments to be the player. * @param {USE} useType - The type of use to trigger. See @USE enum * @param {number} integer - You can usually set this to 1. * @returns {void} **/ Use(this: Entity, activator: Player, caller: Entity, useType: USE, integer: number): void /** * * Returns the ID of a @PhysObj type attached to the given bone. To be used with @EntityFuncs:GetPhysicsObjectNum. * See @EntityFuncs:TranslatePhysBoneToBone for reverse function. * * @name EntityFuncs:TranslateBoneToPhysBone * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/TranslateBoneToPhysBone * @param {Entity} this - no description * @param {number} boneID - The ID of a bone to look up the "physics root" bone of. * @returns {number} - The @PhysObj type ID of the given bone. * * -1 if we somehow cannot translate **/ TranslateBoneToPhysBone(this: Entity, boneID: number): number /** * * Returns the boneID of the bone the given @PhysObj type is attached to. * See @EntityFuncs:TranslateBoneToPhysBone for reverse function. * * @name EntityFuncs:TranslatePhysBoneToBone * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/TranslatePhysBoneToBone * @param {Entity} this - no description * @param {number} physNum - The @PhysObj type number on the entity * @returns {number} - The boneID of the bone the @PhysObj type is attached to. **/ TranslatePhysBoneToBone(this: Entity, physNum: number): number /** * * Check if the given position or entity is within this entity's PVS. * * @name EntityFuncs:TestPVS * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/TestPVS * @note The function won't take in to account @AddOriginToPVS function and the like. * @param {Entity} this - no description * @param {Entity | Vector} testPoint - @Entity type or @Vector type to test against. If an entity is given, this function will test using its bounding box. * @returns {boolean} - True if the testPoint is within our PVS. **/ TestPVS(this: Entity, testPoint: Entity | Vector): boolean /** * * Applies forces to our physics object in response to damage. * * @name EntityFuncs:TakePhysicsDamage * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/TakePhysicsDamage * @param {Entity} this - no description * @param {CTakeDamageInfo} dmginfo - The damageinfo to apply. Only @CTakeDamageInfo:GetDamageForce and @CTakeDamageInfo:GetDamagePosition are used. * @returns {void} **/ TakePhysicsDamage(this: Entity, dmginfo: CTakeDamageInfo): void /** * * Applies the damage specified by the damage info to the entity. * * @name EntityFuncs:TakeDamageInfo * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/TakeDamageInfo * @warning Calling this function on the victim entity in @EntityHooks:OnTakeDamage can cause infinite loops. * @param {Entity} this - no description * @param {CTakeDamageInfo} damageInfo - The damage to apply. * @returns {void} **/ TakeDamageInfo(this: Entity, damageInfo: CTakeDamageInfo): void /** * * Applies the specified amount of damage to the entity with [DMG_GENERIC](https://wiki.garrysmod.com/page/Enums/DMG) flag. * * @name EntityFuncs:TakeDamage * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/TakeDamage * @warning Calling this function on the victim entity in @EntityHooks:OnTakeDamage can cause infinite loops. * @param {Entity} this - no description * @param {number} damageAmount - The amount of damage to be applied. * @param {Entity} attacker - The entity that initiated the attack that caused the damage. * @param {Entity} inflictor - The entity that applied the damage, eg. a weapon. * @returns {void} **/ TakeDamage(this: Entity, damageAmount: number, attacker: Entity, inflictor: Entity): void /** * * Stops emitting the given sound script from the entity, especially useful for looping sound scripts. * * @name EntityFuncs:StopSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/StopSound * @warning This only works when the sound you're trying to stop is a sound script (see @sound.Add), using a file path will not work! * @param {Entity} this - no description * @param {string} soundscript - The name of the sound script to stop playback of. * @returns {void} **/ StopSound(this: Entity, soundscript: string): void /** * * Stops all particle effects parented to the entity with given name on given attachment. * * @name EntityFuncs:StopParticlesWithNameAndAttachment * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/StopParticlesWithNameAndAttachment * @param {Entity} this - no description * @param {string} name - The name of the particle to stop. * @param {number} attachment - The attachment of the entity to stop particles on. * @returns {void} **/ StopParticlesWithNameAndAttachment(this: Entity, name: string, attachment: number): void /** * * Stops all particle effects parented to the entity with given name. * * @name EntityFuncs:StopParticlesNamed * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/StopParticlesNamed * @param {Entity} this - no description * @param {string} name - The name of the particle to stop. * @returns {void} **/ StopParticlesNamed(this: Entity, name: string): void /** * * Stops any attached to the entity .pcf particles using @ParticleEffectAttach function. * On client, this is the same as @EntityFuncs:StopParticleEmission. ( and you should use StopParticleEmission instead ) * On server, this is the same as running @EntityFuncs:StopParticleEmission on every client. * * @name EntityFuncs:StopParticles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/StopParticles * @param {Entity} this - no description * @returns {void} **/ StopParticles(this: Entity): void /** * * Stops all particle effects parented to the entity. * This is ran automatically on every client by @EntityFuncs:StopParticles if called on the server. * * @name EntityFuncs:StopParticleEmission * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/StopParticleEmission * @param {Entity} this - no description * @returns {void} **/ StopParticleEmission(this: Entity): void /** * * Stops the motion controller created with @EntityFuncs:StartMotionController. * * @name EntityFuncs:StopMotionController * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/StopMotionController * @param {Entity} this - no description * @returns {void} **/ StopMotionController(this: Entity): void /** * * Stops all particle effects parented to the entity and immediately destroys them. * * @name EntityFuncs:StopAndDestroyParticles * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/StopAndDestroyParticles * @param {Entity} this - no description * @returns {void} **/ StopAndDestroyParticles(this: Entity): void /** * * Stops a sound created by @EntityFuncs:StartLoopingSound. * * @name EntityFuncs:StopLoopingSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/StopLoopingSound * @param {Entity} this - no description * @param {number} id - The sound ID returned by @EntityFuncs:StartLoopingSound * @returns {void} **/ StopLoopingSound(this: Entity, id: number): void /** * * Starts a motion controller in the physics engine tied to this entity's @PhysObj type, which enables the use of @EntityHooks:PhysicsSimulate. * The motion controller can later be destroyed via @EntityFuncs:StopMotionController. * Motion controllers are used internally to control other Entities' @PhysObj typeects, such as the Gravity Gun, +use pickup and the Physics Gun. * This function should be called every time you recreate the Entity's @PhysObj type. Or alternatively you should call @EntityFuncs:AddToMotionController on the new @PhysObj type. * Also see @EntityFuncs:AddToMotionController and @EntityFuncs:RemoveFromMotionController. * * @name EntityFuncs:StartMotionController * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/StartMotionController * @note Only works on a scripted @Entity type of anim type. * @param {Entity} this - no description * @returns {void} **/ StartMotionController(this: Entity): void /** * * Starts a "looping" sound. As with any other sound playing methods, this function expects the sound file to be looping itself and will not automatically loop a non looping sound file as one might expect. * This function is almost identical to @CreateSound function, with the exception of the sound being created in the STATIC channel and with normal attenuation. * See also @EntityFuncs:StopLoopingSound * * @name EntityFuncs:StartLoopingSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/StartLoopingSound * @param {Entity} this - no description * @param {string} sound - Sound to play. Can be either a sound script or a filepath. * @returns {number} - The ID number of started sound starting with 0, or -1 if we failed for some reason. **/ StartLoopingSound(this: Entity, sound: string): number /** * * Initializes the entity and starts its networking. If called on a player, it will respawn them. * This calls @EntityHooks:Initialize on Lua-defined entities. * * @name EntityFuncs:Spawn * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/Spawn * @param {Entity} this - no description * @returns {void} **/ Spawn(this: Entity): void /** * * Moves the model instance from the source entity to this entity. This can be used to transfer decals that have been applied on one entity to another. * Both entities must have the same model. * * @name EntityFuncs:SnatchModelInstance * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SnatchModelInstance * @param {Entity} this - no description * @param {Entity} srcEntity - Entity to move the model instance from. * @returns {boolean} - Whether the operation was successful or not **/ SnatchModelInstance(this: Entity, srcEntity: Entity): boolean /** * * Returns the amount of skins the entity has. * * @name EntityFuncs:SkinCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SkinCount * @param {Entity} this - no description * @returns {number} - The amount of skins the entity's model has. **/ SkinCount(this: Entity): number /** * * Sets the model and associated weapon to this viewmodel entity. * This is used internally when the player switches weapon. * * @name EntityFuncs:SetWeaponModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetWeaponModel * @note View models are not drawn without a weapons associated to them. * @warning This will silently fail if the entity is not a viewmodel. * @param {Entity} this - no description * @param {string} viewModel - The model string to give to this viewmodel. * Example: "models/weapons/c_smg1.mdl" * @param {Weapon} weapon - The weapon entity to associate this viewmodel to. * @returns {void} **/ SetWeaponModel(this: Entity, viewModel: string, weapon?: Weapon): void /** * * Sets the entity's velocity. For entities with physics, consider using @PhysObj:SetVelocity on the @PhysObj type of the entity. * * @name EntityFuncs:SetVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetVelocity * @note Actually binds to CBaseEntity::SetBaseVelocity() which sets the entity's velocity due to forces applied by other entities. * @warning If applied to a player, this will actually **ADD** velocity, not set it. * @param {Entity} this - no description * @param {Vector} velocity - The new velocity to set. * @returns {void} **/ SetVelocity(this: Entity, velocity: Vector): void /** * * Allows to quickly set variable to entity's @EntityFuncs:GetTable. * * @name EntityFuncs:SetVar * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetVar * @note This will not network the variable to client(s). You want @EntityFuncs:SetNWString and similar functions for that * @param {Entity} this - no description * @param {any} key - Key of the value to set * @param {any} value - Value to set the variable to * @returns {void} **/ SetVar(this: Entity, key: any, value: any): void /** * * Sets the use type of an entity, affecting how often @EntityHooks:Use will be called for Lua entities. * * @name EntityFuncs:SetUseType * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetUseType * @param {Entity} this - no description * @param {_USE} useType - The use type to apply to the entity. Uses @_USE enum. * @returns {void} **/ SetUseType(this: Entity, useType: _USE): void /** * * Initializes the class names of an entity's phoneme mappings (mouth movement data). This is called by default with argument "phonemes" when a flex-based entity (such as an @NPC type) is created. * * @name EntityFuncs:SetupPhonemeMappings * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetupPhonemeMappings * @note TF2 phonemes can be accessed by using a path such as "player/scout/phonemes/phonemes" , check TF2's "tf2_misc_dir.vpk" with GCFScape for other paths, however it seems that TF2 sounds don't contain phoneme definitions anymore after being converted to mp3 and only rely on VCD animations, this needs to be further investigated * @param {Entity} this - no description * @param {string} fileRoot - The file prefix of the phoneme mappings (relative to "garrysmod/expressions/"). * @returns {void} **/ SetupPhonemeMappings(this: Entity, fileRoot: string): void /** * * Forces the entity to reconfigure its bones. You might need to call this after changing your model's scales or when manually drawing the entity multiple times at different positions. * * @name EntityFuncs:SetupBones * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetupBones * @note This calls the BuildBonePositions callback added via @EntityFuncs:AddCallback, so avoid calling this function inside it to prevent an infinite loop. * @param {Entity} this - no description * @returns {void} **/ SetupBones(this: Entity): void /** * * Sets whether an entity can be unfrozen, meaning that it cannot be unfrozen using the physgun. * * @name EntityFuncs:SetUnFreezable * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetUnFreezable * @param {Entity} this - no description * @param {boolean} freezable - True to make the entity unfreezable, false otherwise. * @returns {void} **/ SetUnFreezable(this: Entity, freezable?: boolean): void /** * * Marks the entity as a trigger, so it will generate @EntityHooks:StartTouch, @EntityHooks:Touch and @EntityHooks:EndTouch callbacks. * Internally this is stored as [FSOLID_TRIGGER](https://wiki.garrysmod.com/page/Enums/FSOLID) flag. * * @name EntityFuncs:SetTrigger * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetTrigger * @param {Entity} this - no description * @param {boolean} maketrigger - Make the entity trigger or not * @returns {void} **/ SetTrigger(this: Entity, maketrigger: boolean): void /** * * When this flag is set the entity will only transmit to the player when its parent is transmitted. This is useful for things like viewmodel attachments since without this flag they will transmit to everyone (and cause the viewmodels to transmit to everyone too). * * @name EntityFuncs:SetTransmitWithParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetTransmitWithParent * @note In the case of scripted entities, this will override @EntityHooks:UpdateTransmitState * @param {Entity} this - no description * @param {boolean} onoff - Will set the TransmitWithParent flag on or off * @returns {void} **/ SetTransmitWithParent(this: Entity, onoff: boolean): void /** * * Changes the table that can be accessed by indexing an entity. Each entity starts with its own table by default. * * @name EntityFuncs:SetTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetTable * @param {Entity} this - no description * @param {table} tab - Table for the entity to use * @returns {void} **/ SetTable(this: Entity, tab: table): void /** * * Overrides a single material on the model of this entity. * To set a Lua material created with @CreateMaterial function, just prepend a "!" to the material name. * * @name EntityFuncs:SetSubMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetSubMaterial * @bug #3362 The server's value takes priority on the client. * @param {Entity} this - no description * @param {number} index - Index of the material to override, acceptable values are from 0 to 31. * Indexes are by @EntityFuncs:GetMaterials, but you have to subtract 1 from them. * If called with no arguments, all sub materials will be reset. * @param {string} material - The material to override the default one with. Set to nil to revert to default material. * @returns {void} **/ SetSubMaterial(this: Entity, index?: number, material?: string): void /** * * Sets whether the entity should use a spawn effect when it is created on the client. * See @EntityFuncs:GetSpawnEffect for more information on how the effect is applied. * * @name EntityFuncs:SetSpawnEffect * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetSpawnEffect * @note This function will only have an effect when the entity spawns. After that it will do nothing even is set to true. * @param {Entity} this - no description * @param {boolean} spawnEffect - Sets if we should show a spawn effect. * @returns {void} **/ SetSpawnEffect(this: Entity, spawnEffect: boolean): void /** * * Sets solid flag(s) for the entity. * This overrides any other flags the entity might have had. See @EntityFuncs:AddSolidFlags for adding flags. * * @name EntityFuncs:SetSolidFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetSolidFlags * @param {Entity} this - no description * @param {FSOLID} flags - The flag(s) to set, see @FSOLID enum. * @returns {void} **/ SetSolidFlags(this: Entity, flags: FSOLID): void /** * * Sets the solidity of an entity. * * @name EntityFuncs:SetSolid * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetSolid * @param {Entity} this - no description * @param {SOLID} solid_type - The solid type. See the @SOLID enum. * @returns {void} **/ SetSolid(this: Entity, solid_type: SOLID): void /** * * Sets the skin of the entity. * * @name EntityFuncs:SetSkin * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetSkin * @param {Entity} this - no description * @param {number} skinIndex - 0-based index of the skin to use. * @returns {void} **/ SetSkin(this: Entity, skinIndex: number): void /** * * Sets if entity should create a server ragdoll on death or a client one. * * @name EntityFuncs:SetShouldServerRagdoll * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetShouldServerRagdoll * @note Player ragdolls created with this enabled will have an owner set, see @EntityFuncs:SetOwner for more information on what effects this has. * @note This is reset for players when they respawn. (@EntityFuncs:Spawn) * @param {Entity} this - no description * @param {boolean} serverragdoll - Set true if ragdoll should be created on server, false if on client * @returns {void} **/ SetShouldServerRagdoll(this: Entity, serverragdoll: boolean): void /** * * Sets whether or not the entity should make a physics contact sound when it's been picked up by a player. * * @name EntityFuncs:SetShouldPlayPickupSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetShouldPlayPickupSound * @param {Entity} this - no description * @param {boolean} playsound - True to play the pickup sound, false otherwise. * @returns {void} **/ SetShouldPlayPickupSound(this: Entity, playsound?: boolean): void /** * * Sets the entity's model sequence. * If the specified sequence is already active, the animation will not be restarted. See @EntityFuncs:ResetSequence for a function that restarts the animation even if it is already playing. * In some cases you want to run @EntityFuncs:ResetSequenceInfo to make this function run. * * @name EntityFuncs:SetSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetSequence * @note This will not work properly if called directly after calling @EntityFuncs:SetModel. Consider waiting until the next Tick. * @note Will not work on players due to the animations being reset every frame by the base gamemode animation system in @GamemodeHooks:CalcMainActivity. For Players, use in @GamemodeHooks:UpdateAnimation instead. * @note If set to a string, the function will automatically call @EntityFuncs:LookupSequence to retrieve the sequence ID as a number. * @param {Entity} this - no description * @param {number} sequenceId - The sequence to play. Also accepts strings. * @returns {void} **/ SetSequence(this: Entity, sequenceId: number): void /** * * Sets a save value for an entity. * * @name EntityFuncs:SetSaveValue * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetSaveValue * @bug #4065 This does not type-check entity keys. Setting an entity key to a non-entity value will treat it as NULL. * @param {Entity} this - no description * @param {string} name - Name of the save value to set * @param {any} value - Value to set * @returns {boolean} - Key successfully set **/ SetSaveValue(this: Entity, name: string, value: any): boolean /** * * Set the origin in which the Entity will be drawn from. * * @name EntityFuncs:SetRenderOrigin * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderOrigin * @param {Entity} this - no description * @param {Vector} newOrigin - The new origin in world coordinates where the Entity's model will now be rendered from. * @returns {void} **/ SetRenderOrigin(this: Entity, newOrigin: Vector): void /** * * Sets the render mode of the entity. * * @name EntityFuncs:SetRenderMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderMode * @param {Entity} this - no description * @param {RENDERMODE} renderMode - New render mode to set, see @RENDERMODE enum. * @returns {void} **/ SetRenderMode(this: Entity, renderMode: RENDERMODE): void /** * * Sets entity's render FX. * * @name EntityFuncs:SetRenderFX * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderFX * @param {Entity} this - no description * @param {kRenderFx} renderFX - The new render FX to set, see @kRenderFx enum * @returns {void} **/ SetRenderFX(this: Entity, renderFX: kRenderFx): void /** * * Enables the use of clipping planes to "cut" objects. * * @name EntityFuncs:SetRenderClipPlaneEnabled * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderClipPlaneEnabled * @param {Entity} this - no description * @param {boolean} enabled - Enable or disable clipping planes * @returns {void} **/ SetRenderClipPlaneEnabled(this: Entity, enabled: boolean): void /** * * Used to specify a plane, past which an object will be visually clipped. * * @name EntityFuncs:SetRenderClipPlane * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderClipPlane * @param {Entity} this - no description * @param {Vector} planeNormal - The normal of the plane. Anything behind the normal will be clipped. * @param {number} planePosition - The position of the plane. * @returns {void} **/ SetRenderClipPlane(this: Entity, planeNormal: Vector, planePosition: number): void /** * * Sets the render bounds for the entity in world space coordinates. For relative coordinates see @EntityFuncs:SetRenderBounds. * * @name EntityFuncs:SetRenderBoundsWS * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderBoundsWS * @param {Entity} this - no description * @param {Vector} mins - The minimum corner of the bounds, relative to origin of the world/map. * @param {Vector} maxs - The maximum corner of the bounds, relative to origin of the world/map. * @param {Vector} add - If defined, adds this vector to maxs and subtracts this vector from mins. * @returns {void} **/ SetRenderBoundsWS(this: Entity, mins: Vector, maxs: Vector, add?: Vector): void /** * * Sets the render bounds for the entity. For world space coordinates see @EntityFuncs:SetRenderBoundsWS. * * @name EntityFuncs:SetRenderBounds * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderBounds * @param {Entity} this - no description * @param {Vector} mins - The minimum corner of the bounds, relative to origin of the entity. * @param {Vector} maxs - The maximum corner of the bounds, relative to origin of the entity. * @param {Vector} add - If defined, adds this vector to maxs and subtracts this vector from mins. * @returns {void} **/ SetRenderBounds(this: Entity, mins: Vector, maxs: Vector, add?: Vector): void /** * * Sets the bone position. This is used alongside Kinect in @EntityFuncs:SetRagdollBuildFunction, for more info see ragdoll_motion entity. * * @name EntityFuncs:SetRagdollPos * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetRagdollPos * @param {Entity} this - no description * @param {number} boneid - Bone ID * @param {Vector} pos - Position to set * @returns {void} **/ SetRagdollPos(this: Entity, boneid: number, pos: Vector): void /** * * Sets the render angles of the Entity. * * @name EntityFuncs:SetRenderAngles * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetRenderAngles * @param {Entity} this - no description * @param {Angle} newAngles - The new render angles to be set to. * @returns {void} **/ SetRenderAngles(this: Entity, newAngles: Angle): void /** * * Sets the function to build the ragdoll. This is used alongside Kinect, for more info see ragdoll_motion entity. * * @name EntityFuncs:SetRagdollBuildFunction * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetRagdollBuildFunction * @param {Entity} this - no description * @param {function} func - The build function. This function has one argument: * @returns {void} **/ SetRagdollBuildFunction(this: Entity, func: EntityFuncsSetRagdollBuildFunctionFunc): void /** * * Sets the bone angles. This is used alongside Kinect in @EntityFuncs:SetRagdollBuildFunction, for more info see ragdoll_motion entity. * * @name EntityFuncs:SetRagdollAng * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetRagdollAng * @param {Entity} this - no description * @param {number} boneid - Bone ID * @param {Angle} pos - Angle to set * @returns {void} **/ SetRagdollAng(this: Entity, boneid: number, pos: Angle): void /** * * Prevents the server from sending any further information about the entity to a player. * UNCONFIRMED: When using this function, @EntityFuncs:SetFlexScale will conflict with this function. Instead, consider using @EntityFuncs:SetFlexScale on the client. * * @name EntityFuncs:SetPreventTransmit * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetPreventTransmit * @validate * @bug #1736 This does not work for nextbots. * @param {Entity} this - no description * @param {Player} player - The player to stop networking the entity to. * @param {boolean} stopTransmitting - true to stop the entity from networking, false to make it network again. * @returns {void} **/ SetPreventTransmit(this: Entity, player: Player, stopTransmitting: boolean): void /** * * Sets whether an entity should be predictable or not. * When an entity is set as predictable, its DT vars can be changed during predicted hooks. This is useful for entities which can be controlled by player input. * Any datatable value that mismatches from the server will be overridden and a prediction error will be spewed. * Weapons are predictable by default, and the drive system uses this function to make the controlled prop predictable as well. * Visit [Predicted Hooks](https://wiki.garrysmod.com/page/Category:Predicted_Hooks) for a list of all predicted hooks, and the [Prediction](https://wiki.garrysmod.com/page/Prediction) page. * For further technical information on the subject, visit [valve's wiki](https://developer.valvesoftware.com/wiki/Prediction). * * @name EntityFuncs:SetPredictable * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetPredictable * @note This function resets the datatable variables everytime it's called, it should ideally be called when a player starts using the entity and when he stops * @note Entities set as predictable with this function will be unmarked when the user lags and receives a full packet update, to handle such case visit @GamemodeHooks:NotifyShouldTransmit * @param {Entity} this - no description * @param {boolean} setPredictable - whether to make this entity predictable or not. * @returns {void} **/ SetPredictable(this: Entity, setPredictable: boolean): void /** * * Sets the specified pose parameter to the specified value. * You should call @EntityFuncs:InvalidateBoneCache after calling this function. * * @name EntityFuncs:SetPoseParameter * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetPoseParameter * @note Avoid calling this in draw hooks, especially when animating things, as it might cause visual artifacts. * @param {Entity} this - no description * @param {string} poseName - Name of the pose parameter. * @param {number} poseValue - The value to set the pose to. * @returns {void} **/ SetPoseParameter(this: Entity, poseName: string, poseValue: number): void /** * * Allows you to set how fast an entity's animation will play, with 1.0 being the default speed. * * @name EntityFuncs:SetPlaybackRate * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetPlaybackRate * @param {Entity} this - no description * @param {number} fSpeed - How fast the animation will play. * @returns {void} **/ SetPlaybackRate(this: Entity, fSpeed: number): void /** * * Moves the entity to the specified position. * * @name EntityFuncs:SetPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetPos * @note If the new position doesn't take effect right away, you can use @EntityFuncs:SetupBones to force it to do so. This issue is especially common when trying to render the same entity twice or more in a single frame at different positions. * @warning Entities with @EntityFuncs:GetSolid of SOLID_BBOX will have their angles reset! * @bug #2447 This will fail inside of predicted functions called during player movement processing. This includes @WeaponHooks:PrimaryAttack and @WeaponHooks:Think. * @param {Entity} this - no description * @param {Vector} position - The position to move the entity to. * @returns {void} **/ SetPos(this: Entity, position: Vector): void /** * * When called on a constraint entity, sets the two physics objects to be constrained. * Usage is not recommended as the Constraint library provides easier ways to deal with constraints. * * @name EntityFuncs:SetPhysConstraintObjects * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetPhysConstraintObjects * @param {Entity} this - no description * @param {PhysObj} Phys1 - The first physics object to be constrained. * @param {PhysObj} Phys2 - The second physics object to be constrained. * @returns {void} **/ SetPhysConstraintObjects(this: Entity, Phys1: PhysObj, Phys2: PhysObj): void /** * * Sets the player who gets credit if this entity kills something with physics damage within the time limit. * * @name EntityFuncs:SetPhysicsAttacker * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetPhysicsAttacker * @note This can only be called on props. * @param {Entity} this - no description * @param {Player} ent - Player who gets the kills. Setting this to a non-player entity will not work. * @param {number} timeLimit - Time in seconds until the entity forgets its physics attacker and prevents it from getting the kill credit. * @returns {void} **/ SetPhysicsAttacker(this: Entity, ent: Player, timeLimit?: number): void /** * * Sets whether or not the given entity is persistent. A persistent entity will be saved on server shutdown and loaded back when the server starts up. Additionally, by default persistent entities cannot be grabbed with the physgun and tools cannot be used on them. * In sandbox, this can be set on an entity by opening the context menu, right clicking the entity, and choosing "Make Persistent". * * @name EntityFuncs:SetPersistent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetPersistent * @note Persistence can only be enabled with the sbox_persist convar, which works as an identifier for the current set of persistent entities. An empty identifier (which is the default value) disables this feature. * @param {Entity} this - no description * @param {boolean} persist - Whether or not the entity should be persistent. * @returns {void} **/ SetPersistent(this: Entity, persist: boolean): void /** * * Sets the parent of this entity, making it move with its parent. * * @name EntityFuncs:SetParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetParent * @note This does not work on [the world](https://wiki.garrysmod.com/page/game/GetWorld). * @note You must call @EntityFuncs:SetMoveType( MOVETYPE_NONE ) on the child for this argument to have any effect! * @warning This can cause undefined physics behaviour when used on entities that don't support parenting. See the [Valve developer wiki](https://developer.valvesoftware.com/wiki/Entity_Hierarchy_(parenting)) for more information. * @param {Entity} this - no description * @param {Entity} parent - The entity to parent to. Setting this to nil will clear the parent. * @param {number} attachmentId - The attachment id to use when parenting, defaults to -1 or whatever the parent had set previously. * @returns {void} **/ SetParent(this: Entity, parent?: Entity, attachmentId?: number): void /** * * Sets the parent of an entity to another entity with the given physics bone number. Similar to @EntityFuncs:SetParent, except it is parented to a physbone. This function is useful mainly for ragdolls. * * @name EntityFuncs:SetParentPhysNum * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetParentPhysNum * @note Despite this function being available server side, it doesn't actually do anything server side. * @param {Entity} this - no description * @param {number} bone - Physics bone number to attach to. Use 0 for objects with only one physics bone. (See @EntityFuncs:GetPhysicsObjectNum) * @returns {void} **/ SetParentPhysNum(this: Entity, bone: number): void /** * * Sets the owner of this entity, disabling all physics interaction with it. * * @name EntityFuncs:SetOwner * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetOwner * @note This function is generally used to disable physics interactions on projectiles being fired by their owner, but can also be used for normal ownership in case physics interactions are not involved at all. The Gravity gun will be able to pick up the entity even if the owner can't collide with it, the Physics gun however will not. * @param {Entity} this - no description * @param {Entity} owner - The entity to be set as owner. * @returns {void} **/ SetOwner(this: Entity, owner?: Entity): void /** * * Sets a networked vector value on the entity. * The value can then be accessed with @EntityFuncs:GetNWVector both from client and server. * * @name EntityFuncs:SetNWVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWVector * @note Running this function clientside will only set it for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {Vector} value - The value to set * @returns {void} **/ SetNWVector(this: Entity, key: string, value: Vector): void /** * * Sets a function to be called when the NWVar changes. * * @name EntityFuncs:SetNWVarProxy * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWVarProxy * @param {Entity} this - no description * @param {any} key - The key of the NWVar to add callback for. * @param {function} callback - The function to be called when the NWVar changes. It has 4 arguments: * @returns {void} **/ SetNWVarProxy(this: Entity, key: any, callback: EntityFuncsSetNWVarProxyCallback): void /** * * Sets a networked string value on the entity. * The value can then be accessed with @EntityFuncs:GetNWString both from client and server. * * @name EntityFuncs:SetNWString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWString * @note Running this function clientside will only set it for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {string} value - The value to set, up to 199 characters. * @returns {void} **/ SetNWString(this: Entity, key: string, value: string): void /** * * Sets a networked integer (whole number) value on the entity. * The value can then be accessed with @EntityFuncs:GetNWInt both from client and server. * See @EntityFuncs:SetNWFloat for numbers that aren't integers. * * @name EntityFuncs:SetNWInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWInt * @note Running this function clientside will only set it for the client it is called on. * @bug #3374 This function will not round decimal values as it actually networks a float internally. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {number} value - The value to set * @returns {void} **/ SetNWInt(this: Entity, key: string, value: number): void /** * * Sets a networked float (number) value on the entity. * The value can then be accessed with @EntityFuncs:GetNWFloat both from client and server. * Unlike @EntityFuncs:SetNWInt, floats don't have to be whole numbers. * * @name EntityFuncs:SetNWFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWFloat * @note Running this function clientside will only set it for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {number} value - The value to set * @returns {void} **/ SetNWFloat(this: Entity, key: string, value: number): void /** * * Sets a networked boolean value on the entity. * The value can then be accessed with @EntityFuncs:GetNWBool both from client and server. * * @name EntityFuncs:SetNWBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWBool * @note Running this function clientside will only set it for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {boolean} value - The value to set * @returns {void} **/ SetNWBool(this: Entity, key: string, value: boolean): void /** * * Sets a networked entity value on the entity. * The value can then be accessed with @EntityFuncs:GetNWEntity both from client and server. * * @name EntityFuncs:SetNWEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWEntity * @note Running this function clientside will only set it for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {Entity} value - The value to set * @returns {void} **/ SetNWEntity(this: Entity, key: string, value: Entity): void /** * * Sets a networked angle value on the entity. * The value can then be accessed with @EntityFuncs:GetNWAngle both from client and server. * * @name EntityFuncs:SetNWAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNWAngle * @note Running this function clientside will only set it for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {Angle} value - The value to set * @returns {void} **/ SetNWAngle(this: Entity, key: string, value: Angle): void /** * * Sets whether the entity is solid or not. * * @name EntityFuncs:SetNotSolid * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNotSolid * @param {Entity} this - no description * @param {boolean} IsNotSolid - True will make the entity not solid, false will make it solid. * @returns {void} **/ SetNotSolid(this: Entity, IsNotSolid: boolean): void /** * * Sets if the entity's model should render at all. * If set on the server, this entity will no longer network to clients, and for all intents and purposes cease to exist clientside. * * @name EntityFuncs:SetNoDraw * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNoDraw * @param {Entity} this - no description * @param {boolean} shouldNotDraw - true disables drawing * @returns {void} **/ SetNoDraw(this: Entity, shouldNotDraw: boolean): void /** * * Sets the next time the clientside @EntityHooks:Think is called. * * @name EntityFuncs:SetNextClientThink * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetNextClientThink * @param {Entity} this - no description * @param {number} nextthink - The next time, relative to @CurTime function, to execute the @EntityHooks:Think clientside. * @returns {void} **/ SetNextClientThink(this: Entity, nextthink: number): void /** * * Virtually changes entity position for clients. Does the same thing as @EntityFuncs:SetPos when used serverside. * * @name EntityFuncs:SetNetworkOrigin * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkOrigin * @param {Entity} this - no description * @param {Vector} origin - The position to make clients think this entity is at. * @returns {void} **/ SetNetworkOrigin(this: Entity, origin: Vector): void /** * * Sets a networked vector value at specified index on the entity. * The value then can be accessed with @EntityFuncs:GetNetworkedVector both from client and server. * * @name EntityFuncs:SetNetworkedVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedVector * @note Running this function clientside will only set it clientside for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {Vector} value - The value to set * @returns {void} **/ SetNetworkedVector(this: Entity, key: string, value?: Vector): void /** * * Sets callback function to be called when given NWVar changes. * * @name EntityFuncs:SetNetworkedVarProxy * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedVarProxy * @note Currently this function only works for the NW2Var system (accessed by adding a 2 in between Networked and Var for most NetworkedVar functions), which will replace the original one at some point in the future * @param {Entity} this - no description * @param {string} name - The name of the NWVar to add callback for. * @param {function} callback - The function to be called when the NWVar changes. * @returns {void} **/ SetNetworkedVarProxy(this: Entity, name: string, callback: UnknownFunc): void /** * * Sets a networked string value at specified index on the entity. * The value then can be accessed with @EntityFuncs:GetNetworkedString both from client and server. * * @name EntityFuncs:SetNetworkedString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedString * @note Running this function clientside will only set it clientside for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {string} value - The value to set * @returns {void} **/ SetNetworkedString(this: Entity, key: string, value?: string): void /** * * Sets a networked number at the specified index on the entity. * * @name EntityFuncs:SetNetworkedNumber * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedNumber * @param {Entity} this - no description * @param {any} index - The index that the value is stored in. * @param {number} num - The value to network. * @returns {void} **/ SetNetworkedNumber(this: Entity, index: any, num: number): void /** * * Sets a networked integer value at specified index on the entity. * The value then can be accessed with @EntityFuncs:GetNetworkedInt both from client and server. * * @name EntityFuncs:SetNetworkedInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedInt * @note Running this function clientside will only set it clientside for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {number} value - The value to set * @returns {void} **/ SetNetworkedInt(this: Entity, key: string, value?: number): void /** * * Sets a networked float value at specified index on the entity. * The value then can be accessed with @EntityFuncs:GetNetworkedFloat both from client and server. * Seems to be the same as @EntityFuncs:GetNetworkedInt. * * @name EntityFuncs:SetNetworkedFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedFloat * @note Running this function clientside will only set it clientside for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {number} value - The value to set * @returns {void} **/ SetNetworkedFloat(this: Entity, key: string, value?: number): void /** * * Sets a networked entity value at specified index on the entity. * The value then can be accessed with @EntityFuncs:GetNetworkedEntity both from client and server. * * @name EntityFuncs:SetNetworkedEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedEntity * @note Running this function clientside will only set it clientside for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {Entity} value - The value to set * @returns {void} **/ SetNetworkedEntity(this: Entity, key: string, value?: Entity): void /** * * Sets a networked boolean value at specified index on the entity. * The value then can be accessed with @EntityFuncs:GetNetworkedBool both from client and server. * * @name EntityFuncs:SetNetworkedBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedBool * @note Running this function clientside will only set it clientside for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {boolean} value - The value to set * @returns {void} **/ SetNetworkedBool(this: Entity, key: string, value?: boolean): void /** * * Sets a networked angle value at specified index on the entity. * The value then can be accessed with @EntityFuncs:GetNetworkedAngle both from client and server. * * @name EntityFuncs:SetNetworkedAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkedAngle * @note Running this function clientside will only set it clientside for the client it is called on. * @param {Entity} this - no description * @param {string} key - The key to associate the value with * @param {Angle} value - The value to set * @returns {void} **/ SetNetworkedAngle(this: Entity, key: string, value?: Angle): void /** * * Alters the entity's perceived serverside angle on the client. * * @name EntityFuncs:SetNetworkAngles * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetNetworkAngles * @param {Entity} this - no description * @param {Angle} angle - Networked angle. * @returns {void} **/ SetNetworkAngles(this: Entity, angle: Angle): void /** * * Sets the mapping name of the entity. * * @name EntityFuncs:SetName * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetName * @param {Entity} this - no description * @param {string} mappingName - The name to set for the entity. * @returns {void} **/ SetName(this: Entity, mappingName: string): void /** * * Sets the entity's move type. This should be called before initializing the physics object on the entity, unless it will override SetMoveType such as @EntityFuncs:PhysicsInitBox. * Despite existing on client, it doesn't actually do anything on client. * * @name EntityFuncs:SetMoveType * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetMoveType * @param {Entity} this - no description * @param {MOVETYPE} movetype - The new movetype, see @MOVETYPE enum * @returns {void} **/ SetMoveType(this: Entity, movetype: MOVETYPE): void /** * * Sets the Movement Parent of an entity to another entity. * Similar to @EntityFuncs:SetParent, except the object's coordinates are not translated automatically before parenting. * * @name EntityFuncs:SetMoveParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetMoveParent * @param {Entity} this - no description * @param {Entity} Parent - The entity to change this entity's Movement Parent to. * @returns {void} **/ SetMoveParent(this: Entity, Parent: Entity): void /** * * Sets the move collide type of the entity. The move collide is the way a physics object reacts to hitting an object - will it bounce, slide? * * @name EntityFuncs:SetMoveCollide * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetMoveCollide * @param {Entity} this - no description * @param {MOVECOLLIDE} moveCollideType - The move collide type, see @MOVECOLLIDE enum * @returns {void} **/ SetMoveCollide(this: Entity, moveCollideType: MOVECOLLIDE): void /** * * Scales the model of the entity, if the entity is a @Player type or an @NPC type the hitboxes will be scaled as well. * For some entities, calling @EntityFuncs:Activate after this will scale the collision bounds and @PhysObj type as well; be wary as there's no optimization being done internally and highly complex collision models might crash the server. * This is the same system used in TF2 for the Mann Vs Machine robots. * To resize the entity along any axis, use @EntityFuncs:EnableMatrix instead. * If your old scales are wrong due to a recent update, use @EntityFuncs:SetLegacyTransform as a quick fix. * * @name EntityFuncs:SetModelScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetModelScale * @bug #2193 The hull does not scale properly with this function. * @bug #3502 This does not scale procedural bones and disables IK. * @param {Entity} this - no description * @param {number} scale - A float to scale the model by. 0 will not draw anything. < 0 will draw the model inverted. * @param {number} deltaTime - Transition time of the scale change, set to 0 to modify the scale right away. * @returns {void} **/ SetModelScale(this: Entity, scale: number, deltaTime?: number): void /** * * Alter the model name returned by @EntityFuncs:GetModel. Does not affect the entity's actual model. * * @name EntityFuncs:SetModelName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetModelName * @param {Entity} this - no description * @param {string} modelname - The new model name. * @returns {void} **/ SetModelName(this: Entity, modelname: string): void /** * * Sets the model of the entity. * This does not update the physics of the entity - see @EntityFuncs:PhysicsInit. * * @name EntityFuncs:SetModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetModel * @warning This silently fails when given an empty string. * @param {Entity} this - no description * @param {string} modelName - New model value. * @returns {void} **/ SetModel(this: Entity, modelName: string): void /** * * Sets the maximum health for entity. Note, that you can still set entity's health above this amount with @EntityFuncs:SetHealth. * * @name EntityFuncs:SetMaxHealth * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetMaxHealth * @param {Entity} this - no description * @param {number} maxhealth - What the max health should be * @returns {void} **/ SetMaxHealth(this: Entity, maxhealth: number): void /** * * Sets the rendering material override of the entity. * To set a Lua material created with @CreateMaterial function, just prepend a "!" to the material name. * * @name EntityFuncs:SetMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetMaterial * @note If you wish to override a single material on the model, use @EntityFuncs:SetSubMaterial instead. * @note Please note that to apply materials to models, that material **must** have VertexLitGeneric shader. For that reason you cannot apply map textures onto models, map textures use a different material shader - LightmappedGeneric. * @bug #3362 The server's value takes priority on the client. * @param {Entity} this - no description * @param {string} materialName - New material name. Use an empty string ("") to reset to the default materials. * @param {boolean} forceMaterial - Use it if you wish to apply material other than VertexLitGeneric (such as tools/toolswhite). * @returns {void} **/ SetMaterial(this: Entity, materialName: string, forceMaterial?: boolean): void /** * * Sets the Level Of Detail model to use with this entity. This may not work for all models if the model doesn't include any LOD sub models. * This function works exactly like the clientside r_lod convar and takes priority over it. * * @name EntityFuncs:SetLOD * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetLOD * @param {Entity} this - no description * @param {number} lod - The Level Of Detail model ID to use. -1 leaves the engine to automatically set the Level of Detail. * The Level Of Detail may range from 0 to 8, with 0 being the highest quality and 8 the lowest. * @returns {void} **/ SetLOD(this: Entity, lod?: number): void /** * * Sets the entity's local velocity which is their velocity due to movement in the world from forces such as gravity. Does not include velocity from entity-on-entity collision or other world movement. * * @name EntityFuncs:SetLocalVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetLocalVelocity * @warning Same as @EntityFuncs:SetAbsVelocity, but clamps the given velocity, and is not recommended to be used because of that. * @param {Entity} this - no description * @param {Vector} velocity - The new velocity to set. * @returns {void} **/ SetLocalVelocity(this: Entity, velocity: Vector): void /** * * Sets local position relative to the parented position. This is for use with @EntityFuncs:SetParent to offset position. * * @name EntityFuncs:SetLocalPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetLocalPos * @param {Entity} this - no description * @param {Vector} pos - The local position * @returns {void} **/ SetLocalPos(this: Entity, pos: Vector): void /** * * Sets the entity's angular velocity (rotation speed). * * @name EntityFuncs:SetLocalAngularVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetLocalAngularVelocity * @param {Entity} this - no description * @param {Angle} angVel - The angular velocity to set. * @returns {void} **/ SetLocalAngularVelocity(this: Entity, angVel: Angle): void /** * * Sets angles relative to angles of @EntityFuncs:GetParent * * @name EntityFuncs:SetLocalAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetLocalAngles * @param {Entity} this - no description * @param {Angle} ang - The local angle * @returns {void} **/ SetLocalAngles(this: Entity, ang: Angle): void /** * * Sets the entity to be used as the light origin position for this entity. * * @name EntityFuncs:SetLightingOriginEntity * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLightingOriginEntity * @param {Entity} this - no description * @param {Entity} lightOrigin - The lighting entity. * @returns {void} **/ SetLightingOriginEntity(this: Entity, lightOrigin: Entity): void /** * * This forces an entity to use the bone transformation behaviour from versions prior to **2014-07-08**. * This behaviour affects @EntityFuncs:EnableMatrix and @EntityFuncs:SetModelScale and is incorrect, therefore this function be used exclusively as a quick fix for old scripts that rely on it. * * @name EntityFuncs:SetLegacyTransform * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetLegacyTransform * @param {Entity} this - no description * @param {boolean} enabled - Whether the entity should use the old bone transformation behaviour or not. * @returns {void} **/ SetLegacyTransform(this: Entity, enabled: boolean): void /** * * Sets the layer weight. This influences how strongly the animation should be overriding the normal animations of the entity. * * @name EntityFuncs:SetLayerWeight * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerWeight * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {number} weight - The new layer weight. * @returns {void} **/ SetLayerWeight(this: Entity, layerID: number, weight: number): void /** * * Sets the priority of given layer. * * @name EntityFuncs:SetLayerPriority * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerPriority * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {number} priority - The new priority of the layer. * @returns {void} **/ SetLayerPriority(this: Entity, layerID: number, priority: number): void /** * * Sets the layer playback rate. See also @EntityFuncs:SetLayerDuration. * * @name EntityFuncs:SetLayerPlaybackRate * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerPlaybackRate * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {number} rate - The new playback rate. * @returns {void} **/ SetLayerPlaybackRate(this: Entity, layerID: number, rate: number): void /** * * Sets the duration of given layer. This internally overrides the @EntityFuncs:SetLayerPlaybackRate. * * @name EntityFuncs:SetLayerDuration * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerDuration * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {number} duration - The new duration of the layer in seconds. * @returns {void} **/ SetLayerDuration(this: Entity, layerID: number, duration: number): void /** * * Sets whether the layer should loop or not. * * @name EntityFuncs:SetLayerLooping * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerLooping * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {boolean} loop - Whether the layer should loop or not. * @returns {void} **/ SetLayerLooping(this: Entity, layerID: number, loop: boolean): void /** * * Sets the animation cycle/frame of given layer. * * @name EntityFuncs:SetLayerCycle * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerCycle * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {number} cycle - The new animation cycle/frame for given layer. * @returns {void} **/ SetLayerCycle(this: Entity, layerID: number, cycle: number): void /** * @name EntityFuncs:SetLayerBlendOut * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerBlendOut * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {number} blendOut - no description * @returns {void} **/ SetLayerBlendOut(this: Entity, layerID: number, blendOut: number): void /** * @name EntityFuncs:SetLayerBlendIn * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLayerBlendIn * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @param {number} blendIn - no description * @returns {void} **/ SetLayerBlendIn(this: Entity, layerID: number, blendIn: number): void /** * * This allows the entity to be lag compensated during @Player:LagCompensation. * As a side note for parented entities, if your entity can be shot at, keep in mind that its collision bounds need to be bigger than the bone's hitbox the entity is parented to, or hull/line traces ( such as the crowbar attack or bullets ) might not hit at all. * * @name EntityFuncs:SetLagCompensated * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetLagCompensated * @note Players are lag compensated by default and there's no need to call this function for them. * It's best to not enable lag compensation on parented entities, as the system does not handle it that well ( they will be moved back but then the entity will lag behind ). * Parented entities move back with the parent if it's lag compensated, so if you are making some kind of armor piece you shouldn't do anything. * @param {Entity} this - no description * @param {boolean} enable - Whether the entity should be lag compensated or not. * @returns {void} **/ SetLagCompensated(this: Entity, enable: boolean): void /** * * Sets Hammer key values on an entity. * You can look up which entities have what key values on the [Valve Developer Community](https://developer.valvesoftware.com/wiki/) on entity pages. * A list of basic entities can be found [here](https://developer.valvesoftware.com/wiki/List_of_entities). * Alternatively you can look at the .fgd files shipped with Garry's Mod in the bin/ folder with a text editor to see the key values as they appear in Hammer. * * @name EntityFuncs:SetKeyValue * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetKeyValue * @param {Entity} this - no description * @param {string} key - The internal key name * @param {string} value - The value to set * @returns {void} **/ SetKeyValue(this: Entity, key: string, value: string): void /** * * Enables or disable the inverse kinematic usage of this entity. * * @name EntityFuncs:SetIK * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetIK * @param {Entity} this - no description * @param {boolean} useIK - The state of the IK. * @returns {void} **/ SetIK(this: Entity, useIK?: boolean): void /** * * Sets the health of the entity. * * @name EntityFuncs:SetHealth * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetHealth * @note You may want to take @EntityFuncs:GetMaxHealth into account when calculating what to set health to, in case a gamemode has a different max health than 100. * @param {Entity} this - no description * @param {number} newHealth - New health value. * @returns {void} **/ SetHealth(this: Entity, newHealth: number): void /** * * Sets the current Hitbox set for the entity. * * @name EntityFuncs:SetHitboxSet * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetHitboxSet * @param {Entity} this - no description * @param {number} id - The new hitbox set to set. Can be a name as a @string type, or the ID as a @number type. * If the operation failed, the function will silently fail. * @returns {void} **/ SetHitboxSet(this: Entity, id: number): void /** * * Sets the ground the entity is standing on. * * @name EntityFuncs:SetGroundEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetGroundEntity * @param {Entity} this - no description * @param {Entity} ground - The ground entity. * @returns {void} **/ SetGroundEntity(this: Entity, ground: Entity): void /** * * Sets the gravity multiplier of the entity. * * @name EntityFuncs:SetGravity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetGravity * @bug #3648 This function is not predicted. * @param {Entity} this - no description * @param {number} gravityMultiplier - Value which specifies the gravity multiplier. * @returns {void} **/ SetGravity(this: Entity, gravityMultiplier: number): void /** * * Sets how much friction an entity has when sliding against a surface. Entities default to 1 (100%) and can be higher or even negative. * * @name EntityFuncs:SetFriction * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetFriction * @note Works only for MOVETYPE_STEP entities. * @bug #1395 This has no effect on players. * @param {Entity} this - no description * @param {number} friction - Friction multiplier * @returns {void} **/ SetFriction(this: Entity, friction: number): void /** * * Sets the flex weight. * * @name EntityFuncs:SetFlexWeight * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetFlexWeight * @param {Entity} this - no description * @param {number} flex - The ID of the flex to modify weight of * @param {number} weight - The new weight to set * @returns {void} **/ SetFlexWeight(this: Entity, flex: number, weight: number): void /** * * Sets the flex scale of the entity. * * @name EntityFuncs:SetFlexScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetFlexScale * @bug #1779 This does not work on @ClientsideModel functions or @ClientsideRagdoll functions. * @param {Entity} this - no description * @param {number} scale - The new flex scale to set to * @returns {void} **/ SetFlexScale(this: Entity, scale: number): void /** * * Sets the position an entity's eyes look toward. * * @name EntityFuncs:SetEyeTarget * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetEyeTarget * @param {Entity} this - no description * @param {Vector} pos - The world position the entity is looking toward. * @returns {void} **/ SetEyeTarget(this: Entity, pos: Vector): void /** * * Allows you to set the Start or End entity attachment for the rope. * * @name EntityFuncs:SetEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetEntity * @param {Entity} this - no description * @param {string} name - The name of the variable to modify. * Accepted names are StartEntity and EndEntity. * @param {Entity} entity - The entity to apply to the specific attachment. * @returns {void} **/ SetEntity(this: Entity, name: string, entity: Entity): void /** * * Sets the elasticity of this entity, used by some flying entities such as the Helicopter NPC to determine how much it should bounce around when colliding. * * @name EntityFuncs:SetElasticity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetElasticity * @param {Entity} this - no description * @param {number} elasticity - The elasticity to set. * @returns {void} **/ SetElasticity(this: Entity, elasticity: number): void /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Sets the specified vector on the entity's datatable. * * @name EntityFuncs:SetDTVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetDTVector * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 31. * @param {Vector} vec - The vector to write on the entity's datatable. * @returns {void} **/ SetDTVector(this: Entity, key: number, vec: Vector): void /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Sets the specified string on the entity's datatable. * * @name EntityFuncs:SetDTString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetDTString * @internal * @note The length of these strings are capped at 512 characters. * @param {Entity} this - no description * @param {number} key - Goes from 0 to 3. * @param {string} str - The string to write on the entity's datatable, can't be more than 512 characters per string. * @returns {void} **/ SetDTString(this: Entity, key: number, str: string): void /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Sets the specified integer on the entity's datatable. * * @name EntityFuncs:SetDTInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetDTInt * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 31. * @param {number} integer - The integer to write on the entity's datatable. This will be cast to a 32-bit signed integer internally. * @returns {void} **/ SetDTInt(this: Entity, key: number, integer: number): void /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Sets the specified float on the entity's datatable. * * @name EntityFuncs:SetDTFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetDTFloat * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 31. * @param {number} float - The float to write on the entity's datatable. * @returns {void} **/ SetDTFloat(this: Entity, key: number, float: number): void /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Sets the specified entity on this entity's datatable. * * @name EntityFuncs:SetDTEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetDTEntity * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 31. * @param {Entity} ent - The entity to write on this entity's datatable. * @returns {void} **/ SetDTEntity(this: Entity, key: number, ent: Entity): void /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Sets the specified bool on the entity's datatable. * * @name EntityFuncs:SetDTBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetDTBool * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 31. * @param {boolean} bool - The boolean to write on the entity's metatable. * @returns {void} **/ SetDTBool(this: Entity, key: number, bool: boolean): void /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Sets the specified angle on the entity's datatable. * * @name EntityFuncs:SetDTAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetDTAngle * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 31. * @param {Angle} ang - The angle to write on the entity's datatable. * @returns {void} **/ SetDTAngle(this: Entity, key: number, ang: Angle): void /** * * Sets the progress of the current animation to a specific value between 0 and 1. * * @name EntityFuncs:SetCycle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetCycle * @bug #3038 This does not work with viewmodels. * @param {Entity} this - no description * @param {number} value - The desired cycle value * @returns {void} **/ SetCycle(this: Entity, value: number): void /** * * Marks the entity to call @GamemodeHooks:ShouldCollide. * * @name EntityFuncs:SetCustomCollisionCheck * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetCustomCollisionCheck * @param {Entity} this - no description * @param {boolean} enable - Enable or disable the custom collision check * @returns {void} **/ SetCustomCollisionCheck(this: Entity, enable: boolean): void /** * * Sets the creator of the SENT. * * @name EntityFuncs:SetCreator * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetCreator * @param {Entity} this - no description * @param {Player} ply - The creator * @returns {void} **/ SetCreator(this: Entity, ply: Player): void /** * * Sets the color of an entity. * * @name EntityFuncs:SetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetColor * @param {Entity} this - no description * @param {Color} color - The color to set. Uses the @IColor structure. * @returns {void} **/ SetColor(this: Entity, color?: Color): void /** * * Sets the entity's collision group. * * @name EntityFuncs:SetCollisionGroup * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetCollisionGroup * @param {Entity} this - no description * @param {COLLISION_GROUP} group - Collision group of the entity, see @COLLISION_GROUP enum * @returns {void} **/ SetCollisionGroup(this: Entity, group: COLLISION_GROUP): void /** * * Sets the collision bounds for the entity, which are used for triggers ( @EntityFuncs:SetTrigger, @EntityHooks:Touch ), determining if rendering is necessary clientside, and collision ( If @EntityFuncs:SetSolid set as [SOLID_BBOX](https://wiki.garrysmod.com/page/Enums/SOLID) ). * Input bounds are in world coordinates! * See also @EntityFuncs:SetCollisionBounds. * * @name EntityFuncs:SetCollisionBoundsWS * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetCollisionBoundsWS * @param {Entity} this - no description * @param {Vector} vec1 - The first vector of the bounds. * @param {Vector} vec2 - The second vector of the bounds. * @returns {void} **/ SetCollisionBoundsWS(this: Entity, vec1: Vector, vec2: Vector): void /** * * Sets the collision bounds for the entity, which are used for triggers ( @EntityFuncs:SetTrigger, @EntityHooks:Touch ), determining if rendering is necessary clientside, and collision ( If @EntityFuncs:SetSolid set as [SOLID_BBOX](https://wiki.garrysmod.com/page/Enums/SOLID) ). * Input bounds are relative to @EntityFuncs:GetPos! * See also @EntityFuncs:SetCollisionBoundsWS. * * @name EntityFuncs:SetCollisionBounds * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetCollisionBounds * @param {Entity} this - no description * @param {Vector} mins - The minimum vector of the bounds. The vector must be smaller than second argument on all axises. * @param {Vector} maxs - The maximum vector of the bounds. The vector must be bigger than first argument on all axises. * @returns {void} **/ SetCollisionBounds(this: Entity, mins: Vector, maxs: Vector): void /** * * Sets the bone position and angles. * * @name EntityFuncs:SetBonePosition * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetBonePosition * @param {Entity} this - no description * @param {number} bone - The bone ID to manipulate * @param {Vector} pos - The position to set * @param {Angle} ang - The angles to set * @returns {void} **/ SetBonePosition(this: Entity, bone: number, pos: Vector, ang: Angle): void /** * * Sets the bone matrix of given bone to given matrix. See also @EntityFuncs:GetBoneMatrix. * Despite existing serverside, it does nothing. * * @name EntityFuncs:SetBoneMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetBoneMatrix * @param {Entity} this - no description * @param {number} boneid - The ID of the bone * @param {VMatrix} matrix - The matrix to set. * @returns {void} **/ SetBoneMatrix(this: Entity, boneid: number, matrix: VMatrix): void /** * * Sets the specified value on the bone controller with the given ID of this entity, it's used in HL1 to change the head rotation of NPCs, turret aiming and so on. * * @name EntityFuncs:SetBoneController * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetBoneController * @note This is the precursor of pose parameters, and only works for Half Life 1: Source models supporting it. * @param {Entity} this - no description * @param {number} boneControllerID - The ID of the bone controller to set the value to. * Goes from 0 to 3. * @param {number} value - The value to set on the specified bone controller. * @returns {void} **/ SetBoneController(this: Entity, boneControllerID: number, value: number): void /** * * Sets the bodygroups from a string. A convenience function for @EntityFuncs:SetBodygroup. * * @name EntityFuncs:SetBodyGroups * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetBodyGroups * @param {Entity} this - no description * @param {string} bodygroups - Body groups to set. Each single-digit number in the string represents a separate bodygroup. **This make it impossible to set any bodygroup to a value higher than 9!** For that you need to use @EntityFuncs:SetBodygroup. * @returns {void} **/ SetBodyGroups(this: Entity, bodygroups: string): void /** * * Sets an entities' bodygroup. * * @name EntityFuncs:SetBodygroup * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetBodygroup * @param {Entity} this - no description * @param {number} bodygroup - The id of the bodygroup you're setting. Starts from 0. * @param {number} value - The value you're setting the bodygroup to. Starts from 0. * @returns {void} **/ SetBodygroup(this: Entity, bodygroup: number, value: number): void /** * * Sets the blood color this entity uses. * * @name EntityFuncs:SetBloodColor * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/SetBloodColor * @param {Entity} this - no description * @param {BLOOD_COLOR} bloodColor - An integer corresponding to @BLOOD_COLOR enum. * @returns {void} **/ SetBloodColor(this: Entity, bloodColor: BLOOD_COLOR): void /** * * Parents the sprite to an attachment on another model. * Works only on env_sprite. * Despite existing on client, it doesn't actually do anything on client. * * @name EntityFuncs:SetAttachment * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetAttachment * @param {Entity} this - no description * @param {Entity} ent - The entity to attach/parent to * @param {number} attachment - The attachment ID to parent to * @returns {void} **/ SetAttachment(this: Entity, ent: Entity, attachment: number): void /** * * Sets the time (relative to @CurTime function) of the current animation frame, which is used to determine @EntityFuncs:GetCycle. * * @name EntityFuncs:SetAnimTime * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/SetAnimTime * @param {Entity} this - no description * @param {number} time - The current animation time. * @returns {void} **/ SetAnimTime(this: Entity, time: number): void /** * * Sets a player's third-person animation. Mainly used by @Weapon types to start the player's weapon attack and reload animations. * * @name EntityFuncs:SetAnimation * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetAnimation * @param {Entity} this - no description * @param {PLAYER_ANIM} playerAnim - Player animation, see @PLAYER_ANIM enum. * @returns {void} **/ SetAnimation(this: Entity, playerAnim: PLAYER_ANIM): void /** * * Sets the angles of the entity. * * @name EntityFuncs:SetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetAngles * @note To set a player's angles, use @Player:SetEyeAngles instead. * @param {Entity} this - no description * @param {Angle} angles - The new angles. * @returns {void} **/ SetAngles(this: Entity, angles: Angle): void /** * * Sets the entity's velocity. * * @name EntityFuncs:SetAbsVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SetAbsVelocity * @note Actually binds to CBaseEntity::SetLocalVelocity() which sets the entity's velocity due to movement in the world from forces such as gravity. Does not include velocity from entity-on-entity collision or other world movement. * @param {Entity} this - no description * @param {Vector} velocity - The new velocity to set. * @returns {void} **/ SetAbsVelocity(this: Entity, velocity: Vector): void /** * * Returns length of currently played sequence. * * @name EntityFuncs:SequenceDuration * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SequenceDuration * @bug #2783 This will return incorrect results for weapons and viewmodels clientside in thirdperson. * @param {Entity} this - no description * @param {number} seqid - A sequence ID to return the length specific sequence of instead of the entity's main/currently playing sequence. * @returns {number} - The length of the sequence **/ SequenceDuration(this: Entity, seqid?: number): number /** * * Sends sequence animation to the view model. It is recommended to use this for view model animations, instead of @EntityFuncs:ResetSequence. * This function is only usable on view models. * * @name EntityFuncs:SendViewModelMatchingSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SendViewModelMatchingSequence * @bug #3229 Sequences 0-6 will not be looped regardless if they're marked as a looped animation or not. * @param {Entity} this - no description * @param {number} seq - The sequence ID returned by @EntityFuncs:LookupSequence or @EntityFuncs:SelectWeightedSequence. * @returns {void} **/ SendViewModelMatchingSequence(this: Entity, seq: number): void /** * * Returns the sequence ID corresponding to given activity ID, and uses the provided seed for random selection. The seed should be the same server-side and client-side if used in a predicted environment. * See @EntityFuncs:SelectWeightedSequence for a provided-seed version of this function. * * @name EntityFuncs:SelectWeightedSequenceSeeded * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SelectWeightedSequenceSeeded * @param {Entity} this - no description * @param {ACT} act - The activity ID, see @ACT enum. * @param {number} seed - The seed to use for randomly selecting a sequence in the case the activity ID has multiple sequences bound to it. @EntityFuncs:SelectWeightedSequence uses the same seed as @util.SharedRandom internally for this. * @returns {number} - The sequence ID **/ SelectWeightedSequenceSeeded(this: Entity, act: ACT, seed: number): number /** * * Returns sequence ID corresponding to given activity ID. * Opposite of @EntityFuncs:GetSequenceActivity. * Similar to @EntityFuncs:LookupSequence. * See also @EntityFuncs:SelectWeightedSequenceSeeded. * * @name EntityFuncs:SelectWeightedSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/SelectWeightedSequence * @param {Entity} this - no description * @param {ACT} act - The activity ID, see @ACT enum. * @returns {number} - The sequence ID **/ SelectWeightedSequence(this: Entity, act: ACT): number /** * * Restarts the entity's animation gesture. If the given gesture is already playing, it will reset it and play it from the beginning. * * @name EntityFuncs:RestartGesture * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/RestartGesture * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites. * @param {Entity} this - no description * @param {ACT} activity - The activity number to send to the entity. See @ACT enum and @EntityFuncs:GetSequenceActivity * @param {boolean} addIfMissing - Add/start the gesture to if it has not been yet started. * @param {boolean} autokill - no description * @returns {void} **/ RestartGesture(this: Entity, activity: ACT, addIfMissing?: boolean, autokill?: boolean): void /** * * Makes the entity/weapon respawn. * Only usable on HL2 pickups and any weapons. Seems to be buggy with weapons. * Very unreliable. * * @name EntityFuncs:Respawn * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Respawn * @param {Entity} this - no description * @returns {void} **/ Respawn(this: Entity): void /** * * Reset entity sequence info such as playback rate, ground speed, last event check, etc. * * @name EntityFuncs:ResetSequenceInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ResetSequenceInfo * @param {Entity} this - no description * @returns {void} **/ ResetSequenceInfo(this: Entity): void /** * * Plays an animation on the entity. This may not always work on engine entities. * * @name EntityFuncs:ResetSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ResetSequence * @note This will not work properly if called directly after calling @EntityFuncs:SetModel. Consider waiting until the next Tick. * Will not work on players due to the animations being reset every frame by the base gamemode animation system. See @GamemodeHooks:CalcMainActivity. * For custom scripted entities you will want to apply example from @EntityHooks:Think to make animations work. * @note If set to a string, the function will automatically call @EntityFuncs:LookupSequence to retrieve the sequence ID as a number. * @warning This will not reset the animation on viewmodels, use @EntityFuncs:SendViewModelMatchingSequence instead. * @param {Entity} this - no description * @param {number} sequence - The sequence to play. Also accepts strings. * @returns {void} **/ ResetSequence(this: Entity, sequence: number): void /** * * Removes solid flag(s) from the entity. * * @name EntityFuncs:RemoveSolidFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveSolidFlags * @param {Entity} this - no description * @param {FSOLID} flags - The flag(s) to remove, see @FSOLID enum. * @returns {void} **/ RemoveSolidFlags(this: Entity, flags: FSOLID): void /** * * Removes and stops the gesture with given activity. * * @name EntityFuncs:RemoveGesture * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveGesture * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {ACT} activity - The activity remove. See @ACT enum. * @returns {void} **/ RemoveGesture(this: Entity, activity: ACT): void /** * * Removes a @PhysObj typeect from the entity's motion controller so that @EntityHooks:PhysicsSimulate will no longer be called for given @PhysObj typeect. * You must first create a motion controller with @EntityFuncs:StartMotionController. * * @name EntityFuncs:RemoveFromMotionController * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveFromMotionController * @note Only works on a scripted @Entity type of anim type * @param {Entity} this - no description * @param {PhysObj} physObj - The @PhysObj type to remove from the motion controller. * @returns {void} **/ RemoveFromMotionController(this: Entity, physObj: PhysObj): void /** * * Removes specified flag(s) from the entity * * @name EntityFuncs:RemoveFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveFlags * @param {Entity} this - no description * @param {FL} flag - The flag(s) to remove, see @FL enum * @returns {void} **/ RemoveFlags(this: Entity, flag: FL): void /** * * Removes specified engine flag * * @name EntityFuncs:RemoveEFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveEFlags * @param {Entity} this - no description * @param {EFL} flag - The flag to remove, see @EFL enum * @returns {void} **/ RemoveEFlags(this: Entity, flag: EFL): void /** * * Removes an engine effect applied to an entity. * * @name EntityFuncs:RemoveEffects * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveEffects * @param {Entity} this - no description * @param {EF} effect - The effect to remove, see @EF enum. * @returns {void} **/ RemoveEffects(this: Entity, effect: EF): void /** * * Removes a function previously added via @EntityFuncs:CallOnRemove. * * @name EntityFuncs:RemoveCallOnRemove * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveCallOnRemove * @param {Entity} this - no description * @param {string} identifier - Identifier of the function within CallOnRemove * @returns {void} **/ RemoveCallOnRemove(this: Entity, identifier: string): void /** * * Removes a callback previously added with @EntityFuncs:AddCallback * * @name EntityFuncs:RemoveCallback * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveCallback * @param {Entity} this - no description * @param {string} hook - The hook name to remove. See [Entity Callbacks](https://wiki.garrysmod.com/page/Entity%20Callbacks) * @param {number} callbackid - The callback id previously retrieved with the return of @EntityFuncs:AddCallback or @EntityFuncs:GetCallbacks * @returns {void} **/ RemoveCallback(this: Entity, hook: string, callbackid: number): void /** * * Removes and stops all gestures. * * @name EntityFuncs:RemoveAllGestures * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveAllGestures * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @returns {void} **/ RemoveAllGestures(this: Entity): void /** * * Removes all decals from the entities surface. * * @name EntityFuncs:RemoveAllDecals * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/RemoveAllDecals * @param {Entity} this - no description * @returns {void} **/ RemoveAllDecals(this: Entity): void /** * * Removes the entity it is used on. * * @name EntityFuncs:Remove * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/Remove * @param {Entity} this - no description * @returns {void} **/ Remove(this: Entity): void /** * * Makes the physics objects follow the set bone positions. This is used alongside Kinect in @EntityFuncs:SetRagdollBuildFunction, for more info see ragdoll_motion entity. * * @name EntityFuncs:RagdollUpdatePhysics * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/RagdollUpdatePhysics * @param {Entity} this - no description * @returns {void} **/ RagdollUpdatePhysics(this: Entity): void /** * * Sets the function to build the ragdoll. This is used alongside Kinect in @EntityFuncs:SetRagdollBuildFunction, for more info see ragdoll_motion entity. * * @name EntityFuncs:RagdollStopControlling * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/RagdollStopControlling * @param {Entity} this - no description * @returns {void} **/ RagdollStopControlling(this: Entity): void /** * * Normalizes the ragdoll. This is used alongside Kinect in @EntityFuncs:SetRagdollBuildFunction, for more info see ragdoll_motion entity. * * @name EntityFuncs:RagdollSolve * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/RagdollSolve * @param {Entity} this - no description * @returns {void} **/ RagdollSolve(this: Entity): void /** * * Precaches gibs for the entity's model. * Normally this function should be ran when the entity is spawned, for example the @EntityHooks:Initialize, after @EntityFuncs:SetModel is called. * This is required for @EntityFuncs:GibBreakServer and @EntityFuncs:GibBreakClient to work. * * @name EntityFuncs:PrecacheGibs * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/PrecacheGibs * @param {Entity} this - no description * @returns {void} **/ PrecacheGibs(this: Entity): void /** * * Changes an entities angles so that it faces the target entity. * * @name EntityFuncs:PointAtEntity * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/PointAtEntity * @param {Entity} this - no description * @param {Entity} target - The entity to face. * @returns {void} **/ PointAtEntity(this: Entity, target: Entity): void /** * * Makes the entity play a .vcd scene. * * @name EntityFuncs:PlayScene * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/PlayScene * @param {Entity} this - no description * @param {string} scene - Filepath to scene * @param {number} delay - Delay in seconds until the scene starts playing. * @returns {void} **/ PlayScene(this: Entity, scene: string, delay?: number): void /** * * Wakes up the entity's physics object * * @name EntityFuncs:PhysWake * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysWake * @param {Entity} this - no description * @returns {void} **/ PhysWake(this: Entity): void /** * * Initializes a static physics object of the entity using its [current model](https://wiki.garrysmod.com/page/Entity/GetModel). If successful, the previous physics object is removed. * This is what used by entities such as func_breakable, prop_dynamic, item_suitcharger, prop_thumper and npc_rollermine while it is in its "buried" state in the Half-Life 2 Campaign. * If the entity's current model has no physics mesh associated to it, no physics object will be created. * * @name EntityFuncs:PhysicsInitStatic * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsInitStatic * @note This function will automatically call @EntityFuncs:SetSolid( solidType ). * @bug Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior. * @param {Entity} this - no description * @param {SOLID} solidType - The solid type of the physics object to create, see @SOLID enum. Should be SOLID_VPHYSICS in most cases. * @returns {boolean} - Returns true on success, false otherwise. This will fail if the entity's current model has no associated physics mesh. **/ PhysicsInitStatic(this: Entity, solidType: SOLID): boolean /** * * Makes the physics object of the entity a sphere. * * @name EntityFuncs:PhysicsInitSphere * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsInitSphere * @note This function will automatically destroy any previous physics objects and call @EntityFuncs:SetSolid( SOLID_BBOX ) and @EntityFuncs:SetMoveType( MOVETYPE_VPHYSICS ). * @bug Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior. * @param {Entity} this - no description * @param {number} radius - The radius of the sphere. * @param {string} physmat - Physical material from [surfaceproperties.txt](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/scripts/surfaceproperties.txt) or added with @physenv.AddSurfaceData. * @returns {boolean} - Returns true on success, false otherwise **/ PhysicsInitSphere(this: Entity, radius: number, physmat: string): boolean /** * * Initializes the entity's physics object as a physics shadow. Removes the previous physics object if successful. This is used internally for the Player's and NPC's physics object, and certain HL2 entities such as the crane. * A physics shadow can be used to have static entities that never move by setting both arguments to false. * * @name EntityFuncs:PhysicsInitShadow * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsInitShadow * @bug Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior. * @param {Entity} this - no description * @param {boolean} allowPhysicsMovement - Whether to allow the physics shadow to move under stress. * @param {boolean} allowPhysicsRotation - Whether to allow the physics shadow to rotate under stress. * @returns {boolean} - Return true on success, nil otherwise. **/ PhysicsInitShadow(this: Entity, allowPhysicsMovement?: boolean, allowPhysicsRotation?: boolean): boolean /** * * An advanced version of @EntityFuncs:PhysicsInitConvex which initializes a physics object from multiple convex meshes. This should be used for physics objects with a custom shape which cannot be represented by a single convex mesh. * If successful, the previous physics object will be removed. * * @name EntityFuncs:PhysicsInitMultiConvex * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsInitMultiConvex * @bug Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior. * You can use the following work-around for movement, though clientside collisions will still be broken. * ``` * function ENT:Think() * if ( CLIENT ) then * local physobj = self:GetPhysicsObject() * if ( IsValid( physobj ) ) then * physobj:SetPos( self:GetPos() ) * physobj:SetAngles( self:GetAngles() ) * end * end * end * ``` * @param {Entity} this - no description * @param {table} vertices - A table consisting of tables of @Vector types. Each sub-table defines a set of points to be used in the computation of one convex mesh. * @returns {boolean} - Returns true on success, nil otherwise **/ PhysicsInitMultiConvex(this: Entity, vertices: table): boolean /** * * Initializes the physics mesh of the entity with a convex mesh defined by a table of points. The resulting mesh is the [convex hull](https://en.wikipedia.org/wiki/Convex%20hull) of all the input points. If successful, the previous physics object will be removed. * This is the standard way of creating moving physics objects with a custom convex shape. For more complex, concave shapes, see @EntityFuncs:PhysicsInitMultiConvex. * * @name EntityFuncs:PhysicsInitConvex * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsInitConvex * @bug #3301 This will crash if given all @Vector function(0,0,0)s. * @bug Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior. * @param {Entity} this - no description * @param {Vector[]} points - A table of eight @Vector types, in local coordinates, to be used in the computation of the convex mesh. Order does not matter. * @returns {boolean} - Returns true on success, nil otherwise. **/ PhysicsInitConvex(this: Entity, points: Vector[]): boolean /** * * Makes the physics object of the entity a AABB. * * @name EntityFuncs:PhysicsInitBox * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsInitBox * @note If the volume of the resulting box is 0 (the mins and maxs are the same), the mins and maxs will be changed to @Vector function( -1, -1, -1 ) and @Vector function( 1, 1, 1 ), respectively. * @note This function will automatically destroy any previous physics objects if successful and call @EntityFuncs:SetSolid( SOLID_BBOX ), @EntityFuncs:SetMoveType( MOVETYPE_VPHYSICS ), and @EntityFuncs:SetCollisionBounds( mins, maxs ). * @bug Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior. * @param {Entity} this - no description * @param {Vector} mins - The minimum position of the box. This is automatically ordered with the maxs. * @param {Vector} maxs - The maximum position of the box. This is automatically ordered with the mins. * @returns {boolean} - Returns true on success, nil otherwise. This fails when the game cannot create any more @PhysCollide types. **/ PhysicsInitBox(this: Entity, mins: Vector, maxs: Vector): boolean /** * * Initializes the [physics object](https://wiki.garrysmod.com/page/Entity/GetPhysicsObject) of the entity using its current [model](https://wiki.garrysmod.com/page/Entity/GetModel). Deletes the previous physics object if it existed and the new object creation was successful. * If the entity's current model has no physics mesh associated to it, no physics object will be created and the previous object will still exist, if applicable. * * @name EntityFuncs:PhysicsInit * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsInit * @note When called clientside, this will not create a valid @PhysObj type if the model hasn't been [precached](https://wiki.garrysmod.com/page/util/PrecacheModel) serverside. * @note If successful, this function will automatically call @EntityFuncs:SetSolid( solidType ) and @EntityFuncs:SetSolidFlags( 0 ). * @note Using SOLID_NONE will only delete the current physics object - it does not create a new one. * @bug Clientside physics objects are broken and do not move properly in some cases. Physics objects should only created on the server or you will experience incorrect physgun beam position, prediction issues, and other unexpected behavior. * @param {Entity} this - no description * @param {SOLID} solidType - The solid type of the physics object to create, see @SOLID enum. Should be SOLID_VPHYSICS in most cases. * @returns {boolean} - Returns true on success, false otherwise. **/ PhysicsInit(this: Entity, solidType: SOLID): boolean /** * * Initializes the physics mesh of the entity from a triangle soup defined by a table of vertices. The resulting mesh is hollow, may contain holes, and always has a volume of 0. * While this is very useful for static geometry such as terrain displacements, it is advised to use @EntityFuncs:PhysicsInitConvex or @EntityFuncs:PhysicsInitMultiConvex for moving solid objects instead. * @EntityFuncs:EnableCustomCollisions needs to be called if you want players to collide with the entity correctly. * * @name EntityFuncs:PhysicsFromMesh * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsFromMesh * @param {Entity} this - no description * @param {MeshVertex} vertices - A table consisting of @MeshVertex structure (only the *pos* element is taken into account). Every 3 vertices define a triangle in the physics mesh. * @returns {boolean} - Returns true on success, nil otherwise. **/ PhysicsFromMesh(this: Entity, vertices: MeshVertex): boolean /** * * Destroys the current physics object of an entity. * * @name EntityFuncs:PhysicsDestroy * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/PhysicsDestroy * @note Cannot be used on a ragdoll or the world entity. * @param {Entity} this - no description * @returns {void} **/ PhysicsDestroy(this: Entity): void /** * * Tests whether the entity passes the entity filter. * This will call @EntityHooks:PassesFilter on scripted entities of the type "filter". * * @name EntityFuncs:PassesFilter * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/PassesFilter * @note This function only works on entities of the type "filter". ( filter_* entities, including base game filter entites ) * @param {Entity} this - no description * @param {Entity} caller - The initiator of the test. * For example the trigger this filter entity is used in. * @param {Entity} ent - The entity to test against the entity filter. * @returns {boolean} - Whether the entity info passes the entity filter. **/ PassesFilter(this: Entity, caller: Entity, ent: Entity): boolean /** * * Tests whether the damage passes the entity filter. * This will call @EntityHooks:PassesDamageFilter on scripted entities of the type "filter". * * @name EntityFuncs:PassesDamageFilter * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/PassesDamageFilter * @note This function only works on entities of the type "filter". ( filter_* entities, including base game filter entites ) * @param {Entity} this - no description * @param {CTakeDamageInfo} dmg - The damage info to test * @returns {boolean} - Whether the damage info passes the entity filter. **/ PassesDamageFilter(this: Entity, dmg: CTakeDamageInfo): boolean /** * * Returns true if the entity is on the ground, and false if it isn't. * Internally, this checks if [FL_ONGROUND](https://wiki.garrysmod.com/page/Enums/FL) is set on the entity. This is only updated for players and NPCs, and thus won't inherently work for other entities. * * @name EntityFuncs:OnGround * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/OnGround * @param {Entity} this - no description * @returns {boolean} - Whether the entity is on the ground or not. **/ OnGround(this: Entity): boolean /** * * Returns the entity's capabilities as a bitfield. * In the engine this function is mostly used to check the use type, the save/restore system and level transitions flags. * Even though the function is defined shared, it is not guaranteed to return the same value across states. * * @name EntityFuncs:ObjectCaps * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ObjectCaps * @note The enums for this are not currently implemented in Lua, however you can access the defines [here](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/shared/baseentity_shared.h#L21-L38). * @param {Entity} this - no description * @returns {number} - The bitfield, a combination of the [FCAP_](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/shared/baseentity_shared.h#L21-L38) flags. **/ ObjectCaps(this: Entity): number /** * * Returns the lowest corner of an entity's bounding box as a local vector. * * @name EntityFuncs:OBBMins * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/OBBMins * @param {Entity} this - no description * @returns {Vector} - The local position of the lowest corner of the entity's oriented bounding box. **/ OBBMins(this: Entity): Vector /** * * Returns the highest corner of an entity's bounding box as a local vector. * * @name EntityFuncs:OBBMaxs * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/OBBMaxs * @param {Entity} this - no description * @returns {Vector} - The local position of the highest corner of the entity's oriented bounding box. **/ OBBMaxs(this: Entity): Vector /** * * Returns the center of an entity's bounding box as a local vector. * * @name EntityFuncs:OBBCenter * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/OBBCenter * @param {Entity} this - no description * @returns {Vector} - OBBCenter **/ OBBCenter(this: Entity): Vector /** * * In the case of a scripted entity, this will cause the next @EntityHooks:Think event to be run at the given time. * Does not work clientside! Use @EntityFuncs:SetNextClientThink instead. * * @name EntityFuncs:NextThink * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/NextThink * @bug #3269 This does not work with SWEPs or Nextbots. * @param {Entity} this - no description * @param {number} timestamp - The relative to @CurTime function timestamp, at which the next think should occur. * @returns {void} **/ NextThink(this: Entity, timestamp: number): void /** * * Creates a callback that will execute when the given network variable changes - that is, when the Set function is run. * * @name EntityFuncs:NetworkVarNotify * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/NetworkVarNotify * @note The callback is executed *before* the value is changed, and is called even if the new and old values are the same. * @note This function does not exist on entities in which @EntityFuncs:InstallDataTable has not been called. By default, this means this function only exists on SENTs (both serverside and clientside) and on players with a [Player Class](https://wiki.garrysmod.com/page/Player%20Classes) (serverside and clientside @LocalPlayer function only!). It is therefore safest to only use this in @EntityHooks:SetupDataTables. * @bug The callback will not be called clientside if the var is changed right after entity spawn. * @param {Entity} this - no description * @param {string} name - Name of variable to track changes of * @param {function} callback - The function to call when the variable changes. It is passed 4 arugments: * @returns {void} **/ NetworkVarNotify(this: Entity, name: string, callback: EntityFuncsNetworkVarNotifyCallback): void /** * * Creates a network variable on the entity and adds Set/Get functions for it. This function should only be called in @EntityHooks:SetupDataTables. * * @name EntityFuncs:NetworkVar * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/NetworkVar * @warning Make sure to not call the SetDT* and your custom set methods on the client realm unless you know exactly what you are doing. * @param {Entity} this - no description * @param {string} type - Supported choices: * * "String" * * "Bool" * * "Float" * * "Int" (32-bit signed integer) * * "Vector" * * "Angle" * * "Entity" * @param {number} slot - Each network var has to have a unique slot. The slot is per type - so you can have an int in slot 0, a bool in slot 0 and a float in slot 0 etc. but you can't have two ints in slot 0 instead you would do a int in slot 0 and another int in slot 1. * The max slots right now are 64 - so you should pick a number between 0 and 63. An exception to this is strings which has a max slots of 4. * @param {string} name - The name will affect how you access it. If you call it "Foo" you would add two new functions on your entity - SetFoo and GetFoo. So be careful that what you call it won't collide with any existing functions (don't call it "Pos" for example). * @param {table} extended - A table of extended information. * **KeyName** * If the table contains a "KeyName" key the value can be set using @EntityFuncs:SetKeyValue. This is useful if you're making an entity that you want to be loaded in a map. The sky entity uses this. * **Edit** * The edit key lets you mark this variable as editable. See [Editable Entities](https://wiki.garrysmod.com/page/Editable%20Entities) for more information. * @returns {void} **/ NetworkVar(this: Entity, type: string, slot: number, name: string, extended?: table): void /** * * Performs a Ray OBBox intersection from the given position to the origin of the OBBox with the entity and returns the hit position on the OBBox * * @name EntityFuncs:NearestPoint * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/NearestPoint * @param {Entity} this - no description * @param {Vector} position - The vector to start the intersection from. * @returns {Vector} - The nearest hit point of the entity's bounding box in world coordinates. **/ NearestPoint(this: Entity, position: Vector): Vector /** * * Fires the muzzle flash effect of the weapon the entity is carrying. This only creates a light effect and is often called alongside @WeaponFuncs:SendWeaponAnim * * @name EntityFuncs:MuzzleFlash * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/MuzzleFlash * @param {Entity} this - no description * @returns {void} **/ MuzzleFlash(this: Entity): void /** * * Refreshes the shadow of the entity. * * @name EntityFuncs:MarkShadowAsDirty * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/MarkShadowAsDirty * @param {Entity} this - no description * @returns {void} **/ MarkShadowAsDirty(this: Entity): void /** * * Returns entity's map creation ID. Unlike @EntityFuncs:EntIndex or @EntityFuncs:GetCreationID, it will always be the same on same map, no matter how much you clean up or restart it. * To be used in conjunction with @ents.GetMapCreatedEntity. * * @name EntityFuncs:MapCreationID * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/MapCreationID * @param {Entity} this - no description * @returns {number} - The map creation ID or -1 if the entity is not compiled into the map. **/ MapCreationID(this: Entity): number /** * * Sets custom bone scale. * * @name EntityFuncs:ManipulateBoneScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ManipulateBoneScale * @warning When used serverside, this method produces a huge network consumption! * @bug #3502 This does not scale procedural bones. * @bug #1249 The vector will be normalised if its longer than 32 units. * @param {Entity} this - no description * @param {number} boneID - Index of the bone you want to manipulate * @param {Vector} scale - Scale vector to apply. Note that the scale is relative to the original bone scale, not relative to the world or the entity. * @returns {void} **/ ManipulateBoneScale(this: Entity, boneID: number, scale: Vector): void /** * * Sets custom bone offsets. * * @name EntityFuncs:ManipulateBonePosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ManipulateBonePosition * @param {Entity} this - no description * @param {number} boneID - Index of the bone you want to manipulate * @param {Vector} pos - Position vector to apply * Note that the position is relative to the original bone position, not relative to the world or the entity. * @returns {void} **/ ManipulateBonePosition(this: Entity, boneID: number, pos: Vector): void /** * * Manipulates the bone's jiggle status. This allows non jiggly bones to become jiggly. * * @name EntityFuncs:ManipulateBoneJiggle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ManipulateBoneJiggle * @param {Entity} this - no description * @param {number} boneID - Index of the bone you want to manipulate. * @param {number} enabled - 0 = No Jiggle * 1 = Jiggle * @returns {void} **/ ManipulateBoneJiggle(this: Entity, boneID: number, enabled: number): void /** * * Sets custom bone angles. * * @name EntityFuncs:ManipulateBoneAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ManipulateBoneAngles * @note The repeated use of bone manipulation in multiplayer games is highly discouraged due to the huge produced network traffic. * @param {Entity} this - no description * @param {number} boneID - Index of the bone you want to manipulate * @param {Angle} ang - Angle to apply. * The angle is relative to the original bone angle, not relative to the world or the entity. * @returns {void} **/ ManipulateBoneAngles(this: Entity, boneID: number, ang: Angle): void /** * * Turns the @EntityFuncs:GetPhysicsObject into a physics shadow. * It's used internally for the Player's and NPC's physics object, and certain HL2 entities such as the crane. * A physics shadow can be used to have static entities that never move by setting both arguments to false. * * @name EntityFuncs:MakePhysicsObjectAShadow * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/MakePhysicsObjectAShadow * @note Unlike @EntityFuncs:PhysicsInitShadow, this function doesn't remove the current physics object. * @param {Entity} this - no description * @param {boolean} allowPhysicsMovement - Whether to allow the physics shadow to move under stress. * @param {boolean} allowPhysicsRotation - Whether to allow the physics shadow to rotate under stress. * @returns {void} **/ MakePhysicsObjectAShadow(this: Entity, allowPhysicsMovement: boolean, allowPhysicsRotation: boolean): void /** * * Returns sequence ID from its name. * * @name EntityFuncs:LookupSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/LookupSequence * @param {Entity} this - no description * @param {string} name - Sequence name * @returns {number} - Sequence ID for that name. This **will** differ for models with same sequence names. Will be -1 whether the sequence is invalid. * @returns {number} - The sequence duration * * 0 if the sequence is invalid * @tupleReturn **/ LookupSequence(this: Entity, name: string): [number, number] /** * * Gets the bone index of the given bone name, returns nothing if the bone does not exist. * * @name EntityFuncs:LookupBone * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/LookupBone * @param {Entity} this - no description * @param {string} boneName - The name of the bone. * Common generic bones ( for player models and some HL2 models ): * * ValveBiped.Bip01_Head1 * * ValveBiped.Bip01_Spine * * ValveBiped.Anim_Attachment_RH * Common hand bones (left hand equivalents also available, replace _R_ with _L_) * * ValveBiped.Bip01_R_Hand * * ValveBiped.Bip01_R_Forearm * * ValveBiped.Bip01_R_Foot * * ValveBiped.Bip01_R_Thigh * * ValveBiped.Bip01_R_Calf * * ValveBiped.Bip01_R_Shoulder * * ValveBiped.Bip01_R_Elbow * @returns {number} - Index of the given bone name **/ LookupBone(this: Entity, boneName: string): number /** * * Returns the attachment index of the given attachment name. * * @name EntityFuncs:LookupAttachment * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/LookupAttachment * @param {Entity} this - no description * @param {string} attachmentName - The name of the attachment. * @returns {number} - The attachment index, or 0 if the attachment does not exist and -1 if the model is invalid. **/ LookupAttachment(this: Entity, attachmentName: string): number /** * * Converts a local angle (local to the entity) to a world angle. * * @name EntityFuncs:LocalToWorldAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/LocalToWorldAngles * @param {Entity} this - no description * @param {Angle} ang - The local angle * @returns {Angle} - The world angle **/ LocalToWorldAngles(this: Entity, ang: Angle): Angle /** * * Converts a vector local to an entity into a worldspace vector * * @name EntityFuncs:LocalToWorld * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/LocalToWorld * @param {Entity} this - no description * @param {Vector} lpos - The local vector * @returns {Vector} - The translated to world coordinates vector **/ LocalToWorld(this: Entity, lpos: Vector): Vector /** * * Returns if the entity is the map's Entity[0] worldspawn * * @name EntityFuncs:IsWorld * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsWorld * @param {Entity} this - no description * @returns {boolean} - isWorld **/ IsWorld(this: Entity): boolean /** * * Returns whether the entity is a widget or not. * This is used by the "Edit Bones" context menu property. * * @name EntityFuncs:IsWidget * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsWidget * @param {Entity} this - no description * @returns {boolean} - Whether the entity is a widget or not. **/ IsWidget(this: Entity): boolean /** * * Checks if the entity is a weapon or not. * * @name EntityFuncs:IsWeapon * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsWeapon * @param {Entity} this - no description * @returns {boolean} - Whether the entity is a weapon **/ IsWeapon(this: Entity): boolean /** * * Checks if the entity is a vehicle or not. * * @name EntityFuncs:IsVehicle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsVehicle * @param {Entity} this - no description * @returns {boolean} - Whether the entity is a vehicle. **/ IsVehicle(this: Entity): boolean /** * * Returns whether the given layer ID is valid and exists on this entity. * * @name EntityFuncs:IsValidLayer * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/IsValidLayer * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @returns {boolean} - Whether the given layer ID is valid and exists on this entity. **/ IsValidLayer(this: Entity, layerID: number): boolean /** * * Returns whether the entity is a valid entity or not. * An entity is valid if: * * It is not a [NULL](https://wiki.garrysmod.com/page/Global_Variables) entity * * It is not the worldspawn entity (@game.GetWorld) * Instead of calling this method directly, it's a good idea to call the global @IsValid function instead.It will check whether the given variable contains an object (an Entity) or nothing at all for you. See examples. * This might be a cause for a lot of headache. Usually happening during networking etc., when completely valid entities suddenly become invalid on the client, but are never filtered with IsValid(). See @GamemodeHooks:InitPostEntity for more details. * * @name EntityFuncs:IsValid * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsValid * @warning NULL entities can still be assigned with key/value pairs, but they will be instantly negated. See example 3 * @param {Entity} this - no description * @returns {boolean} - true if the entity is valid, false otherwise **/ IsValid(this: Entity): boolean /** * * Returns if the entity is solid or not. * Very useful for determining if the entity is a trigger or not. * * @name EntityFuncs:IsSolid * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsSolid * @param {Entity} this - no description * @returns {boolean} - Whether the entity is solid or not. **/ IsSolid(this: Entity): boolean /** * * Checks if the entity is a SENT or a built-in entity. * * @name EntityFuncs:IsScripted * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsScripted * @param {Entity} this - no description * @returns {boolean} - Returns true if entity is scripted ( SENT ), false if not ( A built-in engine entity ) **/ IsScripted(this: Entity): boolean /** * * Checks if the entity is a ragdoll. * * @name EntityFuncs:IsRagdoll * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsRagdoll * @param {Entity} this - no description * @returns {boolean} - Is ragdoll or not **/ IsRagdoll(this: Entity): boolean /** * * Returns whether there's a gesture is given activity being played. * * @name EntityFuncs:IsPlayingGesture * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/IsPlayingGesture * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {ACT} activity - The activity to test. See @ACT enum. * @returns {boolean} - Whether there's a gesture is given activity being played. **/ IsPlayingGesture(this: Entity, activity: ACT): boolean /** * * Returns whether the entity is on ground or not. * Internally, this checks if [FL_ONGROUND](https://wiki.garrysmod.com/page/Enums/FL) is set on the entity. * This function is an alias of @EntityFuncs:OnGround. * * @name EntityFuncs:IsOnGround * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsOnGround * @param {Entity} this - no description * @returns {boolean} - Whether the entity is on ground or not. **/ IsOnGround(this: Entity): boolean /** * * Checks if the entity is a player or not. * * @name EntityFuncs:IsPlayer * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsPlayer * @param {Entity} this - no description * @returns {boolean} - Whether the entity is a player. **/ IsPlayer(this: Entity): boolean /** * * Returns whether the entity is on fire. * * @name EntityFuncs:IsOnFire * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsOnFire * @param {Entity} this - no description * @returns {boolean} - Whether the entity is on fire or not. **/ IsOnFire(this: Entity): boolean /** * * Checks if the entity is an NPC or not. * This will return false for @NextBot types. * * @name EntityFuncs:IsNPC * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsNPC * @param {Entity} this - no description * @returns {boolean} - Whether the entity is an NPC. **/ IsNPC(this: Entity): boolean /** * * Returns true if the target is in line of sight. This will only work on CBaseCombatCharacter entities. * * @name EntityFuncs:IsLineOfSightClear * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsLineOfSightClear * @param {Entity} this - no description * @param {Entity | Vector} target - The target to test. You can also supply an @Entity type instead of a @Vector type * @returns {boolean} - Returns true if the line of sight is clear **/ IsLineOfSightClear(this: Entity, target: Entity | Vector): boolean /** * * Returns if the entity is going to be deleted in the next frame. * * @name EntityFuncs:IsMarkedForDeletion * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsMarkedForDeletion * @param {Entity} this - no description * @returns {boolean} - If the entity is going to be deleted. **/ IsMarkedForDeletion(this: Entity): boolean /** * * Returns whether the entity is lag compensated or not. * * @name EntityFuncs:IsLagCompensated * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/IsLagCompensated * @param {Entity} this - no description * @returns {boolean} - Whether the entity is lag compensated or not. **/ IsLagCompensated(this: Entity): boolean /** * * Checks if given flag(s) is set or not. * * @name EntityFuncs:IsFlagSet * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsFlagSet * @param {Entity} this - no description * @param {FL} flag - The engine flag(s) to test, see @FL enum * @returns {boolean} - Is set or not **/ IsFlagSet(this: Entity, flag: FL): boolean /** * * Checks if given flag is set or not. * * @name EntityFuncs:IsEFlagSet * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsEFlagSet * @param {Entity} this - no description * @param {EFL} flag - The engine flag to test, see @EFL enum * @returns {boolean} - Is set or not **/ IsEFlagSet(this: Entity, flag: EFL): boolean /** * * Returns whether an entity has engine effect applied or not. * * @name EntityFuncs:IsEffectActive * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsEffectActive * @param {Entity} this - no description * @param {EF} effect - The effect to check for, see @EF enum. * @returns {boolean} - Whether the entity has the engine effect applied or not. **/ IsEffectActive(this: Entity, effect: EF): boolean /** * * Returns whether the entity is dormant or not. Client/server entities become dormant when they leave the PVS on the server. Client side entities can decide for themselves whether to become dormant. This mainly applies to PVS. * * @name EntityFuncs:IsDormant * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsDormant * @param {Entity} this - no description * @returns {boolean} - Whether the entity is dormant or not. **/ IsDormant(this: Entity): boolean /** * * Returns if entity is constraint or not * * @name EntityFuncs:IsConstraint * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/IsConstraint * @param {Entity} this - no description * @returns {boolean} - Is the entity a constraint or not **/ IsConstraint(this: Entity): boolean /** * * Returns true if the entity has constraints attached to it * * @name EntityFuncs:IsConstrained * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/IsConstrained * @bug #3837 This will only update clientside if the server calls it first. This only checks constraints added through the @constraint library so this will not react to map constraints. * @param {Entity} this - no description * @returns {boolean} - Whether the entity is constrained or not. **/ IsConstrained(this: Entity): boolean /** * * Resets the entity's bone cache values in order to prepare for a model change. * This should be called after calling @EntityFuncs:SetPoseParameter. * * @name EntityFuncs:InvalidateBoneCache * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/InvalidateBoneCache * @param {Entity} this - no description * @returns {void} **/ InvalidateBoneCache(this: Entity): void /** * * Sets up Data Tables from entity to use with @EntityFuncs:NetworkVar. * * @name EntityFuncs:InstallDataTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/InstallDataTable * @internal * @param {Entity} this - no description * @returns {void} **/ InstallDataTable(this: Entity): void /** * * Fires input to the entity with the ability to make another entity responsible. * See also @EntityFuncs:Fire and @GamemodeHooks:AcceptInput. * * @name EntityFuncs:Input * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Input * @param {Entity} this - no description * @param {string} input - The name of the input to fire * @param {Entity} activator - The entity that caused this input (EG the player who pushed a button) * @param {Entity} caller - The entity that is triggering this input (EG the button that was pushed) * @param {string | number | boolean} param - The value to give to the input. Can be either a @string type, a @number type or a @boolean type. * @returns {void} **/ Input(this: Entity, input: string, activator: Entity, caller: Entity, param?: string | number | boolean): void /** * * Initializes this entity as being clientside only. * Only works on entities fully created clientside, and as such it has currently no use due to the lack of clientside @ents.Create. * This function is automatically called by @ents.CreateClientProp and @ClientsideModel function, @ClientsideModel function and @ClientsideScene function. * * @name EntityFuncs:InitializeAsClientEntity * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/InitializeAsClientEntity * @bug #3368 Calling this on a clientside entity will crash the game. * @param {Entity} this - no description * @returns {void} **/ InitializeAsClientEntity(this: Entity): void /** * * Sets the entity on fire. * See also @EntityFuncs:Extinguish. * * @name EntityFuncs:Ignite * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Ignite * @param {Entity} this - no description * @param {number} length - How long to keep the entity ignited. Not supplying this argument will not ignite the entity at all. * @param {number} radius - The radius of the ignition, will ignite everything around the entity that is in this radius. * @returns {void} **/ Ignite(this: Entity, length: number, radius?: number): void /** * * Returns the health of the entity. * * @name EntityFuncs:Health * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/Health * @param {Entity} this - no description * @returns {number} - health **/ Health(this: Entity): number /** * * Returns the position of the head of this entity, NPCs use this internally to aim at their targets. * * @name EntityFuncs:HeadTarget * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/HeadTarget * @note This only works on players and NPCs. * @param {Entity} this - no description * @param {Vector} origin - The vector of where the attack comes from. * @returns {Vector} - The head position. **/ HeadTarget(this: Entity, origin: Vector): Vector /** * * Returns whether this entity has the specified spawnflags bits set. * * @name EntityFuncs:HasSpawnFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/HasSpawnFlags * @param {Entity} this - no description * @param {SF} spawnFlags - The spawnflag bits to check, see @SF enum. * @returns {boolean} - Whether the entity has that spawnflag set or not. **/ HasSpawnFlags(this: Entity, spawnFlags: SF): boolean /** * * Returns whether or not the the entity has had flex manipulations performed with @EntityFuncs:SetFlexWeight or @EntityFuncs:SetFlexScale. * * @name EntityFuncs:HasFlexManipulatior * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/HasFlexManipulatior * @param {Entity} this - no description * @returns {boolean} - True if the entity has flex manipulations, false otherwise. **/ HasFlexManipulatior(this: Entity): boolean /** * * Returns whether or not the bone manipulation functions have ever been called on given entity. * Related functions are @EntityFuncs:ManipulateBonePosition, @EntityFuncs:ManipulateBoneAngles, @EntityFuncs:ManipulateBoneJiggle, and @EntityFuncs:ManipulateBoneScale. * * @name EntityFuncs:HasBoneManipulations * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/HasBoneManipulations * @bug #3131 This will return true if the entity's bones have ever been manipulated. Resetting the position/angles/jiggle/scaling to 0,0,0 will not affect this function. * @param {Entity} this - no description * @returns {boolean} - True if the entity has been bone manipulated, false otherwise. **/ HasBoneManipulations(this: Entity): boolean /** * * Causes the entity to break into its current models gibs, if it has any. * You must call @EntityFuncs:PrecacheGibs on the entity before using this function, or it will not create any gibs. * The gibs will be spawned on the server and be synchronized with all clients. * Note, that this function will not remove or hide the entity it is called on. * * @name EntityFuncs:GibBreakServer * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GibBreakServer * @note Despite existing on client, it doesn't actually do anything on client. * @warning Large numbers of serverside gibs will cause lag. * You can avoid this cost by spawning the gibs on the client using @EntityFuncs:GibBreakClient * @param {Entity} this - no description * @param {Vector} force - The force to apply to the created gibs * @returns {void} **/ GibBreakServer(this: Entity, force: Vector): void /** * * Causes the entity to break into its current models gibs, if it has any. * You must call @EntityFuncs:PrecacheGibs on the entity before using this function, or it will not create any gibs. * If called on server, the gibs will be spawned on the currently connected clients and will not be synchronized. Otherwise the gibs will be spawned only for the client the function is called on. * Note, that this function will not remove or hide the entity it is called on. * For more expensive version of this function see @EntityFuncs:GibBreakServer. * * @name EntityFuncs:GibBreakClient * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GibBreakClient * @param {Entity} this - no description * @param {Vector} force - The force to apply to the created gibs. * @param {table} clr - If set, this will be color of the broken gibs instead of the entity's color. * @returns {void} **/ GibBreakClient(this: Entity, force: Vector, clr?: table): void /** * * Returns the position and angle of the entity as a 3x4 matrix (@VMatrix type is 4x4 so the fourth row goes unused). The first three columns store the angle as a [rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix), and the fourth column stores the position vector. * * @name EntityFuncs:GetWorldTransformMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetWorldTransformMatrix * @bug #2764 This returns incorrect results for the angular component (columns 1-3) for the local player clientside. * @bug #3106 This will use the local player's @EyeAngles function in [rendering hooks](http://wiki.garrysmod.com/page/Category:3D_Rendering_Hooks). * @bug #3107 Columns 1-3 will be all 0 (angular component) in [rendering hooks](http://wiki.garrysmod.com/page/Category:3D_Rendering_Hooks) while paused in single-player. * @param {Entity} this - no description * @returns {VMatrix} - The position and angle matrix. **/ GetWorldTransformMatrix(this: Entity): VMatrix /** * * Returns ID of workshop addon that the entity is from. * * @name EntityFuncs:GetWorkshopID * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetWorkshopID * @warning The function **currently** does nothing and always returns nil * @param {Entity} this - no description * @returns {number} - The workshop ID **/ GetWorkshopID(this: Entity): number /** * * Returns the entity's velocity. * * @name EntityFuncs:GetVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetVelocity * @note Actually binds to CBaseEntity::GetAbsVelocity() on the server and C_BaseEntity::EstimateAbsVelocity() on the client. This returns the total velocity of the entity and is equal to local velocity + base velocity. * @bug #774 This can become out-of-sync on the client if the server has been up for a long time. * @param {Entity} this - no description * @returns {Vector} - The velocity of the entity. **/ GetVelocity(this: Entity): Vector /** * * Retrieves a value from entity's @EntityFuncs:GetTable. Set by @EntityFuncs:SetVar. * * @name EntityFuncs:GetVar * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetVar * @param {Entity} this - no description * @param {any} key - Key of the value to retrieve * @param {any} def - A default value to fallback to if we couldn't retrieve the value from entity * @returns {any} - Retrieved value **/ GetVar(this: Entity, key: any, def?: any): any /** * * Returns the upward vector of the entity, as a normalized direction vector * * @name EntityFuncs:GetUp * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetUp * @param {Entity} this - no description * @returns {Vector} - upDir **/ GetUp(this: Entity): Vector /** * * Returns if the entity is unfreezable, meaning it can't be frozen with the physgun. By default props are freezable, so this function will typically return false. * * @name EntityFuncs:GetUnFreezable * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetUnFreezable * @bug This will return nil if @EntityFuncs:SetUnFreezable has not been called. * @param {Entity} this - no description * @returns {boolean} - True if the entity is unfreezable, false otherwise. **/ GetUnFreezable(this: Entity): boolean /** * * Returns true if the TransmitWithParent flag is set or not. * * @name EntityFuncs:GetTransmitWithParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetTransmitWithParent * @param {Entity} this - no description * @returns {boolean} - Is the TransmitWithParent flag is set or not **/ GetTransmitWithParent(this: Entity): boolean /** * * Returns the last trace used in the collision callbacks such as @EntityHooks:StartTouch, @EntityHooks:Touch and @EntityHooks:EndTouch. * * @name EntityFuncs:GetTouchTrace * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetTouchTrace * @note This returns the last collision trace used, regardless of the entity that caused it. As such, it's only reliable when used in the hooks mentioned above * @param {Entity} this - no description * @returns {TraceResult} - The @TraceResult structure **/ GetTouchTrace(this: Entity): TraceResult /** * * Returns the table that contains all values saved within the entity. * * @name EntityFuncs:GetTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetTable * @param {Entity} this - no description * @returns {table} - entTable **/ GetTable(this: Entity): table /** * * Returns a list of models included into the entity's model in the .qc file. * * @name EntityFuncs:GetSubModels * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSubModels * @param {Entity} this - no description * @returns {table} - The list of models included into the entity's model in the .qc file. **/ GetSubModels(this: Entity): table /** * * Returns the material override for the given index. * Returns "" if no material override exists. Use @EntityFuncs:GetMaterials to list it's default materials. * * @name EntityFuncs:GetSubMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSubMaterial * @bug #3362 The server's value takes priority on the client. * @param {Entity} this - no description * @param {number} index - The index of the sub material. Acceptable values are from 0 to 31. * @returns {string} - The material that overrides this index, if any. **/ GetSubMaterial(this: Entity, index: number): string /** * * Returns the bitwise spawn flags used by the entity. * * @name EntityFuncs:GetSpawnFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSpawnFlags * @param {Entity} this - no description * @returns {number} - The spawn flags of the entity, see [SF_Enums](https://wiki.garrysmod.com/page/Enums/SF). **/ GetSpawnFlags(this: Entity): number /** * * Returns if we should show a spawn effect on spawn on this entity. * * @name EntityFuncs:GetSpawnEffect * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSpawnEffect * @param {Entity} this - no description * @returns {boolean} - The flag to allow or disallow the spawn effect. **/ GetSpawnEffect(this: Entity): boolean /** * * Returns solid flag(s) of an entity. * * @name EntityFuncs:GetSolidFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSolidFlags * @param {Entity} this - no description * @returns {FSOLID} - The flag(s) of the entity, see @FSOLID enum. **/ GetSolidFlags(this: Entity): FSOLID /** * * Returns solid type of an entity. * * @name EntityFuncs:GetSolid * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSolid * @param {Entity} this - no description * @returns {SOLID} - The solid type. See the @SOLID enum. **/ GetSolid(this: Entity): SOLID /** * * Returns whether the entity is inside a wall or outside of the map. * * @name EntityFuncs:IsInWorld * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/IsInWorld * @note Internally this function uses @util.IsInWorld, that means that this function only checks @EntityFuncs:GetPos of the entity. If an entity is only partially inside a wall, or has a weird GetPos offset, this function may not give reliable output. * @param {Entity} this - no description * @returns {boolean} - Is the entity in world **/ IsInWorld(this: Entity): boolean /** * * Returns the skin index of the current skin. * * @name EntityFuncs:GetSkin * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSkin * @param {Entity} this - no description * @returns {number} - skinIndex **/ GetSkin(this: Entity): number /** * * Returns if entity should create a server ragdoll on death or a client one. * * @name EntityFuncs:GetShouldServerRagdoll * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetShouldServerRagdoll * @param {Entity} this - no description * @returns {boolean} - Returns true if ragdoll will be created on server, false if on client **/ GetShouldServerRagdoll(this: Entity): boolean /** * * Returns the change in heading direction in between the start and the end of the sequence. * * @name EntityFuncs:GetSequenceMoveYaw * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceMoveYaw * @param {Entity} this - no description * @param {number} seq - The sequence index. See @EntityFuncs:LookupSequence. * @returns {number} - The yaw delta. Returns 99999 for no movement. **/ GetSequenceMoveYaw(this: Entity, seq: number): number /** * * Checks if the entity plays a sound when picked up by a player. * * @name EntityFuncs:GetShouldPlayPickupSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetShouldPlayPickupSound * @bug This will return nil if @EntityFuncs:SetShouldPlayPickupSound has not been called. * @param {Entity} this - no description * @returns {boolean} - True if it plays the pickup sound, false otherwise. **/ GetShouldPlayPickupSound(this: Entity): boolean /** * * Return the name of the sequence for the index provided. * Refer to @EntityFuncs:GetSequence to find the current active sequence on this entity. * * @name EntityFuncs:GetSequenceName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceName * @param {Entity} this - no description * @param {number} index - The index of the sequence to look up. * @returns {string} - Name of the sequence. **/ GetSequenceName(this: Entity, index: number): string /** * * Returns the delta movement and angles of a sequence of the entity's model. * * @name EntityFuncs:GetSequenceMovement * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceMovement * @param {Entity} this - no description * @param {number} sequenceId - The sequence index. See @EntityFuncs:GetSequenceName. * @param {number} startCycle - The sequence start cycle. 0 is the start of the animation, 1 is the end. * @param {number} endCyclnde - The sequence end cycle. 0 is the start of the animation, 1 is the end. Values like 2, etc are allowed. * @returns {boolean} - Whether the operation was successful * @returns {Vector} - The delta vector of the animation, how much the model's origin point moved. * @returns {Angle} - The delta angle of the animation. * @tupleReturn **/ GetSequenceMovement(this: Entity, sequenceId: number, startCycle: number, endCyclnde: number): [boolean, Vector, Angle] /** * * Returns an entity's sequence move distance (the change in position over the course of the entire sequence). * * @name EntityFuncs:GetSequenceMoveDist * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceMoveDist * @param {Entity} this - no description * @param {number} sequenceId - The sequence index. * @returns {number} - The move distance of the sequence. **/ GetSequenceMoveDist(this: Entity, sequenceId: number): number /** * * Returns a list of all sequences ( animations ) the model has. * * @name EntityFuncs:GetSequenceList * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceList * @param {Entity} this - no description * @returns {table} - The list of all sequences ( animations ) the model has. The indices start with 0! **/ GetSequenceList(this: Entity): table /** * * Returns the ground speed of the entity's sequence. * * @name EntityFuncs:GetSequenceGroundSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceGroundSpeed * @note In most cases it's better to use @NextBot:BodyMoveXY instead. * @param {Entity} this - no description * @param {number} sequenceId - The sequence ID. * @returns {number} - The ground speed of this sequence. **/ GetSequenceGroundSpeed(this: Entity, sequenceId: number): number /** * * Returns the amount of sequences ( animations ) the entity's model has. * * @name EntityFuncs:GetSequenceCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceCount * @param {Entity} this - no description * @returns {number} - The amount of sequences ( animations ) the entity's model has. **/ GetSequenceCount(this: Entity): number /** * * Returns a table of information about an entity's sequence. * * @name EntityFuncs:GetSequenceInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceInfo * @param {Entity} this - no description * @param {number} sequenceId - The sequence id of the entity. * @returns {SequenceInfo[]} - Table of information about the entity's sequence, or nil is ID is out of range. See @SequenceInfo structure **/ GetSequenceInfo(this: Entity, sequenceId: number): SequenceInfo[] /** * * Return the index of the model sequence that is currently active for the entity. * * @name EntityFuncs:GetSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequence * @param {Entity} this - no description * @returns {number} - The index of the model sequence. **/ GetSequence(this: Entity): number /** * * Return activity id out of sequence id. Opposite of @EntityFuncs:SelectWeightedSequence. * * @name EntityFuncs:GetSequenceActivity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceActivity * @param {Entity} this - no description * @param {number} seq - The sequence ID * @returns {ACT} - The activity ID, ie @ACT enum **/ GetSequenceActivity(this: Entity, seq: number): ACT /** * * Returns the activity name for the given sequence id. * * @name EntityFuncs:GetSequenceActivityName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSequenceActivityName * @param {Entity} this - no description * @param {number} sequenceId - The sequence id. * @returns {string} - The @ACT enum as a string, returns "Not Found!" with an invalid sequence and "No model!" when no model is set. **/ GetSequenceActivityName(this: Entity, sequenceId: number): string /** * * Returns a table of save values for an entity. * These tables are not the same between the client and the server, and different entities may have different fields. * You can get the list different fields an entity has by looking at it's source code ( the 2013 SDK can be found online, https://github.com/ValveSoftware/source-sdk-2013 ). Accessible fields are defined by each DEFINE_FIELD and DEFINE_KEYFIELD inside the DATADESC block. * Take the headcrab, for example: * ```BEGIN_DATADESC( CBaseHeadcrab ) * // m_nGibCount - don't save * DEFINE_FIELD( m_bHidden, FIELD_BOOLEAN ), * DEFINE_FIELD( m_flTimeDrown, FIELD_TIME ), * DEFINE_FIELD( m_bCommittedToJump, FIELD_BOOLEAN ), * DEFINE_FIELD( m_vecCommittedJumpPos, FIELD_POSITION_VECTOR ), * DEFINE_FIELD( m_flNextNPCThink, FIELD_TIME ), * DEFINE_FIELD( m_flIgnoreWorldCollisionTime, FIELD_TIME ), * DEFINE_KEYFIELD( m_bStartBurrowed, FIELD_BOOLEAN, "startburrowed" ), * DEFINE_FIELD( m_bBurrowed, FIELD_BOOLEAN ), * DEFINE_FIELD( m_flBurrowTime, FIELD_TIME ), * DEFINE_FIELD( m_nContext, FIELD_INTEGER ), * DEFINE_FIELD( m_bCrawlFromCanister, FIELD_BOOLEAN ), * DEFINE_FIELD( m_bMidJump, FIELD_BOOLEAN ), * DEFINE_FIELD( m_nJumpFromCanisterDir, FIELD_INTEGER ), * DEFINE_FIELD( m_bHangingFromCeiling, FIELD_BOOLEAN ), * DEFINE_FIELD( m_flIlluminatedTime, FIELD_TIME ), * DEFINE_INPUTFUNC( FIELD_VOID, "Burrow", InputBurrow ), * DEFINE_INPUTFUNC( FIELD_VOID, "BurrowImmediate", InputBurrowImmediate ), * DEFINE_INPUTFUNC( FIELD_VOID, "Unburrow", InputUnburrow ), * DEFINE_INPUTFUNC( FIELD_VOID, "StartHangingFromCeiling", InputStartHangingFromCeiling ), * DEFINE_INPUTFUNC( FIELD_VOID, "DropFromCeiling", InputDropFromCeiling ), * // Function Pointers * DEFINE_THINKFUNC( EliminateRollAndPitch ), * DEFINE_THINKFUNC( ThrowThink ), * DEFINE_ENTITYFUNC( LeapTouch ), * END_DATADESC() * ``` * For each **DEFINE_FIELD**, the save table will have a key with name of **first** argument. * For each **DEFINE_KEYFIELD**, the save table will have a key with name of the **third** argument. * See @EntityFuncs:GetInternalVariable for only retrieving one key of the save table. * * @name EntityFuncs:GetSaveTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetSaveTable * @param {Entity} this - no description * @param {boolean} showAll - If set, shows all variables, not just the ones for save. * @returns {table} - A table containing all save values in key/value format. * The value may be a sequential table (starting with 1) if the field in question is an array in engine. **/ GetSaveTable(this: Entity, showAll: boolean): table /** * * Returns the min and max of the entity's axis-aligned bounding box. * * @name EntityFuncs:GetRotatedAABB * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetRotatedAABB * @param {Entity} this - no description * @param {Vector} min - Minimum extent of the bounding box. * @param {Vector} max - Maximum extent of the bounding box. * @returns {Vector} - Minimum extent of the AABB * @returns {Vector} - Maximum extent of the AABB * @tupleReturn **/ GetRotatedAABB(this: Entity, min: Vector, max: Vector): [Vector, Vector] /** * * Returns the rightward vector of the entity, as a normalized direction vector * * @name EntityFuncs:GetRight * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetRight * @param {Entity} this - no description * @returns {Vector} - rightDir **/ GetRight(this: Entity): Vector /** * * Returns the entity's render origin, set by @EntityFuncs:SetRenderOrigin in a drawing hook. * * @name EntityFuncs:GetRenderOrigin * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetRenderOrigin * @param {Entity} this - no description * @returns {Vector} - The entitys render origin **/ GetRenderOrigin(this: Entity): Vector /** * * Returns the render mode of the entity. * * @name EntityFuncs:GetRenderMode * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetRenderMode * @param {Entity} this - no description * @returns {RENDERMODE} - The render Mode. See @RENDERMODE enum **/ GetRenderMode(this: Entity): RENDERMODE /** * * Returns the render group of the entity. * * @name EntityFuncs:GetRenderGroup * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetRenderGroup * @param {Entity} this - no description * @returns {RENDERGROUP} - The render group. See @RENDERGROUP enum **/ GetRenderGroup(this: Entity): RENDERGROUP /** * * Returns current render FX of the entity. * * @name EntityFuncs:GetRenderFX * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetRenderFX * @param {Entity} this - no description * @returns {kRenderFx} - The current render FX of the entity. See @kRenderFx enum **/ GetRenderFX(this: Entity): kRenderFx /** * * Returns render bounds of the entity. Can be overridden by @EntityFuncs:SetRenderBounds. * If the render bounds are not inside players view, the entity will not be drawn! * * @name EntityFuncs:GetRenderBounds * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetRenderBounds * @param {Entity} this - no description * @returns {Vector} - The minimum vector of the bounds * @returns {Vector} - The maximum vector of the bounds. * @tupleReturn **/ GetRenderBounds(this: Entity): [Vector, Vector] /** * * Returns true if the entity is being held by a player. Either by physics gun, gravity gun or use-key (+use). * * @name EntityFuncs:IsPlayerHolding * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/IsPlayerHolding * @bug #2046 If multiple players are holding an object and one drops it, this will return false despite the object still being held. * @param {Entity} this - no description * @returns {boolean} - IsBeingHeld **/ IsPlayerHolding(this: Entity): boolean /** * * Returns the entity's render angles, set by @EntityFuncs:SetRenderAngles in a drawing hook. * * @name EntityFuncs:GetRenderAngles * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetRenderAngles * @param {Entity} this - no description * @returns {Angle} - The entitys render angles **/ GetRenderAngles(this: Entity): Angle /** * * Returns the entity which the ragdoll came from. The opposite of @Player:GetRagdollEntity. * * @name EntityFuncs:GetRagdollOwner * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetRagdollOwner * @param {Entity} this - no description * @returns {Entity} - The entity who owns the ragdoll. **/ GetRagdollOwner(this: Entity): Entity /** * * Returns whether this entity is predictable or not. * See @EntityFuncs:SetPredictable for more information * * @name EntityFuncs:GetPredictable * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetPredictable * @param {Entity} this - no description * @returns {boolean} - Whether this entity is predictable or not. **/ GetPredictable(this: Entity): boolean /** * * Returns name of given pose parameter * * @name EntityFuncs:GetPoseParameterName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPoseParameterName * @param {Entity} this - no description * @param {number} id - Id of the pose paremeter * @returns {string} - Name of given pose parameter **/ GetPoseParameterName(this: Entity, id: number): string /** * * Returns the pose parameter value * * @name EntityFuncs:GetPoseParameter * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPoseParameter * @warning This value will be from 0 - 1 on the client and from minimum range to maximum range on the server! You'll have to [remap](https://wiki.garrysmod.com/page/math/Remap) this value clientside to @EntityFuncs:GetPoseParameterRange's returns if you want get the actual pose parameter value. See @EntityFuncs:SetPoseParameter's example. * @param {Entity} this - no description * @param {string} name - Pose parameter name to look up * @returns {number} - Value of given pose parameter. **/ GetPoseParameter(this: Entity, name: string): number /** * * Returns pose parameter range * * @name EntityFuncs:GetPoseParameterRange * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPoseParameterRange * @param {Entity} this - no description * @param {number} id - Pose parameter ID to look up * @returns {number} - The minimum value * @returns {number} - The maximum value * @tupleReturn **/ GetPoseParameterRange(this: Entity, id: number): [number, number] /** * * Returns the playback rate of the main sequence on this entity, with 1.0 being the default speed. * * @name EntityFuncs:GetPlaybackRate * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPlaybackRate * @param {Entity} this - no description * @returns {number} - The playback rate. **/ GetPlaybackRate(this: Entity): number /** * * Gets the position of entity in world. * * @name EntityFuncs:GetPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPos * @param {Entity} this - no description * @returns {Vector} - The position of the entity. **/ GetPos(this: Entity): Vector /** * * Returns a specific physics object from an entity with multiple @PhysObj typeects (like ragdolls) * See also @EntityFuncs:TranslateBoneToPhysBone. * * @name EntityFuncs:GetPhysicsObjectNum * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPhysicsObjectNum * @param {Entity} this - no description * @param {number} physNum - The number corresponding to the @PhysObj type to grab. Starts at 0. * @returns {PhysObj} - The physics object **/ GetPhysicsObjectNum(this: Entity, physNum: number): PhysObj /** * * Returns the number of physics objects an entity has (usually 1 for non-ragdolls) * * @name EntityFuncs:GetPhysicsObjectCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPhysicsObjectCount * @param {Entity} this - no description * @returns {number} - numObjects **/ GetPhysicsObjectCount(this: Entity): number /** * * Returns player who is claiming kills of physics damage the entity deals. * * @name EntityFuncs:GetPhysicsAttacker * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetPhysicsAttacker * @note Some entities such as the Combine Ball disregard the time limit and always return the physics attacker. * @param {Entity} this - no description * @param {number} timeLimit - The time to check if the entity was still a proper physics attacker. * @returns {Player} - The player. If entity that was set is not a player, it will return NULL entity. **/ GetPhysicsAttacker(this: Entity, timeLimit: number): Player /** * * Returns the entity's physics object, if the entity has physics. * * @name EntityFuncs:GetPhysicsObject * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPhysicsObject * @note Entities don't have clientside physics objects by default, so this will return [NULL PHYSOBJ] on the client in most cases. * @param {Entity} this - no description * @returns {PhysObj} - The entity's physics object. **/ GetPhysicsObject(this: Entity): PhysObj /** * * Returns whether the entity is persistent or not. * See @EntityFuncs:SetPersistent for more information on persistence. * * @name EntityFuncs:GetPersistent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetPersistent * @param {Entity} this - no description * @returns {boolean} - True if the entity is set to be persistent. **/ GetPersistent(this: Entity): boolean /** * * Returns the position and angle of the entity's move parent as a 3x4 matrix (@VMatrix type is 4x4 so the fourth row goes unused). The first three columns store the angle as a [rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix), and the fourth column stores the position vector. * * @name EntityFuncs:GetParentWorldTransformMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetParentWorldTransformMatrix * @param {Entity} this - no description * @returns {VMatrix} - The position and angle matrix. * If the entity has no move parent, an identity matrix will be returned. * If the entity is [parented to attachment](https://wiki.garrysmod.com/page/Entity/GetParentAttachment) 0 or the parent isn't a BaseAnimating entity, the equivalent of Entity:GetMoveParent():GetWorldTransformMatrix()``` will be returned. **/ GetParentWorldTransformMatrix(this: Entity): VMatrix /** * * Returns the parent entity of this entity. * * @name EntityFuncs:GetParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetParent * @param {Entity} this - no description * @returns {Entity} - parentEntity **/ GetParent(this: Entity): Entity /** * * If the entity is parented to an entity that has a model with multiple physics objects (like a ragdoll), this is used to retrieve what physics object number the entity is parented to on it's parent. * * @name EntityFuncs:GetParentPhysNum * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetParentPhysNum * @param {Entity} this - no description * @returns {number} - The physics object id, or nil if the entity has no parent **/ GetParentPhysNum(this: Entity): number /** * * Returns the attachment index of the entity's parent. Returns 0 if the entity is not parented to a specific attachment or if it isn't parented at all. * This is set by second argument of @EntityFuncs:SetParent or the **SetParentAttachment** input. * * @name EntityFuncs:GetParentAttachment * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetParentAttachment * @param {Entity} this - no description * @returns {number} - The parented attachment index **/ GetParentAttachment(this: Entity): number /** * * Returns the owner entity of this entity. See @EntityFuncs:SetOwner for more info. * * @name EntityFuncs:GetOwner * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetOwner * @param {Entity} this - no description * @returns {Entity} - The owner entity of this entity. **/ GetOwner(this: Entity): Entity /** * * Retrieves a networked vector value at specified index on the entity that is set by @EntityFuncs:SetNWVector. * * @name EntityFuncs:GetNWVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWVector * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {any} fallback - The value to return if we failed to retrieve the value. (If it isn't set) * @returns {any} - The value associated with the key **/ GetNWVector(this: Entity, key: string, fallback?: any): any /** * * Returns all the networked variables in an entity. * * @name EntityFuncs:GetNWVarTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWVarTable * @param {Entity} this - no description * @returns {table} - Key-Value table of all networked variables. **/ GetNWVarTable(this: Entity): table /** * * Returns callback function for given NWVar of this entity. * * @name EntityFuncs:GetNWVarProxy * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWVarProxy * @param {Entity} this - no description * @param {any} key - The key of the NWVar to get callback of. * @returns {function} - The callback of given NWVar, or nil if not found. **/ GetNWVarProxy(this: Entity, key: any): UnknownFunc /** * * Retrieves a networked string value at specified index on the entity that is set by @EntityFuncs:SetNWString. * * @name EntityFuncs:GetNWString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWString * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {any} fallback - The value to return if we failed to retrieve the value. (If it isn't set) * @returns {any} - The value associated with the key **/ GetNWString(this: Entity, key: string, fallback?: any): any /** * * Retrieves a networked float value at specified index on the entity that is set by @EntityFuncs:SetNWFloat. * * @name EntityFuncs:GetNWFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWFloat * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {any} fallback - The value to return if we failed to retrieve the value. (If it isn't set) * @returns {any} - The value associated with the key **/ GetNWFloat(this: Entity, key: string, fallback?: any): any /** * * Retrieves a networked entity value at specified index on the entity that is set by @EntityFuncs:SetNWEntity. * * @name EntityFuncs:GetNWEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWEntity * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {any} fallback - The value to return if we failed to retrieve the value. (If it isn't set) * @returns {any} - The value associated with the key **/ GetNWEntity(this: Entity, key: string, fallback?: any): any /** * * Retrieves a networked integer (whole number) value that was previously set by @EntityFuncs:SetNWInt. * * @name EntityFuncs:GetNWInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWInt * @bug #3374 This function will not round decimal values as it actually networks a float internally. * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {any} fallback - The value to return if we failed to retrieve the value (If it isn't set). * @returns {any} - The value associated with the key **/ GetNWInt(this: Entity, key: string, fallback?: any): any /** * * Retrieves a networked boolean value at specified index on the entity that is set by @EntityFuncs:SetNWBool. * * @name EntityFuncs:GetNWBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWBool * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {any} fallback - The value to return if we failed to retrieve the value. (If it isn't set) * @returns {any} - The value associated with the key **/ GetNWBool(this: Entity, key: string, fallback?: any): any /** * * Retrieves a networked angle value at specified index on the entity that is set by @EntityFuncs:SetNWAngle. * * @name EntityFuncs:GetNWAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNWAngle * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {any} fallback - The value to return if we failed to retrieve the value. (If it isn't set) * @returns {any} - The value associated with the key **/ GetNWAngle(this: Entity, key: string, fallback?: any): any /** * * Returns the body group count of the entity. * * @name EntityFuncs:GetNumBodyGroups * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNumBodyGroups * @param {Entity} this - no description * @returns {number} - Amount of bodygroups the entitys model has **/ GetNumBodyGroups(this: Entity): number /** * * Returns the number of pose parameters this entity has. * * @name EntityFuncs:GetNumPoseParameters * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNumPoseParameters * @param {Entity} this - no description * @returns {number} - Amount of pose parameters the entity has **/ GetNumPoseParameters(this: Entity): number /** * * Returns if the entity's rendering and transmitting has been disabled. * * @name EntityFuncs:GetNoDraw * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNoDraw * @note This is equivalent to calling @EntityFuncs:IsEffectActive( EF_NODRAW ) * @param {Entity} this - no description * @returns {boolean} - Whether the entity's rendering and transmitting has been disabled. **/ GetNoDraw(this: Entity): boolean /** * * Gets networked origin for entity. * * @name EntityFuncs:GetNetworkOrigin * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkOrigin * @param {Entity} this - no description * @returns {Vector} - origin **/ GetNetworkOrigin(this: Entity): Vector /** * * Retrieves a networked vector value at specified index on the entity that is set by @EntityFuncs:SetNetworkedVector. * * @name EntityFuncs:GetNetworkedVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedVector * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {Vector} fallback - The value to return if we failed to retrieve the value. ( If it isn't set ) * @returns {Vector} - The retrieved value **/ GetNetworkedVector(this: Entity, key: string, fallback?: Vector): Vector /** * * Returns all the networked variables in an entity. * * @name EntityFuncs:GetNetworkedVarTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedVarTable * @param {Entity} this - no description * @returns {table} - Key-Value table of all networked variables. **/ GetNetworkedVarTable(this: Entity): table /** * * Retrieves a networked string value at specified index on the entity that is set by @EntityFuncs:SetNetworkedString. * * @name EntityFuncs:GetNetworkedString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedString * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {string} fallback - The value to return if we failed to retrieve the value. ( If it isn't set ) * @returns {string} - The retrieved value **/ GetNetworkedString(this: Entity, key: string, fallback?: string): string /** * * Returns callback function for given NWVar of this entity. * * @name EntityFuncs:GetNetworkedVarProxy * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedVarProxy * @note Currently this function only works for the NW2Var system (accessed by adding a 2 in between Networked and Var for most NetworkedVar functions), which will replace the original one at some point in the future * @param {Entity} this - no description * @param {string} name - The name of the NWVar to get callback of. * @returns {function} - The callback of given NWVar, if any. **/ GetNetworkedVarProxy(this: Entity, name: string): UnknownFunc /** * * Retrieves a networked integer value at specified index on the entity that is set by @EntityFuncs:SetNetworkedInt. * * @name EntityFuncs:GetNetworkedInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedInt * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {number} fallback - The value to return if we failed to retrieve the value. ( If it isn't set ) * @returns {number} - The retrieved value **/ GetNetworkedInt(this: Entity, key: string, fallback?: number): number /** * * Retrieves a networked float value at specified index on the entity that is set by @EntityFuncs:SetNetworkedFloat. * Seems to be the same as @EntityFuncs:GetNetworkedInt. * * @name EntityFuncs:GetNetworkedFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedFloat * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {number} fallback - The value to return if we failed to retrieve the value. ( If it isn't set ) * @returns {number} - The retrieved value **/ GetNetworkedFloat(this: Entity, key: string, fallback?: number): number /** * * Retrieves a networked float value at specified index on the entity that is set by @EntityFuncs:SetNetworkedEntity. * * @name EntityFuncs:GetNetworkedEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedEntity * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {Entity} fallback - The value to return if we failed to retrieve the value. ( If it isn't set ) * @returns {Entity} - The retrieved value **/ GetNetworkedEntity(this: Entity, key: string, fallback?: Entity): Entity /** * * Retrieves a networked boolean value at specified index on the entity that is set by @EntityFuncs:SetNetworkedBool. * * @name EntityFuncs:GetNetworkedBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedBool * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {boolean} fallback - The value to return if we failed to retrieve the value. ( If it isn't set ) * @returns {boolean} - The retrieved value **/ GetNetworkedBool(this: Entity, key: string, fallback?: boolean): boolean /** * * Retrieves a networked angle value at specified index on the entity that is set by @EntityFuncs:SetNetworkedAngle. * * @name EntityFuncs:GetNetworkedAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkedAngle * @param {Entity} this - no description * @param {string} key - The key that is associated with the value * @param {Angle} fallback - The value to return if we failed to retrieve the value. ( If it isn't set ) * @returns {Angle} - The retrieved value **/ GetNetworkedAngle(this: Entity, key: string, fallback?: Angle): Angle /** * * Gets networked angles for entity. * * @name EntityFuncs:GetNetworkAngles * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetNetworkAngles * @param {Entity} this - no description * @returns {Angle} - angle **/ GetNetworkAngles(this: Entity): Angle /** * * Returns the mapping name of this entity. * * @name EntityFuncs:GetName * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetName * @param {Entity} this - no description * @returns {string} - The name of the Entity **/ GetName(this: Entity): string /** * * Returns the entity's movetype * * @name EntityFuncs:GetMoveType * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetMoveType * @param {Entity} this - no description * @returns {MOVETYPE} - Move type. See @MOVETYPE enum **/ GetMoveType(this: Entity): MOVETYPE /** * * Returns the movement parent of this entity. * See @EntityFuncs:SetMoveParent for more info. * * @name EntityFuncs:GetMoveParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetMoveParent * @param {Entity} this - no description * @returns {Entity} - The movement parent of this entity. **/ GetMoveParent(this: Entity): Entity /** * * Returns the move collide type of the entity. The move collide is the way a physics object reacts to hitting an object - will it bounce, slide? * * @name EntityFuncs:GetMoveCollide * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetMoveCollide * @param {Entity} this - no description * @returns {MOVECOLLIDE} - The move collide type, see @MOVECOLLIDE enum **/ GetMoveCollide(this: Entity): MOVECOLLIDE /** * * Returns the amount a momentary_rot_button entity is turned based on the given angle. 0 meaning completely turned closed, 1 meaning completely turned open. * * @name EntityFuncs:GetMomentaryRotButtonPos * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetMomentaryRotButtonPos * @warning This only works on momentary_rot_button entities. * @param {Entity} this - no description * @param {Angle} turnAngle - The angle of rotation to compare - usually should be @EntityFuncs:GetAngles. * @returns {number} - The amount the momentary_rot_button is turned, ranging from 0 to 1, or nil if the entity is not a momentary_rot_button. **/ GetMomentaryRotButtonPos(this: Entity, turnAngle: Angle): number /** * * Gets the selected entity's model scale. * * @name EntityFuncs:GetModelScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetModelScale * @param {Entity} this - no description * @returns {number} - Scale of that entity's model. **/ GetModelScale(this: Entity): number /** * * Returns the entity's model render bounds. By default this will return the same bounds as @EntityFuncs:GetModelBounds. * * @name EntityFuncs:GetModelRenderBounds * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetModelRenderBounds * @validate * @param {Entity} this - no description * @returns {Vector} - The minimum vector of the bounds * @returns {Vector} - The maximum vector of the bounds * @tupleReturn **/ GetModelRenderBounds(this: Entity): [Vector, Vector] /** * * Gets the models radius. * * @name EntityFuncs:GetModelRadius * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetModelRadius * @param {Entity} this - no description * @returns {number} - The radius of the model **/ GetModelRadius(this: Entity): number /** * * Returns the contents of the entity's current model. * * @name EntityFuncs:GetModelContents * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetModelContents * @param {Entity} this - no description * @returns {CONTENTS} - The contents of the entity's model. See @CONTENTS enum. **/ GetModelContents(this: Entity): CONTENTS /** * * Gets the physics bone count of the entity's model. This is only applicable to ragdoll models and only to "anim" type [Scripted Entities](https://wiki.garrysmod.com/page/Scripted%20Entities). * * @name EntityFuncs:GetModelPhysBoneCount * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetModelPhysBoneCount * @param {Entity} this - no description * @returns {number} - How many physics bones exist on the model. **/ GetModelPhysBoneCount(this: Entity): number /** * * Returns the entity's model bounds. This is different than the collision bounds/hull. This is not scaled with @EntityFuncs:SetModelScale, and will return the model's original, unmodified mins and maxs. * * @name EntityFuncs:GetModelBounds * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetModelBounds * @param {Entity} this - no description * @returns {Vector} - The minimum vector of the bounds * @returns {Vector} - The maximum vector of the bounds * @tupleReturn **/ GetModelBounds(this: Entity): [Vector, Vector] /** * * Gets the model of given entity. * * @name EntityFuncs:GetModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetModel * @bug #2246 This does not necessarily return the model's path, as is the case for brush and virtual models. This is intentional behaviour, however, there is currently no way to retrieve the actual file path. * @param {Entity} this - no description * @returns {string} - The entity's model. Will be a filesystem path for most models. * This will be @nil type for entities which cannot have models, such as point entities. **/ GetModel(this: Entity): string /** * * Returns the max health that the entity was given. It can be set via @EntityFuncs:SetMaxHealth. * * @name EntityFuncs:GetMaxHealth * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetMaxHealth * @param {Entity} this - no description * @returns {number} - Max health. **/ GetMaxHealth(this: Entity): number /** * * Returns the surface material of this entity. * * @name EntityFuncs:GetMaterialType * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetMaterialType * @param {Entity} this - no description * @returns {MAT} - Surface material. See @MAT enum **/ GetMaterialType(this: Entity): MAT /** * * Returns all materials of the entity's model. * This function is unaffected by @EntityFuncs:SetSubMaterial as it returns the original materials. * * @name EntityFuncs:GetMaterials * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetMaterials * @bug #3362 The server's values take priority on the client. * @bug The table returned by this function will not contain materials if they are missing from the disk/repository. This means that if you are attempting to find the ID of a material to replace with @EntityFuncs:SetSubMaterial and there are missing materials on the model, all subsequent materials will be offset in the table, meaning that the ID you are trying to get will be incorrect. * @bug #3216 This table is limited to 256 materials, even if the entity has more. * @param {Entity} this - no description * @returns {table} - A table containing full paths to the materials of the model. **/ GetMaterials(this: Entity): table /** * * Returns the material override for this entity. * Returns an empty string if no material override exists. Use @EntityFuncs:GetMaterials to list it's default materials. * * @name EntityFuncs:GetMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetMaterial * @bug #3362 The server's value takes priority on the client. * @param {Entity} this - no description * @returns {string} - material **/ GetMaterial(this: Entity): string /** * * Gets the entity's scale manipulation of the given bone. Normal scale is Vector( 1, 1, 1 ) * * @name EntityFuncs:GetManipulateBoneScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetManipulateBoneScale * @param {Entity} this - no description * @param {number} boneID - The bone's ID * @returns {Vector} - The entity's scale manipulation of the given bone **/ GetManipulateBoneScale(this: Entity, boneID: number): Vector /** * * Gets the entity's position manipulation of the given bone. This is relative to the default position, so it is zero when unmodified. * * @name EntityFuncs:GetManipulateBonePosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetManipulateBonePosition * @param {Entity} this - no description * @param {number} boneId - The bone's ID * @returns {Vector} - The entity's position manipulation of the given bone. **/ GetManipulateBonePosition(this: Entity, boneId: number): Vector /** * * Returns the jiggle amount of the entity's bone. * See @EntityFuncs:ManipulateBoneJiggle for more info. * * @name EntityFuncs:GetManipulateBoneJiggle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetManipulateBoneJiggle * @param {Entity} this - no description * @param {number} boneID - The bone ID * @returns {number} - Returns a value ranging from 0 to 255 depending on the value set with @EntityFuncs:ManipulateBoneJiggle. **/ GetManipulateBoneJiggle(this: Entity, boneID: number): number /** * * Gets the entity's angle manipulation of the given bone. This is relative to the default angle, so the angle is zero when unmodified. * * @name EntityFuncs:GetManipulateBoneAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetManipulateBoneAngles * @param {Entity} this - no description * @param {number} boneID - The bone's ID * @returns {Angle} - The entity's angle manipulation of the given bone. **/ GetManipulateBoneAngles(this: Entity, boneID: number): Angle /** * * Returns entity's position relative to it's parent. * * @name EntityFuncs:GetLocalPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetLocalPos * @param {Entity} this - no description * @returns {Vector} - Relative position **/ GetLocalPos(this: Entity): Vector /** * * Returns the non-VPhysics angular velocity of the entity relative to its parent entity. * * @name EntityFuncs:GetLocalAngularVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetLocalAngularVelocity * @param {Entity} this - no description * @returns {Angle} - The velocity **/ GetLocalAngularVelocity(this: Entity): Angle /** * * Returns the entity that is being used as the light origin position for this entity. * * @name EntityFuncs:GetLightingOriginEntity * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetLightingOriginEntity * @param {Entity} this - no description * @returns {Entity} - The lighting entity. This will usually be NULL. **/ GetLightingOriginEntity(this: Entity): Entity /** * * Returns the rotation of the entity relative to its parent entity. * * @name EntityFuncs:GetLocalAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetLocalAngles * @param {Entity} this - no description * @returns {Angle} - Relative angle **/ GetLocalAngles(this: Entity): Angle /** * * Returns the current weight of the layer. See @EntityFuncs:SetLayerWeight for more information. * * @name EntityFuncs:GetLayerWeight * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetLayerWeight * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @returns {number} - The current weight of the layer **/ GetLayerWeight(this: Entity, layerID: number): number /** * * Returns the duration of given layer. * * @name EntityFuncs:GetLayerDuration * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetLayerDuration * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @returns {number} - The duration of the layer **/ GetLayerDuration(this: Entity, layerID: number): number /** * * Returns the animation cycle/frame for given layer. * * @name EntityFuncs:GetLayerCycle * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetLayerCycle * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} layerID - The Layer ID * @returns {number} - The animation cycle/frame for given layer. **/ GetLayerCycle(this: Entity, layerID: number): number /** * * Returns a table containing all key values the entity has. * * @name EntityFuncs:GetKeyValues * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetKeyValues * @note This only includes engine defined key values. "targetname" is not an actual key value in-engine, use @EntityFuncs:GetName for that instead. For custom key values, use @GamemodeHooks:EntityKeyValue or @EntityHooks:KeyValue to capture and store them. * @param {Entity} this - no description * @returns {table} - A table of key values. **/ GetKeyValues(this: Entity): table /** * * An interface for accessing internal key values on entities. * This function returns variables created with **DEFINE_KEYFIELD** in C++ entities. * See @EntityFuncs:GetSaveTable for a more detailed explanation. * * @name EntityFuncs:GetInternalVariable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetInternalVariable * @param {Entity} this - no description * @param {string} VariableName - Name of variable corresponding to an entity save value. * @returns {any} - The internal variable value **/ GetInternalVariable(this: Entity, VariableName: string): any /** * * Returns the amount of hitbox sets in the entity. * * @name EntityFuncs:GetHitboxSetCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetHitboxSetCount * @param {Entity} this - no description * @returns {number} - The amount of hitbox sets in the entity. **/ GetHitboxSetCount(this: Entity): number /** * * Returns entity's current hit box set * * @name EntityFuncs:GetHitboxSet * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetHitboxSet * @param {Entity} this - no description * @returns {number} - The current hit box set id, or no value if the entity doesn't have hit boxes * @returns {string} - The current hit box set name, or no value if the entity doesn't have hit boxes * @tupleReturn **/ GetHitboxSet(this: Entity): [number, string] /** * * Returns the number of hit box groups that an entity has. * * @name EntityFuncs:GetHitBoxGroupCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetHitBoxGroupCount * @param {Entity} this - no description * @returns {number} - number of hit box groups **/ GetHitBoxGroupCount(this: Entity): number /** * * Gets how many hit boxes are in a given hit box group * * @name EntityFuncs:GetHitBoxCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetHitBoxCount * @param {Entity} this - no description * @param {number} group - The number of the hit box group * @returns {number} - The number of hit boxes. **/ GetHitBoxCount(this: Entity, group: number): number /** * * Gets the bounds (min and max corners) of a hit box. * * @name EntityFuncs:GetHitBoxBounds * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetHitBoxBounds * @param {Entity} this - no description * @param {number} hitbox - The number of the hit box. * @param {number} group - The group of the hit box. This should be 0 in most cases. * @returns {Vector} - Hit box mins. Will be nil if the hit box index was out of range. * @returns {Vector} - Hit box maxs. Will be nil if the hit box index was out of range. * @tupleReturn **/ GetHitBoxBounds(this: Entity, hitbox: number, group: number): [Vector, Vector] /** * @name EntityFuncs:GetHitboxBone * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetHitboxBone * @param {Entity} this - no description * @returns {void} **/ GetHitboxBone(this: Entity): void /** * * Gets the bone the hit box is attached to. * * @name EntityFuncs:GetHitBoxBone * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetHitBoxBone * @param {Entity} this - no description * @param {number} hitbox - The number of the hit box. * @param {number} group - The number of the hit box group. This should be 0 in most cases. * Numbering for these groups start from 0. The total group count can be found with @EntityFuncs:GetHitBoxGroupCount. * @returns {number} - The number of the bone. Will be nil if the hit box index was out of range. **/ GetHitBoxBone(this: Entity, hitbox: number, group: number): number /** * * Returns the entity's ground speed velocity, which is based on the entity's walk/run speed and/or the ground speed of their sequence ( @EntityFuncs:GetSequenceGroundSpeed ). Will return an empty @Vector type if the entity isn't moving on the ground. * * @name EntityFuncs:GetGroundSpeedVelocity * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetGroundSpeedVelocity * @param {Entity} this - no description * @returns {Vector} - The ground speed velocity. **/ GetGroundSpeedVelocity(this: Entity): Vector /** * * Returns the object the entity is standing on. * * @name EntityFuncs:GetGroundEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetGroundEntity * @param {Entity} this - no description * @returns {Entity} - The ground entity. **/ GetGroundEntity(this: Entity): Entity /** * * Gets the gravity multiplier of the entity. * * @name EntityFuncs:GetGravity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetGravity * @param {Entity} this - no description * @returns {number} - gravityMultiplier **/ GetGravity(this: Entity): number /** * * Returns how much friction an entity has. Entities default to 1 (100%) and can be higher or even negative. * * @name EntityFuncs:GetFriction * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetFriction * @param {Entity} this - no description * @returns {number} - friction **/ GetFriction(this: Entity): number /** * * Returns the forward vector of the entity, as a normalized direction vector * * @name EntityFuncs:GetForward * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetForward * @param {Entity} this - no description * @returns {Vector} - forwardDir **/ GetForward(this: Entity): Vector /** * * Returns current weight ( value ) of the flex. * * @name EntityFuncs:GetFlexWeight * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetFlexWeight * @param {Entity} this - no description * @param {number} flex - The ID of the flex to get weight of * @returns {number} - The current weight of the flex **/ GetFlexWeight(this: Entity, flex: number): number /** * * Returns the flex scale of the entity. * * @name EntityFuncs:GetFlexScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetFlexScale * @param {Entity} this - no description * @returns {number} - The flex scale **/ GetFlexScale(this: Entity): number /** * * Returns the number of flexes this entity has. * * @name EntityFuncs:GetFlexNum * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetFlexNum * @param {Entity} this - no description * @returns {number} - The number of flexes. **/ GetFlexNum(this: Entity): number /** * * Returns flex name. * * @name EntityFuncs:GetFlexName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetFlexName * @param {Entity} this - no description * @param {number} id - The flex id to look up name of * @returns {string} - The flex name **/ GetFlexName(this: Entity, id: number): string /** * * Returns the ID of the flex based on given name. * * @name EntityFuncs:GetFlexIDByName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetFlexIDByName * @param {Entity} this - no description * @param {string} name - The name of the flex to get the ID of. Case sensitive. * @returns {number} - The ID of flex * * nil if no flex with given name was found **/ GetFlexIDByName(this: Entity, name: string): number /** * * Returns acceptable value range for the flex. * * @name EntityFuncs:GetFlexBounds * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetFlexBounds * @param {Entity} this - no description * @param {number} flex - The ID of the flex to look up bounds of * @returns {number} - The minimum value for this flex * @returns {number} - The maximum value for this flex * @tupleReturn **/ GetFlexBounds(this: Entity, flex: number): [number, number] /** * * Returns all flags of given entity. * * @name EntityFuncs:GetFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetFlags * @param {Entity} this - no description * @returns {FL} - Flags of given entity as a bitflag, see @FL enum **/ GetFlags(this: Entity): FL /** * * Returns the elasticity of this entity, used by some flying entities such as the Helicopter NPC to determine how much it should bounce around when colliding. * * @name EntityFuncs:GetElasticity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetElasticity * @param {Entity} this - no description * @returns {number} - elasticity **/ GetElasticity(this: Entity): number /** * * Returns a bit flag of all engine flags of the entity. * * @name EntityFuncs:GetEFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetEFlags * @param {Entity} this - no description * @returns {EFL} - Engine flags, see @EFL enum **/ GetEFlags(this: Entity): EFL /** * * Returns a bit flag of all engine effect flags of the entity. * * @name EntityFuncs:GetEffects * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetEffects * @param {Entity} this - no description * @returns {EF} - Engine effect flags, see @EF enum **/ GetEffects(this: Entity): EF /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Get a vector stored in the datatable of the entity. * * @name EntityFuncs:GetDTVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetDTVector * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 63. * Specifies what key to grab from datatable. * @returns {Vector} - Requested vector. **/ GetDTVector(this: Entity, key: number): Vector /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Get a string stored in the datatable of the entity. * * @name EntityFuncs:GetDTString * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetDTString * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 3. * Specifies what key to grab from datatable. * @returns {string} - Requested string. **/ GetDTString(this: Entity, key: number): string /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Get an integer stored in the datatable of the entity. * * @name EntityFuncs:GetDTInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetDTInt * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 63. * Specifies what key to grab from datatable. * @returns {number} - 32-bit signed integer **/ GetDTInt(this: Entity, key: number): number /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Get a float stored in the datatable of the entity. * * @name EntityFuncs:GetDTFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetDTFloat * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 31. * Specifies what key to grab from datatable. * @returns {number} - Requested float. **/ GetDTFloat(this: Entity, key: number): number /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Returns an entity stored in the datatable of the entity. * * @name EntityFuncs:GetDTEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetDTEntity * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 63. * Specifies what key to grab from datatable. * @returns {Entity} - Requested entity. **/ GetDTEntity(this: Entity, key: number): Entity /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Get a boolean stored in the datatable of the entity. * * @name EntityFuncs:GetDTBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetDTBool * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 63. * Specifies what key to grab from datatable. * @returns {boolean} - Requested boolean. **/ GetDTBool(this: Entity, key: number): boolean /** * * This is called internally by the @EntityFuncs:NetworkVar system, you can use this in cases where using NetworkVar is not possible. * Get an angle stored in the datatable of the entity. * * @name EntityFuncs:GetDTAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetDTAngle * @internal * @param {Entity} this - no description * @param {number} key - Goes from 0 to 63. * Specifies what key to grab from datatable. * @returns {Angle} - Requested angle. **/ GetDTAngle(this: Entity, key: number): Angle /** * * Returns the frame of the currently played sequence. This will be a number between 0 and 1 as a representation of sequence progress. * * @name EntityFuncs:GetCycle * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetCycle * @param {Entity} this - no description * @returns {number} - The frame of the currently played sequence **/ GetCycle(this: Entity): number /** * * Returns whether this entity uses custom collision check set by @EntityFuncs:SetCustomCollisionCheck. * * @name EntityFuncs:GetCustomCollisionCheck * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetCustomCollisionCheck * @param {Entity} this - no description * @returns {boolean} - Whether this entity uses custom collision check or not **/ GetCustomCollisionCheck(this: Entity): boolean /** * * Gets the creator of the SENT. * * @name EntityFuncs:GetCreator * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetCreator * @param {Entity} this - no description * @returns {Player} - The creator, NULL for no creator. **/ GetCreator(this: Entity): Player /** * * Returns the time the entity was created on, relative to @CurTime function. * * @name EntityFuncs:GetCreationTime * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetCreationTime * @param {Entity} this - no description * @returns {number} - The time the entity was created on. **/ GetCreationTime(this: Entity): number /** * * Returns the two entities physobjects involved in a constraint ent, or no value if the entity is not a constraint. * * @name EntityFuncs:GetConstrainedPhysObjects * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetConstrainedPhysObjects * @param {Entity} this - no description * @returns {PhysObj} - phys1 * @returns {PhysObj} - phys2 * @tupleReturn **/ GetConstrainedPhysObjects(this: Entity): [PhysObj, PhysObj] /** * * Returns entity's creation ID. Unlike @EntityFuncs:EntIndex or @EntityFuncs:MapCreationID, it will always increase and old values won't be reused. * * @name EntityFuncs:GetCreationID * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetCreationID * @param {Entity} this - no description * @returns {number} - The creation ID **/ GetCreationID(this: Entity): number /** * * Returns the two entities involved in a constraint ent, or nil if the entity is not a constraint. * * @name EntityFuncs:GetConstrainedEntities * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetConstrainedEntities * @param {Entity} this - no description * @returns {Entity} - ent1 * @returns {Entity} - ent2 * @tupleReturn **/ GetConstrainedEntities(this: Entity): [Entity, Entity] /** * * Returns the color the entity is set to. * * @name EntityFuncs:GetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetColor * @bug #2407 The returned color will not have the color metatable. * @param {Entity} this - no description * @returns {IColor} - The color of the entity as a @IColor structure. **/ GetColor(this: Entity): IColor /** * * Returns the entity's collision group * * @name EntityFuncs:GetCollisionGroup * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetCollisionGroup * @param {Entity} this - no description * @returns {COLLISION_GROUP} - The collision group. See @COLLISION_GROUP enum **/ GetCollisionGroup(this: Entity): COLLISION_GROUP /** * * Returns an entity's collision bounding box. In most cases, this will return the same bounding box as @EntityFuncs:GetModelBounds unless the entity does not have a physics mesh or it has a @PhysObj type different from the default. * * @name EntityFuncs:GetCollisionBounds * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetCollisionBounds * @bug #223 This can be out-of-sync between the client and server for weapons. * @param {Entity} this - no description * @returns {Vector} - The minimum vector of the collision bounds * @returns {Vector} - The maximum vector of the collision bounds * @tupleReturn **/ GetCollisionBounds(this: Entity): [Vector, Vector] /** * * Returns the classname of a entity. This is often the name of the Lua file or folder containing the files for the entity * * @name EntityFuncs:GetClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetClass * @param {Entity} this - no description * @returns {string} - The entity's classname **/ GetClass(this: Entity): string /** * * Gets the children of the entity - that is, every entity whose move parent is this entity. * * @name EntityFuncs:GetChildren * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetChildren * @note This function returns @EntityFuncs:SetMoveParent children, **NOT** @EntityFuncs:SetParent!@EntityFuncs:SetParent however also calls @EntityFuncs:SetMoveParent.This means that some entities in the returned list might have a NULL @EntityFuncs:GetParent.This also means that using this function on players will return their weapons on the client but not the server. * @param {Entity} this - no description * @returns {table} - A list of movement children entities **/ GetChildren(this: Entity): table /** * * Returns ids of child bones of given bone. * * @name EntityFuncs:GetChildBones * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetChildBones * @param {Entity} this - no description * @param {number} boneid - Bone id to lookup children of * @returns {table} - A table of bone ids **/ GetChildBones(this: Entity, boneid: number): table /** * * Returns the specified hook callbacks for this entity added with @EntityFuncs:AddCallback * The callbacks can then be removed with @EntityFuncs:RemoveCallback. * * @name EntityFuncs:GetCallbacks * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetCallbacks * @param {Entity} this - no description * @param {string} hook - The hook to retrieve the callbacks from, see [Entity Callbacks](https://wiki.garrysmod.com/page/Entity%20Callbacks) for the possible hooks. * @returns {table} - A table containing the callbackid and function of all the callbacks for the specified hook **/ GetCallbacks(this: Entity, hook: string): table /** * * Returns the amount of planes of non-nodraw brush model surfaces of the entity's model. * * @name EntityFuncs:GetBrushPlaneCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBrushPlaneCount * @param {Entity} this - no description * @returns {number} - The amount of brush model planes of the entity's model. This will be 0 for any non-brush model. **/ GetBrushPlaneCount(this: Entity): number /** * * Returns a table of brushes surfaces for brush model entities. * * @name EntityFuncs:GetBrushSurfaces * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBrushSurfaces * @param {Entity} this - no description * @returns {SurfaceInfo[]} - Table of @SurfaceInfo types if the entity has a brush model, or @no value type otherwise. **/ GetBrushSurfaces(this: Entity): SurfaceInfo[] /** * * Returns info about given plane of non-nodraw brush model surfaces of the entity's model. Works on worldspawn as well. * * @name EntityFuncs:GetBrushPlane * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBrushPlane * @warning This only works on entities with brush models. * @param {Entity} this - no description * @param {number} id - The index of the plane to get info of. Starts from 0. * @returns {Vector} - The origin of the plane. * This will be either the first vertex's position (if available) or the plane's normal multiplied by the plane's distance. * @returns {Vector} - The normal of the plane. * @returns {number} - The "distance" of the plane. * The distance is the dot product of the plane's normal and the point it was initialized with. * @tupleReturn **/ GetBrushPlane(this: Entity, id: number): [Vector, Vector, number] /** * * Returns the surface property of the specified bone. * * @name EntityFuncs:GetBoneSurfaceProp * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBoneSurfaceProp * @param {Entity} this - no description * @param {number} bone - The bone id. See @EntityFuncs:LookupBone. * @returns {string} - The surface property of the bone to be used with @util.GetSurfaceIndex or an empty string on failure. **/ GetBoneSurfaceProp(this: Entity, bone: number): string /** * * Returns the position and angle of the given attachment, relative to the world. * * @name EntityFuncs:GetBonePosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBonePosition * @bug #884 This can return the server's position during server lag. * @bug #3285 This can return garbage serverside or @Vector function(0,0,0) for v49 models. * @bug #3739 This can return garbage if a trace passed through the target bone during bone matrix access. * @param {Entity} this - no description * @param {number} boneIndex - The bone index of the bone to get the position of. See @EntityFuncs:LookupBone. * @returns {Vector} - The bone's position relative to the world. * @returns {Angle} - The bone's angle relative to the world. * @tupleReturn **/ GetBonePosition(this: Entity, boneIndex: number): [Vector, Angle] /** * * Returns parent bone of given bone. * * @name EntityFuncs:GetBoneParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBoneParent * @note Will return -1 for @ClientsideModel function until @EntityFuncs:SetupBones is called on the entity. * @param {Entity} this - no description * @param {number} bone - The bode ID of the bone to get parent of * @returns {number} - Parent bone ID or -1 if we failed for some reason. **/ GetBoneParent(this: Entity, bone: number): number /** * * Returns name of given bone id. * * @name EntityFuncs:GetBoneName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBoneName * @param {Entity} this - no description * @param {number} index - ID of bone to lookup name of * @returns {string} - The name of given bone * * nil in case we failed or entity doesn't have a model * * "__INVALIDBONE__" in case the name cannot be read or the index is out of range. **/ GetBoneName(this: Entity, index: number): string /** * * Returns the matrix (position / rotation transform) of a given bone entity. * * @name EntityFuncs:GetBoneMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBoneMatrix * @bug #884 This can return the server's matrix during server lag. * @bug #3285 This can return garbage serverside or a 0,0,0 fourth column (represents position) for v49 models. * @param {Entity} this - no description * @param {number} boneID - The bone to retrieve matrix of. * * Bones clientside and serverside will differ * @returns {VMatrix} - The matrix * * Some entities don't update animation every frame such as prop_physics and won't have accurate bone matrix. **/ GetBoneMatrix(this: Entity, boneID: number): VMatrix /** * * Returns the amount of bones in the entity. * * @name EntityFuncs:GetBoneCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBoneCount * @note Will return -1 for @ClientsideModel function or undrawn entities until @EntityFuncs:SetupBones is called on the entity. * @param {Entity} this - no description * @returns {number} - The amount of bones in given entity; -1 on failure. **/ GetBoneCount(this: Entity): number /** * * Returns the value of the bone controller with the specified ID. * * @name EntityFuncs:GetBoneController * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBoneController * @note This is the precursor of pose parameters, and only works for Half Life 1: Source models supporting it. * @param {Entity} this - no description * @param {number} boneID - ID of the bone controller. Goes from 0 to 3. * @returns {number} - The value set on the bone controller. **/ GetBoneController(this: Entity, boneID: number): number /** * * Returns the contents of the specified bone. * * @name EntityFuncs:GetBoneContents * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBoneContents * @param {Entity} this - no description * @param {number} bone - The bone id. See @EntityFuncs:LookupBone. * @returns {CONTENTS} - The contents as a @CONTENTS enum or 0 on failure. **/ GetBoneContents(this: Entity, bone: number): CONTENTS /** * * Returns a list of all bodygroups of the entity. * * @name EntityFuncs:GetBodyGroups * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBodyGroups * @param {Entity} this - no description * @returns {BodyGroupData[]} - Bodygroups as a table of @BodyGroupData structures if the entity can have bodygroups. **/ GetBodyGroups(this: Entity): BodyGroupData[] /** * * Gets the name of specific bodygroup for given entity. * * @name EntityFuncs:GetBodygroupName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBodygroupName * @param {Entity} this - no description * @param {number} id - The id of bodygroup to get the name of. * @returns {string} - The name of the bodygroup **/ GetBodygroupName(this: Entity, id: number): string /** * * Returns the count of possible values for this bodygroup. * This is **not** the maximum value, since the bodygroups start with 0, not 1. * * @name EntityFuncs:GetBodygroupCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBodygroupCount * @param {Entity} this - no description * @param {number} bodygroup - The ID of bodygroup to retrieve count of. * @returns {number} - Count of values of passed bodygroup. **/ GetBodygroupCount(this: Entity, bodygroup: number): number /** * * Gets the exact value for specific bodygroup of given entity. * * @name EntityFuncs:GetBodygroup * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBodygroup * @param {Entity} this - no description * @param {number} id - The id of bodygroup to get value of. Starts from 0. * @returns {number} - Current bodygroup. Starts from 0. **/ GetBodygroup(this: Entity, id: number): number /** * * Returns the blood color of this entity. This can be set with @EntityFuncs:SetBloodColor. * * @name EntityFuncs:GetBloodColor * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/GetBloodColor * @param {Entity} this - no description * @returns {BLOOD_COLOR} - Color from @BLOOD_COLOR enum **/ GetBloodColor(this: Entity): BLOOD_COLOR /** * * Returns the entity's base velocity which is their velocity due to forces applied by other entities. This includes entity-on-entity collision or riding a treadmill. * * @name EntityFuncs:GetBaseVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetBaseVelocity * @param {Entity} this - no description * @returns {Vector} - The base velocity of the entity. **/ GetBaseVelocity(this: Entity): Vector /** * * Returns a table containing all attachments of the given entitys model. * Returns an empty table or **nil** in case it's model has no attachments. * * @name EntityFuncs:GetAttachments * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetAttachments * @bug #3167 This can have inconsistent results in single-player. * @param {Entity} this - no description * @returns {AttachmentData} - Attachment data. See @AttachmentData structure. **/ GetAttachments(this: Entity): AttachmentData /** * * Gets the orientation and position of the attachment by its ID, returns nothing if the attachment does not exist. * * @name EntityFuncs:GetAttachment * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetAttachment * @note The update rate of this function is limited by the setting of ENT.AutomaticFrameAdvance for [Scripted Entities](https://wiki.garrysmod.com/page/Scripted%20Entities)! * @bug #1255 This will return improper values for viewmodels if used in @GamemodeHooks:CalcView. * @param {Entity} this - no description * @param {number} attachmentId - The internal ID of the attachment. * @returns {AngPos} - The angle and position of the attachment. See the @AngPos structure. Most notably, the table contains the keys "Ang" and "Pos". **/ GetAttachment(this: Entity, attachmentId: number): AngPos /** * * Returns the last time the entity had an animation update. Returns 0 if the entity doesn't animate. * * @name EntityFuncs:GetAnimTime * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/GetAnimTime * @param {Entity} this - no description * @returns {number} - The last time the entity had an animation update. **/ GetAnimTime(this: Entity): number /** * * Returns a table containing the number of frames, flags, name, and FPS of an entity's animation ID. * * @name EntityFuncs:GetAnimInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetAnimInfo * @note Animation ID is not the same as sequence ID. * @param {Entity} this - no description * @param {number} animIndex - The animation ID to look up * @returns {table} - Information about the animation, or nil if the index is out of bounds **/ GetAnimInfo(this: Entity, animIndex: number): table /** * * Gets the angles of given entity. * * @name EntityFuncs:GetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetAngles * @bug #2764 This returns incorrect results for the local player clientside. * @bug #3106 This will return the local player's @EyeAngles function in [rendering hooks](http://wiki.garrysmod.com/page/Category:3D_Rendering_Hooks). * @bug #3107 This will return @Angle function(0,0,0) in [rendering hooks](http://wiki.garrysmod.com/page/Category:3D_Rendering_Hooks) while paused in single-player. * @param {Entity} this - no description * @returns {Angle} - The angles of the entity. **/ GetAngles(this: Entity): Angle /** * * Returns the entity's velocity. * * @name EntityFuncs:GetAbsVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/GetAbsVelocity * @note Actually binds to CBaseEntity::GetLocalVelocity() which retrieves the velocity of the entity due to its movement in the world from forces such as gravity. Does not include velocity from entity-on-entity collision. * @param {Entity} this - no description * @returns {Vector} - The velocity of the entity. **/ GetAbsVelocity(this: Entity): Vector /** * * Advances the cycle of an animated entity. * Animations that loop will automatically reset the cycle so you don't have to - ones that do not will stop animating once you reach the end of their sequence. * * @name EntityFuncs:FrameAdvance * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/FrameAdvance * @param {Entity} this - no description * @param {number} interval - How many seconds to advance the cycle. Set to 0 to let the engine calculate this for you based on @CurTime function. * @returns {void} **/ FrameAdvance(this: Entity, interval: number): void /** * * Forces the Entity to be dropped, when it is being held by a player's gravitygun or physgun. * * @name EntityFuncs:ForcePlayerDrop * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ForcePlayerDrop * @param {Entity} this - no description * @returns {void} **/ ForcePlayerDrop(this: Entity): void /** * * Makes an entity follow another entity's bone. * Internally this function calls @EntityFuncs:SetParent( parent, boneid ) and @EntityFuncs:AddEffects( EF_FOLLOWBONE ). * * @name EntityFuncs:FollowBone * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/FollowBone * @note If the entity vibrates, you probably need to run @EntityFuncs:SetPredictable( false ) clientside. * @warning This function will not work if the target bone's parent bone is invalid or if the bone is not used by VERTEX LOD0 * @param {Entity} this - no description * @param {Entity} parent - The entity to follow the bone of. If unset, removes the FollowBone effect. * @param {number} boneid - The bone to follow * @returns {void} **/ FollowBone(this: Entity, parent?: Entity, boneid: number): void /** * * Fires a bullet. * When used in a [ WEAPON](https://wiki.garrysmod.com/page/Category:WEAPON_Hooks%20) hook such as @WeaponHooks:Think or @WeaponHooks:PrimaryAttack, it will use @Player:LagCompensation internally. * * @name EntityFuncs:FireBullets * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/FireBullets * @note Lag compensation will not work if this function is called in a timer, regardless if the timer was made in a [WEAPON](https://wiki.garrysmod.com/page/Category:WEAPON_Hooks) hook. * @param {Entity} this - no description * @param {Bullet} bulletInfo - The bullet data to be used. See the @Bullet structure. * @param {boolean} suppressHostEvents - Has the effect of encasing the FireBullets call in @SuppressHostEvents function, only works in multiplayer. * @returns {void} **/ FireBullets(this: Entity, bulletInfo: Bullet, suppressHostEvents?: boolean): void /** * * Fires an entity's input. You can find inputs for most entities on the [Valve Developer Wiki](https://developer.valvesoftware.com/wiki/Output) * See also @EntityFuncs:Input and @GamemodeHooks:AcceptInput. * * @name EntityFuncs:Fire * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Fire * @param {Entity} this - no description * @param {string} input - The name of the input to fire * @param {string} param - The value to give to the input, can also be a @number type or a @boolean type. * @param {number} delay - Delay in seconds before firing * @returns {void} **/ Fire(this: Entity, input: string, param?: string, delay?: number): void /** * * Returns a transition from the given start and end sequence. * This function was only used by HL1 entities and NPCs, before the advent of sequence blending and gestures. * * @name EntityFuncs:FindTransitionSequence * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/FindTransitionSequence * @param {Entity} this - no description * @param {number} currentSequence - The currently playing sequence * @param {number} goalSequence - The goal sequence. * @returns {number} - The transition sequence, -1 if not available. **/ FindTransitionSequence(this: Entity, currentSequence: number, goalSequence: number): number /** * * Searches for bodygroup with given name. * * @name EntityFuncs:FindBodygroupByName * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/FindBodygroupByName * @param {Entity} this - no description * @param {string} name - The bodygroup name to search for. * @returns {number} - Bodygroup ID, -1 if not found **/ FindBodygroupByName(this: Entity, name: string): number /** * * Returns the position of an Player/NPC's view. * * @name EntityFuncs:EyePos * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/EyePos * @param {Entity} this - no description * @returns {Vector} - View position of the entity. **/ EyePos(this: Entity): Vector /** * * Returns the direction a player/npc/ragdoll is looking as a world-oriented angle. * * @name EntityFuncs:EyeAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/EyeAngles * @bug #1150 This can return an incorrect value in pods. * @bug #2620 This can return an incorrect value in jeeps when used with @Player:EnterVehicle. * @param {Entity} this - no description * @returns {Angle} - eyeAng **/ EyeAngles(this: Entity): Angle /** * * Extinguishes the entity if it is on fire. * Has no effect if called inside @GamemodeHooks:EntityTakeDamage (and the attacker is the flame that's hurting the entity) * See also @EntityFuncs:Ignite. * * @name EntityFuncs:Extinguish * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Extinguish * @param {Entity} this - no description * @returns {void} **/ Extinguish(this: Entity): void /** * * Gets the unique entity index of an entity. * * @name EntityFuncs:EntIndex * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/EntIndex * @note Entity indices are marked as unused after deletion, and can be reused by newly-created entities * @param {Entity} this - no description * @returns {number} - The index of the entity. * -1 for clientside-only or serverside-only entities. **/ EntIndex(this: Entity): number /** * * Can be used to apply a custom @VMatrix type to the entity, mostly used for scaling the model by a @Vector type. * To disable it, use @EntityFuncs:DisableMatrix. * If your old scales are wrong due to a recent update, use @EntityFuncs:SetLegacyTransform as a quick fix. * * @name EntityFuncs:EnableMatrix * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/EnableMatrix * @note The matrix can also be modified to apply a custom rotation and offset via the @VMatrix:SetAngles and @VMatrix:SetTranslation functions. * @bug #3502 This does not scale procedural bones. * @bug #3502 This disables inverse kinematics of an entity. * @param {Entity} this - no description * @param {string} matrixType - The name of the matrix type. * The only implemented matrix type is "RenderMultiply". * @param {VMatrix} matrix - The matrix to apply before drawing the entity. * @returns {void} **/ EnableMatrix(this: Entity, matrixType: string, matrix: VMatrix): void /** * * Flags an entity as using custom lua defined collisions. Fixes entities having spongy player collisions or not hitting traces, such as after @EntityFuncs:PhysicsFromMesh * * @name EntityFuncs:EnableCustomCollisions * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/EnableCustomCollisions * @param {Entity} this - no description * @param {boolean} useCustom - True to flag this entity * @returns {void} **/ EnableCustomCollisions(this: Entity, useCustom: boolean): void /** * * Toggles the constraints of this ragdoll entity on and off. * * @name EntityFuncs:EnableConstraints * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/EnableConstraints * @param {Entity} this - no description * @param {boolean} toggleConstraints - Set to true to enable the constraints and false to disable them. * Disabling constraints will delete the constraint entities. * @returns {void} **/ EnableConstraints(this: Entity, toggleConstraints: boolean): void /** * * Plays a sound on an entity. If run clientside, the sound will only be heard locally. * If used on a player or NPC character with the mouth rigged, the character will "lip-sync". This does not work with all sound files. * It is recommended to use sound scripts ( see @sound.Add ) over direct file paths. This will allow you to use @EntityFuncs:StopSound to stop the played sound scripts. * * @name EntityFuncs:EmitSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/EmitSound * @note When using this function with weapons, use the @Weapon type itself as the entity, not its owner! * @warning Do not use this for looping sounds with a filepath: see @EntityFuncs:StopSound for more details. * @warning The string will cannot have whitespace at the start or end. You can remove this with @string.Trim. * @bug #2651 This does not respond to @SuppressHostEvents function. * @param {Entity} this - no description * @param {string} soundName - The name of the sound to be played. * @param {SNDLVL} soundLevel - A modifier for the distance this sound will reach, acceptable range is 0 to 511. 100 means no adjustment to the level. See @SNDLVL enum * Will not work if a [sound script](https://developer.valvesoftware.com/wiki/Soundscripts) is used. * @param {number} pitchPercent - The pitch applied to the sound. The acceptable range is from 0 to 255. 100 means the pitch is not changed. * @param {number} volume - The volume, from 0 to 1. * @param {CHAN} channel - The sound channel, see @CHAN enum. * Will not work if a [sound script](https://developer.valvesoftware.com/wiki/Soundscripts) is used. * @returns {void} **/ EmitSound(this: Entity, soundName: string, soundLevel?: SNDLVL, pitchPercent?: number, volume?: number, channel?: CHAN): void /** * * Sets up a self.dt.NAME alias for a Data Table variable. * * @name EntityFuncs:DTVar * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/DTVar * @internal * @warning You should use @EntityFuncs:NetworkVar instead * @param {Entity} this - no description * @param {string} Type - The type of the DTVar being set up. It can be one of the following: 'Int', 'Float', 'Vector', 'Angle', 'Bool', 'Entity' or 'String' * @param {number} ID - The ID of the DTVar. Can be between 0 and 3 for strings, 0 and 31 for everything else. * @param {string} Name - Name by which you will refer to DTVar. It must be a valid variable name. (No spaces!) * @returns {void} **/ DTVar(this: Entity, Type: string, ID: number, Name: string): void /** * * Move an entity down until it collides with something. * * @name EntityFuncs:DropToFloor * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/DropToFloor * @warning The entity needs to already have something below it within 256 units. * @param {Entity} this - no description * @returns {void} **/ DropToFloor(this: Entity): void /** * * Sets whether an entity's shadow should be drawn. * * @name EntityFuncs:DrawShadow * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/DrawShadow * @param {Entity} this - no description * @param {boolean} shouldDraw - True to enable, false to disable shadow drawing. * @returns {void} **/ DrawShadow(this: Entity, shouldDraw: boolean): void /** * * Draws the entity or model. * If called inside @EntityHooks:Draw or @EntityHooks:DrawTranslucent, it only draws the entity's model itself. * If called outside of those hooks, it will call both of said hooks depending on @EntityFuncs:GetRenderGroup, drawing the entire entity again. * * @name EntityFuncs:DrawModel * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/DrawModel * @rendering function:3d * @note When drawing an entity more than once per frame in different positions, you should call @EntityFuncs:SetupBones before each draw; Otherwise, the entity will retain its first drawn position. * @bug #1558 Calling this on entities with [EF_BONEMERGE](https://wiki.garrysmod.com/page/Enums/EF) and [EF_NODRAW](https://wiki.garrysmod.com/page/Enums/EF) applied causes a crash. * @bug #2688 Using this with a map model (@game.GetWorld():[GetModel](https://wiki.garrysmod.com/page/Entity/GetModel)()) crashes the game. * @param {Entity} this - no description * @returns {void} **/ DrawModel(this: Entity): void /** * * This removes the argument entity from an ent's list of entities to 'delete on remove' * * @name EntityFuncs:DontDeleteOnRemove * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/DontDeleteOnRemove * @param {Entity} this - no description * @param {Entity} entityToUnremove - The entity to be removed from the list of entities to delete * @returns {void} **/ DontDeleteOnRemove(this: Entity, entityToUnremove: Entity): void /** * * Performs a trace attack. * * @name EntityFuncs:DispatchTraceAttack * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/DispatchTraceAttack * @warning Calling this function on the victim entity in @EntityHooks:OnTakeDamage can cause infinite loops. * @param {Entity} this - no description * @param {CTakeDamageInfo} damageInfo - The damage to apply. * @param {TraceResult} traceRes - Trace result to use to deal damage. See @TraceResult structure * @param {Vector} dir - Direction of the attack. * @returns {void} **/ DispatchTraceAttack(this: Entity, damageInfo: CTakeDamageInfo, traceRes: TraceResult, dir?: Vector): void /** * * Disables an active matrix. * * @name EntityFuncs:DisableMatrix * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/DisableMatrix * @param {Entity} this - no description * @param {string} matrixType - The name of the matrix type to disable. * The only known matrix type is "RenderMultiply". * @returns {void} **/ DisableMatrix(this: Entity, matrixType: string): void /** * * Removes the shadow for the entity. * The shadow will be recreated as soon as the entity wakes. * Doesn't affect shadows from flashlight/lamps/env_projectedtexture. * * @name EntityFuncs:DestroyShadow * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/DestroyShadow * @param {Entity} this - no description * @returns {void} **/ DestroyShadow(this: Entity): void /** * * Whenever the entity is removed, entityToRemove will be removed also. * * @name EntityFuncs:DeleteOnRemove * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/DeleteOnRemove * @param {Entity} this - no description * @param {Entity} entityToRemove - The entity to be removed * @returns {void} **/ DeleteOnRemove(this: Entity, entityToRemove: Entity): void /** * * Draws the shadow of an entity. * * @name EntityFuncs:CreateShadow * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/CreateShadow * @param {Entity} this - no description * @returns {void} **/ CreateShadow(this: Entity): void /** * * Creates a clientside particle system attached to the entity. See also @CreateParticleSystem function * * @name EntityFuncs:CreateParticleEffect * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/CreateParticleEffect * @note The particle effect must be precached with @PrecacheParticleSystem function and the file its from must be added via @game.AddParticles before it can be used! * @param {Entity} this - no description * @param {string} particle - The particle name to create * @param {number} attachment - Attachment ID to attach the particle to * @param {table[]} options - A table of tables ( IDs 1 to 64 ) having the following structure: * This only affects the control points of the particle effects and will do nothing if the effect doesn't use control points. * @returns {CNewParticleEffect} - The created particle system. **/ CreateParticleEffect(this: Entity, particle: string, attachment: number, options?: table[]): CNewParticleEffect /** * * Returns whether the entity was created by map or not. * * @name EntityFuncs:CreatedByMap * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/CreatedByMap * @param {Entity} this - no description * @returns {boolean} - Is created by map? **/ CreatedByMap(this: Entity): boolean /** * * Declares that the collision rules of the entity have changed, and subsequent calls for @GamemodeHooks:ShouldCollide with this entity may return a different value than they did previously. * * @name EntityFuncs:CollisionRulesChanged * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/CollisionRulesChanged * @warning This function must **not** be called inside of @GamemodeHooks:ShouldCollide. Instead, it must be called in advance when the condition is known to change. * @warning Failure to use this function correctly will result in a crash of the physics engine. * @param {Entity} this - no description * @returns {void} **/ CollisionRulesChanged(this: Entity): void /** * * Resets all pose parameters such as aim_yaw, aim_pitch and rotation. * * @name EntityFuncs:ClearPoseParameters * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/ClearPoseParameters * @param {Entity} this - no description * @returns {void} **/ ClearPoseParameters(this: Entity): void /** * * Causes a specified function to be run if the entity is removed by any means. This can later be undone by @EntityFuncs:RemoveCallOnRemove if you need it to not run. * * @name EntityFuncs:CallOnRemove * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/CallOnRemove * @bug Using players with this function will provide a gimped entity to the callback. * @param {Entity} this - no description * @param {string} identifier - Identifier of the function within CallOnRemove * @param {function} removeFunc - Function to be called on remove * @param {any[]} ...argn - Optional arguments to pass to removeFunc. Do note that the first argument passed to the function will always be the entity being removed, and the arguments passed on here start after that. * @returns {void} **/ CallOnRemove(this: Entity, identifier: string, removeFunc: UnknownFunc, ...argn: any[]): void /** * * Returns the distance between the center of the bounding box and the furthest bounding box corner. * * @name EntityFuncs:BoundingRadius * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/BoundingRadius * @param {Entity} this - no description * @returns {number} - The radius of the bounding box. **/ BoundingRadius(this: Entity): number /** * * This function takes the boneID and returns the length of it in an unrounded decimal * * @name EntityFuncs:BoneLength * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/BoneLength * @param {Entity} this - no description * @param {number} boneID - The ID of the bone you want the length of. You may want to get the length of the next bone ( boneID + 1 ) for decent results * @returns {number} - The length of the bone **/ BoneLength(this: Entity, boneID: number): number /** * * Returns whether the entity's bone has the flag or not. * * @name EntityFuncs:BoneHasFlag * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/BoneHasFlag * @param {Entity} this - no description * @param {number} boneID - Bone ID to test flag of. * @param {BONE} flag - The flag to test, see @BONE enum * @returns {boolean} - Whether the bone has that flag or not **/ BoneHasFlag(this: Entity, boneID: number, flag: BONE): boolean /** * * Returns a centered vector of this entity, NPCs use this internally to aim at their targets. * * @name EntityFuncs:BodyTarget * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/BodyTarget * @note This only works on players and NPCs. * @param {Entity} this - no description * @param {Vector} origin - The vector of where the the attack comes from. * @param {boolean} noisy - Decides if it should return the centered vector with a random offset to it. * @returns {Vector} - The centered vector. **/ BodyTarget(this: Entity, origin: Vector, noisy?: boolean): Vector /** * * Dispatches blocked events to this entity's blocked handler. This function is only useful when interacting with entities like func_movelinear. * * @name EntityFuncs:Blocked * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/Blocked * @internal * @param {Entity} this - no description * @param {Entity} entity - The entity that is blocking us * @returns {void} **/ Blocked(this: Entity, entity: Entity): void /** * * Returns true if the entity is being looked at by the local player and is within 256 units of distance. * * @name EntityFuncs:BeingLookedAtByLocalPlayer * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/BeingLookedAtByLocalPlayer * @note This function is only available in entities that are based off of sandbox's base_gmodentity * @note This function uses Distance instead of DistToSqr so it may not be suitable in situations where it's called often * @param {Entity} this - no description * @returns {boolean} - Is the entity being looked at by the local player and within 256 units. **/ BeingLookedAtByLocalPlayer(this: Entity): boolean /** * * Spawns a clientside ragdoll for the entity, positioning it in place of the original entity, and makes the entity invisible. It doesn't preserve flex values (face posing) as CSRagdolls don't support flex. * It does not work on players. Use @Player:CreateRagdoll instead. * The original entity is not removed, and neither are any ragdolls previously generated with this function. * To make the entity re-appear, run @EntityFuncs:SetNoDraw( false ) * * @name EntityFuncs:BecomeRagdollOnClient * @realm client * @wiki https://wiki.garrysmod.com/page/Entity/BecomeRagdollOnClient * @param {Entity} this - no description * @returns {CSEnt} - The created ragdoll. **/ BecomeRagdollOnClient(this: Entity): CSEnt /** * * Returns an angle based on the ones inputted that you can use to align an object. * * @name EntityFuncs:AlignAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/AlignAngles * @note This function doesn't change the angle of the entity on its own (see example). * @param {Entity} this - no description * @param {Angle} from - The angle you want to align from * @param {Angle} to - The angle you want to align to * @returns {Angle} - The resulting aligned angle **/ AlignAngles(this: Entity, from: Angle, to: Angle): Angle /** * * Adds a @PhysObj typeect to the entity's motion controller so that @EntityHooks:PhysicsSimulate will be called for given @PhysObj typeect as well. * You must first create a motion controller with @EntityFuncs:StartMotionController. * You can remove added @PhysObj typeects by using @EntityFuncs:RemoveFromMotionController. * * @name EntityFuncs:AddToMotionController * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/AddToMotionController * @note Only works on a scripted @Entity type of anim type * @param {Entity} this - no description * @param {PhysObj} physObj - The @PhysObj type to add to the motion controller. * @returns {void} **/ AddToMotionController(this: Entity, physObj: PhysObj): void /** * * Adds solid flag(s) to the entity. * * @name EntityFuncs:AddSolidFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/AddSolidFlags * @param {Entity} this - no description * @param {FSOLID} flags - The flag(s) to apply, see @FSOLID enum. * @returns {void} **/ AddSolidFlags(this: Entity, flags: FSOLID): void /** * * Adds a gesture animation to the entity and plays it. * See @EntityFuncs:AddGestureSequence for a function that doesn't take priority. * See @EntityFuncs:AddGesture for a function that takes @ACT enum. * * @name EntityFuncs:AddLayeredSequence * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/AddLayeredSequence * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} sequence - The sequence ID to play as the gesture. See @EntityFuncs:LookupSequence. * @param {number} priority - no description * @returns {number} - Layer ID of created layer **/ AddLayeredSequence(this: Entity, sequence: number, priority: number): number /** * * Adds a gesture animation to the entity and plays it. * See @EntityFuncs:AddGesture for a function that takes @ACT enum. * See also @EntityFuncs:AddLayeredSequence. * * @name EntityFuncs:AddGestureSequence * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/AddGestureSequence * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {number} sequence - The sequence ID to play as the gesture. See @EntityFuncs:LookupSequence. * @param {boolean} autokill - no description * @returns {number} - Layer ID of the started gesture, used to manipulate the played gesture by other functions. **/ AddGestureSequence(this: Entity, sequence: number, autokill?: boolean): number /** * * Adds a gesture animation to the entity and plays it. * See @EntityFuncs:AddGestureSequence and @EntityFuncs:AddLayeredSequence for functions that takes sequences instead of @ACT enum. * * @name EntityFuncs:AddGesture * @realm server * @wiki https://wiki.garrysmod.com/page/Entity/AddGesture * @note This function only works on [BaseAnimatingOverlay](https://wiki.garrysmod.com/page/BaseAnimatingOverlay) entites! * @param {Entity} this - no description * @param {ACT} activity - The activity to play as the gesture. See @ACT enum. * @param {boolean} autokill - no description * @returns {number} - Layer ID of the started gesture, used to manipulate the played gesture by other functions. **/ AddGesture(this: Entity, activity: ACT, autokill?: boolean): number /** * * Adds flags to the entity. * * @name EntityFuncs:AddFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/AddFlags * @param {Entity} this - no description * @param {FL} flag - Flag to add, see @FL enum * @returns {void} **/ AddFlags(this: Entity, flag: FL): void /** * * Applies an engine effect to an entity. * See also @EntityFuncs:IsEffectActive and @EntityFuncs:RemoveEffects. * * @name EntityFuncs:AddEffects * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/AddEffects * @param {Entity} this - no description * @param {EF} effect - The effect to apply, see @EF enum. * @returns {void} **/ AddEffects(this: Entity, effect: EF): void /** * * Adds engine flags. * * @name EntityFuncs:AddEFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/AddEFlags * @param {Entity} this - no description * @param {EFL} flag - Engine flag to add, see @EFL enum * @returns {void} **/ AddEFlags(this: Entity, flag: EFL): void /** * * Add a callback function to a specific event. This is used instead of hooks to avoid calling empty functions unnecessarily. * This also allows you to use certain hooks in engine entities (non-scripted entities). * * @name EntityFuncs:AddCallback * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/AddCallback * @warning This method does not check if the function has already been added to this object before, so if you add the same callback twice, it will be run twice! Make sure to add your callback only once. * @param {Entity} this - no description * @param {string} hook - The hook name to hook onto. See [Entity Callbacks](https://wiki.garrysmod.com/page/Entity%20Callbacks) * @param {function} func - The function to call * @returns {number} - The callback ID that was just added, which can later be used in @EntityFuncs:RemoveCallback. * Returns nothing if the passed callback function was invalid or when asking for a non-existent hook. **/ AddCallback(this: Entity, hook: string, func: UnknownFunc): number /** * * Activates the entity. This needs to be used on some entities (like constraints) after being spawned. * * @name EntityFuncs:Activate * @realm client, server * @wiki https://wiki.garrysmod.com/page/Entity/Activate * @note For some entity types when this function is used after @EntityFuncs:SetModelScale, the physics object will be recreated with the new scale. [Source-sdk-2013](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/server/baseanimating.cpp#L321-L327) * @bug #3372 This crashes the game with scaled vehicles. * @param {Entity} this - no description * @returns {void} **/ Activate(this: Entity): void } declare interface EntityHooks { /** * * Called when another entity uses this entity, example would be a player pressing "+use" this entity. * To change how often the function is called, see @EntityFuncs:SetUseType. * * @name EntityHooks:Use * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/Use * @note This hook only works for "nextbot", "ai" and "anim" scripted entity types. * @param {_ENTITY} this - no description * @param {Entity} activator - The entity that caused this input. This will usually be the player who pressed their use key * @param {Entity} caller - The entity responsible for the input. This will typically be the same as *activator* unless some other entity is acting as a proxy * @param {USE} useType - Use type, see @USE enum. * @param {number} value - Any passed value. * @returns {void} **/ Use(this: _ENTITY, activator: Entity, caller: Entity, useType: USE, value: number): void /** * * Called whenever the transmit state should be updated. * * @name EntityHooks:UpdateTransmitState * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/UpdateTransmitState * @param {_ENTITY} this - no description * @returns {TRANSMIT} - Transmit state to set, see @TRANSMIT enum. **/ UpdateTransmitState(this: _ENTITY): TRANSMIT /** * * Triggers all outputs stored using @EntityHooks:StoreOutput. * * @name EntityHooks:TriggerOutput * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/TriggerOutput * @param {_ENTITY} this - no description * @param {string} output - Name of output to fire * @param {Entity} activator - Activator entity * @param {string} data - The data to give to the output. * @returns {void} **/ TriggerOutput(this: _ENTITY, output: string, activator: Entity, data?: string): void /** * * Called every tick for every entity being "touched". * See also @EntityHooks:StartTouch and @EntityHooks:EndTouch. * * @name EntityHooks:Touch * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/Touch * @note For physics enabled entities, this hook will **not** be ran while the entity's physics is asleep. See @PhysObj:Wake. * @warning This only works for **brush** entities and for entities that have @EntityFuncs:SetTrigger set to true. * @param {_ENTITY} this - no description * @param {Entity} entity - The entity that touched it. * @returns {void} **/ Touch(this: _ENTITY, entity: Entity): void /** * * Called every frame on the client. * Called every tick on the server. * * @name EntityHooks:Think * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/Think * @note By default, it runs about 5-6 times per second on the server, but you can force it to run at servers tickrate using the example below. * @param {_ENTITY} this - no description * @returns {boolean} - Return true if you used @EntityFuncs:NextThink to override the next execution time. **/ Think(this: _ENTITY): boolean /** * * Allows you to override trace result when a trace hits the entitys Bounding Box. * * @name EntityHooks:TestCollision * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/TestCollision * @note Your entity must have @EntityFuncs:EnableCustomCollisions enabled for this hook to work * @param {_ENTITY} this - no description * @param {Vector} startpos - Start position of the trace * @param {Vector} delta - Offset from startpos to the endpos of the trace * @param {boolean} isbox - Is the trace a hull trace? * @param {Vector} extents - Size of the hull trace? * @param {CONTENTS} mask - The @CONTENTS enum mask * @returns {table} - A table containing new HitPos, Fraction and Normal. Returning nothing allows the trace to ignore the entity completely. **/ TestCollision(this: _ENTITY, startpos: Vector, delta: Vector, isbox: boolean, extents: Vector, mask: CONTENTS): table /** * * Returns how many seconds we've been doing this current task * * @name EntityHooks:TaskTime * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/TaskTime * @param {_ENTITY} this - no description * @returns {number} - How many seconds we've been doing this current task **/ TaskTime(this: _ENTITY): number /** * * Returns true if the current running Task is finished. * * @name EntityHooks:TaskFinished * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/TaskFinished * @param {_ENTITY} this - no description * @returns {boolean} - Is the current running Task is finished or not. **/ TaskFinished(this: _ENTITY): boolean /** * * Used to store an output so it can be triggered with @EntityHooks:TriggerOutput. * Outputs compiled into a map are passed to entities as key/value pairs through @EntityHooks:KeyValue. * TriggerOutput will do nothing if this function has not been called first. * * @name EntityHooks:StoreOutput * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/StoreOutput * @param {_ENTITY} this - no description * @param {string} name - Name of output to store * @param {string} info - Output info * @returns {void} **/ StoreOutput(this: _ENTITY, name: string, info: string): void /** * * Called when the entity starts touching another entity. * * @name EntityHooks:StartTouch * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/StartTouch * @warning This only works for **brush** entities and for entities that have @EntityFuncs:SetTrigger set to true. * @param {_ENTITY} this - no description * @param {Entity} entity - The entity which is being touched. * @returns {void} **/ StartTouch(this: _ENTITY, entity: Entity): void /** * * Called once on starting task. * * @name EntityHooks:StartTask * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/StartTask * @param {_ENTITY} this - no description * @param {Task} task - The task to start, created by @ai_task.New. * @returns {void} **/ StartTask(this: _ENTITY, task: Task): void /** * * Starts a schedule previously created by @ai_schedule.New. * Not to be confused with @EntityHooks:StartEngineSchedule or @NPC:SetSchedule which start an Engine-based schedule. * * @name EntityHooks:StartSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/StartSchedule * @param {_ENTITY} this - no description * @param {Schedule} sched - Schedule to start. * @returns {void} **/ StartSchedule(this: _ENTITY, sched: Schedule): void /** * * Called when an engine task has been started on the entity. * * @name EntityHooks:StartEngineTask * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/StartEngineTask * @note This hook only exists for **ai** type SENTs * @param {_ENTITY} this - no description * @param {number} taskID - Task ID to start, see [ai_task.h](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/server/ai_task.h#L89-L502) * @param {number} TaskData - Task data * @returns {boolean} - true to stop default action **/ StartEngineTask(this: _ENTITY, taskID: number, TaskData: number): boolean /** * * This is the spawn function. It's called when a player spawns the entity from the spawnmenu. * If you want to make your SENT spawnable you need this function to properly create the entity. * * @name EntityHooks:SpawnFunction * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/SpawnFunction * @warning Unlike other ENTITY functions, the "self" parameter of this function is not an entity but rather the table used to generate the SENT. This table is equivalent to @scripted_ents.GetStored("ent_name"). * @param {_ENTITY} this - no description * @param {Player} ply - The player that is spawning this SENT * @param {TraceResult} tr - A @TraceResult structure from player eyes to their aim position * @param {string} ClassName - The classname of your entity * @returns {void} **/ SpawnFunction(this: _ENTITY, ply: Player, tr: TraceResult, ClassName: string): void /** * * Starts an engine schedule. * * @name EntityHooks:StartEngineSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/StartEngineSchedule * @param {_ENTITY} this - no description * @param {SCHED} scheduleID - Schedule ID to start. See @SCHED enum * @returns {void} **/ StartEngineSchedule(this: _ENTITY, scheduleID: SCHED): void /** * * Called when the entity should set up its [ Data Tables](https://wiki.garrysmod.com/page/Networking%20Entities). * This is a much better option than using Set/Get Networked Values. * This hook is called after @GamemodeHooks:OnEntityCreated and @GamemodeHooks:NetworkEntityCreated. * * @name EntityHooks:SetupDataTables * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/SetupDataTables * @param {_ENTITY} this - no description * @returns {void} **/ SetupDataTables(this: _ENTITY): void /** * * Sets the current task. * * @name EntityHooks:SetTask * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/SetTask * @param {_ENTITY} this - no description * @param {table} task - The task to set. * @returns {void} **/ SetTask(this: _ENTITY, task: table): void /** * * Toggles automatic frame advancing for animated sequences on an entity. * This has the same effect as setting the **ENT.AutomaticFrameAdvance** property. * * @name EntityHooks:SetAutomaticFrameAdvance * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/SetAutomaticFrameAdvance * @param {_ENTITY} this - no description * @param {boolean} enable - Whether or not to set automatic frame advancing. * @returns {void} **/ SetAutomaticFrameAdvance(this: _ENTITY, enable: boolean): void /** * * Set the schedule we should be playing right now. * * @name EntityHooks:SelectSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/SelectSchedule * @param {_ENTITY} this - no description * @param {number} iNPCState - no description * @returns {void} **/ SelectSchedule(this: _ENTITY, iNPCState: number): void /** * * Called whenever a schedule is finished. * * @name EntityHooks:ScheduleFinished * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/ScheduleFinished * @param {_ENTITY} this - no description * @returns {void} **/ ScheduleFinished(this: _ENTITY): void /** * * Called every think on running task. * The actual task function should tell us when the task is finished. * * @name EntityHooks:RunTask * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/RunTask * @param {_ENTITY} this - no description * @param {table} task - The task to run * @returns {void} **/ RunTask(this: _ENTITY, task: table): void /** * * Called when an engine task is ran on the entity. * * @name EntityHooks:RunEngineTask * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/RunEngineTask * @note This hook only exists for **ai** type SENTs * @param {_ENTITY} this - no description * @param {number} taskID - The task ID, see [ai_task.h](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/server/ai_task.h#L89-L502) * @param {number} taskData - The task data. * @returns {boolean} - true to prevent default action **/ RunEngineTask(this: _ENTITY, taskID: number, taskData: number): boolean /** * * Called from the engine every 0.1 seconds. * * @name EntityHooks:RunAI * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/RunAI * @param {_ENTITY} this - no description * @returns {void} **/ RunAI(this: _ENTITY): void /** * * Called instead of the engine drawing function of the entity. This hook works on any entity (scripted or not) it is applied on. * This does not work on "physgun_beam", use @GamemodeHooks:DrawPhysgunBeam instead. * * @name EntityHooks:RenderOverride * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/ENTITY/RenderOverride * @note As a downside of this implementation, only one RenderOverride may be applied at a time. * @bug #3292 Drawing a viewmodel in this function will cause @GamemodeHooks:PreDrawViewModel, @WeaponHooks:PreDrawViewModel, @WeaponHooks:ViewModelDrawn, @GamemodeHooks:PostDrawViewModel, and @WeaponHooks:PostDrawViewModel to be called twice. * @bug #3299 This is called before PrePlayerDraw for players. If this function exists at all on a player, their worldmodel will always be rendered regardless of PrePlayerDraw's return. * @param {_ENTITY} this - no description * @returns {void} **/ RenderOverride(this: _ENTITY): void /** * * Called before the duplicator copies the entity. * If you are looking for a way to make the duplicator spawn another entity when duplicated. ( For example, you duplicate a "prop_physics", but you want the duplicator to spawn "prop_physics_my" ), you should add prop_physics.ClassOverride = "prop_physics_my". The duplication table should be also stored on that prop_physics, not on prop_physics_my. * * @name EntityHooks:PreEntityCopy * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/PreEntityCopy * @param {_ENTITY} this - no description * @returns {void} **/ PreEntityCopy(this: _ENTITY): void /** * * Called after the @duplicator library pastes the entity, after the bone/entity modifiers have been applied to the entity. * This hook is called after @EntityHooks:OnDuplicated. * * @name EntityHooks:PostEntityPaste * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/PostEntityPaste * @note The keys of each value in this table are the original entity indexes when the duplication was created. This can be utilized to restore entity references that don't get saved in duplications. * @warning This may not be a valid player in some circumstances. For example, when a save is loaded from the main menu, this hook will be called before the player is spawned. This argument will be a NULL entity in that case. * @bug This will be nil for invalid players. * @param {_ENTITY} this - no description * @param {Player} ply - The player who pasted the entity. * @param {Entity} ent - The entity itself. Same as 'self'. * @param {table} createdEntities - All entities that are within the placed dupe. * @returns {void} **/ PostEntityPaste(this: _ENTITY, ply: Player, ent: Entity, createdEntities: table): void /** * * Called after the duplicator finished copying the entity. * See also @EntityHooks:PreEntityCopy and @EntityHooks:PostEntityPaste. * * @name EntityHooks:PostEntityCopy * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/PostEntityCopy * @param {_ENTITY} this - no description * @returns {void} **/ PostEntityCopy(this: _ENTITY): void /** * * Called whenever the physics of the entity are updated. * * @name EntityHooks:PhysicsUpdate * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/PhysicsUpdate * @warning This hook won't be called if the Entity's @PhysObj type goes asleep * @param {_ENTITY} this - no description * @param {PhysObj} phys - The physics object of the entity. * @returns {void} **/ PhysicsUpdate(this: _ENTITY, phys: PhysObj): void /** * * Called from the Entity's motion controller to simulate physics. * This will only be called after using @EntityFuncs:StartMotionController on a scripted entity of "anim" type. * * @name EntityHooks:PhysicsSimulate * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/PhysicsSimulate * @note This hook can work on the CLIENT if you call @EntityFuncs:StartMotionController and use @EntityFuncs:AddToMotionController on the physics objects you want to control * @warning Do not use functions such as @PhysObj:EnableCollisions or @PhysObj:EnableGravity in this hook as they're very likely to crash your game. You may want to use @EntityHooks:PhysicsUpdate instead. * @param {_ENTITY} this - no description * @param {PhysObj} phys - The physics object of the entity. * @param {number} deltaTime - Time since the last call. * @returns {Vector} - Angular force * @returns {Vector} - Linear force * @returns {SIM} - One of the @SIM enum. * @tupleReturn **/ PhysicsSimulate(this: _ENTITY, phys: PhysObj, deltaTime: number): [Vector, Vector, SIM] /** * * Called when the entity collides with anything. The move type and solid type must be VPHYSICS for the hook to be called. * * @name EntityHooks:PhysicsCollide * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/PhysicsCollide * @note If you want to use this hook on default/engine/non-Lua entites ( like prop_physics ), use @EntityFuncs:AddCallback instead! This page describes a hook for Lua entities * @param {_ENTITY} this - no description * @param {CollisionData} colData - Information regarding the collision. See @CollisionData structure. * @param {PhysObj} collider - The physics object that collided. * @returns {void} **/ PhysicsCollide(this: _ENTITY, colData: CollisionData, collider: PhysObj): void /** * * Polls whenever the entity should trigger the brush. * * @name EntityHooks:PassesTriggerFilters * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/PassesTriggerFilters * @warning This hook is broken and will not work without code below * @param {_ENTITY} this - no description * @param {Entity} ent - The entity that is about to trigger. * @returns {boolean} - Should trigger or not. **/ PassesTriggerFilters(this: _ENTITY, ent: Entity): boolean /** * * Called by @EntityFuncs:PassesFilter and engine entities to determine whether an entity passes this filter's filter. * * @name EntityHooks:PassesFilter * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/PassesFilter * @note This hook only works for "filter" type SENTs. * @param {_ENTITY} this - no description * @param {Entity} trigger - The 'caller' entity, the one that wants to know if the entity passes the filter * @param {Entity} ent - The entity in question that is being tested * @returns {boolean} - Whether the entity passes the filter ( true ) or not ( false ) **/ PassesFilter(this: _ENTITY, trigger: Entity, ent: Entity): boolean /** * * Called by @EntityFuncs:PassesDamageFilter and engine entities to determine whether an entity passes this filter's damage filter. * * @name EntityHooks:PassesDamageFilter * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/PassesDamageFilter * @note This hook only works for "filter" type SENTs. * @param {_ENTITY} this - no description * @param {CTakeDamageInfo} dmg - Damage to test. * @returns {boolean} - Whether the entity passes the damage filter ( true ) or not. ( false ) **/ PassesDamageFilter(this: _ENTITY, dmg: CTakeDamageInfo): boolean /** * * Called from the engine when TaskComplete is called. * This allows us to move onto the next task - even when TaskComplete was called from an engine side task. * * @name EntityHooks:OnTaskComplete * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnTaskComplete * @param {_ENTITY} this - no description * @returns {void} **/ OnTaskComplete(this: _ENTITY): void /** * * Called when the entity is taking damage. * * @name EntityHooks:OnTakeDamage * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnTakeDamage * @warning Calling @EntityFuncs:TakeDamage, @EntityFuncs:TakeDamageInfo, @EntityFuncs:DispatchTraceAttack, or @Player:TraceHullAttack (if the entity is hit) in this hook on the victim entity can cause infinite loops since the hook will be called again. Make sure to setup recursion safeguards like the example below. * @param {_ENTITY} this - no description * @param {CTakeDamageInfo} damage - The damage to be applied to the entity. * @returns {void} **/ OnTakeDamage(this: _ENTITY, damage: CTakeDamageInfo): void /** * * Called when the entity is reloaded from a Source Engine save (not the Sandbox saves or dupes) or on a changelevel (for example Half-Life 2 campaign level transitions). * For the @duplicator library callbacks, see @EntityHooks:OnDuplicated. * * @name EntityHooks:OnRestore * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnRestore * @param {_ENTITY} this - no description * @returns {void} **/ OnRestore(this: _ENTITY): void /** * * Called when the entity is about to be removed. * See also @EntityFuncs:CallOnRemove, which can even be used on engine (non-Lua) entities. * ==Clientside behaviour remarks== * This hook may be called at odd times (when entity has actually not yet been removed from the server). This happens during fullupdate with the @EntityHooks:Initialize function not being called even when the entity reappears. * You can debug this behaviour by enabling cheats and running **cl_fullupdate** on the client. * @GamemodeHooks:NotifyShouldTransmit can be used to circumvent this problem. @EntityHooks:Think can also be used to detect that the entity has reappeared. You may reinitialize any necessary data in these hooks. * * @name EntityHooks:OnRemove * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnRemove * @validate * @param {_ENTITY} this - no description * @returns {void} **/ OnRemove(this: _ENTITY): void /** * * Called when the entity is reloaded by the lua auto-refresh system, i.e. when the developer edits the lua file for the entity while the game is running. * * @name EntityHooks:OnReloaded * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnReloaded * @param {_ENTITY} this - no description * @returns {void} **/ OnReloaded(this: _ENTITY): void /** * * Called after duplicator finishes saving the entity, allowing you to modify the save data. * This is called after @EntityHooks:PostEntityCopy. * * @name EntityHooks:OnEntityCopyTableFinish * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnEntityCopyTableFinish * @param {_ENTITY} this - no description * @param {EntityCopyData} data - The save @EntityCopyData structure that you can modify. * @returns {void} **/ OnEntityCopyTableFinish(this: _ENTITY, data: EntityCopyData): void /** * * Called on any entity after it has been created by the @duplicator library and before any bone/entity modifiers have been applied. * This hook is called after @EntityHooks:Initialize and before @EntityHooks:PostEntityPaste. * * @name EntityHooks:OnDuplicated * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnDuplicated * @param {_ENTITY} this - no description * @param {EntityCopyData} entTable - @EntityCopyData structure of the source entity. * @returns {void} **/ OnDuplicated(this: _ENTITY, entTable: EntityCopyData): void /** * * Called each time the NPC updates its condition. * * @name EntityHooks:OnCondition * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/OnCondition * @param {_ENTITY} this - no description * @param {number} conditionID - The ID of condition. See @NPC:ConditionName. * @returns {void} **/ OnCondition(this: _ENTITY, conditionID: number): void /** * * Start the next task in specific schedule. * * @name EntityHooks:NextTask * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/NextTask * @param {_ENTITY} this - no description * @param {table} sched - The schedule to start next task in. * @returns {void} **/ NextTask(this: _ENTITY, sched: table): void /** * * Called when the engine sets a value for this scripted entity. * See @GamemodeHooks:EntityKeyValue for a hook that works for all entities. * See @WeaponHooks:KeyValue for a hook that works for scripted weapons. * * @name EntityHooks:KeyValue * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/KeyValue * @param {_ENTITY} this - no description * @param {string} key - The key that was affected. * @param {string} value - The new value. * @returns {boolean} - Return true to suppress this KeyValue or return false or nothing to apply this key value. **/ KeyValue(this: _ENTITY, key: string, value: string): boolean /** * * Called when deciding if the Scripted NPC should be able to perform a certain jump or not. * * @name EntityHooks:IsJumpLegal * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/IsJumpLegal * @note This is only called for "ai" type entities * @param {_ENTITY} this - no description * @param {Vector} startPos - Start of the jump * @param {Vector} apex - Apex point of the jump * @param {Vector} endPos - The landing position * @returns {boolean} - Return true if this jump should be allowed to be performed, false otherwise. * Not returning anything, or returning a non boolean will perform the default action. **/ IsJumpLegal(this: _ENTITY, startPos: Vector, apex: Vector, endPos: Vector): boolean /** * * Called when the entity is created. This is called when you @EntityFuncs:Spawn the custom entity. * This is called **after** @EntityHooks:SetupDataTables and @GamemodeHooks:OnEntityCreated. * * @name EntityHooks:Initialize * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/Initialize * @bug #2732 This is sometimes not called clientside. You can work around this by setting a variable in Initialize and check if it exists in @EntityHooks:Think. See the example below. * @param {_ENTITY} this - no description * @returns {void} **/ Initialize(this: _ENTITY): void /** * * Called when a bullet trace hits this entity and allows you to override the default behavior by returning true. * * @name EntityHooks:ImpactTrace * @realm client * @wiki https://wiki.garrysmod.com/page/ENTITY/ImpactTrace * @param {_ENTITY} this - no description * @param {TraceResult} traceResult - The trace that hit this entity as a @TraceResult structure. * @param {DMG} damageType - The damage bits associated with the trace, see @DMG enum * @param {string} customImpactName - The effect name to override the impact effect with. * Possible arguments are ImpactJeep, AirboatGunImpact, HelicopterImpact, ImpactGunship. * @returns {boolean} - Return true to override the default impact effects. **/ ImpactTrace(this: _ENTITY, traceResult: TraceResult, damageType: DMG, customImpactName?: string): boolean /** * * Called before firing serverside animation events, such as weapon reload, drawing and holstering for NPCs, scripted sequences, etc. * See @EntityHooks:FireAnimationEvent for the clientside version. * * @name EntityHooks:HandleAnimEvent * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/HandleAnimEvent * @note This hook only works on "anim", "ai" and "nextbot" type entities. * @param {_ENTITY} this - no description * @param {number} event - The event ID of happened even. See [this page](http://developer.valvesoftware.com/wiki/Animation_Events). * @param {number} eventTime - The absolute time this event occurred using @CurTime function. * @param {number} cycle - The frame this event occurred as a number between 0 and 1. * @param {number} type - Event type. See [the Source SDK](https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/eventlist.h#L14-L23). * @param {string} options - Name or options of this event. * @returns {void} **/ HandleAnimEvent(this: _ENTITY, event: number, eventTime: number, cycle: number, type: number, options: string): void /** * * Called when this entity is about to be punted with the gravity gun (primary fire). * Only works in Sandbox derived gamemodes and only if @GamemodeHooks:GravGunPunt is not overridden. * * @name EntityHooks:GravGunPunt * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/GravGunPunt * @param {_ENTITY} this - no description * @param {Player} ply - The player pressing left-click with the gravity gun at an entity * @returns {boolean} - Return true or false to enable or disable punting respectively. **/ GravGunPunt(this: _ENTITY, ply: Player): boolean /** * * Called by @GamemodeHooks:GravGunPickupAllowed on ALL entites in Sandbox-derived gamemodes and acts as an override. * * @name EntityHooks:GravGunPickupAllowed * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/GravGunPickupAllowed * @param {_ENTITY} this - no description * @param {Player} ply - The player aiming at us * @returns {boolean} - Return true to allow the entity to be picked up **/ GravGunPickupAllowed(this: _ENTITY, ply: Player): boolean /** * * Specify a mesh that should be rendered instead of this SENT's model. * * @name EntityHooks:GetRenderMesh * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/ENTITY/GetRenderMesh * @param {_ENTITY} this - no description * @returns {IEntityHooksGetRenderMeshReturn} - A table containing the following keys: **/ GetRenderMesh(this: _ENTITY): IEntityHooksGetRenderMeshReturn /** * * Called when scripted NPC needs to check how he "feels" against another entity, such as when @NPC:Disposition is called. * * @name EntityHooks:GetRelationship * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/GetRelationship * @param {_ENTITY} this - no description * @param {Entity} ent - The entity in question * @returns {D} - How our scripter NPC "feels" towards the entity in question. See @D enum. **/ GetRelationship(this: _ENTITY, ent: Entity): D /** * * Called to determine how good an NPC is at using a particular weapon. * [Category:ENT_AI_Hooks](https://wiki.garrysmod.com/page/Category:ENT_AI_Hooks) * * @name EntityHooks:GetAttackSpread * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/GetAttackSpread * @note "ai" base only * @param {_ENTITY} this - no description * @param {Entity} wep - The weapon being used by the NPC. * @param {Entity} target - The target the NPC is attacking * @returns {number} - The number of degrees of inaccuracy in the NPC's attack. **/ GetAttackSpread(this: _ENTITY, wep: Entity, target: Entity): number /** * * Called before firing clientside animation events, such as muzzle flashes or shell ejections. * See @EntityHooks:HandleAnimEvent for the serverside version. * * @name EntityHooks:FireAnimationEvent * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/ENTITY/FireAnimationEvent * @note This hook only works on "anim", "nextbot" and "ai" type entities. * @param {_ENTITY} this - no description * @param {Vector} pos - Position of the effect * @param {Angle} ang - Angle of the effect * @param {number} event - The event ID of happened even. See [this page](http://developer.valvesoftware.com/wiki/Animation_Events). * @param {string} name - Name of the event * @returns {boolean} - Return true to disable the effect **/ FireAnimationEvent(this: _ENTITY, pos: Vector, ang: Angle, event: number, name: string): boolean /** * * Called when an NPC's expression has finished. * * @name EntityHooks:ExpressionFinished * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/ExpressionFinished * @validate * @param {_ENTITY} this - no description * @param {string} strExp - The path of the expression. * @returns {void} **/ ExpressionFinished(this: _ENTITY, strExp: string): void /** * * Called whenever an engine schedule is finished. * * @name EntityHooks:EngineScheduleFinish * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/EngineScheduleFinish * @param {_ENTITY} this - no description * @returns {void} **/ EngineScheduleFinish(this: _ENTITY): void /** * * Called when the entity stops touching another entity. * * @name EntityHooks:EndTouch * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/EndTouch * @warning This only works for **brush** entities and for entities that have @EntityFuncs:SetTrigger set to true. * @param {_ENTITY} this - no description * @param {Entity} entity - The entity which was touched. * @returns {void} **/ EndTouch(this: _ENTITY, entity: Entity): void /** * * Called when the entity should be drawn translucently. * * @name EntityHooks:DrawTranslucent * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/ENTITY/DrawTranslucent * @param {_ENTITY} this - no description * @param {STUDIO} flags - The bit flags from @STUDIO enum * @returns {void} **/ DrawTranslucent(this: _ENTITY, flags: STUDIO): void /** * * Called if and when the entity should be drawn opaquely, based on the @EntityFuncs:GetRenderGroup of the entity. * See @IEntity structure and @RENDERGROUP enum for more information. * See also @EntityHooks:DrawTranslucent. * * @name EntityHooks:Draw * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/ENTITY/Draw * @param {_ENTITY} this - no description * @param {STUDIO} flags - The bit flags from @STUDIO enum * @returns {void} **/ Draw(this: _ENTITY, flags: STUDIO): void /** * * Runs a Lua schedule. Runs tasks inside the schedule. * [Category:ENT_AI_Hooks](https://wiki.garrysmod.com/page/Category:ENT_AI_Hooks) * * @name EntityHooks:DoSchedule * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/DoSchedule * @param {_ENTITY} this - no description * @param {table} sched - The schedule to run. * @returns {void} **/ DoSchedule(this: _ENTITY, sched: table): void /** * * Called whenever an engine schedule is being ran. * * @name EntityHooks:DoingEngineSchedule * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/DoingEngineSchedule * @param {_ENTITY} this - no description * @returns {void} **/ DoingEngineSchedule(this: _ENTITY): void /** * * Called so the entity can override the bullet impact effects it makes. * * @name EntityHooks:DoImpactEffect * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/DoImpactEffect * @note This hook only works for the "anim" type entities. * @param {_ENTITY} this - no description * @param {TraceResult} tr - A @TraceResult structure from the bullet's start point to the impact point * @param {DMG} damageType - The damage type of bullet. See @DMG enum * @returns {boolean} - Return true to not do the default thing - which is to call UTIL_ImpactTrace in C++ **/ DoImpactEffect(this: _ENTITY, tr: TraceResult, damageType: DMG): boolean /** * * Called just before @EntityHooks:Initialize for "ai" type entities only. * * @name EntityHooks:CreateSchedulesInternal * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/CreateSchedulesInternal * @internal * @param {_ENTITY} this - no description * @returns {void} **/ CreateSchedulesInternal(this: _ENTITY): void /** * * Controls if a property can be used on this entity or not. * This hook will only work in Sandbox derived gamemodes that do not have @SandboxHooks:CanProperty overridden. * * @name EntityHooks:CanProperty * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/CanProperty * @note This hook will work on ALL entities, not just the scripted ones (SENTs) * @param {_ENTITY} this - no description * @param {Player} ply - Player, that tried to use the property * @param {string} property - Class of the property that is tried to use, for example - bonemanipulate * @returns {boolean} - Return false to disallow using that property, return true to allow. * You must return a value. Not returning anything can cause unexpected results. **/ CanProperty(this: _ENTITY, ply: Player, property: string): boolean /** * * Called whenever the entity's position changes. A callback for when an entity's angle changes is available via @EntityFuncs:AddCallback. * Like @EntityHooks:RenderOverride, this hook works on any entity (scripted or not) it is applied on. * * @name EntityHooks:CalcAbsolutePosition * @predicted false * @realm client, server * @wiki https://wiki.garrysmod.com/page/ENTITY/CalcAbsolutePosition * @note If EFL_DIRTY_ABSTRANSFORM is set on the entity, this will be called serverside only; otherwise, this will be called clientside only. This means serverside calls of @EntityFuncs:SetPos without the EFL_DIRTY_ABSTRANSFORM flag enabled (most cases) will be called clientside only. * @note The give concommand will call this hook serverside only upon entity spawn. * @param {_ENTITY} this - no description * @param {Vector} pos - The entity's actual position. May differ from @EntityFuncs:GetPos * @param {Angle} ang - The entity's actual angles. May differ from @EntityFuncs:GetAngles * @returns {Vector} - New position * @returns {Angle} - New angles * @tupleReturn **/ CalcAbsolutePosition(this: _ENTITY, pos: Vector, ang: Angle): [Vector, Angle] /** * * Called when the entity is blocked. * * @name EntityHooks:Blocked * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/Blocked * @note This only works for entities with MOVETYPE_PUSH as their @EntityFuncs:SetMoveType * @param {_ENTITY} this - no description * @param {Entity} other - The entity that is blocking this entity. * @returns {void} **/ Blocked(this: _ENTITY, other: Entity): void /** * * Called when another entity fires an event to this entity. * * @name EntityHooks:AcceptInput * @predicted false * @realm server * @wiki https://wiki.garrysmod.com/page/ENTITY/AcceptInput * @param {_ENTITY} this - no description * @param {string} inputName - The name of the input that was triggered. * @param {Entity} activator - The initial cause for the input getting triggered. (EG the player who pushed a button) * @param {Entity} caller - The entity that directly triggered the input. (EG the button that was pushed) * @param {string} data - The data passed. * @returns {boolean} - Should we suppress the default action for this input? **/ AcceptInput(this: _ENTITY, inputName: string, activator: Entity, caller: Entity, data: string): boolean } declare interface EffectHooks { /** * @name EffectHooks:Touch * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/Touch * @param {_EFFECT} this - no description * @returns {void} **/ Touch(this: _EFFECT): void /** * @name EffectHooks:StartTouch * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/StartTouch * @param {_EFFECT} this - no description * @returns {void} **/ StartTouch(this: _EFFECT): void /** * * Called when the effect should think, return false to kill the effect. * * @name EffectHooks:Think * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/Think * @param {_EFFECT} this - no description * @returns {boolean} - Return false to remove this effect. **/ Think(this: _EFFECT): boolean /** * * Called when the effect should be rendered. * * @name EffectHooks:Render * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/Render * @param {_EFFECT} this - no description * @returns {void} **/ Render(this: _EFFECT): void /** * * Called when the effect collides with anything. * * @name EffectHooks:PhysicsCollide * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/PhysicsCollide * @param {_EFFECT} this - no description * @param {CollisionData} colData - Information regarding the collision. See @CollisionData structure * @param {PhysObj} collider - The physics object of the entity that collided with the effect. * @returns {void} **/ PhysicsCollide(this: _EFFECT, colData: CollisionData, collider: PhysObj): void /** * * Used to get the "real" start position of a trace, for weapon tracer effects. * "real" meaning in 3rd person, the 3rd person position will be used, in first person the first person position will be used. * * @name EffectHooks:GetTracerShootPos * @predicted false * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/GetTracerShootPos * @note Please note that it is expected that the same attachment ID is used on both, the world and the view model. * @param {_EFFECT} this - no description * @param {Vector} pos - Default position if we fail * @param {Weapon} ent - The weapon to use. * @param {number} attachment - Attachment ID of on the weapon "muzzle", to use as the start position. * @returns {Vector} - The "real" start position. **/ GetTracerShootPos(this: _EFFECT, pos: Vector, ent: Weapon, attachment: number): Vector /** * * Called when the effect is created. * * @name EffectHooks:Init * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/Init * @param {_EFFECT} this - no description * @param {CEffectData} effectData - The effect data used to create the effect. * @returns {void} **/ Init(this: _EFFECT, effectData: CEffectData): void /** * @name EffectHooks:EndTouch * @realm client * @wiki https://wiki.garrysmod.com/page/EFFECT/EndTouch * @param {_EFFECT} this - no description * @returns {void} **/ EndTouch(this: _EFFECT): void } declare interface DVScrollBar extends Panel { /** * * Should return nil in all cases. See @DVScrollBar:GetScroll. * * @name DVScrollBar:Value * @wiki https://wiki.garrysmod.com/page/DVScrollBar/Value * @param {DVScrollBar} this - no description * @returns {any} - no description **/ Value(this: DVScrollBar): any /** * * Sets up the scrollbar for use. * The scrollbar will automatically disable itself if the total height of the canvas is lower than the height of the panel that holds the canvas during this function call. * * @name DVScrollBar:SetUp * @wiki https://wiki.garrysmod.com/page/DVScrollBar/SetUp * @param {DVScrollBar} this - no description * @param {number} barSize - The size of the panel that holds the canvas, basically size of "1 page". * @param {number} cavasSize - The total size of the canvas, this typically is the bigger number. * @returns {void} **/ SetUp(this: DVScrollBar, barSize: number, cavasSize: number): void /** * * Sets the scroll level in pixels. * * @name DVScrollBar:SetScroll * @wiki https://wiki.garrysmod.com/page/DVScrollBar/SetScroll * @param {DVScrollBar} this - no description * @param {number} scroll - no description * @returns {void} **/ SetScroll(this: DVScrollBar, scroll: number): void /** * * Allows hiding the up and down buttons for better visual stylisation. * * @name DVScrollBar:SetHideButtons * @wiki https://wiki.garrysmod.com/page/DVScrollBar/SetHideButtons * @param {DVScrollBar} this - no description * @param {boolean} hide - True to hide * @returns {void} **/ SetHideButtons(this: DVScrollBar, hide: boolean): void /** * * Called from within @DScrollBarGrip type * * @name DVScrollBar:Grip * @wiki https://wiki.garrysmod.com/page/DVScrollBar/Grip * @internal * @param {DVScrollBar} this - no description * @returns {void} **/ Grip(this: DVScrollBar): void /** * * Returns the amount of scroll level from the top in pixels * * @name DVScrollBar:GetScroll * @wiki https://wiki.garrysmod.com/page/DVScrollBar/GetScroll * @param {DVScrollBar} this - no description * @returns {number} - The amount of scroll level from the top **/ GetScroll(this: DVScrollBar): number /** * * Returns whether or not the manual up/down scroll buttons are visible or not. Set by @DVScrollBar:SetHideButtons. * * @name DVScrollBar:GetHideButtons * @wiki https://wiki.garrysmod.com/page/DVScrollBar/GetHideButtons * @param {DVScrollBar} this - no description * @returns {boolean} - Whether or not the manual up/down scroll buttons are visible or not. **/ GetHideButtons(this: DVScrollBar): boolean /** * * Returns the negative of @DVScrollBar:GetScroll. * * @name DVScrollBar:GetOffset * @wiki https://wiki.garrysmod.com/page/DVScrollBar/GetOffset * @param {DVScrollBar} this - no description * @returns {number} - no description **/ GetOffset(this: DVScrollBar): number /** * @name DVScrollBar:BarScale * @wiki https://wiki.garrysmod.com/page/DVScrollBar/BarScale * @param {DVScrollBar} this - no description * @returns {number} - no description **/ BarScale(this: DVScrollBar): number /** * * Smoothly scrolls to given level. * * @name DVScrollBar:AnimateTo * @wiki https://wiki.garrysmod.com/page/DVScrollBar/AnimateTo * @param {DVScrollBar} this - no description * @param {number} scroll - The scroll level to animate to. In pixels from the top ( from 0 ) * @param {number} length - Length of the animation in seconds * @param {number} delay - Delay of the animation in seconds * @param {number} ease - See @Panel:NewAnimation for explanation. * @returns {void} **/ AnimateTo(this: DVScrollBar, scroll: number, length: number, delay?: number, ease?: number): void /** * * Adds specified amount of scroll in pixels. * * @name DVScrollBar:AddScroll * @wiki https://wiki.garrysmod.com/page/DVScrollBar/AddScroll * @param {DVScrollBar} this - no description * @param {number} add - How much to scroll downwards. Can be negative for upwards scroll * @returns {boolean} - True if the scroll level was changed (i.e. if we did or did not scroll) **/ AddScroll(this: DVScrollBar, add: number): boolean } declare interface DVerticalDivider extends DPanel { /** * * Causes the user to start dragging the divider. * * @name DVerticalDivider:StartGrab * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/StartGrab * @internal * @param {DVerticalDivider} this - no description * @returns {void} **/ StartGrab(this: DVerticalDivider): void /** * * Sets the height of the top content panel. * The height of the bottom content panel is automatically calculated by taking the total height of the @DVerticalDivider type and subtracting it with the height of the top content panel and the divider bar. * * @name DVerticalDivider:SetTopHeight * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetTopHeight * @param {DVerticalDivider} this - no description * @param {number} height - The height of the top content panel. * @returns {void} **/ SetTopHeight(this: DVerticalDivider, height: number): void /** * * Sets the maximum height of the top content panel. This is ignored if the panel would exceed the minimum bottom content panel height set from @DVerticalDivider:SetBottomMin. * * @name DVerticalDivider:SetTopMax * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetTopMax * @param {DVerticalDivider} this - no description * @param {number} height - The maximum height of the top content panel. Default is 4096. * @returns {void} **/ SetTopMax(this: DVerticalDivider, height: number): void /** * * Sets the minimum height of the top content panel. * * @name DVerticalDivider:SetTopMin * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetTopMin * @param {DVerticalDivider} this - no description * @param {number} height - The minimum height of the top content panel. Default is 50. * @returns {void} **/ SetTopMin(this: DVerticalDivider, height: number): void /** * * Sets the passed panel as the top content of the @DVerticalDivider type. * * @name DVerticalDivider:SetTop * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetTop * @param {DVerticalDivider} this - no description * @param {Panel} pnl - The panel to set as the top content. * @returns {void} **/ SetTop(this: DVerticalDivider, pnl: Panel): void /** * * Sets the local Y position of where the user starts dragging the divider. * * @name DVerticalDivider:SetHoldPos * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetHoldPos * @internal * @param {DVerticalDivider} this - no description * @param {number} y - The local Y position where divider dragging has started. * @returns {void} **/ SetHoldPos(this: DVerticalDivider, y: number): void /** * * Sets whether the divider is being dragged or not. * * @name DVerticalDivider:SetDragging * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetDragging * @internal * @param {DVerticalDivider} this - no description * @param {boolean} isDragging - Setting this to true causes cursor movement to alter the position of the divider. * @returns {void} **/ SetDragging(this: DVerticalDivider, isDragging: boolean): void /** * * Places the passed panel in between the top and bottom content panels of the @DVerticalDivider type. * * @name DVerticalDivider:SetMiddle * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetMiddle * @param {DVerticalDivider} this - no description * @param {Panel} pnl - The panel to set as the middle content. * @returns {void} **/ SetMiddle(this: DVerticalDivider, pnl: Panel): void /** * * Sets the height of the divider bar between the top and bottom content panels of the @DVerticalDivider type. * * @name DVerticalDivider:SetDividerHeight * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetDividerHeight * @param {DVerticalDivider} this - no description * @param {number} height - The height of the divider bar. * @returns {void} **/ SetDividerHeight(this: DVerticalDivider, height: number): void /** * * Sets the minimum height of the bottom content panel. * * @name DVerticalDivider:SetBottomMin * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetBottomMin * @param {DVerticalDivider} this - no description * @param {number} height - The minimum height of the bottom content panel. Default is 50. * @returns {void} **/ SetBottomMin(this: DVerticalDivider, height: number): void /** * * Sets the passed panel as the bottom content of the @DVerticalDivider type. * * @name DVerticalDivider:SetBottom * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/SetBottom * @param {DVerticalDivider} this - no description * @param {Panel} pnl - The panel to set as the bottom content. * @returns {void} **/ SetBottom(this: DVerticalDivider, pnl: Panel): void /** * * Returns the minimum height of the top content panel. * * @name DVerticalDivider:GetTopMin * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetTopMin * @param {DVerticalDivider} this - no description * @returns {number} - The minimum height of the top content panel. **/ GetTopMin(this: DVerticalDivider): number /** * * Returns the maximum height of the top content panel. See @DVerticalDivider:SetTopMax for more information. * * @name DVerticalDivider:GetTopMax * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetTopMax * @param {DVerticalDivider} this - no description * @returns {number} - The maximum height of the top content panel. **/ GetTopMax(this: DVerticalDivider): number /** * * Returns the current height of the top content panel set by @DVerticalDivider:SetTopHeight or by the user. * * @name DVerticalDivider:GetTopHeight * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetTopHeight * @param {DVerticalDivider} this - no description * @returns {number} - The current height of the @DVerticalDivider type. **/ GetTopHeight(this: DVerticalDivider): number /** * * Returns the top content panel of the @DVerticalDivider type. * * @name DVerticalDivider:GetTop * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetTop * @param {DVerticalDivider} this - no description * @returns {Panel} - The top content panel. **/ GetTop(this: DVerticalDivider): Panel /** * * Returns the middle content panel of the @DVerticalDivider type. * * @name DVerticalDivider:GetMiddle * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetMiddle * @param {DVerticalDivider} this - no description * @returns {Panel} - The middle content panel. **/ GetMiddle(this: DVerticalDivider): Panel /** * * Returns the local Y position of where the user starts dragging the divider. * * @name DVerticalDivider:GetHoldPos * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetHoldPos * @internal * @param {DVerticalDivider} this - no description * @returns {number} - The local Y position where divider dragging has started. **/ GetHoldPos(this: DVerticalDivider): number /** * * Returns whether the divider is being dragged or not. * * @name DVerticalDivider:GetDragging * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetDragging * @param {DVerticalDivider} this - no description * @returns {boolean} - If true, mouse movement will alter the size of the divider. **/ GetDragging(this: DVerticalDivider): boolean /** * * Returns the height of the divider bar between the top and bottom content panels of the @DVerticalDivider type. * * @name DVerticalDivider:GetDividerHeight * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetDividerHeight * @param {DVerticalDivider} this - no description * @returns {number} - The height of the divider bar. **/ GetDividerHeight(this: DVerticalDivider): number /** * * Returns the minimum height of the bottom content panel. * * @name DVerticalDivider:GetBottomMin * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetBottomMin * @param {DVerticalDivider} this - no description * @returns {number} - The minimum height of the bottom content panel. **/ GetBottomMin(this: DVerticalDivider): number /** * * Returns the bottom content panel of the @DVerticalDivider type. * * @name DVerticalDivider:GetBottom * @wiki https://wiki.garrysmod.com/page/DVerticalDivider/GetBottom * @param {DVerticalDivider} this - no description * @returns {Panel} - The bottom content panel. **/ GetBottom(this: DVerticalDivider): Panel } declare interface DTree_Node extends DPanel { /** * * Returns whether or not the @DTree type this node is in has icons enabled. * See @DTree:ShowIcons for more info. * * @name DTree_Node:ShowIcons * @wiki https://wiki.garrysmod.com/page/DTree Node/ShowIcons * @param {DTree_Node} this - no description * @returns {number} - Whether the icons are shown or not **/ ShowIcons(this: DTree_Node): number /** * * Sets the search wildcard. * Use @DTree_Node:MakeFolder instead * * @name DTree_Node:SetWildCard * @wiki https://wiki.garrysmod.com/page/DTree Node/SetWildCard * @internal * @param {DTree_Node} this - no description * @param {string} wildcard - The wildcard to set * @returns {void} **/ SetWildCard(this: DTree_Node, wildcard: string): void /** * * Currently does nothing, not implemented. * * @name DTree_Node:SetupCopy * @wiki https://wiki.garrysmod.com/page/DTree Node/SetupCopy * @param {DTree_Node} this - no description * @returns {void} **/ SetupCopy(this: DTree_Node): void /** * * Sets whether or not nodes for files should be added when populating the node from filesystem. * * @name DTree_Node:SetShowFiles * @wiki https://wiki.garrysmod.com/page/DTree Node/SetShowFiles * @internal * @param {DTree_Node} this - no description * @param {boolean} showFiles - no description * @returns {void} **/ SetShowFiles(this: DTree_Node, showFiles: boolean): void /** * * Called automatically to update the "selected" status of this node. * * @name DTree_Node:SetSelected * @wiki https://wiki.garrysmod.com/page/DTree Node/SetSelected * @internal * @param {DTree_Node} this - no description * @param {boolean} selected - Whether this node is currently selected or not. * @returns {void} **/ SetSelected(this: DTree_Node, selected: boolean): void /** * * Sets the root node (the @DTree type) of this node. * This is set automatically, you shouldn't use this. * * @name DTree_Node:SetRoot * @wiki https://wiki.garrysmod.com/page/DTree Node/SetRoot * @internal * @param {DTree_Node} this - no description * @param {Panel} root - The panel to set as root node. * @returns {void} **/ SetRoot(this: DTree_Node, root: Panel): void /** * * Sets the path ID ([File Search Paths](https://wiki.garrysmod.com/page/File%20Search%20Paths)) for populating the tree from the filesystem. * Use @DTree_Node:MakeFolder instead. * * @name DTree_Node:SetPathID * @wiki https://wiki.garrysmod.com/page/DTree Node/SetPathID * @internal * @param {DTree_Node} this - no description * @param {string} path - The path ID to set. * @returns {void} **/ SetPathID(this: DTree_Node, path: string): void /** * * Sets the parent node of this node. Not the same as @Panel:SetParent. * This is set automatically, you shouldn't use this. * * @name DTree_Node:SetParentNode * @wiki https://wiki.garrysmod.com/page/DTree Node/SetParentNode * @internal * @param {DTree_Node} this - no description * @param {Panel} parent - The panel to set as a parent node for this node * @returns {void} **/ SetParentNode(this: DTree_Node, parent: Panel): void /** * * Sets whether or not the node needs populating from the filesystem. * * @name DTree_Node:SetNeedsPopulating * @wiki https://wiki.garrysmod.com/page/DTree Node/SetNeedsPopulating * @internal * @param {DTree_Node} this - no description * @param {boolean} needs - Whether or not the node needs populating * @returns {void} **/ SetNeedsPopulating(this: DTree_Node, needs: boolean): void /** * @name DTree_Node:SetNeedsChildSearch * @wiki https://wiki.garrysmod.com/page/DTree Node/SetNeedsChildSearch * @internal * @param {DTree_Node} this - no description * @param {boolean} newState - no description * @returns {void} **/ SetNeedsChildSearch(this: DTree_Node, newState: boolean): void /** * * Called automatically to set whether this node is the last child on this level or not. * * @name DTree_Node:SetLastChild * @wiki https://wiki.garrysmod.com/page/DTree Node/SetLastChild * @internal * @param {DTree_Node} this - no description * @param {boolean} last - no description * @returns {void} **/ SetLastChild(this: DTree_Node, last: boolean): void /** * * Sets the material for the icon of the @DTree_Node type. * * @name DTree_Node:SetIcon * @wiki https://wiki.garrysmod.com/page/DTree Node/SetIcon * @param {DTree_Node} this - no description * @param {string} path - The path to the material to be used. Do not include "materials/". .pngs are supported. * @returns {void} **/ SetIcon(this: DTree_Node, path: string): void /** * * Sets whether the expand button (little + button) should be shown or hidden. * * @name DTree_Node:SetHideExpander * @wiki https://wiki.garrysmod.com/page/DTree Node/SetHideExpander * @internal * @param {DTree_Node} this - no description * @param {boolean} hide - no description * @returns {void} **/ SetHideExpander(this: DTree_Node, hide: boolean): void /** * * Sets whether or not the expand/collapse button (+/- button) should be shown on this node regardless of whether it has sub-elements or not. * * @name DTree_Node:SetForceShowExpander * @wiki https://wiki.garrysmod.com/page/DTree Node/SetForceShowExpander * @param {DTree_Node} this - no description * @param {boolean} forceShow - no description * @returns {void} **/ SetForceShowExpander(this: DTree_Node, forceShow: boolean): void /** * * Sets the folder to search files and folders in. * Use @DTree_Node:MakeFolder instead. * * @name DTree_Node:SetFolder * @wiki https://wiki.garrysmod.com/page/DTree Node/SetFolder * @internal * @param {DTree_Node} this - no description * @param {string} folder - no description * @returns {void} **/ SetFolder(this: DTree_Node, folder: string): void /** * * Sets the file full filepath to the file attached to this node * * @name DTree_Node:SetFileName * @wiki https://wiki.garrysmod.com/page/DTree Node/SetFileName * @internal * @param {DTree_Node} this - no description * @param {string} filename - no description * @returns {void} **/ SetFileName(this: DTree_Node, filename: string): void /** * * Expands or collapses this node. * * @name DTree_Node:SetExpanded * @wiki https://wiki.garrysmod.com/page/DTree Node/SetExpanded * @param {DTree_Node} this - no description * @param {boolean} expand - Whether to expand (true) or collapse (false) * @param {boolean} surpressAnimation - Whether to play animation (false) or not (true) * @returns {void} **/ SetExpanded(this: DTree_Node, expand: boolean, surpressAnimation?: boolean): void /** * * Sets whether or not this node should draw visual lines. * * @name DTree_Node:SetDrawLines * @wiki https://wiki.garrysmod.com/page/DTree Node/SetDrawLines * @internal * @param {DTree_Node} this - no description * @param {boolean} draw - no description * @returns {void} **/ SetDrawLines(this: DTree_Node, draw: boolean): void /** * * Used to store name for sub elements for a @Panel:Droppable call. * * @name DTree_Node:SetDraggableName * @wiki https://wiki.garrysmod.com/page/DTree Node/SetDraggableName * @internal * @param {DTree_Node} this - no description * @param {string} name - no description * @returns {void} **/ SetDraggableName(this: DTree_Node, name: string): void /** * * Sets whether double clicking the node should expand/collapse it or not. * * @name DTree_Node:SetDoubleClickToOpen * @wiki https://wiki.garrysmod.com/page/DTree Node/SetDoubleClickToOpen * @param {DTree_Node} this - no description * @param {boolean} enable - true to enable, false to disable this functionality. * @returns {void} **/ SetDoubleClickToOpen(this: DTree_Node, enable: boolean): void /** * * Appears to have no effect on the @DTree_Node type. * * @name DTree_Node:SetDirty * @wiki https://wiki.garrysmod.com/page/DTree Node/SetDirty * @param {DTree_Node} this - no description * @param {boolean} dirty - no description * @returns {void} **/ SetDirty(this: DTree_Node, dirty: boolean): void /** * * Called automatically from @DTree_Node:SetExpanded (or when user manually expands the node) to populate the node with sub-nodes from the filesystem if this was enabled via @DTree_Node:MakeFolder. * * @name DTree_Node:PopulateChildrenAndSelf * @wiki https://wiki.garrysmod.com/page/DTree Node/PopulateChildrenAndSelf * @internal * @param {DTree_Node} this - no description * @param {boolean} expand - Expand self once population process is finished. * @returns {void} **/ PopulateChildrenAndSelf(this: DTree_Node, expand: boolean): void /** * * Called automatically from @DTree_Node:PopulateChildrenAndSelf. * * @name DTree_Node:PopulateChildren * @wiki https://wiki.garrysmod.com/page/DTree Node/PopulateChildren * @internal * @param {DTree_Node} this - no description * @returns {void} **/ PopulateChildren(this: DTree_Node): void /** * * Called automatically to perform layout on this node if this node @DTree_Node:IsRootNode. * * @name DTree_Node:PerformRootNodeLayout * @wiki https://wiki.garrysmod.com/page/DTree Node/PerformRootNodeLayout * @internal * @param {DTree_Node} this - no description * @returns {void} **/ PerformRootNodeLayout(this: DTree_Node): void /** * * Called when this or a sub node is selected. Do not use this, it is not for override. * Use @DTree:OnNodeSelected or @DTree_Node:DoClick instead. * * @name DTree_Node:OnNodeSelected * @wiki https://wiki.garrysmod.com/page/DTree Node/OnNodeSelected * @internal * @param {DTree_Node} this - no description * @param {Panel} node - no description * @returns {void} **/ OnNodeSelected(this: DTree_Node, node: Panel): void /** * * Called when sub-nodes of this @DTree_Node type were changed, such as being rearranged if that functionality is enabled. * * @name DTree_Node:OnModified * @wiki https://wiki.garrysmod.com/page/DTree Node/OnModified * @param {DTree_Node} this - no description * @returns {void} **/ OnModified(this: DTree_Node): void /** * * Moves this node to the top of the level. * * @name DTree_Node:MoveToTop * @wiki https://wiki.garrysmod.com/page/DTree Node/MoveToTop * @param {DTree_Node} this - no description * @returns {void} **/ MoveToTop(this: DTree_Node): void /** * * Moves given panel to the top of the children of this node. * Despite name of this function, it cannot move the children to any position but the topmost. * * @name DTree_Node:MoveChildTo * @wiki https://wiki.garrysmod.com/page/DTree Node/MoveChildTo * @param {DTree_Node} this - no description * @param {Panel} node - The node to move. * @returns {void} **/ MoveChildTo(this: DTree_Node, node: Panel): void /** * * Makes this node a folder in the filesystem. This will make it automatically populated. * See also @DTree_Node:AddFolder. * * @name DTree_Node:MakeFolder * @wiki https://wiki.garrysmod.com/page/DTree Node/MakeFolder * @param {DTree_Node} this - no description * @param {string} folder - The folder in the filesystem to use, relative to the garrysmod/ folder. * @param {string} path - The path to search in. See [File Search Paths](https://wiki.garrysmod.com/page/File%20Search%20Paths) * @param {boolean} showFiles - Should files be added as nodes (true) or folders only (false) * @param {string} wildcard - The wildcard to use when searching for files. * @param {boolean} dontForceExpandable - If set to true, don't show the expand buttons on empty nodes. * @returns {void} **/ MakeFolder(this: DTree_Node, folder: string, path: string, showFiles?: boolean, wildcard?: string, dontForceExpandable?: boolean): void /** * * Removes given node as a sub-node of this node. * It doesn't actually remove or unparent the panel, just removes it from the internal @DListView type. * * @name DTree_Node:LeaveTree * @wiki https://wiki.garrysmod.com/page/DTree Node/LeaveTree * @param {DTree_Node} this - no description * @param {Panel} pnl - The node to remove * @returns {void} **/ LeaveTree(this: DTree_Node, pnl: Panel): void /** * * Returns true if @DTree_Node:GetRoot is the same as @DTree_Node:GetParentNode of this node. * * @name DTree_Node:IsRootNode * @wiki https://wiki.garrysmod.com/page/DTree Node/IsRootNode * @param {DTree_Node} this - no description * @returns {boolean} - If this is a root node. **/ IsRootNode(this: DTree_Node): boolean /** * * See @DTree_Node:DoRightClick. * * @name DTree_Node:InternalDoRightClick * @wiki https://wiki.garrysmod.com/page/DTree Node/InternalDoRightClick * @internal * @param {DTree_Node} this - no description * @returns {void} **/ InternalDoRightClick(this: DTree_Node): void /** * * See @DTree_Node:DoClick * * @name DTree_Node:InternalDoClick * @wiki https://wiki.garrysmod.com/page/DTree Node/InternalDoClick * @internal * @param {DTree_Node} this - no description * @returns {void} **/ InternalDoClick(this: DTree_Node): void /** * * Called automatically internally. * Makes the target node compatible with this node's drag'n'drop. * * @name DTree_Node:InstallDraggable * @wiki https://wiki.garrysmod.com/page/DTree Node/InstallDraggable * @internal * @param {DTree_Node} this - no description * @param {DTree_Node} node - The @DTree_Node type. * @returns {void} **/ InstallDraggable(this: DTree_Node, node: DTree_Node): void /** * * Inserts an existing node as a "child" or a sub-node of this node. * Used internally by the drag'n'drop functionality. * * @name DTree_Node:InsertNode * @wiki https://wiki.garrysmod.com/page/DTree Node/InsertNode * @internal * @param {DTree_Node} this - no description * @param {DTree_Node} node - Has to be @DTree_Node type * @returns {void} **/ InsertNode(this: DTree_Node, node: DTree_Node): void /** * * Inserts a sub-node into this node before or after the given node. * * @name DTree_Node:Insert * @wiki https://wiki.garrysmod.com/page/DTree Node/Insert * @param {DTree_Node} this - no description * @param {DTree_Node} node - The @DTree_Node type to insert. * @param {Panel} nodeNextTo - The node to insert the node above before or after. * @param {boolean} before - true to insert before, false to insert after. * @returns {void} **/ Insert(this: DTree_Node, node: DTree_Node, nodeNextTo: Panel, before: boolean): void /** * * Returns whether or not nodes for files should/will be added when populating the node from filesystem. * * @name DTree_Node:GetShowFiles * @wiki https://wiki.garrysmod.com/page/DTree Node/GetShowFiles * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetShowFiles(this: DTree_Node): boolean /** * * Returns the wildcard set by @DTree_Node:MakeFolder. * * @name DTree_Node:GetWildCard * @wiki https://wiki.garrysmod.com/page/DTree Node/GetWildCard * @param {DTree_Node} this - no description * @returns {string} - The search wildcard **/ GetWildCard(this: DTree_Node): string /** * * Returns the root node, the @DTree type this node is under. * See also @DTree_Node:GetParentNode. * * @name DTree_Node:GetRoot * @wiki https://wiki.garrysmod.com/page/DTree Node/GetRoot * @param {DTree_Node} this - no description * @returns {Panel} - The root node **/ GetRoot(this: DTree_Node): Panel /** * * Returns the path ID ([File Search Paths](https://wiki.garrysmod.com/page/File%20Search%20Paths)) used in populating the @DTree type from the filesystem. * See @DTree_Node:SetPathID and @DTree_Node:MakeFolder. * * @name DTree_Node:GetPathID * @wiki https://wiki.garrysmod.com/page/DTree Node/GetPathID * @param {DTree_Node} this - no description * @returns {string} - The Path ID **/ GetPathID(this: DTree_Node): string /** * * Returns whether or not the node is set to be populated from the filesystem. * * @name DTree_Node:GetNeedsPopulating * @wiki https://wiki.garrysmod.com/page/DTree Node/GetNeedsPopulating * @internal * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetNeedsPopulating(this: DTree_Node): boolean /** * * Returns the parent @DTree_Node type. Note that @Panel:GetParent will not be the same! * * @name DTree_Node:GetParentNode * @wiki https://wiki.garrysmod.com/page/DTree Node/GetParentNode * @param {DTree_Node} this - no description * @returns {Panel} - The parent node. **/ GetParentNode(this: DTree_Node): Panel /** * @name DTree_Node:GetNeedsChildSearch * @wiki https://wiki.garrysmod.com/page/DTree Node/GetNeedsChildSearch * @internal * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetNeedsChildSearch(this: DTree_Node): boolean /** * * The height of a single @DTree_Node type of the @DTree type this node belongs to. * Alias of @DTree:GetLineHeight. * * @name DTree_Node:GetLineHeight * @wiki https://wiki.garrysmod.com/page/DTree Node/GetLineHeight * @param {DTree_Node} this - no description * @returns {number} - The height of a single @DTree_Node type. **/ GetLineHeight(this: DTree_Node): number /** * * Returns whether this node is the last child on this level or not. * * @name DTree_Node:GetLastChild * @wiki https://wiki.garrysmod.com/page/DTree Node/GetLastChild * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetLastChild(this: DTree_Node): boolean /** * * Returns the indentation level of the @DTree type this node belongs to. * Alias of @DTree:GetIndentSize, see it for more info. * * @name DTree_Node:GetIndentSize * @wiki https://wiki.garrysmod.com/page/DTree Node/GetIndentSize * @param {DTree_Node} this - no description * @returns {number} - The indentation level. **/ GetIndentSize(this: DTree_Node): number /** * * Returns the image path to the icon of this node. * * @name DTree_Node:GetIcon * @wiki https://wiki.garrysmod.com/page/DTree Node/GetIcon * @param {DTree_Node} this - no description * @returns {string} - The path to the image **/ GetIcon(this: DTree_Node): string /** * * Returns whether the expand button (little + button) should be shown or hidden. * * @name DTree_Node:GetHideExpander * @wiki https://wiki.garrysmod.com/page/DTree Node/GetHideExpander * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetHideExpander(this: DTree_Node): boolean /** * * Returns the folder path to search in, set by @DTree_Node:MakeFolder. * * @name DTree_Node:GetFolder * @wiki https://wiki.garrysmod.com/page/DTree Node/GetFolder * @param {DTree_Node} this - no description * @returns {string} - The folder path. **/ GetFolder(this: DTree_Node): string /** * * Returns whether the expand/collapse button is shown on this node regardless of whether or not it has sub-nodes. * See also @DTree_Node:SetForceShowExpander. * * @name DTree_Node:GetForceShowExpander * @wiki https://wiki.garrysmod.com/page/DTree Node/GetForceShowExpander * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetForceShowExpander(this: DTree_Node): boolean /** * * Returns the filepath of the file attached to this node. * * @name DTree_Node:GetFileName * @wiki https://wiki.garrysmod.com/page/DTree Node/GetFileName * @param {DTree_Node} this - no description * @returns {string} - no description **/ GetFileName(this: DTree_Node): string /** * * Returns whether or not this node is drawing lines * * @name DTree_Node:GetDrawLines * @wiki https://wiki.garrysmod.com/page/DTree Node/GetDrawLines * @internal * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetDrawLines(this: DTree_Node): boolean /** * * Returns what is set by @DTree_Node:SetDraggableName. * * @name DTree_Node:GetDraggableName * @wiki https://wiki.garrysmod.com/page/DTree Node/GetDraggableName * @internal * @param {DTree_Node} this - no description * @returns {string} - no description **/ GetDraggableName(this: DTree_Node): string /** * * Returns whether the double clock to collapse/expand functionality is enabled on this node. * * @name DTree_Node:GetDoubleClickToOpen * @wiki https://wiki.garrysmod.com/page/DTree Node/GetDoubleClickToOpen * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetDoubleClickToOpen(this: DTree_Node): boolean /** * * Returns value set by @DTree_Node:SetDirty. * * @name DTree_Node:GetDirty * @wiki https://wiki.garrysmod.com/page/DTree Node/GetDirty * @param {DTree_Node} this - no description * @returns {boolean} - no description **/ GetDirty(this: DTree_Node): boolean /** * * Returns n-th child node. * Basically an alias of @Panel:GetChild. * * @name DTree_Node:GetChildNode * @wiki https://wiki.garrysmod.com/page/DTree Node/GetChildNode * @param {DTree_Node} this - no description * @param {number} num - The number of the child to get, starting with 0 * @returns {Panel} - The child panel, if valid ID is given **/ GetChildNode(this: DTree_Node, num: number): Panel /** * * Called automatically from @DTree_Node:FilePopulate to actually fill the node with sub-nodes based on set preferences like should files be added, etc. * * @name DTree_Node:FilePopulateCallback * @wiki https://wiki.garrysmod.com/page/DTree Node/FilePopulateCallback * @internal * @param {DTree_Node} this - no description * @param {table} files - A list of files in this folder * @param {table} folders - A list of folder in this folder. * @param {string} foldername - The folder name/path this node represents * @param {string} path - The Path ID search was performed with. See [File Search Paths](https://wiki.garrysmod.com/page/File%20Search%20Paths) * @param {boolean} bAndChildren - Inherited from the **FilePopulate** call. Does nothing * @param {string} wildcard - The wildcard that was given * @returns {void} **/ FilePopulateCallback(this: DTree_Node, files: table, folders: table, foldername: string, path: string, bAndChildren: boolean, wildcard: string): void /** * * Called automatically from @DTree_Node:PopulateChildrenAndSelf and @DTree_Node:PopulateChildren to populate this node with child nodes of files and folders. * * @name DTree_Node:FilePopulate * @wiki https://wiki.garrysmod.com/page/DTree Node/FilePopulate * @internal * @param {DTree_Node} this - no description * @param {boolean} bAndChildren - Does nothing. Set to true if called from @DTree_Node:PopulateChildren. * @param {boolean} bExpand - Expand self once population process is finished. * @returns {void} **/ FilePopulate(this: DTree_Node, bAndChildren: boolean, bExpand: boolean): void /** * * Collapses or expands all nodes from the topmost-level node to this one. * Works opposite of @DTree_Node:ExpandRecurse. * * @name DTree_Node:ExpandTo * @wiki https://wiki.garrysmod.com/page/DTree Node/ExpandTo * @param {DTree_Node} this - no description * @param {boolean} expand - Whether to expand (true) or collapse (false) * @returns {void} **/ ExpandTo(this: DTree_Node, expand: boolean): void /** * * Expands or collapses this node, as well as ALL child nodes of this node. * Works opposite of @DTree_Node:ExpandTo. * * @name DTree_Node:ExpandRecurse * @wiki https://wiki.garrysmod.com/page/DTree Node/ExpandRecurse * @param {DTree_Node} this - no description * @param {boolean} expand - Whether to expand (true) or collapse (false) * @returns {void} **/ ExpandRecurse(this: DTree_Node, expand: boolean): void /** * * Called when the node is clicked. * See also @DTree_Node:DoRightClick. * * @name DTree_Node:DoClick * @wiki https://wiki.garrysmod.com/page/DTree Node/DoClick * @param {DTree_Node} this - no description * @returns {boolean} - Return true to prevent DoClick from being called on parent nodes or the @DTree type itself. **/ DoClick(this: DTree_Node): boolean /** * * Called when the node is right clicked. * See also @DTree_Node:DoClick. * * @name DTree_Node:DoRightClick * @wiki https://wiki.garrysmod.com/page/DTree Node/DoRightClick * @param {DTree_Node} this - no description * @returns {boolean} - Return true to prevent DoRightClick from being called on parent nodes or the @DTree type itself. **/ DoRightClick(this: DTree_Node): boolean /** * * Called automatically to update the status of @DTree_Node:GetLastChild on children of this node. * * @name DTree_Node:DoChildrenOrder * @wiki https://wiki.garrysmod.com/page/DTree Node/DoChildrenOrder * @internal * @param {DTree_Node} this - no description * @returns {void} **/ DoChildrenOrder(this: DTree_Node): void /** * * Creates the container @DListLayout type for the @DTree_Node types. * This is called automatically so you don't have to. * * @name DTree_Node:CreateChildNodes * @wiki https://wiki.garrysmod.com/page/DTree Node/CreateChildNodes * @internal * @param {DTree_Node} this - no description * @returns {void} **/ CreateChildNodes(this: DTree_Node): void /** * * Create and returns a copy of this node, including all the sub-nodes. * * @name DTree_Node:Copy * @wiki https://wiki.garrysmod.com/page/DTree Node/Copy * @param {DTree_Node} this - no description * @returns {DTree_Node} - The copied @DTree_Node type. **/ Copy(this: DTree_Node): DTree_Node /** * * Cleans up the internal table of items (sub-nodes) of this node from invalid panels or sub-nodes that were moved from this node to another. * Appears the be completely unused by the game on its own. * * @name DTree_Node:CleanList * @wiki https://wiki.garrysmod.com/page/DTree Node/CleanList * @param {DTree_Node} this - no description * @returns {void} **/ CleanList(this: DTree_Node): void /** * * Called when a child node is expanded or collapsed to propagate this event to parent nodes to update layout. * * @name DTree_Node:ChildExpanded * @wiki https://wiki.garrysmod.com/page/DTree Node/ChildExpanded * @internal * @param {DTree_Node} this - no description * @param {boolean} expanded - no description * @returns {void} **/ ChildExpanded(this: DTree_Node, expanded: boolean): void /** * * Internal function that handles the expand/collapse animations. * * @name DTree_Node:AnimSlide * @wiki https://wiki.garrysmod.com/page/DTree Node/AnimSlide * @internal * @param {DTree_Node} this - no description * @param {table} anim - no description * @param {number} delta - no description * @param {table} data - no description * @returns {void} **/ AnimSlide(this: DTree_Node, anim: table, delta: number, data: table): void /** * * Adds the given panel to the child nodes list, a @DListLayout type. * * @name DTree_Node:AddPanel * @wiki https://wiki.garrysmod.com/page/DTree Node/AddPanel * @internal * @param {DTree_Node} this - no description * @param {Panel} pnl - The panel to add. * @returns {void} **/ AddPanel(this: DTree_Node, pnl: Panel): void /** * * Add a child node to the DTree_Node * * @name DTree_Node:AddNode * @wiki https://wiki.garrysmod.com/page/DTree Node/AddNode * @param {DTree_Node} this - no description * @param {string} name - Name of the node. * @param {string} icon - The icon that will show nexto the node in the DTree. * @returns {DTree_Node} - Returns the created @DTree_Node type panel. **/ AddNode(this: DTree_Node, name: string, icon?: string): DTree_Node /** * * A helper function that adds a new node and calls to @DTree_Node:MakeFolder on it. * * @name DTree_Node:AddFolder * @wiki https://wiki.garrysmod.com/page/DTree Node/AddFolder * @param {DTree_Node} this - no description * @param {string} name - The name of the new node * @param {string} folder - The folder in the filesystem to use, relative to the garrysmod/ folder. * @param {string} path - The path to search in. See [File Search Paths](https://wiki.garrysmod.com/page/File%20Search%20Paths) * @param {boolean} showFiles - Should files be added as nodes (true) or folders only (false) * @param {string} wildcard - The wildcard to use when searching for files. * @param {boolean} bDontForceExpandable - no description * @returns {void} **/ AddFolder(this: DTree_Node, name: string, folder: string, path: string, showFiles?: boolean, wildcard?: string, bDontForceExpandable?: boolean): void } declare interface DTree extends DScrollPanel { /** * * Returns whether or not the [Silkicons](https://wiki.garrysmod.com/page/Silkicons) next to each node of the DTree will be displayed. * Alias of @DTree:GetShowIcons. * * @name DTree:ShowIcons * @wiki https://wiki.garrysmod.com/page/DTree/ShowIcons * @param {DTree} this - no description * @returns {boolean} - Whether or not the silkicons next to each node will be displayed. **/ ShowIcons(this: DTree): boolean /** * * Sets whether or not the [Silkicons](https://wiki.garrysmod.com/page/Silkicons) next to each node of the DTree will be displayed. * Individual icons can be set with @DTree_Node:SetIcon or passed as the second argument in @DTree:AddNode. * * @name DTree:SetShowIcons * @wiki https://wiki.garrysmod.com/page/DTree/SetShowIcons * @param {DTree} this - no description * @param {boolean} show - Whether or not to show icons. * @returns {void} **/ SetShowIcons(this: DTree, show: boolean): void /** * * Sets the height of each @DTree_Node type in the tree. * The default value is 17. * * @name DTree:SetLineHeight * @wiki https://wiki.garrysmod.com/page/DTree/SetLineHeight * @param {DTree} this - no description * @param {number} h - The height to set. * @returns {void} **/ SetLineHeight(this: DTree, h: number): void /** * * Sets the indentation size of the @DTree type, the distance between each "level" of the tree is offset on the left from the previous level. * Currently this feature has no effect on the @DTree type element. * * @name DTree:SetIndentSize * @wiki https://wiki.garrysmod.com/page/DTree/SetIndentSize * @param {DTree} this - no description * @param {number} size - The new indentation size. * @returns {void} **/ SetIndentSize(this: DTree, size: number): void /** * * Set the currently selected top-level node. * * @name DTree:SetSelectedItem * @wiki https://wiki.garrysmod.com/page/DTree/SetSelectedItem * @param {DTree} this - no description * @param {DTree_Node} node - @DTree_Node type to select. * @returns {void} **/ SetSelectedItem(this: DTree, node: DTree_Node): void /** * * Enables the "click when drag-hovering" functionality. * If enabled, when hovering over any @DTree_Node type of this @DTree type while dragging a panel, the node will be automatically clicked on (and subsequently @DTree:OnNodeSelected will be called) to open any attached panels, such as spawnlists in spawnmenu. * See also: @PanelHooks:DragHoverClick. * * @name DTree:SetClickOnDragHover * @wiki https://wiki.garrysmod.com/page/DTree/SetClickOnDragHover * @param {DTree} this - no description * @param {boolean} enable - no description * @returns {void} **/ SetClickOnDragHover(this: DTree, enable: boolean): void /** * * Does nothing. Is not called by the @DTree type itself. * Used as a placeholder empty function alongside @DTree:ExpandTo, @DTree:MoveChildTo and @DTree:ChildExpanded to prevent errors when @DTree_Node:SetExpanded is incorrectly used on a @DTree type. * * @name DTree:SetExpanded * @wiki https://wiki.garrysmod.com/page/DTree/SetExpanded * @internal * @param {DTree} this - no description * @param {boolean} bExpand - no description * @returns {void} **/ SetExpanded(this: DTree, bExpand: boolean): void /** * * Returns the root @DTree_Node type, the node that is the parent to all other nodes of the DTree. * * @name DTree:Root * @wiki https://wiki.garrysmod.com/page/DTree/Root * @param {DTree} this - no description * @returns {Panel} - Root node. **/ Root(this: DTree): Panel /** * * This function is called when a node within a tree is selected. * * @name DTree:OnNodeSelected * @wiki https://wiki.garrysmod.com/page/DTree/OnNodeSelected * @param {DTree} this - no description * @param {Panel} node - The node that was selected. * @returns {void} **/ OnNodeSelected(this: DTree, node: Panel): void /** * * Moves given node to the top of @DTree types children. (Makes it the topmost mode) * Used as a placeholder function alongside @DTree:ExpandTo, @DTree:SetExpanded and @DTree:ChildExpanded. * The @DTree type acts a root node and methods with the same name in @DTree_Node type call to the parent. * * @name DTree:MoveChildTo * @wiki https://wiki.garrysmod.com/page/DTree/MoveChildTo * @param {DTree} this - no description * @param {Panel} child - The node to move * @param {number} pos - Unused, does nothing. * @returns {void} **/ MoveChildTo(this: DTree, child: Panel, pos: number): void /** * * Returns whether or not the [Silkicons](https://wiki.garrysmod.com/page/Silkicons) next to each node of the DTree will be displayed. * Individual icons can be set with @DTree_Node:SetIcon or passed as the second argument in @DTree:AddNode. * * @name DTree:GetShowIcons * @wiki https://wiki.garrysmod.com/page/DTree/GetShowIcons * @param {DTree} this - no description * @returns {boolean} - Whether or not the silkicons next to each node will be displayed. **/ GetShowIcons(this: DTree): boolean /** * * Returns the currently selected node. * * @name DTree:GetSelectedItem * @wiki https://wiki.garrysmod.com/page/DTree/GetSelectedItem * @param {DTree} this - no description * @returns {Panel} - Curently selected node. **/ GetSelectedItem(this: DTree): Panel /** * * Does nothing. * * @name DTree:LayoutTree * @wiki https://wiki.garrysmod.com/page/DTree/LayoutTree * @param {DTree} this - no description * @returns {void} **/ LayoutTree(this: DTree): void /** * * Returns the height of each @DTree_Node type in the tree. * * @name DTree:GetLineHeight * @wiki https://wiki.garrysmod.com/page/DTree/GetLineHeight * @param {DTree} this - no description * @returns {number} - The height of each @DTree_Node type in the tree. **/ GetLineHeight(this: DTree): number /** * * Returns the indentation size of the @DTree type, the distance between each "level" of the tree is offset on the left from the previous level. * Currently this feature has no effect on the @DTree type element. * * @name DTree:GetIndentSize * @wiki https://wiki.garrysmod.com/page/DTree/GetIndentSize * @param {DTree} this - no description * @returns {number} - The indentation size. **/ GetIndentSize(this: DTree): number /** * * Returns the status of @DTree:SetClickOnDragHover. See that for more info. * * @name DTree:GetClickOnDragHover * @wiki https://wiki.garrysmod.com/page/DTree/GetClickOnDragHover * @param {DTree} this - no description * @returns {boolean} - no description **/ GetClickOnDragHover(this: DTree): boolean /** * * Does nothing. Used as a placeholder empty function alongside @DTree:MoveChildTo, @DTree:SetExpanded and @DTree:ChildExpanded. * The @DTree type acts a root node and methods with the same name in @DTree_Node type call to the parent. * * @name DTree:ExpandTo * @wiki https://wiki.garrysmod.com/page/DTree/ExpandTo * @internal * @param {DTree} this - no description * @param {boolean} bExpand - no description * @returns {void} **/ ExpandTo(this: DTree, bExpand: boolean): void /** * * Called when the any node is right clicked. Called by @DTree_Node:DoRightClick. * * @name DTree:DoRightClick * @wiki https://wiki.garrysmod.com/page/DTree/DoRightClick * @param {DTree} this - no description * @returns {void} **/ DoRightClick(this: DTree): void /** * * Called when the any node is clicked. Called by @DTree_Node:DoClick. * * @name DTree:DoClick * @wiki https://wiki.garrysmod.com/page/DTree/DoClick * @param {DTree} this - no description * @returns {void} **/ DoClick(this: DTree): void /** * * Calls directly to @Panel:InvalidateLayout. * Called by @DTree_Node types when a sub element has been expanded or collapsed. * Used as a placeholder function alongside @DTree:ExpandTo, @DTree:SetExpanded and @DTree:MoveChildTo. * The @DTree type acts a root node and methods with the same name in @DTree_Node type call to the parent. * * @name DTree:ChildExpanded * @wiki https://wiki.garrysmod.com/page/DTree/ChildExpanded * @internal * @param {DTree} this - no description * @param {boolean} bExpand - no description * @returns {void} **/ ChildExpanded(this: DTree, bExpand: boolean): void /** * * Add a node to the DTree * * @name DTree:AddNode * @wiki https://wiki.garrysmod.com/page/DTree/AddNode * @param {DTree} this - no description * @param {string} name - Name of the option. * @param {string} icon - The icon that will show nexto the node in the DTree. * @returns {DTree_Node} - Returns the created @DTree_Node type panel. **/ AddNode(this: DTree, name: string, icon?: string): DTree_Node } declare interface DTooltip extends DLabel { /** * * What Panel you want put inside of the @DTooltip type * * @name DTooltip:SetContents * @wiki https://wiki.garrysmod.com/page/DTooltip/SetContents * @note You can only have one Panel at a time; use Parenting to add more * @param {DTooltip} this - no description * @param {Panel} panel - Contents * @param {boolean} bDelete - If set to true, the panel in the first argument will be automatically removed when @DTooltip type is closed via @DTooltip:Close. * @returns {void} **/ SetContents(this: DTooltip, panel: Panel, bDelete?: boolean): void /** * * Positions the @DTooltip type so it doesn't stay in the same draw position. * * @name DTooltip:PositionTooltip * @wiki https://wiki.garrysmod.com/page/DTooltip/PositionTooltip * @internal * @param {DTooltip} this - no description * @returns {void} **/ PositionTooltip(this: DTooltip): void /** * * Sets up the tooltip for display for given panel and starts the timer. * * @name DTooltip:OpenForPanel * @wiki https://wiki.garrysmod.com/page/DTooltip/OpenForPanel * @param {DTooltip} this - no description * @param {Panel} pnl - no description * @returns {void} **/ OpenForPanel(this: DTooltip, pnl: Panel): void /** * * Used to draw a triangle beneath the @DTooltip type * * @name DTooltip:DrawArrow * @wiki https://wiki.garrysmod.com/page/DTooltip/DrawArrow * @note Requires @DTooltip:SetContents, without this it will error * @param {DTooltip} this - no description * @param {number} x - arrow location on the x axis * @param {number} y - arrow location on the y axis * @returns {void} **/ DrawArrow(this: DTooltip, x: number, y: number): void /** * * Forces the tooltip to close. This will remove the panel. * * @name DTooltip:Close * @wiki https://wiki.garrysmod.com/page/DTooltip/Close * @param {DTooltip} this - no description * @returns {void} **/ Close(this: DTooltip): void } declare interface DTileLayout extends DDragBase { /** * * Called to set the occupied state of a tile. * * @name DTileLayout:SetTile * @wiki https://wiki.garrysmod.com/page/DTileLayout/SetTile * @internal * @param {DTileLayout} this - no description * @param {number} x - The x coordinate of the tile. * @param {number} y - The y coordinate of the tile. * @param {any} state - The new state of the tile, normally *1* or *nil*. * @returns {void} **/ SetTile(this: DTileLayout, x: number, y: number, state: any): void /** * * Sets the spacing between 2 elements in the @DTileLayout type on the Y axis. * * @name DTileLayout:SetSpaceY * @wiki https://wiki.garrysmod.com/page/DTileLayout/SetSpaceY * @param {DTileLayout} this - no description * @param {number} spaceY - no description * @returns {void} **/ SetSpaceY(this: DTileLayout, spaceY: number): void /** * * Sets the spacing between 2 elements in the @DTileLayout type on the X axis. * * @name DTileLayout:SetSpaceX * @wiki https://wiki.garrysmod.com/page/DTileLayout/SetSpaceX * @param {DTileLayout} this - no description * @param {number} spacingX - no description * @returns {void} **/ SetSpaceX(this: DTileLayout, spacingX: number): void /** * * Determines the minimum height the DTileLayout will resize to. This is useful if child panels will be added/removed often. * * @name DTileLayout:SetMinHeight * @wiki https://wiki.garrysmod.com/page/DTileLayout/SetMinHeight * @param {DTileLayout} this - no description * @param {number} minH - The minimum height the panel can shrink to. * @returns {void} **/ SetMinHeight(this: DTileLayout, minH: number): void /** * * Sets the spacing between the border/edge of the @DTileLayout type and all the elements inside. * * @name DTileLayout:SetBorder * @wiki https://wiki.garrysmod.com/page/DTileLayout/SetBorder * @param {DTileLayout} this - no description * @param {number} border - no description * @returns {void} **/ SetBorder(this: DTileLayout, border: number): void /** * * Sets the size of a single tile. If a child panel is larger than this size, it will occupy several tiles. * If you are setting the size of the children properly then you probably don't need to change this. * * @name DTileLayout:SetBaseSize * @wiki https://wiki.garrysmod.com/page/DTileLayout/SetBaseSize * @param {DTileLayout} this - no description * @param {number} size - The size of each tile. It is recommended you use 2^n (*16, 32, 64...*) numbers, and those above *4*, as numbers lower than this will result in many tiles being processed and therefore slow operation. * @returns {void} **/ SetBaseSize(this: DTileLayout, size: number): void /** * * Called by @PanelHooks:PerformLayout to arrange and lay out the child panels, if it has changed in size. * * @name DTileLayout:LayoutTiles * @wiki https://wiki.garrysmod.com/page/DTileLayout/LayoutTiles * @internal * @param {DTileLayout} this - no description * @returns {void} **/ LayoutTiles(this: DTileLayout): void /** * * Called when anything is dropped on or rearranged within the DTileLayout. * * @name DTileLayout:OnModified * @wiki https://wiki.garrysmod.com/page/DTileLayout/OnModified * @param {DTileLayout} this - no description * @returns {void} **/ OnModified(this: DTileLayout): void /** * * Resets the last width/height info, and invalidates the panel's layout, causing it to recalculate all child positions. It is called whenever a child is added or removed, and can be called to refresh the panel. * * @name DTileLayout:Layout * @wiki https://wiki.garrysmod.com/page/DTileLayout/Layout * @param {DTileLayout} this - no description * @returns {void} **/ Layout(this: DTileLayout): void /** * * Gets the occupied state of a tile. * * @name DTileLayout:GetTile * @wiki https://wiki.garrysmod.com/page/DTileLayout/GetTile * @internal * @param {DTileLayout} this - no description * @param {number} x - The x coordinate of the tile. * @param {number} y - The y coordinate of the tile. * @returns {any} - The occupied state of the tile, normally *1* or *nil*. **/ GetTile(this: DTileLayout, x: number, y: number): any /** * * Returns the X axis spacing between 2 elements set by @DTileLayout:SetSpaceX. * * @name DTileLayout:GetSpaceX * @wiki https://wiki.garrysmod.com/page/DTileLayout/GetSpaceX * @param {DTileLayout} this - no description * @returns {number} - no description **/ GetSpaceX(this: DTileLayout): number /** * * Returns the Y axis spacing between 2 elements set by @DTileLayout:SetSpaceY. * * @name DTileLayout:GetSpaceY * @wiki https://wiki.garrysmod.com/page/DTileLayout/GetSpaceY * @param {DTileLayout} this - no description * @returns {number} - no description **/ GetSpaceY(this: DTileLayout): number /** * * Returns the border spacing set by @DTileLayout:SetBorder. * * @name DTileLayout:GetBorder * @wiki https://wiki.garrysmod.com/page/DTileLayout/GetBorder * @param {DTileLayout} this - no description * @returns {number} - no description **/ GetBorder(this: DTileLayout): number /** * * Returns the minimum height the DTileLayout can resize to. * * @name DTileLayout:GetMinHeight * @wiki https://wiki.garrysmod.com/page/DTileLayout/GetMinHeight * @param {DTileLayout} this - no description * @returns {number} - The minimum height the panel can shrink to. **/ GetMinHeight(this: DTileLayout): number /** * * Determines if a group of tiles is vacant. * * @name DTileLayout:FitsInTile * @wiki https://wiki.garrysmod.com/page/DTileLayout/FitsInTile * @internal * @param {DTileLayout} this - no description * @param {number} x - The x coordinate of the first tile. * @param {number} y - The y coordinate of the first tile. * @param {number} w - The width needed. * @param {number} h - The height needed. * @returns {boolean} - Whether or not this group is available for occupation. **/ FitsInTile(this: DTileLayout, x: number, y: number, w: number, h: number): boolean /** * * Returns the size of each single tile, set with @DTileLayout:SetBaseSize. * * @name DTileLayout:GetBaseSize * @wiki https://wiki.garrysmod.com/page/DTileLayout/GetBaseSize * @param {DTileLayout} this - no description * @returns {number} - Base tile size. **/ GetBaseSize(this: DTileLayout): number /** * * Creates copies of all the children from the given panel object and parents them to this one. * * @name DTileLayout:CopyContents * @wiki https://wiki.garrysmod.com/page/DTileLayout/CopyContents * @param {DTileLayout} this - no description * @param {Panel} source - The source panel from which to copy all children. * @returns {void} **/ CopyContents(this: DTileLayout, source: Panel): void /** * * Finds the coordinates of the first group of free tiles that fit the given size. * * @name DTileLayout:FindFreeTile * @wiki https://wiki.garrysmod.com/page/DTileLayout/FindFreeTile * @internal * @param {DTileLayout} this - no description * @param {number} x - The x coordinate to start looking from. * @param {number} y - The y coordinate to start looking from. * @param {number} w - The needed width. * @param {number} h - The needed height. * @returns {number} - The x coordinate of the found available space. * @returns {number} - The y coordinate of the found available space. * @tupleReturn **/ FindFreeTile(this: DTileLayout, x: number, y: number, w: number, h: number): [number, number] /** * * Creates and returns an exact copy of the DTileLayout. * * @name DTileLayout:Copy * @wiki https://wiki.garrysmod.com/page/DTileLayout/Copy * @param {DTileLayout} this - no description * @returns {Panel} - The created copy. **/ Copy(this: DTileLayout): Panel /** * * Called to designate a range of tiles as occupied by a panel. * * @name DTileLayout:ConsumeTiles * @wiki https://wiki.garrysmod.com/page/DTileLayout/ConsumeTiles * @internal * @param {DTileLayout} this - no description * @param {number} x - The x coordinate of the top-left corner of the panel. * @param {number} y - The y coordinate of the top-left corner of the panel. * @param {number} w - The panel's width. * @param {number} h - The panel's height. * @returns {void} **/ ConsumeTiles(this: DTileLayout, x: number, y: number, w: number, h: number): void /** * * Clears the panel's tile table. Used by @DTileLayout:LayoutTiles. * * @name DTileLayout:ClearTiles * @wiki https://wiki.garrysmod.com/page/DTileLayout/ClearTiles * @internal * @param {DTileLayout} this - no description * @returns {void} **/ ClearTiles(this: DTileLayout): void } declare interface DTextEntry extends TextEntry { /** * * Sets the text of the @DTextEntry type and calls @DTextEntry:OnValueChange. * * @name DTextEntry:SetValue * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetValue * @param {DTextEntry} this - no description * @param {string | number} text - The value to set. * @returns {void} **/ SetValue(this: DTextEntry, text: string | number): void /** * * Sets whether we should fire @DTextEntry:OnValueChange every time we type or delete a character or only when Enter is pressed. * * @name DTextEntry:SetUpdateOnType * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetUpdateOnType * @param {DTextEntry} this - no description * @param {boolean} updateOnType - no description * @returns {void} **/ SetUpdateOnType(this: DTextEntry, updateOnType: boolean): void /** * * Allow you to add a hint. * * @name DTextEntry:SetPlaceholderText * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetPlaceholderText * @param {DTextEntry} this - no description * @param {string} text - no description * @returns {void} **/ SetPlaceholderText(this: DTextEntry, text?: string): void /** * * Sets the text color of the @DTextEntry type. * * @name DTextEntry:SetTextColor * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetTextColor * @param {DTextEntry} this - no description * @param {Color} color - The text color. Uses the @IColor structure. * @returns {void} **/ SetTextColor(this: DTextEntry, color: Color): void /** * * Allow you to set placeholder color. * * @name DTextEntry:SetPlaceholderColor * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetPlaceholderColor * @param {DTextEntry} this - no description * @param {Color} color - The color of the placeholder. * @returns {void} **/ SetPlaceholderColor(this: DTextEntry, color?: Color): void /** * * Changes the font of the DTextEntry. * * @name DTextEntry:SetFont * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetFont * @param {DTextEntry} this - no description * @param {string} font - The name of the font to be changed to. * @returns {void} **/ SetFont(this: DTextEntry, font: string): void /** * * Sets whether or not to decline non-numeric characters as input. * Numeric characters are 1234567890.- * * @name DTextEntry:SetNumeric * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetNumeric * @param {DTextEntry} this - no description * @param {boolean} numericOnly - Whether to accept only numeric characters. * @returns {void} **/ SetNumeric(this: DTextEntry, numericOnly: boolean): void /** * * Sets whether pressing the Enter key will cause the DTextEntry to lose focus or not, provided it is not multiline. This is true by default. * * @name DTextEntry:SetEnterAllowed * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetEnterAllowed * @param {DTextEntry} this - no description * @param {boolean} allowEnter - If set to false, pressing Enter will not cause the panel to lose focus and will never call @DTextEntry:OnEnter. * @returns {void} **/ SetEnterAllowed(this: DTextEntry, allowEnter: boolean): void /** * * Disables Input on a DTextEntry. This differs from @DTextEntry:SetDisabled - SetEditable will not affect the appearance of the textbox. * * @name DTextEntry:SetEditable * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetEditable * @param {DTextEntry} this - no description * @param {boolean} enabled - Whether the DTextEntry should be editable * @returns {void} **/ SetEditable(this: DTextEntry, enabled: boolean): void /** * * Disables input on a DTextEntry and greys it out visually. This differs from @DTextEntry:SetEditable which doesn't visually change the textbox. * * @name DTextEntry:SetDisabled * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetDisabled * @param {DTextEntry} this - no description * @param {boolean} disabled - Whether the textbox should be disabled * @returns {void} **/ SetDisabled(this: DTextEntry, disabled: boolean): void /** * * Called internally when the text changes of the @DTextEntry type are applied. (And set to the attached console variable, if one is given) * See also @DTextEntry:OnChange for a function that is called on every text change, even if the console variable is not updated. * You should override this function to define custom behavior when the text changes. * This method is called: * * When Enter is pressed after typing * * When @DTextEntry:SetValue is used * * For every key typed - only if @DTextEntry:SetUpdateOnType was set to true (default is false) * * @name DTextEntry:OnValueChange * @wiki https://wiki.garrysmod.com/page/DTextEntry/OnValueChange * @param {DTextEntry} this - no description * @param {string} value - The DTextEntry text. * @returns {void} **/ OnValueChange(this: DTextEntry, value: string): void /** * * Builds a @DMenu type for the DTextEntry based on the input table. * * @name DTextEntry:OpenAutoComplete * @wiki https://wiki.garrysmod.com/page/DTextEntry/OpenAutoComplete * @internal You really should be using @DTextEntry:GetAutoComplete instead. * @param {DTextEntry} this - no description * @param {table} tab - Table containing results from @DTextEntry:GetAutoComplete. * @returns {void} **/ OpenAutoComplete(this: DTextEntry, tab: table): void /** * * Sets the cursor's color in DTextEntry (the blinking line). * * @name DTextEntry:SetCursorColor * @wiki https://wiki.garrysmod.com/page/DTextEntry/SetCursorColor * @param {DTextEntry} this - no description * @param {Color} color - The color to set the cursor to. * @returns {void} **/ SetCursorColor(this: DTextEntry, color: Color): void /** * * Called internally when the text inside the DTextEntry changes. * You should not override this function. Use @DTextEntry:OnValueChange instead. * * @name DTextEntry:OnTextChanged * @wiki https://wiki.garrysmod.com/page/DTextEntry/OnTextChanged * @internal * @param {DTextEntry} this - no description * @param {boolean} noMenuRemoval - Determines whether to remove the autocomplete menu (false) or not (true). * @returns {void} **/ OnTextChanged(this: DTextEntry, noMenuRemoval: boolean): void /** * * Called whenever a valid character is typed while the text entry is focused. * * @name DTextEntry:OnKeyCodeTyped * @wiki https://wiki.garrysmod.com/page/DTextEntry/OnKeyCodeTyped * @note This hook only works on panels derived from @TextEntry type, such as @DTextEntry type. * @param {DTextEntry} this - no description * @param {KEY} keyCode - They key code of the key pressed, see @KEY enum. * @returns {boolean} - Whether you've handled the key press. Returning true prevents the default text entry behavior from occurring. **/ OnKeyCodeTyped(this: DTextEntry, keyCode: KEY): boolean /** * * Called whenever enter is pressed on a DTextEntry. * * @name DTextEntry:OnEnter * @wiki https://wiki.garrysmod.com/page/DTextEntry/OnEnter * @note @DTextEntry:IsEditing will still return true in this callback! * @param {DTextEntry} this - no description * @returns {void} **/ OnEnter(this: DTextEntry): void /** * * Called whenever the DTextEntry gains focus. * * @name DTextEntry:OnGetFocus * @wiki https://wiki.garrysmod.com/page/DTextEntry/OnGetFocus * @param {DTextEntry} this - no description * @returns {void} **/ OnGetFocus(this: DTextEntry): void /** * * Called internally by @DTextEntry:OnTextChanged when the user modifies the text in the DTextEntry. * You should override this function to define custom behavior when the DTextEntry text changes. * * @name DTextEntry:OnChange * @wiki https://wiki.garrysmod.com/page/DTextEntry/OnChange * @param {DTextEntry} this - no description * @returns {void} **/ OnChange(this: DTextEntry): void /** * * Returns whether this DTextEntry is being edited or not. (i.e. has focus) * * @name DTextEntry:IsEditing * @wiki https://wiki.garrysmod.com/page/DTextEntry/IsEditing * @param {DTextEntry} this - no description * @returns {boolean} - Whether this DTextEntry is being edited or not **/ IsEditing(this: DTextEntry): boolean /** * * Returns whether the @DTextEntry type is set to run @DTextEntry:OnValueChange every time a character is typed or deleted or only when Enter is pressed. * * @name DTextEntry:GetUpdateOnType * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetUpdateOnType * @param {DTextEntry} this - no description * @returns {boolean} - no description **/ GetUpdateOnType(this: DTextEntry): boolean /** * * Returns the text color of a DTextEntry. * * @name DTextEntry:GetTextColor * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetTextColor * @param {DTextEntry} this - no description * @returns {IColor} - The color of the text as a @IColor structure. **/ GetTextColor(this: DTextEntry): IColor /** * * Return current color of panel placeholder * * @name DTextEntry:GetPlaceholderColor * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetPlaceholderColor * @param {DTextEntry} this - no description * @returns {table} - Current placeholder color **/ GetPlaceholderColor(this: DTextEntry): table /** * * Returns whether only numeric characters (123456789.-) can be entered into the DTextEntry. * * @name DTextEntry:GetNumeric * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetNumeric * @param {DTextEntry} this - no description * @returns {boolean} - Whether the DTextEntry is numeric or not. **/ GetNumeric(this: DTextEntry): boolean /** * * Similar to @DTextEntry:GetFloat, but rounds the value to the nearest integer. * * @name DTextEntry:GetInt * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetInt * @param {DTextEntry} this - no description * @returns {number} - Text of the DTextEntry as a round number, or nil if it cannot be converted to a number. **/ GetInt(this: DTextEntry): number /** * * Returns the contents of the DTextEntry as a number. * * @name DTextEntry:GetFloat * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetFloat * @param {DTextEntry} this - no description * @returns {number} - Text of the DTextEntry as a float, or nil if it cannot be converted to a number using @tonumber function. **/ GetFloat(this: DTextEntry): number /** * * Returns whether pressing Enter can cause the panel to lose focus. Note that a multiline DTextEntry cannot be escaped using the Enter key even when this function returns true. * * @name DTextEntry:GetEnterAllowed * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetEnterAllowed * @param {DTextEntry} this - no description * @returns {boolean} - Whether pressing the Enter key can cause the panel to lose focus. **/ GetEnterAllowed(this: DTextEntry): boolean /** * * Returns the cursor color of a DTextEntry. * * @name DTextEntry:GetCursorColor * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetCursorColor * @param {DTextEntry} this - no description * @returns {IColor} - The color of the cursor as a @IColor structure. **/ GetCursorColor(this: DTextEntry): IColor /** * * Called by the DTextEntry when a list of autocompletion options is requested. Meant to be overridden. * * @name DTextEntry:GetAutoComplete * @wiki https://wiki.garrysmod.com/page/DTextEntry/GetAutoComplete * @param {DTextEntry} this - no description * @param {string} inputText - Player's current input. * @returns {table} - If a table is returned, the values of the table will show up as autocomplete suggestions for the user. **/ GetAutoComplete(this: DTextEntry, inputText: string): table /** * * Returns whether a string is numeric or not. * Always returns false if the @DTextEntry:SetNumeric is set to false. * * @name DTextEntry:CheckNumeric * @wiki https://wiki.garrysmod.com/page/DTextEntry/CheckNumeric * @param {DTextEntry} this - no description * @param {string} strValue - The string to check. * @returns {boolean} - Whether the string is numeric or not. **/ CheckNumeric(this: DTextEntry, strValue: string): boolean /** * * Called whenever the value of the panel has been updated (whether by user input or otherwise). * It allows you to determine whether a user can modify the @TextEntry type's text. * By default, this only checks whether the panel disallows numeric characters, preventing it from being edited if the value contains any. * This is actually an engine hook that only works on @TextEntry type derived elements. * * @name DTextEntry:AllowInput * @realm client * @wiki https://wiki.garrysmod.com/page/DTextEntry/AllowInput * @param {DTextEntry} this - no description * @param {string} char - The last character entered into the panel. * @returns {boolean} - Return true to prevent the value from changing, false to allow it. **/ AllowInput(this: DTextEntry, char: string): boolean } declare interface DSprite extends DPanel { /** * * Sets the source material for the sprite. * * @name DSprite:SetMaterial * @wiki https://wiki.garrysmod.com/page/DSprite/SetMaterial * @param {DSprite} this - no description * @param {IMaterial} material - The material to use. This will ideally be an [UnlitGeneric](https://developer.valvesoftware.com/wiki/UnlitGeneric). * @returns {void} **/ SetMaterial(this: DSprite, material: IMaterial): void /** * * Seems to be an unused feature. Does nothing. * * @name DSprite:SetHandle * @wiki https://wiki.garrysmod.com/page/DSprite/SetHandle * @param {DSprite} this - no description * @param {Vector} vec - no description * @returns {void} **/ SetHandle(this: DSprite, vec: Vector): void /** * * Sets the 2D rotation angle of the sprite, in the plane of the screen. * * @name DSprite:SetRotation * @wiki https://wiki.garrysmod.com/page/DSprite/SetRotation * @param {DSprite} this - no description * @param {number} ang - The anti-clockwise rotation in degrees. * @returns {void} **/ SetRotation(this: DSprite, ang: number): void /** * * Sets the color modifier for the sprite. * * @name DSprite:SetColor * @wiki https://wiki.garrysmod.com/page/DSprite/SetColor * @param {DSprite} this - no description * @param {Color} color - The @Color function to use. * @returns {void} **/ SetColor(this: DSprite, color: Color): void /** * * Gets the 2D rotation angle of the sprite, in the plane of the screen. * * @name DSprite:GetRotation * @wiki https://wiki.garrysmod.com/page/DSprite/GetRotation * @param {DSprite} this - no description * @returns {number} - The anti-clockwise rotation in degrees. **/ GetRotation(this: DSprite): number /** * * Gets the material the sprite is using. * * @name DSprite:GetMaterial * @wiki https://wiki.garrysmod.com/page/DSprite/GetMaterial * @param {DSprite} this - no description * @returns {IMaterial} - The material in use. **/ GetMaterial(this: DSprite): IMaterial /** * @name DSprite:GetHandle * @wiki https://wiki.garrysmod.com/page/DSprite/GetHandle * @param {DSprite} this - no description * @returns {Vector} - no description **/ GetHandle(this: DSprite): Vector /** * * Gets the color the sprite is using as a modifier. * * @name DSprite:GetColor * @wiki https://wiki.garrysmod.com/page/DSprite/GetColor * @param {DSprite} this - no description * @returns {table} - The @Color function being used. **/ GetColor(this: DSprite): table } declare interface DSlider extends DPanel { /** * * For override by child panels, such as @DNumSlider type. * * @name DSlider:TranslateValues * @wiki https://wiki.garrysmod.com/page/DSlider/TranslateValues * @param {DSlider} this - no description * @param {number} x - no description * @param {number} y - no description * @returns {number} - x * @returns {number} - y * @tupleReturn **/ TranslateValues(this: DSlider, x: number, y: number): [number, number] /** * * Appears to be non functioning, however is still used by panels such as @DNumSlider type. * * @name DSlider:SetTrapInside * @wiki https://wiki.garrysmod.com/page/DSlider/SetTrapInside * @param {DSlider} this - no description * @param {boolean} trap - no description * @returns {void} **/ SetTrapInside(this: DSlider, trap: boolean): void /** * * Used to position the draggable panel of the slider on the Y axis. * * @name DSlider:SetSlideY * @wiki https://wiki.garrysmod.com/page/DSlider/SetSlideY * @internal * @param {DSlider} this - no description * @param {number} y - The value range seems to be from 0 to 1 * @returns {void} **/ SetSlideY(this: DSlider, y: number): void /** * * Used to position the draggable panel of the slider on the X axis. * * @name DSlider:SetSlideX * @wiki https://wiki.garrysmod.com/page/DSlider/SetSlideX * @internal * @param {DSlider} this - no description * @param {number} x - The value range seems to be from 0 to 1 * @returns {void} **/ SetSlideX(this: DSlider, x: number): void /** * * Does nothing. * * @name DSlider:SetNumSlider * @wiki https://wiki.garrysmod.com/page/DSlider/SetNumSlider * @param {DSlider} this - no description * @param {any} slider - no description * @returns {void} **/ SetNumSlider(this: DSlider, slider: any): void /** * * Appears to be non functioning, however is still used by panels such as @DNumSlider type. * * @name DSlider:SetNotches * @wiki https://wiki.garrysmod.com/page/DSlider/SetNotches * @param {DSlider} this - no description * @param {number} notches - no description * @returns {void} **/ SetNotches(this: DSlider, notches: number): void /** * * Sets the lock on the Y axis. * For example the value 0.5 will lock the draggable panel to half the height of the slider's panel. * * @name DSlider:SetLockY * @wiki https://wiki.garrysmod.com/page/DSlider/SetLockY * @param {DSlider} this - no description * @param {number} lockY - Set to nil to reset lock. * The value range is from 0 to 1. * @returns {void} **/ SetLockY(this: DSlider, lockY?: number): void /** * * Does nothing. * * @name DSlider:SetImageColor * @wiki https://wiki.garrysmod.com/page/DSlider/SetImageColor * @param {DSlider} this - no description * @returns {void} **/ SetImageColor(this: DSlider): void /** * * Sets the lock on the X axis. * For example the value 0.5 will lock the draggable panel to half the width of the slider's panel. * * @name DSlider:SetLockX * @wiki https://wiki.garrysmod.com/page/DSlider/SetLockX * @param {DSlider} this - no description * @param {number} lockX - Set to nil to reset lock. * The value range is from 0 to 1. * @returns {void} **/ SetLockX(this: DSlider, lockX?: number): void /** * * Does nothing. * * @name DSlider:SetImage * @wiki https://wiki.garrysmod.com/page/DSlider/SetImage * @param {DSlider} this - no description * @returns {void} **/ SetImage(this: DSlider): void /** * * Sets whether or not the slider is being dragged. * * @name DSlider:SetDragging * @wiki https://wiki.garrysmod.com/page/DSlider/SetDragging * @internal * @param {DSlider} this - no description * @param {boolean} dragging - no description * @returns {void} **/ SetDragging(this: DSlider, dragging: boolean): void /** * * Sets the background for the slider. * * @name DSlider:SetBackground * @wiki https://wiki.garrysmod.com/page/DSlider/SetBackground * @param {DSlider} this - no description * @param {string} path - Path to the image. * @returns {void} **/ SetBackground(this: DSlider, path: string): void /** * * Returns true if this element is being edited by the player. * * @name DSlider:IsEditing * @wiki https://wiki.garrysmod.com/page/DSlider/IsEditing * @param {DSlider} this - no description * @returns {boolean} - no description **/ IsEditing(this: DSlider): boolean /** * * Appears to be non functioning, however is still used by panels such as @DNumSlider type. * * @name DSlider:GetTrapInside * @wiki https://wiki.garrysmod.com/page/DSlider/GetTrapInside * @param {DSlider} this - no description * @returns {boolean} - no description **/ GetTrapInside(this: DSlider): boolean /** * * Returns the target position of the draggable "knob" panel of the slider on the Y axis. * Set by @DSlider:SetSlideY. * * @name DSlider:GetSlideY * @wiki https://wiki.garrysmod.com/page/DSlider/GetSlideY * @param {DSlider} this - no description * @returns {number} - The value range seems to be from 0 to 1 **/ GetSlideY(this: DSlider): number /** * * Returns the target position of the draggable "knob" panel of the slider on the X axis. * Set by @DSlider:SetSlideX. * * @name DSlider:GetSlideX * @wiki https://wiki.garrysmod.com/page/DSlider/GetSlideX * @param {DSlider} this - no description * @returns {number} - The value range seems to be from 0 to 1 **/ GetSlideX(this: DSlider): number /** * * Does nothing. * * @name DSlider:GetNumSlider * @wiki https://wiki.garrysmod.com/page/DSlider/GetNumSlider * @param {DSlider} this - no description * @returns {any} - no description **/ GetNumSlider(this: DSlider): any /** * * Appears to be non functioning, however is still used by panels such as @DNumSlider type. * * @name DSlider:GetNotches * @wiki https://wiki.garrysmod.com/page/DSlider/GetNotches * @param {DSlider} this - no description * @returns {number} - no description **/ GetNotches(this: DSlider): number /** * * Returns the draggable panel's lock on the Y axis. * See @DSlider:SetLockY for more info. * * @name DSlider:GetLockY * @wiki https://wiki.garrysmod.com/page/DSlider/GetLockY * @param {DSlider} this - no description * @returns {number} - no description **/ GetLockY(this: DSlider): number /** * * Returns the draggable panel's lock on the X axis. * See @DSlider:SetLockX for more info. * * @name DSlider:GetLockX * @wiki https://wiki.garrysmod.com/page/DSlider/GetLockX * @param {DSlider} this - no description * @returns {number} - no description **/ GetLockX(this: DSlider): number /** * * Identical to @DSlider:IsEditing * * @name DSlider:GetDragging * @wiki https://wiki.garrysmod.com/page/DSlider/GetDragging * @param {DSlider} this - no description * @returns {boolean} - no description **/ GetDragging(this: DSlider): boolean } declare interface DShape extends DPanel { /** * * Sets the shape to be drawn. * * @name DShape:SetType * @wiki https://wiki.garrysmod.com/page/DShape/SetType * @param {DShape} this - no description * @param {string} type - The render type of the DShape. Only rectangles (*Rect*) work currently. If you don't define a type immediately, the @PanelHooks:Paint method will generate errors until you do. * @returns {void} **/ SetType(this: DShape, type: string): void /** * * Sets the color to display the shape with. * * @name DShape:SetColor * @wiki https://wiki.garrysmod.com/page/DShape/SetColor * @param {DShape} this - no description * @param {IColor} clr - The @IColor structure * @returns {void} **/ SetColor(this: DShape, clr: IColor): void /** * * Sets the border color of the shape. * Currently does nothing. * * @name DShape:SetBorderColor * @wiki https://wiki.garrysmod.com/page/DShape/SetBorderColor * @param {DShape} this - no description * @param {IColor} clr - The desired border color. * See @IColor structure * @returns {void} **/ SetBorderColor(this: DShape, clr: IColor): void /** * * Returns the current type of shape this panel is set to display. * See @DShape:SetType. * * @name DShape:GetType * @wiki https://wiki.garrysmod.com/page/DShape/GetType * @param {DShape} this - no description * @returns {string} - no description **/ GetType(this: DShape): string /** * * Returns the color set to display the shape with. * * @name DShape:GetColor * @wiki https://wiki.garrysmod.com/page/DShape/GetColor * @param {DShape} this - no description * @returns {IColor} - The @IColor structure **/ GetColor(this: DShape): IColor /** * * Returns the current type of shape this panel is set to display. * See @DShape:SetBorderColor. * * @name DShape:GetBorderColor * @wiki https://wiki.garrysmod.com/page/DShape/GetBorderColor * @param {DShape} this - no description * @returns {IColor} - The border color * See @IColor structure **/ GetBorderColor(this: DShape): IColor } declare interface DScrollPanel extends DPanel { /** * * Sets the DScrollPanel's padding. This function appears to be unused. * * @name DScrollPanel:SetPadding * @wiki https://wiki.garrysmod.com/page/DScrollPanel/SetPadding * @param {DScrollPanel} this - no description * @param {number} padding - The padding of the DScrollPanel. * @returns {void} **/ SetPadding(this: DScrollPanel, padding: number): void /** * * Sets the canvas of the DScrollPanel. * * @name DScrollPanel:SetCanvas * @wiki https://wiki.garrysmod.com/page/DScrollPanel/SetCanvas * @internal * @param {DScrollPanel} this - no description * @param {Panel} canvas - The new canvas * @returns {void} **/ SetCanvas(this: DScrollPanel, canvas: Panel): void /** * * Scrolls to the given child * * @name DScrollPanel:ScrollToChild * @wiki https://wiki.garrysmod.com/page/DScrollPanel/ScrollToChild * @param {DScrollPanel} this - no description * @param {Panel} panel - The panel to scroll to, must be a child of the DScrollPanel. * @returns {void} **/ ScrollToChild(this: DScrollPanel, panel: Panel): void /** * @name DScrollPanel:Rebuild * @wiki https://wiki.garrysmod.com/page/DScrollPanel/Rebuild * @param {DScrollPanel} this - no description * @returns {void} **/ Rebuild(this: DScrollPanel): void /** * * Return the width of the DScrollPanel's canvas. * * @name DScrollPanel:InnerWidth * @wiki https://wiki.garrysmod.com/page/DScrollPanel/InnerWidth * @param {DScrollPanel} this - no description * @returns {number} - The width of the DScrollPanel's canvas **/ InnerWidth(this: DScrollPanel): number /** * * Returns the vertical scroll bar of the panel. * * @name DScrollPanel:GetVBar * @wiki https://wiki.garrysmod.com/page/DScrollPanel/GetVBar * @param {DScrollPanel} this - no description * @returns {DVScrollBar} - The @DVScrollBar type. **/ GetVBar(this: DScrollPanel): DVScrollBar /** * * Gets the DScrollPanels padding * * @name DScrollPanel:GetPadding * @wiki https://wiki.garrysmod.com/page/DScrollPanel/GetPadding * @param {DScrollPanel} this - no description * @returns {number} - DScrollPanels padding **/ GetPadding(this: DScrollPanel): number /** * * Returns the canvas ( The panel all child panels are parented to ) of the DScrollPanel. * * @name DScrollPanel:GetCanvas * @wiki https://wiki.garrysmod.com/page/DScrollPanel/GetCanvas * @param {DScrollPanel} this - no description * @returns {Panel} - The canvas **/ GetCanvas(this: DScrollPanel): Panel /** * * Parents the passed panel to the DScrollPanel's canvas. * * @name DScrollPanel:AddItem * @wiki https://wiki.garrysmod.com/page/DScrollPanel/AddItem * @param {DScrollPanel} this - no description * @param {Panel} pnl - The panel to add. * @returns {void} **/ AddItem(this: DScrollPanel, pnl: Panel): void } declare interface DRGBPicker extends DPanel { /** * * Sets the color stored in the color picker. * * @name DRGBPicker:SetRGB * @wiki https://wiki.garrysmod.com/page/DRGBPicker/SetRGB * @note This function is meant to be called internally and will not update the position of the color picker line or call @DRGBPicker:OnChange * @param {DRGBPicker} this - no description * @param {Color} color - The color to set, see @IColor structure. * @returns {void} **/ SetRGB(this: DRGBPicker, color: Color): void /** * * Function which is called when the cursor is clicked and/or moved on the color picker. Meant to be overridden. * * @name DRGBPicker:OnChange * @wiki https://wiki.garrysmod.com/page/DRGBPicker/OnChange * @param {DRGBPicker} this - no description * @param {IColor} col - The color that is selected on the color picker (@IColor structure form). * @returns {void} **/ OnChange(this: DRGBPicker, col: IColor): void /** * * Returns the color currently set on the color picker. * * @name DRGBPicker:GetRGB * @wiki https://wiki.garrysmod.com/page/DRGBPicker/GetRGB * @param {DRGBPicker} this - no description * @returns {IColor} - The color set on the color picker, see @IColor structure. **/ GetRGB(this: DRGBPicker): IColor /** * * Returns the color at given position on the internal texture. * * @name DRGBPicker:GetPosColor * @wiki https://wiki.garrysmod.com/page/DRGBPicker/GetPosColor * @internal * @param {DRGBPicker} this - no description * @param {number} x - The X coordinate on the texture to get the color from * @param {number} y - The Y coordinate on the texture to get the color from * @returns {IColor} - @IColor structure * @returns {number} - The X-coordinate clamped to the texture's width. * @returns {number} - The Y-coordinate clamped to the texture's height. * @tupleReturn **/ GetPosColor(this: DRGBPicker, x: number, y: number): [IColor, number, number] } declare interface DProperty_VectorColor extends DProperty_Generic { /** * * Sets the color value of the property. * * @name DProperty_VectorColor:SetValue * @wiki https://wiki.garrysmod.com/page/DProperty VectorColor/SetValue * @param {DProperty_VectorColor} this - no description * @param {DProperty_VectorColor} color - Sets the color to use in a @DProperty_VectorColor type. * @returns {void} **/ SetValue(this: DProperty_VectorColor, color: DProperty_VectorColor): void /** * * Called by a property row to setup a color selection control. * * @name DProperty_VectorColor:Setup * @wiki https://wiki.garrysmod.com/page/DProperty VectorColor/Setup * @internal * @param {DProperty_VectorColor} this - no description * @param {string} prop - no description * @param {table} settings - A table of settings. None of the values are used for this property. See [Editable Entities](https://wiki.garrysmod.com/page/Editable%20Entities). * @returns {void} **/ Setup(this: DProperty_VectorColor, prop?: string, settings: table): void } declare interface DProperty_Combo extends DProperty_Generic { /** * * Sets up a combo control. * * @name DProperty_Combo:Setup * @wiki https://wiki.garrysmod.com/page/DProperty Combo/Setup * @param {DProperty_Combo} this - no description * @param {string} prop - The name of DProperty sub control to add. * @param {IDProperty_ComboSetupData} data - Data to use to set up the combo box control. * Structure: * @returns {void} **/ Setup(this: DProperty_Combo, prop?: string, data?: IDProperty_ComboSetupData): void /** * * Set the selected option. * * @name DProperty_Combo:SetSelected * @wiki https://wiki.garrysmod.com/page/DProperty Combo/SetSelected * @param {DProperty_Combo} this - no description * @param {number} Id - Id of the choice to be selected. * @returns {void} **/ SetSelected(this: DProperty_Combo, Id: number): void /** * * Called after the user selects a new value. * * @name DProperty_Combo:DataChanged * @wiki https://wiki.garrysmod.com/page/DProperty Combo/DataChanged * @param {DProperty_Combo} this - no description * @param {any} data - The new data that was selected. * @returns {void} **/ DataChanged(this: DProperty_Combo, data: any): void /** * * Add a choice to your combo control. * * @name DProperty_Combo:AddChoice * @wiki https://wiki.garrysmod.com/page/DProperty Combo/AddChoice * @param {DProperty_Combo} this - no description * @param {string} Text - Shown text. * @param {any} data - Stored Data. * @param {boolean} select - Select this element? * @returns {void} **/ AddChoice(this: DProperty_Combo, Text: string, data: any, select?: boolean): void } declare interface DPropertySheet extends DPanel { /** * * Switches the active tab to a tab with given name. * * @name DPropertySheet:SwitchToName * @wiki https://wiki.garrysmod.com/page/DPropertySheet/SwitchToName * @param {DPropertySheet} this - no description * @param {string} name - Case sensitive name of the tab. * @returns {void} **/ SwitchToName(this: DPropertySheet, name: string): void /** * * Sets the width of the @DPropertySheet type to fit the contents of all of the tabs. * * @name DPropertySheet:SizeToContentWidth * @wiki https://wiki.garrysmod.com/page/DPropertySheet/SizeToContentWidth * @param {DPropertySheet} this - no description * @returns {void} **/ SizeToContentWidth(this: DPropertySheet): void /** * * Creates a close button on the right side of the @DPropertySheet type that will run the given callback function when pressed. * * @name DPropertySheet:SetupCloseButton * @wiki https://wiki.garrysmod.com/page/DPropertySheet/SetupCloseButton * @param {DPropertySheet} this - no description * @param {function} func - Callback function to be called when the close button is pressed. * @returns {void} **/ SetupCloseButton(this: DPropertySheet, func: UnknownFunc): void /** * * Does nothing. * * @name DPropertySheet:SetShowIcons * @wiki https://wiki.garrysmod.com/page/DPropertySheet/SetShowIcons * @param {DPropertySheet} this - no description * @param {boolean} show - no description * @returns {void} **/ SetShowIcons(this: DPropertySheet, show: boolean): void /** * * Sets the padding from parent panel to children panel. * * @name DPropertySheet:SetPadding * @wiki https://wiki.garrysmod.com/page/DPropertySheet/SetPadding * @param {DPropertySheet} this - no description * @param {number} padding - Amount of padding * @returns {void} **/ SetPadding(this: DPropertySheet, padding?: number): void /** * * Sets the amount of time (in seconds) it takes to fade between tabs. * * @name DPropertySheet:SetFadeTime * @wiki https://wiki.garrysmod.com/page/DPropertySheet/SetFadeTime * @param {DPropertySheet} this - no description * @param {number} time - The amount of time it takes (in seconds) to fade between tabs. * @returns {void} **/ SetFadeTime(this: DPropertySheet, time?: number): void /** * * Sets the active tab of the @DPropertySheet type. * * @name DPropertySheet:SetActiveTab * @wiki https://wiki.garrysmod.com/page/DPropertySheet/SetActiveTab * @param {DPropertySheet} this - no description * @param {DTab} tab - The @DTab type to set active. * See @DPropertySheet:GetItems * @returns {void} **/ SetActiveTab(this: DPropertySheet, tab: DTab): void /** * * Called when a player switches the tabs * * @name DPropertySheet:OnActiveTabChanged * @wiki https://wiki.garrysmod.com/page/DPropertySheet/OnActiveTabChanged * @param {DPropertySheet} this - no description * @param {DTab} prev - The previously active @DTab type * @param {DTab} next - The newly active @DTab type * @returns {void} **/ OnActiveTabChanged(this: DPropertySheet, prev: DTab, next: DTab): void /** * * Returns whatever value was set by @DPropertySheet:SetShowIcons. * * @name DPropertySheet:GetShowIcons * @wiki https://wiki.garrysmod.com/page/DPropertySheet/GetShowIcons * @param {DPropertySheet} this - no description * @returns {boolean} - no description **/ GetShowIcons(this: DPropertySheet): boolean /** * * Gets the padding from the parent panel to child panels. * * @name DPropertySheet:GetPadding * @wiki https://wiki.garrysmod.com/page/DPropertySheet/GetPadding * @param {DPropertySheet} this - no description * @returns {number} - Padding **/ GetPadding(this: DPropertySheet): number /** * * Returns a list of all tabs of this @DPropertySheet type. * * @name DPropertySheet:GetItems * @wiki https://wiki.garrysmod.com/page/DPropertySheet/GetItems * @param {DPropertySheet} this - no description * @returns {table[]} - A table of tables. * Each table contains 3 key-value pairs: **/ GetItems(this: DPropertySheet): table[] /** * * Returns the amount of time (in seconds) it takes to fade between tabs. * Set by @DPropertySheet:SetFadeTime * * @name DPropertySheet:GetFadeTime * @wiki https://wiki.garrysmod.com/page/DPropertySheet/GetFadeTime * @param {DPropertySheet} this - no description * @returns {number} - The amount of time (in seconds) it takes to fade between tabs. **/ GetFadeTime(this: DPropertySheet): number /** * * Returns the active @DTab type of this @DPropertySheet type. * * @name DPropertySheet:GetActiveTab * @wiki https://wiki.garrysmod.com/page/DPropertySheet/GetActiveTab * @param {DPropertySheet} this - no description * @returns {DTab} - The @DTab type **/ GetActiveTab(this: DPropertySheet): DTab /** * * Internal function that handles the cross fade animation when the player switches tabs. * * @name DPropertySheet:CrossFade * @wiki https://wiki.garrysmod.com/page/DPropertySheet/CrossFade * @internal * @param {DPropertySheet} this - no description * @param {table} anim - no description * @param {number} delta - no description * @param {table} data - no description * @returns {void} **/ CrossFade(this: DPropertySheet, anim: table, delta: number, data: table): void /** * * Removes tab and/or panel from the parent DPropertySheet. * * @name DPropertySheet:CloseTab * @wiki https://wiki.garrysmod.com/page/DPropertySheet/CloseTab * @param {DPropertySheet} this - no description * @param {DTab | DPropertySheet} tab - The @DTab type of the sheet from @DPropertySheet type. * See @DPropertySheet:GetItems. * @param {boolean} removePanel - Set to true to remove the associated panel object as well. * @returns {Panel} - The panel of the tab. **/ CloseTab(this: DPropertySheet, tab: DTab | DPropertySheet, removePanel: boolean): Panel /** * * Adds a new tab. * * @name DPropertySheet:AddSheet * @wiki https://wiki.garrysmod.com/page/DPropertySheet/AddSheet * @param {DPropertySheet} this - no description * @param {string} name - Name of the tab * @param {DPanel} pnl - Panel to be used as contents of the tab. This normally should be a @DPanel type * @param {string} icon - Icon for the tab. This will ideally be a [silkicon](https://wiki.garrysmod.com/page/Silkicons), but any material name can be used. * @param {boolean} noStretchX - Should @DPropertySheet type try to fill itself with given panel horizontally. * @param {boolean} noStretchY - Should @DPropertySheet type try to fill itself with given panel vertically. * @param {string} tooltip - Tooltip for the tab when user hovers over it with his cursor * @returns {IDPropertySheetAddSheetReturn} - A table containing the following keys: **/ AddSheet(this: DPropertySheet, name: string, pnl: DPanel, icon?: string, noStretchX?: boolean, noStretchY?: boolean, tooltip?: string): IDPropertySheetAddSheetReturn } declare interface DProperties extends Panel { /** * * Returns (or creates) a category of properties. * See @DProperties:CreateRow for adding actual properties. * * @name DProperties:GetCategory * @wiki https://wiki.garrysmod.com/page/DProperties/GetCategory * @internal * @param {DProperties} this - no description * @param {string} name - Name of the category * @param {boolean} create - Create a new category if it doesn't exist. * @returns {Panel} - An internal panel. **/ GetCategory(this: DProperties, name: string, create: boolean): Panel /** * * Returns the @DScrollPanel type all the properties panels are attached to. * * @name DProperties:GetCanvas * @wiki https://wiki.garrysmod.com/page/DProperties/GetCanvas * @param {DProperties} this - no description * @returns {DScrollPanel} - A @DScrollPanel type canvas **/ GetCanvas(this: DProperties): DScrollPanel /** * * Creates a row in the properties panel. * * @name DProperties:CreateRow * @wiki https://wiki.garrysmod.com/page/DProperties/CreateRow * @param {DProperties} this - no description * @param {string} category - The category to list this row under * @param {string} name - The label of this row * @returns {Panel} - An internal Row panel. **/ CreateRow(this: DProperties, category: string, name: string): Panel } declare interface DProgress extends Panel { /** * * Sets the fraction of the progress bar. 0 is 0% and 1 is 100%. * * @name DProgress:SetFraction * @wiki https://wiki.garrysmod.com/page/DProgress/SetFraction * @param {DProgress} this - no description * @param {number} fraction - Fraction of the progress bar. Range is 0 to 1 (0% to 100%). * @returns {void} **/ SetFraction(this: DProgress, fraction: number): void /** * * Returns the progress bar's fraction. 0 is 0% and 1 is 100%. * * @name DProgress:GetFraction * @wiki https://wiki.garrysmod.com/page/DProgress/GetFraction * @param {DProgress} this - no description * @returns {number} - Current fraction of the progress bar. **/ GetFraction(this: DProgress): number } declare interface DPanelOverlay extends DPanel { /** * * Sets the type of the @DPanelOverlay type. * * @name DPanelOverlay:SetType * @realm client * @wiki https://wiki.garrysmod.com/page/DPanelOverlay/SetType * @param {DPanelOverlay} this - no description * @param {number} type - The type to set. * Possible value are: * * 1 - 8px corners of given color * * 2 - 4px corners of given type * * 3 - 2 top? corners of hardcoded color, 2 other corners of given color * @returns {void} **/ SetType(this: DPanelOverlay, type: number): void /** * * Sets the border color of the @DPanelOverlay type. * * @name DPanelOverlay:SetColor * @realm client * @wiki https://wiki.garrysmod.com/page/DPanelOverlay/SetColor * @param {DPanelOverlay} this - no description * @param {Color} color - The color to set. Uses the @IColor structure. * @returns {void} **/ SetColor(this: DPanelOverlay, color: Color): void /** * * Used internally by the panel for types 1 and 2. * * @name DPanelOverlay:PaintInnerCorners * @realm client * @wiki https://wiki.garrysmod.com/page/DPanelOverlay/PaintInnerCorners * @internal * @param {DPanelOverlay} this - no description * @param {number} size - no description * @returns {void} **/ PaintInnerCorners(this: DPanelOverlay, size: number): void /** * * Used internally by the panel for type 3. * * @name DPanelOverlay:PaintDifferentColours * @realm client * @wiki https://wiki.garrysmod.com/page/DPanelOverlay/PaintDifferentColours * @internal * @param {DPanelOverlay} this - no description * @param {table} cola - no description * @param {table} colb - no description * @param {table} colc - no description * @param {table} cold - no description * @param {number} size - no description * @returns {void} **/ PaintDifferentColours(this: DPanelOverlay, cola: table, colb: table, colc: table, cold: table, size: number): void /** * * Returns the type of the @DPanelOverlay type set by @DPanelOverlay:SetType. * * @name DPanelOverlay:GetType * @realm client * @wiki https://wiki.garrysmod.com/page/DPanelOverlay/GetType * @param {DPanelOverlay} this - no description * @returns {number} - The set type. **/ GetType(this: DPanelOverlay): number /** * * Returns the border color of the @DPanelOverlay type set by @DPanelOverlay:SetColor. * * @name DPanelOverlay:GetColor * @realm client * @wiki https://wiki.garrysmod.com/page/DPanelOverlay/GetColor * @param {DPanelOverlay} this - no description * @returns {IColor} - The set color. Uses the @IColor structure. **/ GetColor(this: DPanelOverlay): IColor } declare interface DPanelList extends DPanel { /** * * Sets distance between list items * * @name DPanelList:SetSpacing * @wiki https://wiki.garrysmod.com/page/DPanelList/SetSpacing * @param {DPanelList} this - no description * @param {number} Distance - Distance between panels * @returns {void} **/ SetSpacing(this: DPanelList, Distance: number): void /** * * Sets the offset of the lists items from the panel borders * * @name DPanelList:SetPadding * @wiki https://wiki.garrysmod.com/page/DPanelList/SetPadding * @param {DPanelList} this - no description * @param {number} Offset - Offset from panel borders * @returns {void} **/ SetPadding(this: DPanelList, Offset: number): void /** * * Returns distance between list items set by @DPanelList:SetSpacing * * @name DPanelList:GetSpacing * @wiki https://wiki.garrysmod.com/page/DPanelList/GetSpacing * @param {DPanelList} this - no description * @returns {number} - Distance between panels **/ GetSpacing(this: DPanelList): number /** * @name DPanelList:InsertAtTop * @wiki https://wiki.garrysmod.com/page/DPanelList/InsertAtTop * @param {DPanelList} this - no description * @param {Panel} insert - The panel to insert * @param {string} strLineState - If set to "ownline", no other panels will be placed to the left or right of the panel we are inserting * @returns {void} **/ InsertAtTop(this: DPanelList, insert: Panel, strLineState: string): void /** * * Returns offset of list items from the panel borders set by @DPanelList:SetPadding * * @name DPanelList:GetPadding * @wiki https://wiki.garrysmod.com/page/DPanelList/GetPadding * @param {DPanelList} this - no description * @returns {number} - Offset from panel borders **/ GetPadding(this: DPanelList): number /** * * Returns all panels has added by @DPanelList:AddItem * * @name DPanelList:GetItems * @wiki https://wiki.garrysmod.com/page/DPanelList/GetItems * @param {DPanelList} this - no description * @returns {DPanelList[]} - A table of panels used as items of @DPanelList type. **/ GetItems(this: DPanelList): DPanelList[] /** * * Enables/creates the vertical scroll bar so that the panel list can be scrolled through. * * @name DPanelList:EnableVerticalScrollbar * @wiki https://wiki.garrysmod.com/page/DPanelList/EnableVerticalScrollbar * @param {DPanelList} this - no description * @returns {void} **/ EnableVerticalScrollbar(this: DPanelList): void /** * * Removes all items. * * @name DPanelList:CleanList * @wiki https://wiki.garrysmod.com/page/DPanelList/CleanList * @param {DPanelList} this - no description * @returns {void} **/ CleanList(this: DPanelList): void /** * * Adds a existing panel to the end of @DPanelList type. * * @name DPanelList:AddItem * @wiki https://wiki.garrysmod.com/page/DPanelList/AddItem * @param {DPanelList} this - no description * @param {Panel} pnl - Panel to be used as element of list * @param {string} state - If set to "ownline", the item will take its own entire line. * @returns {void} **/ AddItem(this: DPanelList, pnl: Panel, state?: string): void } declare interface DPanel extends Panel { /** * * Sets whether or not to paint/draw the panel background. * * @name DPanel:SetPaintBackground * @wiki https://wiki.garrysmod.com/page/DPanel/SetPaintBackground * @param {DPanel} this - no description * @param {boolean} paint - True to show the panel's background, false to hide it. * @returns {void} **/ SetPaintBackground(this: DPanel, paint: boolean): void /** * * Sets whether or not to draw the panel background. Alias of @DPanel:SetPaintBackground. * * @name DPanel:SetDrawBackground * @wiki https://wiki.garrysmod.com/page/DPanel/SetDrawBackground * @param {DPanel} this - no description * @param {boolean} draw - True to show the panel's background, false to hide it. * @returns {void} **/ SetDrawBackground(this: DPanel, draw: boolean): void /** * * Sets whether or not to disable the panel. * * @name DPanel:SetDisabled * @wiki https://wiki.garrysmod.com/page/DPanel/SetDisabled * @param {DPanel} this - no description * @param {boolean} disabled - True to disable the panel (mouse input disabled and background alpha set to 75), false to enable it (mouse input enabled and background alpha set to 255). * @returns {void} **/ SetDisabled(this: DPanel, disabled: boolean): void /** * * Sets the background color of the panel. * * @name DPanel:SetBackgroundColor * @wiki https://wiki.garrysmod.com/page/DPanel/SetBackgroundColor * @param {DPanel} this - no description * @param {Color} color - The background color. * @returns {void} **/ SetBackgroundColor(this: DPanel, color: Color): void /** * * Returns whether or not the panel background is being drawn. * * @name DPanel:GetPaintBackground * @wiki https://wiki.garrysmod.com/page/DPanel/GetPaintBackground * @param {DPanel} this - no description * @returns {boolean} - True if the panel background is drawn, false otherwise. **/ GetPaintBackground(this: DPanel): boolean /** * * Returns whether or not the panel background is being drawn. Alias of @DPanel:GetPaintBackground. * * @name DPanel:GetDrawBackground * @wiki https://wiki.garrysmod.com/page/DPanel/GetDrawBackground * @param {DPanel} this - no description * @returns {boolean} - True if the panel background is drawn, false otherwise. **/ GetDrawBackground(this: DPanel): boolean /** * * Returns whether or not the panel is disabled. * * @name DPanel:GetDisabled * @wiki https://wiki.garrysmod.com/page/DPanel/GetDisabled * @param {DPanel} this - no description * @returns {boolean} - True if the panel is disabled (mouse input disabled and background alpha set to 75), false if its enabled (mouse input enabled and background alpha set to 255). **/ GetDisabled(this: DPanel): boolean /** * * Returns the panel's background color. * * @name DPanel:GetBackgroundColor * @wiki https://wiki.garrysmod.com/page/DPanel/GetBackgroundColor * @note By default this returns **nil** even though the default background color is white * @param {DPanel} this - no description * @returns {table} - Color of the panel's background. **/ GetBackgroundColor(this: DPanel): table } declare interface DNumSlider extends Panel { /** * * Called when the value has been changed. This will also be called when the user manually changes the value through the text panel. * This is an internal function. Override @DNumSlider:OnValueChanged instead. * * @name DNumSlider:ValueChanged * @wiki https://wiki.garrysmod.com/page/DNumSlider/ValueChanged * @internal * @param {DNumSlider} this - no description * @param {number} value - The value the slider has been changed to. * @returns {void} **/ ValueChanged(this: DNumSlider, value: number): void /** * @name DNumSlider:UpdateNotches * @wiki https://wiki.garrysmod.com/page/DNumSlider/UpdateNotches * @internal * @param {DNumSlider} this - no description * @returns {void} **/ UpdateNotches(this: DNumSlider): void /** * @name DNumSlider:TranslateSliderValues * @wiki https://wiki.garrysmod.com/page/DNumSlider/TranslateSliderValues * @internal * @param {DNumSlider} this - no description * @param {number} x - no description * @param {number} y - no description * @returns {number} - no description * @returns {number} - The second passed argument. * @tupleReturn **/ TranslateSliderValues(this: DNumSlider, x: number, y: number): [number, number] /** * * Sets the value of the @DNumSlider type. * * @name DNumSlider:SetValue * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetValue * @param {DNumSlider} this - no description * @param {number} val - The value to set. * @returns {void} **/ SetValue(this: DNumSlider, val: number): void /** * * Sets the minimum and the maximum value of the slider. * * @name DNumSlider:SetMinMax * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetMinMax * @param {DNumSlider} this - no description * @param {number} min - The minimum value of the slider. * @param {number} max - The maximum value of the slider. * @returns {void} **/ SetMinMax(this: DNumSlider, min: number, max: number): void /** * * Sets the minimum value for the slider * * @name DNumSlider:SetMin * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetMin * @param {DNumSlider} this - no description * @param {number} min - The value to set as minimum for the slider. * @returns {void} **/ SetMin(this: DNumSlider, min: number): void /** * * Sets the default value of the slider, to be used by @DNumSlider:ResetToDefaultValue or by middle mouse clicking the draggable knob of the slider. * * @name DNumSlider:SetDefaultValue * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetDefaultValue * @param {DNumSlider} this - no description * @param {number} def - The new default value of the slider to set * @returns {void} **/ SetDefaultValue(this: DNumSlider, def: number): void /** * * Sets the maximum value for the slider. * * @name DNumSlider:SetMax * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetMax * @param {DNumSlider} this - no description * @param {number} max - The value to set as maximum for the slider. * @returns {void} **/ SetMax(this: DNumSlider, max: number): void /** * * Sets the desired amount of numbers after the decimal point. * * @name DNumSlider:SetDecimals * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetDecimals * @param {DNumSlider} this - no description * @param {number} decimals - 0 for whole numbers only, 1 for one number after the decimal point, etc. * @returns {void} **/ SetDecimals(this: DNumSlider, decimals: number): void /** * * Calls @DLabel:SetDark on the @DLabel type part of the @DNumSlider type. * * @name DNumSlider:SetDark * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetDark * @param {DNumSlider} this - no description * @param {boolean} dark - no description * @returns {void} **/ SetDark(this: DNumSlider, dark: boolean): void /** * * Sets the console variable to be updated when the value of the slider is changed. * * @name DNumSlider:SetConVar * @wiki https://wiki.garrysmod.com/page/DNumSlider/SetConVar * @param {DNumSlider} this - no description * @param {string} cvar - The name of the @ConVar type to be updated. * @returns {void} **/ SetConVar(this: DNumSlider, cvar: string): void /** * * Resets the slider to the default value, if one was set by @DNumSlider:SetDefaultValue. * This function is called by the @DNumSlider type when user middle mouse clicks on the draggable knob of the slider. * * @name DNumSlider:ResetToDefaultValue * @wiki https://wiki.garrysmod.com/page/DNumSlider/ResetToDefaultValue * @param {DNumSlider} this - no description * @returns {void} **/ ResetToDefaultValue(this: DNumSlider): void /** * * Called when the value of the slider is changed, through code or changing the slider. * * @name DNumSlider:OnValueChanged * @wiki https://wiki.garrysmod.com/page/DNumSlider/OnValueChanged * @param {DNumSlider} this - no description * @param {number} value - The new value of the DNumSlider * @returns {void} **/ OnValueChanged(this: DNumSlider, value: number): void /** * * Returns true if either the @DTextEntry type, the @DSlider type or the @DNumberScratch type are being edited. * * @name DNumSlider:IsEditing * @wiki https://wiki.garrysmod.com/page/DNumSlider/IsEditing * @param {DNumSlider} this - no description * @returns {boolean} - Whether or not the @DNumSlider type is being edited by the player. **/ IsEditing(this: DNumSlider): boolean /** * * Returns the value of the @DNumSlider type * * @name DNumSlider:GetValue * @wiki https://wiki.garrysmod.com/page/DNumSlider/GetValue * @param {DNumSlider} this - no description * @returns {number} - The value of the slider. **/ GetValue(this: DNumSlider): number /** * * Returns the @DTextEntry type component of the slider. * * @name DNumSlider:GetTextArea * @wiki https://wiki.garrysmod.com/page/DNumSlider/GetTextArea * @param {DNumSlider} this - no description * @returns {DTextEntry} - The @DTextEntry type. **/ GetTextArea(this: DNumSlider): DTextEntry /** * * Returns the range of the slider, basically maximum value - minimum value. * * @name DNumSlider:GetRange * @wiki https://wiki.garrysmod.com/page/DNumSlider/GetRange * @param {DNumSlider} this - no description * @returns {number} - The range of the slider **/ GetRange(this: DNumSlider): number /** * * Returns the minimum value of the slider * * @name DNumSlider:GetMin * @wiki https://wiki.garrysmod.com/page/DNumSlider/GetMin * @param {DNumSlider} this - no description * @returns {number} - The minimum value of the slider **/ GetMin(this: DNumSlider): number /** * * Returns the maximum value of the slider * * @name DNumSlider:GetMax * @wiki https://wiki.garrysmod.com/page/DNumSlider/GetMax * @param {DNumSlider} this - no description * @returns {number} - The maximum value of the slider **/ GetMax(this: DNumSlider): number /** * * Returns the default value of the slider, if one was set by @DNumSlider:SetDefaultValue * * @name DNumSlider:GetDefaultValue * @wiki https://wiki.garrysmod.com/page/DNumSlider/GetDefaultValue * @param {DNumSlider} this - no description * @returns {number} - The default value of the slider **/ GetDefaultValue(this: DNumSlider): number /** * * Returns the amount of numbers after the decimal point. * * @name DNumSlider:GetDecimals * @wiki https://wiki.garrysmod.com/page/DNumSlider/GetDecimals * @param {DNumSlider} this - no description * @returns {number} - 0 for whole numbers only, 1 for one number after the decimal point, etc. **/ GetDecimals(this: DNumSlider): number } declare interface DNumberWang extends DTextEntry { /** * * Sets the value of the @DNumberWang type and triggers @DNumberWang:OnValueChanged * * @name DNumberWang:SetValue * @wiki https://wiki.garrysmod.com/page/DNumberWang/SetValue * @param {DNumberWang} this - no description * @param {number} val - The value to set. * @returns {void} **/ SetValue(this: DNumberWang, val: number): void /** * * Sets the minimum numeric value allowed by the number selector. * * @name DNumberWang:SetMin * @wiki https://wiki.garrysmod.com/page/DNumberWang/SetMin * @param {DNumberWang} this - no description * @param {number} min - The minimum value. * @returns {void} **/ SetMin(this: DNumberWang, min: number): void /** * * Sets the minimum and maximum value allowed by the number selector. * * @name DNumberWang:SetMinMax * @wiki https://wiki.garrysmod.com/page/DNumberWang/SetMinMax * @param {DNumberWang} this - no description * @param {number} min - The minimum value. * @param {number} max - The maximum value. * @returns {void} **/ SetMinMax(this: DNumberWang, min: number, max: number): void /** * * Sets the maximum numeric value allowed by the number selector. * * @name DNumberWang:SetMax * @wiki https://wiki.garrysmod.com/page/DNumberWang/SetMax * @param {DNumberWang} this - no description * @param {number} max - The maximum value. * @returns {void} **/ SetMax(this: DNumberWang, max: number): void /** * * Sets the value of the number selector based on the given fraction number. * * @name DNumberWang:SetFraction * @wiki https://wiki.garrysmod.com/page/DNumberWang/SetFraction * @param {DNumberWang} this - no description * @param {number} val - The fraction of the number selector's range. * @returns {void} **/ SetFraction(this: DNumberWang, val: number): void /** * * Appears to do nothing. * * @name DNumberWang:SetFloatValue * @wiki https://wiki.garrysmod.com/page/DNumberWang/SetFloatValue * @param {DNumberWang} this - no description * @param {number} val - no description * @returns {void} **/ SetFloatValue(this: DNumberWang, val: number): void /** * * Sets the amount of decimal places allowed in the number selector. * * @name DNumberWang:SetDecimals * @wiki https://wiki.garrysmod.com/page/DNumberWang/SetDecimals * @param {DNumberWang} this - no description * @param {number} num - The amount of decimal places. * @returns {void} **/ SetDecimals(this: DNumberWang, num: number): void /** * * Internal function which is called when the number selector value is changed. This function is empty by default so it needs to be overridden in order to provide functionality. * * @name DNumberWang:OnValueChanged * @wiki https://wiki.garrysmod.com/page/DNumberWang/OnValueChanged * @param {DNumberWang} this - no description * @param {number} val - The new value of the number selector. * @returns {void} **/ OnValueChanged(this: DNumberWang, val: number): void /** * * Hides the number selector arrows. * * @name DNumberWang:HideWang * @wiki https://wiki.garrysmod.com/page/DNumberWang/HideWang * @param {DNumberWang} this - no description * @returns {void} **/ HideWang(this: DNumberWang): void /** * * Returns the numeric value inside the number selector. * * @name DNumberWang:GetValue * @wiki https://wiki.garrysmod.com/page/DNumberWang/GetValue * @param {DNumberWang} this - no description * @returns {number} - The numeric value. **/ GetValue(this: DNumberWang): number /** * * This function returns the panel it is used on. * * @name DNumberWang:GetTextArea * @wiki https://wiki.garrysmod.com/page/DNumberWang/GetTextArea * @param {DNumberWang} this - no description * @returns {Panel} - self **/ GetTextArea(this: DNumberWang): Panel /** * * Returns the minimum numeric value allowed by the number selector. * * @name DNumberWang:GetMin * @wiki https://wiki.garrysmod.com/page/DNumberWang/GetMin * @param {DNumberWang} this - no description * @returns {number} - The minimum number. **/ GetMin(this: DNumberWang): number /** * * Returns the maximum numeric value allowed by the number selector. * * @name DNumberWang:GetMax * @wiki https://wiki.garrysmod.com/page/DNumberWang/GetMax * @param {DNumberWang} this - no description * @returns {number} - The maximum value. **/ GetMax(this: DNumberWang): number /** * * Returns a fraction representing the current number selector value to number selector min/max range ratio. If argument *val* is supplied, that number will be computed instead. * * @name DNumberWang:GetFraction * @wiki https://wiki.garrysmod.com/page/DNumberWang/GetFraction * @param {DNumberWang} this - no description * @param {number} val - The fraction numerator. * @returns {void} **/ GetFraction(this: DNumberWang, val: number): void /** * * Returns whatever is set by @DNumberWang:SetFloatValue or 0. * * @name DNumberWang:GetFloatValue * @wiki https://wiki.garrysmod.com/page/DNumberWang/GetFloatValue * @param {DNumberWang} this - no description * @returns {number} - no description **/ GetFloatValue(this: DNumberWang): number /** * * Returns the amount of decimal places allowed in the number selector, set by @DNumberWang:SetDecimals * * @name DNumberWang:GetDecimals * @wiki https://wiki.garrysmod.com/page/DNumberWang/GetDecimals * @param {DNumberWang} this - no description * @returns {number} - The amount of decimal places allowed in the number selector. **/ GetDecimals(this: DNumberWang): number } declare interface DNumberScratch extends DImageButton { /** * * Forces the assigned ConVar to be updated to the value of this @DNumberScratch type * * @name DNumberScratch:UpdateConVar * @wiki https://wiki.garrysmod.com/page/DNumberScratch/UpdateConVar * @internal * @param {DNumberScratch} this - no description * @returns {void} **/ UpdateConVar(this: DNumberScratch): void /** * * Sets the zoom level of the scratch panel. * * @name DNumberScratch:SetZoom * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetZoom * @param {DNumberScratch} this - no description * @param {number} zoom - no description * @returns {void} **/ SetZoom(this: DNumberScratch, zoom: number): void /** * * Sets the value of the @DNumberScratch type and triggers @DNumberScratch:OnValueChanged * * @name DNumberScratch:SetValue * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetValue * @param {DNumberScratch} this - no description * @param {number} val - The value to set. * @returns {void} **/ SetValue(this: DNumberScratch, val: number): void /** * * Sets if the scratch window should be drawn or not. Cannot be used to force it to draw, only to hide it, which will not stop the panel from working with invisible window. * * @name DNumberScratch:SetShouldDrawScreen * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetShouldDrawScreen * @internal * @param {DNumberScratch} this - no description * @param {boolean} shouldDraw - no description * @returns {void} **/ SetShouldDrawScreen(this: DNumberScratch, shouldDraw: boolean): void /** * * Sets the max value that can be selected on the number scratch * * @name DNumberScratch:SetMax * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetMax * @param {DNumberScratch} this - no description * @param {number} max - The maximum number * @returns {void} **/ SetMax(this: DNumberScratch, max: number): void /** * * Sets the minimum value that can be selected on the number scratch. * * @name DNumberScratch:SetMin * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetMin * @param {DNumberScratch} this - no description * @param {number} min - The minimum number * @returns {void} **/ SetMin(this: DNumberScratch, min: number): void /** * * Sets the value of the @DNumberScratch type as a fraction, a value between 0 and 1 where 0 is the minimum and 1 is the maximum value of the @DNumberScratch type * * @name DNumberScratch:SetFraction * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetFraction * @param {DNumberScratch} this - no description * @param {number} frac - A value between 0 and 1 * @returns {void} **/ SetFraction(this: DNumberScratch, frac: number): void /** * * Does not trigger @DNumberScratch:OnValueChanged * Use @DNumberScratch:SetValue instead. * * @name DNumberScratch:SetFloatValue * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetFloatValue * @internal * @param {DNumberScratch} this - no description * @param {number} val - The value to set * @returns {void} **/ SetFloatValue(this: DNumberScratch, val: number): void /** * * Sets the desired amount of numbers after the decimal point. * * @name DNumberScratch:SetDecimals * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetDecimals * @param {DNumberScratch} this - no description * @param {number} decimals - 0 for whole numbers only, 1 for one number after the decimal point, etc. * @returns {void} **/ SetDecimals(this: DNumberScratch, decimals: number): void /** * * Sets whether or not the panel is 'active'. * Forcing this panel to be active may not work. * * @name DNumberScratch:SetActive * @wiki https://wiki.garrysmod.com/page/DNumberScratch/SetActive * @internal * @param {DNumberScratch} this - no description * @param {boolean} active - true to activate, false to deactivate. * @returns {void} **/ SetActive(this: DNumberScratch, active: boolean): void /** * * Used to paint the 'scratch' window. * * @name DNumberScratch:PaintScratchWindow * @wiki https://wiki.garrysmod.com/page/DNumberScratch/PaintScratchWindow * @internal * @param {DNumberScratch} this - no description * @returns {void} **/ PaintScratchWindow(this: DNumberScratch): void /** * * Called when the value of the @DNumberScratch type is changed. * * @name DNumberScratch:OnValueChanged * @wiki https://wiki.garrysmod.com/page/DNumberScratch/OnValueChanged * @param {DNumberScratch} this - no description * @param {number} newValue - The new value * @returns {void} **/ OnValueChanged(this: DNumberScratch, newValue: number): void /** * * Used to lock the cursor in place. * * @name DNumberScratch:LockCursor * @wiki https://wiki.garrysmod.com/page/DNumberScratch/LockCursor * @internal * @param {DNumberScratch} this - no description * @returns {void} **/ LockCursor(this: DNumberScratch): void /** * * Returns whether the player is currently editing the value of the @DNumberScratch type. * * @name DNumberScratch:IsEditing * @wiki https://wiki.garrysmod.com/page/DNumberScratch/IsEditing * @param {DNumberScratch} this - no description * @returns {boolean} - no description **/ IsEditing(this: DNumberScratch): boolean /** * * Returns the ideal zoom level for the panel based on the @DNumberScratch:GetRange. * * @name DNumberScratch:IdealZoom * @wiki https://wiki.garrysmod.com/page/DNumberScratch/IdealZoom * @param {DNumberScratch} this - no description * @returns {number} - The ideal zoom level for the panel based on the panels range. **/ IdealZoom(this: DNumberScratch): number /** * * Returns the zoom level of the scratch window * * @name DNumberScratch:GetZoom * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetZoom * @param {DNumberScratch} this - no description * @returns {number} - no description **/ GetZoom(this: DNumberScratch): number /** * * Returns whether the scratch window should be visible or not. * * @name DNumberScratch:GetShouldDrawScreen * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetShouldDrawScreen * @param {DNumberScratch} this - no description * @returns {boolean} - no description **/ GetShouldDrawScreen(this: DNumberScratch): boolean /** * * Returns the real value of the @DNumberScratch type as a string. * See also @DNumberScratch:GetFloatValue and @DNumberScratch:GetFraction. * * @name DNumberScratch:GetTextValue * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetTextValue * @param {DNumberScratch} this - no description * @returns {string} - The real value of the @DNumberScratch type **/ GetTextValue(this: DNumberScratch): string /** * * Returns the range of the @DNumberScratch type. Basically max value - min value. * * @name DNumberScratch:GetRange * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetRange * @param {DNumberScratch} this - no description * @returns {number} - The range of the @DNumberScratch type **/ GetRange(this: DNumberScratch): number /** * * Returns the minimum value that can be selected on the number scratch * * @name DNumberScratch:GetMin * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetMin * @param {DNumberScratch} this - no description * @returns {number} - The minimum value that can be selected on the number scratch **/ GetMin(this: DNumberScratch): number /** * * Returns the value of the @DNumberScratch type as a fraction, a value between 0 and 1 where 0 is the minimum and 1 is the maximum value of the @DNumberScratch type. * See also: * * @DNumberScratch:GetTextValue * * @DNumberScratch:GetFloatValue * * @DNumberScratch:SetFraction * * @name DNumberScratch:GetFraction * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetFraction * @param {DNumberScratch} this - no description * @returns {number} - A value between 0 and 1 **/ GetFraction(this: DNumberScratch): number /** * * Returns the maximum value that can be selected on the number scratch * * @name DNumberScratch:GetMax * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetMax * @param {DNumberScratch} this - no description * @returns {number} - The maximum value that can be selected on the number scratch **/ GetMax(this: DNumberScratch): number /** * * Returns the desired amount of numbers after the decimal point. * * @name DNumberScratch:GetDecimals * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetDecimals * @param {DNumberScratch} this - no description * @returns {number} - 0 for whole numbers only, 1 for one number after the decimal point, etc. **/ GetDecimals(this: DNumberScratch): number /** * * Returns the real value of the @DNumberScratch type as a number. * See also @DNumberScratch:GetTextValue and @DNumberScratch:GetFraction. * * @name DNumberScratch:GetFloatValue * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetFloatValue * @param {DNumberScratch} this - no description * @returns {number} - The real value of the @DNumberScratch type **/ GetFloatValue(this: DNumberScratch): number /** * * Returns whether this panel is active or not, i.e. if the player is currently changing its value. * * @name DNumberScratch:GetActive * @wiki https://wiki.garrysmod.com/page/DNumberScratch/GetActive * @param {DNumberScratch} this - no description * @returns {boolean} - no description **/ GetActive(this: DNumberScratch): boolean /** * * Used by @DNumberScratch:PaintScratchWindow. * * @name DNumberScratch:DrawScreen * @wiki https://wiki.garrysmod.com/page/DNumberScratch/DrawScreen * @internal * @param {DNumberScratch} this - no description * @param {number} x - no description * @param {number} y - no description * @param {number} w - no description * @param {number} h - no description * @returns {void} **/ DrawScreen(this: DNumberScratch, x: number, y: number, w: number, h: number): void /** * * Used by @DNumberScratch:DrawScreen. * * @name DNumberScratch:DrawNotches * @wiki https://wiki.garrysmod.com/page/DNumberScratch/DrawNotches * @internal * @param {DNumberScratch} this - no description * @param {number} level - no description * @param {number} x - no description * @param {number} y - no description * @param {number} w - no description * @param {number} h - no description * @param {number} range - no description * @param {number} value - no description * @param {number} min - no description * @param {number} max - no description * @returns {void} **/ DrawNotches(this: DNumberScratch, level: number, x: number, y: number, w: number, h: number, range: number, value: number, min: number, max: number): void } declare interface DNotify extends Panel { /** * @name DNotify:Shuffle * @wiki https://wiki.garrysmod.com/page/DNotify/Shuffle * @internal * @param {DNotify} this - no description * @returns {void} **/ Shuffle(this: DNotify): void /** * * Sets the spacing between child elements of the notification panel. * * @name DNotify:SetSpacing * @wiki https://wiki.garrysmod.com/page/DNotify/SetSpacing * @param {DNotify} this - no description * @param {number} spacing - no description * @returns {void} **/ SetSpacing(this: DNotify, spacing: number): void /** * * Sets the display time in seconds for the DNotify. * * @name DNotify:SetLife * @wiki https://wiki.garrysmod.com/page/DNotify/SetLife * @param {DNotify} this - no description * @param {number} time - The time in seconds. * @returns {void} **/ SetLife(this: DNotify, time: number): void /** * * Sets the alignment of the child panels in the notification * * @name DNotify:SetAlignment * @wiki https://wiki.garrysmod.com/page/DNotify/SetAlignment * @param {DNotify} this - no description * @param {number} alignment - It's the Numpad alignment, 6 is right, 9 is top left, etc. * @returns {void} **/ SetAlignment(this: DNotify, alignment: number): void /** * * Returns the spacing between items set by @DNotify:SetSpacing. * * @name DNotify:GetSpacing * @wiki https://wiki.garrysmod.com/page/DNotify/GetSpacing * @param {DNotify} this - no description * @returns {number} - no description **/ GetSpacing(this: DNotify): number /** * * Returns the display time in seconds of the DNotify. This is set with * @DNotify:SetLife. * * @name DNotify:GetLife * @wiki https://wiki.garrysmod.com/page/DNotify/GetLife * @param {DNotify} this - no description * @returns {number} - The display time in seconds. **/ GetLife(this: DNotify): number /** * * Returns all the items added with @DNotify:AddItem. * * @name DNotify:GetItems * @wiki https://wiki.garrysmod.com/page/DNotify/GetItems * @param {DNotify} this - no description * @returns {Panel[]} - A table of @Panel types. **/ GetItems(this: DNotify): Panel[] /** * * Returns the current alignment of this notification panel. Set by @DNotify:SetAlignment. * * @name DNotify:GetAlignment * @wiki https://wiki.garrysmod.com/page/DNotify/GetAlignment * @param {DNotify} this - no description * @returns {number} - The numpad alignment **/ GetAlignment(this: DNotify): number /** * * Adds a panel to the notification * * @name DNotify:AddItem * @wiki https://wiki.garrysmod.com/page/DNotify/AddItem * @param {DNotify} this - no description * @param {Panel} pnl - The panel to add * @param {number} lifeLength - If set, overrides @DNotify:SetLife. * @returns {void} **/ AddItem(this: DNotify, pnl: Panel, lifeLength?: number): void } declare interface DModelSelect extends DPanelSelect { /** * * Sets the height of the panel **in the amount of 64px spawnicons**. * Overrides @Panel:SetHeight. * * @name DModelSelect:SetHeight * @wiki https://wiki.garrysmod.com/page/DModelSelect/SetHeight * @param {DModelSelect} this - no description * @param {number} num - Basically how many rows of 64x64 px spawnicons should fit in this DModelSelect * @returns {void} **/ SetHeight(this: DModelSelect, num?: number): void /** * * Called to set the list of models within the panel element. * * @name DModelSelect:SetModelList * @wiki https://wiki.garrysmod.com/page/DModelSelect/SetModelList * @param {DModelSelect} this - no description * @param {table} models - Each key is a model path, the value is a kay-value table where they key is a convar name and value is the value to set to that convar. * @param {string} convar - no description * @param {boolean} dontSort - no description * @param {boolean} DontCallListConVars - no description * @returns {void} **/ SetModelList(this: DModelSelect, models: table, convar: string, dontSort: boolean, DontCallListConVars: boolean): void } declare interface DModelPanel extends DButton { /** * @name DModelPanel:StartScene * @wiki https://wiki.garrysmod.com/page/DModelPanel/StartScene * @param {DModelPanel} this - no description * @param {string} path - The path to the scene file. (.vcd) * @returns {void} **/ StartScene(this: DModelPanel, path: string): void /** * * Sets the model of the rendered entity. * * @name DModelPanel:SetModel * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetModel * @param {DModelPanel} this - no description * @param {string} model - The model to apply to the entity * @returns {void} **/ SetModel(this: DModelPanel, model: string): void /** * * Makes the panel's camera face the given position. * * @name DModelPanel:SetLookAt * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetLookAt * @param {DModelPanel} this - no description * @param {Vector} pos - The position to orient the camera toward. * @returns {void} **/ SetLookAt(this: DModelPanel, pos: Vector): void /** * * Sets the angles of the camera. * * @name DModelPanel:SetLookAng * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetLookAng * @param {DModelPanel} this - no description * @param {Angle} ang - The angles to set the camera to. * @returns {void} **/ SetLookAng(this: DModelPanel, ang: Angle): void /** * * Sets the panel camera's FOV (field of view). * * @name DModelPanel:SetFOV * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetFOV * @param {DModelPanel} this - no description * @param {number} fov - The field of view value. * @returns {void} **/ SetFOV(this: DModelPanel, fov: number): void /** * * Sets the entity to be rendered by the model panel. * * @name DModelPanel:SetEntity * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetEntity * @note If you set *ent* to a shared entity you must set *ent* to nil before removing this panel or else a "Trying to remove server entity on client!" error is thrown * @param {DModelPanel} this - no description * @param {Entity} ent - The new panel entity. * @returns {void} **/ SetEntity(this: DModelPanel, ent: Entity): void /** * * Sets the directional lighting used on the rendered entity. * * @name DModelPanel:SetDirectionalLight * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetDirectionalLight * @param {DModelPanel} this - no description * @param {BOX} direction - The light direction, see @BOX enum. * @param {Color} color - The color of the directional lighting. * @returns {void} **/ SetDirectionalLight(this: DModelPanel, direction: BOX, color: Color): void /** * * Sets the color of the rendered entity. * * @name DModelPanel:SetColor * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetColor * @note This does not work on Garry's Mod player models since they use a different color system. To modify a player model color, see Example 2 on the @DModelPanel type page * @param {DModelPanel} this - no description * @param {Color} color - The render color of the entity. * @returns {void} **/ SetColor(this: DModelPanel, color: Color): void /** * * Sets the position of the camera. * * @name DModelPanel:SetCamPos * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetCamPos * @param {DModelPanel} this - no description * @param {Vector} pos - The position to set the camera at. * @returns {void} **/ SetCamPos(this: DModelPanel, pos: Vector): void /** * * Sets the speed used by @DModelPanel:RunAnimation to advance frame on an entity sequence. * * @name DModelPanel:SetAnimSpeed * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetAnimSpeed * @note @EntityFuncs:FrameAdvance doesn't seem to have any functioning arguments and therefore changing this will not have any affect on the panel entity's sequence speed without reimplementation. It only affects the value returned by @DModelPanel:GetAnimSpeed * @param {DModelPanel} this - no description * @param {number} animSpeed - The animation speed. * @returns {void} **/ SetAnimSpeed(this: DModelPanel, animSpeed: number): void /** * * Sets whether or not to animate the entity when the default @DModelPanel:LayoutEntity is called. * * @name DModelPanel:SetAnimated * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetAnimated * @param {DModelPanel} this - no description * @param {boolean} animated - True to animate, false otherwise. * @returns {void} **/ SetAnimated(this: DModelPanel, animated: boolean): void /** * * Sets the ambient lighting used on the rendered entity. * * @name DModelPanel:SetAmbientLight * @wiki https://wiki.garrysmod.com/page/DModelPanel/SetAmbientLight * @param {DModelPanel} this - no description * @param {Color} color - The color of the ambient lighting. * @returns {void} **/ SetAmbientLight(this: DModelPanel, color: Color): void /** * * This function is used in the **DModelPanel:LayoutEntity**. It will set the active model to the last set animation using @EntityFuncs:SetSequence. By default, it is the walking animation. * * @name DModelPanel:RunAnimation * @wiki https://wiki.garrysmod.com/page/DModelPanel/RunAnimation * @param {DModelPanel} this - no description * @returns {void} **/ RunAnimation(this: DModelPanel): void /** * * Called **before** the entity of the @DModelPanel type is drawn. * * @name DModelPanel:PreDrawModel * @wiki https://wiki.garrysmod.com/page/DModelPanel/PreDrawModel * @param {DModelPanel} this - no description * @param {DModelPanel} ent - The clientside entity of the @DModelPanel type that has been drawn. * @returns {boolean} - Return false to stop the entity from being drawn. This will also cause @DModelPanel:PostDrawModel to stop being called. **/ PreDrawModel(this: DModelPanel, ent: DModelPanel): boolean /** * * By default, this function slowly rotates and animates the entity being rendered. * If you want to change this behavior, you should override it. * * @name DModelPanel:LayoutEntity * @wiki https://wiki.garrysmod.com/page/DModelPanel/LayoutEntity * @internal * @param {DModelPanel} this - no description * @param {Entity} entity - The entity that is being rendered. * @returns {void} **/ LayoutEntity(this: DModelPanel, entity: Entity): void /** * * Called when the entity of the @DModelPanel type was drawn. * This is a rendering hook with 3d drawing context. * * @name DModelPanel:PostDrawModel * @wiki https://wiki.garrysmod.com/page/DModelPanel/PostDrawModel * @param {DModelPanel} this - no description * @param {DModelPanel} ent - The clientside entity of the @DModelPanel type that has been drawn. * @returns {void} **/ PostDrawModel(this: DModelPanel, ent: DModelPanel): void /** * * Gets the model of the rendered entity. * * @name DModelPanel:GetModel * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetModel * @param {DModelPanel} this - no description * @returns {string} - The model of the rendered entity. **/ GetModel(this: DModelPanel): string /** * * Returns the position the viewing camera is pointing toward. * * @name DModelPanel:GetLookAt * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetLookAt * @param {DModelPanel} this - no description * @returns {Vector} - The position the camera is pointing toward. **/ GetLookAt(this: DModelPanel): Vector /** * * Returns the angles of the model viewing camera. Is **nil** until changed with @DModelPanel:SetLookAng. * * @name DModelPanel:GetLookAng * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetLookAng * @param {DModelPanel} this - no description * @returns {Angle} - The angles of the camera. **/ GetLookAng(this: DModelPanel): Angle /** * * Returns the FOV (field of view) the camera is using. * * @name DModelPanel:GetFOV * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetFOV * @param {DModelPanel} this - no description * @returns {number} - The FOV of the camera. **/ GetFOV(this: DModelPanel): number /** * * Returns the entity being rendered by the model panel. * * @name DModelPanel:GetEntity * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetEntity * @param {DModelPanel} this - no description * @returns {CSEnt} - The rendered entity (client-side) **/ GetEntity(this: DModelPanel): CSEnt /** * * Returns the color of the rendered entity. * * @name DModelPanel:GetColor * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetColor * @param {DModelPanel} this - no description * @returns {IColor} - The color of the entity, see @IColor structure. **/ GetColor(this: DModelPanel): IColor /** * * Returns the position of the model viewing camera. * * @name DModelPanel:GetCamPos * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetCamPos * @param {DModelPanel} this - no description * @returns {Vector} - The position of the camera. **/ GetCamPos(this: DModelPanel): Vector /** * * Returns the animation speed of the panel entity, see @DModelPanel:SetAnimSpeed. * * @name DModelPanel:GetAnimSpeed * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetAnimSpeed * @param {DModelPanel} this - no description * @returns {number} - The animation speed. **/ GetAnimSpeed(this: DModelPanel): number /** * * Returns whether or not the panel entity should be animated when the default @DModelPanel:LayoutEntity function is called. * * @name DModelPanel:GetAnimated * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetAnimated * @param {DModelPanel} this - no description * @returns {boolean} - True if the panel entity can be animated with @EntityFuncs:SetSequence directly, false otherwise. **/ GetAnimated(this: DModelPanel): boolean /** * * Returns the ambient lighting used on the rendered entity. * * @name DModelPanel:GetAmbientLight * @wiki https://wiki.garrysmod.com/page/DModelPanel/GetAmbientLight * @param {DModelPanel} this - no description * @returns {table} - The color of the ambient lighting. **/ GetAmbientLight(this: DModelPanel): table /** * * Used by the DModelPanel's paint hook to draw the model and background. * * @name DModelPanel:DrawModel * @wiki https://wiki.garrysmod.com/page/DModelPanel/DrawModel * @internal * @param {DModelPanel} this - no description * @returns {void} **/ DrawModel(this: DModelPanel): void } declare interface DMenuOptionCVar extends DMenuOption { /** * * Sets the value of the [console variable](https://wiki.garrysmod.com/page/ConVars) when the @DMenuOptionCVar type is checked. * * @name DMenuOptionCVar:SetValueOn * @wiki https://wiki.garrysmod.com/page/DMenuOptionCVar/SetValueOn * @param {DMenuOptionCVar} this - no description * @param {string} value - The value * @returns {void} **/ SetValueOn(this: DMenuOptionCVar, value: string): void /** * * Sets the value of the [console variable](https://wiki.garrysmod.com/page/ConVars) when the @DMenuOptionCVar type is not checked. * * @name DMenuOptionCVar:SetValueOff * @wiki https://wiki.garrysmod.com/page/DMenuOptionCVar/SetValueOff * @param {DMenuOptionCVar} this - no description * @param {string} value - The value * @returns {void} **/ SetValueOff(this: DMenuOptionCVar, value: string): void /** * * Sets the [console variable](https://wiki.garrysmod.com/page/ConVars) to be used by @DMenuOptionCVar type. * * @name DMenuOptionCVar:SetConVar * @wiki https://wiki.garrysmod.com/page/DMenuOptionCVar/SetConVar * @param {DMenuOptionCVar} this - no description * @param {string} cvar - The [console variable](https://wiki.garrysmod.com/page/ConVars) name to set * @returns {void} **/ SetConVar(this: DMenuOptionCVar, cvar: string): void /** * * Return the value of the [console variable](https://wiki.garrysmod.com/page/ConVars) when the @DMenuOptionCVar type is checked. * * @name DMenuOptionCVar:GetValueOn * @wiki https://wiki.garrysmod.com/page/DMenuOptionCVar/GetValueOn * @param {DMenuOptionCVar} this - no description * @returns {string} - The value **/ GetValueOn(this: DMenuOptionCVar): string /** * * Returns the value of the [console variable](https://wiki.garrysmod.com/page/ConVars) when the @DMenuOptionCVar type is not checked. * * @name DMenuOptionCVar:GetValueOff * @wiki https://wiki.garrysmod.com/page/DMenuOptionCVar/GetValueOff * @param {DMenuOptionCVar} this - no description * @returns {string} - The value **/ GetValueOff(this: DMenuOptionCVar): string /** * * Returns the [console variable](https://wiki.garrysmod.com/page/ConVars) used by the @DMenuOptionCVar type. * * @name DMenuOptionCVar:GetConVar * @wiki https://wiki.garrysmod.com/page/DMenuOptionCVar/GetConVar * @param {DMenuOptionCVar} this - no description * @returns {string} - The [console variable](https://wiki.garrysmod.com/page/ConVars) used **/ GetConVar(this: DMenuOptionCVar): string } declare interface DMenuOption extends DButton { /** * * Toggles the checked state of @DMenuOption type. Does not respect @DMenuOption:GetIsCheckable. * * @name DMenuOption:ToggleCheck * @wiki https://wiki.garrysmod.com/page/DMenuOption/ToggleCheck * @param {DMenuOption} this - no description * @returns {void} **/ ToggleCheck(this: DMenuOption): void /** * * Used internally by @DMenuOption:AddSubMenu to create the submenu arrow and assign the created submenu to be opened this this option is hovered. * * @name DMenuOption:SetSubMenu * @wiki https://wiki.garrysmod.com/page/DMenuOption/SetSubMenu * @internal * @param {DMenuOption} this - no description * @param {Panel} menu - no description * @returns {void} **/ SetSubMenu(this: DMenuOption, menu: Panel): void /** * @name DMenuOption:SetMenu * @wiki https://wiki.garrysmod.com/page/DMenuOption/SetMenu * @param {DMenuOption} this - no description * @param {Panel} pnl - no description * @returns {void} **/ SetMenu(this: DMenuOption, pnl: Panel): void /** * * Sets whether the @DMenuOption type is a checkbox option or a normal button option. * * @name DMenuOption:SetIsCheckable * @wiki https://wiki.garrysmod.com/page/DMenuOption/SetIsCheckable * @param {DMenuOption} this - no description * @param {boolean} checkable - no description * @returns {void} **/ SetIsCheckable(this: DMenuOption, checkable: boolean): void /** * * Sets the checked state of the @DMenuOption type. Does not invoke @DMenuOption:OnChecked. * * @name DMenuOption:SetChecked * @wiki https://wiki.garrysmod.com/page/DMenuOption/SetChecked * @param {DMenuOption} this - no description * @param {boolean} checked - no description * @returns {void} **/ SetChecked(this: DMenuOption, checked: boolean): void /** * * Called whenever the @DMenuOption type's checked state changes. * * @name DMenuOption:OnChecked * @wiki https://wiki.garrysmod.com/page/DMenuOption/OnChecked * @param {DMenuOption} this - no description * @param {boolean} checked - The new checked state * @returns {void} **/ OnChecked(this: DMenuOption, checked: boolean): void /** * @name DMenuOption:GetMenu * @wiki https://wiki.garrysmod.com/page/DMenuOption/GetMenu * @param {DMenuOption} this - no description * @returns {DMenu} - A @DMenu type **/ GetMenu(this: DMenuOption): DMenu /** * * Returns whether the @DMenuOption type is a checkbox option or a normal button option. * * @name DMenuOption:GetIsCheckable * @wiki https://wiki.garrysmod.com/page/DMenuOption/GetIsCheckable * @param {DMenuOption} this - no description * @returns {boolean} - no description **/ GetIsCheckable(this: DMenuOption): boolean /** * * Returns the checked state of @DMenuOption type. * * @name DMenuOption:GetChecked * @wiki https://wiki.garrysmod.com/page/DMenuOption/GetChecked * @param {DMenuOption} this - no description * @returns {boolean} - Are we checked or not **/ GetChecked(this: DMenuOption): boolean /** * * Creates a sub @DMenu type and returns it. Has no duplicate call protection. * * @name DMenuOption:AddSubMenu * @wiki https://wiki.garrysmod.com/page/DMenuOption/AddSubMenu * @param {DMenuOption} this - no description * @returns {DMenu} - The created @DMenu type to add options to. **/ AddSubMenu(this: DMenuOption): DMenu } declare interface DMenuBar extends DPanel { /** * * Sets whether or not the background should be painted. Is the same as @DMenuBar:SetDrawBackground * * @name DMenuBar:SetPaintBackground * @wiki https://wiki.garrysmod.com/page/DMenuBar/SetPaintBackground * @param {DMenuBar} this - no description * @param {boolean} shouldPaint - Should the background be painted * @returns {void} **/ SetPaintBackground(this: DMenuBar, shouldPaint: boolean): void /** * * Sets whether or not the panel is a menu. Used for closing menus when another panel is selected. * * @name DMenuBar:SetIsMenu * @wiki https://wiki.garrysmod.com/page/DMenuBar/SetIsMenu * @param {DMenuBar} this - no description * @param {boolean} isMenu - Is this a menu * @returns {void} **/ SetIsMenu(this: DMenuBar, isMenu: boolean): void /** * * Sets whether or not the background should be painted. Is the same as @DMenuBar:SetPaintBackground * * @name DMenuBar:SetDrawBackground * @wiki https://wiki.garrysmod.com/page/DMenuBar/SetDrawBackground * @param {DMenuBar} this - no description * @param {boolean} shouldPaint - Should the background be painted * @returns {void} **/ SetDrawBackground(this: DMenuBar, shouldPaint: boolean): void /** * * Sets whether or not the panel is disabled * * @name DMenuBar:SetDisabled * @wiki https://wiki.garrysmod.com/page/DMenuBar/SetDisabled * @param {DMenuBar} this - no description * @param {boolean} disable - Should be disabled or not * @returns {void} **/ SetDisabled(this: DMenuBar, disable: boolean): void /** * * Sets the background color * * @name DMenuBar:SetBackgroundColor * @wiki https://wiki.garrysmod.com/page/DMenuBar/SetBackgroundColor * @param {DMenuBar} this - no description * @param {Color} color - See @IColor structure * @returns {void} **/ SetBackgroundColor(this: DMenuBar, color: Color): void /** * * If a menu is visible/opened, then the menu is returned. * * @name DMenuBar:GetOpenMenu * @wiki https://wiki.garrysmod.com/page/DMenuBar/GetOpenMenu * @param {DMenuBar} this - no description * @returns {Panel} - Returns the visible/open menu or nil. **/ GetOpenMenu(this: DMenuBar): Panel /** * * Returns whether or not the background should be painted. Is the same as @DMenuBar:GetDrawBackground * * @name DMenuBar:GetPaintBackground * @wiki https://wiki.garrysmod.com/page/DMenuBar/GetPaintBackground * @param {DMenuBar} this - no description * @returns {boolean} - Should the background be painted **/ GetPaintBackground(this: DMenuBar): boolean /** * * Returns whether or not the panel is a menu. Used for closing menus when another panel is selected. * * @name DMenuBar:GetIsMenu * @wiki https://wiki.garrysmod.com/page/DMenuBar/GetIsMenu * @param {DMenuBar} this - no description * @returns {boolean} - Is a menu **/ GetIsMenu(this: DMenuBar): boolean /** * * Returns whether or not the background should be painted. Is the same as @DMenuBar:GetPaintBackground * * @name DMenuBar:GetDrawBackground * @wiki https://wiki.garrysmod.com/page/DMenuBar/GetDrawBackground * @param {DMenuBar} this - no description * @returns {boolean} - Should the background be painted **/ GetDrawBackground(this: DMenuBar): boolean /** * * Returns whether or not the DMenuBar is disabled * * @name DMenuBar:GetDisabled * @wiki https://wiki.garrysmod.com/page/DMenuBar/GetDisabled * @param {DMenuBar} this - no description * @returns {boolean} - Is disabled **/ GetDisabled(this: DMenuBar): boolean /** * * Returns the DMenuBar's background color * * @name DMenuBar:GetBackgroundColor * @wiki https://wiki.garrysmod.com/page/DMenuBar/GetBackgroundColor * @param {DMenuBar} this - no description * @returns {IColor} - The background's color. See @IColor structure **/ GetBackgroundColor(this: DMenuBar): IColor /** * * Retrieves a @DMenu type object from the menu bar. If one with the given label doesn't exist, a new one is created. * To add a DMenu without checking, use @DMenuBar:AddMenu. * * @name DMenuBar:AddOrGetMenu * @wiki https://wiki.garrysmod.com/page/DMenuBar/AddOrGetMenu * @param {DMenuBar} this - no description * @param {string} label - The name (label) of the derma menu to get or create. * @returns {DMenu} - The @DMenu type with the given label. **/ AddOrGetMenu(this: DMenuBar, label: string): DMenu /** * * Creates a new @DMenu type object tied to a @DButton type with the given label on the menu bar. * This will create a new menu regardless of whether or not one with the same label exists. To add **or** get a menu, use @DMenuBar:AddOrGetMenu. * * @name DMenuBar:AddMenu * @wiki https://wiki.garrysmod.com/page/DMenuBar/AddMenu * @param {DMenuBar} this - no description * @param {string} label - The name (label) of the derma menu to create. * @returns {DMenu} - The new @DMenu type which will be opened when the button is clicked. **/ AddMenu(this: DMenuBar, label: string): DMenu } declare interface DMenu extends DScrollPanel { /** * * Used internally to store the open submenu by @DMenu:Hide, @DMenu:OpenSubMenu, @DMenu:CloseSubMenu * * @name DMenu:SetOpenSubMenu * @wiki https://wiki.garrysmod.com/page/DMenu/SetOpenSubMenu * @internal * @param {DMenu} this - no description * @param {Panel} item - The menu to store * @returns {void} **/ SetOpenSubMenu(this: DMenu, item: Panel): void /** * * Sets the minimum width of the @DMenu type. The menu will be stretched to match the given value. * * @name DMenu:SetMinimumWidth * @wiki https://wiki.garrysmod.com/page/DMenu/SetMinimumWidth * @param {DMenu} this - no description * @param {number} minWidth - The minimum width of the @DMenu type in pixels * @returns {void} **/ SetMinimumWidth(this: DMenu, minWidth: number): void /** * * Sets the maximum height the @DMenu type can have. If the height of all menu items exceed this value, a scroll bar will be automatically added. * * @name DMenu:SetMaxHeight * @wiki https://wiki.garrysmod.com/page/DMenu/SetMaxHeight * @param {DMenu} this - no description * @param {number} maxHeight - The maximum height of the @DMenu type to set, in pixels * @returns {void} **/ SetMaxHeight(this: DMenu, maxHeight: number): void /** * * Sets whether the @DMenu type should draw the icon column with a different color. * * @name DMenu:SetDrawColumn * @wiki https://wiki.garrysmod.com/page/DMenu/SetDrawColumn * @param {DMenu} this - no description * @param {boolean} draw - Whether to draw the column or not * @returns {void} **/ SetDrawColumn(this: DMenu, draw: boolean): void /** * * Does nothing. * * @name DMenu:SetDrawBorder * @wiki https://wiki.garrysmod.com/page/DMenu/SetDrawBorder * @param {DMenu} this - no description * @param {boolean} bool - no description * @returns {void} **/ SetDrawBorder(this: DMenu, bool: boolean): void /** * * Set to true by default. IF set to true, the menu will be deleted when it is closed, not simply hidden. * This is used by @DMenuBar type * * @name DMenu:SetDeleteSelf * @wiki https://wiki.garrysmod.com/page/DMenu/SetDeleteSelf * @param {DMenu} this - no description * @param {boolean} newState - true to delete menu on close, false to simply hide. * @returns {void} **/ SetDeleteSelf(this: DMenu, newState: boolean): void /** * * Called by @DMenuOption type. Calls @DMenu:OptionSelected. * * @name DMenu:OptionSelectedInternal * @wiki https://wiki.garrysmod.com/page/DMenu/OptionSelectedInternal * @internal * @param {DMenu} this - no description * @param {DMenuOption} option - The @DMenuOption type that called this function * @returns {void} **/ OptionSelectedInternal(this: DMenu, option: DMenuOption): void /** * * Called when a option has been selected * * @name DMenu:OptionSelected * @wiki https://wiki.garrysmod.com/page/DMenu/OptionSelected * @param {DMenu} this - no description * @param {DMenuOption} option - The @DMenuOption type that was selected * @param {string} optionText - The options text * @returns {void} **/ OptionSelected(this: DMenu, option: DMenuOption, optionText: string): void /** * * Closes any active sub menus, and opens a new one. * * @name DMenu:OpenSubMenu * @wiki https://wiki.garrysmod.com/page/DMenu/OpenSubMenu * @param {DMenu} this - no description * @param {DMenuOption} item - The @DMenuOption type to open the submenu at * @param {Panel} menu - The submenu to open. If set to nil, the function just closes existing submenus. * @returns {void} **/ OpenSubMenu(this: DMenu, item: DMenuOption, menu?: Panel): void /** * * Opens the DMenu at the current mouse position * * @name DMenu:Open * @wiki https://wiki.garrysmod.com/page/DMenu/Open * @param {DMenu} this - no description * @param {number} x - Position (X coordinate) to open the menu at. * @param {number} y - Position (Y coordinate) to open the menu at. * @param {any} skipanimation - This argument does nothing. * @param {Panel} ownerpanel - no description * @returns {void} **/ Open(this: DMenu, x?: number, y?: number, skipanimation: any, ownerpanel: Panel): void /** * * Highlights selected item in the @DMenu type by setting the item's key "Highlight" to true. * Doesn't appear to be working or used. * * @name DMenu:HighlightItem * @wiki https://wiki.garrysmod.com/page/DMenu/HighlightItem * @param {DMenu} this - no description * @param {Panel} item - The item to highlight. * @returns {void} **/ HighlightItem(this: DMenu, item: Panel): void /** * * Used to safely hide (not remove) the menu. This will also hide any opened submenues recursively. * * @name DMenu:Hide * @wiki https://wiki.garrysmod.com/page/DMenu/Hide * @param {DMenu} this - no description * @returns {void} **/ Hide(this: DMenu): void /** * * Returns the currently opened submenu. * Used internally to store the open submenu by @DMenu:Hide, @DMenu:OpenSubMenu. * * @name DMenu:GetOpenSubMenu * @wiki https://wiki.garrysmod.com/page/DMenu/GetOpenSubMenu * @internal * @param {DMenu} this - no description * @returns {Panel} - The currently opened submenu, if any. **/ GetOpenSubMenu(this: DMenu): Panel /** * * Returns the minimum width of the @DMenu type in pixels * * @name DMenu:GetMinimumWidth * @wiki https://wiki.garrysmod.com/page/DMenu/GetMinimumWidth * @param {DMenu} this - no description * @returns {number} - the minimum width of the @DMenu type **/ GetMinimumWidth(this: DMenu): number /** * * Returns the maximum height of the @DMenu type. * * @name DMenu:GetMaxHeight * @wiki https://wiki.garrysmod.com/page/DMenu/GetMaxHeight * @param {DMenu} this - no description * @returns {number} - The maximum height in pixels **/ GetMaxHeight(this: DMenu): number /** * * Returns whether the @DMenu type should draw the icon column with a different color or not. * See @DMenu:SetDrawColumn * * @name DMenu:GetDrawColumn * @wiki https://wiki.garrysmod.com/page/DMenu/GetDrawColumn * @param {DMenu} this - no description * @returns {boolean} - Whether to draw the column or not **/ GetDrawColumn(this: DMenu): boolean /** * * Returns the value set by @DMenu:SetDrawBorder. * * @name DMenu:GetDrawBorder * @wiki https://wiki.garrysmod.com/page/DMenu/GetDrawBorder * @param {DMenu} this - no description * @returns {boolean} - no description **/ GetDrawBorder(this: DMenu): boolean /** * * Set by @DMenu:SetDeleteSelf * * @name DMenu:GetDeleteSelf * @wiki https://wiki.garrysmod.com/page/DMenu/GetDeleteSelf * @param {DMenu} this - no description * @returns {boolean} - no description **/ GetDeleteSelf(this: DMenu): boolean /** * * Gets a child by its index. * * @name DMenu:GetChild * @wiki https://wiki.garrysmod.com/page/DMenu/GetChild * @note Unlike @Panel:GetChild, this index starts at 1. * @param {DMenu} this - no description * @param {number} childIndex - The index of the child to get. * @returns {void} **/ GetChild(this: DMenu, childIndex: number): void /** * * Used internally by @DMenu:OpenSubMenu. * * @name DMenu:CloseSubMenu * @wiki https://wiki.garrysmod.com/page/DMenu/CloseSubMenu * @internal * @param {DMenu} this - no description * @param {Panel} menu - The menu to close * @returns {void} **/ CloseSubMenu(this: DMenu, menu: Panel): void /** * * Clears all highlights made by @DMenu:HighlightItem. * Doesn't appear to be used or do anything. * * @name DMenu:ClearHighlights * @wiki https://wiki.garrysmod.com/page/DMenu/ClearHighlights * @param {DMenu} this - no description * @returns {void} **/ ClearHighlights(this: DMenu): void /** * * Returns the number of child elements of @DMenu type's @DScrollPanel:GetCanvas. * * @name DMenu:ChildCount * @wiki https://wiki.garrysmod.com/page/DMenu/ChildCount * @param {DMenu} this - no description * @returns {number} - The number of child elements **/ ChildCount(this: DMenu): number /** * * Add a sub menu to the DMenu * * @name DMenu:AddSubMenu * @wiki https://wiki.garrysmod.com/page/DMenu/AddSubMenu * @param {DMenu} this - no description * @param {string} Name - Name of the sub menu. * @param {function} func - Function to execute when this sub menu is clicked. * @returns {DMenu} - The created sub @DMenu type * @returns {DMenuOption} - The created @DMenuOption type * @tupleReturn **/ AddSubMenu(this: DMenu, Name: string, func?: UnknownFunc): [DMenu, DMenuOption] /** * * Adds a horizontal line spacer. * * @name DMenu:AddSpacer * @wiki https://wiki.garrysmod.com/page/DMenu/AddSpacer * @param {DMenu} this - no description * @returns {void} **/ AddSpacer(this: DMenu): void /** * * Adds a panel to the @DMenu type as if it were an option. * This invokes @DScrollPanel:AddItem and will not create a new panel if a class name is passed, unlike @Panel:Add. * * @name DMenu:AddPanel * @wiki https://wiki.garrysmod.com/page/DMenu/AddPanel * @param {DMenu} this - no description * @param {Panel} pnl - The panel that you want to add. * @returns {void} **/ AddPanel(this: DMenu, pnl: Panel): void /** * * Add an option to the DMenu * * @name DMenu:AddOption * @wiki https://wiki.garrysmod.com/page/DMenu/AddOption * @param {DMenu} this - no description * @param {string} name - Name of the option. * @param {function} func - Function to execute when this option is clicked. * @returns {DMenuOption} - Returns the created @DMenuOption type panel. **/ AddOption(this: DMenu, name: string, func?: UnknownFunc): DMenuOption /** * * Creates a @DMenuOptionCVar type and adds it as an option into the menu. Checking and unchecking the option will alter the given console variable's value. * * @name DMenu:AddCVar * @wiki https://wiki.garrysmod.com/page/DMenu/AddCVar * @param {DMenu} this - no description * @param {string} strText - The text of the button * @param {string} convar - The console variable to change * @param {string} on - The value of the console variable to set when the option is checked * @param {string} off - The value of the console variable to set when the option is unchecked * @param {function} funcFunction - If set, the function will be called every time the option is pressed/clicked/selected. * It will have only one argument: * @returns {DMenuOptionCVar} - The created @DMenuOptionCVar type **/ AddCVar(this: DMenu, strText: string, convar: string, on: string, off: string, funcFunction?: DMenuAddCVarFunc): DMenuOptionCVar } declare interface DListView_Line extends Panel { /** * * Sets the string held in the specified column of a @DListView_Line type panel. * * @name DListView_Line:SetColumnText * @wiki https://wiki.garrysmod.com/page/DListView Line/SetColumnText * @param {DListView_Line} this - no description * @param {number} column - The number of the column to write the text from, starts with 1. * @param {string} value - Column text you want to set * @returns {void} **/ SetColumnText(this: DListView_Line, column: number, value: string): void /** * * Gets the string held in the specified column of a @DListView_Line type panel. * This is the same thing as doing @DListView_Line:GetValue( column_number ). * * @name DListView_Line:GetColumnText * @wiki https://wiki.garrysmod.com/page/DListView Line/GetColumnText * @param {DListView_Line} this - no description * @param {number} column - The number of the column to retrieve the text from, starts with 1. * @returns {string} - The contents of the specified column. **/ GetColumnText(this: DListView_Line, column: number): string } declare interface DListView_Column extends DPanel { /** * * Sets the width of the panel. * * @name DListView_Column:SetWidth * @wiki https://wiki.garrysmod.com/page/DListView Column/SetWidth * @param {DListView_Column} this - no description * @param {number} width - The number value which will determine panel width. * @returns {void} **/ SetWidth(this: DListView_Column, width: number): void /** * * Sets the text alignment for the column * * @name DListView_Column:SetTextAlign * @wiki https://wiki.garrysmod.com/page/DListView Column/SetTextAlign * @param {DListView_Column} this - no description * @param {number} alignment - The direction of the content, based on the number pad. * @7 key: **top-left**@8 key: **top-center**@9 key: **top-right** * @4 key: **middle-left**@5 key: **center**@6 key: **middle-right** * @1 key: **bottom-left**@2 key: **bottom-center**@3 key: **bottom-right** * @returns {void} **/ SetTextAlign(this: DListView_Column, alignment: number): void /** * * Sets the minimum width of a column. * * @name DListView_Column:SetMinWidth * @wiki https://wiki.garrysmod.com/page/DListView Column/SetMinWidth * @param {DListView_Column} this - no description * @param {number} width - The number value which will determine a minimum width. * @returns {void} **/ SetMinWidth(this: DListView_Column, width: number): void /** * * Sets the maximum width of a column. * * @name DListView_Column:SetMaxWidth * @wiki https://wiki.garrysmod.com/page/DListView Column/SetMaxWidth * @param {DListView_Column} this - no description * @param {number} width - The number value which will determine a maximum width. * @returns {void} **/ SetMaxWidth(this: DListView_Column, width: number): void /** * * Sets the fixed width of the column. * * @name DListView_Column:SetFixedWidth * @wiki https://wiki.garrysmod.com/page/DListView Column/SetFixedWidth * @param {DListView_Column} this - no description * @param {number} width - The number value which will determine a fixed width. * @returns {void} **/ SetFixedWidth(this: DListView_Column, width: number): void } declare interface DListView extends DPanel { /** * * Sorts the list based on given columns. * All arguments are optional * * @name DListView:SortByColumns * @wiki https://wiki.garrysmod.com/page/DListView/SortByColumns * @param {DListView} this - no description * @param {number} column1 - no description * @param {boolean} descrending1 - no description * @param {number} column2 - no description * @param {boolean} descrending2 - no description * @param {number} column3 - no description * @param {boolean} descrending3 - no description * @param {number} column4 - no description * @param {boolean} descrending4 - no description * @returns {void} **/ SortByColumns(this: DListView, column1?: number, descrending1?: boolean, column2?: number, descrending2?: boolean, column3?: number, descrending3?: boolean, column4?: number, descrending4?: boolean): void /** * * Sorts the items in the specified column. * * @name DListView:SortByColumn * @wiki https://wiki.garrysmod.com/page/DListView/SortByColumn * @param {DListView} this - no description * @param {number} columnIndex - The index of the column that should be sorted. * @param {boolean} descending - Whether the items should be sorted in descending order or not. * @returns {void} **/ SortByColumn(this: DListView, columnIndex: number, descending?: boolean): void /** * * Enables/disables the sorting of columns by clicking. * * @name DListView:SetSortable * @wiki https://wiki.garrysmod.com/page/DListView/SetSortable * @param {DListView} this - no description * @param {boolean} isSortable - Whether sorting columns with clicking is allowed or not. * @returns {void} **/ SetSortable(this: DListView, isSortable: boolean): void /** * * Sets whether multiple lines can be selected by the user by using the @Ctrl key or @Shift key keys. When set to false, only one line can be selected. * * @name DListView:SetMultiSelect * @wiki https://wiki.garrysmod.com/page/DListView/SetMultiSelect * @param {DListView} this - no description * @param {boolean} allowMultiSelect - Whether multiple lines can be selected or not * @returns {void} **/ SetMultiSelect(this: DListView, allowMultiSelect: boolean): void /** * * Sets whether the header line should be visible on not. * * @name DListView:SetHideHeaders * @wiki https://wiki.garrysmod.com/page/DListView/SetHideHeaders * @param {DListView} this - no description * @param {boolean} hide - Whether the header line should be visible on not. * @returns {void} **/ SetHideHeaders(this: DListView, hide: boolean): void /** * * Sets the height of the header line of the @DListView type. * See also @DListView:SetDataHeight. * * @name DListView:SetHeaderHeight * @wiki https://wiki.garrysmod.com/page/DListView/SetHeaderHeight * @param {DListView} this - no description * @param {number} height - The new height to set. Default value is 16. * @returns {void} **/ SetHeaderHeight(this: DListView, height: number): void /** * * Used internally to signify if the @DListView type needs a rebuild. * * @name DListView:SetDirty * @wiki https://wiki.garrysmod.com/page/DListView/SetDirty * @internal * @param {DListView} this - no description * @param {boolean} isDirty - no description * @returns {void} **/ SetDirty(this: DListView, isDirty: boolean): void /** * * Sets the height of all lines of the @DListView type except for the header line. * See also @DListView:SetHeaderHeight. * * @name DListView:SetDataHeight * @wiki https://wiki.garrysmod.com/page/DListView/SetDataHeight * @param {DListView} this - no description * @param {number} height - The new height to set. Default value is 17. * @returns {void} **/ SetDataHeight(this: DListView, height: number): void /** * * Selects a line in the listview. * * @name DListView:SelectItem * @wiki https://wiki.garrysmod.com/page/DListView/SelectItem * @param {DListView} this - no description * @param {Panel} Line - The line to select. * @returns {void} **/ SelectItem(this: DListView, Line: Panel): void /** * * Selects the line at the first index of the DListView if one has been added. * * @name DListView:SelectFirstItem * @wiki https://wiki.garrysmod.com/page/DListView/SelectFirstItem * @param {DListView} this - no description * @returns {void} **/ SelectFirstItem(this: DListView): void /** * * Removes a line from the list view. * * @name DListView:RemoveLine * @wiki https://wiki.garrysmod.com/page/DListView/RemoveLine * @param {DListView} this - no description * @param {number} line - Removes the given row, by row id (same number as @DListView:GetLine). * @returns {void} **/ RemoveLine(this: DListView, line: number): void /** * * Called internally by @DListView:OnClickLine when a line is selected. This is the function you should override to define the behavior when a line is selected. * * @name DListView:OnRowSelected * @wiki https://wiki.garrysmod.com/page/DListView/OnRowSelected * @param {DListView} this - no description * @param {number} rowIndex - The index of the row/line that the user clicked on. * @param {DListView_Line} row - The @DListView_Line type that the user clicked on. * @returns {void} **/ OnRowSelected(this: DListView, rowIndex: number, row: DListView_Line): void /** * * Called from @DListView_Column type. * * @name DListView:OnRequestResize * @wiki https://wiki.garrysmod.com/page/DListView/OnRequestResize * @internal * @param {DListView} this - no description * @param {Panel} column - The column which initialized the resize * @param {number} size - no description * @returns {void} **/ OnRequestResize(this: DListView, column: Panel, size: number): void /** * * Called when a row is right-clicked * * @name DListView:OnRowRightClick * @wiki https://wiki.garrysmod.com/page/DListView/OnRowRightClick * @param {DListView} this - no description * @param {number} lineID - The line ID of the right clicked line * @param {DListView_Line} line - The line panel itself, a @DListView_Line type. * @returns {void} **/ OnRowRightClick(this: DListView, lineID: number, line: DListView_Line): void /** * * Called whenever a line is clicked. * * @name DListView:OnClickLine * @wiki https://wiki.garrysmod.com/page/DListView/OnClickLine * @internal Use @DListView:OnRowSelected instead! * @param {DListView} this - no description * @param {Panel} line - The selected line. * @param {boolean} isSelected - Boolean indicating whether the line is selected. * @returns {void} **/ OnClickLine(this: DListView, line: Panel, isSelected: boolean): void /** * * Converts LineID to SortedID * * @name DListView:GetSortedID * @wiki https://wiki.garrysmod.com/page/DListView/GetSortedID * @internal * @param {DListView} this - no description * @param {number} lineId - The @DListView_Line:GetID of a line to look up * @returns {number} - no description **/ GetSortedID(this: DListView, lineId: number): number /** * * Returns whether sorting of columns by clicking their headers is allowed or not. * See also @DListView:SetSortable. * * @name DListView:GetSortable * @wiki https://wiki.garrysmod.com/page/DListView/GetSortable * @param {DListView} this - no description * @returns {boolean} - Whether sorting of columns by clicking their headers is allowed or not **/ GetSortable(this: DListView): boolean /** * * Gets the currently selected @DListView_Line type index. * If @DListView:SetMultiSelect is set to true, only the first line of all selected lines will be returned. Use @DListView:GetSelected instead to get all of the selected lines. * * @name DListView:GetSelectedLine * @wiki https://wiki.garrysmod.com/page/DListView/GetSelectedLine * @param {DListView} this - no description * @returns {number} - The index of the currently selected line. * @returns {DListView_Line} - The currently selected @DListView_Line type. * @tupleReturn **/ GetSelectedLine(this: DListView): [number, DListView_Line] /** * * Gets all of the lines that are currently selected. * * @name DListView:GetSelected * @wiki https://wiki.garrysmod.com/page/DListView/GetSelected * @param {DListView} this - no description * @returns {DListView_Line[]} - A table of @DListView_Line types. **/ GetSelected(this: DListView): DListView_Line[] /** * * Gets all of the lines added to the DListView. * * @name DListView:GetLines * @wiki https://wiki.garrysmod.com/page/DListView/GetLines * @param {DListView} this - no description * @returns {table} - The lines added to the DListView. **/ GetLines(this: DListView): table /** * * Gets the @DListView_Line type at the given index. * * @name DListView:GetLine * @wiki https://wiki.garrysmod.com/page/DListView/GetLine * @param {DListView} this - no description * @param {number} id - The index of the line to get. * @returns {DListView_Line} - The @DListView_Line type at the given index. **/ GetLine(this: DListView, id: number): DListView_Line /** * * Returns whether multiple lines can be selected or not. * See @DListView:SetMultiSelect. * * @name DListView:GetMultiSelect * @wiki https://wiki.garrysmod.com/page/DListView/GetMultiSelect * @param {DListView} this - no description * @returns {boolean} - Whether multiple lines can be selected or not. **/ GetMultiSelect(this: DListView): boolean /** * * Returns the height of @DListView:GetCanvas. * Intended to represent the height of all data lines. * * @name DListView:GetInnerTall * @wiki https://wiki.garrysmod.com/page/DListView/GetInnerTall * @param {DListView} this - no description * @returns {number} - The height of @DListView:GetCanvas. **/ GetInnerTall(this: DListView): number /** * * Returns whether the header line should be visible on not. * * @name DListView:GetHideHeaders * @wiki https://wiki.garrysmod.com/page/DListView/GetHideHeaders * @param {DListView} this - no description * @returns {boolean} - Whether the header line should be visible on not. **/ GetHideHeaders(this: DListView): boolean /** * * Returns the height of the header of the @DListView type. * See also @DListView:SetHeaderHeight. * * @name DListView:GetHeaderHeight * @wiki https://wiki.garrysmod.com/page/DListView/GetHeaderHeight * @param {DListView} this - no description * @returns {number} - The height of the header of the @DListView type. **/ GetHeaderHeight(this: DListView): number /** * * See @DListView:SetDirty. * * @name DListView:GetDirty * @wiki https://wiki.garrysmod.com/page/DListView/GetDirty * @internal * @param {DListView} this - no description * @returns {boolean} - no description **/ GetDirty(this: DListView): boolean /** * * Returns the height of the data of the @DListView type. * See also @DListView:SetDataHeight. * * @name DListView:GetDataHeight * @wiki https://wiki.garrysmod.com/page/DListView/GetDataHeight * @param {DListView} this - no description * @returns {number} - The height of the data of the @DListView type. **/ GetDataHeight(this: DListView): number /** * * Gets the canvas. * * @name DListView:GetCanvas * @wiki https://wiki.garrysmod.com/page/DListView/GetCanvas * @param {DListView} this - no description * @returns {Panel} - The canvas. **/ GetCanvas(this: DListView): Panel /** * * Internal helper function called from the @PanelHooks:PerformLayout of @DListView type. * * @name DListView:FixColumnsLayout * @wiki https://wiki.garrysmod.com/page/DListView/FixColumnsLayout * @internal * @param {DListView} this - no description * @returns {void} **/ FixColumnsLayout(this: DListView): void /** * * Called when a line in the DListView is double clicked. * * @name DListView:DoDoubleClick * @wiki https://wiki.garrysmod.com/page/DListView/DoDoubleClick * @param {DListView} this - no description * @param {number} lineID - The line number of the double clicked line. * @param {DListView_Line} line - The double clicked @DListView_Line type. * @returns {void} **/ DoDoubleClick(this: DListView, lineID: number, line: DListView_Line): void /** * * Removes the scrollbar. * * @name DListView:DisableScrollbar * @wiki https://wiki.garrysmod.com/page/DListView/DisableScrollbar * @param {DListView} this - no description * @returns {void} **/ DisableScrollbar(this: DListView): void /** * * Creates the lines and gets the height of the contents, in a DListView. * * @name DListView:DataLayout * @wiki https://wiki.garrysmod.com/page/DListView/DataLayout * @param {DListView} this - no description * @returns {number} - The height of the contents **/ DataLayout(this: DListView): number /** * * Gets the width of a column. * * @name DListView:ColumnWidth * @wiki https://wiki.garrysmod.com/page/DListView/ColumnWidth * @param {DListView} this - no description * @param {number} column - The column to get the width of. * @returns {number} - Width of the column. **/ ColumnWidth(this: DListView, column: number): number /** * * Clears the current selection in the DListView. * * @name DListView:ClearSelection * @wiki https://wiki.garrysmod.com/page/DListView/ClearSelection * @param {DListView} this - no description * @returns {void} **/ ClearSelection(this: DListView): void /** * * Removes all lines that have been added to the DListView. * * @name DListView:Clear * @wiki https://wiki.garrysmod.com/page/DListView/Clear * @param {DListView} this - no description * @returns {void} **/ Clear(this: DListView): void /** * * Adds a line to the list view. * * @name DListView:AddLine * @wiki https://wiki.garrysmod.com/page/DListView/AddLine * @param {DListView} this - no description * @param {any[]} ...text - Values for a new row in the DListView, If several arguments are supplied, each argument will correspond to a respective column in the DListView. * @returns {DListView_Line} - The newly created @DListView_Line type. **/ AddLine(this: DListView, ...text: any[]): DListView_Line /** * * Adds a column to the listview. * * @name DListView:AddColumn * @wiki https://wiki.garrysmod.com/page/DListView/AddColumn * @param {DListView} this - no description * @param {string} column - The name of the column to add. * @param {number} position - Sets the ordering of this column compared to other columns. * @returns {DListView_Column} - The newly created @DListView_Column type. **/ AddColumn(this: DListView, column: string, position: number): DListView_Column } declare interface DLabelURL extends URLLabel { /** * * Sets the base text color of the @DLabelURL type. This is overridden by @DLabelURL:SetTextColor. * * @name DLabelURL:SetTextStyleColor * @wiki https://wiki.garrysmod.com/page/DLabelURL/SetTextStyleColor * @param {DLabelURL} this - no description * @param {Color} color - The @Color function to set * @returns {void} **/ SetTextStyleColor(this: DLabelURL, color: Color): void /** * * Sets the text color of the @DLabelURL type. Overrides @DLabelURL:SetTextStyleColor. * This should only be used immediately after it is created, and otherwise @Panel:SetFGColor. * * @name DLabelURL:SetTextColor * @wiki https://wiki.garrysmod.com/page/DLabelURL/SetTextColor * @validate * @param {DLabelURL} this - no description * @param {table} col - The @Color function to use. * @returns {void} **/ SetTextColor(this: DLabelURL, col: table): void /** * * Alias of @DLabelURL:SetTextColor. * * @name DLabelURL:SetColor * @wiki https://wiki.garrysmod.com/page/DLabelURL/SetColor * @param {DLabelURL} this - no description * @param {table} col - The @Color function to use. * @returns {void} **/ SetColor(this: DLabelURL, col: table): void /** * * Returns the color set by @DLabelURL:SetTextStyleColor. * * @name DLabelURL:GetTextStyleColor * @wiki https://wiki.garrysmod.com/page/DLabelURL/GetTextStyleColor * @param {DLabelURL} this - no description * @returns {IColor} - The @IColor structure **/ GetTextStyleColor(this: DLabelURL): IColor /** * * Gets the current text color of the @DLabelURL type set by @DLabelURL:SetTextColor. * * @name DLabelURL:GetTextColor * @wiki https://wiki.garrysmod.com/page/DLabelURL/GetTextColor * @param {DLabelURL} this - no description * @returns {table} - The current text @Color function. **/ GetTextColor(this: DLabelURL): table /** * * Gets the current text color of the @DLabelURL type. Alias as @DLabelURL:GetTextColor. * * @name DLabelURL:GetColor * @wiki https://wiki.garrysmod.com/page/DLabelURL/GetColor * @param {DLabelURL} this - no description * @returns {table} - The current text @Color function. **/ GetColor(this: DLabelURL): table } declare interface DLabelEditable extends DLabel { /** * * A hook called when the player presses Enter (i.e. the finished editing the label) and the text has changed. * Allows you to override/modify the text that will be set to display. * * @name DLabelEditable:OnLabelTextChanged * @wiki https://wiki.garrysmod.com/page/DLabelEditable/OnLabelTextChanged * @param {DLabelEditable} this - no description * @param {string} txt - The original user input text * @returns {string} - If provided, will override the text that will be applied to the label itself. **/ OnLabelTextChanged(this: DLabelEditable, txt: string): string } declare interface DLabel extends Label { /** * * Called internally to update the color of the text. * * @name DLabel:UpdateFGColor * @wiki https://wiki.garrysmod.com/page/DLabel/UpdateFGColor * @internal * @param {DLabel} this - no description * @returns {void} **/ UpdateFGColor(this: DLabel): void /** * * A hook called from within @DLabel:ApplySchemeSettings to determine the color of the text on display. * * @name DLabel:UpdateColors * @wiki https://wiki.garrysmod.com/page/DLabel/UpdateColours * @param {DLabel} this - no description * @param {table} skin - A table supposed to contain the color values listed above. * @returns {void} **/ UpdateColors(this: DLabel, skin: table): void /** * * Toggles the label's state. This can be set and retrieved with @DLabel:SetToggle and @DLabel:GetToggle. * In order to use toggle functionality, you must first call @DLabel:SetIsToggle with *true*, as it is disabled by default. * * @name DLabel:Toggle * @wiki https://wiki.garrysmod.com/page/DLabel/Toggle * @param {DLabel} this - no description * @returns {void} **/ Toggle(this: DLabel): void /** * * Sets the toggle state of the label. This can be retrieved with @DLabel:GetToggle and toggled with @DLabel:Toggle. * In order to use toggle functionality, you must first call @DLabel:SetIsToggle with *true*, as it is disabled by default. * * @name DLabel:SetToggle * @wiki https://wiki.garrysmod.com/page/DLabel/SetToggle * @param {DLabel} this - no description * @param {boolean} toggleState - The toggle state to be set. * @returns {void} **/ SetToggle(this: DLabel, toggleState: boolean): void /** * * Used by @DLabel:SetDark, @DLabel:SetBright and @DLabel:SetHighlight to set the text color without affecting @DLabel:SetTextColor calls. * * @name DLabel:SetTextStyleColor * @wiki https://wiki.garrysmod.com/page/DLabel/SetTextStyleColor * @internal Use @DLabel:SetTextColor instead! * @param {DLabel} this - no description * @param {Color} color - The text color. Uses the @IColor structure. * @returns {void} **/ SetTextStyleColor(this: DLabel, color: Color): void /** * * Sets the text color of the @DLabel type. This will take precedence over @DLabel:SetTextStyleColor. * * @name DLabel:SetTextColor * @wiki https://wiki.garrysmod.com/page/DLabel/SetTextColor * @param {DLabel} this - no description * @param {Color} color - The text color. Uses the @IColor structure. * @returns {void} **/ SetTextColor(this: DLabel, color: Color): void /** * * Enables or disables toggle functionality for a label. Retrieved with @DLabel:GetIsToggle. * You must call this before using @DLabel:SetToggle, @DLabel:GetToggle or @DLabel:Toggle. * * @name DLabel:SetIsToggle * @wiki https://wiki.garrysmod.com/page/DLabel/SetIsToggle * @param {DLabel} this - no description * @param {boolean} allowToggle - Whether or not to enable toggle functionality. * @returns {void} **/ SetIsToggle(this: DLabel, allowToggle: boolean): void /** * * Sets the color of the text to the highlight text color defined in the skin. * For the default Derma skin this makes the label red. * See also @DLabel:SetBright and @DLabel:SetDark. * You should only consider using this if you are using background elements that are not manually painted and are using the skin colors. * * @name DLabel:SetHighlight * @wiki https://wiki.garrysmod.com/page/DLabel/SetHighlight * @param {DLabel} this - no description * @param {boolean} highlight - true to set the label's color to skins's text highlight color, false otherwise. * @returns {void} **/ SetHighlight(this: DLabel, highlight: boolean): void /** * * [Category:DButton](https://wiki.garrysmod.com/page/Category:DButton) Sets the font of the label. * * @name DLabel:SetFont * @wiki https://wiki.garrysmod.com/page/DLabel/SetFont * @param {DLabel} this - no description * @param {string} fontName - The name of the font. * See [here](https://wiki.garrysmod.com/page/Default_Fonts) for a list of existing fonts. * Alternatively, use @surface.CreateFont to create your own custom font. * @returns {void} **/ SetFont(this: DLabel, fontName: string): void /** * * Sets whether or not double clicking should call @DLabel:DoDoubleClick. * This is enabled by default. * * @name DLabel:SetDoubleClickingEnabled * @wiki https://wiki.garrysmod.com/page/DLabel/SetDoubleClickingEnabled * @param {DLabel} this - no description * @param {boolean} enable - true to enable, false to disable * @returns {void} **/ SetDoubleClickingEnabled(this: DLabel, enable: boolean): void /** * * Sets the disabled state of the @DLabel type. * When disabled, the label does not respond to click, toggle or drag & drop actions. * * @name DLabel:SetDisabled * @wiki https://wiki.garrysmod.com/page/DLabel/SetDisabled * @param {DLabel} this - no description * @param {boolean} disable - *true* to disable the DLabel, *false* to enable it. * @returns {void} **/ SetDisabled(this: DLabel, disable: boolean): void /** * * Sets the color of the text to the dark text color defined in the skin. * See also @DLabel:SetBright and @DLabel:SetHighlight. * You should only consider using this if you are using background elements that are not manually painted and are using the skin colors. * * @name DLabel:SetDark * @wiki https://wiki.garrysmod.com/page/DLabel/SetDark * @param {DLabel} this - no description * @param {boolean} dark - Whenever to set the text to dark or not. * @returns {void} **/ SetDark(this: DLabel, dark: boolean): void /** * * Changes color of label. Alias of @DLabel:SetTextColor. * * @name DLabel:SetColor * @wiki https://wiki.garrysmod.com/page/DLabel/SetColor * @param {DLabel} this - no description * @param {Color} color - The color to set. Uses the Color structure. * @returns {void} **/ SetColor(this: DLabel, color: Color): void /** * * Sets the color of the text to the bright text color defined in the skin. * See also @DLabel:SetDark and @DLabel:SetHighlight. * You should only consider using this if you are using background elements that are not manually painted and are using the skin colors. * * @name DLabel:SetBright * @wiki https://wiki.garrysmod.com/page/DLabel/SetBright * @param {DLabel} this - no description * @param {boolean} bright - Whenever to set the text to bright or not. * @returns {void} **/ SetBright(this: DLabel, bright: boolean): void /** * * Automatically adjusts the height of the label dependent of the height of the text inside of it. * * @name DLabel:SetAutoStretchVertical * @wiki https://wiki.garrysmod.com/page/DLabel/SetAutoStretchVertical * @param {DLabel} this - no description * @param {boolean} stretch - Whenever to stretch the label vertically or not. * @returns {void} **/ SetAutoStretchVertical(this: DLabel, stretch: boolean): void /** * * Called when the toggle state of the label is changed by @DLabel:Toggle. * In order to use toggle functionality, you must first call @DLabel:SetIsToggle with *true*, as it is disabled by default. * * @name DLabel:OnToggled * @wiki https://wiki.garrysmod.com/page/DLabel/OnToggled * @param {DLabel} this - no description * @param {boolean} toggleState - The new toggle state. * @returns {void} **/ OnToggled(this: DLabel, toggleState: boolean): void /** * * Called when the player releases any mouse button on the label. This is always called after @DLabel:OnDepressed. * This works as an alternative to @PanelHooks:OnMouseReleased as that hook is used heavily by @DLabel type and overriding it will break functionality. * See also @DLabel:DoClick, @DLabel:DoMiddleClick, @DLabel:DoRightClick and @DLabel:DoDoubleClick. * * @name DLabel:OnReleased * @wiki https://wiki.garrysmod.com/page/DLabel/OnReleased * @param {DLabel} this - no description * @returns {void} **/ OnReleased(this: DLabel): void /** * * Called when the player presses the label with any mouse button. * This works as an alternative to @PanelHooks:OnMousePressed as that hook is used heavily by @DLabel type and overriding it will break functionality. * See also @DLabel:DoClick, @DLabel:DoMiddleClick, @DLabel:DoRightClick, @DLabel:OnReleased and @DLabel:DoDoubleClick. * * @name DLabel:OnDepressed * @wiki https://wiki.garrysmod.com/page/DLabel/OnDepressed * @param {DLabel} this - no description * @returns {void} **/ OnDepressed(this: DLabel): void /** * * Returns the current toggle state of the label. This can be set with @DLabel:SetToggle and toggled with @DLabel:Toggle. * In order to use toggle functionality, you must first call @DLabel:SetIsToggle with *true*, as it is disabled by default. * * @name DLabel:GetToggle * @wiki https://wiki.garrysmod.com/page/DLabel/GetToggle * @param {DLabel} this - no description * @returns {boolean} - The current toggle state. **/ GetToggle(this: DLabel): boolean /** * * Returns the "internal" or fallback color of the text. * See also @DLabel:GetTextColor and @DLabel:SetTextStyleColor. * * @name DLabel:GetTextStyleColor * @wiki https://wiki.garrysmod.com/page/DLabel/GetTextStyleColor * @internal * @param {DLabel} this - no description * @returns {table} - The "internal" color of the text **/ GetTextStyleColor(this: DLabel): table /** * * Returns the "override" text color, set by @DLabel:SetTextColor. * * @name DLabel:GetTextColor * @wiki https://wiki.garrysmod.com/page/DLabel/GetTextColor * @param {DLabel} this - no description * @returns {table} - The color of the text, or nil. **/ GetTextColor(this: DLabel): table /** * * Returns whether the toggle functionality is enabled for a label. Set with @DLabel:SetIsToggle. * * @name DLabel:GetIsToggle * @wiki https://wiki.garrysmod.com/page/DLabel/GetIsToggle * @param {DLabel} this - no description * @returns {boolean} - Whether or not toggle functionality is enabled. **/ GetIsToggle(this: DLabel): boolean /** * * Returns whether the @DLabel type should set its text color to the current skin's highlighted text color. * See @DLabel:SetHighlight. * * @name DLabel:GetHighlight * @wiki https://wiki.garrysmod.com/page/DLabel/GetHighlight * @param {DLabel} this - no description * @returns {boolean} - no description **/ GetHighlight(this: DLabel): boolean /** * * [Category:DButton](https://wiki.garrysmod.com/page/Category:DButton) Returns the current font of the DLabel. This is set with @DLabel:SetFont. * * @name DLabel:GetFont * @wiki https://wiki.garrysmod.com/page/DLabel/GetFont * @param {DLabel} this - no description * @returns {string} - The name of the font in use. **/ GetFont(this: DLabel): string /** * * Returns whether or not double clicking will call @DLabel:DoDoubleClick. * See @DLabel:SetDoubleClickingEnabled. * * @name DLabel:GetDoubleClickingEnabled * @wiki https://wiki.garrysmod.com/page/DLabel/GetDoubleClickingEnabled * @param {DLabel} this - no description * @returns {boolean} - true = enabled, false means disabled **/ GetDoubleClickingEnabled(this: DLabel): boolean /** * * Gets the disabled state of the @DLabel type. This is set with @DLabel:SetDisabled. * * @name DLabel:GetDisabled * @wiki https://wiki.garrysmod.com/page/DLabel/GetDisabled * @param {DLabel} this - no description * @returns {boolean} - The disabled state of the label. **/ GetDisabled(this: DLabel): boolean /** * * Returns whether the @DLabel type should set its text color to the current skin's dark text color. * See @DLabel:SetDark. * * @name DLabel:GetDark * @wiki https://wiki.garrysmod.com/page/DLabel/GetDark * @param {DLabel} this - no description * @returns {boolean} - no description **/ GetDark(this: DLabel): boolean /** * * Returns the actual color of the text. * See also @DLabel:GetTextColor and @DLabel:GetTextStyleColor. * * @name DLabel:GetColor * @wiki https://wiki.garrysmod.com/page/DLabel/GetColor * @param {DLabel} this - no description * @returns {table} - The the actual color of the text. **/ GetColor(this: DLabel): table /** * * Returns whether the @DLabel type should set its text color to the current skin's bright text color. * See @DLabel:SetBright. * * @name DLabel:GetBright * @wiki https://wiki.garrysmod.com/page/DLabel/GetBright * @param {DLabel} this - no description * @returns {boolean} - no description **/ GetBright(this: DLabel): boolean /** * * Returns whether the label stretches vertically or not. * Set by @DLabel:SetAutoStretchVertical. * * @name DLabel:GetAutoStretchVertical * @wiki https://wiki.garrysmod.com/page/DLabel/GetAutoStretchVertical * @param {DLabel} this - no description * @returns {boolean} - Whether the label stretches vertically or not. **/ GetAutoStretchVertical(this: DLabel): boolean /** * * Called when the label is right clicked (on key release) by the player. * This will be called after @DLabel:OnDepressed and @DLabel:OnReleased. * See also @DLabel:DoClick, @DLabel:DoMiddleClick and @DLabel:DoDoubleClick. * [Category:DButton](https://wiki.garrysmod.com/page/Category:DButton) * * @name DLabel:DoRightClick * @wiki https://wiki.garrysmod.com/page/DLabel/DoRightClick * @param {DLabel} this - no description * @returns {void} **/ DoRightClick(this: DLabel): void /** * * Called when the label is middle mouse (Mouse wheel, also known as mouse 3) clicked (on key release) by the player. * This will be called after @DLabel:OnDepressed and @DLabel:OnReleased. * See also @DLabel:DoClick, @DLabel:DoRightClick and @DLabel:DoDoubleClick. * [Category:DButton](https://wiki.garrysmod.com/page/Category:DButton) * * @name DLabel:DoMiddleClick * @wiki https://wiki.garrysmod.com/page/DLabel/DoMiddleClick * @param {DLabel} this - no description * @returns {void} **/ DoMiddleClick(this: DLabel): void /** * * Called just before @DLabel:DoDoubleClick. In @DLabel type does nothing and is safe to override. * * @name DLabel:DoDoubleClickInternal * @wiki https://wiki.garrysmod.com/page/DLabel/DoDoubleClickInternal * @param {DLabel} this - no description * @returns {void} **/ DoDoubleClickInternal(this: DLabel): void /** * * Called when the label is double clicked by the player with left clicks. * @DLabel:SetDoubleClickingEnabled must be set to true for this hook to work, which it is by default. * This will be called after @DLabel:OnDepressed and @DLabel:OnReleased and @DLabel:DoClick. * See also @DLabel:DoRightClick and @DLabel:DoMiddleClick. * * @name DLabel:DoDoubleClick * @wiki https://wiki.garrysmod.com/page/DLabel/DoDoubleClick * @param {DLabel} this - no description * @returns {void} **/ DoDoubleClick(this: DLabel): void /** * * Called just before @DLabel:DoClick. * In @DLabel type does nothing and is safe to override. Used by @DMenuOption type and @DCollapsibleCategory type's tabs. * * @name DLabel:DoClickInternal * @wiki https://wiki.garrysmod.com/page/DLabel/DoClickInternal * @param {DLabel} this - no description * @returns {void} **/ DoClickInternal(this: DLabel): void /** * * Called when the label is left clicked (on key release) by the player. * This will be called after @DLabel:OnDepressed and @DLabel:OnReleased. * This can be overridden; by default, it calls @DLabel:Toggle. * See also @DLabel:DoRightClick, @DLabel:DoMiddleClick and @DLabel:DoDoubleClick. * [Category:DButton](https://wiki.garrysmod.com/page/Category:DButton) * * @name DLabel:DoClick * @wiki https://wiki.garrysmod.com/page/DLabel/DoClick * @param {DLabel} this - no description * @returns {void} **/ DoClick(this: DLabel): void } declare interface DKillIcon extends Panel { /** * * Sets the killicon to be displayed. You should call @DKillIcon:SizeToContents following this. * Killicons can be added with @killicon.Add and @killicon.AddFont. * * @name DKillIcon:SetName * @wiki https://wiki.garrysmod.com/page/DKillIcon/SetName * @param {DKillIcon} this - no description * @param {string} iconName - The name of the killicon to be displayed. * @returns {void} **/ SetName(this: DKillIcon, iconName: string): void /** * * Gets the killicon being shown. * * @name DKillIcon:GetName * @wiki https://wiki.garrysmod.com/page/DKillIcon/GetName * @param {DKillIcon} this - no description * @returns {string} - The name of the killicon currently being displayed. **/ GetName(this: DKillIcon): string } declare interface DImageButton extends DButton { /** * * Sets whether the image inside the @DImageButton type should be stretched to fill the entire size of the button, without preserving aspect ratio. * If set to false, the image will not be resized at all. * * @name DImageButton:SetStretchToFit * @wiki https://wiki.garrysmod.com/page/DImageButton/SetStretchToFit * @param {DImageButton} this - no description * @param {boolean} stretch - True to stretch, false to not to stretch * @returns {void} **/ SetStretchToFit(this: DImageButton, stretch: boolean): void /** * * See @DImage:SetOnViewMaterial * * @name DImageButton:SetOnViewMaterial * @wiki https://wiki.garrysmod.com/page/DImageButton/SetOnViewMaterial * @param {DImageButton} this - no description * @param {string} mat - no description * @param {string} backup - no description * @returns {void} **/ SetOnViewMaterial(this: DImageButton, mat: string, backup: string): void /** * * Sets a @Material function directly as an image. Equivalent of @DImage:SetMaterial. * * @name DImageButton:SetMaterial * @wiki https://wiki.garrysmod.com/page/DImageButton/SetMaterial * @param {DImageButton} this - no description * @param {IMaterial} mat - The material to set * @returns {void} **/ SetMaterial(this: DImageButton, mat: IMaterial): void /** * * Sets whether the @DImageButton type should keep the aspect ratio of its image. Equivalent of @DImage:SetKeepAspect. * Note that this will not try to fit the image inside the button, but instead it will fill the button with the image. * * @name DImageButton:SetKeepAspect * @wiki https://wiki.garrysmod.com/page/DImageButton/SetKeepAspect * @param {DImageButton} this - no description * @param {boolean} keep - true to keep the aspect ratio, false not to * @returns {void} **/ SetKeepAspect(this: DImageButton, keep: boolean): void /** * * Hides or shows the image of the image button. Internally this calls @Panel:SetVisible on the internal @DImage type. * * @name DImageButton:SetImageVisible * @wiki https://wiki.garrysmod.com/page/DImageButton/SetImageVisible * @param {DImageButton} this - no description * @param {boolean} visible - Set true to make it visible ( default ), or false to hide the image * @returns {void} **/ SetImageVisible(this: DImageButton, visible: boolean): void /** * * Sets the "image" of the @DImageButton type. Equivalent of @DImage:SetImage. * * @name DImageButton:SetImage * @wiki https://wiki.garrysmod.com/page/DImageButton/SetImage * @param {DImageButton} this - no description * @param {string} strImage - The path of the image to load. When no file extension is supplied the VMT file extension is used. * @param {string} strBackup - The path of the backup image. * @returns {void} **/ SetImage(this: DImageButton, strImage: string, strBackup?: string): void /** * * Alias of @DImageButton:SetImage. * * @name DImageButton:SetIcon * @wiki https://wiki.garrysmod.com/page/DImageButton/SetIcon * @param {DImageButton} this - no description * @returns {void} **/ SetIcon(this: DImageButton): void /** * * Sets the color of the image. Equivalent of @DImage:SetImageColor * * @name DImageButton:SetColor * @wiki https://wiki.garrysmod.com/page/DImageButton/SetColor * @param {DImageButton} this - no description * @param {Color} color - The @Color function to set * @returns {void} **/ SetColor(this: DImageButton, color: Color): void /** * * Returns whether the image inside the button should be stretched to fit it or not * See @DImageButton:SetStretchToFit * * @name DImageButton:GetStretchToFit * @wiki https://wiki.garrysmod.com/page/DImageButton/GetStretchToFit * @param {DImageButton} this - no description * @returns {boolean} - no description **/ GetStretchToFit(this: DImageButton): boolean /** * * Returns the "image" of the @DImageButton type. Equivalent of @DImage:GetImage. * * @name DImageButton:GetImage * @wiki https://wiki.garrysmod.com/page/DImageButton/GetImage * @param {DImageButton} this - no description * @returns {string} - The path to the image that is loaded. **/ GetImage(this: DImageButton): string } declare interface DImage extends DPanel { /** * * Returns true if the image is **not** yet loaded. * * @name DImage:Unloaded * @wiki https://wiki.garrysmod.com/page/DImage/Unloaded * @param {DImage} this - no description * @returns {boolean} - no description **/ Unloaded(this: DImage): boolean /** * * Similar to @DImage:SetImage, but will only do the expensive part of actually loading the textures/material if the material is about to be rendered/viewed. * Useful for cases like @DIconBrowser type, where there are hundreds of small icons in 1 panel in a list that do not need all to be loaded at the same time. * * @name DImage:SetOnViewMaterial * @wiki https://wiki.garrysmod.com/page/DImage/SetOnViewMaterial * @param {DImage} this - no description * @param {string} mat - no description * @param {string} backupMat - no description * @returns {void} **/ SetOnViewMaterial(this: DImage, mat: string, backupMat: string): void /** * * Sets the material to be loaded when the image is first rendered. Used by @DImage:SetOnViewMaterial. * * @name DImage:SetMatName * @wiki https://wiki.garrysmod.com/page/DImage/SetMatName * @internal * @param {DImage} this - no description * @param {string} mat - no description * @returns {void} **/ SetMatName(this: DImage, mat: string): void /** * * Sets a @Material function directly as an image. * * @name DImage:SetMaterial * @wiki https://wiki.garrysmod.com/page/DImage/SetMaterial * @param {DImage} this - no description * @param {IMaterial} mat - The material to set * @returns {void} **/ SetMaterial(this: DImage, mat: IMaterial): void /** * * Sets whether the @DImage type should keep the aspect ratio of its image when being resized. * Note that this will not try to fit the image inside the button, but instead it will fill the button with the image. * * @name DImage:SetKeepAspect * @wiki https://wiki.garrysmod.com/page/DImage/SetKeepAspect * @param {DImage} this - no description * @param {boolean} keep - true to keep the aspect ratio, false not to * @returns {void} **/ SetKeepAspect(this: DImage, keep: boolean): void /** * * Sets the image's color override. * * @name DImage:SetImageColor * @wiki https://wiki.garrysmod.com/page/DImage/SetImageColor * @param {DImage} this - no description * @param {IColor} col - The color override of the image. Uses the @IColor structure. * @returns {void} **/ SetImageColor(this: DImage, col: IColor): void /** * * Sets the image to load into the frame. If the first image can't be loaded and *strBackup* is set, that image will be loaded instead. * This eventually calls @DImage:SetMaterial. * * @name DImage:SetImage * @wiki https://wiki.garrysmod.com/page/DImage/SetImage * @param {DImage} this - no description * @param {string} strImage - The path of the image to load. When no file extension is supplied the VMT file extension is used. * @param {string} strBackup - The path of the backup image. * @returns {void} **/ SetImage(this: DImage, strImage: string, strBackup?: string): void /** * * Sets the backup material to be loaded when the image is first rendered. Used by @DImage:SetOnViewMaterial. * * @name DImage:SetFailsafeMatName * @wiki https://wiki.garrysmod.com/page/DImage/SetFailsafeMatName * @internal * @param {DImage} this - no description * @param {string} backupMat - no description * @returns {void} **/ SetFailsafeMatName(this: DImage, backupMat: string): void /** * * Paints a ghost copy of the DImage panel at the given position and dimensions. This function overrides @Panel:PaintAt. * * @name DImage:PaintAt * @wiki https://wiki.garrysmod.com/page/DImage/PaintAt * @param {DImage} this - no description * @param {number} posX - The x coordinate to draw the panel from. * @param {number} posY - The y coordinate to draw the panel from. * @param {number} width - The width of the panel image to be drawn. * @param {number} height - The height of the panel image to be drawn. * @returns {void} **/ PaintAt(this: DImage, posX: number, posY: number, width?: number, height?: number): void /** * * Initializes the loading process of the material to render if it is not loaded yet. * You do not need to call this function. It is done for you automatically. * * @name DImage:LoadMaterial * @wiki https://wiki.garrysmod.com/page/DImage/LoadMaterial * @internal * @param {DImage} this - no description * @returns {void} **/ LoadMaterial(this: DImage): void /** * * Returns the texture path set by @DImage:SetMatName. * * @name DImage:GetMatName * @wiki https://wiki.garrysmod.com/page/DImage/GetMatName * @internal * @param {DImage} this - no description * @returns {string} - no description **/ GetMatName(this: DImage): string /** * * Returns the current @Material function of the @DImage type. * * @name DImage:GetMaterial * @wiki https://wiki.garrysmod.com/page/DImage/GetMaterial * @param {DImage} this - no description * @returns {IMaterial} - no description **/ GetMaterial(this: DImage): IMaterial /** * * Returns whether the @DImage type should keep the aspect ratio of its image when being resized. * See @DImage:SetKeepAspect for more info on how it works. * * @name DImage:GetKeepAspect * @wiki https://wiki.garrysmod.com/page/DImage/GetKeepAspect * @param {DImage} this - no description * @returns {boolean} - Whether the @DImage type should keep the aspect ratio of its image when being resized. **/ GetKeepAspect(this: DImage): boolean /** * * Returns the color override of the image panel. * * @name DImage:GetImageColor * @wiki https://wiki.garrysmod.com/page/DImage/GetImageColor * @param {DImage} this - no description * @returns {IColor} - The color override of the image. Uses the @IColor structure. **/ GetImageColor(this: DImage): IColor /** * * Returns the image loaded in the image panel. * * @name DImage:GetImage * @wiki https://wiki.garrysmod.com/page/DImage/GetImage * @param {DImage} this - no description * @returns {string} - The path to the image that is loaded. **/ GetImage(this: DImage): string /** * * Returns the texture path set by @DImage:SetFailsafeMatName. * * @name DImage:GetFailsafeMatName * @wiki https://wiki.garrysmod.com/page/DImage/GetFailsafeMatName * @internal * @param {DImage} this - no description * @returns {string} - no description **/ GetFailsafeMatName(this: DImage): string /** * * "Fixes" the current material of the @DImage type if it has VertexLit shader by creating a new one with the same name and a prefix of "_DImage" and automatically calling @DImage:SetMaterial with the new material. * This fixes the problem where using materials using shaders that expect lighting information causing "weird" flickering when displayed in 2D/Unlit environment. * * @name DImage:FixVertexLitMaterial * @wiki https://wiki.garrysmod.com/page/DImage/FixVertexLitMaterial * @internal * @param {DImage} this - no description * @returns {void} **/ FixVertexLitMaterial(this: DImage): void /** * * Actually loads the @IMaterial type to render it. Called from @DImage:LoadMaterial. * * @name DImage:DoLoadMaterial * @wiki https://wiki.garrysmod.com/page/DImage/DoLoadMaterial * @internal * @param {DImage} this - no description * @returns {void} **/ DoLoadMaterial(this: DImage): void } declare interface DIconLayout extends DDragBase { /** * * If set to true, the icon layout will stretch its width to fit all the children. * See also @DIconLayout:SetStretchHeight * * @name DIconLayout:SetStretchWidth * @wiki https://wiki.garrysmod.com/page/DIconLayout/SetStretchWidth * @param {DIconLayout} this - no description * @param {boolean} stretchW - no description * @returns {void} **/ SetStretchWidth(this: DIconLayout, stretchW: boolean): void /** * * If set to true, the icon layout will stretch its height to fit all the children. * See also @DIconLayout:SetStretchWidth * * @name DIconLayout:SetStretchHeight * @wiki https://wiki.garrysmod.com/page/DIconLayout/SetStretchHeight * @param {DIconLayout} this - no description * @param {boolean} do_stretch - no description * @returns {void} **/ SetStretchHeight(this: DIconLayout, do_stretch: boolean): void /** * * Sets the vertical (y) spacing between children within the DIconLayout. You must call @DIconLayout:Layout in order for the changes to take effect. * * @name DIconLayout:SetSpaceY * @wiki https://wiki.garrysmod.com/page/DIconLayout/SetSpaceY * @param {DIconLayout} this - no description * @param {number} ySpacing - The vertical gap between rows in the DIconLayout. * @returns {void} **/ SetSpaceY(this: DIconLayout, ySpacing: number): void /** * * Sets the horizontal (x) spacing between children within the DIconLayout. You must call @DIconLayout:Layout in order for the changes to take effect. * * @name DIconLayout:SetSpaceX * @wiki https://wiki.garrysmod.com/page/DIconLayout/SetSpaceX * @param {DIconLayout} this - no description * @param {number} xSpacing - The width of the gap between child objects. * @returns {void} **/ SetSpaceX(this: DIconLayout, xSpacing: number): void /** * * Sets the direction that it will be layed out, using the @DOCK enum. * Currently only TOP and LEFT are supported. * * @name DIconLayout:SetLayoutDir * @wiki https://wiki.garrysmod.com/page/DIconLayout/SetLayoutDir * @param {DIconLayout} this - no description * @param {DOCK} direction - @DOCK enum * @returns {void} **/ SetLayoutDir(this: DIconLayout, direction: DOCK): void /** * * Sets the internal border (padding) within the DIconLayout. This will not change its size, only the positioning of children. You must call @DIconLayout:Layout in order for the changes to take effect. * * @name DIconLayout:SetBorder * @wiki https://wiki.garrysmod.com/page/DIconLayout/SetBorder * @param {DIconLayout} this - no description * @param {number} width - The border (padding) inside the DIconLayout. * @returns {void} **/ SetBorder(this: DIconLayout, width: number): void /** * * Called when the panel is modified. * * @name DIconLayout:OnModified * @wiki https://wiki.garrysmod.com/page/DIconLayout/OnModified * @param {DIconLayout} this - no description * @returns {void} **/ OnModified(this: DIconLayout): void /** * * Used internally to layout the child elements if the @DIconLayout:SetLayoutDir is set to TOP (See @DOCK enum). * * @name DIconLayout:LayoutIcons_TOP * @wiki https://wiki.garrysmod.com/page/DIconLayout/LayoutIcons TOP * @internal * @param {DIconLayout} this - no description * @returns {void} **/ LayoutIcons_TOP(this: DIconLayout): void /** * * Used internally to layout the child elements if the @DIconLayout:SetLayoutDir is set to LEFT (See @DOCK enum). * * @name DIconLayout:LayoutIcons_LEFT * @wiki https://wiki.garrysmod.com/page/DIconLayout/LayoutIcons LEFT * @internal * @param {DIconLayout} this - no description * @returns {void} **/ LayoutIcons_LEFT(this: DIconLayout): void /** * * Resets layout vars before calling @Panel:InvalidateLayout. This is called when children are added or removed, and must be called when the spacing, border or layout direction is changed. * * @name DIconLayout:Layout * @wiki https://wiki.garrysmod.com/page/DIconLayout/Layout * @param {DIconLayout} this - no description * @returns {void} **/ Layout(this: DIconLayout): void /** * * Returns whether the icon layout will stretch its width to fit all the children. * See also @DIconLayout:GetStretchHeight * * @name DIconLayout:GetStretchWidth * @wiki https://wiki.garrysmod.com/page/DIconLayout/GetStretchWidth * @param {DIconLayout} this - no description * @returns {boolean} - no description **/ GetStretchWidth(this: DIconLayout): boolean /** * * Returns whether the icon layout will stretch its height to fit all the children. * See also @DIconLayout:GetStretchWidth * * @name DIconLayout:GetStretchHeight * @wiki https://wiki.garrysmod.com/page/DIconLayout/GetStretchHeight * @param {DIconLayout} this - no description * @returns {boolean} - no description **/ GetStretchHeight(this: DIconLayout): boolean /** * * Returns distance between two "Icons" on the Y axis. * * @name DIconLayout:GetSpaceY * @wiki https://wiki.garrysmod.com/page/DIconLayout/GetSpaceY * @param {DIconLayout} this - no description * @returns {number} - distance between two "Icons" on the Y axis. **/ GetSpaceY(this: DIconLayout): number /** * * Returns the distance between two 'icons' on the X axis. * * @name DIconLayout:GetSpaceX * @wiki https://wiki.garrysmod.com/page/DIconLayout/GetSpaceX * @param {DIconLayout} this - no description * @returns {number} - Distance between two 'icons' on the X axis. **/ GetSpaceX(this: DIconLayout): number /** * * Returns the direction that it will be layed out, using the DOCK enumerations. * * @name DIconLayout:GetLayoutDir * @wiki https://wiki.garrysmod.com/page/DIconLayout/GetLayoutDir * @param {DIconLayout} this - no description * @returns {number} - Layout direction. **/ GetLayoutDir(this: DIconLayout): number /** * * Returns the size of the border. * * @name DIconLayout:GetBorder * @wiki https://wiki.garrysmod.com/page/DIconLayout/GetBorder * @param {DIconLayout} this - no description * @returns {number} - no description **/ GetBorder(this: DIconLayout): number /** * * Copies the contents (Child elements) of another @DIconLayout type to itself. * * @name DIconLayout:CopyContents * @wiki https://wiki.garrysmod.com/page/DIconLayout/CopyContents * @param {DIconLayout} this - no description * @param {DIconLayout} from - @DIconLayout type to copy from. * @returns {void} **/ CopyContents(this: DIconLayout, from: DIconLayout): void /** * * Creates a replica of the DIconLayout it is called on. * * @name DIconLayout:Copy * @wiki https://wiki.garrysmod.com/page/DIconLayout/Copy * @param {DIconLayout} this - no description * @returns {Panel} - The replica. **/ Copy(this: DIconLayout): Panel } declare interface DIconBrowser extends DScrollPanel { /** * * Set the currently selected file path. Do not use. Use @DIconBrowser:SelectIcon instead. * * @name DIconBrowser:SetSelectedIcon * @wiki https://wiki.garrysmod.com/page/DIconBrowser/SetSelectedIcon * @internal * @param {DIconBrowser} this - no description * @param {string} str - no description * @returns {void} **/ SetSelectedIcon(this: DIconBrowser, str: string): void /** * * Sets whether or not the browser should automatically fill itself with icons. * * @name DIconBrowser:SetManual * @wiki https://wiki.garrysmod.com/page/DIconBrowser/SetManual * @param {DIconBrowser} this - no description * @param {boolean} manual - no description * @returns {void} **/ SetManual(this: DIconBrowser, manual: boolean): void /** * * Selects an icon from file path * * @name DIconBrowser:SelectIcon * @wiki https://wiki.garrysmod.com/page/DIconBrowser/SelectIcon * @param {DIconBrowser} this - no description * @param {string} icon - The file path of the icon to select. Do not include the "materials/" part. * @returns {void} **/ SelectIcon(this: DIconBrowser, icon: string): void /** * * Scrolls the browser to the selected icon * * @name DIconBrowser:ScrollToSelected * @wiki https://wiki.garrysmod.com/page/DIconBrowser/ScrollToSelected * @param {DIconBrowser} this - no description * @returns {void} **/ ScrollToSelected(this: DIconBrowser): void /** * * Called when the selected icon was changed. Use @DIconBrowser:GetSelectedIcon to get the selected icon's filepath. * * @name DIconBrowser:OnChange * @wiki https://wiki.garrysmod.com/page/DIconBrowser/OnChange * @param {DIconBrowser} this - no description * @returns {void} **/ OnChange(this: DIconBrowser): void /** * * Use @DIconBrowser:OnChange instead * * @name DIconBrowser:OnChangeInternal * @wiki https://wiki.garrysmod.com/page/DIconBrowser/OnChangeInternal * @internal * @param {DIconBrowser} this - no description * @returns {void} **/ OnChangeInternal(this: DIconBrowser): void /** * * Returns whether or not the browser should fill itself with icons. * * @name DIconBrowser:GetManual * @wiki https://wiki.garrysmod.com/page/DIconBrowser/GetManual * @param {DIconBrowser} this - no description * @returns {boolean} - no description **/ GetManual(this: DIconBrowser): boolean /** * * Returns the currently selected icon's file path. * * @name DIconBrowser:GetSelectedIcon * @wiki https://wiki.garrysmod.com/page/DIconBrowser/GetSelectedIcon * @param {DIconBrowser} this - no description * @returns {string} - The currently selected icon's file path. **/ GetSelectedIcon(this: DIconBrowser): string /** * * A simple unused search feature, hides all icons that do not contain given text in their file path. * * @name DIconBrowser:FilterByText * @wiki https://wiki.garrysmod.com/page/DIconBrowser/FilterByText * @param {DIconBrowser} this - no description * @param {string} text - The text to search for * @returns {void} **/ FilterByText(this: DIconBrowser, text: string): void /** * * Automatically called to fill the browser with icons. Will not work if @DIconBrowser:SetManual is set to true. * * @name DIconBrowser:Fill * @wiki https://wiki.garrysmod.com/page/DIconBrowser/Fill * @internal * @param {DIconBrowser} this - no description * @returns {void} **/ Fill(this: DIconBrowser): void } declare interface DHTMLControls extends Panel { /** * * Basically adds an URL to the history. * * @name DHTMLControls:UpdateHistory * @wiki https://wiki.garrysmod.com/page/DHTMLControls/UpdateHistory * @internal * @param {DHTMLControls} this - no description * @param {string} url - no description * @returns {void} **/ UpdateHistory(this: DHTMLControls, url: string): void /** * @name DHTMLControls:UpdateNavButtonStatus * @wiki https://wiki.garrysmod.com/page/DHTMLControls/UpdateNavButtonStatus * @internal * @param {DHTMLControls} this - no description * @returns {void} **/ UpdateNavButtonStatus(this: DHTMLControls): void /** * @name DHTMLControls:StartedLoading * @wiki https://wiki.garrysmod.com/page/DHTMLControls/StartedLoading * @internal * @param {DHTMLControls} this - no description * @returns {void} **/ StartedLoading(this: DHTMLControls): void /** * * Sets the @DHTML type element to control with these @DHTMLControls type. * * @name DHTMLControls:SetHTML * @wiki https://wiki.garrysmod.com/page/DHTMLControls/SetHTML * @param {DHTMLControls} this - no description * @param {Panel} dhtml - The HTML panel * @returns {void} **/ SetHTML(this: DHTMLControls, dhtml: Panel): void /** * * Sets the color of the navigation buttons. * * @name DHTMLControls:SetButtonColor * @wiki https://wiki.garrysmod.com/page/DHTMLControls/SetButtonColor * @param {DHTMLControls} this - no description * @param {IColor} clr - A @IColor structure * @returns {void} **/ SetButtonColor(this: DHTMLControls, clr: IColor): void /** * @name DHTMLControls:FinishedLoading * @wiki https://wiki.garrysmod.com/page/DHTMLControls/FinishedLoading * @internal * @param {DHTMLControls} this - no description * @returns {void} **/ FinishedLoading(this: DHTMLControls): void } declare interface DHTML extends Awesomium { /** * * Stops the loading of the HTML panel's current page. * [Category:HTML](https://wiki.garrysmod.com/page/Category:HTML) * [Category:Awesomium](https://wiki.garrysmod.com/page/Category:Awesomium) * * @name DHTML:StopLoading * @realm client * @wiki https://wiki.garrysmod.com/page/DHTML/StopLoading * @param {DHTML} this - no description * @returns {void} **/ StopLoading(this: DHTML): void /** * * Sets if the loaded window should display scrollbars when the webpage is larger than the viewing window. This is similar to the CSS *overflow* rule. * * @name DHTML:SetScrollbars * @wiki https://wiki.garrysmod.com/page/DHTML/SetScrollbars * @param {DHTML} this - no description * @param {boolean} show - True if scrollbars should be visible. * @returns {void} **/ SetScrollbars(this: DHTML, show: boolean): void /** * * Determines whether the loaded page can run Lua code or not. See @DHTML type for how to run Lua from a DHTML window. * * @name DHTML:SetAllowLua * @wiki https://wiki.garrysmod.com/page/DHTML/SetAllowLua * @param {DHTML} this - no description * @param {boolean} allow - Whether or not to allow Lua. * @returns {void} **/ SetAllowLua(this: DHTML, allow?: boolean): void /** * * Runs/Executes a string as JavaScript code. * * @name DHTML:QueueJavascript * @wiki https://wiki.garrysmod.com/page/DHTML/QueueJavascript * @note This function does **NOT** evaluate expression (i.e. allow you to pass variables from JavaScript (JS) to Lua context). * Because a return value is nil/no value (a.k.a. void). * If you wish to pass/return values from JS to Lua, you may want to use @DHTML:AddFunction function to accomplish that job. * @param {DHTML} this - no description * @param {string} js - Specify JavaScript code to be executed. * @returns {void} **/ QueueJavascript(this: DHTML, js: string): void /** * * Returns if the loaded page can run Lua code, set by @DHTML:SetAllowLua * * @name DHTML:GetAllowLua * @wiki https://wiki.garrysmod.com/page/DHTML/GetAllowLua * @param {DHTML} this - no description * @returns {boolean} - Whether or not Lua code can be called from the loaded page. **/ GetAllowLua(this: DHTML): boolean /** * * Called when the page inside the @DHTML type window runs *console.log*. This can also be called within the Lua environment to emulate *console.log*. If the contained message begins with *RUNLUA:* the following text will be executed as code within the Lua environment (this is how Lua is called from DHTML windows). * * @name DHTML:ConsoleMessage * @wiki https://wiki.garrysmod.com/page/DHTML/ConsoleMessage * @param {DHTML} this - no description * @param {string} msg - The message to be logged (or Lua code to be executed; see above). * @returns {void} **/ ConsoleMessage(this: DHTML, msg: string): void /** * * Runs/Executes a string as JavaScript code. * * @name DHTML:Call * @wiki https://wiki.garrysmod.com/page/DHTML/Call * @note This function does **NOT** evaluate expression (i.e. allow you to pass variables from JavaScript (JS) to Lua context). * Because a return value is nil/no value (a.k.a. void). * If you wish to pass/return values from JS to Lua, you may want to use @DHTML:AddFunction function to accomplish that job. * @note This function is an alias of @DHTML:QueueJavascript ([source](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/vgui/dhtml.lua#L62)). * @param {DHTML} this - no description * @param {string} js - Specify JavaScript code to be executed. * @returns {void} **/ Call(this: DHTML, js: string): void /** * * Defines a Javascript function that when called will call a Lua callback. * * @name DHTML:AddFunction * @wiki https://wiki.garrysmod.com/page/DHTML/AddFunction * @note Must be called after the HTML document has fully loaded. * @param {DHTML} this - no description * @param {string} library - Library name of the JS function you are defining. * @param {string} name - Name of the JS function you are defining. * @param {function} callback - Function called when the JS function is called. Arguments passed to the JS function will be passed here. * @returns {void} **/ AddFunction(this: DHTML, library: string, name: string, callback: UnknownFunc): void } declare interface DHorizontalScroller extends Panel { /** * * Same as @DDragBase:SetUseLiveDrag * * @name DHorizontalScroller:SetUseLiveDrag * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/SetUseLiveDrag * @param {DHorizontalScroller} this - no description * @param {boolean} newState - no description * @returns {void} **/ SetUseLiveDrag(this: DHorizontalScroller, newState: boolean): void /** * @name DHorizontalScroller:SetShowDropTargets * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/SetShowDropTargets * @param {DHorizontalScroller} this - no description * @param {boolean} newState - no description * @returns {void} **/ SetShowDropTargets(this: DHorizontalScroller, newState: boolean): void /** * * Sets the scroll amount, automatically clamping the value. * * @name DHorizontalScroller:SetScroll * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/SetScroll * @param {DHorizontalScroller} this - no description * @param {number} scroll - The new scroll amount * @returns {void} **/ SetScroll(this: DHorizontalScroller, scroll: number): void /** * * Controls the spacing between elements of the horizontal scroller. * * @name DHorizontalScroller:SetOverlap * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/SetOverlap * @param {DHorizontalScroller} this - no description * @param {number} overlap - Overlap in pixels. Positive numbers will make elements *overlap* each other, negative will add spacing. * @returns {void} **/ SetOverlap(this: DHorizontalScroller, overlap: number): void /** * * Scrolls the @DHorizontalScroller type to given child panel. * * @name DHorizontalScroller:ScrollToChild * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/ScrollToChild * @param {DHorizontalScroller} this - no description * @param {Panel} target - The target child panel. Must be a child of @DHorizontalScroller:GetCanvas * @returns {void} **/ ScrollToChild(this: DHorizontalScroller, target: Panel): void /** * * Called when the panel is scrolled. * * @name DHorizontalScroller:OnDragModified * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/OnDragModified * @param {DHorizontalScroller} this - no description * @returns {void} **/ OnDragModified(this: DHorizontalScroller): void /** * * Same as @DDragBase:MakeDroppable. * TODO: Transclude or whatever to here? * * @name DHorizontalScroller:MakeDroppable * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/MakeDroppable * @param {DHorizontalScroller} this - no description * @param {string} name - no description * @returns {void} **/ MakeDroppable(this: DHorizontalScroller, name: string): void /** * @name DHorizontalScroller:GetShowDropTargets * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/GetShowDropTargets * @param {DHorizontalScroller} this - no description * @returns {boolean} - no description **/ GetShowDropTargets(this: DHorizontalScroller): boolean /** * @name DHorizontalScroller:GetOverlap * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/GetOverlap * @param {DHorizontalScroller} this - no description * @returns {number} - no description **/ GetOverlap(this: DHorizontalScroller): number /** * * Returns the internal canvas panel where the content of @DHorizontalScroller type are placed on. * * @name DHorizontalScroller:GetCanvas * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/GetCanvas * @param {DHorizontalScroller} this - no description * @returns {DDragBase} - The @DDragBase type panel. **/ GetCanvas(this: DHorizontalScroller): DDragBase /** * * Adds a panel to the @DHorizontalScroller type. * * @name DHorizontalScroller:AddPanel * @wiki https://wiki.garrysmod.com/page/DHorizontalScroller/AddPanel * @param {DHorizontalScroller} this - no description * @param {Panel} pnl - The panel to add. It will be automatically parented. * @returns {void} **/ AddPanel(this: DHorizontalScroller, pnl: Panel): void } declare interface DHorizontalDivider extends DPanel { /** * @name DHorizontalDivider:StartGrab * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/StartGrab * @internal * @param {DHorizontalDivider} this - no description * @returns {void} **/ StartGrab(this: DHorizontalDivider): void /** * * Sets the minimum width of the right side * * @name DHorizontalDivider:SetRightMin * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetRightMin * @param {DHorizontalDivider} this - no description * @param {number} minWidth - The minimum width of the right side * @returns {void} **/ SetRightMin(this: DHorizontalDivider, minWidth: number): void /** * * Sets the right side content * * @name DHorizontalDivider:SetRight * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetRight * @param {DHorizontalDivider} this - no description * @param {Panel} pnl - The right side content * @returns {void} **/ SetRight(this: DHorizontalDivider, pnl: Panel): void /** * * Sets the middle content, over the draggable divider bar panel. * * @name DHorizontalDivider:SetMiddle * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetMiddle * @param {DHorizontalDivider} this - no description * @param {Panel} middle - The middle content * @returns {void} **/ SetMiddle(this: DHorizontalDivider, middle: Panel): void /** * * Sets the current/starting width of the left side. * The width of the right side is automatically calculated by subtracting this from the total width of the @DHorizontalDivider type. * * @name DHorizontalDivider:SetLeftWidth * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetLeftWidth * @param {DHorizontalDivider} this - no description * @param {number} width - The current/starting width of the left side * @returns {void} **/ SetLeftWidth(this: DHorizontalDivider, width: number): void /** * * Sets the minimum width of the left side * * @name DHorizontalDivider:SetLeftMin * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetLeftMin * @param {DHorizontalDivider} this - no description * @param {number} minWidth - The minimum width of the left side * @returns {void} **/ SetLeftMin(this: DHorizontalDivider, minWidth: number): void /** * * Sets the left side content of the @DHorizontalDivider type. * * @name DHorizontalDivider:SetLeft * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetLeft * @param {DHorizontalDivider} this - no description * @param {Panel} pnl - The panel to set as the left side * @returns {void} **/ SetLeft(this: DHorizontalDivider, pnl: Panel): void /** * * Sets the local X coordinate of where the player started dragging the thing * * @name DHorizontalDivider:SetHoldPos * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetHoldPos * @internal * @param {DHorizontalDivider} this - no description * @param {number} x - no description * @returns {void} **/ SetHoldPos(this: DHorizontalDivider, x: number): void /** * * Sets whether the player is dragging the divider or not * * @name DHorizontalDivider:SetDragging * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetDragging * @internal * @param {DHorizontalDivider} this - no description * @param {boolean} dragonot - no description * @returns {void} **/ SetDragging(this: DHorizontalDivider, dragonot: boolean): void /** * * Sets the width of the horizontal divider bar. * * @name DHorizontalDivider:SetDividerWidth * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/SetDividerWidth * @param {DHorizontalDivider} this - no description * @param {number} width - The width of the horizontal divider bar. * @returns {void} **/ SetDividerWidth(this: DHorizontalDivider, width: number): void /** * * Returns the minimum width of the right side, set by @DHorizontalDivider:SetRightMin. * * @name DHorizontalDivider:GetRightMin * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetRightMin * @param {DHorizontalDivider} this - no description * @returns {number} - The minimum width of the right side **/ GetRightMin(this: DHorizontalDivider): number /** * * Returns the right side content * * @name DHorizontalDivider:GetRight * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetRight * @param {DHorizontalDivider} this - no description * @returns {Panel} - The right side content **/ GetRight(this: DHorizontalDivider): Panel /** * * Returns the middle content, set by @DHorizontalDivider:SetMiddle. * * @name DHorizontalDivider:GetMiddle * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetMiddle * @param {DHorizontalDivider} this - no description * @returns {Panel} - The middle content **/ GetMiddle(this: DHorizontalDivider): Panel /** * * Returns the current width of the left side, set by @DHorizontalDivider:SetLeftWidth or by the user. * * @name DHorizontalDivider:GetLeftWidth * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetLeftWidth * @param {DHorizontalDivider} this - no description * @returns {number} - The current width of the left side **/ GetLeftWidth(this: DHorizontalDivider): number /** * * Returns the minimum width of the left side, set by @DHorizontalDivider:SetLeftMin. * * @name DHorizontalDivider:GetLeftMin * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetLeftMin * @param {DHorizontalDivider} this - no description * @returns {number} - The minimum width of the left side **/ GetLeftMin(this: DHorizontalDivider): number /** * * Returns the left side content of the @DHorizontalDivider type * * @name DHorizontalDivider:GetLeft * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetLeft * @param {DHorizontalDivider} this - no description * @returns {Panel} - The content on the left side **/ GetLeft(this: DHorizontalDivider): Panel /** * * Returns the local X coordinate of where the player started dragging the thing * * @name DHorizontalDivider:GetHoldPos * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetHoldPos * @internal * @param {DHorizontalDivider} this - no description * @returns {number} - no description **/ GetHoldPos(this: DHorizontalDivider): number /** * * Returns whether or not the player is currently dragging the middle divider bar. * * @name DHorizontalDivider:GetDragging * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetDragging * @param {DHorizontalDivider} this - no description * @returns {boolean} - Whether or not the player is currently dragging the middle divider bar. **/ GetDragging(this: DHorizontalDivider): boolean /** * * Returns the width of the horizontal divider bar, set by @DHorizontalDivider:SetDividerWidth. * * @name DHorizontalDivider:GetDividerWidth * @wiki https://wiki.garrysmod.com/page/DHorizontalDivider/GetDividerWidth * @param {DHorizontalDivider} this - no description * @returns {number} - The width of the horizontal divider bar **/ GetDividerWidth(this: DHorizontalDivider): number } declare interface DGrid extends Panel { /** * * Sorts the items in the grid. Does not visually update the grid, use @Panel:InvalidateLayout for that. * * @name DGrid:SortByMember * @wiki https://wiki.garrysmod.com/page/DGrid/SortByMember * @param {DGrid} this - no description * @param {string} key - A key in the panel from @DGrid:GetItems. The key's value must be numeric. * @param {boolean} desc - True for descending order, false for ascending. * @returns {void} **/ SortByMember(this: DGrid, key: string, desc?: boolean): void /** * * Sets the height of each row. * The cell panels (grid items) will not be resized or centered. * * @name DGrid:SetRowHeight * @wiki https://wiki.garrysmod.com/page/DGrid/SetRowHeight * @param {DGrid} this - no description * @param {number} rowHeight - The height of each row * @returns {void} **/ SetRowHeight(this: DGrid, rowHeight: number): void /** * * Sets the width of each column. * The cell panels (grid items) will not be resized or centered. * * @name DGrid:SetColWide * @wiki https://wiki.garrysmod.com/page/DGrid/SetColWide * @param {DGrid} this - no description * @param {number} colWidth - The width of each column. * @returns {void} **/ SetColWide(this: DGrid, colWidth: number): void /** * * Sets the number of columns this panel should have. * The @DGrid type will resize its width to match this value. * * @name DGrid:SetCols * @wiki https://wiki.garrysmod.com/page/DGrid/SetCols * @param {DGrid} this - no description * @param {number} cols - The desired number of columns * @returns {void} **/ SetCols(this: DGrid, cols: number): void /** * * Removes given panel from the @DGrid:GetItems. * * @name DGrid:RemoveItem * @wiki https://wiki.garrysmod.com/page/DGrid/RemoveItem * @param {DGrid} this - no description * @param {Panel} item - Item to remove from the grid * @param {boolean} bDontDelete - If set to true, the actual panel will not be removed via @Panel:Remove. * @returns {void} **/ RemoveItem(this: DGrid, item: Panel, bDontDelete?: boolean): void /** * * Returns the height of each row of the @DGrid type, which is set by @DGrid:SetRowHeight. * * @name DGrid:GetRowHeight * @wiki https://wiki.garrysmod.com/page/DGrid/GetRowHeight * @param {DGrid} this - no description * @returns {number} - The height of each row **/ GetRowHeight(this: DGrid): number /** * * Returns a list of panels in the grid. * * @name DGrid:GetItems * @wiki https://wiki.garrysmod.com/page/DGrid/GetItems * @param {DGrid} this - no description * @returns {Panel[]} - A list of @Panel types. **/ GetItems(this: DGrid): Panel[] /** * * Returns the width of each column of the @DGrid type, which is set by @DGrid:SetColWide. * * @name DGrid:GetColWide * @wiki https://wiki.garrysmod.com/page/DGrid/GetColWide * @param {DGrid} this - no description * @returns {number} - The width of each column **/ GetColWide(this: DGrid): number /** * * Returns the number of columns of this @DGrid type. Set by @DGrid:SetCols. * * @name DGrid:GetCols * @wiki https://wiki.garrysmod.com/page/DGrid/GetCols * @param {DGrid} this - no description * @returns {number} - The number of columns of this @DGrid type **/ GetCols(this: DGrid): number /** * * Adds a new item to the grid. * * @name DGrid:AddItem * @wiki https://wiki.garrysmod.com/page/DGrid/AddItem * @param {DGrid} this - no description * @param {DGrid} item - The item to add. It will be forced visible and parented to the @DGrid type. * @returns {void} **/ AddItem(this: DGrid, item: DGrid): void } declare interface DFrame extends EditablePanel { /** * * Determines whether the DFrame's control box (close, minimise and maximise buttons) is displayed. * * @name DFrame:ShowCloseButton * @wiki https://wiki.garrysmod.com/page/DFrame/ShowCloseButton * @param {DFrame} this - no description * @param {boolean} show - *false* hides the control box; this is *true* by default. * @returns {void} **/ ShowCloseButton(this: DFrame, show: boolean): void /** * * Sets the title of the frame. * * @name DFrame:SetTitle * @wiki https://wiki.garrysmod.com/page/DFrame/SetTitle * @param {DFrame} this - no description * @param {string} title - New title of the frame. * @returns {void} **/ SetTitle(this: DFrame, title: string): void /** * * Sets whether or not the @DFrame type can be resized by the user. * This is achieved by clicking and dragging in the bottom right corner of the frame. * You can set the minimum size using @DFrame:SetMinWidth and @DFrame:SetMinHeight. * * @name DFrame:SetSizable * @wiki https://wiki.garrysmod.com/page/DFrame/SetSizable * @param {DFrame} this - no description * @param {boolean} sizeable - Whether the frame should be resizeable or not. * @returns {void} **/ SetSizable(this: DFrame, sizeable: boolean): void /** * * Sets whether the DFrame is restricted to the boundaries of the screen resolution. * * @name DFrame:SetScreenLock * @wiki https://wiki.garrysmod.com/page/DFrame/SetScreenLock * @param {DFrame} this - no description * @param {boolean} lock - If *true*, the frame cannot be dragged outside of the screen bounds * @returns {void} **/ SetScreenLock(this: DFrame, lock: boolean): void /** * * Sets whether or not the shadow effect bordering the DFrame should be drawn. * * @name DFrame:SetPaintShadow * @wiki https://wiki.garrysmod.com/page/DFrame/SetPaintShadow * @param {DFrame} this - no description * @param {boolean} shouldPaint - Whether or not to draw the shadow. This is *true* by default. * @returns {void} **/ SetPaintShadow(this: DFrame, shouldPaint: boolean): void /** * * Sets the minimum width the DFrame can be resized to by the user. * This only applies to users attempting to resize the frame; @Panel:SetWide and similar methods will not be affected. You must call @DFrame:SetSizable before the user can resize the frame. * * @name DFrame:SetMinWidth * @wiki https://wiki.garrysmod.com/page/DFrame/SetMinWidth * @param {DFrame} this - no description * @param {number} minW - The minimum width the user can resize the frame to. * @returns {void} **/ SetMinWidth(this: DFrame, minW: number): void /** * * Sets the minimum height the DFrame can be resized to by the user. * This only applies to users attempting to resize the frame; @Panel:SetTall and similar methods will not be affected. You must call @DFrame:SetSizable before the user can resize the frame. * * @name DFrame:SetMinHeight * @wiki https://wiki.garrysmod.com/page/DFrame/SetMinHeight * @param {DFrame} this - no description * @param {number} minH - The minimum height the user can resize the frame to. * @returns {void} **/ SetMinHeight(this: DFrame, minH: number): void /** * * Sets whether the frame is part of a derma menu or not. * If this is set to *true*, @CloseDermaMenus function will not be called when the frame is clicked, and thus any open menus will remain open. * * @name DFrame:SetIsMenu * @wiki https://wiki.garrysmod.com/page/DFrame/SetIsMenu * @param {DFrame} this - no description * @param {boolean} isMenu - Whether or not this frame is a menu component. * @returns {void} **/ SetIsMenu(this: DFrame, isMenu: boolean): void /** * * Adds or removes an icon on the left of the @DFrame type's title. * * @name DFrame:SetIcon * @wiki https://wiki.garrysmod.com/page/DFrame/SetIcon * @param {DFrame} this - no description * @param {string | SpawnIcon} path - Set to nil to remove the icon. * Otherwise, set to file path to create the icon. * @returns {void} **/ SetIcon(this: DFrame, path: string | SpawnIcon): void /** * * Sets whether the frame should be draggable by the user. The DFrame can only be dragged from its title bar. * * @name DFrame:SetDraggable * @wiki https://wiki.garrysmod.com/page/DFrame/SetDraggable * @param {DFrame} this - no description * @param {boolean} draggable - Whether to be draggable or not. * @returns {void} **/ SetDraggable(this: DFrame, draggable: boolean): void /** * * Determines whether or not the DFrame is removed when it is closed with @DFrame:Close. * * @name DFrame:SetDeleteOnClose * @wiki https://wiki.garrysmod.com/page/DFrame/SetDeleteOnClose * @param {DFrame} this - no description * @param {boolean} shouldDelete - Whether or not to delete the frame on close. This is *true* by default. * @returns {void} **/ SetDeleteOnClose(this: DFrame, shouldDelete: boolean): void /** * * Blurs background behind the frame. * * @name DFrame:SetBackgroundBlur * @wiki https://wiki.garrysmod.com/page/DFrame/SetBackgroundBlur * @param {DFrame} this - no description * @param {boolean} blur - Whether or not to create background blur or not. * @returns {void} **/ SetBackgroundBlur(this: DFrame, blur: boolean): void /** * * Called when the DFrame is closed with @DFrame:Close. This applies when the *close* button in the DFrame's control box is clicked. * This is **not** called when the DFrame is removed with @Panel:Remove. * * @name DFrame:OnClose * @wiki https://wiki.garrysmod.com/page/DFrame/OnClose * @param {DFrame} this - no description * @returns {void} **/ OnClose(this: DFrame): void /** * * Determines if the frame or one of its children has the screen focus. * * @name DFrame:IsActive * @wiki https://wiki.garrysmod.com/page/DFrame/IsActive * @param {DFrame} this - no description * @returns {boolean} - Whether or not the frame has focus. **/ IsActive(this: DFrame): boolean /** * * Returns the title of the frame. * * @name DFrame:GetTitle * @wiki https://wiki.garrysmod.com/page/DFrame/GetTitle * @param {DFrame} this - no description * @returns {string} - Title of the frame. **/ GetTitle(this: DFrame): string /** * * Gets whether or not the DFrame can be resized by the user. * This is achieved by clicking and dragging in the bottom right corner of the frame. * * @name DFrame:GetSizable * @wiki https://wiki.garrysmod.com/page/DFrame/GetSizable * @param {DFrame} this - no description * @returns {boolean} - Whether the frame can be resized or not. **/ GetSizable(this: DFrame): boolean /** * * Gets whether or not the DFrame is restricted to the boundaries of the screen resolution. * * @name DFrame:GetScreenLock * @wiki https://wiki.garrysmod.com/page/DFrame/GetScreenLock * @param {DFrame} this - no description * @returns {boolean} - Whether or not the frame is restricted. **/ GetScreenLock(this: DFrame): boolean /** * * Gets whether or not the shadow effect bordering the DFrame is being drawn. * * @name DFrame:GetPaintShadow * @wiki https://wiki.garrysmod.com/page/DFrame/GetPaintShadow * @param {DFrame} this - no description * @returns {boolean} - Whether or not the shadow is being drawn. **/ GetPaintShadow(this: DFrame): boolean /** * * Gets the minimum width the DFrame can be resized to by the user. * You must call @DFrame:SetSizable before the user can resize the frame. * * @name DFrame:GetMinWidth * @wiki https://wiki.garrysmod.com/page/DFrame/GetMinWidth * @param {DFrame} this - no description * @returns {number} - The minimum width the user can resize the frame to. **/ GetMinWidth(this: DFrame): number /** * * Gets the minimum height the DFrame can be resized to by the user. * You must call @DFrame:SetSizable before the user can resize the frame. * * @name DFrame:GetMinHeight * @wiki https://wiki.garrysmod.com/page/DFrame/GetMinHeight * @param {DFrame} this - no description * @returns {number} - The minimum height the user can resize the frame to. **/ GetMinHeight(this: DFrame): number /** * * Gets whether or not the frame is part of a derma menu. This is set with @DFrame:SetIsMenu. * * @name DFrame:GetIsMenu * @wiki https://wiki.garrysmod.com/page/DFrame/GetIsMenu * @param {DFrame} this - no description * @returns {boolean} - Whether or not this frame is a menu component. **/ GetIsMenu(this: DFrame): boolean /** * * Gets whether or not the frame is draggable by the user. * * @name DFrame:GetDraggable * @wiki https://wiki.garrysmod.com/page/DFrame/GetDraggable * @param {DFrame} this - no description * @returns {boolean} - Whether the frame is draggable or not. **/ GetDraggable(this: DFrame): boolean /** * * Determines whether or not the DFrame will be removed when it is closed. This is set with @DFrame:SetDeleteOnClose. * * @name DFrame:GetDeleteOnClose * @wiki https://wiki.garrysmod.com/page/DFrame/GetDeleteOnClose * @param {DFrame} this - no description * @returns {boolean} - Whether or not the frame will be removed on close. **/ GetDeleteOnClose(this: DFrame): boolean /** * * Gets whether the background behind the frame is being blurred. * * @name DFrame:GetBackgroundBlur * @wiki https://wiki.garrysmod.com/page/DFrame/GetBackgroundBlur * @param {DFrame} this - no description * @returns {boolean} - Whether or not background blur is enabled. **/ GetBackgroundBlur(this: DFrame): boolean /** * * Hides or removes the DFrame, and calls @DFrame:OnClose. * To set whether the frame is hidden or removed, use @DFrame:SetDeleteOnClose. * * @name DFrame:Close * @wiki https://wiki.garrysmod.com/page/DFrame/Close * @param {DFrame} this - no description * @returns {void} **/ Close(this: DFrame): void /** * * Centers the frame relative to the whole screen and invalidates its layout. This overrides @Panel:Center. * * @name DFrame:Center * @wiki https://wiki.garrysmod.com/page/DFrame/Center * @param {DFrame} this - no description * @returns {void} **/ Center(this: DFrame): void } declare interface DForm extends DCollapsibleCategory { /** * * Adds a @DTextEntry type to a @DForm type * * @name DForm:TextEntry * @wiki https://wiki.garrysmod.com/page/DForm/TextEntry * @param {DForm} this - no description * @param {string} label - The label to be next to the text entry * @param {string} convar - The console variable to be changed when the text entry is changed * @returns {DTextEntry} - The created @DTextEntry type * @returns {DLabel} - The created @DLabel type * @tupleReturn **/ TextEntry(this: DForm, label: string, convar: string): [DTextEntry, DLabel] /** * * Sets the title (header) name of the DForm. This is *Label* until set. * * @name DForm:SetName * @wiki https://wiki.garrysmod.com/page/DForm/SetName * @param {DForm} this - no description * @param {string} name - The new header name. * @returns {void} **/ SetName(this: DForm, name: string): void /** * * Does nothing. * * @name DForm:Rebuild * @wiki https://wiki.garrysmod.com/page/DForm/Rebuild * @param {DForm} this - no description * @returns {void} **/ Rebuild(this: DForm): void /** * * Creates a @DPanelSelect type and docks it to the top of the DForm. * * @name DForm:PanelSelect * @wiki https://wiki.garrysmod.com/page/DForm/PanelSelect * @param {DForm} this - no description * @returns {Panel} - The created DPanelSelect. **/ PanelSelect(this: DForm): Panel /** * * Adds a @DNumSlider type onto the @DForm type * * @name DForm:NumSlider * @wiki https://wiki.garrysmod.com/page/DForm/NumSlider * @param {DForm} this - no description * @param {string} label - The label of the DNumSlider * @param {string} convar - The console variable to change when the slider is changed * @param {number} min - The minimum value of the slider * @param {number} max - The maximum value of the slider * @param {number} decimals - The number of decimals to allow on the slider. (Optional) * @returns {DNumSlider} - The created @DNumSlider type **/ NumSlider(this: DForm, label: string, convar: string, min: number, max: number, decimals?: number): DNumSlider /** * * Adds a @DListBox type onto the @DForm type * * @name DForm:ListBox * @wiki https://wiki.garrysmod.com/page/DForm/ListBox * @param {DForm} this - no description * @param {string} label - The label to set on the DListBox * @returns {DListBox} - The created @DListBox type * @returns {DLabel} - The created @DLabel type * @tupleReturn **/ ListBox(this: DForm, label: string): [DListBox, DLabel] /** * * Adds a @DNumberWang type onto the @DForm type * * @name DForm:NumberWang * @wiki https://wiki.garrysmod.com/page/DForm/NumberWang * @param {DForm} this - no description * @param {string} label - The label to be placed next to the DNumberWang * @param {string} convar - The console variable to change when the slider is changed * @param {number} min - The minimum value of the slider * @param {number} max - The maximum value of the slider * @param {number} decimals - The number of decimals to allow in the slider (Optional) * @returns {DNumberWang} - The created @DNumberWang type * @returns {DLabel} - The created @DLabel type * @tupleReturn **/ NumberWang(this: DForm, label: string, convar: string, min: number, max: number, decimals?: number): [DNumberWang, DLabel] /** * * Adds a @DLabel type onto the @DForm type as a helper * * @name DForm:Help * @wiki https://wiki.garrysmod.com/page/DForm/Help * @param {DForm} this - no description * @param {string} help - The help message to be displayed * @returns {DLabel} - The created @DLabel type **/ Help(this: DForm, help: string): DLabel /** * * Adds a @DLabel type onto the @DForm type. Unlike @DForm:Help, this is indented and is colored blue, depending on the derma skin. * * @name DForm:ControlHelp * @wiki https://wiki.garrysmod.com/page/DForm/ControlHelp * @param {DForm} this - no description * @param {string} help - The help message to be displayed. * @returns {DLabel} - The created @DLabel type **/ ControlHelp(this: DForm, help: string): DLabel /** * * Adds a @DComboBox type onto the @DForm type * * @name DForm:ComboBox * @wiki https://wiki.garrysmod.com/page/DForm/ComboBox * @param {DForm} this - no description * @param {string} title - Text to the left of the combo box * @param {string} convar - Console variable to change when the user selects something from the dropdown. * @returns {DComboBox} - The created @DComboBox type * @returns {DLabel} - The created @DLabel type * @tupleReturn **/ ComboBox(this: DForm, title: string, convar: string): [DComboBox, DLabel] /** * * Adds a @DCheckBoxLabel type onto the @DForm type * * @name DForm:CheckBox * @wiki https://wiki.garrysmod.com/page/DForm/CheckBox * @param {DForm} this - no description * @param {string} label - The label to be set next to the check box * @param {string} convar - The console variable to change when this is changed * @returns {DCheckBoxLabel} - The created @DCheckBoxLabel type **/ CheckBox(this: DForm, label: string, convar: string): DCheckBoxLabel /** * * Adds a @DButton type onto the @DForm type * * @name DForm:Button * @wiki https://wiki.garrysmod.com/page/DForm/Button * @param {DForm} this - no description * @param {string} text - The text on the button * @param {string} concmd - The concommand to run when the button is clicked * @param {any[]} ...concmd_args - The arguments to pass on to the concommand when the button is clicked * @returns {DButton} - The created @DButton type **/ Button(this: DForm, text: string, concmd: string, ...concmd_args: any[]): DButton /** * * Adds one or two items to the DForm. * If this method is called with only one argument, it is added to the bottom of the form. If two arguments are passed, they are placed side-by-side at the bottom of the form. * Internally, this function is used by the various DForm functions to, for example, add labels to the left of buttons. * * @name DForm:AddItem * @wiki https://wiki.garrysmod.com/page/DForm/AddItem * @param {DForm} this - no description * @param {Panel} left - Left-hand element to add to the DForm. * @param {Panel} right - Right-hand element to add to the DForm. * @returns {void} **/ AddItem(this: DForm, left: Panel, right?: Panel): void } declare interface DFileBrowser extends DPanel { /** * * Sorts the file list. * * @name DFileBrowser:SortFiles * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SortFiles * @note This is only functional when not using the model viewer. See @DFileBrowser:SetModels * @param {DFileBrowser} this - no description * @param {boolean} descending - The sort order. *true* for descending (z-a), *false* for ascending (a-z). * @returns {void} **/ SortFiles(this: DFileBrowser, descending?: boolean): void /** * * Builds the file or icon list for the current directory. * You should use @DFileBrowser:SetCurrentFolder to change the directory. * * @name DFileBrowser:ShowFolder * @wiki https://wiki.garrysmod.com/page/DFileBrowser/ShowFolder * @internal * @param {DFileBrowser} this - no description * @param {string} currentDir - The directory to populate the list from. * @returns {void} **/ ShowFolder(this: DFileBrowser, currentDir: string): void /** * * Called to set up the @DTree type by @DFileBrowser:Setup. * * @name DFileBrowser:SetupTree * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetupTree * @internal * @param {DFileBrowser} this - no description * @returns {boolean} - Whether or not the tree was set up successfully. **/ SetupTree(this: DFileBrowser): boolean /** * * Called to set up the @DListView type or @DIconBrowser type by @DFileBrowser:Setup. * The icon browser is used when in models mode. See @DFileBrowser:SetModels. * * @name DFileBrowser:SetupTree * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetupFiles * @internal * @param {DFileBrowser} this - no description * @returns {boolean} - Whether or not the files pane was set up successfully. **/ SetupTree(this: DFileBrowser): boolean /** * * Called to set up the @DTree type and file viewer when a base path has been set. * Calls @DFileBrowser:SetupTree and @DFileBrowser:SetupFiles. * * @name DFileBrowser:Setup * @wiki https://wiki.garrysmod.com/page/DFileBrowser/Setup * @internal * @param {DFileBrowser} this - no description * @returns {boolean} - Whether or not the variables needed to set up have been defined. **/ Setup(this: DFileBrowser): boolean /** * * Sets the search filter for the file tree. * This accepts the same wildcards as @file.Find. * * @name DFileBrowser:SetSearch * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetSearch * @param {DFileBrowser} this - no description * @param {string} filter - The filter to use on the file tree. * @returns {void} **/ SetSearch(this: DFileBrowser, filter?: string): void /** * * Sets the access path for the file tree. This is set to *GAME* by default. * See @file.Read for how paths work. * * @name DFileBrowser:SetPath * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetPath * @param {DFileBrowser} this - no description * @param {string} path - The access path i.e. "GAME", "LUA", "DATA" etc. * @returns {void} **/ SetPath(this: DFileBrowser, path: string): void /** * * Opens or closes the file tree. * * @name DFileBrowser:SetOpen * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetOpen * @param {DFileBrowser} this - no description * @param {boolean} open - *true* to open the tree, *false* to close it. * @param {boolean} useAnim - If *true*, the @DTree type's open/close animation is used. * @returns {void} **/ SetOpen(this: DFileBrowser, open?: boolean, useAnim?: boolean): void /** * * Sets the name to use for the file tree. * * @name DFileBrowser:SetName * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetName * @param {DFileBrowser} this - no description * @param {string} treeName - The name for the root of the file tree. Passing no value causes this to be the base folder name. See @DFileBrowser:SetBaseFolder. * @returns {void} **/ SetName(this: DFileBrowser, treeName?: string): void /** * * Enables or disables the model viewer mode. In this mode, files are displayed as @SpawnIcon types instead of a list. * * @name DFileBrowser:SetModels * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetModels * @note This should only be used for *.mdl* files; the spawn icons will display error models for others. See @DFileBrowser:SetFileTypes * @param {DFileBrowser} this - no description * @param {boolean} showModels - Whether or not to display files using @SpawnIcon types. * @returns {void} **/ SetModels(this: DFileBrowser, showModels?: boolean): void /** * * Sets the file type filter for the file list. * This accepts the same file extension wildcards as @file.Find. * * @name DFileBrowser:SetFileTypes * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetFileTypes * @param {DFileBrowser} this - no description * @param {string} fileTypes - A list of file types to display, separated by spaces e.g. * ```"*.lua *.txt *.mdl"``` * @returns {void} **/ SetFileTypes(this: DFileBrowser, fileTypes?: string): void /** * * Sets the directory/folder from which to display the file list. * * @name DFileBrowser:SetPath * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetCurrentFolder * @param {DFileBrowser} this - no description * @param {string} currentDir - The directory to display files from. * @returns {void} **/ SetPath(this: DFileBrowser, currentDir: string): void /** * * Sets the root directory/folder of the file tree. * This needs to be set for the file tree to be displayed. * * @name DFileBrowser:SetBaseFolder * @wiki https://wiki.garrysmod.com/page/DFileBrowser/SetBaseFolder * @param {DFileBrowser} this - no description * @param {string} baseDir - The path to the folder to use as the root. * @returns {void} **/ SetBaseFolder(this: DFileBrowser, baseDir: string): void /** * * Called when a file is selected. * * @name DFileBrowser:OnSelect * @wiki https://wiki.garrysmod.com/page/DFileBrowser/OnSelect * @param {DFileBrowser} this - no description * @param {string} filePath - The path to the file that was selected. * @param {DListView_Line | SpawnIcon} selectedPanel - The panel that was clicked to select this file. * This will either be a @DListView_Line type or @SpawnIcon type depending on whether the model viewer mode is enabled. See @DFileBrowser:SetModels. * @returns {void} **/ OnSelect(this: DFileBrowser, filePath: string, selectedPanel: DListView_Line | SpawnIcon): void /** * * Called when a file is right-clicked. * * @name DFileBrowser:OnRightClick * @wiki https://wiki.garrysmod.com/page/DFileBrowser/OnRightClick * @note When not in model viewer mode, @DFileBrowser:OnSelect will also be called if the file is not already selected. * @param {DFileBrowser} this - no description * @param {string} filePath - The path to the file that was right-clicked. * @param {DListView_Line | SpawnIcon} selectedPanel - The panel that was right-clicked to select this file. * This will either be a @DListView_Line type or @SpawnIcon type depending on whether the model viewer mode is enabled. See @DFileBrowser:SetModels. * @returns {void} **/ OnRightClick(this: DFileBrowser, filePath: string, selectedPanel: DListView_Line | SpawnIcon): void /** * * Called when a file is double-clicked. * * @name DFileBrowser:OnDoubleClick * @wiki https://wiki.garrysmod.com/page/DFileBrowser/OnDoubleClick * @note Double-clicking a file or icon will trigger **both** this and @DFileBrowser:OnSelect. * @param {DFileBrowser} this - no description * @param {string} filePath - The path to the file that was double-clicked. * @param {DListView_Line | SpawnIcon} selectedPanel - The panel that was double-clicked to select this file. * This will either be a @DListView_Line type or @SpawnIcon type depending on whether the model viewer mode is enabled. See @DFileBrowser:SetModels. * @returns {void} **/ OnDoubleClick(this: DFileBrowser, filePath: string, selectedPanel: DListView_Line | SpawnIcon): void /** * * Returns the current search filter on the file tree. * * @name DFileBrowser:GetSearch * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetSearch * @param {DFileBrowser} this - no description * @returns {string} - The filter in use on the file tree. **/ GetSearch(this: DFileBrowser): string /** * * Returns the access path of the file tree. This is *GAME* unless changed with @DFileBrowser:SetPath. * See @file.Read for how paths work. * * @name DFileBrowser:SetPath * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetPath * @param {DFileBrowser} this - no description * @returns {string} - The current access path i.e. "GAME", "LUA", "DATA" etc. **/ SetPath(this: DFileBrowser): string /** * * Returns whether or not the file tree is open. * * @name DFileBrowser:SetOpen * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetOpen * @param {DFileBrowser} this - no description * @returns {boolean} - Whether or not the file tree is open. **/ SetOpen(this: DFileBrowser): boolean /** * * Returns the name being used for the file tree. * * @name DFileBrowser:GetName * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetName * @param {DFileBrowser} this - no description * @returns {string} - The name used for the root of the file tree. **/ GetName(this: DFileBrowser): string /** * * Returns whether or not the model viewer mode is enabled. In this mode, files are displayed as @SpawnIcon types instead of a list. * * @name DFileBrowser:GetModels * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetModels * @param {DFileBrowser} this - no description * @returns {boolean} - Whether or not files will be displayed using @SpawnIcon types. **/ GetModels(this: DFileBrowser): boolean /** * * Returns the @DTree Node type that the file tree stems from. * This is a child of the root node of the @DTree type. * * @name DFileBrowser:GetFolderNode * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetFolderNode * @param {DFileBrowser} this - no description * @returns {DTree_Node} - The @DTree_Node type used for the tree. **/ GetFolderNode(this: DFileBrowser): DTree_Node /** * * Returns the current file type filter on the file list. * * @name DFileBrowser:GetFileTypes * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetFileTypes * @param {DFileBrowser} this - no description * @returns {string} - The current filter applied to the file list. **/ GetFileTypes(this: DFileBrowser): string /** * * Returns the current directory/folder being displayed. * * @name DFileBrowser:GetCurrentFolder * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetCurrentFolder * @param {DFileBrowser} this - no description * @returns {string} - The directory the file list is currently displaying. **/ GetCurrentFolder(this: DFileBrowser): string /** * * Returns the root directory/folder of the file tree. * * @name DFileBrowser:GetBaseFolder * @wiki https://wiki.garrysmod.com/page/DFileBrowser/GetBaseFolder * @param {DFileBrowser} this - no description * @returns {string} - The path to the root folder. **/ GetBaseFolder(this: DFileBrowser): string /** * * Clears the file tree and list, and resets all values. * * @name DFileBrowser:Clear * @wiki https://wiki.garrysmod.com/page/DFileBrowser/Clear * @param {DFileBrowser} this - no description * @returns {void} **/ Clear(this: DFileBrowser): void } declare interface DExpandButton extends DButton { /** * * Sets whether this DExpandButton should be expanded or not. Only changes appearance. * * @name DExpandButton:SetExpanded * @wiki https://wiki.garrysmod.com/page/DExpandButton/SetExpanded * @param {DExpandButton} this - no description * @param {boolean} expanded - True to expand ( visually will show a "-" ) * @returns {void} **/ SetExpanded(this: DExpandButton, expanded: boolean): void /** * * Returns whether this DExpandButton is expanded or not. * * @name DExpandButton:GetExpanded * @wiki https://wiki.garrysmod.com/page/DExpandButton/GetExpanded * @param {DExpandButton} this - no description * @returns {boolean} - True if expanded, false otherwise **/ GetExpanded(this: DExpandButton): boolean } declare interface DEntityProperties extends DProperties { /** * * Sets the entity to be edited by this panel. The entity must support the [Editable Entities](https://wiki.garrysmod.com/page/Editable%20Entities) system or nothing will happen. * * @name DEntityProperties:SetEntity * @wiki https://wiki.garrysmod.com/page/DEntityProperties/SetEntity * @param {DEntityProperties} this - no description * @param {Entity} ent - The entity to edit * @returns {void} **/ SetEntity(this: DEntityProperties, ent: Entity): void /** * * Called internally by @DEntityProperties:SetEntity to rebuild the controls. * * @name DEntityProperties:RebuildControls * @wiki https://wiki.garrysmod.com/page/DEntityProperties/RebuildControls * @internal * @param {DEntityProperties} this - no description * @returns {void} **/ RebuildControls(this: DEntityProperties): void /** * * Called when we were editing an entity and then it became invalid (probably removed) * * @name DEntityProperties:OnEntityLost * @wiki https://wiki.garrysmod.com/page/DEntityProperties/OnEntityLost * @param {DEntityProperties} this - no description * @returns {void} **/ OnEntityLost(this: DEntityProperties): void /** * * Called internally when an entity being edited became invalid. * You should use @DEntityProperties:OnEntityLost instead. * * @name DEntityProperties:EntityLost * @wiki https://wiki.garrysmod.com/page/DEntityProperties/EntityLost * @internal * @param {DEntityProperties} this - no description * @returns {void} **/ EntityLost(this: DEntityProperties): void /** * * Called internally by @DEntityProperties:RebuildControls. * * @name DEntityProperties:EditVariable * @wiki https://wiki.garrysmod.com/page/DEntityProperties/EditVariable * @internal * @param {DEntityProperties} this - no description * @param {string} varname - no description * @param {table} editdata - no description * @returns {void} **/ EditVariable(this: DEntityProperties, varname: string, editdata: table): void } declare interface DDrawer extends Panel { /** * * Toggles the @DDrawer type. * * @name DDrawer:Toggle * @wiki https://wiki.garrysmod.com/page/DDrawer/Toggle * @param {DDrawer} this - no description * @returns {void} **/ Toggle(this: DDrawer): void /** * * Set the time (in seconds) for DDrawer to open. * * @name DDrawer:SetOpenTime * @wiki https://wiki.garrysmod.com/page/DDrawer/SetOpenTime * @param {DDrawer} this - no description * @param {number} value - Length in seconds. Default is 0.3 * @returns {void} **/ SetOpenTime(this: DDrawer, value: number): void /** * * Set the height of DDrawer * * @name DDrawer:SetOpenSize * @wiki https://wiki.garrysmod.com/page/DDrawer/SetOpenSize * @param {DDrawer} this - no description * @param {number} Value - Height of DDrawer. Default is 100. * @returns {void} **/ SetOpenSize(this: DDrawer, Value: number): void /** * * Return the Open Time of DDrawer. * * @name DDrawer:GetOpenTime * @wiki https://wiki.garrysmod.com/page/DDrawer/GetOpenTime * @param {DDrawer} this - no description * @returns {number} - Time in seconds. **/ GetOpenTime(this: DDrawer): number /** * * Opens the @DDrawer type. * * @name DDrawer:Open * @wiki https://wiki.garrysmod.com/page/DDrawer/Open * @param {DDrawer} this - no description * @returns {void} **/ Open(this: DDrawer): void /** * * Return the Open Size of DDrawer. * * @name DDrawer:GetOpenSize * @wiki https://wiki.garrysmod.com/page/DDrawer/GetOpenSize * @param {DDrawer} this - no description * @returns {number} - Open size. **/ GetOpenSize(this: DDrawer): number /** * * Closes the @DDrawer type. * * @name DDrawer:Close * @wiki https://wiki.garrysmod.com/page/DDrawer/Close * @param {DDrawer} this - no description * @returns {void} **/ Close(this: DDrawer): void } declare interface DDragBase extends DPanel { /** * * Internal function used in @DDragBase:DropAction_Normal * * @name DDragBase:UpdateDropTarget * @wiki https://wiki.garrysmod.com/page/DDragBase/UpdateDropTarget * @internal * @param {DDragBase} this - no description * @param {number} drop - no description * @param {Panel} pnl - no description * @returns {void} **/ UpdateDropTarget(this: DDragBase, drop: number, pnl: Panel): void /** * @name DDragBase:SetUseLiveDrag * @wiki https://wiki.garrysmod.com/page/DDragBase/SetUseLiveDrag * @param {DDragBase} this - no description * @param {boolean} newState - no description * @returns {void} **/ SetUseLiveDrag(this: DDragBase, newState: boolean): void /** * @name DDragBase:SetDnD * @wiki https://wiki.garrysmod.com/page/DDragBase/SetDnD * @param {DDragBase} this - no description * @param {string} name - Name of the DnD family. * @returns {void} **/ SetDnD(this: DDragBase, name: string): void /** * * Determines where you can drop stuff. * "4" for left * "5" for center * "6" for right * "8" for top * "2" for bottom * * @name DDragBase:SetDropPos * @wiki https://wiki.garrysmod.com/page/DDragBase/SetDropPos * @param {DDragBase} this - no description * @param {string} pos - Where you're allowed to drop things. * @returns {void} **/ SetDropPos(this: DDragBase, pos?: string): void /** * * Called when anything is dropped on or rearranged within the @DDragBase type. * * @name DDragBase:OnModified * @wiki https://wiki.garrysmod.com/page/DDragBase/OnModified * @param {DDragBase} this - no description * @returns {void} **/ OnModified(this: DDragBase): void /** * * Makes the panel a receiver for any droppable panel with the same DnD name. Internally calls @Panel:Receiver. * * @name DDragBase:MakeDroppable * @wiki https://wiki.garrysmod.com/page/DDragBase/MakeDroppable * @param {DDragBase} this - no description * @param {string} name - The unique name for the receiver slot. Only droppable panels with the same DnD name as this can be dropped on the panel. * @param {boolean} allowCopy - Whether or not to allow droppable panels to be copied when the @Ctrl key key is held down. * @returns {void} **/ MakeDroppable(this: DDragBase, name: string, allowCopy: boolean): void /** * @name DDragBase:GetUseLiveDrag * @wiki https://wiki.garrysmod.com/page/DDragBase/GetUseLiveDrag * @param {DDragBase} this - no description * @returns {boolean} - no description **/ GetUseLiveDrag(this: DDragBase): boolean /** * * Internal function used in @DDragBase:DropAction_Normal * * @name DDragBase:DropAction_Simple * @wiki https://wiki.garrysmod.com/page/DDragBase/DropAction Simple * @internal * @param {DDragBase} this - no description * @param {table} drops - no description * @param {boolean} bDoDrop - no description * @param {string} command - no description * @param {number} y - no description * @param {number} x - no description * @returns {void} **/ DropAction_Simple(this: DDragBase, drops: table, bDoDrop: boolean, command: string, y: number, x: number): void /** * @name DDragBase:GetDnD * @wiki https://wiki.garrysmod.com/page/DDragBase/GetDnD * @param {DDragBase} this - no description * @returns {string} - Name of the DnD family. **/ GetDnD(this: DDragBase): string /** * * Internal function used in @DDragBase:DropAction_Copy * * @name DDragBase:DropAction_Normal * @wiki https://wiki.garrysmod.com/page/DDragBase/DropAction Normal * @internal * @param {DDragBase} this - no description * @param {table} drops - no description * @param {boolean} bDoDrop - no description * @param {string} command - no description * @param {number} y - no description * @param {number} x - no description * @returns {void} **/ DropAction_Normal(this: DDragBase, drops: table, bDoDrop: boolean, command: string, y: number, x: number): void /** * * Internal function used in @DDragBase:MakeDroppable * * @name DDragBase:DropAction_Copy * @wiki https://wiki.garrysmod.com/page/DDragBase/DropAction Copy * @internal * @param {DDragBase} this - no description * @param {table} drops - no description * @param {boolean} bDoDrop - no description * @param {string} command - no description * @param {number} y - no description * @param {number} x - no description * @returns {void} **/ DropAction_Copy(this: DDragBase, drops: table, bDoDrop: boolean, command: string, y: number, x: number): void } declare interface DComboBox extends DButton { /** * * Sets the text shown in the combo box when the menu is not collapsed. * * @name DComboBox:SetValue * @wiki https://wiki.garrysmod.com/page/DComboBox/SetValue * @param {DComboBox} this - no description * @param {string} value - The text in the DComboBox. * @returns {void} **/ SetValue(this: DComboBox, value: string): void /** * * Sets whether or not the items should be sorted alphabetically in the dropdown menu of the @DComboBox type. If set to false, items will appear in the order they were added by @DComboBox:AddChoice calls. * This is enabled by default. * * @name DComboBox:SetSortItems * @wiki https://wiki.garrysmod.com/page/DComboBox/SetSortItems * @param {DComboBox} this - no description * @param {boolean} sort - true to enable, false to disable * @returns {void} **/ SetSortItems(this: DComboBox, sort: boolean): void /** * * Opens the combo box drop down menu. Called when the combo box is clicked. * * @name DComboBox:OpenMenu * @wiki https://wiki.garrysmod.com/page/DComboBox/OpenMenu * @param {DComboBox} this - no description * @returns {void} **/ OpenMenu(this: DComboBox): void /** * * Called when an option in the combo box is selected. * * @name DComboBox:OnSelect * @wiki https://wiki.garrysmod.com/page/DComboBox/OnSelect * @param {DComboBox} this - no description * @param {number} index - The index of the option for use with other @DComboBox type functions. * @param {string} value - The name of the option. * @param {any} data - The data assigned to the option. * @returns {void} **/ OnSelect(this: DComboBox, index: number, value: string, data: any): void /** * * Returns whether or not the combo box's menu is opened. * * @name DComboBox:IsMenuOpen * @wiki https://wiki.garrysmod.com/page/DComboBox/IsMenuOpen * @param {DComboBox} this - no description * @returns {boolean} - True if the menu is open, false otherwise. **/ IsMenuOpen(this: DComboBox): boolean /** * * Returns an whether the items in the dropdown will be alphabetically sorted or not. * See @DComboBox:SetSortItems. * * @name DComboBox:GetSortItems * @wiki https://wiki.garrysmod.com/page/DComboBox/GetSortItems * @param {DComboBox} this - no description * @returns {boolean} - True if enabled, false otherwise. **/ GetSortItems(this: DComboBox): boolean /** * * Returns the index (ID) of the currently selected option. * * @name DComboBox:GetSelectedID * @wiki https://wiki.garrysmod.com/page/DComboBox/GetSelectedID * @param {DComboBox} this - no description * @returns {number} - The ID of the currently selected option. **/ GetSelectedID(this: DComboBox): number /** * * Returns the currently selected option's text and data * * @name DComboBox:GetSelected * @wiki https://wiki.garrysmod.com/page/DComboBox/GetSelected * @param {DComboBox} this - no description * @returns {string} - The option's text value. * @returns {any} - The option's stored data. * @tupleReturn **/ GetSelected(this: DComboBox): [string, any] /** * * Returns an option's text based on the given data. * * @name DComboBox:GetOptionTextByData * @wiki https://wiki.garrysmod.com/page/DComboBox/GetOptionTextByData * @param {DComboBox} this - no description * @param {string} data - The data to look up the name of. * If given a @number type and no matching data was found, the function will test given data against each @tonumber function'd data entry. * @returns {string} - The option's text value. * If no matching data was found, the data itself will be returned. If multiple identical data entries exist, the first instance will be returned. **/ GetOptionTextByData(this: DComboBox, data: string): string /** * * Returns an option's text based on the given index. * * @name DComboBox:GetOptionText * @wiki https://wiki.garrysmod.com/page/DComboBox/GetOptionText * @param {DComboBox} this - no description * @param {number} index - The option index. * @returns {string} - The option's text value. **/ GetOptionText(this: DComboBox, index: number): string /** * * Returns an option's data based on the given index. * * @name DComboBox:GetOptionData * @wiki https://wiki.garrysmod.com/page/DComboBox/GetOptionData * @param {DComboBox} this - no description * @param {number} index - The option index. * @returns {any} - The option's data value. **/ GetOptionData(this: DComboBox, index: number): any /** * * Closes the combo box menu. Called when the combo box is clicked while open. * * @name DComboBox:CloseMenu * @wiki https://wiki.garrysmod.com/page/DComboBox/CloseMenu * @param {DComboBox} this - no description * @returns {void} **/ CloseMenu(this: DComboBox): void /** * * Clears the combo box's text value, choices, and data values. * * @name DComboBox:Clear * @wiki https://wiki.garrysmod.com/page/DComboBox/Clear * @param {DComboBox} this - no description * @returns {void} **/ Clear(this: DComboBox): void /** * * Adds a choice to the combo box. * * @name DComboBox:AddChoice * @wiki https://wiki.garrysmod.com/page/DComboBox/AddChoice * @param {DComboBox} this - no description * @param {string} value - The text show to the user. * @param {any} data - The data accompanying this string. If left empty, the value argument is used instead. * Can be accessed with the second argument of @DComboBox:GetSelected, @DComboBox:GetOptionData and as an argument of @DComboBox:OnSelect. * @param {boolean} select - Should this be the default selected text show to the user or not. * @param {string} icon - Adds an icon for this choice. * @returns {number} - The index of the new option. **/ AddChoice(this: DComboBox, value: string, data?: any, select?: boolean, icon?: string): number /** * * Selects an option within a combo box based on its table index. * * @name DComboBox:ChooseOptionID * @wiki https://wiki.garrysmod.com/page/DComboBox/ChooseOptionID * @param {DComboBox} this - no description * @param {number} index - Selects the option with given index. * @returns {void} **/ ChooseOptionID(this: DComboBox, index: number): void /** * * Selects a combo box option by its index and changes the text displayed at the top of the combo box. * * @name DComboBox:ChooseOption * @wiki https://wiki.garrysmod.com/page/DComboBox/ChooseOption * @param {DComboBox} this - no description * @param {string} value - The text to display at the top of the combo box. * @param {number} index - The option index. * @returns {void} **/ ChooseOption(this: DComboBox, value: string, index: number): void } declare interface DColumnSheet extends Panel { /** * * Makes the tabs/buttons show only the image and no text. * * @name DColumnSheet:UseButtonOnlyStyle * @wiki https://wiki.garrysmod.com/page/DColumnSheet/UseButtonOnlyStyle * @param {DColumnSheet} this - no description * @returns {void} **/ UseButtonOnlyStyle(this: DColumnSheet): void /** * * Makes a button an active button for this @DColumnSheet type. * * @name DColumnSheet:SetActiveButton * @wiki https://wiki.garrysmod.com/page/DColumnSheet/SetActiveButton * @internal * @param {DColumnSheet} this - no description * @param {Panel} active - The button to make active button * @returns {void} **/ SetActiveButton(this: DColumnSheet, active: Panel): void /** * * Returns the active button of this @DColumnSheet type. * * @name DColumnSheet:GetActiveButton * @wiki https://wiki.garrysmod.com/page/DColumnSheet/GetActiveButton * @param {DColumnSheet} this - no description * @returns {Panel} - The active button **/ GetActiveButton(this: DColumnSheet): Panel /** * * Adds a new column/tab. * * @name DColumnSheet:AddSheet * @wiki https://wiki.garrysmod.com/page/DColumnSheet/AddSheet * @param {DColumnSheet} this - no description * @param {string} name - Name of the column/tab * @param {DPanel} pnl - Panel to be used as contents of the tab. This normally would be a @DPanel type * @param {string} icon - Icon for the tab. This will ideally be a [silkicon](https://wiki.garrysmod.com/page/Silkicons), but any material name can be used. * @returns {IDColumnSheetAddSheetReturn} - A table containing the following keys: **/ AddSheet(this: DColumnSheet, name: string, pnl: DPanel, icon?: string): IDColumnSheetAddSheetReturn } declare interface DColorPalette extends DIconLayout { /** * * Updates all the console variables set by @DColorPalette:SetConVarR and so on with given color. * Called internally when a palette color is clicked. * * @name DColorPalette:UpdateConVars * @wiki https://wiki.garrysmod.com/page/DColorPalette/UpdateConVars * @internal * @param {DColorPalette} this - no description * @param {IColor} clr - A @IColor structure * @returns {void} **/ UpdateConVars(this: DColorPalette, clr: IColor): void /** * * Internal helper function for @DColorPalette:UpdateConVars. * * @name DColorPalette:UpdateConVar * @wiki https://wiki.garrysmod.com/page/DColorPalette/UpdateConVar * @internal * @param {DColorPalette} this - no description * @param {string} name - The name of the console variable to set * @param {string} key - The key of the 3rd argument to set the convar to * Possible values: "r", "g", "b", "a" * @param {IColor} clr - The @IColor structure to retrieve the info from. * @returns {void} **/ UpdateConVar(this: DColorPalette, name: string, key: string, clr: IColor): void /** * * Roughly sets the number of colors that can be picked by the user. If the DColorPalette is exactly 6 rows tall, this function will set the number of colors shown per row in the palette. * * @name DColorPalette:SetNumRows * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetNumRows * @note @DColorPalette:Reset or @DColorPalette:ResetSavedColors must be called after this function to apply changes. * @param {DColorPalette} this - no description * @param {number} rows - Scale for the range of colors that the user can pick. Default is 8. * @returns {void} **/ SetNumRows(this: DColorPalette, rows: number): void /** * * Sets the @ConVar type name for the green channel of the color. * See also: * * @DColorPalette:SetConVarR - For the red channel * * @DColorPalette:SetConVarB - For the blue channel * * @DColorPalette:SetConVarA - For the alpha channel * * @name DColorPalette:SetConVarG * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetConVarG * @param {DColorPalette} this - no description * @param {string} convar - The @ConVar type name for the green channel of the color * @returns {void} **/ SetConVarG(this: DColorPalette, convar: string): void /** * * Sets the @ConVar type name for the red channel of the color. * See also: * * @DColorPalette:SetConVarG - For the green channel * * @DColorPalette:SetConVarB - For the blue channel * * @DColorPalette:SetConVarA - For the alpha channel * * @name DColorPalette:SetConVarR * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetConVarR * @param {DColorPalette} this - no description * @param {string} convar - The @ConVar type name for the red channel of the color * @returns {void} **/ SetConVarR(this: DColorPalette, convar: string): void /** * * Sets the @ConVar type name for the alpha channel of the color. * See also: * * @DColorPalette:SetConVarR - For the red channel * * @DColorPalette:SetConVarG - For the green channel * * @DColorPalette:SetConVarB - For the blue channel * * @name DColorPalette:SetConVarA * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetConVarA * @param {DColorPalette} this - no description * @param {string} convar - The @ConVar type name for the alpha channel of the color * @returns {void} **/ SetConVarA(this: DColorPalette, convar: string): void /** * * Sets the @ConVar type name for the blue channel of the color. * See also: * * @DColorPalette:SetConVarR - For the red channel * * @DColorPalette:SetConVarG - For the green channel * * @DColorPalette:SetConVarA - For the alpha channel * * @name DColorPalette:SetConVarB * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetConVarB * @param {DColorPalette} this - no description * @param {string} convar - The @ConVar type name for the blue channel of the color * @returns {void} **/ SetConVarB(this: DColorPalette, convar: string): void /** * * Clears the palette and adds new buttons with given colors. * * @name DColorPalette:SetColorButtons * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetColorButtons * @param {DColorPalette} this - no description * @param {IColor} tab - A number indexed table where each value is a @IColor structure * @returns {void} **/ SetColorButtons(this: DColorPalette, tab: IColor): void /** * * Currently does nothing. Intended to "select" the color. * * @name DColorPalette:SetColor * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetColor * @param {DColorPalette} this - no description * @param {table} clr - no description * @returns {void} **/ SetColor(this: DColorPalette, clr: table): void /** * * Sets the size of each palette button. * This is best kept to such a number, where this equation would return a whole number: * WidthOfColorPalette/ButtonSize=WholeNumber * If not, there will be ugly whitespace on the right side of the panel. * * @name DColorPalette:SetButtonSize * @wiki https://wiki.garrysmod.com/page/DColorPalette/SetButtonSize * @param {DColorPalette} this - no description * @param {number} size - Sets the new size * @returns {void} **/ SetButtonSize(this: DColorPalette, size: number): void /** * * Saves the color of given button across sessions. * The color is saved as a panel cookie, see @Panel:SetCookie and @Panel:SetCookieName. * It is expected that the amount of colors per palette (@Panel:SetCookieName) is the same every time. * * @name DColorPalette:SaveColor * @wiki https://wiki.garrysmod.com/page/DColorPalette/SaveColor * @param {DColorPalette} this - no description * @param {Panel} btn - The button to save the color of. Used to get the ID of the button. * @param {table} clr - The color to save to this button's index * @returns {void} **/ SaveColor(this: DColorPalette, btn: Panel, clr: table): void /** * * Resets this entire color palette to a default preset one and saves the changes. * See @DColorPalette:Reset for version that does not save the changes. * * @name DColorPalette:ResetSavedColors * @wiki https://wiki.garrysmod.com/page/DColorPalette/ResetSavedColors * @param {DColorPalette} this - no description * @returns {void} **/ ResetSavedColors(this: DColorPalette): void /** * * Resets this entire color palette to a default preset one, without saving. * See @DColorPalette:ResetSavedColors for version that also saves the changes. * * @name DColorPalette:Reset * @wiki https://wiki.garrysmod.com/page/DColorPalette/Reset * @param {DColorPalette} this - no description * @returns {void} **/ Reset(this: DColorPalette): void /** * * Used internally to make sure changes on one palette affect other palettes with same name. * * @name DColorPalette:NetworkColorChange * @wiki https://wiki.garrysmod.com/page/DColorPalette/NetworkColorChange * @internal * @param {DColorPalette} this - no description * @returns {void} **/ NetworkColorChange(this: DColorPalette): void /** * * Returns the number of rows of the palette, provided 6 colors fill each row. This value is equal to the number of colors in the DColorPalette divided by 6. * * @name DColorPalette:GetNumRows * @wiki https://wiki.garrysmod.com/page/DColorPalette/GetNumRows * @param {DColorPalette} this - no description * @returns {number} - Number of rows of the DColorPalette. **/ GetNumRows(this: DColorPalette): number /** * * Called when the color is changed after clicking a new value. * * @name DColorPalette:OnValueChanged * @wiki https://wiki.garrysmod.com/page/DColorPalette/OnValueChanged * @param {DColorPalette} this - no description * @param {table} newcol - The new color of the @DColorPalette type * @returns {void} **/ OnValueChanged(this: DColorPalette, newcol: table): void /** * * Called when a palette button has been pressed * * @name DColorPalette:OnRightClickButton * @wiki https://wiki.garrysmod.com/page/DColorPalette/OnRightClickButton * @param {DColorPalette} this - no description * @param {DColorButton} pnl - The @DColorButton type that was pressed. * @returns {void} **/ OnRightClickButton(this: DColorPalette, pnl: DColorButton): void /** * * Returns the @ConVar type name for the red channel of the color. * See also: * * @DColorPalette:GetConVarG - For the green channel * * @DColorPalette:GetConVarB - For the blue channel * * @DColorPalette:GetConVarA - For the alpha channel * * @name DColorPalette:GetConVarR * @wiki https://wiki.garrysmod.com/page/DColorPalette/GetConVarR * @param {DColorPalette} this - no description * @returns {string} - The @ConVar type name for the red channel of the color **/ GetConVarR(this: DColorPalette): string /** * * Returns the @ConVar type name for the blue channel of the color. * See also: * * @DColorPalette:GetConVarR - For the red channel * * @DColorPalette:GetConVarG - For the green channel * * @DColorPalette:GetConVarA - For the alpha channel * * @name DColorPalette:GetConVarB * @wiki https://wiki.garrysmod.com/page/DColorPalette/GetConVarB * @param {DColorPalette} this - no description * @returns {string} - The @ConVar type name for the blue channel of the color **/ GetConVarB(this: DColorPalette): string /** * * Returns the @ConVar type name for the green channel of the color. * See also: * * @DColorPalette:GetConVarR - For the red channel * * @DColorPalette:GetConVarB - For the blue channel * * @DColorPalette:GetConVarA - For the alpha channel * * @name DColorPalette:GetConVarG * @wiki https://wiki.garrysmod.com/page/DColorPalette/GetConVarG * @param {DColorPalette} this - no description * @returns {string} - The @ConVar type name for the green channel of the color **/ GetConVarG(this: DColorPalette): string /** * * Returns the @ConVar type name for the alpha channel of the color. * See also: * * @DColorPalette:GetConVarR - For the red channel * * @DColorPalette:GetConVarG - For the green channel * * @DColorPalette:GetConVarB - For the blue channel * * @name DColorPalette:GetConVarA * @wiki https://wiki.garrysmod.com/page/DColorPalette/GetConVarA * @param {DColorPalette} this - no description * @returns {string} - The @ConVar type name for the alpha channel of the color **/ GetConVarA(this: DColorPalette): string /** * * Returns the size of each palette button. Set by @DColorPalette:SetButtonSize. * * @name DColorPalette:GetButtonSize * @wiki https://wiki.garrysmod.com/page/DColorPalette/GetButtonSize * @param {DColorPalette} this - no description * @returns {number} - The size of each palette button **/ GetButtonSize(this: DColorPalette): number /** * * Basically the same functionality as @DColorPalette:OnValueChanged, you should use that instead! * * @name DColorPalette:DoClick * @wiki https://wiki.garrysmod.com/page/DColorPalette/DoClick * @param {DColorPalette} this - no description * @param {IColor} clr - The new color via the @IColor structure * @param {DColorButton} btn - The @DColorButton type that was pressed. * @returns {void} **/ DoClick(this: DColorPalette, clr: IColor, btn: DColorButton): void } declare interface DColorMixer extends DPanel { /** * * Called when the player changes the color of the @DColorMixer type. * * @name DColorMixer:ValueChanged * @wiki https://wiki.garrysmod.com/page/DColorMixer/ValueChanged * @param {DColorMixer} this - no description * @param {IColor} col - The new color. See @IColor structure * @returns {void} **/ ValueChanged(this: DColorMixer, col: IColor): void /** * @name DColorMixer:UpdateConVars * @wiki https://wiki.garrysmod.com/page/DColorMixer/UpdateConVars * @internal * @param {DColorMixer} this - no description * @param {IColor} clr - The @IColor structure * @returns {void} **/ UpdateConVars(this: DColorMixer, clr: IColor): void /** * @name DColorMixer:UpdateConVar * @wiki https://wiki.garrysmod.com/page/DColorMixer/UpdateConVar * @internal * @param {DColorMixer} this - no description * @param {string} cvar - The @ConVar type name * @param {string} part - The color part to set the cvar to. "r", "g", "b" or "a". * @param {IColor} clr - The @IColor structure * @returns {void} **/ UpdateConVar(this: DColorMixer, cvar: string, part: string, clr: IColor): void /** * * Use @DColorMixer:SetColor instead! * * @name DColorMixer:UpdateColor * @wiki https://wiki.garrysmod.com/page/DColorMixer/UpdateColor * @internal * @param {DColorMixer} this - no description * @param {table} clr - no description * @returns {void} **/ UpdateColor(this: DColorMixer, clr: table): void /** * * Does nothing. * * @name DColorMixer:TranslateValues * @wiki https://wiki.garrysmod.com/page/DColorMixer/TranslateValues * @internal * @param {DColorMixer} this - no description * @returns {void} **/ TranslateValues(this: DColorMixer): void /** * * Show / Hide the colors indicators in DColorMixer * * @name DColorMixer:SetWangs * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetWangs * @param {DColorMixer} this - no description * @param {boolean} show - Show / Hide the colors indicators * @returns {void} **/ SetWangs(this: DColorMixer, show: boolean): void /** * * Sets the color of @DColorMixer type from a @Vector type. Alpha is not included. * * @name DColorMixer:SetVector * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetVector * @param {DColorMixer} this - no description * @param {Vector} vec - The color to set. It is expected that the vector will have values be from 0 to 1. (i.e. be normalized) * @returns {void} **/ SetVector(this: DColorMixer, vec: Vector): void /** * * Show or hide the palette panel * * @name DColorMixer:SetPalette * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetPalette * @param {DColorMixer} this - no description * @param {boolean} enabled - Show or hide the palette panel? * @returns {void} **/ SetPalette(this: DColorMixer, enabled: boolean): void /** * * Sets the label's text to show. * * @name DColorMixer:SetLabel * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetLabel * @param {DColorMixer} this - no description * @param {string} text - Set to non empty string to show the label and its text. * Give it an empty string or nothing and the label will be hidden. * @returns {void} **/ SetLabel(this: DColorMixer, text?: string): void /** * * Sets the @ConVar type name for the red channel of the color. * See also: * * @DColorMixer:SetConVarG - For the green channel * * @DColorMixer:SetConVarB - For the blue channel * * @DColorMixer:SetConVarA - For the alpha channel * * @name DColorMixer:SetConVarR * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetConVarR * @param {DColorMixer} this - no description * @param {string} convar - The @ConVar type name for the red channel of the color * @returns {void} **/ SetConVarR(this: DColorMixer, convar: string): void /** * * Sets the @ConVar type name for the green channel of the color. * See also: * * @DColorMixer:SetConVarR - For the red channel * * @DColorMixer:SetConVarB - For the blue channel * * @DColorMixer:SetConVarA - For the alpha channel * * @name DColorMixer:SetConVarG * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetConVarG * @param {DColorMixer} this - no description * @param {string} convar - The @ConVar type name for the green channel of the color * @returns {void} **/ SetConVarG(this: DColorMixer, convar: string): void /** * * Sets the @ConVar type name for the blue channel of the color. * See also: * * @DColorMixer:SetConVarR - For the red channel * * @DColorMixer:SetConVarG - For the green channel * * @DColorMixer:SetConVarA - For the alpha channel * * @name DColorMixer:SetConVarB * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetConVarB * @param {DColorMixer} this - no description * @param {string} convar - The @ConVar type name for the blue channel of the color * @returns {void} **/ SetConVarB(this: DColorMixer, convar: string): void /** * * Sets the @ConVar type name for the alpha channel of the color. * See also: * * @DColorMixer:SetConVarR - For the red channel * * @DColorMixer:SetConVarG - For the green channel * * @DColorMixer:SetConVarB - For the blue channel * * @name DColorMixer:SetConVarA * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetConVarA * @param {DColorMixer} this - no description * @param {string} convar - The @ConVar type name for the alpha channel of the color * @returns {void} **/ SetConVarA(this: DColorMixer, convar: string): void /** * * Sets the color of the @DColorMixer type * * @name DColorMixer:SetColor * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetColor * @param {DColorMixer} this - no description * @param {Color} color - The color to set. See @Color function * @returns {void} **/ SetColor(this: DColorMixer, color: Color): void /** * * Sets the base color of the @DColorCube type part of the @DColorMixer type. * See also @DColorCube:SetBaseRGB * * @name DColorMixer:SetBaseColor * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetBaseColor * @param {DColorMixer} this - no description * @param {IColor} clr - @IColor structure * @returns {void} **/ SetBaseColor(this: DColorMixer, clr: IColor): void /** * * Show/Hide the alpha bar in DColorMixer * * @name DColorMixer:SetAlphaBar * @wiki https://wiki.garrysmod.com/page/DColorMixer/SetAlphaBar * @param {DColorMixer} this - no description * @param {boolean} show - Show / Hide the alpha bar * @returns {void} **/ SetAlphaBar(this: DColorMixer, show: boolean): void /** * * Return true if the wangs are shown, false if not. * * @name DColorMixer:GetWangs * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetWangs * @param {DColorMixer} this - no description * @returns {boolean} - Return true if shown, false if not. **/ GetWangs(this: DColorMixer): boolean /** * * Returns the color as a normalized @Vector type. * * @name DColorMixer:GetVector * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetVector * @param {DColorMixer} this - no description * @returns {DColorMixer} - A vector representing the color of the @DColorMixer type, each value being in range of 0 to 1. Alpha is not included. **/ GetVector(this: DColorMixer): DColorMixer /** * * Return true if palette is shown, false if not. * * @name DColorMixer:GetPalette * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetPalette * @param {DColorMixer} this - no description * @returns {boolean} - Return true if shown, false if not. **/ GetPalette(this: DColorMixer): boolean /** * * Returns the @ConVar type name for the red channel of the color. * See also: * * @DColorMixer:GetConVarG - For the green channel * * @DColorMixer:GetConVarB - For the blue channel * * @DColorMixer:GetConVarA - For the alpha channel * * @name DColorMixer:GetConVarR * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetConVarR * @param {DColorMixer} this - no description * @returns {string} - The @ConVar type name for the red channel of the color **/ GetConVarR(this: DColorMixer): string /** * * Returns the @ConVar type name for the green channel of the color. * See also: * * @DColorMixer:GetConVarR - For the red channel * * @DColorMixer:GetConVarB - For the blue channel * * @DColorMixer:GetConVarA - For the alpha channel * * @name DColorMixer:GetConVarG * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetConVarG * @param {DColorMixer} this - no description * @returns {string} - The @ConVar type name for the green channel of the color **/ GetConVarG(this: DColorMixer): string /** * * Returns the @ConVar type name for the blue channel of the color. * See also: * * @DColorMixer:GetConVarR - For the red channel * * @DColorMixer:GetConVarG - For the green channel * * @DColorMixer:GetConVarA - For the alpha channel * * @name DColorMixer:GetConVarB * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetConVarB * @param {DColorMixer} this - no description * @returns {string} - The @ConVar type name for the blue channel of the color **/ GetConVarB(this: DColorMixer): string /** * * Returns the @ConVar type name for the alpha channel of the color. * See also: * * @DColorMixer:GetConVarR - For the red channel * * @DColorMixer:GetConVarG - For the green channel * * @DColorMixer:GetConVarB - For the blue channel * * @name DColorMixer:GetConVarA * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetConVarA * @param {DColorMixer} this - no description * @returns {string} - The @ConVar type name for the alpha channel of the color **/ GetConVarA(this: DColorMixer): string /** * * Returns the current selected color. * * @name DColorMixer:GetColor * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetColor * @warning This method returns a **table** with keys r,g,b,a and not a Color type * @param {DColorMixer} this - no description * @returns {IColor} - The current selected color as a @IColor structure. **/ GetColor(this: DColorMixer): IColor /** * * Return true if alpha bar is shown, false if not. * * @name DColorMixer:GetAlphaBar * @wiki https://wiki.garrysmod.com/page/DColorMixer/GetAlphaBar * @param {DColorMixer} this - no description * @returns {boolean} - Return true if shown, false if not. **/ GetAlphaBar(this: DColorMixer): boolean /** * @name DColorMixer:DoConVarThink * @wiki https://wiki.garrysmod.com/page/DColorMixer/DoConVarThink * @internal * @param {DColorMixer} this - no description * @param {string} cvar - no description * @returns {void} **/ DoConVarThink(this: DColorMixer, cvar: string): void /** * @name DColorMixer:ConVarThink * @wiki https://wiki.garrysmod.com/page/DColorMixer/ConVarThink * @internal * @param {DColorMixer} this - no description * @returns {void} **/ ConVarThink(this: DColorMixer): void } declare interface DColorCube extends DSlider { /** * * Updates the color cube RGB based on the given x and y position. Similar to @DColorCube:TranslateValues. * * @name DColorCube:UpdateColor * @wiki https://wiki.garrysmod.com/page/DColorCube/UpdateColor * @internal * @param {DColorCube} this - no description * @param {number} x - The x position to set color to/the percentage of saturation to remove from the color (ranges from 0.0 to 1.0). * @param {number} y - The y position to set color to/the percentage of brightness or value to remove from the color (ranges from 0.0 to 1.0). * @returns {void} **/ UpdateColor(this: DColorCube, x?: number, y?: number): void /** * * Used internally to set the real "output" color of the panel. * * @name DColorCube:SetRGB * @wiki https://wiki.garrysmod.com/page/DColorCube/SetRGB * @internal * @param {DColorCube} this - no description * @param {IColor} clr - A @IColor structure * @returns {void} **/ SetRGB(this: DColorCube, clr: IColor): void /** * * Updates the color cube RGB based on the given x and y position and returns its arguments. Similar to @DColorCube:UpdateColor. * * @name DColorCube:TranslateValues * @wiki https://wiki.garrysmod.com/page/DColorCube/TranslateValues * @internal * @param {DColorCube} this - no description * @param {number} x - The x position to sample color from/the percentage of saturation to remove from the color (ranges from 0.0 to 1.0). * @param {number} y - The y position to sample color from/the percentage of brightness or value to remove from the color (ranges from 0.0 to 1.0). * @returns {number} - The given x position. * @returns {number} - The given y position. * @tupleReturn **/ TranslateValues(this: DColorCube, x: number, y: number): [number, number] /** * * Appears to do nothing and unused. * * @name DColorCube:SetHue * @wiki https://wiki.garrysmod.com/page/DColorCube/SetHue * @param {DColorCube} this - no description * @param {number} hue - no description * @returns {void} **/ SetHue(this: DColorCube, hue: number): void /** * * Sets the base color of the color cube and updates the slider position. * * @name DColorCube:SetColor * @wiki https://wiki.garrysmod.com/page/DColorCube/SetColor * @param {DColorCube} this - no description * @param {Color} color - The color to set, uses @IColor structure. * @returns {void} **/ SetColor(this: DColorCube, color: Color): void /** * * Sets the base color and the color used to draw the color cube panel itself. * * @name DColorCube:SetBaseRGB * @wiki https://wiki.garrysmod.com/page/DColorCube/SetBaseRGB * @note Calling this when using a color that isn't 100% saturated and valued (@HSVToColor function with saturation and value set to 1) causes the color cube to look inaccurate compared to the color that's returned by methods like @DColorCube:GetRGB and @DColorCube:OnUserChanged. You should use @DColorCube:SetColor instead * @param {DColorCube} this - no description * @param {Color} color - The base color to set, uses @IColor structure. * @returns {void} **/ SetBaseRGB(this: DColorCube, color: Color): void /** * * Function which is called when the color cube slider is moved (through user input). Meant to be overridden. * * @name DColorCube:OnUserChanged * @wiki https://wiki.garrysmod.com/page/DColorCube/OnUserChanged * @param {DColorCube} this - no description * @param {Color} color - The new color, uses @IColor structure. * @returns {void} **/ OnUserChanged(this: DColorCube, color: Color): void /** * * Returns the value set by @DColorCube:SetHue. * * @name DColorCube:GetHue * @wiki https://wiki.garrysmod.com/page/DColorCube/GetHue * @param {DColorCube} this - no description * @returns {number} - no description **/ GetHue(this: DColorCube): number /** * * Returns the color cube's current set color. * * @name DColorCube:GetRGB * @wiki https://wiki.garrysmod.com/page/DColorCube/GetRGB * @param {DColorCube} this - no description * @returns {IColor} - The set color, uses @IColor structure. **/ GetRGB(this: DColorCube): IColor /** * * Returns the base Color set by @DColorCube:SetBaseRGB. * * @name DColorCube:GetBaseRGB * @wiki https://wiki.garrysmod.com/page/DColorCube/GetBaseRGB * @param {DColorCube} this - no description * @returns {IColor} - A @IColor structure **/ GetBaseRGB(this: DColorCube): IColor } declare interface DColorCombo extends DPropertySheet { /** * * Returns true if the panel is currently being edited * More of a internal method, it technically should only ever work (i.e. return true) inside @DColorCombo:OnValueChanged. * * @name DColorCombo:IsEditing * @wiki https://wiki.garrysmod.com/page/DColorCombo/IsEditing * @param {DColorCombo} this - no description * @returns {boolean} - no description **/ IsEditing(this: DColorCombo): boolean /** * * Sets the color of this panel. * * @name DColorCombo:SetColor * @wiki https://wiki.garrysmod.com/page/DColorCombo/SetColor * @param {DColorCombo} this - no description * @param {IColor} clr - A @IColor structure. * @returns {void} **/ SetColor(this: DColorCombo, clr: IColor): void /** * * Called when the value (color) of this panel was changed. * * @name DColorCombo:OnValueChanged * @wiki https://wiki.garrysmod.com/page/DColorCombo/OnValueChanged * @param {DColorCombo} this - no description * @param {table} newcol - no description * @returns {void} **/ OnValueChanged(this: DColorCombo, newcol: table): void /** * * Called internally to create panels necessary for this panel to work. * * @name DColorCombo:BuildControls * @wiki https://wiki.garrysmod.com/page/DColorCombo/BuildControls * @internal * @param {DColorCombo} this - no description * @returns {void} **/ BuildControls(this: DColorCombo): void /** * * Returns the color of the @DColorCombo type. * * @name DColorCombo:GetColor * @wiki https://wiki.garrysmod.com/page/DColorCombo/GetColor * @param {DColorCombo} this - no description * @returns {IColor} - A @IColor structure **/ GetColor(this: DColorCombo): IColor } declare interface DColorButton extends DLabel { /** * * Sets the color of the @DColorButton type. * * @name DColorButton:SetColor * @wiki https://wiki.garrysmod.com/page/DColorButton/SetColor * @param {DColorButton} this - no description * @param {Color} color - A @IColor structure to set the color as * @param {boolean} noTooltip - If true, the tooltip will not be reset to display the selected color. * @returns {void} **/ SetColor(this: DColorButton, color: Color, noTooltip?: boolean): void /** * * Used internally by @DColorPalette type to detect which button is which. * * @name DColorButton:SetID * @wiki https://wiki.garrysmod.com/page/DColorButton/SetID * @param {DColorButton} this - no description * @param {number} id - A unique ID to give this button * @returns {void} **/ SetID(this: DColorButton, id: number): void /** * * Returns whether the @DColorButton type is currently being pressed (the user is holding it down). * * @name DColorButton:IsDown * @wiki https://wiki.garrysmod.com/page/DColorButton/IsDown * @param {DColorButton} this - no description * @returns {boolean} - no description **/ IsDown(this: DColorButton): boolean /** * * Returns the unique ID set by @DColorButton:SetID. * Used internally by @DColorPalette type * * @name DColorButton:GetID * @wiki https://wiki.garrysmod.com/page/DColorButton/GetID * @param {DColorButton} this - no description * @returns {number} - The unique ID of the button **/ GetID(this: DColorButton): number /** * * Returns the color of the button * * @name DColorButton:GetColor * @wiki https://wiki.garrysmod.com/page/DColorButton/GetColor * @param {DColorButton} this - no description * @returns {IColor} - The @IColor structure of the button **/ GetColor(this: DColorButton): IColor } declare interface DCollapsibleCategory extends Panel { /** * * Used internally to update the "AltLine" property on all "child" panels. * * @name DCollapsibleCategory:UpdateAltLines * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/UpdateAltLines * @internal * @param {DCollapsibleCategory} this - no description * @returns {void} **/ UpdateAltLines(this: DCollapsibleCategory): void /** * @name DCollapsibleCategory:UnselectAll * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/UnselectAll * @param {DCollapsibleCategory} this - no description * @returns {void} **/ UnselectAll(this: DCollapsibleCategory): void /** * * Toggles the expanded state of the @DCollapsibleCategory type. * * @name DCollapsibleCategory:Toggle * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/Toggle * @param {DCollapsibleCategory} this - no description * @returns {void} **/ Toggle(this: DCollapsibleCategory): void /** * * Sets whether or not the background should be painted. * * @name DCollapsibleCategory:SetPaintBackground * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetPaintBackground * @param {DCollapsibleCategory} this - no description * @param {boolean} paint - no description * @returns {void} **/ SetPaintBackground(this: DCollapsibleCategory, paint: boolean): void /** * @name DCollapsibleCategory:SetStartHeight * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetStartHeight * @param {DCollapsibleCategory} this - no description * @param {number} height - no description * @returns {void} **/ SetStartHeight(this: DCollapsibleCategory, height: number): void /** * * Doesn't actually do anything. * * @name DCollapsibleCategory:SetPadding * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetPadding * @param {DCollapsibleCategory} this - no description * @param {number} padding - no description * @returns {void} **/ SetPadding(this: DCollapsibleCategory, padding: number): void /** * @name DCollapsibleCategory:SetList * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetList * @param {DCollapsibleCategory} this - no description * @param {Panel} pnl - no description * @returns {void} **/ SetList(this: DCollapsibleCategory, pnl: Panel): void /** * * Sets the name of the DCollapsibleCategory. * * @name DCollapsibleCategory:SetLabel * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetLabel * @param {DCollapsibleCategory} this - no description * @param {string} label - The label/name of the DCollapsibleCategory. * @returns {void} **/ SetLabel(this: DCollapsibleCategory, label: string): void /** * * Sets whether the @DCollapsibleCategory type is expanded or not upon opening the container. * You should use @DCollapsibleCategory:Toggle or @DCollapsibleCategory:DoExpansion instead. * * @name DCollapsibleCategory:SetExpanded * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetExpanded * @param {DCollapsibleCategory} this - no description * @param {boolean} expanded - Whether it shall be expanded or not by default * @returns {void} **/ SetExpanded(this: DCollapsibleCategory, expanded?: boolean): void /** * * Sets the contents of the DCollapsibleCategory. * * @name DCollapsibleCategory:SetContents * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetContents * @param {DCollapsibleCategory} this - no description * @param {Panel} pnl - The panel, containing the contents for the DCollapsibleCategory, mostly an DScrollPanel * @returns {void} **/ SetContents(this: DCollapsibleCategory, pnl: Panel): void /** * * Sets the time in seconds it takes to expand the DCollapsibleCategory * * @name DCollapsibleCategory:SetAnimTime * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/SetAnimTime * @param {DCollapsibleCategory} this - no description * @param {number} time - The time in seconds it takes to expand * @returns {void} **/ SetAnimTime(this: DCollapsibleCategory, time: number): void /** * * Called by @DCollapsibleCategory:Toggle. * * @name DCollapsibleCategory:OnToggle * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/OnToggle * @param {DCollapsibleCategory} this - no description * @returns {void} **/ OnToggle(this: DCollapsibleCategory): void /** * @name DCollapsibleCategory:GetStartHeight * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/GetStartHeight * @param {DCollapsibleCategory} this - no description * @returns {number} - no description **/ GetStartHeight(this: DCollapsibleCategory): number /** * * Returns whether or not the background should be painted. * * @name DCollapsibleCategory:GetPaintBackground * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/GetPaintBackground * @param {DCollapsibleCategory} this - no description * @returns {boolean} - If the background is painted or not **/ GetPaintBackground(this: DCollapsibleCategory): boolean /** * * Doesn't actually do anything. * Returns the number set by @DCollapsibleCategory:SetPadding. * * @name DCollapsibleCategory:GetPadding * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/GetPadding * @param {DCollapsibleCategory} this - no description * @returns {number} - no description **/ GetPadding(this: DCollapsibleCategory): number /** * @name DCollapsibleCategory:GetList * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/GetList * @param {DCollapsibleCategory} this - no description * @returns {Panel} - no description **/ GetList(this: DCollapsibleCategory): Panel /** * * Returns whether the DCollapsibleCategory is expanded or not. * * @name DCollapsibleCategory:GetExpanded * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/GetExpanded * @param {DCollapsibleCategory} this - no description * @returns {boolean} - If expanded it will return true. **/ GetExpanded(this: DCollapsibleCategory): boolean /** * * Returns the expand/collapse animation time set by @DCollapsibleCategory:SetAnimTime. * * @name DCollapsibleCategory:GetAnimTime * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/GetAnimTime * @param {DCollapsibleCategory} this - no description * @returns {number} - The animation time in seconds **/ GetAnimTime(this: DCollapsibleCategory): number /** * * Forces the category to open or collapse * * @name DCollapsibleCategory:DoExpansion * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/DoExpansion * @param {DCollapsibleCategory} this - no description * @param {boolean} expand - True to open, false to collapse * @returns {void} **/ DoExpansion(this: DCollapsibleCategory, expand: boolean): void /** * * Internal function that handles the open/close animations. * * @name DCollapsibleCategory:AnimSlide * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/AnimSlide * @internal * @param {DCollapsibleCategory} this - no description * @param {table} anim - no description * @param {number} delta - no description * @param {table} data - no description * @returns {void} **/ AnimSlide(this: DCollapsibleCategory, anim: table, delta: number, data: table): void /** * * Adds a new text button to the collapsible category, like the tool menu in Spawnmenu. * * @name DCollapsibleCategory:Add * @wiki https://wiki.garrysmod.com/page/DCollapsibleCategory/Add * @param {DCollapsibleCategory} this - no description * @param {string} name - The name of the button * @returns {DButton} - The @DButton type **/ Add(this: DCollapsibleCategory, name: string): DButton } declare interface DCheckBoxLabel extends DPanel { /** * * Toggles the checked state of the @DCheckBoxLabel type. * * @name DCheckBoxLabel:Toggle * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/Toggle * @param {DCheckBoxLabel} this - no description * @returns {void} **/ Toggle(this: DCheckBoxLabel): void /** * * Sets the checked state of the checkbox, and calls @DCheckBoxLabel:OnChange and the checkbox's @Panel:ConVarChanged methods. * * @name DCheckBoxLabel:SetValue * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetValue * @param {DCheckBoxLabel} this - no description * @param {boolean} checked - Whether the box should be checked or not (1 or 0 can also be used). * @returns {void} **/ SetValue(this: DCheckBoxLabel, checked: boolean): void /** * * Sets the text color for the @DCheckBoxLabel type. * * @name DCheckBoxLabel:SetTextColor * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetTextColor * @param {DCheckBoxLabel} this - no description * @param {Color} color - The text color. Uses the @IColor structure. * @returns {void} **/ SetTextColor(this: DCheckBoxLabel, color: Color): void /** * * Sets the indentation of the element on the X axis. * * @name DCheckBoxLabel:SetIndent * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetIndent * @param {DCheckBoxLabel} this - no description * @param {number} ident - How much in pixels to move the content to the right * @returns {void} **/ SetIndent(this: DCheckBoxLabel, ident: number): void /** * * Sets the font of the text part of the @DCheckBoxLabel type. * * @name DCheckBoxLabel:SetFont * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetFont * @param {DCheckBoxLabel} this - no description * @param {string} font - Font name * @returns {void} **/ SetFont(this: DCheckBoxLabel, font: string): void /** * * Sets the text of the @DCheckBoxLabel type to be dark colored. * * @name DCheckBoxLabel:SetDark * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetDark * @param {DCheckBoxLabel} this - no description * @param {boolean} darkify - True to be dark, false to be default * @returns {void} **/ SetDark(this: DCheckBoxLabel, darkify: boolean): void /** * * Sets the console variable to be set when the checked state of the @DCheckBoxLabel type changes. * * @name DCheckBoxLabel:SetConVar * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetConVar * @param {DCheckBoxLabel} this - no description * @param {string} convar - The name of the convar to set * @returns {void} **/ SetConVar(this: DCheckBoxLabel, convar: string): void /** * * Sets the color of the @DCheckBoxLabel type's text to the bright text color defined in the skin. * * @name DCheckBoxLabel:SetBright * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetBright * @param {DCheckBoxLabel} this - no description * @param {boolean} bright - true makes the text bright. * @returns {void} **/ SetBright(this: DCheckBoxLabel, bright: boolean): void /** * * Sets the checked state of the checkbox. Does not call @DCheckBoxLabel:OnChange or @Panel:ConVarChanged, unlike @DCheckBoxLabel:SetValue. * * @name DCheckBoxLabel:SetChecked * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/SetChecked * @param {DCheckBoxLabel} this - no description * @param {boolean} checked - Whether the box should be checked or not. * @returns {void} **/ SetChecked(this: DCheckBoxLabel, checked: boolean): void /** * * Called when the "checked" state is changed. * * @name DCheckBoxLabel:OnChange * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/OnChange * @param {DCheckBoxLabel} this - no description * @param {boolean} bVal - Whether the checkbox is checked or unchecked. * @returns {void} **/ OnChange(this: DCheckBoxLabel, bVal: boolean): void /** * * Gets the indentation of the element on the X axis. * * @name DCheckBoxLabel:GetIndent * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/GetIndent * @param {DCheckBoxLabel} this - no description * @returns {number} - How much the content is moved to the right in pixels **/ GetIndent(this: DCheckBoxLabel): number /** * * Gets the checked state of the checkbox. This calls the checkbox's @DCheckBox:GetChecked function. * * @name DCheckBoxLabel:GetChecked * @wiki https://wiki.garrysmod.com/page/DCheckBoxLabel/GetChecked * @param {DCheckBoxLabel} this - no description * @returns {boolean} - Whether the box is checked or not. **/ GetChecked(this: DCheckBoxLabel): boolean } declare interface DCheckBox extends DButton { /** * * Toggles the checked state of the checkbox, and calls the checkbox's @DCheckBox:OnChange and @Panel:ConVarChanged methods. This is called by @DCheckBox:DoClick. * * @name DCheckBox:Toggle * @wiki https://wiki.garrysmod.com/page/DCheckBox/Toggle * @param {DCheckBox} this - no description * @returns {void} **/ Toggle(this: DCheckBox): void /** * * Sets the checked state of the checkbox, and calls the checkbox's @DCheckBox:OnChange and @Panel:ConVarChanged methods. * * @name DCheckBox:SetValue * @wiki https://wiki.garrysmod.com/page/DCheckBox/SetValue * @param {DCheckBox} this - no description * @param {boolean} checked - Whether the box should be checked or not. * @returns {void} **/ SetValue(this: DCheckBox, checked: boolean): void /** * * Sets the checked state of the checkbox. Does not call the checkbox's @DCheckBox:OnChange and @Panel:ConVarChanged methods, unlike @DCheckBox:SetValue. * * @name DCheckBox:SetChecked * @wiki https://wiki.garrysmod.com/page/DCheckBox/SetChecked * @param {DCheckBox} this - no description * @param {boolean} checked - Whether the box should be checked or not. * @returns {void} **/ SetChecked(this: DCheckBox, checked: boolean): void /** * * Called when the "checked" state is changed. * * @name DCheckBox:OnChange * @wiki https://wiki.garrysmod.com/page/DCheckBox/OnChange * @param {DCheckBox} this - no description * @param {boolean} bVal - Whether the CheckBox is checked or not. * @returns {void} **/ OnChange(this: DCheckBox, bVal: boolean): void /** * * Returns whether the state of the checkbox is being edited. This means whether the user is currently clicking (mouse-down) on the checkbox, and applies to both the left and right mouse buttons. * * @name DCheckBox:IsEditing * @wiki https://wiki.garrysmod.com/page/DCheckBox/IsEditing * @param {DCheckBox} this - no description * @returns {boolean} - Whether the checkbox is being clicked. **/ IsEditing(this: DCheckBox): boolean /** * * Gets the checked state of the checkbox. * * @name DCheckBox:GetChecked * @wiki https://wiki.garrysmod.com/page/DCheckBox/GetChecked * @param {DCheckBox} this - no description * @returns {boolean} - Whether the box is checked or not. **/ GetChecked(this: DCheckBox): boolean } declare interface DCategoryList extends DScrollPanel { /** * * Calls @Panel:UnselectAll on all child elements, if they have it. * * @name DCategoryList:UnselectAll * @wiki https://wiki.garrysmod.com/page/DCategoryList/UnselectAll * @param {DCategoryList} this - no description * @returns {void} **/ UnselectAll(this: DCategoryList): void /** * * Adds an element to the list. * * @name DCategoryList:AddItem * @wiki https://wiki.garrysmod.com/page/DCategoryList/AddItem * @param {DCategoryList} this - no description * @param {Panel} element - VGUI element to add to the list. * @returns {void} **/ AddItem(this: DCategoryList, element: Panel): void /** * * Adds a @DCollapsibleCategory type to the list. * * @name DCategoryList:Add * @wiki https://wiki.garrysmod.com/page/DCategoryList/Add * @param {DCategoryList} this - no description * @param {string} categoryName - The name of the category to add. * @returns {DCollapsibleCategory} - The created @DCollapsibleCategory type **/ Add(this: DCategoryList, categoryName: string): DCollapsibleCategory } declare interface DButton2 extends DLabel { /** * @name DButton2:Test * @wiki https://wiki.garrysmod.com/page/DButton2/Test * @param {DButton2} this - no description * @returns {void} **/ Test(this: DButton2): void } declare interface DButton extends DLabel { /** * * A hook called from within @DLabel type's @PanelHooks:ApplySchemeSettings to determine the color of the text on display. * * @name DButton:UpdateColors * @wiki https://wiki.garrysmod.com/page/DButton/UpdateColours * @param {DButton} this - no description * @param {table} skin - A table supposed to contain the color values listed above. * @returns {void} **/ UpdateColors(this: DButton, skin: table): void /** * * Sets an image to be displayed as the button's background. * Also see: @DImageButton type * * @name DButton:SetImage * @wiki https://wiki.garrysmod.com/page/DButton/SetImage * @param {DButton} this - no description * @param {string} img - The image file to use, relative to * /materials*. If this is nil, the image background is removed. * @returns {void} **/ SetImage(this: DButton, img?: string): void /** * * Does absolutely nothing at all. Default value is automatically set to true. * * @name DButton:SetDrawBorder * @wiki https://wiki.garrysmod.com/page/DButton/SetDrawBorder * @param {DButton} this - no description * @param {boolean} draw - Does nothing. * @returns {void} **/ SetDrawBorder(this: DButton, draw: boolean): void /** * * Sets an image to be displayed as the button's background. Alias of @DButton:SetImage * * @name DButton:SetIcon * @wiki https://wiki.garrysmod.com/page/DButton/SetIcon * @param {DButton} this - no description * @param {string} img - The image file to use, relative to * /materials*. If this is nil, the image background is removed. * @returns {void} **/ SetIcon(this: DButton, img?: string): void /** * * Sets whether or not the DButton is disabled. * When disabled, the button is *greyed out* and cannot be clicked. * * @name DButton:SetDisabled * @wiki https://wiki.garrysmod.com/page/DButton/SetDisabled * @param {DButton} this - no description * @param {boolean} disable - if true, Enable the button and if false, Disable the button * @returns {void} **/ SetDisabled(this: DButton, disable: boolean): void /** * * Sets a console command to be called when the button is clicked. * This overrides the button's *DoClick* method. * * @name DButton:SetConsoleCommand * @wiki https://wiki.garrysmod.com/page/DButton/SetConsoleCommand * @param {DButton} this - no description * @param {string} command - The console command to be called. * @param {string} args - The arguments for the command. * @returns {void} **/ SetConsoleCommand(this: DButton, command: string, args: string): void /** * * Returns value set by @DButton:SetDrawBorder. See that page for more info. * * @name DButton:GetDrawBorder * @wiki https://wiki.garrysmod.com/page/DButton/GetDrawBorder * @param {DButton} this - no description * @returns {boolean} - value set by @DButton:SetDrawBorder. **/ GetDrawBorder(this: DButton): boolean /** * * Returns true if the DButton is currently depressed (a user is clicking on it). * * @name DButton:IsDown * @wiki https://wiki.garrysmod.com/page/DButton/IsDown * @param {DButton} this - no description * @returns {boolean} - Whether or not the button is depressed. **/ IsDown(this: DButton): boolean } declare interface DBubbleContainer extends DPanel { /** * * Sets the speech bubble position and size along with the dialog point position. * * @name DBubbleContainer:OpenForPos * @wiki https://wiki.garrysmod.com/page/DBubbleContainer/OpenForPos * @param {DBubbleContainer} this - no description * @param {number} x - The x position of the dialog point. If this is set to a value greater than half of the set width, the entire bubble container will be moved in addition to the dialog point. * @param {number} y - The y position of the bubble container. Has no effect unless set to a value greater than the set height + 64 pixels. * @param {number} w - The width of the bubble container. * @param {number} h - The height of the bubble container. * @returns {void} **/ OpenForPos(this: DBubbleContainer, x: number, y: number, w: number, h: number): void } declare interface DBinder extends DButton { /** * * Used to set the text of the DBinder to the current key binding, or *NONE*. * * @name DBinder:UpdateText * @wiki https://wiki.garrysmod.com/page/DBinder/UpdateText * @internal * @param {DBinder} this - no description * @returns {void} **/ UpdateText(this: DBinder): void /** * * Alias of @DBinder:SetSelected. * * @name DBinder:SetValue * @wiki https://wiki.garrysmod.com/page/DBinder/SetValue * @param {DBinder} this - no description * @param {KEY} keyCode - The key code of the key to bind. See @KEY enum. * @returns {void} **/ SetValue(this: DBinder, keyCode: KEY): void /** * * Sets the current key bound by the @DBinder type, and updates the button's text as well as the @ConVar type. * * @name DBinder:SetSelectedNumber * @wiki https://wiki.garrysmod.com/page/DBinder/SetSelectedNumber * @param {DBinder} this - no description * @param {KEY} keyCode - The key code of the key to bind. See @KEY enum. * @returns {void} **/ SetSelectedNumber(this: DBinder, keyCode: KEY): void /** * * Called when the player selects a new bind. * * @name DBinder:OnChange * @wiki https://wiki.garrysmod.com/page/DBinder/OnChange * @param {DBinder} this - no description * @param {number} iNum - The new bound key. See @input.GetKeyName. * @returns {void} **/ OnChange(this: DBinder, iNum: number): void /** * * Gets the code of the key currently bound by the DBinder. Same as @DBinder:GetSelectedNumber. * * @name DBinder:GetValue * @wiki https://wiki.garrysmod.com/page/DBinder/GetValue * @param {DBinder} this - no description * @returns {KEY} - The key code of the bound key. See @KEY enum. **/ GetValue(this: DBinder): KEY /** * * Gets the code of the key currently bound by the DBinder. Same as @DBinder:GetValue. * * @name DBinder:GetSelectedNumber * @wiki https://wiki.garrysmod.com/page/DBinder/GetSelectedNumber * @param {DBinder} this - no description * @returns {KEY} - The key code of the bound key. See @KEY enum. **/ GetSelectedNumber(this: DBinder): KEY } declare interface DAlphaBar extends DPanel { /** * * Sets the alpha value or the alpha bar. * * @name DAlphaBar:SetValue * @wiki https://wiki.garrysmod.com/page/DAlphaBar/SetValue * @param {DAlphaBar} this - no description * @param {number} alpha - The new alpha value to set * @returns {void} **/ SetValue(this: DAlphaBar, alpha: number): void /** * * Sets the base color of the alpha bar. This is the color for which the alpha channel is being modified. * * @name DAlphaBar:SetBarColor * @wiki https://wiki.garrysmod.com/page/DAlphaBar/SetBarColor * @param {DAlphaBar} this - no description * @param {IColor} clr - The new @IColor structure to set. See @Color function. * @returns {void} **/ SetBarColor(this: DAlphaBar, clr: IColor): void /** * * Called when user changes the desired alpha value with the control. * * @name DAlphaBar:OnChange * @wiki https://wiki.garrysmod.com/page/DAlphaBar/OnChange * @param {DAlphaBar} this - no description * @param {number} alpha - The new alpha value * @returns {void} **/ OnChange(this: DAlphaBar, alpha: number): void /** * * Returns the alpha value of the alpha bar. * * @name DAlphaBar:GetValue * @wiki https://wiki.garrysmod.com/page/DAlphaBar/GetValue * @param {DAlphaBar} this - no description * @returns {number} - The current alpha value. **/ GetValue(this: DAlphaBar): number /** * * Returns the base color of the alpha bar. This is the color for which the alpha channel is being modified. * * @name DAlphaBar:GetBarColor * @wiki https://wiki.garrysmod.com/page/DAlphaBar/GetBarColor * @param {DAlphaBar} this - no description * @returns {table} - The current base color. **/ GetBarColor(this: DAlphaBar): table } declare interface DAdjustableModelPanel extends DModelPanel { /** * * Enables mouse and keyboard-based adjustment of the perspective. * This is set to *true* automatically each time mouse capture is enabled, and hence doesn't serve as a usable setting, other than to disable this functionality after the @PanelHooks:OnMousePressed event. * * @name DAdjustableModelPanel:SetFirstPerson * @wiki https://wiki.garrysmod.com/page/DAdjustableModelPanel/SetFirstPerson * @param {DAdjustableModelPanel} this - no description * @param {boolean} enable - Whether to enable/disable first person controls. See @DAdjustableModelPanel:FirstPersonControls. * @returns {void} **/ SetFirstPerson(this: DAdjustableModelPanel, enable: boolean): void /** * * Gets whether mouse and keyboard-based adjustment of the perspective has been enabled. See @DAdjustableModelPanel:SetFirstPerson for more information. * * @name DAdjustableModelPanel:GetFirstPerson * @wiki https://wiki.garrysmod.com/page/DAdjustableModelPanel/GetFirstPerson * @param {DAdjustableModelPanel} this - no description * @returns {boolean} - Whether first person controls are enabled. See @DAdjustableModelPanel:FirstPersonControls. **/ GetFirstPerson(this: DAdjustableModelPanel): boolean /** * * Used to adjust the perspective in the model panel via the keyboard, when the right mouse button is used. * * @name DAdjustableModelPanel:FirstPersonControls * @wiki https://wiki.garrysmod.com/page/DAdjustableModelPanel/FirstPersonControls * @internal * @param {DAdjustableModelPanel} this - no description * @returns {void} **/ FirstPersonControls(this: DAdjustableModelPanel): void /** * * Used by the panel to perform mouse capture operations when adjusting the model. * * @name DAdjustableModelPanel:CaptureMouse * @wiki https://wiki.garrysmod.com/page/DAdjustableModelPanel/CaptureMouse * @internal * @param {DAdjustableModelPanel} this - no description * @returns {void} **/ CaptureMouse(this: DAdjustableModelPanel): void } declare interface CUserCmd { /** * * Returns tick count since joining the server. * * @name CUserCmd:TickCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/TickCount * @note This will always return 0 for bots. * @note Returns 0 clientside during prediction calls. If you are trying to use CUserCmd:Set*() on the client in a movement or command hook, keep doing so till TickCount returns a non-zero number to maintain prediction. * @param {CUserCmd} this - no description * @returns {number} - The amount of ticks passed since joining the server. **/ TickCount(this: CUserCmd): number /** * * Sets the direction the client wants to move in. * * @name CUserCmd:SetViewAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetViewAngles * @note The pitch (vertical) angle should be clamped to +/- 89° to prevent the player's view from glitching. * @param {CUserCmd} this - no description * @param {Angle} viewAngle - New view angles. * @returns {void} **/ SetViewAngles(this: CUserCmd, viewAngle: Angle): void /** * * Sets speed the client wishes to move sidewards with, positive to move right, negative to move left. * See also @CUserCmd:SetForwardMove and @CUserCmd:SetUpMove. * * @name CUserCmd:SetSideMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetSideMove * @param {CUserCmd} this - no description * @param {number} speed - The new speed to request. * @returns {void} **/ SetSideMove(this: CUserCmd, speed: number): void /** * * Sets speed the client wishes to move upwards with, negative to move down. * See also @CUserCmd:SetSideMove and @CUserCmd:SetForwardMove. * * @name CUserCmd:SetUpMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetUpMove * @param {CUserCmd} this - no description * @param {number} speed - The new speed to request. * @returns {void} **/ SetUpMove(this: CUserCmd, speed: number): void /** * * Sets the delta of the angular horizontal mouse movement of the player. * See also @CUserCmd:SetMouseY. * * @name CUserCmd:SetMouseX * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetMouseX * @param {CUserCmd} this - no description * @param {number} speed - Angular horizontal move delta. * @returns {void} **/ SetMouseX(this: CUserCmd, speed: number): void /** * * Sets the delta of the angular vertical mouse movement of the player. * See also @CUserCmd:SetMouseX. * * @name CUserCmd:SetMouseY * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetMouseY * @param {CUserCmd} this - no description * @param {number} speed - Angular vertical move delta. * @returns {void} **/ SetMouseY(this: CUserCmd, speed: number): void /** * * Sets the scroll delta. * * @name CUserCmd:SetMouseWheel * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetMouseWheel * @param {CUserCmd} this - no description * @param {number} speed - The scroll delta. * @returns {void} **/ SetMouseWheel(this: CUserCmd, speed: number): void /** * * Sets the impulse command to be sent to the server. * For example, 101 is an impulse that will give the player all Half-Life 2 weapons with sv_cheats set to 1. Impulse 100 will toggle their flashlight. * * @name CUserCmd:SetImpulse * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetImpulse * @param {CUserCmd} this - no description * @param {number} speed - The impulse to send. * @returns {void} **/ SetImpulse(this: CUserCmd, speed: number): void /** * * Sets speed the client wishes to move forward with, negative if the clients wants to move backwards. * See also @CUserCmd:ClearMovement, @CUserCmd:SetSideMove and @CUserCmd:SetUpMove. * * @name CUserCmd:SetForwardMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetForwardMove * @param {CUserCmd} this - no description * @param {number} speed - The new speed to request. The client will not be able to move faster than their set walk/sprint speed. * @returns {void} **/ SetForwardMove(this: CUserCmd, speed: number): void /** * * Sets the buttons as a bitflag. See also @CUserCmd:GetButtons. * * @name CUserCmd:SetButtons * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SetButtons * @note If you are looking to affect player movement, you may need to use @CUserCmd:SetForwardMove instead of setting the keys. * @param {CUserCmd} this - no description * @param {IN} buttons - Bitflag representing which buttons are "down", see @IN enum. * @returns {void} **/ SetButtons(this: CUserCmd, buttons: IN): void /** * * Forces the associated player to select a weapon. This is used internally in the default HL2 weapon selection HUD. * This may not work immediately if the current command is in prediction. Use @input.SelectWeapon to switch the weapon from the client when the next available command can do so. * * @name CUserCmd:SelectWeapon * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/SelectWeapon * @note This is the ideal function to use to create a custom weapon selection HUD, as it allows prediction to run properly for @WeaponHooks:Deploy and @GamemodeHooks:PlayerSwitchWeapon * @param {CUserCmd} this - no description * @param {Weapon} weapon - The weapon entity to select. * @returns {void} **/ SelectWeapon(this: CUserCmd, weapon: Weapon): void /** * * Removed a key bit from the current key bitflag. * * @name CUserCmd:RemoveKey * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/RemoveKey * @param {CUserCmd} this - no description * @param {IN} button - Bitflag to be removed from the key bitflag, see @IN enum. * @returns {void} **/ RemoveKey(this: CUserCmd, button: IN): void /** * * Returns true if the specified button(s) is pressed. * * @name CUserCmd:KeyDown * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/KeyDown * @param {CUserCmd} this - no description * @param {IN} key - Bitflag representing which button to check, see @IN enum. * @returns {boolean} - Is key down or not **/ KeyDown(this: CUserCmd, key: IN): boolean /** * * Gets the direction the player is looking in. * * @name CUserCmd:GetViewAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetViewAngles * @param {CUserCmd} this - no description * @returns {Angle} - requestDir **/ GetViewAngles(this: CUserCmd): Angle /** * * The speed the client wishes to move up with, negative if the clients wants to move down. * * @name CUserCmd:GetUpMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetUpMove * @param {CUserCmd} this - no description * @returns {number} - requestSpeed **/ GetUpMove(this: CUserCmd): number /** * * The speed the client wishes to move sideways with, positive if it wants to move right, negative if it wants to move left. * * @name CUserCmd:GetSideMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetSideMove * @param {CUserCmd} this - no description * @returns {number} - requestSpeed **/ GetSideMove(this: CUserCmd): number /** * * Returns the delta of the angular vertical mouse movement of the player. * * @name CUserCmd:GetMouseY * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetMouseY * @param {CUserCmd} this - no description * @returns {number} - yDelta **/ GetMouseY(this: CUserCmd): number /** * * Returns the delta of the angular horizontal mouse movement of the player. * * @name CUserCmd:GetMouseX * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetMouseX * @param {CUserCmd} this - no description * @returns {number} - xDelta **/ GetMouseX(this: CUserCmd): number /** * * Returns the scroll delta as whole number. * * @name CUserCmd:GetMouseWheel * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetMouseWheel * @param {CUserCmd} this - no description * @returns {number} - Scroll delta **/ GetMouseWheel(this: CUserCmd): number /** * * Gets the current impulse from the client, usually 0. * * @name CUserCmd:GetImpulse * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetImpulse * @param {CUserCmd} this - no description * @returns {number} - The impulse **/ GetImpulse(this: CUserCmd): number /** * * When players are not sending usercommands to the server (often due to lag), their last usercommand will be executed multiple times as a backup. This function returns true if that is happening. * This will never return true clientside. * * @name CUserCmd:IsForced * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/IsForced * @param {CUserCmd} this - no description * @returns {boolean} - isForced **/ IsForced(this: CUserCmd): boolean /** * * The speed the client wishes to move forward with, negative if the clients wants to move backwards. * * @name CUserCmd:GetForwardMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetForwardMove * @param {CUserCmd} this - no description * @returns {number} - The desired speed **/ GetForwardMove(this: CUserCmd): number /** * * Returns a bitflag indicating which buttons are pressed. * * @name CUserCmd:GetButtons * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/GetButtons * @param {CUserCmd} this - no description * @returns {IN} - Pressed buttons, see @IN enum **/ GetButtons(this: CUserCmd): IN /** * * Returns an increasing number representing the index of the user cmd. * * @name CUserCmd:CommandNumber * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/CommandNumber * @warning The value returned is occasionally 0 inside @GamemodeHooks:CreateMove and @GamemodeHooks:StartCommand. It is advised to check for a non-zero value if you wish to get the correct number. * @param {CUserCmd} this - no description * @returns {number} - The command number **/ CommandNumber(this: CUserCmd): number /** * * Clears the movement from the command. * See also @CUserCmd:SetForwardMove, @CUserCmd:SetSideMove and @CUserCmd:SetUpMove. * * @name CUserCmd:ClearMovement * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/ClearMovement * @param {CUserCmd} this - no description * @returns {void} **/ ClearMovement(this: CUserCmd): void /** * * Removes all keys from the command. * * @name CUserCmd:ClearButtons * @realm client, server * @wiki https://wiki.garrysmod.com/page/CUserCmd/ClearButtons * @note If you are looking to affect player movement, you may need to use @CUserCmd:ClearMovement instead of clearing the buttons. * @param {CUserCmd} this - no description * @returns {void} **/ ClearButtons(this: CUserCmd): void } declare interface CTakeDamageInfo { /** * * Subtracts the specified amount from the damage. * * @name CTakeDamageInfo:SubtractDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SubtractDamage * @param {CTakeDamageInfo} this - no description * @param {number} damage - Value to subtract. * @returns {void} **/ SubtractDamage(this: CTakeDamageInfo, damage: number): void /** * * Sets the origin of the damage. * * @name CTakeDamageInfo:SetReportedPosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetReportedPosition * @param {CTakeDamageInfo} this - no description * @param {Vector} pos - The location of where the damage is originating * @returns {void} **/ SetReportedPosition(this: CTakeDamageInfo, pos: Vector): void /** * * Sets the maximum damage the object can cause. * * @name CTakeDamageInfo:SetMaxDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetMaxDamage * @param {CTakeDamageInfo} this - no description * @param {number} maxDamage - Maximum damage value. * @returns {void} **/ SetMaxDamage(this: CTakeDamageInfo, maxDamage: number): void /** * * Sets the damage type. * * @name CTakeDamageInfo:SetDamageType * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetDamageType * @param {CTakeDamageInfo} this - no description * @param {DMG} type - The damage type, see @DMG enum. * @returns {void} **/ SetDamageType(this: CTakeDamageInfo, type: DMG): void /** * * Sets the inflictor of the damage for example a weapon. * For hitscan/bullet weapons this should the weapon. * For projectile ( rockets, etc ) weapons this should be the projectile. * * @name CTakeDamageInfo:SetInflictor * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetInflictor * @param {CTakeDamageInfo} this - no description * @param {Entity} inflictor - The new inflictor. * @returns {void} **/ SetInflictor(this: CTakeDamageInfo, inflictor: Entity): void /** * * Sets the position of where the damage gets applied to. * * @name CTakeDamageInfo:SetDamagePosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetDamagePosition * @param {CTakeDamageInfo} this - no description * @param {Vector} pos - The position where the damage will be applied. * @returns {void} **/ SetDamagePosition(this: CTakeDamageInfo, pos: Vector): void /** * * Sets the directional force of the damage. * * @name CTakeDamageInfo:SetDamageForce * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetDamageForce * @param {CTakeDamageInfo} this - no description * @param {Vector} force - The vector to set the force to. * @returns {void} **/ SetDamageForce(this: CTakeDamageInfo, force: Vector): void /** * * Sets the custom damage type. This is used by Day of Defeat: Source and Team Fortress 2 for extended damage info, but isn't used in Garry's Mod by default. * * @name CTakeDamageInfo:SetDamageCustom * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetDamageCustom * @param {CTakeDamageInfo} this - no description * @param {number} DamageType - Any integer - can be based on your own custom enums. * @returns {void} **/ SetDamageCustom(this: CTakeDamageInfo, DamageType: number): void /** * * Sets the bonus damage. Bonus damage isn't automatically applied, so this will have no outer effect by default. * * @name CTakeDamageInfo:SetDamageBonus * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetDamageBonus * @param {CTakeDamageInfo} this - no description * @param {number} damage - The extra damage to be added. * @returns {void} **/ SetDamageBonus(this: CTakeDamageInfo, damage: number): void /** * * Sets the amount of damage. * * @name CTakeDamageInfo:SetDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetDamage * @param {CTakeDamageInfo} this - no description * @param {number} damage - The value to set the absolute damage to. * @returns {void} **/ SetDamage(this: CTakeDamageInfo, damage: number): void /** * * Sets the attacker ( character who originated the attack ) of the damage, for example a player or an NPC. * * @name CTakeDamageInfo:SetAttacker * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetAttacker * @param {CTakeDamageInfo} this - no description * @param {Entity} ent - The entity to be set as the attacker. * @returns {void} **/ SetAttacker(this: CTakeDamageInfo, ent: Entity): void /** * * Changes the ammo type used by the weapon that inflicted the damage. * * @name CTakeDamageInfo:SetAmmoType * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/SetAmmoType * @param {CTakeDamageInfo} this - no description * @param {number} ammoType - Ammo type ID * @returns {void} **/ SetAmmoType(this: CTakeDamageInfo, ammoType: number): void /** * * Scales the damage by the given value. * * @name CTakeDamageInfo:ScaleDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/ScaleDamage * @param {CTakeDamageInfo} this - no description * @param {number} scale - Value to scale the damage with. * @returns {void} **/ ScaleDamage(this: CTakeDamageInfo, scale: number): void /** * * Returns whenever the damageinfo contains fall damage. * * @name CTakeDamageInfo:IsFallDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/IsFallDamage * @param {CTakeDamageInfo} this - no description * @returns {boolean} - isFallDmg **/ IsFallDamage(this: CTakeDamageInfo): boolean /** * * Returns whenever the damageinfo contains the damage type specified. * * @name CTakeDamageInfo:IsDamageType * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/IsDamageType * @param {CTakeDamageInfo} this - no description * @param {DMG} dmgType - Damage type to test. See @DMG enum. * @returns {boolean} - Whether this damage contains specified damage type or not **/ IsDamageType(this: CTakeDamageInfo, dmgType: DMG): boolean /** * * Returns whenever the damageinfo contains explosion damage. * * @name CTakeDamageInfo:IsExplosionDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/IsExplosionDamage * @param {CTakeDamageInfo} this - no description * @returns {boolean} - isExplDamage **/ IsExplosionDamage(this: CTakeDamageInfo): boolean /** * * Returns true if the damage was caused by a bullet. * * @name CTakeDamageInfo:IsBulletDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/IsBulletDamage * @param {CTakeDamageInfo} this - no description * @returns {boolean} - isBulletDmg **/ IsBulletDamage(this: CTakeDamageInfo): boolean /** * * Returns the initial, unmodified position where the damage occured. * * @name CTakeDamageInfo:GetReportedPosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetReportedPosition * @param {CTakeDamageInfo} this - no description * @returns {Vector} - position **/ GetReportedPosition(this: CTakeDamageInfo): Vector /** * * Returns the maximum damage. * * @name CTakeDamageInfo:GetMaxDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetMaxDamage * @param {CTakeDamageInfo} this - no description * @returns {number} - maxDmg **/ GetMaxDamage(this: CTakeDamageInfo): number /** * * Returns the inflictor of the damage. This is not necessarily a weapon. * For hitscan weapons this is the weapon. * For projectile weapons this is the projectile. * For a more reliable method of getting the weapon that damaged an entity, use [GetAttacker](https://wiki.garrysmod.com/page/CTakeDamageInfo/GetAttacker) with [GetActiveWeapon](https://wiki.garrysmod.com/page/Player/GetActiveWeapon). * * @name CTakeDamageInfo:GetInflictor * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetInflictor * @param {CTakeDamageInfo} this - no description * @returns {Entity} - The inflictor **/ GetInflictor(this: CTakeDamageInfo): Entity /** * * Returns the position where the damage was or is going to be applied to. * Can be set using @CTakeDamageInfo:SetDamagePosition. * * @name CTakeDamageInfo:GetDamagePosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetDamagePosition * @param {CTakeDamageInfo} this - no description * @returns {Vector} - The damage position **/ GetDamagePosition(this: CTakeDamageInfo): Vector /** * * Returns a bitflag which indicates the damage type(s) of the damage. * Consider using @CTakeDamageInfo:IsDamageType instead. Value returned by this function can contain multiple damage types. * * @name CTakeDamageInfo:GetDamageType * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetDamageType * @param {CTakeDamageInfo} this - no description * @returns {DMG} - Damage type(s), a combination of @DMG enum **/ GetDamageType(this: CTakeDamageInfo): DMG /** * * Returns a vector representing the damage force. * Can be set with @CTakeDamageInfo:SetDamageForce. * * @name CTakeDamageInfo:GetDamageForce * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetDamageForce * @param {CTakeDamageInfo} this - no description * @returns {Vector} - The damage force **/ GetDamageForce(this: CTakeDamageInfo): Vector /** * * Gets the custom damage type. This is used by Day of Defeat: Source and Team Fortress 2 for extended damage info, but isn't used in Garry's Mod by default. * * @name CTakeDamageInfo:GetDamageCustom * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetDamageCustom * @param {CTakeDamageInfo} this - no description * @returns {number} - The custom damage type **/ GetDamageCustom(this: CTakeDamageInfo): number /** * * Gets the current bonus damage. * * @name CTakeDamageInfo:GetDamageBonus * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetDamageBonus * @param {CTakeDamageInfo} this - no description * @returns {number} - Bonus damage **/ GetDamageBonus(this: CTakeDamageInfo): number /** * * Returns the total damage. * * @name CTakeDamageInfo:GetDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetDamage * @param {CTakeDamageInfo} this - no description * @returns {number} - damage **/ GetDamage(this: CTakeDamageInfo): number /** * * Returns the initial unmodified by skill level ( @game.GetSkillLevel ) damage. * * @name CTakeDamageInfo:GetBaseDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetBaseDamage * @param {CTakeDamageInfo} this - no description * @returns {number} - baseDamage **/ GetBaseDamage(this: CTakeDamageInfo): number /** * * Returns the attacker ( character who originated the attack ), for example a player or an NPC that shot the weapon. * * @name CTakeDamageInfo:GetAttacker * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetAttacker * @param {CTakeDamageInfo} this - no description * @returns {Entity} - The attacker **/ GetAttacker(this: CTakeDamageInfo): Entity /** * * Returns the ammo type used by the weapon that inflicted the damage. * * @name CTakeDamageInfo:GetAmmoType * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/GetAmmoType * @param {CTakeDamageInfo} this - no description * @returns {number} - Ammo type ID **/ GetAmmoType(this: CTakeDamageInfo): number /** * * Increases the damage by damageIncrease. * * @name CTakeDamageInfo:AddDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/CTakeDamageInfo/AddDamage * @param {CTakeDamageInfo} this - no description * @param {number} damageIncrease - The damage to add. * @returns {void} **/ AddDamage(this: CTakeDamageInfo, damageIncrease: number): void } declare interface CSoundPatch { /** * * Stops the sound from being played. * * @name CSoundPatch:Stop * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/Stop * @bug #3260 This will not work if the entity attached to this sound patch (specified by @CreateSound function) is invalid. * @param {CSoundPatch} this - no description * @returns {void} **/ Stop(this: CSoundPatch): void /** * * Sets the DSP (Digital Signal Processor) effect for the sound. Similar to @Player:SetDSP but for individual sounds. * * @name CSoundPatch:SetDSP * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/SetDSP * @bug #4086 This will only apply if the sound is not playing. * @param {CSoundPatch} this - no description * @param {number} dsp - The DSP effect to set. * Pick from the [list of DSP's](https://developer.valvesoftware.com/wiki/Dsp_presets) * @returns {void} **/ SetDSP(this: CSoundPatch, dsp: number): void /** * * Sets the sound level in decibel. * * @name CSoundPatch:SetSoundLevel * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/SetSoundLevel * @param {CSoundPatch} this - no description * @param {SNDLVL} level - The sound level in decibel. See @SNDLVL enum * @returns {void} **/ SetSoundLevel(this: CSoundPatch, level: SNDLVL): void /** * * Same as @CSoundPatch:Play but with 2 extra arguments allowing to set volume and pitch directly. * * @name CSoundPatch:PlayEx * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/PlayEx * @param {CSoundPatch} this - no description * @param {number} volume - The volume ranges from 0 to 1. * @param {number} pitch - The pitch can range from 0-255. * @returns {void} **/ PlayEx(this: CSoundPatch, volume: number, pitch: number): void /** * * Starts to play the sound. * * @name CSoundPatch:Play * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/Play * @param {CSoundPatch} this - no description * @returns {void} **/ Play(this: CSoundPatch): void /** * * Returns whenever the sound is being played. * * @name CSoundPatch:IsPlaying * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/IsPlaying * @param {CSoundPatch} this - no description * @returns {boolean} - Is playing or not **/ IsPlaying(this: CSoundPatch): boolean /** * * Returns the current volume. * * @name CSoundPatch:GetVolume * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/GetVolume * @param {CSoundPatch} this - no description * @returns {number} - The current volume, ranging from 0 to 1. **/ GetVolume(this: CSoundPatch): number /** * * Returns the current sound level. * * @name CSoundPatch:GetSoundLevel * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/GetSoundLevel * @param {CSoundPatch} this - no description * @returns {SNDLVL} - The current sound level, see @SNDLVL enum. **/ GetSoundLevel(this: CSoundPatch): SNDLVL /** * * Returns the current pitch. * * @name CSoundPatch:GetPitch * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/GetPitch * @param {CSoundPatch} this - no description * @returns {number} - The current pitch, can range from 0-255. **/ GetPitch(this: CSoundPatch): number /** * * Returns the DSP ( Digital Signal Processor ) effect for the sound. * * @name CSoundPatch:GetDSP * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/GetDSP * @param {CSoundPatch} this - no description * @returns {number} - The DSP effects of the sound * List of DSP's are Pick from the [here](https://developer.valvesoftware.com/wiki/Dsp_presets). **/ GetDSP(this: CSoundPatch): number /** * * Fades out the volume of the sound from the current volume to 0 in the given amount of seconds. * * @name CSoundPatch:FadeOut * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/FadeOut * @param {CSoundPatch} this - no description * @param {number} seconds - Fade time. * @returns {void} **/ FadeOut(this: CSoundPatch, seconds: number): void /** * * Adjusts the volume of the sound played. * Appears to only work while the sound is being played. * * @name CSoundPatch:ChangeVolume * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/ChangeVolume * @param {CSoundPatch} this - no description * @param {number} volume - The volume ranges from 0 to 1. * @param {number} deltaTime - Time to fade the volume from previous to new value from. * @returns {void} **/ ChangeVolume(this: CSoundPatch, volume: number, deltaTime?: number): void /** * * Adjust the pitch, alias the speed at which the sound is being played. * This invokes the @GamemodeHooks:EntityEmitSound. * * @name CSoundPatch:ChangePitch * @realm client, server * @wiki https://wiki.garrysmod.com/page/CSoundPatch/ChangePitch * @param {CSoundPatch} this - no description * @param {number} pitch - The pitch can range from 0-255. * @param {number} deltaTime - The time to fade from previous to the new pitch. * @returns {void} **/ ChangePitch(this: CSoundPatch, pitch: number, deltaTime?: number): void } declare interface CSEnt { /** * * Removes the clientside entity * * @name CSEnt:Remove * @realm client * @wiki https://wiki.garrysmod.com/page/CSEnt/Remove * @param {CSEnt} this - no description * @returns {void} **/ Remove(this: CSEnt): void } declare interface CRecipientFilter { /** * * Removes all players that are not on the given team from the filter. * * @name CRecipientFilter:RemoveRecipientsNotOnTeam * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/RemoveRecipientsNotOnTeam * @param {CRecipientFilter} this - no description * @param {number} teamid - Team index. * @returns {void} **/ RemoveRecipientsNotOnTeam(this: CRecipientFilter, teamid: number): void /** * * Removes all players that are on the given team from the filter. * * @name CRecipientFilter:RemoveRecipientsByTeam * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/RemoveRecipientsByTeam * @param {CRecipientFilter} this - no description * @param {number} teamid - Team index to remove players from. * @returns {void} **/ RemoveRecipientsByTeam(this: CRecipientFilter, teamid: number): void /** * * Removes all players that can see this PVS from the recipient filter. * * @name CRecipientFilter:RemovePVS * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/RemovePVS * @param {CRecipientFilter} this - no description * @param {Vector} pos - Position that players may be able to see. * @returns {void} **/ RemovePVS(this: CRecipientFilter, pos: Vector): void /** * * Removes the player from the recipient filter. * * @name CRecipientFilter:RemovePlayer * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/RemovePlayer * @param {CRecipientFilter} this - no description * @param {Player} Player - The player that should be in the recipient filter if you call this function. * @returns {void} **/ RemovePlayer(this: CRecipientFilter, Player: Player): void /** * * Removes all players from the filter that are in Potentially Audible Set for given position. * * @name CRecipientFilter:RemovePAS * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/RemovePAS * @param {CRecipientFilter} this - no description * @param {Vector} position - The position to test * @returns {void} **/ RemovePAS(this: CRecipientFilter, position: Vector): void /** * * Removes all players from the recipient filter. * * @name CRecipientFilter:RemoveAllPlayers * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/RemoveAllPlayers * @param {CRecipientFilter} this - no description * @returns {void} **/ RemoveAllPlayers(this: CRecipientFilter): void /** * * Returns a table of all valid players currently in the recipient filter. * * @name CRecipientFilter:GetPlayers * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/GetPlayers * @param {CRecipientFilter} this - no description * @returns {table} - A table of all valid players currently in the recipient filter. **/ GetPlayers(this: CRecipientFilter): table /** * * Returns the number of valid players in the recipient filter. * * @name CRecipientFilter:GetCount * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/GetCount * @param {CRecipientFilter} this - no description * @returns {number} - Number of valid players in the recipient filter. **/ GetCount(this: CRecipientFilter): number /** * * Adds all players that are on the given team to the filter. * * @name CRecipientFilter:AddRecipientsByTeam * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/AddRecipientsByTeam * @param {CRecipientFilter} this - no description * @param {number} teamid - Team index to add players from. * @returns {void} **/ AddRecipientsByTeam(this: CRecipientFilter, teamid: number): void /** * * Adds all players that are in the same PVS as this position. * * @name CRecipientFilter:AddPVS * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/AddPVS * @param {CRecipientFilter} this - no description * @param {Vector} Position - PVS position. * @returns {void} **/ AddPVS(this: CRecipientFilter, Position: Vector): void /** * * Adds a player to the recipient filter * * @name CRecipientFilter:AddPlayer * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/AddPlayer * @param {CRecipientFilter} this - no description * @param {Player} Player - Player to add to the recipient filter. * @returns {void} **/ AddPlayer(this: CRecipientFilter, Player: Player): void /** * * Adds all players that are in the same PAS as this position. * * @name CRecipientFilter:AddPAS * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/AddPAS * @param {CRecipientFilter} this - no description * @param {Vector} pos - PAS position that players may be able to see. * @returns {void} **/ AddPAS(this: CRecipientFilter, pos: Vector): void /** * * Adds all players to the recipient filter. * * @name CRecipientFilter:AddAllPlayers * @realm server * @wiki https://wiki.garrysmod.com/page/CRecipientFilter/AddAllPlayers * @param {CRecipientFilter} this - no description * @returns {void} **/ AddAllPlayers(this: CRecipientFilter): void } declare interface ConVar { /** * * Sets a ConVar's value to the input string. This can only be ran on ConVars created from within Lua. * * @name ConVar:SetString * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/SetString * @param {ConVar} this - no description * @param {string} value - Value to set the ConVar to. * @returns {void} **/ SetString(this: ConVar, value: string): void /** * * Sets a ConVar's value to the input number after converting it to an integer. This can only be ran on ConVars created from within Lua. * * @name ConVar:SetInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/SetInt * @param {ConVar} this - no description * @param {number} value - Value to set the ConVar to. * @returns {void} **/ SetInt(this: ConVar, value: number): void /** * * Sets a ConVar's value to to the input number. This can only be ran on ConVars created from within Lua. * * @name ConVar:SetFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/SetFloat * @param {ConVar} this - no description * @param {number} value - Value to set the ConVar to. * @returns {void} **/ SetFloat(this: ConVar, value: number): void /** * * Sets a ConVar's value to 1 or 0 based on the input boolean. This can only be ran on ConVars created from within Lua. * * @name ConVar:SetBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/SetBool * @param {ConVar} this - no description * @param {boolean} value - Value to set the ConVar to. * @returns {void} **/ SetBool(this: ConVar, value: boolean): void /** * * Returns the current @ConVar type value as a string. * * @name ConVar:GetString * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/GetString * @param {ConVar} this - no description * @returns {string} - The current console variable value as a string. **/ GetString(this: ConVar): string /** * * Returns the name of the @ConVar type. * * @name ConVar:GetName * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/GetName * @param {ConVar} this - no description * @returns {string} - The name of the console variable. **/ GetName(this: ConVar): string /** * * Attempts to convert the @ConVar type value to a integer. * * @name ConVar:GetInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/GetInt * @param {ConVar} this - no description * @returns {number} - The integer value of the console variable. * If it fails to convert to an integer, it will return 0. * All float/decimal values will be rounded down. ( With @math.floor ) **/ GetInt(this: ConVar): number /** * * Returns the help text assigned to that convar. * * @name ConVar:GetHelpText * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/GetHelpText * @param {ConVar} this - no description * @returns {string} - The help text **/ GetHelpText(this: ConVar): string /** * * Attempts to convert the @ConVar type value to a float * * @name ConVar:GetFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/GetFloat * @param {ConVar} this - no description * @returns {number} - The float value of the console variable. * If the value cannot be converted to a float, it will return 0. **/ GetFloat(this: ConVar): number /** * * Returns the default value of the @ConVar type * * @name ConVar:GetDefault * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/GetDefault * @param {ConVar} this - no description * @returns {string} - The default value of the console variable. **/ GetDefault(this: ConVar): string /** * * Tries to convert the current string value of a @ConVar type to a boolean. * * @name ConVar:GetBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/ConVar/GetBool * @param {ConVar} this - no description * @returns {boolean} - The boolean value of the console variable. If the variable is numeric and not 0, the result will be true. Otherwise the result will be false. **/ GetBool(this: ConVar): boolean } declare interface ControlPresets extends Panel { /** * * Set the name label text. * * @name ControlPresets:SetLabel * @wiki https://wiki.garrysmod.com/page/ControlPresets/SetLabel * @param {ControlPresets} this - no description * @param {string} name - The text to put in the label * @returns {void} **/ SetLabel(this: ControlPresets, name: string): void /** * * Get a list of all Console Variables being managed by this panel. * * @name ControlPresets:GetConVars * @wiki https://wiki.garrysmod.com/page/ControlPresets/GetConVars * @param {ControlPresets} this - no description * @returns {table} - numbered table of convars **/ GetConVars(this: ControlPresets): table /** * * Adds a convar to be managed by this control. * * @name ControlPresets:AddConVar * @wiki https://wiki.garrysmod.com/page/ControlPresets/AddConVar * @param {ControlPresets} this - no description * @param {string} convar - The convar to add. * @returns {void} **/ AddConVar(this: ControlPresets, convar: string): void } declare interface ControlPanel extends DForm { /** * * Creates a @MatSelect type panel and adds it as an [item](https://wiki.garrysmod.com/page/ControlPanel/AddPanel). * * @name ControlPanel:MatSelect * @wiki https://wiki.garrysmod.com/page/ControlPanel/MatSelect * @param {ControlPanel} this - no description * @param {string} convar - Calls @MatSelect type:[SetConVar](https://wiki.garrysmod.com/page/ContextBase/SetConVar) with this value. * @param {table} options - If specified, calls @MatSelect:AddMaterial(key, value) for each table entry. If the table key is a number, the function will instead be called with the value as both arguments. * @param {boolean} autostretch - If specified, calls @MatSelect:SetAutoHeight with this value. * @param {number} width - If specified, calls @MatSelect:SetItemWidth with this value. * @param {number} height - If specified, calls @MatSelect:SetItemHeight with this value. * @returns {MatSelect} - The created MatSelect panel. **/ MatSelect(this: ControlPanel, convar: string, options?: table, autostretch?: boolean, width?: number, height?: number): MatSelect /** * * Returns this control panel. * * @name ControlPanel:GetEmbeddedPanel * @wiki https://wiki.garrysmod.com/page/ControlPanel/GetEmbeddedPanel * @param {ControlPanel} this - no description * @returns {ControlPanel} - The same control panel the function is being called on. **/ GetEmbeddedPanel(this: ControlPanel): ControlPanel /** * * Calls the given function with this panel as the only argument. Used by the spawnmenu to populate the control panel. * * @name ControlPanel:FillViaFunction * @wiki https://wiki.garrysmod.com/page/ControlPanel/FillViaFunction * @param {ControlPanel} this - no description * @param {ControlPanel} func - A function that takes one argument: * * @ControlPanel type panelToPopulate * @returns {void} **/ FillViaFunction(this: ControlPanel, func: ControlPanel): void /** * * Sets control values of the control panel. * * @name ControlPanel:ControlValues * @wiki https://wiki.garrysmod.com/page/ControlPanel/ControlValues * @param {ControlPanel} this - no description * @param {IControlPanelControlValuesData} data - A two-membered table: * @returns {void} **/ ControlValues(this: ControlPanel, data: IControlPanelControlValuesData): void /** * * Adds an item by calling @DForm:AddItem. * * @name ControlPanel:AddPanel * @wiki https://wiki.garrysmod.com/page/ControlPanel/AddPanel * @param {ControlPanel} this - no description * @param {Panel} panel - Panel to add as an item to the control panel. * @returns {void} **/ AddPanel(this: ControlPanel, panel: Panel): void /** * * Adds a control to the control panel. * * @name ControlPanel:AddControl * @wiki https://wiki.garrysmod.com/page/ControlPanel/AddControl * @param {ControlPanel} this - no description * @param {string} type - The control type to add. The complete list is: * * header * * textbox * * label * * checkbox/toggle * * slider * * propselect * * matselect * * ropematerial * * button * * numpad * * color * * combobox * * listbox * * materialgallery * @param {DListView[]} controlinfo - Each control takes their own table structure. You may search "AddControl" on GitHub for examples. * Here is a full list of each type and the table members it requires: * *header * **description * *textbox: * **label (def: "Untitled") * **command * *label: * **text * *checkbox, toggle (same thing): * **label (def: "Untitled") * **command * **help (boolean, if true assumes label is a language string ("#tool.toolname.stuff") and adds ".help" at the end) * *slider: * **type (optional string, if equals "float" then 2 digits after the decimal will be used, otherwise 0) * **label (def: "Untitled") * **command * **min (def: 0) * **max (def: 100) * *help (boolean, see above) * *propselect: * **(data goes directly to PropSelect's :ControlValues(data)) * *matselect: * **(data goes directly to MatSelect's :ControlValues(data)) * *ropematerial: * **convar (notice: NOT called command this time!) * *button: * **label / text (if label is missing will use text. Def: "No Label") * **command * *numpad: * **command * **command2 * **label * **label2 * *color: * **label * **red (convar) * **green (convar) * **blue (convar) * **alpha (convar) * *combobox: * **menubutton (if doesn't equal "1", becomes a listbox) * **folder * **options (optional, ha) * **cvars (optional) * *listbox: * **height (if set, becomes @DListView type, otherwise is @CtrlListBox type) * **label (def: "unknown") * **options (optional) * *materialgallery: * **width (def: 32) * **height (def: 32) * **rows (def: 4) * **convar * **options * @returns {void} **/ AddControl(this: ControlPanel, type: string, controlinfo?: DListView[]): void } declare interface ContextBase extends Panel { /** * * You should override this function and use it to check whether your convar value changed. * * @name ContextBase:TestForChanges * @wiki https://wiki.garrysmod.com/page/ContextBase/TestForChanges * @param {ContextBase} this - no description * @returns {void} **/ TestForChanges(this: ContextBase): void /** * * Sets the @ConVar type for the panel to change/handle. * * @name ContextBase:SetConVar * @wiki https://wiki.garrysmod.com/page/ContextBase/SetConVar * @param {ContextBase} this - no description * @param {string} cvar - The @ConVar type for the panel to change. * @returns {void} **/ SetConVar(this: ContextBase, cvar: string): void /** * * Returns the @ConVar type for the panel to change/handle, set by @ContextBase:SetConVar * * @name ContextBase:ConVar * @wiki https://wiki.garrysmod.com/page/ContextBase/ConVar * @param {ContextBase} this - no description * @returns {string} - The @ConVar type for the panel to change. **/ ConVar(this: ContextBase): string /** * * Called by spawnmenu functions (when creating a context menu) to fill this control with data. * * @name ContextBase:ControlValues * @wiki https://wiki.garrysmod.com/page/ContextBase/ControlValues * @param {ContextBase} this - no description * @param {IContextBaseControlValuesContextData} contextData - A two-membered table: * @returns {void} **/ ControlValues(this: ContextBase, contextData: IContextBaseControlValuesContextData): void } declare interface ContentIcon extends DButton { /** * * Sets the internal "name" for the content icon, usually a class name for an entity. * * @name ContentIcon:SetSpawnName * @wiki https://wiki.garrysmod.com/page/ContentIcon/SetSpawnName * @param {ContentIcon} this - no description * @param {string} name - Internal "name" to be used when user left clicks the icon. * @returns {void} **/ SetSpawnName(this: ContentIcon, name: string): void /** * * Sets a table of weapon classes for the content icon with "NPC" content type to be randomly chosen from when user tries to spawn the NPC. * * @name ContentIcon:SetNPCWeapon * @wiki https://wiki.garrysmod.com/page/ContentIcon/SetNPCWeapon * @param {ContentIcon} this - no description * @param {table} weapons - A table of weapon classes to be chosen from when user tries to spawn the NPC. * @returns {void} **/ SetNPCWeapon(this: ContentIcon, weapons: table): void /** * * Sets the tool tip and the "nice" name to be displayed by the content icon. * * @name ContentIcon:SetName * @wiki https://wiki.garrysmod.com/page/ContentIcon/SetName * @param {ContentIcon} this - no description * @param {string} name - "Nice" name to display. * @returns {void} **/ SetName(this: ContentIcon, name: string): void /** * * Sets the material to be displayed as the content icon. * * @name ContentIcon:SetMaterial * @wiki https://wiki.garrysmod.com/page/ContentIcon/SetMaterial * @param {ContentIcon} this - no description * @param {string} path - Path to the icon to use. * @returns {void} **/ SetMaterial(this: ContentIcon, path: string): void /** * * Sets the content type used to save and restore the content icon in a spawnlist. * * @name ContentIcon:SetContentType * @wiki https://wiki.garrysmod.com/page/ContentIcon/SetContentType * @param {ContentIcon} this - no description * @param {string} type - The content type, for example "entity" or "weapon" * @returns {void} **/ SetContentType(this: ContentIcon, type: string): void /** * * Sets the color for the content icon. Currently is not used by the content icon panel. * * @name ContentIcon:SetColor * @wiki https://wiki.garrysmod.com/page/ContentIcon/SetColor * @param {ContentIcon} this - no description * @param {IColor} clr - The color to set. See @IColor structure * @returns {void} **/ SetColor(this: ContentIcon, clr: IColor): void /** * * Sets whether the content item is admin only. This makes the icon to display a admin icon in the top left corner of the icon. * * @name ContentIcon:SetAdminOnly * @wiki https://wiki.garrysmod.com/page/ContentIcon/SetAdminOnly * @param {ContentIcon} this - no description * @param {boolean} adminOnly - Whether this content should be admin only or not * @returns {void} **/ SetAdminOnly(this: ContentIcon, adminOnly: boolean): void /** * * A hook for override, by default does nothing. Called when user right clicks on the content icon, you are supposed to open a @DermaMenu function here with additional options. * * @name ContentIcon:OpenMenu * @wiki https://wiki.garrysmod.com/page/ContentIcon/OpenMenu * @param {ContentIcon} this - no description * @returns {void} **/ OpenMenu(this: ContentIcon): void /** * * Returns the internal "name" for the content icon, usually a class name for an entity. * * @name ContentIcon:GetSpawnName * @wiki https://wiki.garrysmod.com/page/ContentIcon/GetSpawnName * @param {ContentIcon} this - no description * @returns {string} - Internal "name" to be used when user left clicks the icon. **/ GetSpawnName(this: ContentIcon): string /** * * Returns a table of weapon classes for the content icon with "NPC" content type to be randomly chosen from when user tries to spawn the NPC. * * @name ContentIcon:GetNPCWeapon * @wiki https://wiki.garrysmod.com/page/ContentIcon/GetNPCWeapon * @param {ContentIcon} this - no description * @returns {table} - A table of weapon classes to be chosen from when user tries to spawn the NPC. **/ GetNPCWeapon(this: ContentIcon): table /** * * Returns the content type used to save and restore the content icon in a spawnlist. * * @name ContentIcon:GetContentType * @wiki https://wiki.garrysmod.com/page/ContentIcon/GetContentType * @param {ContentIcon} this - no description * @returns {string} - The content type, for example "entity" or "weapon". **/ GetContentType(this: ContentIcon): string /** * * Returns the color set by @ContentIcon:SetColor * * @name ContentIcon:GetColor * @wiki https://wiki.garrysmod.com/page/ContentIcon/GetColor * @param {ContentIcon} this - no description * @returns {IColor} - See @IColor structure **/ GetColor(this: ContentIcon): IColor } declare interface ColorFuncs { /** * * Returns the red, green, blue, and alpha of the color. * * @name ColorFuncs:Unpack * @realm client, server * @wiki https://wiki.garrysmod.com/page/Color/Unpack * @param {ColorFuncs} this - no description * @returns {number} - Red * @returns {number} - Green * @returns {number} - Blue * @returns {number} - Alpha * @tupleReturn **/ Unpack(this: ColorFuncs): [number, number, number, number] /** * * Translates the @IColor structure into a @Vector type, losing the alpha channel. * This will also range the values from 0 - 255 to 0 - 1 * r / 255 -> x * g / 255 -> y * b / 255 -> z * This is the opposite of @VectorFuncs:ToColor * * @name ColorFuncs:ToVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/Color/ToVector * @param {ColorFuncs} this - no description * @returns {Vector} - The created @Vector type **/ ToVector(this: ColorFuncs): Vector /** * * Returns the color as a table with four elements. * * @name ColorFuncs:ToTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Color/ToTable * @param {ColorFuncs} this - no description * @returns {table} - The table with elements 1 = r, 2 = g, 3 = b, 4 = a. **/ ToTable(this: ColorFuncs): table /** * * Converts a @IColor structure into HSV color space. This calls @ColorToHSV function internally. * * @name ColorFuncs:ToHSV * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Color/ToHSV * @param {ColorFuncs} this - no description * @returns {number} - The hue in degrees [0, 360). * @returns {number} - The saturation in range [0, 1]. * @returns {number} - The value in range [0, 1]. * @tupleReturn **/ ToHSV(this: ColorFuncs): [number, number, number] /** * * Converts a @IColor structure into HSL color space. This calls @ColorToHSL function internally. * * @name ColorFuncs:ToHSL * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/Color/ToHSL * @param {ColorFuncs} this - no description * @returns {number} - The hue in degrees [0, 360). * @returns {number} - The saturation in the range [0, 1]. * @returns {number} - The lightness in the range [0, 1]. * @tupleReturn **/ ToHSL(this: ColorFuncs): [number, number, number] /** * * Sets the red, green, blue, and alpha of the color. * * @name ColorFuncs:SetUnpacked * @realm client, server * @wiki https://wiki.garrysmod.com/page/Color/SetUnpacked * @param {ColorFuncs} this - no description * @param {number} r - The red component * @param {number} g - The green component * @param {number} b - The blue component * @param {number} a - The alpha component * @returns {void} **/ SetUnpacked(this: ColorFuncs, r: number, g: number, b: number, a: number): void } declare interface CNewParticleEffect { /** * * Stops particle emission and destroys all particles instantly. Also detaches the particle effect from the entity it was attached to. * Consider using @CNewParticleEffect:StopEmission( false, true ) instead, which has same effect, but doesn't require owner entity, and does't detach the particle system from its entity. * * @name CNewParticleEffect:StopEmissionAndDestroyImmediately * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/StopEmissionAndDestroyImmediately * @note This function will work identically to @CNewParticleEffect:StopEmission( false, true ) if @CNewParticleEffect:GetOwner entity is not valid. * @param {CNewParticleEffect} this - no description * @returns {void} **/ StopEmissionAndDestroyImmediately(this: CNewParticleEffect): void /** * * Stops the particle emission. * * @name CNewParticleEffect:StopEmission * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/StopEmission * @param {CNewParticleEffect} this - no description * @param {boolean} infiniteOnly - no description * @param {boolean} removeAllParticles - no description * @param {boolean} wakeOnStop - no description * @returns {void} **/ StopEmission(this: CNewParticleEffect, infiniteOnly?: boolean, removeAllParticles?: boolean, wakeOnStop?: boolean): void /** * * Starts the particle emission. * * @name CNewParticleEffect:StartEmission * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/StartEmission * @param {CNewParticleEffect} this - no description * @param {boolean} infiniteOnly - no description * @returns {void} **/ StartEmission(this: CNewParticleEffect, infiniteOnly?: boolean): void /** * * Sets the sort origin for given particle system. This is used as a helper to determine which particles are in front of which. * * @name CNewParticleEffect:SetSortOrigin * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetSortOrigin * @param {CNewParticleEffect} this - no description * @param {Vector} origin - The new sort origin. * @returns {void} **/ SetSortOrigin(this: CNewParticleEffect, origin: Vector): void /** * * Forces the particle system to stop automatically rendering. * Used in conjunction with @CNewParticleEffect:Render. * * @name CNewParticleEffect:SetShouldDraw * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetShouldDraw * @param {CNewParticleEffect} this - no description * @param {boolean} should - Whether to automatically draw the particle effect or not. * @returns {void} **/ SetShouldDraw(this: CNewParticleEffect, should: boolean): void /** * @name CNewParticleEffect:SetIsViewModelEffect * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetIsViewModelEffect * @param {CNewParticleEffect} this - no description * @param {boolean} isViewModel - no description * @returns {void} **/ SetIsViewModelEffect(this: CNewParticleEffect, isViewModel: boolean): void /** * * Sets the upward direction for given control point. * * @name CNewParticleEffect:SetControlPointUpVector * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetControlPointUpVector * @param {CNewParticleEffect} this - no description * @param {number} cpID - The control point ID, 0 to 63. * @param {Vector} upward - The upward direction for given control point * @returns {void} **/ SetControlPointUpVector(this: CNewParticleEffect, cpID: number, upward: Vector): void /** * * Essentially makes child control point follow the parent control point. * * @name CNewParticleEffect:SetControlPointParent * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetControlPointParent * @param {CNewParticleEffect} this - no description * @param {number} child - The child control point ID, 0 to 63. * @param {number} parent - The parent control point ID, 0 to 63. * @returns {void} **/ SetControlPointParent(this: CNewParticleEffect, child: number, parent: number): void /** * * Sets the right direction for given control point. * * @name CNewParticleEffect:SetControlPointRightVector * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetControlPointRightVector * @param {CNewParticleEffect} this - no description * @param {number} cpID - The control point ID, 0 to 63. * @param {Vector} right - The right direction for given control point. * @returns {void} **/ SetControlPointRightVector(this: CNewParticleEffect, cpID: number, right: Vector): void /** * * Sets the orientation for given control point. * * @name CNewParticleEffect:SetControlPointOrientation * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetControlPointOrientation * @param {CNewParticleEffect} this - no description * @param {number} cpID - The control point ID, 0 to 63. * @param {Vector} forward - The forward direction for given control point * @param {Vector} right - The right direction for given control point * @param {Vector} up - The up direction for given control point * @returns {void} **/ SetControlPointOrientation(this: CNewParticleEffect, cpID: number, forward: Vector, right: Vector, up: Vector): void /** * * Sets the forward direction for given control point. * * @name CNewParticleEffect:SetControlPointForwardVector * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetControlPointForwardVector * @param {CNewParticleEffect} this - no description * @param {number} cpID - The control point ID, 0 to 63. * @param {Vector} forward - The forward direction for given control point * @returns {void} **/ SetControlPointForwardVector(this: CNewParticleEffect, cpID: number, forward: Vector): void /** * * Essentially makes child control point follow the parent entity. * * @name CNewParticleEffect:SetControlPointEntity * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetControlPointEntity * @param {CNewParticleEffect} this - no description * @param {number} child - The child control point ID, 0 to 63. * @param {Entity} parent - The parent entity to follow. * @returns {void} **/ SetControlPointEntity(this: CNewParticleEffect, child: number, parent: Entity): void /** * * Sets a value for given control point. * * @name CNewParticleEffect:SetControlPoint * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/SetControlPoint * @param {CNewParticleEffect} this - no description * @param {number} cpID - The control point ID, 0 to 63. * @param {Vector} value - The value to set for given control point. * @returns {void} **/ SetControlPoint(this: CNewParticleEffect, cpID: number, value: Vector): void /** * * Forces the particle system to restart emitting particles. * * @name CNewParticleEffect:Restart * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/Restart * @param {CNewParticleEffect} this - no description * @returns {void} **/ Restart(this: CNewParticleEffect): void /** * * Forces the particle system to render using current rendering context. * Can be used to render the particle system in vgui panels, etc. * Used in conjunction with @CNewParticleEffect:SetShouldDraw. * * @name CNewParticleEffect:Render * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/Render * @param {CNewParticleEffect} this - no description * @returns {void} **/ Render(this: CNewParticleEffect): void /** * * Returns whether the particle system is valid or not. * * @name CNewParticleEffect:IsValid * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/IsValid * @param {CNewParticleEffect} this - no description * @returns {boolean} - Whether the particle system is valid or not. **/ IsValid(this: CNewParticleEffect): boolean /** * * Returns whether the particle system is intended to be used on a view model? * * @name CNewParticleEffect:IsViewModelEffect * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/IsViewModelEffect * @param {CNewParticleEffect} this - no description * @returns {boolean} - no description **/ IsViewModelEffect(this: CNewParticleEffect): boolean /** * * Returns whether the particle system has finished emitting particles or not. * * @name CNewParticleEffect:IsFinished * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/IsFinished * @param {CNewParticleEffect} this - no description * @returns {boolean} - Whether the particle system has finished emitting particles or not. **/ IsFinished(this: CNewParticleEffect): boolean /** * * Returns the owner of the particle system, the entity the particle system is attached to. * * @name CNewParticleEffect:GetOwner * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/GetOwner * @param {CNewParticleEffect} this - no description * @returns {Entity} - The owner of the particle system. **/ GetOwner(this: CNewParticleEffect): Entity /** * * Returns the highest control point number for given particle system. * * @name CNewParticleEffect:GetHighestControlPoint * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/GetHighestControlPoint * @param {CNewParticleEffect} this - no description * @returns {boolean} - The highest control point number for given particle system, 0 to 63. **/ GetHighestControlPoint(this: CNewParticleEffect): boolean /** * * Returns the name of the particle effect this system is set to emit. * * @name CNewParticleEffect:GetEffectName * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/GetEffectName * @param {CNewParticleEffect} this - no description * @returns {string} - The name of the particle effect. **/ GetEffectName(this: CNewParticleEffect): string /** * @name CNewParticleEffect:GetAutoUpdateBBox * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/GetAutoUpdateBBox * @param {CNewParticleEffect} this - no description * @returns {boolean} - no description **/ GetAutoUpdateBBox(this: CNewParticleEffect): boolean /** * * Adds a control point to the particle system. * * @name CNewParticleEffect:AddControlPoint * @realm client * @wiki https://wiki.garrysmod.com/page/CNewParticleEffect/AddControlPoint * @note This function will not work if the @CNewParticleEffect:GetOwner entity is not valid * @param {CNewParticleEffect} this - no description * @param {number} cpID - The control point ID, 0 to 63. * @param {Entity} ent - The entity to attach the control point to. * @param {PATTACH} partAttachment - See @PATTACH enum. * @param {number} entAttachment - The attachment ID on the entity to attach the particle system to * @param {Vector} offset - The offset from the @EntityFuncs:GetPos of the entity we are attaching this CP to. * @returns {void} **/ AddControlPoint(this: CNewParticleEffect, cpID: number, ent: Entity, partAttachment: PATTACH, entAttachment?: number, offset?: Vector): void } declare interface CNavLadder { /** * * Sets the top right area of the @CNavLadder type. * * @name CNavLadder:SetTopRightArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/SetTopRightArea * @param {CNavLadder} this - no description * @param {CNavArea} area - no description * @returns {void} **/ SetTopRightArea(this: CNavLadder, area: CNavArea): void /** * * Sets the top left area of the @CNavLadder type. * * @name CNavLadder:SetTopLeftArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/SetTopLeftArea * @param {CNavLadder} this - no description * @param {CNavArea} area - no description * @returns {void} **/ SetTopLeftArea(this: CNavLadder, area: CNavArea): void /** * * Sets the top forward area of the @CNavLadder type. * * @name CNavLadder:SetTopForwardArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/SetTopForwardArea * @param {CNavLadder} this - no description * @param {CNavArea} area - no description * @returns {void} **/ SetTopForwardArea(this: CNavLadder, area: CNavArea): void /** * * Sets the top behind area of the @CNavLadder type. * * @name CNavLadder:SetTopBehindArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/SetTopBehindArea * @param {CNavLadder} this - no description * @param {CNavArea} area - no description * @returns {void} **/ SetTopBehindArea(this: CNavLadder, area: CNavArea): void /** * * Removes the given nav ladder. * * @name CNavLadder:Remove * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/Remove * @param {CNavLadder} this - no description * @returns {void} **/ Remove(this: CNavLadder): void /** * * Sets the bottom area of the @CNavLadder type. * * @name CNavLadder:SetBottomArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/SetBottomArea * @param {CNavLadder} this - no description * @param {CNavArea} area - no description * @returns {void} **/ SetBottomArea(this: CNavLadder, area: CNavArea): void /** * * Returns whether this @CNavLadder type is valid or not. * * @name CNavLadder:IsValid * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/IsValid * @param {CNavLadder} this - no description * @returns {boolean} - Whether this @CNavLadder type is valid or not. **/ IsValid(this: CNavLadder): boolean /** * * Returns whether this @CNavLadder type has an outgoing ( one or two way ) connection **to** given @CNavArea type in given direction. * * @name CNavLadder:IsConnectedAtSide * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/IsConnectedAtSide * @param {CNavLadder} this - no description * @param {CNavArea} navArea - The @CNavArea type to test against. * @param {NavDir} navDirType - The direction, in which to look for the connection. See @NavDir enum * @returns {boolean} - Whether this @CNavLadder type has an outgoing ( one or two way ) connection **to** given @CNavArea type in given direction. **/ IsConnectedAtSide(this: CNavLadder, navArea: CNavArea, navDirType: NavDir): boolean /** * * Returns the width of the ladder in Hammer Units. * * @name CNavLadder:GetWidth * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetWidth * @param {CNavLadder} this - no description * @returns {number} - The width of the ladder in Hammer Units. **/ GetWidth(this: CNavLadder): number /** * * Returns the top right @CNavArea type of the @CNavLadder type. * * @name CNavLadder:GetTopRightArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetTopRightArea * @param {CNavLadder} this - no description * @returns {CNavArea | CNavLadder} - The top right @CNavArea type of the @CNavLadder type. **/ GetTopRightArea(this: CNavLadder): CNavArea | CNavLadder /** * * Returns the top left @CNavArea type of the @CNavLadder type. * * @name CNavLadder:GetTopLeftArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetTopLeftArea * @param {CNavLadder} this - no description * @returns {CNavArea | CNavLadder} - The top left @CNavArea type of the @CNavLadder type. **/ GetTopLeftArea(this: CNavLadder): CNavArea | CNavLadder /** * * Returns the top forward @CNavArea type of the @CNavLadder type. * * @name CNavLadder:GetTopForwardArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetTopForwardArea * @param {CNavLadder} this - no description * @returns {CNavArea | CNavLadder} - The top forward @CNavArea type of the @CNavLadder type. **/ GetTopForwardArea(this: CNavLadder): CNavArea | CNavLadder /** * * Returns the top behind @CNavArea type of the @CNavLadder type. * * @name CNavLadder:GetTopBehindArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetTopBehindArea * @param {CNavLadder} this - no description * @returns {CNavArea | CNavLadder} - The top behind @CNavArea type of the @CNavLadder type. **/ GetTopBehindArea(this: CNavLadder): CNavArea | CNavLadder /** * * Returns the topmost position of the ladder. * * @name CNavLadder:GetTop * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetTop * @param {CNavLadder} this - no description * @returns {Vector} - The topmost position of the ladder. **/ GetTop(this: CNavLadder): Vector /** * * Returns the world position based on given height relative to the ladder. * * @name CNavLadder:GetPosAtHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetPosAtHeight * @param {CNavLadder} this - no description * @param {number} height - The Z position in world space coordinates. * @returns {Vector} - The closest point on the ladder to that height. **/ GetPosAtHeight(this: CNavLadder, height: number): Vector /** * * Returns the direction of this @CNavLadder type. ( The direction in which players back will be facing if they are looking directly at the ladder ) * * @name CNavLadder:GetNormal * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetNormal * @param {CNavLadder} this - no description * @returns {CNavLadder} - The direction of this @CNavLadder type. **/ GetNormal(this: CNavLadder): CNavLadder /** * * Returns the length of the ladder. * * @name CNavLadder:GetLength * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetLength * @param {CNavLadder} this - no description * @returns {number} - The length of the ladder. **/ GetLength(this: CNavLadder): number /** * * Returns this @CNavLadder types unique ID. * * @name CNavLadder:GetID * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetID * @param {CNavLadder} this - no description * @returns {number} - The unique ID. **/ GetID(this: CNavLadder): number /** * * Returns the bottom area of the @CNavLadder type. * * @name CNavLadder:GetBottomArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetBottomArea * @param {CNavLadder} this - no description * @returns {CNavArea} - no description **/ GetBottomArea(this: CNavLadder): CNavArea /** * * Returns the bottom most position of the ladder. * * @name CNavLadder:GetBottom * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/GetBottom * @param {CNavLadder} this - no description * @returns {Vector} - The bottom most position of the ladder. **/ GetBottom(this: CNavLadder): Vector /** * * Disconnects this ladder from given area in a single direction. * * @name CNavLadder:Disconnect * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/Disconnect * @param {CNavLadder} this - no description * @param {CNavArea} area - The @CNavArea type this to disconnect from. * @returns {void} **/ Disconnect(this: CNavLadder, area: CNavArea): void /** * * Connects this ladder to a @CNavArea type with a one way connection. ( From this ladder to the target area ). * See @CNavArea:ConnectTo for making the connection from area to ladder. * * @name CNavLadder:ConnectTo * @realm server * @wiki https://wiki.garrysmod.com/page/CNavLadder/ConnectTo * @param {CNavLadder} this - no description * @param {CNavArea} area - The area this ladder leads to. * @returns {void} **/ ConnectTo(this: CNavLadder, area: CNavArea): void } declare interface CNavArea { /** * * Moves this open list to appropriate position based on its @CNavArea:GetTotalCost compared to the total cost of other areas in the open list. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:UpdateOnOpenList * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/UpdateOnOpenList * @param {CNavArea} this - no description * @returns {void} **/ UpdateOnOpenList(this: CNavArea): void /** * * Sets the total cost when passing from starting area to the goal area through this node. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:SetTotalCost * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/SetTotalCost * @param {CNavArea} this - no description * @param {number} cost - The total cost of the path to set. * Must be above or equal 0. * @returns {void} **/ SetTotalCost(this: CNavArea, cost: number): void /** * * Sets the Place of the nav area. * There is a limit of 256 Places per nav file. * * @name CNavArea:SetPlace * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/SetPlace * @param {CNavArea} this - no description * @param {string} place - Set to "" to remove place from the nav area. * @returns {boolean} - Returns true of operation succeeded, false otherwise. **/ SetPlace(this: CNavArea, place: string): boolean /** * * Sets the new parent of this @CNavArea type. * * @name CNavArea:SetParent * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/SetParent * @param {CNavArea} this - no description * @param {CNavArea} parent - The new parent to set * @returns {void} **/ SetParent(this: CNavArea, parent: CNavArea): void /** * * Sets the cost from starting area this area when pathfinding. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:SetCostSoFar * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/SetCostSoFar * @param {CNavArea} this - no description * @param {number} cost - The cost so far * @returns {void} **/ SetCostSoFar(this: CNavArea, cost: number): void /** * * Sets the position of a corner of a nav area. * * @name CNavArea:SetCorner * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/SetCorner * @param {CNavArea} this - no description * @param {NavCorner} corner - The corner to set, uses @NavCorner enum * @param {Vector} position - The new position to set. * @returns {void} **/ SetCorner(this: CNavArea, corner: NavCorner, position: Vector): void /** * * Sets the attributes for given CNavArea. * * @name CNavArea:SetAttributes * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/SetAttributes * @param {CNavArea} this - no description * @param {NAV_MESH} attribs - The attribute bitflag. See @NAV_MESH enum * @returns {void} **/ SetAttributes(this: CNavArea, attribs: NAV_MESH): void /** * * Removes this node from the Closed List. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:RemoveFromClosedList * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/RemoveFromClosedList * @param {CNavArea} this - no description * @returns {void} **/ RemoveFromClosedList(this: CNavArea): void /** * * Removes the given nav area. * * @name CNavArea:Remove * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/Remove * @param {CNavArea} this - no description * @returns {void} **/ Remove(this: CNavArea): void /** * * Removes a CNavArea from the Open List with the lowest cost to traverse to from the starting node, and returns it. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:PopOpenList * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/PopOpenList * @param {CNavArea} this - no description * @returns {CNavArea} - The CNavArea from the Open List with the lowest cost to traverse to from the starting node. **/ PopOpenList(this: CNavArea): CNavArea /** * * Drops a corner or all corners of a @CNavArea type to the ground below it. * * @name CNavArea:PlaceOnGround * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/PlaceOnGround * @param {CNavArea} this - no description * @param {NavCorner} corner - The corner(s) to drop, uses @NavCorner enum * @returns {void} **/ PlaceOnGround(this: CNavArea, corner: NavCorner): void /** * * Returns whether we can be seen from the given position. * * @name CNavArea:IsVisible * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsVisible * @param {CNavArea} this - no description * @param {Vector} pos - The position to check. * @returns {boolean} - Whether we can be seen or not. * @returns {Vector} - If we can be seen, this is returned with either the center or one of the corners of the Nav Area. * @tupleReturn **/ IsVisible(this: CNavArea, pos: Vector): [boolean, Vector] /** * * Returns whether this @CNavArea type is valid or not. * * @name CNavArea:IsValid * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsValid * @param {CNavArea} this - no description * @returns {boolean} - Whether this @CNavArea type is valid or not. **/ IsValid(this: CNavArea): boolean /** * * Whether this Nav Area is placed underwater. * * @name CNavArea:IsUnderwater * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsUnderwater * @param {CNavArea} this - no description * @returns {boolean} - Whether we're underwater or not. **/ IsUnderwater(this: CNavArea): boolean /** * * Returns if we're shaped like a square. * * @name CNavArea:IsRoughlySquare * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsRoughlySquare * @param {CNavArea} this - no description * @returns {boolean} - If we're a square or not. **/ IsRoughlySquare(this: CNavArea): boolean /** * * Returns true if this @CNavArea type is overlapping the given @CNavArea type. * * @name CNavArea:IsOverlappingArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsOverlappingArea * @param {CNavArea} this - no description * @param {CNavArea} navArea - The @CNavArea type to test against. * @returns {boolean} - True if the given @CNavArea type overlaps this @CNavArea type at any point. **/ IsOverlappingArea(this: CNavArea, navArea: CNavArea): boolean /** * * Returns if this position overlaps the Nav Area within the given tolerance. * * @name CNavArea:IsOverlapping * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsOverlapping * @param {CNavArea} this - no description * @param {Vector} pos - The overlapping position to test. * @param {number} tolerance - The tolerance of the overlapping, set to 0 for no tolerance. * @returns {boolean} - Whether the given position overlaps the Nav Area or not. **/ IsOverlapping(this: CNavArea, pos: Vector, tolerance?: number): boolean /** * * Returns whether the Open List is empty or not. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:IsOpenListEmpty * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsOpenListEmpty * @param {CNavArea} this - no description * @returns {boolean} - Whether the Open List is empty or not. **/ IsOpenListEmpty(this: CNavArea): boolean /** * * Returns whether this area is in the Open List. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:IsOpen * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsOpen * @param {CNavArea} this - no description * @returns {boolean} - Whether this area is in the Open List. **/ IsOpen(this: CNavArea): boolean /** * * Returns whether this Nav Area is flat within the tolerance of the **nav_coplanar_slope_limit_displacement** and **nav_coplanar_slope_limit** convars. * * @name CNavArea:IsFlat * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsFlat * @param {CNavArea} this - no description * @returns {boolean} - Whether this CNavArea is mostly flat. **/ IsFlat(this: CNavArea): boolean /** * * Returns whether this Nav Area is in the same plane as the given one. * * @name CNavArea:IsCoplanar * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsCoplanar * @param {CNavArea} this - no description * @param {CNavArea} navArea - The Nav Area to test. * @returns {boolean} - Whether we're coplanar or not. **/ IsCoplanar(this: CNavArea, navArea: CNavArea): boolean /** * * Returns whether this @CNavArea type has an outgoing ( one or two way ) connection **to** given @CNavArea type in given direction. * See @CNavArea:IsConnected for a function that checks all sides. * * @name CNavArea:IsConnectedAtSide * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsConnectedAtSide * @param {CNavArea} this - no description * @param {CNavArea} navArea - The @CNavArea type to test against. * @param {NavDir} navDirType - The direction, in which to look for the connection. See @NavDir enum * @returns {boolean} - Whether this @CNavArea type has an outgoing ( one or two way ) connection **to** given @CNavArea type in given direction. **/ IsConnectedAtSide(this: CNavArea, navArea: CNavArea, navDirType: NavDir): boolean /** * * Returns whether this @CNavArea type has an outgoing ( one or two way ) connection **to** given @CNavArea type. * See @CNavArea:IsConnectedAtSide for a function that only checks for outgoing connections in one direction. * * @name CNavArea:IsConnected * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsConnected * @param {CNavArea} this - no description * @param {CNavArea} navArea - The @CNavArea type to test against. * @returns {boolean} - Whether this @CNavArea type has an outgoing ( one or two way ) connection **to** given @CNavArea type. **/ IsConnected(this: CNavArea, navArea: CNavArea): boolean /** * * Returns whether the nav area is blocked or not, i.e. whether it can be walked through or not. * * @name CNavArea:IsBlocked * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsBlocked * @param {CNavArea} this - no description * @param {number} teamID - The team ID to test, -2 = any team. * Only 2 actual teams are available, 0 and 1. * @param {boolean} ignoreNavBlockers - Whether to ignore [func_nav_blocker](https://developer.valvesoftware.com/wiki/Func_nav_blocker) entities. * @returns {boolean} - Whether the area is blocked or not **/ IsBlocked(this: CNavArea, teamID?: number, ignoreNavBlockers?: boolean): boolean /** * * Returns whether this node is in the Closed List. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:IsClosed * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/IsClosed * @param {CNavArea} this - no description * @returns {boolean} - Whether this node is in the Closed List. **/ IsClosed(this: CNavArea): boolean /** * * Returns true if the given @CNavArea type has this attribute flag set. * * @name CNavArea:HasAttributes * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/HasAttributes * @param {CNavArea} this - no description * @param {NAV_MESH} attribs - Attribute mask to check for, see @NAV_MESH enum * @returns {boolean} - True if the @CNavArea type matches the given mask. False otherwise. **/ HasAttributes(this: CNavArea, attribs: NAV_MESH): boolean /** * * Returns the elevation of this Nav Area at the given position. * * @name CNavArea:GetZ * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetZ * @param {CNavArea} this - no description * @param {Vector} pos - The position to get the elevation from, the z value from this position is ignored and only the X and Y values are used to this task. * @returns {number} - The elevation. **/ GetZ(this: CNavArea, pos: Vector): number /** * * Returns the total cost when passing from starting area to the goal area through this node. Set by @CNavArea:SetTotalCost. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:GetTotalCost * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetTotalCost * @param {CNavArea} this - no description * @returns {number} - The total cost **/ GetTotalCost(this: CNavArea): number /** * * Returns the height of this Nav Area. * * @name CNavArea:GetSizeY * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetSizeY * @param {CNavArea} this - no description * @returns {number} - no description **/ GetSizeY(this: CNavArea): number /** * * Returns the width this Nav Area. * * @name CNavArea:GetSizeX * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetSizeX * @param {CNavArea} this - no description * @returns {number} - no description **/ GetSizeX(this: CNavArea): number /** * * Returns a random point on the nav area. * * @name CNavArea:GetRandomPoint * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetRandomPoint * @param {CNavArea} this - no description * @returns {Vector} - The random point on the nav area. **/ GetRandomPoint(this: CNavArea): Vector /** * * Returns a random @CNavArea type that has an outgoing ( one or two way ) connection **from** this @CNavArea type in given direction. * * @name CNavArea:GetRandomAdjacentAreaAtSide * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetRandomAdjacentAreaAtSide * @param {CNavArea} this - no description * @param {NavDir} navDir - The direction, in which to look for @CNavArea types, see @NavDir enum. * @returns {CNavArea | CNavArea} - The random @CNavArea type that has an outgoing ( one or two way ) connection **from** this @CNavArea type in given direction, if any. **/ GetRandomAdjacentAreaAtSide(this: CNavArea, navDir: NavDir): CNavArea | CNavArea /** * * Returns the Place of the nav area. * * @name CNavArea:GetPlace * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetPlace * @param {CNavArea} this - no description * @returns {string} - The place of the nav area, or no value if it doesn't have a place set. **/ GetPlace(this: CNavArea): string /** * * Returns how this @CNavArea type is connected to its parent. * * @name CNavArea:GetParentHow * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetParentHow * @param {CNavArea} this - no description * @returns {NavTraverseType} - See @NavTraverseType enum **/ GetParentHow(this: CNavArea): NavTraverseType /** * * Returns the parent @CNavArea type * * @name CNavArea:GetParent * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetParent * @param {CNavArea} this - no description * @returns {CNavArea} - The parent @CNavArea type **/ GetParent(this: CNavArea): CNavArea /** * * Returns all @CNavLadder types that have a ( one or two way ) connection **from** ( one and two way ) this @CNavArea type in given direction. * See @CNavArea:GetLadders for a function that returns @CNavLadder type from/in all sides/directions. * * @name CNavArea:GetLaddersAtSide * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetLaddersAtSide * @param {CNavArea} this - no description * @param {number} navDir - The direction, in which to look for @CNavLadder types. * 0 = Up ( LadderDirectionType::LADDER_UP ) * 1 = Down ( LadderDirectionType::LADDER_DOWN ) * @returns {table} - The @CNavLadder types that have a ( one or two way ) connection **from** this @CNavArea type in given direction. **/ GetLaddersAtSide(this: CNavArea, navDir: number): table /** * * Returns all @CNavLadder types that have a ( one or two way ) connection **from** this @CNavArea type. * See @CNavArea:GetLaddersAtSide for a function that only returns @CNavLadder types in given direction. * * @name CNavArea:GetLadders * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetLadders * @param {CNavArea} this - no description * @returns {table} - The @CNavLadder types that have a ( one or two way ) connection **from** this @CNavArea type. **/ GetLadders(this: CNavArea): table /** * * Returns a table of all the @CNavArea types that have a one-way connection **to** this @CNavArea type from given direction. * If a @CNavArea type has a two-way connection **to or from** this @CNavArea type then it will not be returned from this function, use @CNavArea:GetAdjacentAreas to get outgoing ( one and two way ) connections. * See @CNavArea:GetIncomingConnections for a function that returns one-way incoming connections from all sides/directions. * * @name CNavArea:GetIncomingConnectionsAtSide * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetIncomingConnectionsAtSide * @param {CNavArea} this - no description * @param {NavDir} navDir - The direction, from which to look for @CNavArea types, see @NavDir enum. * @returns {CNavArea[]} - A table of all @CNavArea types with one-way connection **to** this @CNavArea type from given direction.Returns an empty table if there are no one-way incoming connections **to** this @CNavArea type from given direction. **/ GetIncomingConnectionsAtSide(this: CNavArea, navDir: NavDir): CNavArea[] /** * * Returns a table of all the @CNavArea types that have a one-way connection **to** this @CNavArea type. * If a @CNavArea type has a two-way connection **to or from** this @CNavArea type then it will not be returned from this function, use @CNavArea:GetAdjacentAreas to get outgoing ( one and two way ) connections. * See @CNavArea:GetIncomingConnectionsAtSide for a function that returns one-way incoming connections from only one side/direction. * * @name CNavArea:GetIncomingConnections * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetIncomingConnections * @param {CNavArea} this - no description * @returns {CNavArea[]} - A table of all @CNavArea types with one-way connection **to** this @CNavArea type.Returns an empty table if there are no one-way incoming connections **to** this @CNavArea type. **/ GetIncomingConnections(this: CNavArea): CNavArea[] /** * * Returns this @CNavArea types unique ID. * * @name CNavArea:GetID * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetID * @param {CNavArea} this - no description * @returns {number} - The unique ID. **/ GetID(this: CNavArea): number /** * * Returns a table of good hiding spots in this area. * See also @CNavArea:GetExposedSpots. * * @name CNavArea:GetHidingSpots * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetHidingSpots * @param {CNavArea} this - no description * @param {number} type - The type of spots to include. * * 0 = None (Not recommended) * * 1 = In Cover/basically a hiding spot, in a corner with good hard cover nearby * * 2 = good sniper spot, had at least one decent sniping corridor * * 4 = perfect sniper spot, can see either very far, or a large area, or both * * 8 = exposed, spot in the open, usually on a ledge or cliff, same as GetExposedSpots * * Values over 255 and below 0 will be clamped. * @returns {Vector[]} - A table of @Vector types **/ GetHidingSpots(this: CNavArea, type?: number): Vector[] /** * * Returns size info about the nav area. * * @name CNavArea:GetExtentInfo * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetExtentInfo * @param {CNavArea} this - no description * @returns {ICNavAreaGetExtentInfoReturn} - Returns a table containing the following keys: **/ GetExtentInfo(this: CNavArea): ICNavAreaGetExtentInfoReturn /** * * Returns a table of very bad hiding spots in this area. * See also @CNavArea:GetHidingSpots. * * @name CNavArea:GetExposedSpots * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetExposedSpots * @param {CNavArea} this - no description * @returns {Vector[]} - A table of @Vector types **/ GetExposedSpots(this: CNavArea): Vector[] /** * * Returns the cost from starting area this area when pathfinding. Set by @CNavArea:SetCostSoFar. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:GetCostSoFar * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetCostSoFar * @param {CNavArea} this - no description * @returns {number} - The cost so far. **/ GetCostSoFar(this: CNavArea): number /** * * Returns the vector position of the corner for the given @CNavArea type. * * @name CNavArea:GetCorner * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetCorner * @param {CNavArea} this - no description * @param {NavCorner} cornerid - The target corner to get the position of, takes @NavCorner enum. * @returns {Vector} - The corner position. **/ GetCorner(this: CNavArea, cornerid: NavCorner): Vector /** * * Returns the closest point of this Nav Area from the given position. * * @name CNavArea:GetClosestPointOnArea * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetClosestPointOnArea * @param {CNavArea} this - no description * @param {Vector} pos - The given position, can be outside of the Nav Area bounds. * @returns {Vector} - The closest position on this Nav Area. **/ GetClosestPointOnArea(this: CNavArea, pos: Vector): Vector /** * * Returns the center most vector point for the given @CNavArea type. * * @name CNavArea:GetCenter * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetCenter * @param {CNavArea} this - no description * @returns {Vector} - The center vector. **/ GetCenter(this: CNavArea): Vector /** * * Returns the attribute mask for the given @CNavArea type. * * @name CNavArea:GetAttributes * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetAttributes * @note A navmesh that was generated with nav_quicksave set to 1 will have all @CNavArea types attribute masks set to 0 * @param {CNavArea} this - no description * @returns {boolean} - Attribute mask for this @CNavArea type, see @NAV_MESH enum for the specific flags. **/ GetAttributes(this: CNavArea): boolean /** * * Returns the amount of @CNavArea types that have a connection ( one or two way ) **from** this @CNavArea type in given direction. * See @CNavArea:GetAdjacentCount for a function that returns @CNavArea type count from/in all sides/directions. * * @name CNavArea:GetAdjacentCountAtSide * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetAdjacentCountAtSide * @param {CNavArea} this - no description * @param {NavDir} navDir - The direction, in which to look for @CNavArea types, see @NavDir enum. * @returns {number} - The amount of @CNavArea types that have a connection ( one or two way ) **from** this @CNavArea type in given direction. **/ GetAdjacentCountAtSide(this: CNavArea, navDir: NavDir): number /** * * Returns the amount of @CNavArea types that have a connection ( one and two way ) **from** this @CNavArea type. * See @CNavArea:GetAdjacentCountAtSide for a function that only returns area count from one side/direction. * * @name CNavArea:GetAdjacentCount * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetAdjacentCount * @param {CNavArea} this - no description * @returns {number} - The amount of @CNavArea types that have a connection ( one and two way ) **from** this @CNavArea type. **/ GetAdjacentCount(this: CNavArea): number /** * * Returns a table of all the @CNavArea types that have a ( one and two way ) connection **from** this @CNavArea type in given direction. * If an area has a one-way incoming connection to this @CNavArea type, then it will **not** be returned from this function, use @CNavArea:GetIncomingConnections to get all incoming connections. * See @CNavArea:GetAdjacentAreas for a function that returns all areas from all sides/directions. * * @name CNavArea:GetAdjacentAreasAtSide * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetAdjacentAreasAtSide * @param {CNavArea} this - no description * @param {NavDir} navDir - The direction, in which to look for @CNavArea types, see @NavDir enum. * @returns {CNavArea[]} - A table of all @CNavArea type that have a ( one and two way ) connection **from** this @CNavArea type in given direction.Returns an empty table if this area has no outgoing connections to any other areas in given direction. **/ GetAdjacentAreasAtSide(this: CNavArea, navDir: NavDir): CNavArea[] /** * * Returns a table of all the @CNavArea types that have a ( one and two way ) connection **from** this @CNavArea type. * If an area has a one-way incoming connection to this @CNavArea type, then it will **not** be returned from this function, use @CNavArea:GetIncomingConnections to get all one-way incoming connections. * See @CNavArea:GetAdjacentAreasAtSide for a function that only returns areas from one side/direction. * * @name CNavArea:GetAdjacentAreas * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/GetAdjacentAreas * @param {CNavArea} this - no description * @returns {CNavArea[]} - A table of all @CNavArea type that have a ( one and two way ) connection **from** this @CNavArea type. Returns an empty table if this area has no outgoing connections to any other areas. **/ GetAdjacentAreas(this: CNavArea): CNavArea[] /** * * Draws the hiding spots on debug overlay. This includes sniper/exposed spots too! * * @name CNavArea:DrawSpots * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/DrawSpots * @param {CNavArea} this - no description * @returns {void} **/ DrawSpots(this: CNavArea): void /** * * Draws this navarea on debug overlay. * * @name CNavArea:Draw * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/Draw * @param {CNavArea} this - no description * @returns {void} **/ Draw(this: CNavArea): void /** * * Disconnects this nav area from given area or ladder. (Only disconnects one way) * * @name CNavArea:Disconnect * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/Disconnect * @param {CNavArea} this - no description * @param {CNavArea | CNavLadder} area - The @CNavArea type or @CNavLadder type this to disconnect from. * @returns {void} **/ Disconnect(this: CNavArea, area: CNavArea | CNavLadder): void /** * * Returns true if this @CNavArea type contains the given vector. * * @name CNavArea:Contains * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/Contains * @param {CNavArea} this - no description * @param {Vector} pos - The position to test. * @returns {boolean} - True if the vector was inside and false otherwise. **/ Contains(this: CNavArea, pos: Vector): boolean /** * * Connects this @CNavArea type to another @CNavArea type or @CNavLadder type with a one way connection. ( From this area to the target ) * See @CNavLadder:ConnectTo for making the connection from ladder to area. * * @name CNavArea:ConnectTo * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/ConnectTo * @param {CNavArea} this - no description * @param {CNavArea | CNavLadder} area - The @CNavArea type or @CNavLadder type this area leads to. * @returns {void} **/ ConnectTo(this: CNavArea, area: CNavArea | CNavLadder): void /** * * Returns the height difference on the Z axis of the two @CNavArea types. This is calculated from the center most point on both @CNavArea types. * * @name CNavArea:ComputeGroundHeightChange * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/ComputeGroundHeightChange * @param {CNavArea} this - no description * @param {CNavArea} navArea - The nav area to test against. * @returns {number} - The ground height change. **/ ComputeGroundHeightChange(this: CNavArea, navArea: CNavArea): number /** * * Returns the @NavDir enum direction that the given vector faces on this @CNavArea type. * * @name CNavArea:ComputeDirection * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/ComputeDirection * @param {CNavArea} this - no description * @param {Vector} pos - The position to compute direction towards. * @returns {NavDir} - The direction the vector is in relation to this @CNavArea type. See @NavDir enum. **/ ComputeDirection(this: CNavArea, pos: Vector): NavDir /** * * Returns the height difference between the edges of two connected navareas. * * @name CNavArea:ComputeAdjacentConnectionHeightChange * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/ComputeAdjacentConnectionHeightChange * @param {CNavArea} this - no description * @param {CNavArea} navarea - no description * @returns {number} - The height change **/ ComputeAdjacentConnectionHeightChange(this: CNavArea, navarea: CNavArea): number /** * * Clears the open and closed lists for a new search. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:ClearSearchLists * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/ClearSearchLists * @param {CNavArea} this - no description * @returns {void} **/ ClearSearchLists(this: CNavArea): void /** * * Adds this @CNavArea type to the Open List. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:AddToOpenList * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/AddToOpenList * @param {CNavArea} this - no description * @returns {void} **/ AddToOpenList(this: CNavArea): void /** * * Adds this @CNavArea type to the closed list, a list of areas that have been checked by A* pathfinding algorithm. * Used in pathfinding via the [A* algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). * More information can be found on the [Simple Pathfinding](https://wiki.garrysmod.com/page/Simple%20Pathfinding) page. * * @name CNavArea:AddToClosedList * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/AddToClosedList * @param {CNavArea} this - no description * @returns {void} **/ AddToClosedList(this: CNavArea): void /** * * Adds a hiding spot onto this nav area. * There's a limit of 255 hiding spots per area. * * @name CNavArea:AddHidingSpot * @realm server * @wiki https://wiki.garrysmod.com/page/CNavArea/AddHidingSpot * @param {CNavArea} this - no description * @param {Vector} pos - The position on the nav area * @param {number} flags - Flags describing what kind of hiding spot this is. * * 0 = None (Not recommended) * * 1 = In Cover/basically a hiding spot, in a corner with good hard cover nearby * * 2 = good sniper spot, had at least one decent sniping corridor * * 4 = perfect sniper spot, can see either very far, or a large area, or both * * 8 = exposed, spot in the open, usually on a ledge or cliff * Values over 255 will be clamped. * @returns {void} **/ AddHidingSpot(this: CNavArea, pos: Vector, flags?: number): void } declare interface CMoveData { /** * * Sets the player's velocity * * @name CMoveData:SetVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetVelocity * @param {CMoveData} this - no description * @param {Vector} velocity - The velocity to set * @returns {void} **/ SetVelocity(this: CMoveData, velocity: Vector): void /** * * Sets vertical speed of the player. ( Z axis of @CMoveData:SetVelocity ) * * @name CMoveData:SetUpSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetUpSpeed * @param {CMoveData} this - no description * @param {number} speed - Vertical speed to set * @returns {void} **/ SetUpSpeed(this: CMoveData, speed: number): void /** * * Sets players strafe speed. * * @name CMoveData:SetSideSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetSideSpeed * @param {CMoveData} this - no description * @param {number} speed - Strafe speed * @returns {void} **/ SetSideSpeed(this: CMoveData, speed: number): void /** * * Sets the players position. * * @name CMoveData:SetOrigin * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetOrigin * @param {CMoveData} this - no description * @param {Vector} pos - The position * @returns {void} **/ SetOrigin(this: CMoveData, pos: Vector): void /** * * Sets the 'old' pressed buttons on the move data. These buttons are used to work out which buttons have been released, which have just been pressed and which are being held down. * * @name CMoveData:SetOldButtons * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetOldButtons * @param {CMoveData} this - no description * @param {IN} buttons - A number representing which buttons were down, see @IN enum * @returns {void} **/ SetOldButtons(this: CMoveData, buttons: IN): void /** * * Sets old aim angles. ( ? ) Doesn't seem to be doing anything. * * @name CMoveData:SetOldAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetOldAngles * @param {CMoveData} this - no description * @param {Angle} aimAng - The old angles * @returns {void} **/ SetOldAngles(this: CMoveData, aimAng: Angle): void /** * * Sets the serverside move angles, making the movement keys act as if player was facing that direction. * * @name CMoveData:SetMoveAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetMoveAngles * @bug #1181 This does nothing clientside. * @param {CMoveData} this - no description * @param {Angle} dir - The aim direction. * @returns {void} **/ SetMoveAngles(this: CMoveData, dir: Angle): void /** * * Sets the maximum speed of the player. This must match with @CMoveData:SetMaxClientSpeed both, on server and client. * Doesn't seem to be doing anything on it's own, use @CMoveData:SetMaxClientSpeed instead. * * @name CMoveData:SetMaxSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetMaxSpeed * @param {CMoveData} this - no description * @param {number} maxSpeed - The new maximum speed * @returns {void} **/ SetMaxSpeed(this: CMoveData, maxSpeed: number): void /** * * Sets the maximum player speed. Player won't be able to run or sprint faster then this value. * This also automatically sets @CMoveData:SetMaxSpeed when used in the @GamemodeHooks:SetupMove hook. You must set it manually in the @GamemodeHooks:Move hook. * This must be called on both client and server to avoid prediction errors. * This will **not** reduce speed in air. * * @name CMoveData:SetMaxClientSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetMaxClientSpeed * @note Setting this to 0 will not make the player stationary. It won't do anything. * @param {CMoveData} this - no description * @param {number} maxSpeed - The new maximum speed * @returns {void} **/ SetMaxClientSpeed(this: CMoveData, maxSpeed: number): void /** * * Sets the impulse command. This isn't actually utilised in the engine anywhere. * * @name CMoveData:SetImpulseCommand * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetImpulseCommand * @param {CMoveData} this - no description * @param {number} impulse - The impulse to set * @returns {void} **/ SetImpulseCommand(this: CMoveData, impulse: number): void /** * * Sets players forward speed. * * @name CMoveData:SetForwardSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetForwardSpeed * @param {CMoveData} this - no description * @param {number} speed - New forward speed * @returns {void} **/ SetForwardSpeed(this: CMoveData, speed: number): void /** * * Sets the radius that constrains the players movement. * It is unknown what this function does as changing its values doesn't affect player movement. * * @name CMoveData:SetConstraintRadius * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetConstraintRadius * @param {CMoveData} this - no description * @param {number} radius - The new constraint radius * @returns {void} **/ SetConstraintRadius(this: CMoveData, radius: number): void /** * * Sets the pressed buttons on the move data * * @name CMoveData:SetButtons * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetButtons * @param {CMoveData} this - no description * @param {IN} buttons - A number representing which buttons are down, see @IN enum * @returns {void} **/ SetButtons(this: CMoveData, buttons: IN): void /** * * Sets absolute move angles.( ? ) Doesn't seem to do anything. * * @name CMoveData:SetAbsMoveAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetAbsMoveAngles * @param {CMoveData} this - no description * @param {Angle} ang - New absolute move angles * @returns {void} **/ SetAbsMoveAngles(this: CMoveData, ang: Angle): void /** * * Sets angles. * * @name CMoveData:SetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/SetAngles * @bug #2382 This function does nothing. * @param {CMoveData} this - no description * @param {Angle} ang - The angles. * @returns {void} **/ SetAngles(this: CMoveData, ang: Angle): void /** * * Returns whether the key was down or not. * Unlike @CMoveData:KeyDown, it will return false if @CMoveData:KeyPressed is true and it will return true if @CMoveData:KeyReleased is true. * * @name CMoveData:KeyWasDown * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/KeyWasDown * @param {CMoveData} this - no description * @param {IN} key - The key to test, seee @IN enum * @returns {boolean} - Was the key down or not **/ KeyWasDown(this: CMoveData, key: IN): boolean /** * * Returns whether the key was released * * @name CMoveData:KeyReleased * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/KeyReleased * @param {CMoveData} this - no description * @param {IN} key - A key to test, see @IN enum * @returns {boolean} - Was the key released or not. **/ KeyReleased(this: CMoveData, key: IN): boolean /** * * Returns whether the key was pressed. If you want to check if the key is held down, try @CMoveData:KeyDown * * @name CMoveData:KeyPressed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/KeyPressed * @param {CMoveData} this - no description * @param {IN} key - The key to test, see @IN enum * @returns {boolean} - Was the key pressed or not. **/ KeyPressed(this: CMoveData, key: IN): boolean /** * * Returns whether the key is down or not * * @name CMoveData:KeyDown * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/KeyDown * @param {CMoveData} this - no description * @param {IN} key - The key to test, see @IN enum * @returns {boolean} - Is the key down or not **/ KeyDown(this: CMoveData, key: IN): boolean /** * * Gets the players velocity. * * @name CMoveData:GetVelocity * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetVelocity * @bug #3413 This will return Vector(0,0,0) sometimes when walking on props. * @param {CMoveData} this - no description * @returns {Vector} - The players velocity **/ GetVelocity(this: CMoveData): Vector /** * * Returns the vertical speed of the player. ( Z axis of @CMoveData:GetVelocity ) * * @name CMoveData:GetUpSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetUpSpeed * @param {CMoveData} this - no description * @returns {number} - Vertical speed **/ GetUpSpeed(this: CMoveData): number /** * * Returns the strafe speed of the player. * * @name CMoveData:GetSideSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetSideSpeed * @param {CMoveData} this - no description * @returns {number} - speed **/ GetSideSpeed(this: CMoveData): number /** * * Gets the player's position. * * @name CMoveData:GetOrigin * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetOrigin * @param {CMoveData} this - no description * @returns {Vector} - The player's position. **/ GetOrigin(this: CMoveData): Vector /** * * Get which buttons were down last frame * * @name CMoveData:GetOldButtons * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetOldButtons * @param {CMoveData} this - no description * @returns {IN} - An integer representing which buttons were down, see @IN enum **/ GetOldButtons(this: CMoveData): IN /** * * Gets the aim angle. Only works clientside, server returns same as @CMoveData:GetAngles. * * @name CMoveData:GetOldAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetOldAngles * @param {CMoveData} this - no description * @returns {Angle} - The aim angle **/ GetOldAngles(this: CMoveData): Angle /** * * Returns the angle the player is moving at. For more info, see @CMoveData:SetMoveAngles. * * @name CMoveData:GetMoveAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetMoveAngles * @param {CMoveData} this - no description * @returns {Angle} - The move direction **/ GetMoveAngles(this: CMoveData): Angle /** * * Returns the maximum speed of the player. * * @name CMoveData:GetMaxSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetMaxSpeed * @param {CMoveData} this - no description * @returns {number} - The maximum speed **/ GetMaxSpeed(this: CMoveData): number /** * * Returns the maximum client speed of the player * * @name CMoveData:GetMaxClientSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetMaxClientSpeed * @param {CMoveData} this - no description * @returns {number} - The maximum client speed **/ GetMaxClientSpeed(this: CMoveData): number /** * * Gets the number passed to "impulse" console command * * @name CMoveData:GetImpulseCommand * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetImpulseCommand * @param {CMoveData} this - no description * @returns {number} - The impulse **/ GetImpulseCommand(this: CMoveData): number /** * * Returns the players forward speed. * * @name CMoveData:GetForwardSpeed * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetForwardSpeed * @param {CMoveData} this - no description * @returns {number} - speed **/ GetForwardSpeed(this: CMoveData): number /** * * Returns the radius that constrains the players movement. * * @name CMoveData:GetConstraintRadius * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetConstraintRadius * @param {CMoveData} this - no description * @returns {number} - The constraint radius **/ GetConstraintRadius(this: CMoveData): number /** * * Gets the aim angle. On client is the same as @EntityFuncs:GetAngles. * * @name CMoveData:GetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetAngles * @param {CMoveData} this - no description * @returns {Angle} - Aiming angle **/ GetAngles(this: CMoveData): Angle /** * * Gets the aim angle. Seems to be same as @CMoveData:GetAngles. * * @name CMoveData:GetAbsMoveAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetAbsMoveAngles * @param {CMoveData} this - no description * @returns {Angle} - Aiming angle **/ GetAbsMoveAngles(this: CMoveData): Angle /** * * Adds keys to the move data, as if player pressed them. * * @name CMoveData:AddKey * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/AddKey * @param {CMoveData} this - no description * @param {IN} keys - Keys to add, see @IN enum * @returns {void} **/ AddKey(this: CMoveData, keys: IN): void /** * * Gets which buttons are down * * @name CMoveData:GetButtons * @realm client, server * @wiki https://wiki.garrysmod.com/page/CMoveData/GetButtons * @param {CMoveData} this - no description * @returns {IN} - An integer representing which buttons are down, see @IN enum **/ GetButtons(this: CMoveData): IN } declare interface CLuaParticle { /** * * Scales the velocity based on the particle speed. * * @name CLuaParticle:SetVelocityScale * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetVelocityScale * @param {CLuaParticle} this - no description * @param {boolean} doScale - Use velocity scaling. * @returns {void} **/ SetVelocityScale(this: CLuaParticle, doScale?: boolean): void /** * * Sets the velocity of the particle. * * @name CLuaParticle:SetVelocity * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetVelocity * @param {CLuaParticle} this - no description * @param {Vector} vel - The new velocity of the particle. * @returns {void} **/ SetVelocity(this: CLuaParticle, vel: Vector): void /** * * Sets the think function of the particle. * * @name CLuaParticle:SetThinkFunction * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetThinkFunction * @param {CLuaParticle} this - no description * @param {function} thinkFunc - Think function. It has only one argument: * @returns {void} **/ SetThinkFunction(this: CLuaParticle, thinkFunc: CLuaParticleSetThinkFunctionFunc): void /** * * Sets the initial size value of the particle. * * @name CLuaParticle:SetStartSize * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetStartSize * @param {CLuaParticle} this - no description * @param {number} startSize - Initial size. * @returns {void} **/ SetStartSize(this: CLuaParticle, startSize: number): void /** * * Sets the initial alpha value of the particle. * * @name CLuaParticle:SetStartAlpha * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetStartAlpha * @param {CLuaParticle} this - no description * @param {number} startAlpha - Initial alpha. * @returns {void} **/ SetStartAlpha(this: CLuaParticle, startAlpha: number): void /** * * Sets the initial length value of the particle. * * @name CLuaParticle:SetStartLength * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetStartLength * @param {CLuaParticle} this - no description * @param {number} startLength - Initial length. * @returns {void} **/ SetStartLength(this: CLuaParticle, startLength: number): void /** * * Sets the rotation speed of the particle in radians. This should only be used for 2D particles. * * @name CLuaParticle:SetRollDelta * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetRollDelta * @param {CLuaParticle} this - no description * @param {number} rollDelta - The new rotation speed of the particle in radians. * @returns {void} **/ SetRollDelta(this: CLuaParticle, rollDelta: number): void /** * * Sets the roll of the particle in radians. This should only be used for 2D particles. * * @name CLuaParticle:SetRoll * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetRoll * @param {CLuaParticle} this - no description * @param {number} roll - The new rotation of the particle in radians. * @returns {void} **/ SetRoll(this: CLuaParticle, roll: number): void /** * * Sets the absolute position of the particle. * * @name CLuaParticle:SetPos * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetPos * @param {CLuaParticle} this - no description * @param {Vector} pos - The new particle position. * @returns {void} **/ SetPos(this: CLuaParticle, pos: Vector): void /** * * Sets when the particles think function should be called next, this uses the synchronized server time returned by @CurTime function. * * @name CLuaParticle:SetNextThink * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetNextThink * @param {CLuaParticle} this - no description * @param {number} nextThink - Next think time. * @returns {void} **/ SetNextThink(this: CLuaParticle, nextThink: number): void /** * * Sets whether the particle should be lighted. * * @name CLuaParticle:SetLighting * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetLighting * @param {CLuaParticle} this - no description * @param {boolean} useLighting - Whether the particle should be lighted. * @returns {void} **/ SetLighting(this: CLuaParticle, useLighting: boolean): void /** * * Sets the 'life time' of the particle, how long the particle existed since its creation. * This value should always be between 0 and @CLuaParticle:GetDieTime. * It changes automatically as time goes. * If the life time of the particle will be more than @CLuaParticle:GetDieTime, it will be removed. * * @name CLuaParticle:SetLifeTime * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetLifeTime * @param {CLuaParticle} this - no description * @param {number} lifeTime - The new life time of the particle. * @returns {void} **/ SetLifeTime(this: CLuaParticle, lifeTime: number): void /** * * Sets the directional gravity aka. acceleration of the particle. * * @name CLuaParticle:SetGravity * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetGravity * @param {CLuaParticle} this - no description * @param {Vector} gravity - The directional gravity. * @returns {void} **/ SetGravity(this: CLuaParticle, gravity: Vector): void /** * * Sets the size of the particle that it will reach when it dies. * * @name CLuaParticle:SetEndSize * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetEndSize * @param {CLuaParticle} this - no description * @param {number} endSize - The new size of the particle that it will reach when it dies. * @returns {void} **/ SetEndSize(this: CLuaParticle, endSize: number): void /** * * Sets the length of the particle that it will reach when it dies. * * @name CLuaParticle:SetEndLength * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetEndLength * @param {CLuaParticle} this - no description * @param {number} endLength - The new length of the particle that it will reach when it dies. * @returns {void} **/ SetEndLength(this: CLuaParticle, endLength: number): void /** * * Sets the alpha value of the particle that it will reach when it dies. * * @name CLuaParticle:SetEndAlpha * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetEndAlpha * @param {CLuaParticle} this - no description * @param {number} endAlpha - The new alpha value of the particle that it will reach when it dies. * @returns {void} **/ SetEndAlpha(this: CLuaParticle, endAlpha: number): void /** * * Sets the time where the particle will be removed. * * @name CLuaParticle:SetDieTime * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetDieTime * @param {CLuaParticle} this - no description * @param {number} dieTime - The new die time. * @returns {void} **/ SetDieTime(this: CLuaParticle, dieTime: number): void /** * * Sets the color of the particle. * * @name CLuaParticle:SetColor * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetColor * @param {CLuaParticle} this - no description * @param {number} r - The red component. * @param {number} g - The green component. * @param {number} b - The blue component. * @returns {void} **/ SetColor(this: CLuaParticle, r: number, g: number, b: number): void /** * * Sets the function that gets called whenever the particle collides with the world. * * @name CLuaParticle:SetCollideCallback * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetCollideCallback * @param {CLuaParticle} this - no description * @param {function} collideFunc - Collide callback, the arguments are: * @returns {void} **/ SetCollideCallback(this: CLuaParticle, collideFunc: CLuaParticleSetCollideCallbackFunc): void /** * * Sets the whether the particle should collide with the world or not. * * @name CLuaParticle:SetCollide * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetCollide * @param {CLuaParticle} this - no description * @param {boolean} shouldCollide - Whether the particle should collide with the world or not * @returns {void} **/ SetCollide(this: CLuaParticle, shouldCollide: boolean): void /** * * Sets the 'bounciness' of the the particle. * * @name CLuaParticle:SetBounce * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetBounce * @param {CLuaParticle} this - no description * @param {number} bounce - New 'bounciness' of the particle * 2 means it will gain 100% of its previous velocity, * 1 means it will not lose velocity, * 0.5 means it will lose half of its velocity with each bounce. * @returns {void} **/ SetBounce(this: CLuaParticle, bounce: number): void /** * * Sets the angular velocity of the the particle. * * @name CLuaParticle:SetAngleVelocity * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetAngleVelocity * @param {CLuaParticle} this - no description * @param {Angle} angVel - New angular velocity. * @returns {void} **/ SetAngleVelocity(this: CLuaParticle, angVel: Angle): void /** * * Sets the angles of the particle. * * @name CLuaParticle:SetAngles * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetAngles * @param {CLuaParticle} this - no description * @param {Angle} ang - New angle. * @returns {void} **/ SetAngles(this: CLuaParticle, ang: Angle): void /** * * Sets the air resistance of the the particle. * * @name CLuaParticle:SetAirResistance * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/SetAirResistance * @param {CLuaParticle} this - no description * @param {number} airResistance - New air resistance. * @returns {void} **/ SetAirResistance(this: CLuaParticle, airResistance: number): void /** * * Returns the current velocity of the particle. * * @name CLuaParticle:GetVelocity * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetVelocity * @param {CLuaParticle} this - no description * @returns {Vector} - The current velocity of the particle. **/ GetVelocity(this: CLuaParticle): Vector /** * * Returns the size which the particle has when it's created. * * @name CLuaParticle:GetStartSize * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetStartSize * @param {CLuaParticle} this - no description * @returns {number} - The size which the particle has when it's created. **/ GetStartSize(this: CLuaParticle): number /** * * Returns the length which the particle has when it's created. * * @name CLuaParticle:GetStartLength * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetStartLength * @param {CLuaParticle} this - no description * @returns {number} - The length which the particle has when it's created. **/ GetStartLength(this: CLuaParticle): number /** * * Returns the alpha value which the particle has when it's created. * * @name CLuaParticle:GetStartAlpha * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetStartAlpha * @param {CLuaParticle} this - no description * @returns {number} - The alpha value which the particle has when it's created. **/ GetStartAlpha(this: CLuaParticle): number /** * * Returns the current rotation speed of the particle in radians, this should only be used for 2D particles. * * @name CLuaParticle:GetRollDelta * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetRollDelta * @param {CLuaParticle} this - no description * @returns {number} - The current rotation speed of the particle in radians **/ GetRollDelta(this: CLuaParticle): number /** * * Returns the current rotation of the particle in radians, this should only be used for 2D particles. * * @name CLuaParticle:GetRoll * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetRoll * @param {CLuaParticle} this - no description * @returns {number} - The current rotation of the particle in radians **/ GetRoll(this: CLuaParticle): number /** * * Returns the absolute position of the particle. * * @name CLuaParticle:GetPos * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetPos * @param {CLuaParticle} this - no description * @returns {Vector} - The absolute position of the particle. **/ GetPos(this: CLuaParticle): Vector /** * * Returns the 'life time' of the particle, how long the particle existed since its creation. * This value will always be between 0 and @CLuaParticle:GetDieTime. * It changes automatically as time goes. * It can be manipulated using @CLuaParticle:SetLifeTime. * If the life time of the particle will be more than @CLuaParticle:GetDieTime, it will be removed. * * @name CLuaParticle:GetLifeTime * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetLifeTime * @param {CLuaParticle} this - no description * @returns {number} - How long the particle existed, in seconds. **/ GetLifeTime(this: CLuaParticle): number /** * * Returns the gravity of the particle. * * @name CLuaParticle:GetGravity * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetGravity * @param {CLuaParticle} this - no description * @returns {Vector} - The gravity of the particle. **/ GetGravity(this: CLuaParticle): Vector /** * * Returns the size that the particle will reach on its death. * * @name CLuaParticle:GetEndSize * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetEndSize * @param {CLuaParticle} this - no description * @returns {number} - The size the particle will reach **/ GetEndSize(this: CLuaParticle): number /** * * Returns the alpha value that the particle will reach on its death. * * @name CLuaParticle:GetEndAlpha * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetEndAlpha * @param {CLuaParticle} this - no description * @returns {number} - The alpha value the particle will fade to **/ GetEndAlpha(this: CLuaParticle): number /** * * Returns the color of the particle. * * @name CLuaParticle:GetColor * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetColor * @param {CLuaParticle} this - no description * @returns {number} - Red part of the color * @returns {number} - Green part of the color * @returns {number} - Blue part of the color * @tupleReturn **/ GetColor(this: CLuaParticle): [number, number, number] /** * * Returns the amount of time in seconds after which the particle will be destroyed. * * @name CLuaParticle:GetDieTime * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetDieTime * @param {CLuaParticle} this - no description * @returns {number} - The amount of time in seconds after which the particle will be destroyed **/ GetDieTime(this: CLuaParticle): number /** * * Returns the length that the particle will reach on its death. * * @name CLuaParticle:GetEndLength * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetEndLength * @param {CLuaParticle} this - no description * @returns {number} - The length the particle will reach **/ GetEndLength(this: CLuaParticle): number /** * * Returns the 'bounciness' of the particle. * * @name CLuaParticle:GetBounce * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetBounce * @param {CLuaParticle} this - no description * @returns {number} - The 'bounciness' of the particle * 2 means it will gain 100% of its previous velocity, * 1 means it will not lose velocity, * 0.5 means it will lose half of its velocity with each bounce. **/ GetBounce(this: CLuaParticle): number /** * * Returns the angular velocity of the particle * * @name CLuaParticle:GetAngleVelocity * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetAngleVelocity * @param {CLuaParticle} this - no description * @returns {Angle} - The angular velocity of the particle **/ GetAngleVelocity(this: CLuaParticle): Angle /** * * Returns the current orientation of the particle. * * @name CLuaParticle:GetAngles * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetAngles * @param {CLuaParticle} this - no description * @returns {Angle} - The angles of the particle **/ GetAngles(this: CLuaParticle): Angle /** * * Returns the air resistance of the particle. * * @name CLuaParticle:GetAirResistance * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaParticle/GetAirResistance * @param {CLuaParticle} this - no description * @returns {number} - The air resistance of the particle **/ GetAirResistance(this: CLuaParticle): number } declare interface CLuaLocomotion { /** * * Sets the current movement velocity * * @name CLuaLocomotion:SetVelocity * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetVelocity * @param {CLuaLocomotion} this - no description * @param {Vector} velocity - no description * @returns {void} **/ SetVelocity(this: CLuaLocomotion, velocity: Vector): void /** * * Sets the max height the bot can step up * * @name CLuaLocomotion:SetStepHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetStepHeight * @param {CLuaLocomotion} this - no description * @param {number} height - Height (default is 18) * @returns {void} **/ SetStepHeight(this: CLuaLocomotion, height: number): void /** * * Sets the max rate at which the NextBot can visually rotate. This will not affect moving or pathing. * * @name CLuaLocomotion:SetMaxYawRate * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetMaxYawRate * @param {CLuaLocomotion} this - no description * @param {number} yawRate - Desired new maximum yaw rate * @returns {void} **/ SetMaxYawRate(this: CLuaLocomotion, yawRate: number): void /** * * Sets the height of the bot's jump * * @name CLuaLocomotion:SetJumpHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetJumpHeight * @param {CLuaLocomotion} this - no description * @param {number} height - Height (default is 58) * @returns {void} **/ SetJumpHeight(this: CLuaLocomotion, height: number): void /** * * Sets the locomotion's gravity. * * @name CLuaLocomotion:SetGravity * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetGravity * @note With values 0 or below, or even lower positive values, the nextbot will start to drift sideways, use @CLuaLocomotion:SetVelocity to counteract this. * @param {CLuaLocomotion} this - no description * @param {number} gravity - New gravity to set. Default is 1000. * @returns {void} **/ SetGravity(this: CLuaLocomotion, gravity: number): void /** * * Sets movement speed. * * @name CLuaLocomotion:SetDesiredSpeed * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetDesiredSpeed * @param {CLuaLocomotion} this - no description * @param {number} speed - The new desired speed * @returns {void} **/ SetDesiredSpeed(this: CLuaLocomotion, speed: number): void /** * * Sets the deceleration speed. * * @name CLuaLocomotion:SetDeceleration * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetDeceleration * @param {CLuaLocomotion} this - no description * @param {number} deceleration - New deceleration speed (default is 400) * @returns {void} **/ SetDeceleration(this: CLuaLocomotion, deceleration: number): void /** * * Sets the height the bot is scared to fall from. * * @name CLuaLocomotion:SetDeathDropHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetDeathDropHeight * @param {CLuaLocomotion} this - no description * @param {number} height - Height (default is 200) * @returns {void} **/ SetDeathDropHeight(this: CLuaLocomotion, height: number): void /** * * Sets the acceleration speed * * @name CLuaLocomotion:SetAcceleration * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/SetAcceleration * @param {CLuaLocomotion} this - no description * @param {number} speed - Speed acceleration (default is 400) * @returns {void} **/ SetAcceleration(this: CLuaLocomotion, speed: number): void /** * @name CLuaLocomotion:JumpAcrossGap * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/JumpAcrossGap * @param {CLuaLocomotion} this - no description * @param {Vector} landingGoal - no description * @param {Vector} landingForward - no description * @returns {void} **/ JumpAcrossGap(this: CLuaLocomotion, landingGoal: Vector, landingForward: Vector): void /** * * Makes the bot jump * * @name CLuaLocomotion:Jump * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/Jump * @param {CLuaLocomotion} this - no description * @returns {void} **/ Jump(this: CLuaLocomotion): void /** * * Returns whether or not the target in question is on a ladder or not. * * @name CLuaLocomotion:IsUsingLadder * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/IsUsingLadder * @param {CLuaLocomotion} this - no description * @returns {boolean} - If the target is on a ladder or not. **/ IsUsingLadder(this: CLuaLocomotion): boolean /** * * Returns true if we're stuck * * @name CLuaLocomotion:IsStuck * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/IsStuck * @param {CLuaLocomotion} this - no description * @returns {boolean} - Whether we're stuck or not **/ IsStuck(this: CLuaLocomotion): boolean /** * * Returns whether the nextbot this locomotion is attached to is on ground or not. * * @name CLuaLocomotion:IsOnGround * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/IsOnGround * @param {CLuaLocomotion} this - no description * @returns {boolean} - Whether the nextbot is on ground or not. **/ IsOnGround(this: CLuaLocomotion): boolean /** * * Returns true of the locomotion engine is jumping or climbing * * @name CLuaLocomotion:IsClimbingOrJumping * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/IsClimbingOrJumping * @param {CLuaLocomotion} this - no description * @returns {boolean} - Whether we're climbing or jumping or not **/ IsClimbingOrJumping(this: CLuaLocomotion): boolean /** * * Returns true if we're trying to move. * * @name CLuaLocomotion:IsAttemptingToMove * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/IsAttemptingToMove * @param {CLuaLocomotion} this - no description * @returns {boolean} - Whether we're trying to move or not. **/ IsAttemptingToMove(this: CLuaLocomotion): boolean /** * * Returns whether this @CLuaLocomotion type can reach and/or traverse/move in given @CNavArea type. * * @name CLuaLocomotion:IsAreaTraversable * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/IsAreaTraversable * @param {CLuaLocomotion} this - no description * @param {CNavArea} area - The area to test * @returns {boolean} - Whether this @CLuaLocomotion type can traverse given @CNavArea type. **/ IsAreaTraversable(this: CLuaLocomotion, area: CNavArea): boolean /** * * Returns the current movement velocity as a vector * * @name CLuaLocomotion:GetVelocity * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetVelocity * @param {CLuaLocomotion} this - no description * @returns {Vector} - Current velocity **/ GetVelocity(this: CLuaLocomotion): Vector /** * * Gets the max height the bot can step up * * @name CLuaLocomotion:GetStepHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetStepHeight * @param {CLuaLocomotion} this - no description * @returns {number} - Current step height **/ GetStepHeight(this: CLuaLocomotion): number /** * * Returns the @NextBot type this locomotion is associated with. * * @name CLuaLocomotion:GetNextBot * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetNextBot * @param {CLuaLocomotion} this - no description * @returns {NextBot} - The nextbot **/ GetNextBot(this: CLuaLocomotion): NextBot /** * * Returns the max rate at which the NextBot can visually rotate. * * @name CLuaLocomotion:GetMaxYawRate * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetMaxYawRate * @param {CLuaLocomotion} this - no description * @returns {number} - Maximum yaw rate **/ GetMaxYawRate(this: CLuaLocomotion): number /** * * Returns maximum jump height of this @CLuaLocomotion type. * * @name CLuaLocomotion:GetMaxJumpHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetMaxJumpHeight * @param {CLuaLocomotion} this - no description * @returns {number} - The maximum jump height. **/ GetMaxJumpHeight(this: CLuaLocomotion): number /** * * Gets the height of the bot's jump * * @name CLuaLocomotion:GetJumpHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetJumpHeight * @param {CLuaLocomotion} this - no description * @returns {number} - Current jump height **/ GetJumpHeight(this: CLuaLocomotion): number /** * * Return unit vector in XY plane describing our direction of motion - even if we are currently not moving * * @name CLuaLocomotion:GetGroundMotionVector * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetGroundMotionVector * @param {CLuaLocomotion} this - no description * @returns {Vector} - A vector representing the X and Y movement **/ GetGroundMotionVector(this: CLuaLocomotion): Vector /** * * Returns the locomotion's gravity. * * @name CLuaLocomotion:GetGravity * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetGravity * @param {CLuaLocomotion} this - no description * @returns {number} - The gravity. **/ GetGravity(this: CLuaLocomotion): number /** * * Gets the deceleration speed * * @name CLuaLocomotion:GetDeceleration * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetDeceleration * @param {CLuaLocomotion} this - no description * @returns {number} - Current deceleration speed **/ GetDeceleration(this: CLuaLocomotion): number /** * * Gets the height the bot is scared to fall from * * @name CLuaLocomotion:GetDeathDropHeight * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetDeathDropHeight * @param {CLuaLocomotion} this - no description * @returns {number} - Current death drop height **/ GetDeathDropHeight(this: CLuaLocomotion): number /** * * Returns the current acceleration as a vector * * @name CLuaLocomotion:GetCurrentAcceleration * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetCurrentAcceleration * @param {CLuaLocomotion} this - no description * @returns {Vector} - Current acceleration **/ GetCurrentAcceleration(this: CLuaLocomotion): Vector /** * * Returns the acceleration speed * * @name CLuaLocomotion:GetAcceleration * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/GetAcceleration * @param {CLuaLocomotion} this - no description * @returns {number} - Current acceleration speed **/ GetAcceleration(this: CLuaLocomotion): number /** * * Sets the direction we want to face * * @name CLuaLocomotion:FaceTowards * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/FaceTowards * @param {CLuaLocomotion} this - no description * @param {Vector} goal - The vector we want to face * @returns {void} **/ FaceTowards(this: CLuaLocomotion, goal: Vector): void /** * * Sets the location we want to get to * * @name CLuaLocomotion:Approach * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/Approach * @param {CLuaLocomotion} this - no description * @param {Vector} goal - The vector we want to get to * @param {number} goalweight - If unsure then set this to 1 * @returns {void} **/ Approach(this: CLuaLocomotion, goal: Vector, goalweight: number): void /** * * Removes the stuck status from the bot * * @name CLuaLocomotion:ClearStuck * @realm server * @wiki https://wiki.garrysmod.com/page/CLuaLocomotion/ClearStuck * @param {CLuaLocomotion} this - no description * @returns {void} **/ ClearStuck(this: CLuaLocomotion): void } declare interface CLuaEmitter { /** * * Sets the position of the particle emitter. * * @name CLuaEmitter:SetPos * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/SetPos * @param {CLuaEmitter} this - no description * @param {Vector} position - New position. * @returns {void} **/ SetPos(this: CLuaEmitter, position: Vector): void /** * * The function name has not much in common with its actual function, it applies a radius to every particles that affects the building of the bounding box, as it, usually is constructed by the particle that has the lowest x, y and z and the highest x, y and z, this function just adds/subtracts the radius and inflates the bounding box. * * @name CLuaEmitter:SetParticleCullRadius * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/SetParticleCullRadius * @param {CLuaEmitter} this - no description * @param {number} radius - Particle radius. * @returns {void} **/ SetParticleCullRadius(this: CLuaEmitter, radius: number): void /** * * Prevents all particles of the emitter from automatically drawing. * * @name CLuaEmitter:SetNoDraw * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/SetNoDraw * @param {CLuaEmitter} this - no description * @param {boolean} noDraw - Whether we should draw the particles ( false ) or not ( true ) * @returns {void} **/ SetNoDraw(this: CLuaEmitter, noDraw: boolean): void /** * * This function sets the the distance between the render camera and the emitter at which the particles should start fading and at which distance fade ends ( alpha becomes 0 ). * * @name CLuaEmitter:SetNearClip * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/SetNearClip * @param {CLuaEmitter} this - no description * @param {number} distanceMin - Min distance where the alpha becomes 0. * @param {number} distanceMax - Max distance where the alpha starts fading. * @returns {void} **/ SetNearClip(this: CLuaEmitter, distanceMin: number, distanceMax: number): void /** * * Sets the bounding box for this emitter. * Usually the bounding box is automatically determined by the particles, but this function overrides it. * * @name CLuaEmitter:SetBBox * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/SetBBox * @param {CLuaEmitter} this - no description * @param {Vector} mins - The minimum position of the box * @param {Vector} maxs - The maximum position of the box * @returns {void} **/ SetBBox(this: CLuaEmitter, mins: Vector, maxs: Vector): void /** * * Returns whether this @CLuaEmitter type is valid or not. * * @name CLuaEmitter:IsValid * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/IsValid * @param {CLuaEmitter} this - no description * @returns {boolean} - Whether this @CLuaEmitter type is valid or not. **/ IsValid(this: CLuaEmitter): boolean /** * * Returns whether this emitter is 3D or not. This is set when creating the emitter with @ParticleEmitter function. * * @name CLuaEmitter:Is3D * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/Is3D * @param {CLuaEmitter} this - no description * @returns {boolean} - Whether this emitter is 3D or not. **/ Is3D(this: CLuaEmitter): boolean /** * * Returns the position of this emitter. This is set when creating the emitter with @ParticleEmitter function. * * @name CLuaEmitter:GetPos * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/GetPos * @param {CLuaEmitter} this - no description * @returns {Vector} - Position of this particle emitter. **/ GetPos(this: CLuaEmitter): Vector /** * * Returns the amount of active particles of this emitter. * * @name CLuaEmitter:GetNumActiveParticles * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/GetNumActiveParticles * @param {CLuaEmitter} this - no description * @returns {number} - The amount of active particles of this emitter **/ GetNumActiveParticles(this: CLuaEmitter): number /** * * Removes the emitter and all its particles. * * @name CLuaEmitter:Finish * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/Finish * @param {CLuaEmitter} this - no description * @returns {void} **/ Finish(this: CLuaEmitter): void /** * * Manually renders all particles the emitter has created. * * @name CLuaEmitter:Draw * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/Draw * @param {CLuaEmitter} this - no description * @returns {void} **/ Draw(this: CLuaEmitter): void /** * * Creates a new @CLuaParticle type with the given material and position. * * @name CLuaEmitter:Add * @realm client * @wiki https://wiki.garrysmod.com/page/CLuaEmitter/Add * @param {CLuaEmitter} this - no description * @param {string} material - The particles material. Can also be an @IMaterial type. * @param {Vector} position - The position to spawn the particle on. * @returns {CLuaParticle} - The created particle, if any. **/ Add(this: CLuaEmitter, material: string, position: Vector): CLuaParticle } declare interface CEffectData { /** * * Sets the surface property index of the effect. * * @name CEffectData:SetSurfaceProp * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetSurfaceProp * @param {CEffectData} this - no description * @param {number} surfaceProperties - The surface property index of the effect. * @returns {void} **/ SetSurfaceProp(this: CEffectData, surfaceProperties: number): void /** * * Sets the start of the effect to be created with this effect data. * * @name CEffectData:SetStart * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetStart * @param {CEffectData} this - no description * @param {Vector} start - Start of the effect. * @returns {void} **/ SetStart(this: CEffectData, start: Vector): void /** * * Sets the scale of the effect to be created with this effect data. * * @name CEffectData:SetScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetScale * @param {CEffectData} this - no description * @param {number} scale - Scale of the effect. * @returns {void} **/ SetScale(this: CEffectData, scale: number): void /** * * Sets the radius of the effect to be created with this effect data. * * @name CEffectData:SetRadius * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetRadius * @note This is clamped internally from 0 to 1023. * @param {CEffectData} this - no description * @param {number} radius - Radius of the effect. * @returns {void} **/ SetRadius(this: CEffectData, radius: number): void /** * * Sets the origin of the effect to be created with this effect data. * * @name CEffectData:SetOrigin * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetOrigin * @param {CEffectData} this - no description * @param {Vector} origin - Origin of the effect. * @returns {void} **/ SetOrigin(this: CEffectData, origin: Vector): void /** * * Sets the normalized direction vector of the effect to be created with this effect data. * * @name CEffectData:SetNormal * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetNormal * @param {CEffectData} this - no description * @param {Vector} normal - The normalized direction vector of the effect. * @returns {void} **/ SetNormal(this: CEffectData, normal: Vector): void /** * * Sets the material index of the effect. * * @name CEffectData:SetMaterialIndex * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetMaterialIndex * @note This is internally stored as an integer, but only the first 11 bits will be networked. * @param {CEffectData} this - no description * @param {number} materialIndex - The material index of the effect. * @returns {void} **/ SetMaterialIndex(this: CEffectData, materialIndex: number): void /** * * Sets the magnitude of the effect. * * @name CEffectData:SetMagnitude * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetMagnitude * @param {CEffectData} this - no description * @param {number} magnitude - The magnitude of the effect. * @returns {void} **/ SetMagnitude(this: CEffectData, magnitude: number): void /** * * Sets the flags of the effect. * * @name CEffectData:SetFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetFlags * @note This is internally stored as an integer, but only the first 8 bits will be networked. * @param {CEffectData} this - no description * @param {number} flags - The flags of the effect. Each effect has their own flags. * @returns {void} **/ SetFlags(this: CEffectData, flags: number): void /** * * Sets the entity of the effect via its index. * * @name CEffectData:SetEntIndex * @realm server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetEntIndex * @param {CEffectData} this - no description * @param {number} entIndex - The entity index to be set. * @returns {void} **/ SetEntIndex(this: CEffectData, entIndex: number): void /** * * Sets the damage type of the effect to be created with this effect data. * * @name CEffectData:SetDamageType * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetDamageType * @param {CEffectData} this - no description * @param {DMG} damageType - Damage type, see @DMG enum. * @returns {void} **/ SetDamageType(this: CEffectData, damageType: DMG): void /** * * Sets the hit box index of the effect. * * @name CEffectData:SetHitBox * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetHitBox * @note This is internally stored as an integer, but only the first 11 bits will be networked. * @param {CEffectData} this - no description * @param {number} hitBoxIndex - The hit box index of the effect. * @returns {void} **/ SetHitBox(this: CEffectData, hitBoxIndex: number): void /** * * Sets the color of the effect. * * @name CEffectData:SetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetColor * @param {CEffectData} this - no description * @param {number} color - Color represented by a byte. * @returns {void} **/ SetColor(this: CEffectData, color: number): void /** * * Sets the attachment id of the effect to be created with this effect data. * * @name CEffectData:SetAttachment * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetAttachment * @note This is internally stored as an integer, but only the first 5 bits will be networked. * @param {CEffectData} this - no description * @param {number} attachment - New attachment ID of the effect. * @returns {void} **/ SetAttachment(this: CEffectData, attachment: number): void /** * * Returns the surface property index of the effect. * * @name CEffectData:GetSurfaceProp * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetSurfaceProp * @param {CEffectData} this - no description * @returns {number} - The surface property index of the effect **/ GetSurfaceProp(this: CEffectData): number /** * * Sets the angles of the effect. * * @name CEffectData:SetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetAngles * @param {CEffectData} this - no description * @param {Angle} ang - The new angles to be set. * @returns {void} **/ SetAngles(this: CEffectData, ang: Angle): void /** * * Returns the start position of the effect. * * @name CEffectData:GetStart * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetStart * @param {CEffectData} this - no description * @returns {Vector} - The start position of the effect **/ GetStart(this: CEffectData): Vector /** * * Returns the origin position of the effect. * * @name CEffectData:GetOrigin * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetOrigin * @param {CEffectData} this - no description * @returns {Vector} - The origin position of the effect. **/ GetOrigin(this: CEffectData): Vector /** * * Returns the scale of the effect. * * @name CEffectData:GetScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetScale * @param {CEffectData} this - no description * @returns {number} - The scale of the effect **/ GetScale(this: CEffectData): number /** * * Returns the radius of the effect. * * @name CEffectData:GetRadius * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetRadius * @param {CEffectData} this - no description * @returns {number} - The radius of the effect. **/ GetRadius(this: CEffectData): number /** * * Returns the normalized direction vector of the effect. * * @name CEffectData:GetNormal * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetNormal * @param {CEffectData} this - no description * @returns {Vector} - The normalized direction vector of the effect. **/ GetNormal(this: CEffectData): Vector /** * * Returns the material ID of the effect. * * @name CEffectData:GetMaterialIndex * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetMaterialIndex * @param {CEffectData} this - no description * @returns {number} - The material ID of the effect. **/ GetMaterialIndex(this: CEffectData): number /** * * Returns the magnitude of the effect. * * @name CEffectData:GetMagnitude * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetMagnitude * @param {CEffectData} this - no description * @returns {number} - The magnitude of the effect. **/ GetMagnitude(this: CEffectData): number /** * * Returns the hit box ID of the effect. * * @name CEffectData:GetHitBox * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetHitBox * @param {CEffectData} this - no description * @returns {number} - The hit box ID of the effect. **/ GetHitBox(this: CEffectData): number /** * * Returns the flags of the effect. * * @name CEffectData:GetFlags * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetFlags * @param {CEffectData} this - no description * @returns {number} - The flags of the effect. **/ GetFlags(this: CEffectData): number /** * * Returns the entity index of the entity set for the effect. * * @name CEffectData:GetEntIndex * @realm server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetEntIndex * @param {CEffectData} this - no description * @returns {number} - The entity index of the entity set for the effect. **/ GetEntIndex(this: CEffectData): number /** * * Returns the damage type of the effect * * @name CEffectData:GetDamageType * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetDamageType * @param {CEffectData} this - no description * @returns {DMG} - Damage type of the effect, see @DMG enum **/ GetDamageType(this: CEffectData): DMG /** * * Returns byte which represents the color of the effect. * * @name CEffectData:GetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetColor * @param {CEffectData} this - no description * @returns {number} - The color of the effect **/ GetColor(this: CEffectData): number /** * * Returns the attachment ID for the effect. * * @name CEffectData:GetAttachment * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetAttachment * @param {CEffectData} this - no description * @returns {number} - The attachment ID of the effect. **/ GetAttachment(this: CEffectData): number /** * * Sets the entity of the effect to be created with this effect data. * * @name CEffectData:SetEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/SetEntity * @param {CEffectData} this - no description * @param {Entity} entity - Entity of the effect, mostly used for parenting. * @returns {void} **/ SetEntity(this: CEffectData, entity: Entity): void /** * * Returns the entity assigned to the effect. * * @name CEffectData:GetEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetEntity * @param {CEffectData} this - no description * @returns {Entity} - The entity assigned to the effect **/ GetEntity(this: CEffectData): Entity /** * * Returns the angles of the effect. * * @name CEffectData:GetAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/CEffectData/GetAngles * @param {CEffectData} this - no description * @returns {Angle} - The angles of the effect **/ GetAngles(this: CEffectData): Angle } declare interface bf_read { /** * * Reads a special encoded vector normal from the bitstream and returns it, this function is not suitable to send vectors that represent a position. * * @name bf_read:ReadVectorNormal * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadVectorNormal * @param {bf_read} this - no description * @returns {Vector} - normal **/ ReadVectorNormal(this: bf_read): Vector /** * * Reads a special encoded vector from the bitstream and returns it, this function is not suitable to send normals. * * @name bf_read:ReadVector * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadVector * @param {bf_read} this - no description * @returns {Vector} - vec **/ ReadVector(this: bf_read): Vector /** * * Reads a null terminated string from the bitstream. * * @name bf_read:ReadString * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadString * @param {bf_read} this - no description * @returns {string} - str **/ ReadString(this: bf_read): string /** * * Reads a 2 byte short from the bitstream and returns it. * * @name bf_read:ReadShort * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadShort * @param {bf_read} this - no description * @returns {number} - short **/ ReadShort(this: bf_read): number /** * * Reads a 4 byte long from the bitstream and returns it. * * @name bf_read:ReadLong * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadLong * @param {bf_read} this - no description * @returns {number} - int **/ ReadLong(this: bf_read): number /** * * Reads a 4 byte float from the bitstream and returns it. * * @name bf_read:ReadFloat * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadFloat * @param {bf_read} this - no description * @returns {number} - float **/ ReadFloat(this: bf_read): number /** * * Reads a short representing an entity index and returns the matching entity handle. * * @name bf_read:ReadEntity * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadEntity * @param {bf_read} this - no description * @returns {Entity} - ent **/ ReadEntity(this: bf_read): Entity /** * * Reads a signed char and returns a number from -127 to 127 representing the ascii value of that char. * * @name bf_read:ReadChar * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadChar * @param {bf_read} this - no description * @returns {number} - asciiVal **/ ReadChar(this: bf_read): number /** * * Reads 1 bit an returns a bool representing the bit. * * @name bf_read:ReadBool * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadBool * @param {bf_read} this - no description * @returns {boolean} - bit **/ ReadBool(this: bf_read): boolean /** * * Reads an returns an angle object from the bitstream. * * @name bf_read:ReadAngle * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/ReadAngle * @param {bf_read} this - no description * @returns {Angle} - The read angle **/ ReadAngle(this: bf_read): Angle /** * * Rewinds the bitstream so it can be read again. * * @name bf_read:Reset * @realm client * @wiki https://wiki.garrysmod.com/page/bf read/Reset * @param {bf_read} this - no description * @returns {void} **/ Reset(this: bf_read): void } declare interface AngleFuncs { /** * * Sets pitch, yaw and roll to 0. * This function is faster than doing it manually. * * @name AngleFuncs:Zero * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Zero * @param {Angle} this - no description * @returns {void} **/ Zero(this: Angle): void /** * * Returns a normal vector facing in the direction that points up relative to the angle's direction. * * @name AngleFuncs:Up * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Up * @param {Angle} this - no description * @returns {Vector} - The up direction of the angle. **/ Up(this: Angle): Vector /** * * Returns the pitch, yaw, and roll components of the angle. * * @name AngleFuncs:Unpack * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Unpack * @param {Angle} this - no description * @returns {number} - p, pitch, x, or Angle[1]. * @returns {number} - y, yaw, or Angle[2]. * @returns {number} - r, roll, r, or Angle[3]. * @tupleReturn **/ Unpack(this: Angle): [number, number, number] /** * * Returns the angle as a table with three elements. * * @name AngleFuncs:ToTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/ToTable * @param {Angle} this - no description * @returns {table} - The table with elements 1 = p, 2 = y, 3 = r. **/ ToTable(this: Angle): table /** * * Snaps the angle to nearest interval of degrees. * * @name AngleFuncs:SnapTo * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/SnapTo * @note This will modify the original angle too! * @param {Angle} this - no description * @param {string} axis - The component/axis to snap. Can be either "p"/"pitch", "y"/"yaw" or "r"/"roll". * @param {number} target - The target angle snap interval * @returns {Angle} - The snapped angle. **/ SnapTo(this: Angle, axis: string, target: number): Angle /** * * Sets the p, y, and r of the angle. * * @name AngleFuncs:SetUnpacked * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/SetUnpacked * @param {Angle} this - no description * @param {number} p - The pitch component of the Angle * @param {number} y - The yaw component of the Angle * @param {number} r - The roll component of the Angle * @returns {void} **/ SetUnpacked(this: Angle, p: number, y: number, r: number): void /** * * Copies pitch, yaw and roll from the second angle to the first. * * @name AngleFuncs:Set * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Set * @param {Angle} this - no description * @param {Angle} originalAngle - The angle to copy the values from. * @returns {void} **/ Set(this: Angle, originalAngle: Angle): void /** * * Rotates the angle around the specified axis by the specified degrees. * * @name AngleFuncs:RotateAroundAxis * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/RotateAroundAxis * @param {Angle} this - no description * @param {Vector} axis - The axis to rotate around. * @param {number} rotation - The degrees to rotate around the specified axis. * @returns {void} **/ RotateAroundAxis(this: Angle, axis: Vector, rotation: number): void /** * * Subtracts the values of the argument angle to the orignal angle. This functions the same as angle1 - angle2 without creating a new angle object, skipping object construction and garbage collection. * * @name AngleFuncs:Sub * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Sub * @param {Angle} this - no description * @param {Angle} angle - The angle to subtract. * @returns {void} **/ Sub(this: Angle, angle: Angle): void /** * * Returns a normal vector facing in the direction that points right relative to the angle's direction. * * @name AngleFuncs:Right * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Right * @param {Angle} this - no description * @returns {Vector} - The right direction of the angle **/ Right(this: Angle): Vector /** * * Returns whether the pitch, yaw and roll are 0 or not. * * @name AngleFuncs:IsZero * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/IsZero * @param {Angle} this - no description * @returns {boolean} - Whether the pitch, yaw and roll are 0 or not. **/ IsZero(this: Angle): boolean /** * * Normalizes the angles by applying a module with 360 to pitch, yaw and roll. * * @name AngleFuncs:Normalize * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Normalize * @param {Angle} this - no description * @returns {void} **/ Normalize(this: Angle): void /** * * Returns a normal vector facing in the direction that the angle points. * * @name AngleFuncs:Forward * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Forward * @param {Angle} this - no description * @returns {Vector} - The forward direction of the angle **/ Forward(this: Angle): Vector /** * * Multiplies a scalar to all the values of the orignal angle. This functions the same as num * angle without creating a new angle object, skipping object construction and garbage collection. * * @name AngleFuncs:Mul * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Mul * @param {Angle} this - no description * @param {number} scalar - The number to multiply. * @returns {void} **/ Mul(this: Angle, scalar: number): void /** * * Divides all values of the original angle by a scalar. This functions the same as angle1 / num without creating a new angle object, skipping object construction and garbage collection. * * @name AngleFuncs:Div * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Div * @param {Angle} this - no description * @param {number} scalar - The number to divide by. * @returns {void} **/ Div(this: Angle, scalar: number): void /** * * Adds the values of the argument angle to the orignal angle. This functions the same as angle1 + angle2 without creating a new angle object, skipping object construction and garbage collection. * * @name AngleFuncs:Add * @realm client, server * @wiki https://wiki.garrysmod.com/page/Angle/Add * @param {Angle} this - no description * @param {Angle} angle - The angle to add. * @returns {void} **/ Add(this: Angle, angle: Angle): void } declare namespace widgets { /** * * Automatically called to update all widgets. * * @name widgets.PlayerTick * @realm client, server * @wiki https://wiki.garrysmod.com/page/widgets/PlayerTick * @internal * @param {void} this - no description * @param {Player} ply - The player * @param {CMoveData} mv - Player move data * @returns {void} **/ export function PlayerTick(this: void, ply: Player, mv: CMoveData): void /** * * Renders a widget. Normally you won't need to call this. * * @name widgets.RenderMe * @realm client * @wiki https://wiki.garrysmod.com/page/widgets/RenderMe * @param {void} this - no description * @param {Entity} ent - Widget entity to render * @returns {void} **/ export function RenderMe(this: void, ent: Entity): void } declare namespace weapons { /** * * Called after all SWEPS have been loaded and runs @baseclass.Set on each one. * You can retrieve all the currently registered SWEPS with @weapons.GetList. * * @name weapons.OnLoaded * @realm client, server * @wiki https://wiki.garrysmod.com/page/weapons/OnLoaded * @internal * @note This is not called after a SWEP auto refresh, and thus the inherited baseclass functions retrieved with @baseclass.Get will not be updated * @param {void} this - no description * @returns {void} **/ export function OnLoaded(this: void): void /** * * Checks if name is based on base * * @name weapons.IsBasedOn * @realm client, server * @wiki https://wiki.garrysmod.com/page/weapons/IsBasedOn * @param {void} this - no description * @param {string} name - Entity's class name to be checked * @param {string} base - Base class name to be checked * @returns {boolean} - Returns true if class name is based on base, else false. **/ export function IsBasedOn(this: void, name: string, base: string): boolean /** * * Gets the REAL weapon table, not a copy. The produced table does *not* inherit fields from the weapon's base class, unlike @weapons.Get. * * @name weapons.GetStored * @realm client, server * @wiki https://wiki.garrysmod.com/page/weapons/GetStored * @warning Modifying this table will modify what is stored by the weapons library. Take a copy or use @weapons.Get to avoid this. * @param {void} this - no description * @param {string} weapon_class - Weapon class to retrieve weapon table of * @returns {table} - The weapon table **/ export function GetStored(this: void, weapon_class: string): table /** * * Get a *copy* of weapon table by name. This function also inherits fields from the weapon's base class, unlike @weapons.GetStored. * * @name weapons.Get * @realm client, server * @wiki https://wiki.garrysmod.com/page/weapons/Get * @param {void} this - no description * @param {string} classname - Class name of weapon to retrieve * @returns {table} - The retrieved table or nil **/ export function Get(this: void, classname: string): table /** * * Get a list of all the registered SWEPs. This does not include weapons added to spawnmenu manually. * * @name weapons.GetList * @realm client, server * @wiki https://wiki.garrysmod.com/page/weapons/GetList * @param {void} this - no description * @returns {table} - List of all the registered SWEPs **/ export function GetList(this: void): table /** * * Used to register your SWEP with the engine. * * @name weapons.Register * @realm client, server * @wiki https://wiki.garrysmod.com/page/weapons/Register * @bug Sub-tables provided in the first argument will not carry over their metatable, and will receive a BaseClass key if the table was merged with the base's. Userdata references, which includes Vectors, Angles, Entities, etc. will not be copied. * @param {void} this - no description * @param {table} swep_table - The SWEP table * @param {string} classname - Classname to assign to that swep * @returns {void} **/ export function Register(this: void, swep_table: table, classname: string): void } declare namespace video { /** * * Attempts to create an @IVideoWriter type. * * @name video.Record * @realm client, menu * @wiki https://wiki.garrysmod.com/page/video/Record * @param {void} this - no description * @param {VideoData} config - The video config. See @VideoData structure. * @returns {IVideoWriter} - The video object (returns **false** if there is an error) * @returns {string} - The error string, if there is an error * @tupleReturn **/ export function Record(this: void, config: VideoData): [IVideoWriter, string] } declare namespace vgui { /** * * Registers a table to use as a panel. All this function does is assigns Base key to your table and returns the table. * * @name vgui.RegisterTable * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/RegisterTable * @param {void} this - no description * @param {table} panel - The PANEL table * @param {string} base - A base for the panel * @returns {table} - The PANEL table **/ export function RegisterTable(this: void, panel: table, base?: string): table /** * * Registers a new VGUI panel from a file. * * @name vgui.RegisterFile * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/RegisterFile * @param {void} this - no description * @param {string} file - The file to register * @returns {table} - A table containing info about the panel. Can be supplied to @vgui.CreateFromTable **/ export function RegisterFile(this: void, file: string): table /** * * Returns whenever the cursor is hovering the world panel. * * @name vgui.IsHoveringWorld * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/IsHoveringWorld * @param {void} this - no description * @returns {boolean} - isHoveringWorld **/ export function IsHoveringWorld(this: void): boolean /** * * Registers a panel for later creation. * * @name vgui.Register * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/Register * @param {void} this - no description * @param {string} classname - Classname of the panel to create. * @param {table} panelTable - The table containg the panel information. * @param {string} baseName - Name of the base of the panel. * @returns {table} - The given panel table from second argument **/ export function Register(this: void, classname: string, panelTable: table, baseName: string): table /** * * Returns the global world panel which is the parent to all others. * See also @GetHUDPanel function. * * @name vgui.GetWorldPanel * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/GetWorldPanel * @param {void} this - no description * @returns {Panel} - The world panel **/ export function GetWorldPanel(this: void): Panel /** * * Returns the panel which is currently receiving keyboard input. * * @name vgui.GetKeyboardFocus * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/GetKeyboardFocus * @param {void} this - no description * @returns {Panel} - The panel with keyboard focus **/ export function GetKeyboardFocus(this: void): Panel /** * * Returns the panel the cursor is hovering above. * * @name vgui.GetHoveredPanel * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/GetHoveredPanel * @warning This returns a cached value that is only updated after rendering and *before* the next VGUI Think/Layout pass. * ie. it lags one frame behind panel layout and is completely unhelpful for @PanelHooks:Paint if your panels are moving around under the mouse a lot every frame. * @param {void} this - no description * @returns {Panel} - The panel that the user is currently hovering over with their cursor. **/ export function GetHoveredPanel(this: void): Panel /** * * Gets the method table of this panel. Does not return parent methods! * * @name vgui.GetControlTable * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/GetControlTable * @param {void} this - no description * @param {string} Panelname - The name of the panel * @returns {table} - methods **/ export function GetControlTable(this: void, Panelname: string): table /** * * Returns whether the currently focused panel is a child of the given one. * * @name vgui.FocusedHasParent * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/FocusedHasParent * @param {void} this - no description * @param {Panel} parent - The parent panel to check the currently focused one against. This doesn't need to be a direct parent (focused panel can be a child of a child and so on). * @returns {boolean} - Whether or not the focused panel is a child of the passed one. **/ export function FocusedHasParent(this: void, parent: Panel): boolean /** * * Returns whenever the cursor is currently active and visible. * * @name vgui.CursorVisible * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/CursorVisible * @param {void} this - no description * @returns {boolean} - isCursorVisible **/ export function CursorVisible(this: void): boolean /** * * Creates a engine panel. * * @name vgui.CreateX * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/CreateX * @internal * @param {void} this - no description * @param {string} cls - Class of the panel to create * @param {Panel} parent - If specified, parents created panel to given one * @param {string} name - Name of the created panel * @returns {Panel} - Created panel **/ export function CreateX(this: void, cls: string, parent?: Panel, name?: string): Panel /** * * Creates a panel from table. * * @name vgui.CreateFromTable * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/CreateFromTable * @param {void} this - no description * @param {table} metatable - Your PANEL table * @param {Panel} parent - Which panel to parent the newly created panel to * @param {string} name - Name of your panel * @returns {Panel} - Created panel **/ export function CreateFromTable(this: void, metatable: table, parent?: Panel, name?: string): Panel /** * * Creates a panel by the specified classname. * * @name vgui.Create * @realm client, menu * @wiki https://wiki.garrysmod.com/page/vgui/Create * @param {void} this - no description * @param {string} classname - Classname of the panel to create. Valid classnames are listed at: [VGUI Element List](https://wiki.garrysmod.com/page/VGUI%20Element%20List). * @param {Panel} parent - Parent of the created panel. * @param {string} name - Name of the created panel. * @returns {Panel} - panel **/ export function Create(this: void, classname: string, parent?: Panel, name?: string): Panel } declare namespace util { /** * * Converts a type to a (nice, but still parsable) string * * @name util.TypeToString * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/TypeToString * @param {void} this - no description * @param {any} input - What to convert * @returns {string} - Converted string **/ export function TypeToString(this: void, input: any): string /** * * Performs a trace with the given trace data. * * @name util.TraceLine * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/TraceLine * @note Clientside entities will not be hit by traces. * @param {void} this - no description * @param {Trace} TraceData - The trace data to use. See @Trace structure * @returns {TraceResult} - Trace result. See @TraceResult structure. * Can return nil if @game.GetWorld or its [physics object](https://wiki.garrysmod.com/page/Entity/GetPhysicsObject) is invalid. This will be the case for any traces done before @GamemodeHooks:InitPostEntity is called. **/ export function TraceLine(this: void, TraceData: Trace): TraceResult /** * * Performs an AABB hull (axis-aligned bounding box, aka not rotated) trace with the given trace data. * * @name util.TraceHull * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/TraceHull * @note Clientside entities will not be hit by traces. * @note This function may not always give desired results clientside due to certain physics mechanisms not existing on the client. Use it serverside for accurate results. * @param {void} this - no description * @param {HullTrace} TraceData - The trace data to use. See @HullTrace structure * @returns {TraceResult} - Trace result. See @TraceResult structure **/ export function TraceHull(this: void, TraceData: HullTrace): TraceResult /** * * Traces from one entity to another. * * @name util.TraceEntityHull * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/TraceEntityHull * @param {void} this - no description * @param {Entity} ent1 - The first entity to trace from * @param {Entity} ent2 - The second entity to trace to * @returns {TraceResult} - Trace result. See @TraceResult structure **/ export function TraceEntityHull(this: void, ent1: Entity, ent2: Entity): TraceResult /** * * Runs a trace using the entity's collisionmodel between two points. This does not take the entity's angles into account and will trace its unrotated collisionmodel. * * @name util.TraceEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/TraceEntity * @note Clientside entities will not be hit by traces. * @param {void} this - no description * @param {Trace} tracedata - Trace data. See @Trace structure * @param {Entity} ent - The entity to use * @returns {TraceResult} - Trace result. See @TraceResult structure **/ export function TraceEntity(this: void, tracedata: Trace, ent: Entity): TraceResult /** * * Converts string or a number to a bool, if possible. Alias of @tobool function. * * @name util.tobool * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/tobool * @param {void} this - no description * @param {any} input - A string or a number to convert. * @returns {boolean} - False if the input is equal to the string or boolean "false", if the input is equal to the string or number "0", or if the input is nil. Returns true otherwise. **/ export function tobool(this: void, input: any): boolean /** * * Returns the time since this function has been last called * * @name util.TimerCycle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/TimerCycle * @param {void} this - no description * @returns {number} - Time since this function has been last called in ms **/ export function TimerCycle(this: void): number /** * * Creates a timer object. * * @name util.Timer * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/Timer * @param {void} this - no description * @param {number} startdelay - How long you want the timer to be. * @returns {table} - A timer object. It has next methods: * ;Reset() - Resets the timer to nothing * ;Start( time ) - Starts the timer, call with end time * ;Started() - Returns true if the timer has been started * ;Elapsed() - Returns true if the time has elapsed **/ export function Timer(this: void, startdelay?: number): table /** * * Converts the given table into a key value string. * * @name util.TableToKeyValues * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/TableToKeyValues * @param {void} this - no description * @param {table} table - The table to convert. * @returns {string} - KeyValueString **/ export function TableToKeyValues(this: void, table: table): string /** * * Converts a table to a JSON string. * * @name util.TableToJSON * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/TableToJSON * @warning All integers will be converted to decimals (5 -> 5.0). * @warning All keys are strings in the JSON format, so all keys will be converted to strings! * @bug #3561 This will produce invalid JSON if the provided table contains nan or inf values. * @param {void} this - no description * @param {table} table - Table to convert. * @param {boolean} prettyPrint - Format and indent the JSON. * @returns {string} - A JSON formatted string containing the serialized data **/ export function TableToJSON(this: void, table: table, prettyPrint?: boolean): string /** * * Given a STEAM_0 style Steam ID will return a 64bit Steam ID * * @name util.SteamIDTo64 * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/SteamIDTo64 * @param {void} this - no description * @param {string} id - The STEAM_0 style id * @returns {string} - 64bit Steam ID **/ export function SteamIDTo64(this: void, id: string): string /** * * Converts a string to the specified type. * This can be useful when dealing with ConVars. * * @name util.StringToType * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/StringToType * @param {void} this - no description * @param {string} str - The string to convert * @param {string} typename - The type to attempt to convert the string to. This can be vector, angle, float, int, bool, or string (case insensitive). * @returns {any} - The result of the conversion, or nil if a bad type is specified. **/ export function StringToType(this: void, str: string, typename: string): any /** * * Given a 64bit SteamID will return a STEAM_0: style Steam ID * * @name util.SteamIDFrom64 * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/SteamIDFrom64 * @param {void} this - no description * @param {string} id - The 64 bit Steam ID * @returns {string} - STEAM_0 style Steam ID **/ export function SteamIDFrom64(this: void, id: string): string /** * * Returns a new @Stack type object * * @name util.Stack * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/Stack * @param {void} this - no description * @returns {Stack} - A brand new stack object **/ export function Stack(this: void): Stack /** * * Adds a trail to the specified entity. * * @name util.SpriteTrail * @realm server * @wiki https://wiki.garrysmod.com/page/util/SpriteTrail * @param {void} this - no description * @param {Entity} ent - Entity to attach trail to * @param {number} attachmentID - Attachment ID of the entitiys model to attach trail to. If you are not sure, set this to 0 * @param {Color} color - Color of the trail, use @Color function * @param {boolean} additive - Should the trail be additive or not * @param {number} startWidth - Start width of the trail * @param {number} endWidth - End width of the trail * @param {number} lifetime - How long it takes to transition from startWidth to endWidth * @param {number} textureRes - The resolution of trails texture. A good value can be calculated using this formula: 1 / ( startWidth + endWidth ) * 0.5 * @param {string} texture - Path to the texture to use as a trail. * @returns {Entity} - Entity of created trail ([env_spritetrail](https://developer.valvesoftware.com/wiki/Env_spritetrail)) **/ export function SpriteTrail(this: void, ent: Entity, attachmentID: number, color: Color, additive: boolean, startWidth: number, endWidth: number, lifetime: number, textureRes: number, texture: string): Entity /** * * Generates a random float value that should be the same on client and server. * * @name util.SharedRandom * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/SharedRandom * @note This function is best used in a [Predicted Hook](https://wiki.garrysmod.com/page/Category:Predicted_Hooks) * @param {void} this - no description * @param {string} uniqueName - The seed for the random value * @param {number} min - The minimum value of the random range * @param {number} max - The maximum value of the random range * @param {number} additionalSeed - The additional seed * @returns {number} - The random float value **/ export function SharedRandom(this: void, uniqueName: string, min: number, max: number, additionalSeed?: number): number /** * * Sets PData for offline player using his SteamID * * @name util.SetPData * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/SetPData * @warning This function internally uses @Player:UniqueID, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information. * @param {void} this - no description * @param {string} steamID - SteamID of the player * @param {string} name - Variable name to store the value in * @param {any} value - The value to store * @returns {void} **/ export function SetPData(this: void, steamID: string, name: string, value: any): void /** * * Makes the screen shake * * @name util.ScreenShake * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/ScreenShake * @note Does nothing on client. * @note Does nothing on client. * @param {void} this - no description * @param {Vector} pos - The origin of the effect. * @param {number} amplitude - The strength of the effect * @param {number} frequency - The frequency of the effect in hz * @param {number} duration - The duration of the effect in seconds * @param {number} radius - The range from the origin within which views will be affected, in Hammer Units * @returns {void} **/ export function ScreenShake(this: void, pos: Vector, amplitude: number, frequency: number, duration: number, radius: number): void /** * * Removes PData of offline player using his SteamID * * @name util.RemovePData * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/RemovePData * @warning This function internally uses @Player:UniqueID, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information. * @param {void} this - no description * @param {string} steamID - SteamID of the player * @param {string} name - Variable name to remove * @returns {void} **/ export function RemovePData(this: void, steamID: string, name: string): void /** * * Returns the absolute system path the file relative to /garrysmod/. * * @name util.RelativePathToFull * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/RelativePathToFull * @param {void} this - no description * @param {string} file - The file to get the absolute path of. * @returns {string} - absolutePath **/ export function RelativePathToFull(this: void, file: string): string /** * * Performs a trace with the given origin, direction and filter. * * @name util.QuickTrace * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/QuickTrace * @param {void} this - no description * @param {Vector} origin - The origin of the trace. * @param {Vector} endpos - The end point of the trace, relative to the start. * This is the direction of the trace times the distance of the trace. * @param {Entity} filter - Entity which should be ignored by the trace. Can also be a table of entities or a function - see @Trace structure. * @returns {TraceResult} - Trace result. See @TraceResult structure. **/ export function QuickTrace(this: void, origin: Vector, endpos: Vector, filter?: Entity): TraceResult /** * * Precaches a sound for later use. Sound is cached after being loaded once. * * @name util.PrecacheSound * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/PrecacheSound * @note Soundcache is limited to 16384 unique sounds. * @bug Positively broken on purpose because it fills stringtables * @bug Ultimately does nothing on client, and only works with sound scripts, not direct paths * @param {void} this - no description * @param {string} soundName - The sound to precache. * @returns {void} **/ export function PrecacheSound(this: void, soundName: string): void /** * * Precaches a model for later use. Model is cached after being loaded once. * * @name util.PrecacheModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/PrecacheModel * @warning Modelprecache is limited to 4096 unique models. When it reaches the limit the game will crash. * @param {void} this - no description * @param {string} modelName - The model to precache. * @returns {void} **/ export function PrecacheModel(this: void, modelName: string): void /** * * Returns the contents of the position specified. * * @name util.PointContents * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/PointContents * @param {void} this - no description * @param {Vector} position - Position to get the contents sample from. * @returns {CONTENTS} - Contents bitflag, see @CONTENTS enum **/ export function PointContents(this: void, position: Vector): CONTENTS /** * * Returns the visibility of a sphere in the world. * * @name util.PixelVisible * @realm client * @wiki https://wiki.garrysmod.com/page/util/PixelVisible * @warning Don't use the same handle twice per tick or it will give unpredictable results. * @param {void} this - no description * @param {Vector} position - The center of the visibility test. * @param {number} radius - The radius of the sphere to check for visibility. * @param {pixelvis_handle_t} PixVis - The PixVis handle created with @util.GetPixelVisibleHandle. * @returns {number} - Visibility, ranges from 0-1. 0 when none of the area is visible, 1 when all of it is visible. **/ export function PixelVisible(this: void, position: Vector, radius: number, PixVis: pixelvis_handle_t): number /** * * Creates a tracer effect with the given parameters. * * @name util.ParticleTracerEx * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/ParticleTracerEx * @param {void} this - no description * @param {string} name - The name of the tracer effect. * @param {Vector} startPos - The start position of the tracer. * @param {Vector} endPos - The end position of the tracer. * @param {boolean} doWhiz - Play the hit miss(whiz) sound. * @param {number} entityIndex - Entity index of the emitting entity. * @param {number} attachmentIndex - Attachment index to be used as origin. * @returns {void} **/ export function ParticleTracerEx(this: void, name: string, startPos: Vector, endPos: Vector, doWhiz: boolean, entityIndex: number, attachmentIndex: number): void /** * * Creates a tracer effect with the given parameters. * * @name util.ParticleTracer * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/ParticleTracer * @param {void} this - no description * @param {string} name - The name of the tracer effect. * @param {Vector} startPos - The start position of the tracer. * @param {Vector} endPos - The end position of the tracer. * @param {boolean} doWhiz - Play the hit miss(whiz) sound. * @returns {void} **/ export function ParticleTracer(this: void, name: string, startPos: Vector, endPos: Vector, doWhiz: boolean): void /** * * Formats a float by stripping off extra 0's and .'s * * @name util.NiceFloat * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/NiceFloat * @param {void} this - no description * @param {number} float - The float to format * @returns {string} - Formatted float **/ export function NiceFloat(this: void, float: number): string /** * * Returns the networked ID associated with the given string from the string table. * * @name util.NetworkStringToID * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/NetworkStringToID * @param {void} this - no description * @param {string} networkString - String to get the associated networked ID from. * @returns {number} - The networked ID of the string, or 0 if it hasn't been networked with @util.AddNetworkString. **/ export function NetworkStringToID(this: void, networkString: string): number /** * * Returns the networked string associated with the given ID from the string table. * * @name util.NetworkIDToString * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/NetworkIDToString * @param {void} this - no description * @param {number} stringTableID - ID to get the associated string from. * @returns {string} - The networked string, or nil if it wasn't found. **/ export function NetworkIDToString(this: void, stringTableID: number): string /** * * Returns a vector in world coordinates based on an entity and local coordinates * * @name util.LocalToWorld * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/LocalToWorld * @param {void} this - no description * @param {Entity} ent - The entity lpos is local to * @param {Vector} lpos - Coordinates local to the ent * @param {number} bonenum - The bonenumber of the ent lpos is local to * @returns {Vector} - wpos **/ export function LocalToWorld(this: void, ent: Entity, lpos: Vector, bonenum: number): Vector /** * * Similar to @util.KeyValuesToTable but it also preserves order of keys. * * @name util.KeyValuesToTablePreserveOrder * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/KeyValuesToTablePreserveOrder * @param {void} this - no description * @param {string} keyvals - The key value string * @param {boolean} usesEscapeSequences - If set to true, will replace \t, \n, \" and \\ in the input text with their escaped variants * @param {boolean} preserveKeyCase - Whether we should preserve key case or not. * @returns {table} - The output table **/ export function KeyValuesToTablePreserveOrder(this: void, keyvals: string, usesEscapeSequences?: boolean, preserveKeyCase?: boolean): table /** * * Converts a KeyValue string to a Lua table. * * @name util.KeyValuesToTable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/KeyValuesToTable * @note Table keys will not repeat, see @util.KeyValuesToTablePreserveOrder. * @param {void} this - no description * @param {string} keyValues - The KeyValue string to convert. * @param {boolean} usesEscapeSequences - If set to true, will replace \t, \n, \" and \\ in the input text with their escaped variants * @param {boolean} preserveKeyCase - Whether we should preserve key case or not. * @returns {table} - The converted table **/ export function KeyValuesToTable(this: void, keyValues: string, usesEscapeSequences?: boolean, preserveKeyCase?: boolean): table /** * * Converts a JSON string to a Lua table. * * @name util.JSONToTable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/JSONToTable * @warning This function converts keys to numbers whenever possible. * @bug #3561 This will attempt cast the string keys "inf", "nan", "true", and "false" to their respective Lua values. This completely ignores nulls in arrays. * @param {void} this - no description * @param {string} json - The JSON string to convert. * @returns {table} - The table containing converted information. Returns nothing on failure. **/ export function JSONToTable(this: void, json: string): table /** * * Checks if the specified prop is valid. * * @name util.IsValidProp * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/IsValidProp * @param {void} this - no description * @param {string} modelName - Name/Path of the model to check. * @returns {boolean} - Returns true if the specified prop is valid; otherwise false. **/ export function IsValidProp(this: void, modelName: string): boolean /** * * Checks if given numbered physics object of given entity is valid or not. Most useful for ragdolls. * * @name util.IsValidPhysicsObject * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/IsValidPhysicsObject * @param {void} this - no description * @param {Entity} ent - The entity * @param {number} physobj - Number of the physics object to test * @returns {boolean} - true is valid, false otherwise **/ export function IsValidPhysicsObject(this: void, ent: Entity, physobj: number): boolean /** * * Checks if the specified model is valid. * A model is considered invalid in following cases: * * Starts with a space or **maps** * * Doesn't start with **models** * * Contains any of the following: * ** _gestures * ** _animations * ** _postures * ** _gst * ** _pst * ** _shd * ** _ss * ** _anm * ** .bsp * ** cs_fix * * On server: If the model isn't precached, if the model file doesn't exist on the disk * * If precache failed * * Model is the error model * * @name util.IsValidModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/IsValidModel * @param {void} this - no description * @param {string} modelName - Name/Path of the model to check. * @returns {boolean} - Whether the model is valid or not. Returns false clientside if the model is not precached by the server. **/ export function IsValidModel(this: void, modelName: string): boolean /** * * Check whether the skybox is visibile from the point specified. * * @name util.IsSkyboxVisibleFromPoint * @realm client * @wiki https://wiki.garrysmod.com/page/util/IsSkyboxVisibleFromPoint * @note This will always return true in fullbright maps * @param {void} this - no description * @param {Vector} position - The position to check the skybox visibility from. * @returns {boolean} - Whether the skybox is visible from the position. **/ export function IsSkyboxVisibleFromPoint(this: void, position: Vector): boolean /** * * Checks if the model is loaded in the game. * * @name util.IsModelLoaded * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/IsModelLoaded * @param {void} this - no description * @param {string} modelName - Name/Path of the model to check. * @returns {boolean} - Returns true if the model is loaded in the game; otherwise false. **/ export function IsModelLoaded(this: void, modelName: string): boolean /** * * Checks if a certain position in within the world bounds. * * @name util.IsInWorld * @realm server * @wiki https://wiki.garrysmod.com/page/util/IsInWorld * @param {void} this - no description * @param {Vector} position - Position to check. * @returns {boolean} - Whether the vector is in world. **/ export function IsInWorld(this: void, position: Vector): boolean /** * * Performs a [ray-plane intersection](https://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection) and returns the hit position or nil. * * @name util.IntersectRayWithPlane * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/IntersectRayWithPlane * @param {void} this - no description * @param {Vector} rayOrigin - Origin/start position of the ray. * @param {Vector} rayDirection - The direction of the ray. * @param {Vector} planePosition - Any position of the plane. * @param {Vector} planeNormal - The normal vector of the plane. * @returns {Vector} - The position of intersection, nil if not hit. **/ export function IntersectRayWithPlane(this: void, rayOrigin: Vector, rayDirection: Vector, planePosition: Vector, planeNormal: Vector): Vector /** * * Checks if the specified model name points to a valid ragdoll. * * @name util.IsValidRagdoll * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/IsValidRagdoll * @param {void} this - no description * @param {string} ragdollName - Name/Path of the ragdoll model to check. * @returns {boolean} - Returns true if the specified model name points to a valid ragdoll; otherwise false. **/ export function IsValidRagdoll(this: void, ragdollName: string): boolean /** * * Performs a "ray" box intersection and returns position, normal and the fraction. * * @name util.IntersectRayWithOBB * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/IntersectRayWithOBB * @param {void} this - no description * @param {Vector} rayStart - Origin/start position of the ray. * @param {Vector} rayDelta - The ray vector itself. This can be thought of as: the ray end point relative to the start point. * Note that in this implementation, the ray is not infinite - it's only a segment. * @param {Vector} boxOrigin - The center of the box. * @param {Angle} boxAngles - The angles of the box. * @param {Vector} boxMins - The min position of the box. * @param {Vector} boxMaxs - The max position of the box. * @returns {Vector} - Hit position, nil if not hit. * @returns {Vector} - Normal/direction vector, nil if not hit. * @returns {number} - Fraction of trace used, nil if not hit. * @tupleReturn **/ export function IntersectRayWithOBB(this: void, rayStart: Vector, rayDelta: Vector, boxOrigin: Vector, boxAngles: Angle, boxMins: Vector, boxMaxs: Vector): [Vector, Vector, number] /** * * Returns a table of all SteamIDs that have a usergroup. * * @name util.GetUserGroups * @realm server * @wiki https://wiki.garrysmod.com/page/util/GetUserGroups * @note This returns the original usergroups table, changes done to this table are not retroactive and will only affect newly connected users * @param {void} this - no description * @returns {IutilGetUserGroupsReturn} - The table of users. The table consists of SteamID-Table pairs, where the table has 2 fields: **/ export function GetUserGroups(this: void): IutilGetUserGroupsReturn /** * * Returns the name of a surface property at given ID. * See also @util.GetSurfaceData and @util.GetSurfaceIndex for opposite function. * * @name util.GetSurfacePropName * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/GetSurfacePropName * @param {void} this - no description * @param {number} id - Surface property ID. You can get it from @TraceResult structure. * @returns {string} - The name or an empty string if there is no valid surface property at given index. **/ export function GetSurfacePropName(this: void, id: number): string /** * * Returns the matching surface property index for the given surface property name. * See also @util.GetSurfaceData and @util.GetSurfacePropName for opposite function. * * @name util.GetSurfaceIndex * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/GetSurfaceIndex * @param {void} this - no description * @param {string} surfaceName - The name of the surface. * @returns {number} - The surface property index, or -1 if name doesn't correspond to a valid surface property. **/ export function GetSurfaceIndex(this: void, surfaceName: string): number /** * * Returns data of a surface property at given ID. * * @name util.GetSurfaceData * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/GetSurfaceData * @param {void} this - no description * @param {number} id - Surface property ID. You can get it from @TraceResult structure. * @returns {SurfacePropertyData} - The data or no value if there is no valid surface property at given index. * See @SurfacePropertyData structure **/ export function GetSurfaceData(this: void, id: number): SurfacePropertyData /** * * Gets information about the sun position and obstruction or nil if there is no sun. * * @name util.GetSunInfo * @realm client * @wiki https://wiki.garrysmod.com/page/util/GetSunInfo * @param {void} this - no description * @returns {SunInfo} - The sun info. See @SunInfo structure **/ export function GetSunInfo(this: void): SunInfo /** * * Utility function to quickly generate a trace table that starts at the players view position, and ends 16384 units along a specified direction. * * @name util.GetPlayerTrace * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/GetPlayerTrace * @param {void} this - no description * @param {Player} ply - The player the trace should be based on * @param {Vector} dir - The direction of the trace * @returns {Trace} - The trace data. See @Trace structure **/ export function GetPlayerTrace(this: void, ply: Player, dir?: Vector): Trace /** * * Creates a new PixVis handle. See @util.PixelVisible. * * @name util.GetPixelVisibleHandle * @realm client * @wiki https://wiki.garrysmod.com/page/util/GetPixelVisibleHandle * @param {void} this - no description * @returns {pixelvis_handle_t} - PixVis **/ export function GetPixelVisibleHandle(this: void): pixelvis_handle_t /** * * Gets PData of an offline player using their SteamID * * @name util.GetPData * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/GetPData * @warning This function internally uses @Player:UniqueID, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information. * @param {void} this - no description * @param {string} steamID - SteamID of the player * @param {string} name - Variable name to get the value of * @param {string} def - The default value, in case there's nothing stored * @returns {string} - The stored value **/ export function GetPData(this: void, steamID: string, name: string, def: string): string /** * * Returns a table of visual meshes of given model. * See also @EntityHooks:GetRenderMesh. * * @name util.GetModelMeshes * @realm client * @wiki https://wiki.garrysmod.com/page/util/GetModelMeshes * @note This does not work on brush models (***** models) * @param {void} this - no description * @param {string} model - The full path to a model to get the visual meshes of. * @param {number} lod - no description * @param {number} bodygroupMask - no description * @returns {table[]} - A table of tables with the following format: * Each @MeshVertex structure returned also has an extra table of tables field called "weights" with the following data: **/ export function GetModelMeshes(this: void, model: string, lod?: number, bodygroupMask?: number): table[] /** * * Returns a table containing the info about the model. It seems to be not working serverside, but still exists serverside. * * @name util.GetModelInfo * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/GetModelInfo * @note This function will silently fail if used on models with following strings in them: * * _shared * * _anims * * _gestures * * _anim * * _postures * * _gst * * _pst * * _shd * * _ss * * _anm * * _include * @param {void} this - no description * @param {string} mdl - Model path * @returns {IutilGetModelInfoReturn} - The model info as a table with the following keys: **/ export function GetModelInfo(this: void, mdl: string): IutilGetModelInfoReturn /** * * Creates an effect with the specified data. * You can find a list of built-in engine effects [here](https://wiki.garrysmod.com/page/Effects). You can create your own. Example effects can be found [here](https://github.com/garrynewman/garrysmod/tree/master/garrysmod/gamemodes/sandbox/entities/effects) and [here](https://github.com/garrynewman/garrysmod/tree/master/garrysmod/gamemodes/base/entities/effects). * * @name util.Effect * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/Effect * @note When dispatching an effect from the server, some values may be clamped for networking optimizations. Visit the Set accessors on @CEffectData type to see which ones are affected. * @note You will need to couple this function with @IsFirstTimePredicted function should you use this in a [predicted hook](https://wiki.garrysmod.com/page/Category:Predicted_Hooks). * @param {void} this - no description * @param {string} effectName - The name of the effect to create. * @param {CEffectData} effectData - The effect data describing the effect. * @param {boolean} allowOverride - Whether Lua-defined effects should override engine-defined effects with the same name for this/single function call. * @param {CRecipientFilter} ignorePredictionOrRecipientFilter - Can either be a boolean to ignore the prediction filter or a @CRecipientFilter type. * Set this to true if you wish to call this function in multiplayer from server. * @returns {void} **/ export function Effect(this: void, effectName: string, effectData: CEffectData, allowOverride?: boolean, ignorePredictionOrRecipientFilter?: CRecipientFilter): void /** * * Gets the distance between a line and a point in 3d space. * * @name util.DistanceToLine * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/DistanceToLine * @param {void} this - no description * @param {Vector} lineStart - Start of the line. * @param {Vector} lineEnd - End of the line. * @param {Vector} pointPos - The position of the point. * @returns {number} - Distance from line. * @returns {Vector} - Nearest point on line. * @returns {number} - Distance along line from start. * @tupleReturn **/ export function DistanceToLine(this: void, lineStart: Vector, lineEnd: Vector, pointPos: Vector): [number, Vector, number] /** * * Decompresses the given string using [LZMA](https://en.wikipedia.org/wiki/LZMA) algorithm. Used to decompress strings previously compressed with @util.Compress. * * @name util.Decompress * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/Decompress * @param {void} this - no description * @param {string} compressedString - The compressed string to decompress. * @param {number} maxSize - The maximal size in bytes it will decompress. * @returns {string} - The original, decompressed string or an empty string on failure or invalid input. **/ export function Decompress(this: void, compressedString: string, maxSize?: number): string /** * * Gets the full material path by the decal name. Used with @util.DecalEx. * * @name util.DecalMaterial * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/DecalMaterial * @param {void} this - no description * @param {string} decalName - Name of the decal. * @returns {string} - Material path of the decal. **/ export function DecalMaterial(this: void, decalName: string): string /** * * Performs a trace and paints a decal to the surface hit. * * @name util.DecalEx * @realm client * @wiki https://wiki.garrysmod.com/page/util/DecalEx * @note This function has trouble spanning across multiple brushes on the map. * @param {void} this - no description * @param {IMaterial} material - The name of the decal to paint. Can be retrieved with @util.DecalMaterial. * @param {Entity} ent - The entity to apply the decal to * @param {Vector} position - The position of the decal. * @param {Vector} normal - The direction of the decal. * @param {Color} color - The color of the decal. Uses the @IColor structure. * This only works when used on a brush model and only if the decal material has set **$vertexcolor** to 1. * @param {number} w - The width scale of the decal. * @param {number} h - The height scale of the decal. * @returns {void} **/ export function DecalEx(this: void, material: IMaterial, ent: Entity, position: Vector, normal: Vector, color: Color, w: number, h: number): void /** * * Performs a trace and paints a decal to the surface hit. * * @name util.Decal * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/Decal * @param {void} this - no description * @param {string} name - The name of the decal to paint. * @param {Vector} start - The start of the trace. * @param {Vector} end - The end of the trace. * @param {Entity} filter - If set, the decal will not be able to be placed on given entity. Can also be a table of entities. * @returns {void} **/ export function Decal(this: void, name: string, start: Vector, end: Vector, filter?: Entity): void /** * * Returns the current date formatted like '2012-10-31 18-00-00' * * @name util.DateStamp * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/DateStamp * @param {void} this - no description * @returns {string} - date **/ export function DateStamp(this: void): string /** * * Generates the [CRC checksum](https://en.wikipedia.org/wiki/Cyclic%20redundancy%20check) of the specified string. * * @name util.CRC * @realm client, server * @wiki https://wiki.garrysmod.com/page/util/CRC * @param {void} this - no description * @param {string} stringToHash - The string to calculate the checksum of. * @returns {string} - The unsigned 32 bit checksum. **/ export function CRC(this: void, stringToHash: string): string /** * * Compresses the given string using the [LZMA](https://en.wikipedia.org/wiki/LZMA) algorithm. * Use with @net.WriteData and @net.ReadData for networking and @util.Decompress to decompress the data. * * @name util.Compress * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/Compress * @param {void} this - no description * @param {string} str - String to compress. * @returns {string} - The compressed string, or nil if the input string was zero length (""). **/ export function Compress(this: void, str: string): string /** * * Applies spherical damage based on damage info to all entities in the specified radius. * * @name util.BlastDamageInfo * @realm server * @wiki https://wiki.garrysmod.com/page/util/BlastDamageInfo * @param {void} this - no description * @param {CTakeDamageInfo} dmg - The information about the damage * @param {Vector} damageOrigin - Center of the spherical damage * @param {number} damageRadius - The radius in which entities will be damaged. * @returns {void} **/ export function BlastDamageInfo(this: void, dmg: CTakeDamageInfo, damageOrigin: Vector, damageRadius: number): void /** * * Encodes the specified string to base64. * * @name util.Base64Encode * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/Base64Encode * @param {void} this - no description * @param {string} str - String to encode. * @returns {string} - Base 64 encoded string. **/ export function Base64Encode(this: void, str: string): string /** * * Applies explosion damage to all entities in the specified radius. * * @name util.BlastDamage * @realm server * @wiki https://wiki.garrysmod.com/page/util/BlastDamage * @param {void} this - no description * @param {Entity} inflictor - The entity that caused the damage. * @param {Entity} attacker - The entity that attacked. * @param {Vector} damageOrigin - The center of the explosion * @param {number} damageRadius - The radius in which entities will be damaged. * @param {number} damage - The amount of damage to be applied. * @returns {void} **/ export function BlastDamage(this: void, inflictor: Entity, attacker: Entity, damageOrigin: Vector, damageRadius: number, damage: number): void /** * * Function used to calculate aim vector from 2D screen position. It is used in SuperDOF calculate Distance. * Essentially a generic version of @gui.ScreenToVector. * * @name util.AimVector * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/util/AimVector * @param {void} this - no description * @param {Angle} ViewAngles - View angles * @param {number} ViewFOV - View Field of View * @param {number} x - Mouse X position * @param {number} y - Mouse Y position * @param {number} scrWidth - Screen width * @param {number} scrHeight - Screen height * @returns {Vector} - Calculated aim vector **/ export function AimVector(this: void, ViewAngles: Angle, ViewFOV: number, x: number, y: number, scrWidth: number, scrHeight: number): Vector /** * * Adds the specified string to a string table, which will cache it and network it to all clients automatically. * Whenever you want to create a net message with @net.Start, you must add the name of that message as a networked string via this function. * If the passed string already exists, nothing will happen and the ID of the existing item will be returned. * * @name util.AddNetworkString * @realm server * @wiki https://wiki.garrysmod.com/page/util/AddNetworkString * @note Each unique network name needs to be pooled once - do not put this function call into any other functions if you're using a constant string. Preferable place for this function is in a serverside lua file, or in a shared file with the @net.Receive function. * @note The string table used for this function does not interfere with the engine string tables and has 2048 slots. * @param {void} this - no description * @param {string} str - Adds the specified string to the string table. * @returns {number} - The id of the string that was added to the string table. * Same as calling @util.NetworkStringToID. **/ export function AddNetworkString(this: void, str: string): number interface IutilGetUserGroupsReturn { /** * name - {string}: Players name **/ name: string /** * group - {string}: The players user group **/ group: string } interface IutilGetModelInfoReturn { /** * SkinCount - {number}: Identical to @EntityFuncs:SkinCount. **/ SkinCount: number /** * KeyValues - {string}: Valve key-value formatted info about the model's physics (Constraint Info, etc). This is limited to 4096 characters. **/ KeyValues: string /** * ModelKeyValues - {string}: Valve key-value formatted info about the model ($keyvalues command in the .qc of the model), if present **/ ModelKeyValues: string } } declare namespace util.worldpicker { /** * @type util_worldpickerStartCallback * @param {void} this - no description * @param {TraceResult} tr - @TraceResult structure from the mouse press. tr.Entity will return the entity clicked **/ type util_worldpickerStartCallback = (this: void, tr: TraceResult) => unknown /** * * Starts picking an entity in the world. This will suppress the next mouse click, and instead use it as a direction in the trace sent to the callback. * * @name util.worldpicker.Start * @realm client * @wiki https://wiki.garrysmod.com/page/util.worldpicker/Start * @param {void} this - no description * @param {function} callback - Function to call after an entity choice has been made. Argument is: * @returns {void} **/ export function Start(this: void, callback: util_worldpickerStartCallback): void /** * * Finishes the world picking. This is called when a user presses their mouse after calling @util.worldpicker.Start. * * @name util.worldpicker.Finish * @realm client * @wiki https://wiki.garrysmod.com/page/util.worldpicker/Finish * @internal * @param {void} this - no description * @param {TraceResult} tr - @TraceResult structure from the mouse press * @returns {void} **/ export function Finish(this: void, tr: TraceResult): void /** * * Returns if the user is currently picking an entity. * * @name util.worldpicker.Active * @realm client * @wiki https://wiki.garrysmod.com/page/util.worldpicker/Active * @param {void} this - no description * @returns {boolean} - Is world picking **/ export function Active(this: void): boolean } declare namespace utf8 { /** * * Returns the byte-index of the n'th UTF-8-character after the given startPos (nil if none). startPos defaults to 1 when n is positive and -1 when n is negative. If n is zero, this function instead returns the byte-index of the UTF-8-character startPos lies within. * * @name utf8.offset * @realm client, server * @wiki https://wiki.garrysmod.com/page/utf8/offset * @param {void} this - no description * @param {string} str - The string that you will get the byte position from. * @param {number} n - The position to get the beginning byte position from. * @param {number} startPos - The offset for n. * @returns {number} - Starting byte-index of the given position. **/ export function offset(this: void, str: string, n: number, startPos?: number): number /** * * Returns the number of UTF-8 sequences in the given string between positions startPos and endPos (both inclusive). If it finds any invalid UTF-8 byte sequence, returns false as well as the position of the first invalid byte. * * @name utf8.len * @realm client, server * @wiki https://wiki.garrysmod.com/page/utf8/len * @param {void} this - no description * @param {string} str - The string to calculate the length of. * @param {number} startPos - The starting position to get the length from. * @param {number} endPos - The ending position to get the length from. * @returns {number} - The number of UTF-8 characters in the string. If there are invalid bytes, this will be false. * @returns {number} - The position of the first invalid byte. If there were no invalid bytes, this will be nil. * @tupleReturn **/ export function len(this: void, str: string, startPos?: number, endPos?: number): [number, number] /** * * Forces a string to contain only valid UTF-8 data. Invalid sequences are replaced with U+FFFD (the Unicode replacement character). * This is a lazy way for users to ensure a string contains only valid UTF-8 data. * * @name utf8.force * @realm client, server * @wiki https://wiki.garrysmod.com/page/utf8/force * @param {void} this - no description * @param {string} str - The string that will become a valid UTF-8 string. * @returns {string} - The UTF-8 string. **/ export function force(this: void, str: string): string /** * * Returns an iterator (like @string.gmatch) which returns both the position and codepoint of each utf8 character in the string. It raises an error if it meets any invalid byte sequence. * * @name utf8.codes * @realm client, server * @wiki https://wiki.garrysmod.com/page/utf8/codes * @param {void} this - no description * @param {string} str - The string that you will get the codes from. * @returns {function} - The iterator (to be used in a for loop). **/ export function codes(this: void, str: string): UnknownFunc /** * * Returns the codepoints (as numbers) from all characters in the given string that start between byte position startPos and endPos. It raises an error if it meets any invalid byte sequence. This functions similarly to @string.byte. * * @name utf8.codepoint * @realm client, server * @wiki https://wiki.garrysmod.com/page/utf8/codepoint * @param {void} this - no description * @param {string} str - The string that you will get the code(s) from. * @param {number} startPos - The starting byte of the string to get the codepoint of. * @param {number} endPos - The ending byte of the string to get the codepoint of. * @returns {any[]} - The codepoint number(s). **/ export function codepoint(this: void, str: string, startPos?: number, endPos?: number): any[] /** * * Receives zero or more integers, converts each one to its corresponding UTF-8 byte sequence and returns a string with the concatenation of all these sequences. * * @name utf8.char * @realm client, server * @wiki https://wiki.garrysmod.com/page/utf8/char * @param {void} this - no description * @param {any[]} ...codepoints - Unicode code points to be converted in to a UTF-8 string. * @returns {string} - UTF-8 string generated from given arguments. **/ export function char(this: void, ...codepoints: any[]): string } declare namespace usermessage { /** * @type usermessageHookCallback * @param {void} this - no description * @param {bf_read} msg - no description * @param {any[]} ...preArgs - no description **/ type usermessageHookCallback = (this: void, msg: bf_read, ...preArgs: any[]) => unknown /** * * Called by the engine when a usermessage arrives, this method calls the hook function specified by @usermessage.Hook if any. * * @name usermessage.IncomingMessage * @realm client, server * @wiki https://wiki.garrysmod.com/page/usermessage/IncomingMessage * @internal * @param {void} this - no description * @param {string} name - The message name. * @param {bf_read} msg - The message. * @returns {void} **/ export function IncomingMessage(this: void, name: string, msg: bf_read): void /** * * Sets a hook for the specified to be called when a usermessage with the specified name arrives. * * @name usermessage.Hook * @realm client, server * @wiki https://wiki.garrysmod.com/page/usermessage/Hook * @warning Usermessages have a limit of only 256 bytes! * @param {void} this - no description * @param {string} name - The message name to hook to. * @param {function} callback - The function to be called if the specified message was received. * Parameters (Optional): * @param {any[]} ...preArgs - Arguments that are passed to the callback function when the hook is called. *ring ring* * @returns {void} **/ export function Hook(this: void, name: string, callback: usermessageHookCallback, ...preArgs?: any[]): void /** * * Returns a table of every usermessage hook * * @name usermessage.GetTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/usermessage/GetTable * @param {void} this - no description * @returns {table} - hooks **/ export function GetTable(this: void): table } declare namespace undo { /** * * Adds a hook (CPanelPaint) to the control panel paint function so we can determine when it is being drawn. * * @name undo.SetupUI * @realm client * @wiki https://wiki.garrysmod.com/page/undo/SetupUI * @internal * @param {void} this - no description * @returns {void} **/ export function SetupUI(this: void): void /** * * Sets the player which the current undo block belongs to * * @name undo.SetPlayer * @realm server * @wiki https://wiki.garrysmod.com/page/undo/SetPlayer * @param {void} this - no description * @param {Player} ply - The player responsible for undoing the block * @returns {void} **/ export function SetPlayer(this: void, ply: Player): void /** * * Sets a custom undo text for the current undo block * * @name undo.SetCustomUndoText * @realm server * @wiki https://wiki.garrysmod.com/page/undo/SetCustomUndoText * @param {void} this - no description * @param {string} customText - The text to display when the undo block is undone * @returns {void} **/ export function SetCustomUndoText(this: void, customText: string): void /** * * Replaces any instance of the "from" reference with the "to" reference, in any existing undo block. Returns true if something was replaced * * @name undo.ReplaceEntity * @realm server * @wiki https://wiki.garrysmod.com/page/undo/ReplaceEntity * @param {void} this - no description * @param {Entity} from - The old entity * @param {Entity} to - The new entity to replace the old one * @returns {boolean} - somethingReplaced **/ export function ReplaceEntity(this: void, from: Entity, to: Entity): boolean /** * * Makes the UI dirty - it will re-create the controls the next time it is viewed. We also take this opportun * * @name undo.MakeUIDirty * @realm client * @wiki https://wiki.garrysmod.com/page/undo/MakeUIDirty * @internal * @param {void} this - no description * @returns {void} **/ export function MakeUIDirty(this: void): void /** * * Serverside, returns a table containing all undo blocks of all players. Clientside, returns a table of the local player's undo blocks. * * @name undo.GetTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/undo/GetTable * @param {void} this - no description * @returns {table} - The undo table. **/ export function GetTable(this: void): table /** * * Processes an undo block (in table form). This is used internally by the undo manager when a player presses Z. * * @name undo.Do_Undo * @realm server * @wiki https://wiki.garrysmod.com/page/undo/Do Undo * @param {void} this - no description * @param {Undo} tab - The undo block to process as an @Undo structure * @returns {number} - Number of removed entities **/ export function Do_Undo(this: void, tab: Undo): number /** * * Completes an undo entry, and registers it with the player's client * * @name undo.Finish * @realm client, server * @wiki https://wiki.garrysmod.com/page/undo/Finish * @param {void} this - no description * @returns {void} **/ export function Finish(this: void): void /** * * Begins a new undo entry * * @name undo.Create * @realm server * @wiki https://wiki.garrysmod.com/page/undo/Create * @param {void} this - no description * @param {string} name - Name of the undo message to show to players * @returns {void} **/ export function Create(this: void, name: string): void /** * * Adds a function to call when the current undo block is undone * * @name undo.AddFunction * @realm server * @wiki https://wiki.garrysmod.com/page/undo/AddFunction * @param {void} this - no description * @param {function} func - The function to call * @param {any[]} ...arguments - Arguments to pass to the function (after the undo info table) * @returns {void} **/ export function AddFunction(this: void, func: UnknownFunc, ...arguments: any[]): void /** * * Adds an entity to the current undo block * * @name undo.AddEntity * @realm server * @wiki https://wiki.garrysmod.com/page/undo/AddEntity * @param {void} this - no description * @param {Entity} ent - The entity to add * @returns {void} **/ export function AddEntity(this: void, ent: Entity): void } declare namespace umsg { /** * * Writes a vector normal to the usermessage. * * @name umsg.VectorNormal * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/VectorNormal * @param {void} this - no description * @param {Vector} normal - The vector normal to be sent. * @returns {void} **/ export function VectorNormal(this: void, normal: Vector): void /** * * Writes a Vector to the usermessage. * * @name umsg.Vector * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Vector * @param {void} this - no description * @param {Vector} vector - The vector to be sent. * @returns {void} **/ export function Vector(this: void, vector: Vector): void /** * * Starts a new usermessage. * * @name umsg.Start * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Start * @warning Usermessages have a limit of only 256 bytes! * @param {void} this - no description * @param {string} name - The name of the message to be sent. * @param {CRecipientFilter} filter - If passed a player object, it will only be sent to the player, if passed a @CRecipientFilter type of players, it will be sent to all specified players, if passed nil (or another invalid value), the message will be sent to all players. * @returns {void} **/ export function Start(this: void, name: string, filter: CRecipientFilter): void /** * * Writes a null terminated string to the usermessage. * * @name umsg.String * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/String * @param {void} this - no description * @param {string} str - The string to be sent. * @returns {void} **/ export function String(this: void, str: string): void /** * * Writes a signed short (16 bit) to the usermessage. * * @name umsg.Short * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Short * @param {void} this - no description * @param {number} short - The short to be sent. * @returns {void} **/ export function Short(this: void, short: number): void /** * * The string specified will be networked to the client and receive a identifying number, which will be sent instead of the string to optimize networking. * * @name umsg.PoolString * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/PoolString * @param {void} this - no description * @param {string} str - The string to be pooled. * @returns {void} **/ export function PoolString(this: void, str: string): void /** * * Writes a signed int (32 bit) to the usermessage. * * @name umsg.Long * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Long * @param {void} this - no description * @param {number} int - The int to be sent. * @returns {void} **/ export function Long(this: void, int: number): void /** * * Writes a float to the usermessage. * * @name umsg.Float * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Float * @param {void} this - no description * @param {number} float - The float to be sent. * @returns {void} **/ export function Float(this: void, float: number): void /** * * Dispatches the usermessage to the client(s). * * @name umsg.End * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/End * @param {void} this - no description * @returns {void} **/ export function End(this: void): void /** * * Writes an entity object to the usermessage. * * @name umsg.Entity * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Entity * @param {void} this - no description * @param {Entity} entity - The entity to be sent. * @returns {void} **/ export function Entity(this: void, entity: Entity): void /** * * Writes an angle to the usermessage. * * @name umsg.Angle * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Angle * @param {void} this - no description * @param {Angle} angle - The angle to be sent. * @returns {void} **/ export function Angle(this: void, angle: Angle): void /** * * Writes a signed char to the usermessage. * * @name umsg.Char * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Char * @param {void} this - no description * @param {number} char - The char to be sent. * @returns {void} **/ export function Char(this: void, char: number): void /** * * Writes a bool to the usermessage. * * @name umsg.Bool * @realm server * @wiki https://wiki.garrysmod.com/page/umsg/Bool * @param {void} this - no description * @param {boolean} bool - The bool to be sent. * @returns {void} **/ export function Bool(this: void, bool: boolean): void } declare namespace timer { /** * * Unpauses the timer. * * @name timer.UnPause * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/UnPause * @param {void} this - no description * @param {any} identifier - Identifier of the timer. * @returns {boolean} - false if the timer didn't exist or was already running, true otherwise. **/ export function UnPause(this: void, identifier: any): boolean /** * * Runs either @timer.Pause or @timer.UnPause based on the timer's current status. * * @name timer.Toggle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Toggle * @param {void} this - no description * @param {any} identifier - Identifier of the timer. * @returns {boolean} - status of the timer. **/ export function Toggle(this: void, identifier: any): boolean /** * * Returns amount of time left (in seconds) before the timer executes its function. * * @name timer.TimeLeft * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/TimeLeft * @note If the timer is paused, the amount will be negative. * @param {void} this - no description * @param {any} identifier - Identifier of the timer. * @returns {number} - The amount of time left (in seconds). **/ export function TimeLeft(this: void, identifier: any): number /** * * Restarts the given timer. * * @name timer.Start * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Start * @note Timers use @CurTime function for timing. * @warning Timers won't advance while the client is timing out from the server. * @param {void} this - no description * @param {any} identifier - Identifier of the timer. * @returns {boolean} - true if the timer exists, false if it doesn't. **/ export function Start(this: void, identifier: any): boolean /** * * Stops the given timer and rewinds it. * * @name timer.Stop * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Stop * @param {void} this - no description * @param {any} identifier - Identifier of the timer. * @returns {boolean} - false if the timer didn't exist or was already stopped, true otherwise. **/ export function Stop(this: void, identifier: any): boolean /** * * Creates a simple timer that runs the given function after a specified delay. * For a more advanced version that you can control after creation, see @timer.Create. * * @name timer.Simple * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Simple * @note Timers use @CurTime function for timing. * @warning Timers won't advance while the client is timing out from the server. * @param {void} this - no description * @param {number} delay - How long until the function should be ran (in seconds). Use 0 to have the function run in the next @GamemodeHooks:Think. * @param {function} func - The function to run after the specified delay. * @returns {void} **/ export function Simple(this: void, delay: number, func: UnknownFunc): void /** * * Returns amount of repetitions/executions left before the timer destroys itself. * * @name timer.RepsLeft * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/RepsLeft * @param {void} this - no description * @param {any} identifier - Identifier of the timer. * @returns {number} - The amount of executions left. **/ export function RepsLeft(this: void, identifier: any): number /** * * Pauses the given timer. * * @name timer.Pause * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Pause * @param {void} this - no description * @param {any} identifier - Identifier of the timer. * @returns {boolean} - false if the timer didn't exist or was already paused, true otherwise. **/ export function Pause(this: void, identifier: any): boolean /** * * Returns whenever the given timer exists or not. * * @name timer.Exists * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Exists * @param {void} this - no description * @param {string} identifier - Identifier of the timer. * @returns {boolean} - Returns true if the timer exists, false if it doesn't **/ export function Exists(this: void, identifier: string): boolean /** * * Stops and destroys the given timer. Alias of @timer.Remove. * * @name timer.Destroy * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Destroy * @param {void} this - no description * @param {string} identifier - Identifier of the timer to destroy. * @returns {void} **/ export function Destroy(this: void, identifier: string): void /** * * Creates a new timer that will repeat its function given amount of times. * This function also requires the timer to be named, which allows you to control it after it was created via the @timer library. * For a simple one-time timer with no identifiers, see @timer.Simple. * * @name timer.Create * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Create * @note Timers use @CurTime function for timing. * @warning Timers won't advance while the client is timing out from the server. * @param {void} this - no description * @param {string} identifier - Identifier of the timer to create. Must be unique. If a timer already exists with the same identifier, that timer will be updated to the new settings and reset. * @param {number} delay - The delay interval in seconds. If the delay is too small, the timer will fire on the next frame/tick. * @param {number} repetitions - The number of times to repeat the timer. Enter 0 for infinite repetitions. * @param {function} func - Function called when timer has finished the countdown. * @returns {void} **/ export function Create(this: void, identifier: string, delay: number, repetitions: number, func: UnknownFunc): void /** * * This function does nothing. * * @name timer.Check * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Check * @param {void} this - no description * @returns {void} **/ export function Check(this: void): void /** * * Adjusts the timer if the timer with the given identifier exists. * * @name timer.Adjust * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Adjust * @param {void} this - no description * @param {any} identifier - Identifier of the timer to adjust. * @param {number} delay - The delay interval in seconds. * @param {number} repetitions - Repetitions. Use 0 for infinite. * @param {function} func - The new function. * @returns {boolean} - true if succeeded **/ export function Adjust(this: void, identifier: any, delay: number, repetitions: number, func: UnknownFunc): boolean /** * * Stops and removes a timer created by @timer.Create. * * @name timer.Remove * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/timer/Remove * @param {void} this - no description * @param {string} identifier - Identifier of the timer to remove. * @returns {void} **/ export function Remove(this: void, identifier: string): void } declare namespace team { /** * * Returns true if the given team index is valid * * @name team.Valid * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/Valid * @param {void} this - no description * @param {number} index - Index of the team * @returns {boolean} - Is valid **/ export function Valid(this: void, index: number): boolean /** * * Get's the total frags in a team. * * @name team.TotalFrags * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/TotalFrags * @param {void} this - no description * @param {Entity} Entity_or_number - Entity or number. * @returns {number} - index **/ export function TotalFrags(this: void, Entity_or_number: Entity): number /** * * Returns the sum of deaths of all players of the team. * * @name team.TotalDeaths * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/TotalDeaths * @param {void} this - no description * @param {number} teamIndex - The team index. * @returns {number} - deathCount **/ export function TotalDeaths(this: void, teamIndex: number): number /** * * Creates a new team. * * @name team.SetUp * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/SetUp * @param {void} this - no description * @param {number} teamIndex - The team index. * @param {string} teamName - The team name. * @param {Color} teamColor - The team color. Uses the @IColor structure. * @param {boolean} isJoinable - Whether the team is joinable or not. * @returns {void} **/ export function SetUp(this: void, teamIndex: number, teamName: string, teamColor: Color, isJoinable?: boolean): void /** * * Sets valid spawnpoint classes for use by a team. * * @name team.SetSpawnPoint * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/SetSpawnPoint * @note GM.TeamBased must be set to true for this to work * @param {void} this - no description * @param {number} index - Index of the team * @param {any} classes - A spawnpoint classname or table of spawnpoint classnames * @returns {void} **/ export function SetSpawnPoint(this: void, index: number, classes: any): void /** * * Sets the team's color. * * @name team.SetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/SetColor * @param {void} this - no description * @param {number} teamIndex - The team index. * @param {Color} color - The team's new color as a @IColor structure. * @returns {void} **/ export function SetColor(this: void, teamIndex: number, color: Color): void /** * * Sets the score of the given team * * @name team.SetScore * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/SetScore * @param {void} this - no description * @param {number} index - Index of the team * @param {number} score - The team's new score * @returns {void} **/ export function SetScore(this: void, index: number, score: number): void /** * * Returns if a team is joinable or not. This is set in @team.SetUp. * * @name team.Joinable * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/Joinable * @param {void} this - no description * @param {number} index - The index of the team. * @returns {boolean} - True if the team is joinable. False otherwise. **/ export function Joinable(this: void, index: number): boolean /** * * Returns the amount of players in a team. * * @name team.NumPlayers * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/NumPlayers * @param {void} this - no description * @param {number} teamIndex - The team index. * @returns {number} - playerCount **/ export function NumPlayers(this: void, teamIndex: number): number /** * * Sets valid classes for use by a team. Classes can be created using @player_manager.RegisterClass * * @name team.SetClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/SetClass * @param {void} this - no description * @param {number} index - Index of the team * @param {any} classes - A class ID or table of class IDs * @returns {void} **/ export function SetClass(this: void, index: number, classes: any): void /** * * Returns a table of valid spawnpoint entities the team can use. These are set with @team.SetSpawnPoint. * * @name team.GetSpawnPoints * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetSpawnPoints * @param {void} this - no description * @param {number} index - Index of the team * @returns {table} - Valid spawnpoint entities **/ export function GetSpawnPoints(this: void, index: number): table /** * * Returns a table of valid spawnpoint classes the team can use. These are set with @team.SetSpawnPoint. * * @name team.GetSpawnPoint * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetSpawnPoint * @param {void} this - no description * @param {number} index - Index of the team * @returns {table} - Valid spawnpoint classes **/ export function GetSpawnPoint(this: void, index: number): table /** * * Returns the score of the team. * * @name team.GetScore * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetScore * @param {void} this - no description * @param {number} teamIndex - The team index. * @returns {number} - score **/ export function GetScore(this: void, teamIndex: number): number /** * * Returns the name of the team. * * @name team.GetName * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetName * @param {void} this - no description * @param {number} teamIndex - The team index. * @returns {string} - The team name. If the team is not defined, returns an empty string. **/ export function GetName(this: void, teamIndex: number): string /** * * Returns a table with all player of the specified team. * * @name team.GetPlayers * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetPlayers * @param {void} this - no description * @param {number} teamIndex - The team index. * @returns {Player[]} - A table of @Player types that belong to the requested team. **/ export function GetPlayers(this: void, teamIndex: number): Player[] /** * * Returns the selectable classes for the given team. This can be added to with [team/SetClass](https://wiki.garrysmod.com/page/team/SetClass) * * @name team.GetClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetClass * @param {void} this - no description * @param {number} index - Index of the team * @returns {table} - Selectable classes **/ export function GetClass(this: void, index: number): table /** * * Returns a table consisting of information on every defined team * * @name team.GetAllTeams * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetAllTeams * @param {void} this - no description * @returns {table} - Team info **/ export function GetAllTeams(this: void): table /** * * Returns the team index of the team with the least players. Falls back to TEAM_UNASSIGNED * * @name team.BestAutoJoinTeam * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/BestAutoJoinTeam * @param {void} this - no description * @returns {number} - Team index **/ export function BestAutoJoinTeam(this: void): number /** * * Increases the score of the given team * * @name team.AddScore * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/AddScore * @param {void} this - no description * @param {number} index - Index of the team * @param {number} increment - Amount to increase the team's score by * @returns {void} **/ export function AddScore(this: void, index: number, increment: number): void /** * * Returns the team's color. * * @name team.GetColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/team/GetColor * @param {void} this - no description * @param {number} teamIndex - The team index. * @returns {IColor} - The team's color as a @IColor structure. **/ export function GetColor(this: void, teamIndex: number): IColor } declare namespace table { /** * @type tableForEachCallback * @param {void} this - no description * @param {any} key - no description * @param {any} value - no description **/ type tableForEachCallback = (this: void, key: any, value: any) => unknown /** * * Converts a table into a string * * @name table.ToString * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/ToString * @param {void} this - no description * @param {table} tbl - The table to iterate over. * @param {string} displayName - Optional. A name for the table. * @param {boolean} niceFormatting - Adds new lines and tabs to the string. * @returns {string} - The table formatted as a string. **/ export function ToString(this: void, tbl: table, displayName: string, niceFormatting: boolean): string /** * * Sorts a table in reverse order from @table.sort * * @name table.SortDesc * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/SortDesc * @param {void} this - no description * @param {table} tbl - The table to sort in descending order. * @returns {table} - sorted **/ export function SortDesc(this: void, tbl: table): table /** * * Sorts a table by a named member * * @name table.SortByMember * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/SortByMember * @param {void} this - no description * @param {table} tab - Table to sort * @param {any} memberKey - The key used to identify the member * @param {boolean} ascending - Whether or not the order should be ascending * @returns {void} **/ export function SortByMember(this: void, tab: table, memberKey: any, ascending?: boolean): void /** * * Sorts a table either ascending or by the given sort function. * * @name table.sort * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/sort * @param {void} this - no description * @param {table} tbl - The table to sort. * @param {function} sorter - If specified, the function will be called with 2 parameters each. * Return true in this function if you want the first parameter to come first in the sorted array. * @returns {void} **/ export function sort(this: void, tbl: table, sorter: UnknownFunc): void /** * * Returns a list of keys sorted based on values of those keys. * For normal sorting see @table.sort. * * @name table.SortByKey * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/SortByKey * @param {void} this - no description * @param {table} tab - Table to sort. All values of this table must be of same type. * @param {boolean} descending - Should the order be descending? * @returns {table} - A table of keys sorted by values from supplied table. **/ export function SortByKey(this: void, tab: table, descending?: boolean): table /** * * Converts @Vector types, @Angle types and @boolean types to be able to be converted to and from key-values. @table.DeSanitise does the opposite * * @name table.Sanitise * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Sanitise * @param {void} this - no description * @param {table} tab - Table to sanitise * @returns {table} - Sanitised table **/ export function Sanitise(this: void, tab: table): table /** * * Returns a reversed copy of a sequential table. Any non-sequential and non-numeric keyvalue pairs will not be copied. * * @name table.Reverse * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Reverse * @param {void} this - no description * @param {table} tbl - Table to reverse. * @returns {table} - A reversed copy of the table. **/ export function Reverse(this: void, tbl: table): table /** * * Removes the first instance of a given value from the specified table with @table.remove, then returns the key that the value was found at. * * @name table.RemoveByValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/RemoveByValue * @param {void} this - no description * @param {table} tbl - The table that will be searched. * @param {any} val - The value to find within the table. * @returns {any} - The key at which the value was found, or false if the value was not found. **/ export function RemoveByValue(this: void, tbl: table, val: any): any /** * * Removes a value from a table and shifts any other values down to fill the gap. * * @name table.remove * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/remove * @param {void} this - no description * @param {table} tbl - The table to remove the value from. * @param {number} index - The index of the value to remove. * @returns {any} - The value that was removed. **/ export function remove(this: void, tbl: table, index?: number): any /** * * Merges the contents of the second table with the content in the first one. * See @table.Inherit, which doesn't override existing values. * See also @table.Add, which simply adds values of one table to another. * * @name table.Merge * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Merge * @param {void} this - no description * @param {table} destination - The table you want the source table to merge with * @param {table} source - The table you want to merge with the destination table * @returns {table} - Destination table **/ export function Merge(this: void, destination: table, source: table): table /** * * Returns the highest numerical key. * * @name table.maxn * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/maxn * @param {void} this - no description * @param {table} tbl - The table to search. * @returns {number} - The highest numerical key. **/ export function maxn(this: void, tbl: table): number /** * * Returns a random value from the supplied table. * * @name table.Random * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Random * @note This function iterates over the given table **twice**, therefore with sequential tables you should instead use following: * ```mytable[ math.random( #mytable ) ]``` * @param {void} this - no description * @param {table} haystack - The table to choose from. * @returns {any} - A random value from the table. * @returns {any} - The key associated with the random value. * @tupleReturn **/ export function Random(this: void, haystack: table): [any, any] /** * * Returns a copy of the input table with all string keys converted to be lowercase recursively * * @name table.LowerKeyNames * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/LowerKeyNames * @param {void} this - no description * @param {table} tbl - Table to convert * @returns {table} - New table **/ export function LowerKeyNames(this: void, tbl: table): table /** * * Returns a table of keys containing the supplied value * * @name table.KeysFromValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/KeysFromValue * @param {void} this - no description * @param {table} tab - Table to search * @param {any} value - Value to search for * @returns {table} - Keys **/ export function KeysFromValue(this: void, tab: table, value: any): table /** * * Returns the first key found to be containing the supplied value * * @name table.KeyFromValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/KeyFromValue * @param {void} this - no description * @param {table} tab - Table to search * @param {any} value - Value to search for * @returns {any} - Key **/ export function KeyFromValue(this: void, tab: table, value: any): any /** * * Returns whether or not the given table is empty. * This works on both sequential and non-sequential tables, and is a lot faster to use than table.Count(tbl) == 0```. * * @name table.IsEmpty * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/IsEmpty * @param {void} this - no description * @param {table} tab - Table to check * @returns {boolean} - Is empty **/ export function IsEmpty(this: void, tab: table): boolean /** * * Returns whether or not the table's keys are sequential * * @name table.IsSequential * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/IsSequential * @param {void} this - no description * @param {table} tab - Table to check * @returns {boolean} - Is sequential **/ export function IsSequential(this: void, tab: table): boolean /** * * Inserts a value into a table at the end of the table or at the given position. * * @name table.insert * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/insert * @param {void} this - no description * @param {table} tbl - The table to insert the variable into. * @param {number} position - The position in the table to insert the variable. If the third argument is nil this argument becomes the value to insert at the end of given table. * @param {any} value - The variable to insert into the table. * @returns {number} - The index the object was placed at. **/ export function insert(this: void, tbl: table, position: number, value: any): number /** * * Copies any missing data from base to target, and sets the target's *BaseClass* member to the base table's pointer. * See @table.Merge, which overrides existing values and doesn't add a BaseClass member. * See also @table.Add, which simply adds values of one table to another. * * @name table.Inherit * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Inherit * @bug Sub-tables aren't inherited. The target's table value will take priority. * @param {void} this - no description * @param {table} target - Table to copy data to * @param {table} base - Table to copy data from * @returns {table} - Target **/ export function Inherit(this: void, target: table, base: table): table /** * * Checks if a table has a value. * * @name table.HasValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/HasValue * @note For optimization, functions that look for a value by sorting the table should never be needed if you work on a table that you built yourself. * @warning This function is **very inefficient for large tables** (O(n)) and should probably not be called in things that run each frame. Instead, consider a table structure such as example 2 below. * @param {void} this - no description * @param {table} tbl - Table to check * @param {any} value - Value to search for * @returns {boolean} - Returns true if the table has that value, false otherwise **/ export function HasValue(this: void, tbl: table, value: any): boolean /** * * Returns a key of the supplied table with the highest number value. * * @name table.GetWinningKey * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/GetWinningKey * @param {void} this - no description * @param {table} inputTable - The table to search in. * @returns {any} - winningKey **/ export function GetWinningKey(this: void, inputTable: table): any /** * * Returns the last value found in the given table * * @name table.GetLastValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/GetLastValue * @param {void} this - no description * @param {table} tab - Table to retrieve value from * @returns {any} - Value **/ export function GetLastValue(this: void, tab: table): any /** * * Returns the length of the table. * * @name table.getn * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/getn * @param {void} this - no description * @param {table} tbl - The table to check. * @returns {number} - Sequential length. **/ export function getn(this: void, tbl: table): number /** * * Returns the last key found in the given table * * @name table.GetLastKey * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/GetLastKey * @param {void} this - no description * @param {table} tab - Table to retrieve key from * @returns {any} - Key **/ export function GetLastKey(this: void, tab: table): any /** * * Returns the first value found in the given table * * @name table.GetFirstValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/GetFirstValue * @param {void} this - no description * @param {table} tab - Table to retrieve value from * @returns {any} - Value **/ export function GetFirstValue(this: void, tab: table): any /** * * Returns all keys of a table. * * @name table.GetKeys * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/GetKeys * @param {void} this - no description * @param {table} tabl - The table to get keys of * @returns {table} - Table of keys **/ export function GetKeys(this: void, tabl: table): table /** * * Iterates for each numeric index in the table in order. * This is inherited from the original Lua implementation and is deprecated in Lua as of 5.1; see [here](http://lua-users.org/wiki/TableLibraryTutorial). You should use @ipairs function() instead. * * @name table.foreachi * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/foreachi * @param {void} this - no description * @param {table} table - The table to iterate over. * @param {function} func - The function to run for each index. * @returns {void} **/ export function foreachi(this: void, table: table, func: UnknownFunc): void /** * * Returns the first key found in the given table * * @name table.GetFirstKey * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/GetFirstKey * @param {void} this - no description * @param {table} tab - Table to retrieve key from * @returns {any} - Key **/ export function GetFirstKey(this: void, tab: table): any /** * * Iterates over a table and calls the given function for each key and value found. Unlike @table.foreach, this ignores the value returned by the function. * * @name table.ForEach * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/ForEach * @param {void} this - no description * @param {table} tab - Table to iterate over. * @param {function} callback - Function to call for every key-value pair. Arguments passed are: * @returns {void} **/ export function ForEach(this: void, tab: table, callback: tableForEachCallback): void /** * * Iterates for each key-value pair in the table, calling the function with the key and value of the pair. If the function returns anything, the loop is broken. * This is inherited from the original Lua implementation and is deprecated in Lua as of 5.1; see [here](http://lua-users.org/wiki/TableLibraryTutorial). You should use @pairs function() instead. The GLua interpretation of this is @table.ForEach. * * @name table.foreach * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/foreach * @param {void} this - no description * @param {table} tbl - The table to iterate over. * @param {function} callback - The function to run for each key and value. * @returns {void} **/ export function foreach(this: void, tbl: table, callback: UnknownFunc): void /** * * Returns the value positioned before the supplied value in a table. If it isn't found then the last element in the table is returned * * @name table.FindPrev * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/FindPrev * @param {void} this - no description * @param {table} tbl - Table to search * @param {any} value - Value to return element before * @returns {any} - Found element **/ export function FindPrev(this: void, tbl: table, value: any): any /** * * Returns the value positioned after the supplied value in a table. If it isn't found then the first element in the table is returned * * @name table.FindNext * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/FindNext * @param {void} this - no description * @param {table} tbl - Table to search * @param {any} value - Value to return element after * @returns {any} - Found element **/ export function FindNext(this: void, tbl: table, value: any): any /** * * Inserts a value in to the given table even if the table is non-existent * * @name table.ForceInsert * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/ForceInsert * @param {void} this - no description * @param {table} tab - Table to insert value in to * @param {any} value - Value to insert * @returns {table} - The supplied or created table **/ export function ForceInsert(this: void, tab?: table, value: any): table /** * * Removes all values from a table. * * @name table.Empty * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Empty * @param {void} this - no description * @param {table} tbl - The table to empty. * @returns {void} **/ export function Empty(this: void, tbl: table): void /** * * Converts a table that has been sanitised with @table.Sanitise back to its original form * * @name table.DeSanitise * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/DeSanitise * @param {void} this - no description * @param {table} tbl - Table to be de-sanitised * @returns {table} - De-sanitised table **/ export function DeSanitise(this: void, tbl: table): table /** * * Empties the target table, and merges all values from the source table into it. * * @name table.CopyFromTo * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/CopyFromTo * @param {void} this - no description * @param {table} source - The table to copy from. * @param {table} target - The table to write to. * @returns {void} **/ export function CopyFromTo(this: void, source: table, target: table): void /** * * Creates a deep copy and returns that copy. * * @name table.Copy * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Copy * @warning This function does NOT copy userdata, such as @Vector types and @Angle types! * @param {void} this - no description * @param {table} originalTable - The table to be copied. * @returns {table} - A deep copy of the original table **/ export function Copy(this: void, originalTable: table): table /** * * Counts the amount of keys in a table. This should only be used when a table is not numerically and sequentially indexed. For those tables, consider the length (**#**) operator. * If you only want to test if the table is empty or not, use @table.IsEmpty instead as it is a lot faster. * * @name table.Count * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Count * @param {void} this - no description * @param {table} tbl - The table to count the keys of. * @returns {number} - The number of keyvalue pairs. This includes non-numeric and non-sequential keys, unlike the length (**#**) operator. **/ export function Count(this: void, tbl: table): number /** * * Concatenates the contents of a table to a string. * * @name table.concat * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/concat * @param {void} this - no description * @param {table} tbl - The table to concatenate. * @param {string} concatenator - A seperator to insert between strings * @param {number} startPos - The key to start at * @param {number} endPos - The key to end at * @returns {string} - Concatenated values **/ export function concat(this: void, tbl: table, concatenator?: string, startPos?: number, endPos?: number): string /** * * Collapses a table with keyvalue structure * * @name table.CollapseKeyValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/CollapseKeyValue * @param {void} this - no description * @param {table} input - Input table * @returns {table} - Output table **/ export function CollapseKeyValue(this: void, input: table): table /** * * Changes all keys to sequential integers. This creates a new table object and does not affect the original. * * @name table.ClearKeys * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/ClearKeys * @param {void} this - no description * @param {table} table - The original table to modify. * @param {boolean} saveKeys - Save the keys within each member table. This will insert a new field *__key* into each value, and should not be used if the table contains non-table values. * @returns {table} - Table with integer keys. **/ export function ClearKeys(this: void, table: table, saveKeys?: boolean): table /** * * Adds the contents from one table into another. The target table will be modified. * See also @table.Inherit and @table.Merge. * * @name table.Add * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/table/Add * @param {void} this - no description * @param {table} target - The table to insert the new values into. * @param {table} source - The table to retrieve the values from. * @returns {table} - The target table. **/ export function Add(this: void, target: table, source: table): table } declare namespace system { /** * * Returns the amount of seconds since the Steam user last moved their mouse. * This is a direct binding to ISteamUtils->GetSecondsSinceComputerActive, and is most likely related to Steam's automatic "Away" online status. * * @name system.UpTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/UpTime * @note This function does not work on Dedicated Servers and will instead return no value. * @param {void} this - no description * @returns {number} - The amount of seconds since the Steam user last moved their mouse. **/ export function UpTime(this: void): number /** * * Returns the synchronized Steam time. This is the number of seconds since the [Unix epoch](http://en.wikipedia.org/wiki/Unix_time). * * @name system.SteamTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/SteamTime * @note This function does not work on Dedicated Servers and will instead return no value. * @param {void} this - no description * @returns {number} - Current Steam-synchronized Unix time. **/ export function SteamTime(this: void): number /** * * Returns whether the current OS is Windows. * * @name system.IsWindows * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/IsWindows * @param {void} this - no description * @returns {boolean} - Whether the system the game runs on is Windows or not. **/ export function IsWindows(this: void): boolean /** * * Returns whether the game is being run in a window or in fullscreen (you can change this by opening the menu, clicking 'Options', then clicking the 'Video' tab, and changing the Display Mode using the dropdown menu): * [300px](https://wiki.garrysmod.com/page/Image:DisplayModeDropdown.jpeg) * * @name system.IsWindowed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/system/IsWindowed * @param {void} this - no description * @returns {boolean} - Is the game running in a window? **/ export function IsWindowed(this: void): boolean /** * * Returns whether the current OS is OSX. * * @name system.IsOSX * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/IsOSX * @param {void} this - no description * @returns {boolean} - Whether or not the game is running on OSX. **/ export function IsOSX(this: void): boolean /** * * Returns whether the current OS is Linux. * * @name system.IsLinux * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/IsLinux * @param {void} this - no description * @returns {boolean} - Whether or not the game is running on Linux. **/ export function IsLinux(this: void): boolean /** * * Returns the country code of this computer, determined by the localisation settings of the OS. * * @name system.GetCountry * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/GetCountry * @note This function does not work on Dedicated Servers and will instead return no value. * @param {void} this - no description * @returns {string} - Two-letter country code, using [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. **/ export function GetCountry(this: void): string /** * * Flashes the window. Currently works only on Windows. * * @name system.FlashWindow * @realm client, menu * @wiki https://wiki.garrysmod.com/page/system/FlashWindow * @param {void} this - no description * @returns {void} **/ export function FlashWindow(this: void): void /** * * Returns whether or not the game window has focus. * Returns true 100% of the time on OS X. * * @name system.HasFocus * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/HasFocus * @note This function does not work on dedicated servers and will instead return no value. * @bug #2424 This will return true when minimized in windowed-mode. * @param {void} this - no description * @returns {boolean} - Whether or not the game window has focus. **/ export function HasFocus(this: void): boolean /** * * Returns the current battery power. * * @name system.BatteryPower * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/BatteryPower * @param {void} this - no description * @returns {number} - 0-100 if on battery power. * If plugged in, the value will be 255 regardless of charging state. **/ export function BatteryPower(this: void): number /** * * Returns the total uptime of the current application as reported by Steam. * This will return a similar value to @SysTime function. * * @name system.AppTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/system/AppTime * @note This function does not work on Dedicated Servers and will instead return no value. * @param {void} this - no description * @returns {number} - Seconds of game uptime as an integer. **/ export function AppTime(this: void): number } declare namespace surface { /** * * Sets the texture to be used in all upcoming draw operations using the surface library. * See also @surface.SetMaterial for an @IMaterial type alternative. * * @name surface.SetTexture * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/SetTexture * @param {void} this - no description * @param {number} textureID - The ID of the texture to draw with returned by @surface.GetTextureID. * @returns {void} **/ export function SetTexture(this: void, textureID: number): void /** * * Set the top-left position to draw any future text at. * * @name surface.SetTextPos * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/SetTextPos * @param {void} this - no description * @param {number} x - The X integer co-ordinate. * @param {number} y - The Y integer co-ordinate. * @returns {void} **/ export function SetTextPos(this: void, x: number, y: number): void /** * * Set the color of any future text to be drawn, can be set by either using r, g, b, a as separate values or by a @IColor structure. Using a color structure is not recommended to be created procedurally. * * @name surface.SetTextColor * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/SetTextColor * @param {void} this - no description * @param {number} r - The red value of color, or a @IColor structure. * @param {number} g - The green value of color * @param {number} b - The blue value of color * @param {number} a - The alpha value of color * @returns {void} **/ export function SetTextColor(this: void, r: number, g: number, b: number, a?: number): void /** * * Sets the material to be used in all upcoming draw operations using the surface library. * Not to be confused with @render.SetMaterial. * See also @surface.SetTexture. * * @name surface.SetMaterial * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/SetMaterial * @warning @Material function function calls are expensive to be done inside this function or inside rendering context, you should be caching the results of @Material function calls * @param {void} this - no description * @param {IMaterial} material - The material to be used. * @returns {void} **/ export function SetMaterial(this: void, material: IMaterial): void /** * * Set the current font to be used for text operations later. * The fonts must first be created with @surface.CreateFont or be one of the [Default Fonts](https://wiki.garrysmod.com/page/Default%20Fonts). * * @name surface.SetFont * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/SetFont * @param {void} this - no description * @param {string} fontName - The name of the font to use. * @returns {void} **/ export function SetFont(this: void, fontName: string): void /** * * Set the color of any future shapes to be drawn, can be set by either using r, g, b, a as separate values or by a @IColor structure. Using a color structure is not recommended to be created procedurally. * * @name surface.SetDrawColor * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/SetDrawColor * @param {void} this - no description * @param {number} r - The red value of color, or a @IColor structure. * @param {number} g - The green value of color. Unused if a @IColor structure was given. * @param {number} b - The blue value of color. Unused if a @IColor structure was given. * @param {number} a - The alpha value of color. Unused if a @IColor structure was given. * @returns {void} **/ export function SetDrawColor(this: void, r: number, g: number, b: number, a?: number): void /** * * Returns the height of the current client's screen. * * @name surface.ScreenHeight * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/ScreenHeight * @param {void} this - no description * @returns {number} - screenHeight **/ export function ScreenHeight(this: void): number /** * * Returns the width of the current client's screen. * * @name surface.ScreenWidth * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/ScreenWidth * @param {void} this - no description * @returns {number} - screenWidth **/ export function ScreenWidth(this: void): number /** * * Sets the alpha multiplier that will influence all upcoming drawing operations. * * @name surface.SetAlphaMultiplier * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/SetAlphaMultiplier * @param {void} this - no description * @param {number} multiplier - The multiplier ranging from 0 to 1. * @returns {void} **/ export function SetAlphaMultiplier(this: void, multiplier: number): void /** * * Play a sound file directly on the client (such as UI sounds, etc). * * @name surface.PlaySound * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/PlaySound * @param {void} this - no description * @param {string} soundfile - The path to the sound file, which must be relative to the sound/ folder. * @returns {void} **/ export function PlaySound(this: void, soundfile: string): void /** * * Returns the width and height (in pixels) of the given text, but only if the font has been set with @surface.SetFont. * * @name surface.GetTextSize * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/GetTextSize * @param {void} this - no description * @param {string} text - The string to check the size of. * @returns {number} - Width of the provided text * @returns {number} - Height of the provided text * @tupleReturn **/ export function GetTextSize(this: void, text: string): [number, number] /** * * Returns the texture id of the material with the given name/path. * * @name surface.GetTextureID * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/GetTextureID * @note This function will not work with .png or .jpg images. For that, see @Material function * @param {void} this - no description * @param {string} name_path - Name or path of the texture. * @returns {number} - The texture ID **/ export function GetTextureID(this: void, name_path: string): number /** * * Returns the size of the texture with the associated texture ID. * * @name surface.GetTextureSize * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/GetTextureSize * @param {void} this - no description * @param {number} textureID - The texture ID, returned by @surface.GetTextureID. * @returns {number} - The texture width. * @returns {number} - The texture height. * @tupleReturn **/ export function GetTextureSize(this: void, textureID: number): [number, number] /** * * Returns the current color affecting text draw operations. * * @name surface.GetTextColor * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/GetTextColor * @bug #2407 The returned color will not have the color metatable. * @param {void} this - no description * @returns {IColor} - The color that text drawing operations will use as a @IColor structure. **/ export function GetTextColor(this: void): IColor /** * * Gets the HUD texture with the specified name. * * @name surface.GetHUDTexture * @realm client * @wiki https://wiki.garrysmod.com/page/surface/GetHUDTexture * @param {void} this - no description * @param {string} name - The name of the texture. * @returns {ITexture} - text **/ export function GetHUDTexture(this: void, name: string): ITexture /** * * Returns the current color affecting draw operations. * * @name surface.GetDrawColor * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/GetDrawColor * @bug #2407 The returned color will not have the color metatable. * @param {void} this - no description * @returns {IColor} - The color that drawing operations will use as a @IColor structure. **/ export function GetDrawColor(this: void): IColor /** * * Returns the current alpha multiplier affecting drawing operations. * * @name surface.GetAlphaMultiplier * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/GetAlphaMultiplier * @param {void} this - no description * @returns {number} - The multiplier ranging from 0 to 1. **/ export function GetAlphaMultiplier(this: void): number /** * * Draws a textured rectangle with a repeated or partial texture. * u and v refer to texture coordinates. * * (u, v) = (0, 0) is the top left * * (u, v) = (1, 0) is the top right * * (u, v) = (1, 1) is the bottom right * * (u, v) = (0, 1) is the bottom left * Using a start point of (1, 0) and an end point to (0, 1), you can draw an image flipped horizontally, same goes with other directions. Going above 1 will tile the texture. Negative values are allowed as well. * Here's a helper image: http://i.imgur.com/SIKlpp4.png * * @name surface.DrawTexturedRectUV * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawTexturedRectUV * @rendering function:2d * @note If you are using a .png image, you need supply the "noclamp" flag as second parameter for @Material function if you intend to use tiling. * @note If you find that surface.DrawTexturedRectUV is getting your texture coordinates (u0, v0), (u1, v1) wrong and you're rendering with a material created with @CreateMaterial function, try adjusting them with the following code: * ``` * local du = 0.5 / 32 -- half pixel anticorrection * local dv = 0.5 / 32 -- half pixel anticorrection * local u0, v0 = (u0 - du) / (1 - 2 * du), (v0 - dv) / (1 - 2 * dv) * local u1, v1 = (u1 - du) / (1 - 2 * du), (v1 - dv) / (1 - 2 * dv) * ``` * **Explanation:** * surface.DrawTexturedRectUV tries to correct the texture coordinates by half a pixel (something to do with sampling) and computes the correction using IMaterial::GetMappingWidth()/GetMappingHeight(). If the material was created without a $basetexture, then GetMappingWidth()/GetMappingHeight() uses the width and height of the error material (which is 32x32). * @bug #3173 The UV offsets might require (sub-)pixel correction for accurate tiling results. * @param {void} this - no description * @param {number} x - The X integer coordinate. * @param {number} y - The Y integer coordinate. * @param {number} width - The integer width of the rectangle. * @param {number} height - The integer height of the rectangle. * @param {number} startU - The U texture mapping of the rectangle origin. * @param {number} startV - The V texture mapping of the rectangle origin. * @param {number} endU - The U texture mapping of the rectangle end. * @param {number} endV - The V texture mapping of the rectangle end. * @returns {void} **/ export function DrawTexturedRectUV(this: void, x: number, y: number, width: number, height: number, startU: number, startV: number, endU: number, endV: number): void /** * * Draw a textured rotated rectangle with the given position and dimensions and angle on the screen, using the current active texture. * * @name surface.DrawTexturedRectRotated * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawTexturedRectRotated * @rendering function:2d * @param {void} this - no description * @param {number} x - The X integer co-ordinate, representing the center of the rectangle. * @param {number} y - The Y integer co-ordinate, representing the center of the rectangle. * @param {number} width - The integer width of the rectangle. * @param {number} height - The integer height of the rectangle. * @param {number} rotation - The rotation of the rectangle, in degrees. * @returns {void} **/ export function DrawTexturedRectRotated(this: void, x: number, y: number, width: number, height: number, rotation: number): void /** * * Draw the specified text on the screen, using the previously set position, font and color. * * @name surface.DrawText * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawText * @rendering function:2d * @note This function does not handle newlines properly * @param {void} this - no description * @param {string} text - The text to be rendered. * @returns {void} **/ export function DrawText(this: void, text: string): void /** * * Draws a solid rectangle on the screen. * * @name surface.DrawRect * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawRect * @rendering function:2d * @param {void} this - no description * @param {number} x - The X integer co-ordinate. * @param {number} y - The Y integer co-ordinate. * @param {number} width - The integer width of the rectangle. * @param {number} height - The integer height of the rectangle. * @returns {void} **/ export function DrawRect(this: void, x: number, y: number, width: number, height: number): void /** * * Draws a textured polygon (secretly a triangle fan) with a maximum of 256 vertices. * Only works properly with convex polygons. You may try to render concave polygons, but there is no guarantee that things wont get messed up. * Unlike most surface library functions, non-integer coordinates are not rounded. * * @name surface.DrawPoly * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawPoly * @rendering function:2d * @warning You must reset the drawing color and texture before calling the function to ensure consistent results. See examples below. * @param {void} this - no description * @param {PolygonVertex} vertices - A table containing integer vertices. See the @PolygonVertex structure. * **The vertices must be in clockwise order.** * @returns {void} **/ export function DrawPoly(this: void, vertices: PolygonVertex): void /** * * Draws a hollow box with a border width of 1 px. * * @name surface.DrawOutlinedRect * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawOutlinedRect * @rendering function:2d * @param {void} this - no description * @param {number} x - The start x integer coordinate. * @param {number} y - The start y integer coordinate. * @param {number} w - The integer width. * @param {number} h - The integer height. * @returns {void} **/ export function DrawOutlinedRect(this: void, x: number, y: number, w: number, h: number): void /** * * Draw a textured rectangle with the given position and dimensions on the screen, using the current active texture set with @surface.SetMaterial. It is also affected by @surface.SetDrawColor. * See also @render.SetMaterial and @render.DrawScreenQuadEx. * See also @surface.DrawTexturedRectUV. * * @name surface.DrawTexturedRect * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawTexturedRect * @rendering function:2d * @param {void} this - no description * @param {number} x - The X integer co-ordinate. * @param {number} y - The Y integer co-ordinate. * @param {number} width - The integer width of the rectangle. * @param {number} height - The integer height of the rectangle. * @returns {void} **/ export function DrawTexturedRect(this: void, x: number, y: number, width: number, height: number): void /** * * Draws a line from one point to another. * * @name surface.DrawLine * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawLine * @rendering function:2d * @param {void} this - no description * @param {number} startX - The start x integer coordinate. * @param {number} startY - The start y integer coordinate. * @param {number} endX - The end x integer coordinate. * @param {number} endY - The end y integer coordinate. * @returns {void} **/ export function DrawLine(this: void, startX: number, startY: number, endX: number, endY: number): void /** * * Draws a hollow circle, made of dots. For a filled circle, see examples for @surface.DrawPoly. * * @name surface.DrawCircle * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DrawCircle * @rendering function:2d * @param {void} this - no description * @param {number} originX - The center x integer coordinate. * @param {number} originY - The center y integer coordinate. * @param {number} radius - The radius of the circle. * @param {number} r - The red value of the color to draw the circle with, or a @IColor structure. * @param {number} g - The green value of the color to draw the circle with. Unused if a @IColor structure was given. * @param {number} b - The blue value of the color to draw the circle with. Unused if a @IColor structure was given. * @param {number} a - The alpha value of the color to draw the circle with. Unused if a @IColor structure was given. * @returns {void} **/ export function DrawCircle(this: void, originX: number, originY: number, radius: number, r: number, g: number, b: number, a?: number): void /** * * Creates a new font. * To prevent the font from displaying incorrectly when using the "outline" setting, set "antialias" to false. This will ensure the text properly fills out the entire outline. * Be sure to check the [List of Default Fonts](https://wiki.garrysmod.com/page/Default_Fonts) first! Those fonts can be used without using this function. * * @name surface.CreateFont * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/CreateFont * @warning Due to the static nature of fonts, do **NOT** create the font more than once. You should only be creating them once, it is recommended to create them at the top of your script. **Do not use this function within **@GamemodeHooks:HUDPaint**!** * @param {void} this - no description * @param {string} fontName - The new font name. * @param {FontData} fontData - The font properties. See the @FontData structure. * @returns {void} **/ export function CreateFont(this: void, fontName: string, fontData: FontData): void /** * * Enables or disables the clipping used by the VGUI that limits the drawing operations to a panels bounds. * See also @DisableClipping function and @Panel:NoClipping. * * @name surface.DisableClipping * @realm client, menu * @wiki https://wiki.garrysmod.com/page/surface/DisableClipping * @param {void} this - no description * @param {boolean} disable - True to disable, false to enable the clipping * @returns {void} **/ export function DisableClipping(this: void, disable: boolean): void } declare namespace string { /** * * Removes trailing spaces/passed character from a string. * * @name string.TrimRight * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/TrimRight * @param {void} this - no description * @param {string} str - String to remove from * @param {string} char - Custom character to remove, default is a space * @returns {string} - Trimmed string **/ export function TrimRight(this: void, str: string, char?: string): string /** * * Changes any lower-case letters in a string to upper-case letters. * * @name string.upper * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/upper * @param {void} this - no description * @param {string} str - The string to convert. * @returns {string} - A string representing the value of a string converted to upper-case. **/ export function upper(this: void, str: string): string /** * * Removes leading spaces/characters from a string. * * @name string.TrimLeft * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/TrimLeft * @param {void} this - no description * @param {string} str - String to trim * @param {string} char - Custom character to remove * @returns {string} - Trimmed string **/ export function TrimLeft(this: void, str: string, char?: string): string /** * * Removes leading and trailing matches of a string. * * @name string.Trim * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Trim * @param {void} this - no description * @param {string} Inputstring - The string to trim. * @param {string} Char - String to match. * @returns {string} - Modified string **/ export function Trim(this: void, Inputstring: string, Char?: string): string /** * * Splits the string into characters and creates a sequential table of characters. * * @name string.ToTable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/ToTable * @warning As a result of the [UTF-8](https://en.wikipedia.org/wiki/UTF-8) encoding, non-ASCII characters will be split into more than one character in the output table. Each character value in the output table will always be 1 byte. * @param {void} this - no description * @param {string} str - The string you'll turn into a table. * @returns {table} - A sequential table where each value is a character from the given string **/ export function ToTable(this: void, str: string): table /** * * Returns given time in "MM:SS" format. * * @name string.ToMinutesSeconds * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/ToMinutesSeconds * @param {void} this - no description * @param {number} time - Time in seconds * @returns {string} - Formatted time **/ export function ToMinutesSeconds(this: void, time: number): string /** * * Returns given time in "MM:SS:MS" format. * * @name string.ToMinutesSecondsMilliseconds * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/ToMinutesSecondsMilliseconds * @param {void} this - no description * @param {number} time - Time in seconds * @returns {string} - Formatted time **/ export function ToMinutesSecondsMilliseconds(this: void, time: number): string /** * * Fetches a Color type from a string. * * @name string.ToColor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/ToColor * @param {void} this - no description * @param {string} Inputstring - The string to convert from. * @returns {IColor} - The output @IColor structure **/ export function ToColor(this: void, Inputstring: string): IColor /** * * Returns a sub-string, starting from the character at position *StartPos* of the string (inclusive), and optionally ending at the character at position *EndPos* of the string (also inclusive). If EndPos is not given, the rest of the string is returned. * * @name string.sub * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/sub * @param {void} this - no description * @param {string} str - The string you'll take a sub-string out of. * @param {number} StartPos - The position of the first character that will be included in the sub-string. * @param {number} EndPos - The position of the last character to be included in the sub-string. It can be negative to count from the end. * @returns {string} - The substring. **/ export function sub(this: void, str: string, StartPos: number, EndPos?: number): string /** * * Returns whether or not the first string starts with the second. * * @name string.StartWith * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/StartWith * @param {void} this - no description * @param {string} inputStr - String to check. * @param {string} start - String to check with. * @returns {boolean} - Whether the first string starts with the second. **/ export function StartWith(this: void, inputStr: string, start: string): boolean /** * * Removes the extension of a path. * * @name string.StripExtension * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/StripExtension * @param {void} this - no description * @param {string} Inputstring - The path to change. * @returns {string} - Modifiedstring **/ export function StripExtension(this: void, Inputstring: string): string /** * * Splits the string into a table of strings, separated by the second argument. * * @name string.Split * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Split * @param {void} this - no description * @param {string} Inputstring - String to split * @param {string} Separator - Character(s) to split with. * @returns {table} - Split table **/ export function Split(this: void, Inputstring: string, Separator: string): table /** * * Sets the character at the specific index of the string. * * @name string.SetChar * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/SetChar * @param {void} this - no description * @param {string} InputString - The input string * @param {number} Index - The character index, 1 is the first from left. * @param {string} ReplacementChar - String to replace with. * @returns {string} - ModifiedString **/ export function SetChar(this: void, InputString: string, Index: number, ReplacementChar: string): string /** * * Returns the last n-th characters of the string. * * @name string.Right * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Right * @param {void} this - no description * @param {string} str - The string to extract from. * @param {number} num - Amount of chars relative to the end (starting from 1). * @returns {string} - Returns a string containing a specified number of characters from the right side of a string. **/ export function Right(this: void, str: string, num: number): string /** * * Repeats a string by the provided number, with an optional separator. * * @name string.rep * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/rep * @param {void} this - no description * @param {string} str - The string to convert. * @param {number} repetitions - Timer to repeat, this values gets rounded internally. * @param {string} separator - String that will separate the repeated piece. Notice that it doesn't add this string to the start or the end of the result, only between the repeated parts. * @returns {string} - Repeated string. **/ export function rep(this: void, str: string, repetitions: number, separator?: string): string /** * * Replaces all occurrences of the supplied second string. * * @name string.Replace * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Replace * @param {void} this - no description * @param {string} str - The string we are seeking to replace an occurrence(s). * @param {string} find - What we are seeking to replace. * @param {string} replace - What to replace find with. * @returns {string} - string **/ export function Replace(this: void, str: string, find: string, replace: string): string /** * * Reverses a string. * * @name string.reverse * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/reverse * @param {void} this - no description * @param {string} str - The string to be reversed. * @returns {string} - reversed string **/ export function reverse(this: void, str: string): string /** * * Escapes all special characters within a string, making the string safe for inclusion in a Lua pattern. * * @name string.PatternSafe * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/PatternSafe * @param {void} this - no description * @param {string} str - The string to be sanitized * @returns {string} - The string that has been sanitized for inclusion in Lua patterns **/ export function PatternSafe(this: void, str: string): string /** * * Formats the supplied number (in seconds) to the highest possible time unit. * * @name string.NiceTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/NiceTime * @param {void} this - no description * @param {number} num - The number to format, in seconds. * @returns {string} - A nicely formatted time string. **/ export function NiceTime(this: void, num: number): string /** * * Converts a digital filesize to human-readable text. * * @name string.NiceSize * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/NiceSize * @param {void} this - no description * @param {number} bytes - The filesize in bytes. * @returns {string} - The human-readable filesize, in Bytes/KB/MB/GB (whichever is appropriate). **/ export function NiceSize(this: void, bytes: number): string /** * * Finds a [Pattern](https://wiki.garrysmod.com/page/Patterns) in a string. * * @name string.match * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/match * @param {void} this - no description * @param {string} str - String which should be searched in for matches. * @param {string} pattern - The pattern that defines what should be matched. * @param {number} startPosition - The start index to start the matching from, can be negative to start the match from a position relative to the end. * @returns {any[]} - Matched text(s) **/ export function match(this: void, str: string, pattern: string, startPosition?: number): any[] /** * * Changes any upper-case letters in a string to lower-case letters. * * @name string.lower * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/lower * @param {void} this - no description * @param {string} str - The string to convert. * @returns {string} - The original string, with all uppercase letters replaced with their lowercase variants. **/ export function lower(this: void, str: string): string /** * * Counts the number of characters in the string (length). This is equivalent to using the length operator (#). * * @name string.len * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/len * @param {void} this - no description * @param {string} str - The string to find the length of. * @returns {number} - Length of the string **/ export function len(this: void, str: string): number /** * * Returns everything left of supplied place of that string. * * @name string.Left * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Left * @param {void} this - no description * @param {string} str - The string to extract from. * @param {number} num - Amount of chars relative to the beginning (starting from 1). * @returns {string} - Returns a string containing a specified number of characters from the left side of a string. **/ export function Left(this: void, str: string, num: number): string /** * * Escapes special characters for JavaScript in a string, making the string safe for inclusion in to JavaScript strings. * * @name string.JavascriptSafe * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/JavascriptSafe * @param {void} this - no description * @param {string} str - The string that should be escaped. * @returns {string} - The escaped string. **/ export function JavascriptSafe(this: void, str: string): string /** * * Joins the values of a table together to form a string. * This is the reverse of @string.Explode and is functionally identical to @table.concat, but with less features. * * @name string.Implode * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Implode * @param {void} this - no description * @param {string} separator - The separator to insert between each piece. * @param {table} pieces - The table of pieces to concatenate. The keys for these must be numeric and sequential. * @returns {string} - Imploded pieces **/ export function Implode(this: void, separator?: string, pieces: table): string /** * * This functions main purpose is to replace certain character sequences in a string using [Patterns](https://wiki.garrysmod.com/page/Patterns). * * @name string.gsub * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/gsub * @param {void} this - no description * @param {string} str - String which should be modified. * @param {string} pattern - The pattern that defines what should be matched and eventually be replaced. * @param {string} replacement - In case of a string the matches sequence will be replaced with it. * In case of a table, the matched sequence will be used as key and the table will tested for the key, if a value exists it will be used as replacement. * In case of a function all matches will be passed as parameters to the function, the return value(s) of the function will then be used as replacement. * @param {number} maxReplaces - Maximum number of replacements to be made. * @returns {string} - replaceResult * @returns {number} - replaceCount * @tupleReturn **/ export function gsub(this: void, str: string, pattern: string, replacement: string, maxReplaces?: number): [string, number] /** * * Using [Patterns](https://wiki.garrysmod.com/page/Patterns), returns an iterator which will return either one value if no capture groups are defined, or any capture group matches. * * @name string.gmatch * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/gmatch * @param {void} this - no description * @param {string} data - The string to search in * @param {string} pattern - The pattern to search for * @returns {function} - The iterator function that can be used in a for-in loop **/ export function gmatch(this: void, data: string, pattern: string): UnknownFunc /** * * Returns an iterator function that is called for every complete match of the pattern, all sub matches will be passed as to the loop. * * @name string.gfind * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/gfind * @param {void} this - no description * @param {string} data - The string to search in * @param {string} pattern - The pattern to search for * @returns {function} - The iterator function that can be used in a for-in loop **/ export function gfind(this: void, data: string, pattern: string): UnknownFunc /** * * Returns the path only from a file's path. * * @name string.GetPathFromFilename * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/GetPathFromFilename * @param {void} this - no description * @param {string} Inputstring - String to get path from. * @returns {string} - Path **/ export function GetPathFromFilename(this: void, Inputstring: string): string /** * * Returns file name and extension. * * @name string.GetFileFromFilename * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/GetFileFromFilename * @param {void} this - no description * @param {string} pathString - The string eg. file-path to get the file-name from. * @returns {string} - The file name **/ export function GetFileFromFilename(this: void, pathString: string): string /** * * Returns extension of the file. * * @name string.GetExtensionFromFilename * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/GetExtensionFromFilename * @param {void} this - no description * @param {string} file - String eg. file-path to get the file extensions from. * @returns {string} - fileExtension **/ export function GetExtensionFromFilename(this: void, file: string): string /** * * Creates a string from a Color variable. * * @name string.FromColor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/FromColor * @param {void} this - no description * @param {Color} color - The color to put in the string. * @returns {string} - Output **/ export function FromColor(this: void, color: Color): string /** * * Returns char value from the specified index in the supplied string. * * @name string.GetChar * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/GetChar * @param {void} this - no description * @param {string} str - The string that you will be searching with the supplied index. * @param {number} index - The index's value of the string to be returned. * @returns {string} - str **/ export function GetChar(this: void, str: string, index: number): string /** * * Returns the time as a formatted string or as a table if no format is given. * * @name string.FormattedTime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/FormattedTime * @param {void} this - no description * @param {number} float - The time in seconds to format. * @param {string} format - An optional formatting to use. If no format it specified, a table will be returned instead. * @returns {string} - Returns the time as a formatted string only if a format was specified. * Returns a table only if no format was specified. The table will contain these fields: **/ export function FormattedTime(this: void, float: number, format?: string): string /** * * Attempts to find the specified substring in a string, uses [Patterns](https://wiki.garrysmod.com/page/Patterns) by default. * * @name string.find * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/find * @param {void} this - no description * @param {string} haystack - The string to search in. * @param {string} needle - The string to find, can contain patterns if enabled. * @param {number} startPos - The position to start the search from, can be negative start position will be relative to the end position. * @param {boolean} noPatterns - Disable patterns. * @returns {number} - Starting position of the found text, or nil if the text wasn't found * @returns {number} - Ending position of found text, or nil if the text wasn't found * @returns {string} - Matched text for each group if patterns are enabled and used, or nil if the text wasn't found * @tupleReturn **/ export function find(this: void, haystack: string, needle: string, startPos?: number, noPatterns?: boolean): [number, number, string] /** * * Splits a string up wherever it finds the given separator. * This is the reverse of @string.Implode. * * @name string.Explode * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Explode * @param {void} this - no description * @param {string} separator - The string will be separated wherever this sequence is found. * @param {string} str - The string to split up. * @param {boolean} use_patterns - Set this to true if your separator is a [pattern](https://wiki.garrysmod.com/page/Patterns). * @returns {table} - Exploded string as a numerical sequential table. **/ export function Explode(this: void, separator: string, str: string, use_patterns: boolean): table /** * * Formats the specified values into the string given. * * @name string.format * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/format * @param {void} this - no description * @param {string} format - The string to be formatted. * Follows this format: http://www.cplusplus.com/reference/cstdio/printf/ * @param {any[]} ...formatParameters - Values to be formatted into the string. * @returns {string} - The formatted string **/ export function format(this: void, format: string, ...formatParameters: any[]): string /** * * Returns whether or not the second passed string matches the end of the first. * * @name string.EndsWith * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/EndsWith * @param {void} this - no description * @param {string} str - The string whose end is to be checked. * @param {string} end - The string to be matched with the end of the first. * @returns {boolean} - *true* if the first string ends with the second, or the second is empty, otherwise *false*. **/ export function EndsWith(this: void, str: string, end: string): boolean /** * * Returns the binary bytecode of the given function. * * @name string.dump * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/dump * @note This does not work with functions created in C/C++. An error will be thrown if it is * @param {void} this - no description * @param {function} func - The function to get the bytecode of * @param {boolean} stripDebugInfo - True to strip the debug data, false to keep it * @returns {string} - Bytecode **/ export function dump(this: void, func: UnknownFunc, stripDebugInfo?: boolean): string /** * * Inserts commas for every third digit. * * @name string.Comma * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/Comma * @param {void} this - no description * @param {number} InputNumber - The input number to commafy * @returns {string} - Prettystring **/ export function Comma(this: void, InputNumber: number): string /** * * Takes the given numerical bytes and converts them to a string. * * @name string.char * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/char * @param {void} this - no description * @param {any[]} ...bytes - The bytes to create the string from. * @returns {string} - String built from given bytes **/ export function char(this: void, ...bytes: any[]): string /** * * Returns the given string's characters in their numeric ASCII representation. * * @name string.byte * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/string/byte * @param {void} this - no description * @param {string} str - The string to get the chars from. * @param {number} startPos - The first character of the string to get the byte of. * @param {number} endPos - The last character of the string to get the byte of. * @returns {any[]} - Numerical bytes **/ export function byte(this: void, str: string, startPos?: number, endPos?: number): any[] } declare namespace steamworks { /** * @type steamworksFileInfoCallback * @param {void} this - no description * @param {UGCFileInfo} data - The data about the item, if the request succeeded, nil otherwise. See @UGCFileInfo structure. **/ type steamworksFileInfoCallback = (this: void, data: UGCFileInfo) => unknown /** * * Retrieves vote info of supplied addon. * * @name steamworks.VoteInfo * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/VoteInfo * @param {void} this - no description * @param {string} workshopItemID - The ID of workshop item. * @param {function} resultCallback - The function to process retrieved data. The first and only argument is a table, containing all the info. * @returns {void} **/ export function VoteInfo(this: void, workshopItemID: string, resultCallback: UnknownFunc): void /** * * Makes the user vote for the specified addon * * @name steamworks.Vote * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/Vote * @internal * @param {void} this - no description * @param {string} workshopItemID - The ID of workshop item. * @param {boolean} upOrDown - Sets if the user should vote up/down. True makes them upvote, false down * @returns {void} **/ export function Vote(this: void, workshopItemID: string, upOrDown: boolean): void /** * * Subscribes to the specified workshop addon. Call @steamworks.ApplyAddons afterwards to update. * * @name steamworks.Subscribe * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/Subscribe * @internal * @param {void} this - no description * @param {string} workshopItemID - The ID of the Steam Workshop item we should subscribe to * @returns {void} **/ export function Subscribe(this: void, workshopItemID: string): void /** * * Returns whenever the specified Steam Workshop addon will be mounted or not. * * @name steamworks.ShouldMountAddon * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/ShouldMountAddon * @param {void} this - no description * @param {string} workshopItemID - The ID of the Steam Workshop * @returns {boolean} - Will the workshop item be mounted or not **/ export function ShouldMountAddon(this: void, workshopItemID: string): boolean /** * * Opens the workshop website for specified Steam Workshop item in the Steam overlay browser. * * @name steamworks.ViewFile * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/ViewFile * @param {void} this - no description * @param {string} workshopItemID - The ID of workshop item. * @returns {void} **/ export function ViewFile(this: void, workshopItemID: string): void /** * * Unsubscribes to the specified workshop addon. Call @steamworks.ApplyAddons afterwards to update. * This function should *never* be called without a user's consent and should not be called if the addon is currently in use (aka: the user is not in the main menu) as it may result in unexpected behaviour. * * @name steamworks.Unsubscribe * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/Unsubscribe * @internal * @param {void} this - no description * @param {string} workshopItemID - The ID of the Steam Workshop item we should unsubscribe from. * @returns {void} **/ export function Unsubscribe(this: void, workshopItemID: string): void /** * * Sets if an addon should be enabled or disabled. Call @steamworks.ApplyAddons afterwards to update. * * @name steamworks.SetShouldMountAddon * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/SetShouldMountAddon * @param {void} this - no description * @param {string} workshopItemID - The ID of the Steam Workshop item we should enable/disable * @param {boolean} shouldMount - true to enable the item, false to disable. * @returns {void} **/ export function SetShouldMountAddon(this: void, workshopItemID: string, shouldMount: boolean): void /** * * Sets whether you have played this addon or not. This will be shown to the user in the Steam Workshop itself: * [File:steamworksSetFilePlayedExample.png](https://wiki.garrysmod.com/page/File:steamworksSetFilePlayedExample.png) * * @name steamworks.SetFilePlayed * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/SetFilePlayed * @param {void} this - no description * @param {string} workshopid - The Steam Workshop item ID * @returns {string} - Whatever you have put in as first argument **/ export function SetFilePlayed(this: void, workshopid: string): string /** * * Requests information of the player with SteamID64 for later use with @steamworks.GetPlayerName. * * @name steamworks.RequestPlayerInfo * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/RequestPlayerInfo * @param {void} this - no description * @param {string} steamID64 - The 64bit Steam ID of player. * @param {string} callback - A callback function with only 1 argument - @string type name. * @returns {void} **/ export function RequestPlayerInfo(this: void, steamID64: string, callback: string): void /** * @name steamworks.SetFileCompleted * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/SetFileCompleted * @param {void} this - no description * @param {string} workshopid - The Steam Workshop item id * @returns {string} - Whatever you have put in as first argument **/ export function SetFileCompleted(this: void, workshopid: string): string /** * * Publishes dupes, saves or demos to workshop. * * @name steamworks.Publish * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/Publish * @internal * @param {void} this - no description * @param {table} tags - The workshop tags to apply * @param {string} filename - Path to the file to upload * @param {string} image - Path to the image to use as icon * @param {string} name - Name of the Workshop submission * @param {string} desc - Description of the Workshop submission * @returns {void} **/ export function Publish(this: void, tags: table, filename: string, image: string, name: string, desc: string): void /** * * Opens the workshop website in the steam overlay browser. * * @name steamworks.OpenWorkshop * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/OpenWorkshop * @param {void} this - no description * @returns {void} **/ export function OpenWorkshop(this: void): void /** * * Returns whenever the client is subscribed to the specified Steam Workshop item. * * @name steamworks.IsSubscribed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/IsSubscribed * @param {void} this - no description * @param {string} workshopItemID - The ID of the Steam Workshop item. * @returns {boolean} - Is the client subscribed to the addon or not. **/ export function IsSubscribed(this: void, workshopItemID: string): boolean /** * * Retrieves players name by his 64bit SteamID. * You must call @steamworks.RequestPlayerInfo a decent amount of time before calling this function. * * @name steamworks.GetPlayerName * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/GetPlayerName * @param {void} this - no description * @param {string} steamID64 - The 64bit Steam ID ( aka Community ID ) of the player * @returns {string} - The name of that player **/ export function GetPlayerName(this: void, steamID64: string): string /** * * Retrieves info about supplied Steam Workshop addon. * * @name steamworks.FileInfo * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/FileInfo * @param {void} this - no description * @param {string} workshopItemID - The ID of Steam Workshop item. * @param {function} resultCallback - The function to process retrieved data, with the following arguments: * @returns {void} **/ export function FileInfo(this: void, workshopItemID: string, resultCallback: steamworksFileInfoCallback): void /** * * Retrieves a customized list of Steam Workshop addons. * * @name steamworks.GetList * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/GetList * @param {void} this - no description * @param {string} type - The type of items to retrieve. Possible values include: * * popular (All invalid options will equal to this) * * trending * * latest * * friends * @param {table} tags - A table of tags to match. * @param {number} offset - How much of results to skip from first one. Mainly used for pages. * @param {number} numRetrieve - How much items to retrieve, up to 50 at a time. * @param {number} days - When getting Most Popular content from Steam, this determines a time period. ( 7 = most popular addons in last 7 days, 1 = most popular addons today, etc ) * @param {string} userID - "0" to retrieve all addons, "1" to retrieve addons only published by you, or a valid SteamID64 of a user to get workshop items of. * @param {function} resultCallback - The function to process retrieved data. The first and only argument is a table, containing all the info, or nil in case of error * @returns {void} **/ export function GetList(this: void, type: string, tags: table, offset: number, numRetrieve: number, days: number, userID: string, resultCallback: UnknownFunc): void /** * * Downloads a Steam Workshop file by its ID and returns a path to it. * * @name steamworks.DownloadUGC * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/DownloadUGC * @param {void} this - no description * @param {number} workshopID - The ID of workshop item to download. **NOT** a file ID. * @param {function} resultCallback - The function to process retrieved data. The first and only argument is a string, containing path to the saved file, or nil if the download failed to any reason. * @returns {void} **/ export function DownloadUGC(this: void, workshopID: number, resultCallback: UnknownFunc): void /** * * Downloads a file from the supplied addon and saves it as a .cache file in garrysmod/cache folder. * This is mostly used to download the preview image of the addon, but the game seems to also use it to download replays and saves. * In case the retrieved file is an image and you need the @IMaterial type, use @AddonMaterial function with the path supplied from the callback. * * @name steamworks.Download * @realm client, menu * @wiki https://wiki.garrysmod.com/page/steamworks/Download * @param {void} this - no description * @param {string} workshopPreviewID - The Preview ID of workshop item. * @param {boolean} uncompress - Whether to uncompress the file or not, assuming it was compressed with LZMA. * You will usually want to set this to true. * @param {function} resultCallback - The function to process retrieved data. The first and only argument is a string, containing path to the saved file. * @returns {void} **/ export function Download(this: void, workshopPreviewID: string, uncompress: boolean, resultCallback: UnknownFunc): void /** * * Refreshes clients addons. * * @name steamworks.ApplyAddons * @realm menu * @wiki https://wiki.garrysmod.com/page/steamworks/ApplyAddons * @param {void} this - no description * @returns {void} **/ export function ApplyAddons(this: void): void } declare namespace sql { /** * * Returns if the table with the specified name exists. * * @name sql.TableExists * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/TableExists * @param {void} this - no description * @param {string} tableName - The name of the table to check. * @returns {boolean} - exists **/ export function TableExists(this: void, tableName: string): boolean /** * * Performs the query like @sql.QueryRow, but returns the first value found. * * @name sql.QueryValue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/QueryValue * @param {void} this - no description * @param {string} query - The input query. * @returns {any} - The returned value; the engine automatically converts numerical output to Lua numbers. **/ export function QueryValue(this: void, query: string): any /** * * Performs the query like @sql.Query, but returns the first row found. * Basically equivalent to```sql.Query("*query* LIMIT 1")``` * * @name sql.QueryRow * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/QueryRow * @param {void} this - no description * @param {string} query - The input query * @param {number} row - The row number. Say we receive back 5 rows, putting 3 as this argument will give us row #3. * @returns {table} - The returned row. **/ export function QueryRow(this: void, query: string, row?: number): table /** * * Escapes dangerous characters and symbols from user input used in an SQLite SQL Query. * * @name sql.SQLStr * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/SQLStr * @note this function is not meant to be used with external database engines such as *MySQL*. Escaping strings with inadequate functions is dangerous! * @param {void} this - no description * @param {string} str - The string to be escaped. * @param {boolean} bNoQuotes - Set this as true, and the function will not wrap the input string in apostrophes. * @returns {string} - The escaped input. **/ export function SQLStr(this: void, str: string, bNoQuotes?: boolean): string /** * * Performs a query on the local SQLite database, returns a table as result set, nil if result is empty and false on error. * * @name sql.Query * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/Query * @param {void} this - no description * @param {string} query - The query to execute. * @returns {table} - false is returned if there is an error, nil if the query returned no data. **/ export function Query(this: void, query: string): table /** * * Returns the last error from a SQLite query. * * @name sql.LastError * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/LastError * @param {void} this - no description * @returns {string} - error **/ export function LastError(this: void): string /** * * Tells the engine to execute a series of queries queued for execution, must be preceded by @sql.Begin * This is equivalent to ```sql.Query("COMMIT")``` * * @name sql.Commit * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/Commit * @param {void} this - no description * @returns {void} **/ export function Commit(this: void): void /** * * Tells the engine a set of queries is coming. Will wait until @sql.Commit is called to run them. * This is most useful when you run more than 100+ queries. * This is equivalent to ```sql.Query("BEGIN")``` * * @name sql.Begin * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/sql/Begin * @param {void} this - no description * @returns {void} **/ export function Begin(this: void): void } declare namespace spawnmenu { /** * @type spawnmenuAddToolMenuOptionCpanel * @param {void} this - no description * @param {DForm} pnl - A @DForm type that will be shown in the context menu **/ type spawnmenuAddToolMenuOptionCpanel = (this: void, pnl: DForm) => unknown /** * @type spawnmenuAddContentTypeConstructor * @param {void} this - no description * @param {Panel} container - The container/parent of the new panel * @param {table} data - Data for the content type passed from @spawnmenu.CreateContentIcon **/ type spawnmenuAddContentTypeConstructor = (this: void, container: Panel, data: table) => unknown /** * * Supposed to open specified tool tab in spawnmenu, in reality does nothing. * * @name spawnmenu.SwitchToolTab * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/SwitchToolTab * @param {void} this - no description * @param {number} id - The tab ID to open * @returns {void} **/ export function SwitchToolTab(this: void, id: number): void /** * * Sets currently active control panel to be returned by @spawnmenu.ActiveControlPanel. * * @name spawnmenu.SetActiveControlPanel * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/SetActiveControlPanel * @param {void} this - no description * @param {Panel} pnl - The panel to set. * @returns {void} **/ export function SetActiveControlPanel(this: void, pnl: Panel): void /** * * Saves a table of spawnlists to files. * * @name spawnmenu.SaveToTextFiles * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/SaveToTextFiles * @internal * @param {void} this - no description * @param {table} spawnlists - A table containing spawnlists. * @returns {void} **/ export function SaveToTextFiles(this: void, spawnlists: table): void /** * * Loads spawnlists from text files. * * @name spawnmenu.PopulateFromTextFiles * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/PopulateFromTextFiles * @param {void} this - no description * @param {function} callback - The function to call. Arguments are ( strFilename, strName, tabContents, icon, id, parentid, needsapp ) * @returns {void} **/ export function PopulateFromTextFiles(this: void, callback: UnknownFunc): void /** * * Calls @spawnmenu.PopulateFromTextFiles. * * @name spawnmenu.PopulateFromEngineTextFiles * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/PopulateFromEngineTextFiles * @internal * @param {void} this - no description * @returns {void} **/ export function PopulateFromEngineTextFiles(this: void): void /** * * Gets a table of tools on the client. * * @name spawnmenu.GetTools * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/GetTools * @param {void} this - no description * @returns {table} - A table with groups of tools, along with information on each tool. **/ export function GetTools(this: void): table /** * * Adds a new tool tab (or returns an existing one by name) to the right side of the spawnmenu via the @SandboxHooks:AddToolMenuTabs hook. * * @name spawnmenu.GetToolMenu * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/GetToolMenu * @param {void} this - no description * @param {string} name - The internal name of the tab. This is used for sorting. * @param {string} label - The 'nice' name of the tab * @param {string} icon - The filepath to the icon of the tab. Should be a .png * @returns {table[]} - A table of tables representing categories and items in the left part of the tab. See example below to example structure. **/ export function GetToolMenu(this: void, name: string, label?: string, icon?: string): table[] /** * * Returns a table of all prop categories and their props in the spawnmenu. * Note that if the spawnmenu has not been populated, this will return an empty table. * This will not return spawnlists created by addons, see @spawnmenu.GetCustomPropTable for that. * * @name spawnmenu.GetPropTable * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/GetPropTable * @param {void} this - no description * @returns {table} - Table of all the prop categories and props in the following format: * ```{ * ["settings/spawnlist/001-construction props.txt"] = { * name = "Construction Props", * icon = "icon16/page.png", * id = 1, * parentid = 0, * needsapp = "", * contents = { * { * model = "models/Cranes/crane_frame.mdl", * type = "model" * } * -- etc. * }, * } * -- etc. * }``` **/ export function GetPropTable(this: void): table /** * * Similar to @spawnmenu.GetPropTable, but only returns spawnlists created by addons via @spawnmenu.AddPropCategory. * These spawnlists are shown in a separate menu in-game. * * @name spawnmenu.GetCustomPropTable * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/GetCustomPropTable * @param {void} this - no description * @returns {table} - See @spawnmenu.GetPropTable for table format. **/ export function GetCustomPropTable(this: void): table /** * * Gets the CreationMenus table, which was filled with creation menu tabs from @spawnmenu.AddCreationTab. * * @name spawnmenu.GetCreationTabs * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/GetCreationTabs * @param {void} this - no description * @returns {CreationMenus} - The CreationMenus table. See the @CreationMenus structure. **/ export function GetCreationTabs(this: void): CreationMenus /** * * Returns the function to create an vgui element for a specified content type * * @name spawnmenu.GetContentType * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/GetContentType * @param {void} this - no description * @param {string} contentType - no description * @returns {function} - The panel creation function **/ export function GetContentType(this: void, contentType: string): UnknownFunc /** * * Calls @spawnmenu.SaveToTextFiles. * * @name spawnmenu.DoSaveToTextFiles * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/DoSaveToTextFiles * @internal * @param {void} this - no description * @param {table} spawnlists - A table containing spawnlists. * @returns {void} **/ export function DoSaveToTextFiles(this: void, spawnlists: table): void /** * * Creates a new content icon. * * @name spawnmenu.CreateContentIcon * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/CreateContentIcon * @param {void} this - no description * @param {string} type - The type of the content icon. * @param {Panel} parent - The parent to add the content icon to. * @param {table} data - The data to send to the content icon in @spawnmenu.AddContentType * @returns {Panel} - The created content icon, if it was returned by @spawnmenu.AddContentType **/ export function CreateContentIcon(this: void, type: string, parent: Panel, data: table): Panel /** * * Clears all the tools from the different tool categories and the categories itself, if ran at the correct place. * Seems to only work when ran at initialization. * * @name spawnmenu.ClearToolMenus * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/ClearToolMenus * @param {void} this - no description * @returns {void} **/ export function ClearToolMenus(this: void): void /** * * Adds an option to the right side of the spawnmenu * * @name spawnmenu.AddToolMenuOption * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/AddToolMenuOption * @param {void} this - no description * @param {string} tab - The spawnmenu tab to add into (for example "Utilities") * @param {string} category - The category to add into (for example "Admin") * @param {string} cls - Unique identifier of option to add * @param {string} name - The nice name of item * @param {string} cmd - Command to execute when the item is selected * @param {string} config - Config name, used in older versions to load tool settings UI from a file. No longer works. * @param {function} cpanel - A function to build the context panel. The function has one argument: * @param {table} table - Allows to override the table that will be added to the tool list. Some of the fields will be overwritten by this function. * @returns {void} **/ export function AddToolMenuOption(this: void, tab: string, category: string, cls: string, name: string, cmd: string, config: string, cpanel: spawnmenuAddToolMenuOptionCpanel, table?: table): void /** * * Used to create a new category in the list inside of a spawnmenu ToolTab. * You must call this function from @SandboxHooks:AddToolMenuCategories for it to work properly. * * @name spawnmenu.AddToolCategory * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/AddToolCategory * @param {void} this - no description * @param {string} tab - The ToolTab name, as created with @spawnmenu.AddToolTab. * You can also use the default ToolTab names "Main" and "Utilities". * @param {string} RealName - The identifier name * @param {string} PrintName - The displayed name * @returns {void} **/ export function AddToolCategory(this: void, tab: string, RealName: string, PrintName: string): void /** * * Used to add addon spawnlists to the spawnmenu tree. This function should be called within @SandboxHooks:PopulatePropMenu. * Addon spawnlists will not save to disk if edited. * * @name spawnmenu.AddPropCategory * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/AddPropCategory * @warning You should never try to modify player customized spawnlists! * @param {void} this - no description * @param {string} classname - A unique classname of the list. * @param {string} name - The name of the category displayed to the player, e.g. *Comic Props*. * @param {any} contents - A table of entries for the spawn menu. It must be numerically indexed. * Each member of the table is a sub-table containing a type member, and other members depending on the type. * @param {string} icon - The icon to use in the tree. * @param {number} id - The unique ID number for the spawnlist category. Used to make sub categories. See "parentID" parameter below. If not set, it will be automatically set to ever increasing number, starting with 1000. * @param {number} parentID - The unique ID of the parent category. This will make the created category a subcategory of category with given unique ID. *0* makes this a base category (such as *Builder*). * @param {string} needsApp - The needed game for this prop category, if one is needed. If the specified game is not mounted, the category isn't shown. This uses the shortcut name, e.g. *cstrike*, and not the Steam AppID. * @returns {void} **/ export function AddPropCategory(this: void, classname: string, name: string, contents: any, icon: string, id?: number, parentID?: number, needsApp?: string): void /** * * Registers a new content type that is saveable into spawnlists. * Created/called by @spawnmenu.CreateContentIcon. * * @name spawnmenu.AddContentType * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/AddContentType * @param {void} this - no description * @param {string} name - An unique name of the content type. * @param {function} constructor - A function that is called whenever we need create a new panel for this content type. * It has two arguments: * @returns {void} **/ export function AddContentType(this: void, name: string, constructor: spawnmenuAddContentTypeConstructor): void /** * * Inserts a new tab into the CreationMenus table, which will be used by the creation menu to generate its tabs (Spawnlists, Weapons, Entities, etc.) * * @name spawnmenu.AddCreationTab * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/AddCreationTab * @param {void} this - no description * @param {string} name - What text will appear on the tab (I.E Spawnlists). * @param {function} func - The function called to generate the content of the tab. * @param {string} material - Path to the material that will be used as an icon on the tab. * @param {number} order - The order in which this tab should be shown relative to the other tabs on the creation menu. * @param {string} tooltip - The tooltip to be shown for this tab. * @returns {void} **/ export function AddCreationTab(this: void, name: string, func: UnknownFunc, material?: string, order?: number, tooltip?: string): void /** * * Returns currently opened control panel of a tool, post process effect or some other menu in spawnmenu. * * @name spawnmenu.ActiveControlPanel * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/ActiveControlPanel * @param {void} this - no description * @returns {Panel} - The currently opened control panel, if any. **/ export function ActiveControlPanel(this: void): Panel /** * * Activates tools context menu in specified tool tab. * * @name spawnmenu.ActivateToolPanel * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/ActivateToolPanel * @param {void} this - no description * @param {number} tab - The tabID of the tab to open the context menu in * @param {Panel} cp - The control panel to open * @returns {void} **/ export function ActivateToolPanel(this: void, tab: number, cp: Panel): void /** * * Activates a tool, opens context menu and brings up the tool gun. * * @name spawnmenu.ActivateTool * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/ActivateTool * @param {void} this - no description * @param {string} tool - Tool class/file name * @returns {void} **/ export function ActivateTool(this: void, tool: string): void /** * * Adds a new tool tab to the right side of the spawnmenu via the @SandboxHooks:AddToolMenuTabs hook. * This function is a inferior duplicate of @spawnmenu.GetToolMenu, just without its return value. * * @name spawnmenu.AddToolTab * @realm client * @wiki https://wiki.garrysmod.com/page/spawnmenu/AddToolTab * @param {void} this - no description * @param {string} name - The internal name of the tab. This is used for sorting. * @param {string} label - The 'nice' name of the tab (Tip: @language.Add) * @param {string} icon - The filepath to the icon of the tab. Should be a .png * @returns {void} **/ export function AddToolTab(this: void, name: string, label?: string, icon?: string): void } declare namespace sound { /** * @type soundPlayURLCallback * @param {void} this - no description * @param {IGModAudioChannel} soundchannel - The sound channel * @param {number} errorID - ID of an error, if an error has occured * @param {string} errorName - Name of an error, if an error has occured **/ type soundPlayURLCallback = (this: void, soundchannel: IGModAudioChannel, errorID: number, errorName: string) => unknown /** * @type soundPlayFileCallback * @param {void} this - no description * @param {IGModAudioChannel} soundchannel - The sound channel. Will be nil if an error occured. * @param {number} errorID - ID of an error if an error has occured. Will be nil, otherwise. * @param {string} errorName - Name of an error if an error has occured. Will be nil, otherwise. **/ type soundPlayFileCallback = (this: void, soundchannel: IGModAudioChannel, errorID: number, errorName: string) => unknown /** * * Allows you to play external sound files, as well as online radio streams. * You can find a list of all error codes [here](http://www.un4seen.com/doc/#bass/BASS_ErrorGetCode.html) * For offline file playback, see @sound.PlayFile. * * @name sound.PlayURL * @realm client * @wiki https://wiki.garrysmod.com/page/sound/PlayURL * @bug #2296 Due to a bug with [BASS](http://www.un4seen.com/), AAC codec streams cannot be played in 3D mode. * @param {void} this - no description * @param {string} url - The URL of the sound to play * @param {string} flags - Flags for the sound. Can be one or more of following, separated by a space (" "): * * 3d - Makes the sound 3D, so you can set its position * * mono - Forces the sound to have only one channel * * noplay - Forces the sound not to play as soon as this function is called * * noblock - Disables streaming in blocks. It is more resource-intensive, but it is required for @IGModAudioChannel:SetTime. * If you don't want to use any of the above, you can just leave it as "". * @param {function} callback - Callback function that is called as soon as the the stream is loaded. It has next arguments: * @returns {void} **/ export function PlayURL(this: void, url: string, flags: string, callback: soundPlayURLCallback): void /** * * Plays a file from GMod directory. You can find a list of all error codes [here](http://www.un4seen.com/doc/#bass/BASS_ErrorGetCode.html) * For external file/stream playback, see @sound.PlayURL. * * @name sound.PlayFile * @realm client * @wiki https://wiki.garrysmod.com/page/sound/PlayFile * @bug #1752 This fails for looping .wav files in 3D mode. * @bug #2304 This fails with unicode file names. * @param {void} this - no description * @param {string} path - The path to the file to play. * Unlike other sound functions and structures, the path is relative to *garrysmod/ * instead of *garrysmod/sound/ * * @param {string} flags - Flags for the sound. Can be one or more of following, separated by a space (" "): * * 3d - Makes the sound 3D, so you can set its position * * mono - Forces the sound to have only one channel * * noplay - Forces the sound not to play as soon as this function is called * * noblock - Disables streaming in blocks. It is more resource-intensive, but it is required for @IGModAudioChannel:SetTime. * If you don't want to use any of the above, you can just leave it as "". * @param {function} callback - Callback function that is called as soon as the the stream is loaded. It has next arguments: * @returns {void} **/ export function PlayFile(this: void, path: string, flags: string, callback: soundPlayFileCallback): void /** * * Returns a list of all registered sound scripts. * * @name sound.GetTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/sound/GetTable * @param {void} this - no description * @returns {table} - The list/array of all registered sound scripts ( No other information is provided ) **/ export function GetTable(this: void): table /** * * Plays a sound from the specified position in the world. * If you want to play a sound without a position, such as a UI sound, use @surface.PlaySound instead. * * @name sound.Play * @realm client, server * @wiki https://wiki.garrysmod.com/page/sound/Play * @param {void} this - no description * @param {string} Name - A string path to the sound. * @param {Vector} Pos - A vector describing where the sound should play. * @param {number} Level - Sound level in decibels. 75 is normal. Ranges from 20 to 180, where 180 is super loud. This affects how far away the sound will be heard. * @param {number} Pitch - An integer describing the sound pitch. Range is from 0 to 255. 100 is normal pitch. * @param {number} Volume - A float ranging from 0-1 describing the output volume of the sound. * @returns {void} **/ export function Play(this: void, Name: string, Pos: Vector, Level: number, Pitch: number, Volume: number): void /** * * Returns properties of the soundscript. * * @name sound.GetProperties * @realm client, server * @wiki https://wiki.garrysmod.com/page/sound/GetProperties * @param {void} this - no description * @param {string} name - The name of the sound script * @returns {SoundData} - The properties of the soundscript. See @SoundData structure **/ export function GetProperties(this: void, name: string): SoundData /** * * Creates a sound from a function. * * @name sound.Generate * @realm client * @wiki https://wiki.garrysmod.com/page/sound/Generate * @warning You cannot override already existing ones. * @bug #3360 This function cannot generate sounds that have a duration of less than 1 second. * @bug #4082 Sounds persist between disconnects. * @param {void} this - no description * @param {string} indentifier - An unique identified for the sound. * @param {number} samplerate - The sample rate of the sound. Must be 11025, 22050 or 44100. * @param {number} length - The length in seconds of the sound to generate. * @param {function} callback - A function which will be called to generate every sample on the sound. This function gets the current sample number passed as the first argument. The return value must be between -1.0 and 1.0. Other values will wrap back to the -1 to 1 range and basically clip. There are 65535 possible quantifiable values between -1 and 1. * @returns {void} **/ export function Generate(this: void, indentifier: string, samplerate: number, length: number, callback: UnknownFunc): void /** * * Overrides sounds defined inside of a txt file; typically used for adding map-specific sounds. * * @name sound.AddSoundOverrides * @realm client, server * @wiki https://wiki.garrysmod.com/page/sound/AddSoundOverrides * @param {void} this - no description * @param {string} filepath - Path to the script file to load. * @returns {void} **/ export function AddSoundOverrides(this: void, filepath: string): void /** * * Creates a sound script. It can also override sounds, which seems to only work when set on the server. * * @name sound.Add * @realm client, server * @wiki https://wiki.garrysmod.com/page/sound/Add * @param {void} this - no description * @param {SoundData} soundData - The sounds properties. See @SoundData structure * @returns {void} **/ export function Add(this: void, soundData: SoundData): void } declare namespace serverlist { /** * @type serverlistPlayerListCallback * @param {void} this - no description * @param {number} time - The amount of time the player is playing on the server, in seconds * @param {string} name - The player name * @param {number} score - The players score **/ type serverlistPlayerListCallback = (this: void, time: number, name: string, score: number) => unknown /** * * Queries a server for its player list. * * @name serverlist.PlayerList * @realm menu * @wiki https://wiki.garrysmod.com/page/serverlist/PlayerList * @param {void} this - no description * @param {string} ip - The IP address of the server, including the port. * @param {function} callback - The function to be called if and when the request finishes. Function has one argument, a table containing tables with player info. * Each table with player info has next fields: * @returns {void} **/ export function PlayerList(this: void, ip: string, callback: serverlistPlayerListCallback): void /** * * Queries the master server for server list. * * @name serverlist.Query * @realm menu * @wiki https://wiki.garrysmod.com/page/serverlist/Query * @param {void} this - no description * @param {ServerQueryData} data - The information about what kind of servers we want. See @ServerQueryData structure. * @returns {void} **/ export function Query(this: void, data: ServerQueryData): void /** * * Adds current server the player is on to their favorites. * * @name serverlist.AddCurrentServerToFavorites * @realm menu * @wiki https://wiki.garrysmod.com/page/serverlist/AddCurrentServerToFavorites * @internal * @param {void} this - no description * @returns {void} **/ export function AddCurrentServerToFavorites(this: void): void } declare namespace search { /** * @type searchAddProviderProvider * @param {void} this - no description * @param {string} searchQuery - no description * @param {string} text - Text to "Copy to clipboard" * @param {function} func - Function to use/spawn the item * @param {Panel} icon - A panel to add to spawnmenu * @param {table} words - A table of words? **/ type searchAddProviderProvider = (this: void, searchQuery: string, text: string, func: UnknownFunc, icon: Panel, words: table) => unknown /** * * Adds a search result provider. For examples, see gamemodes/sandbox/gamemode/cl_search_models.lua * * @name search.AddProvider * @realm client * @wiki https://wiki.garrysmod.com/page/search/AddProvider * @param {void} this - no description * @param {function} provider - Provider function. It has one argument: * You must return a list of tables structured like this: * @param {string} id - If provided, ensures that only one provider exists with the given ID at a time. * @returns {void} **/ export function AddProvider(this: void, provider: searchAddProviderProvider, id?: string): void /** * * Retrieves search results. * * @name search.GetResults * @realm client * @wiki https://wiki.garrysmod.com/page/search/GetResults * @param {void} this - no description * @param {string} query - Search query * @returns {table} - A table of results ( Maximum 1024 items ) **/ export function GetResults(this: void, query: string): table } declare namespace scripted_ents { /** * * Registers an ENT table with a classname. Reregistering an existing classname will automatically update the functions of all existing entities of that class. * * @name scripted_ents.Register * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/Register * @bug Sub-tables provided in the first argument will not carry over their metatable, and will receive a BaseClass key if the table was merged with the base's. Userdata references, which includes Vectors, Angles, Entities, etc. will not be copied. * @param {void} this - no description * @param {table} ENT - The ENT table to register * @param {string} classname - The classname to register * @returns {void} **/ export function Register(this: void, ENT: table, classname: string): void /** * * Called after all ENTS have been loaded and runs @baseclass.Set on each one. * You can retrieve all the currently registered ENTS with @scripted_ents.GetList. * * @name scripted_ents.OnLoaded * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/OnLoaded * @internal * @note This is not called after an ENT auto refresh, and thus the inherited baseclass functions retrieved with @baseclass.Get will not be updated * @param {void} this - no description * @returns {void} **/ export function OnLoaded(this: void): void /** * * Checks if name is based on base * * @name scripted_ents.IsBasedOn * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/IsBasedOn * @param {void} this - no description * @param {string} name - Entity's class name to be checked * @param {string} base - Base class name to be checked * @returns {boolean} - Returns true if class name is based on base, else false. **/ export function IsBasedOn(this: void, name: string, base: string): boolean /** * * Returns the 'type' of a class, this will one of the following: 'anim', 'ai', 'brush', 'point'. * * @name scripted_ents.GetType * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/GetType * @param {void} this - no description * @param {string} classname - The classname to check * @returns {string} - type **/ export function GetType(this: void, classname: string): string /** * * Returns the actual ENT table for a class. Modifying functions/variables in this table will change newly spawned entities * * @name scripted_ents.GetStored * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/GetStored * @param {void} this - no description * @param {string} classname - The classname of the ENT table to return * @returns {table} - entTable **/ export function GetStored(this: void, classname: string): table /** * * Returns a list of all ENT tables which contain either ENT.Spawnable or ENT.AdminSpawnable * * @name scripted_ents.GetSpawnable * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/GetSpawnable * @param {void} this - no description * @returns {IEntity[]} - A table of @IEntity structures **/ export function GetSpawnable(this: void): IEntity[] /** * * Retrieves a member of entity's table. * * @name scripted_ents.GetMember * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/GetMember * @param {void} this - no description * @param {string} cls - Entity's class name * @param {string} name - Name of member to retrieve * @returns {any} - The member or nil if failed **/ export function GetMember(this: void, cls: string, name: string): any /** * * Returns a copy of the list of all ENT tables registered * * @name scripted_ents.GetList * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/GetList * @param {void} this - no description * @returns {Iscripted_entsGetListReturn} - A table of all entities in the following format: (table keys are the classnames) **/ export function GetList(this: void): Iscripted_entsGetListReturn /** * * Defines an alias string that can be used to refer to another classname * * @name scripted_ents.Alias * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/Alias * @param {void} this - no description * @param {string} alias - A new string which can be used to refer to another classname * @param {string} classname - The classname the alias should refer to * @returns {void} **/ export function Alias(this: void, alias: string, classname: string): void /** * * Returns a copy of the ENT table for a class, including functions defined by the base class * * @name scripted_ents.Get * @realm client, server * @wiki https://wiki.garrysmod.com/page/scripted ents/Get * @param {void} this - no description * @param {string} classname - The classname of the ENT table to return, can be an alias * @returns {table} - entTable **/ export function Get(this: void, classname: string): table interface Iscripted_entsGetListReturn { /** * t - {IEntity}: The @IEntity structure associated with the entity **/ t: IEntity /** * isBaseType - {boolean}: Always true **/ isBaseType: boolean /** * Base - {string}: The entity base (note capital B in the key name) **/ Base: string /** * type - {string}: The entity type **/ type: string } } declare namespace saverestore { /** * @type saverestoreAddSaveHookCallback * @param {void} this - no description * @param {ISave} save - The save object to be used to write data to the save file that is being saved **/ type saverestoreAddSaveHookCallback = (this: void, save: ISave) => unknown /** * @type saverestoreAddRestoreHookCallback * @param {void} this - no description * @param {IRestore} save - The restore object to be used to read data from save file that is being loaded **/ type saverestoreAddRestoreHookCallback = (this: void, save: IRestore) => unknown /** * * Writes a variable to the save game file that is being saved. * * @name saverestore.WriteVar * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/WriteVar * @param {void} this - no description * @param {number | boolean | string | Entity | Angle | Vector | table} value - The value to save.It can be one of the following types: @number type, @boolean type, @string type, @Entity type, @Angle type, @Vector type or @table type. * @param {ISave} save - The save object to write the variable to. * @returns {void} **/ export function WriteVar(this: void, value: number | boolean | string | Entity | Angle | Vector | table, save: ISave): void /** * * Write a table to a save game file that is being saved. * * @name saverestore.WriteTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/WriteTable * @param {void} this - no description * @param {table} table - The table to write * @param {ISave} save - The save object to write the table to. * @returns {void} **/ export function WriteTable(this: void, table: table, save: ISave): void /** * * Returns how many writable keys are in the given table. * * @name saverestore.WritableKeysInTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/WritableKeysInTable * @param {void} this - no description * @param {table} table - The table to test. * @returns {number} - The number of keys that can be written with @saverestore.WriteTable. **/ export function WritableKeysInTable(this: void, table: table): number /** * * Called by engine when a save is being saved. * This handles saving gamemode and calls all of the hooks added with @saverestore.AddSaveHook. * * @name saverestore.SaveGlobal * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/SaveGlobal * @internal * @param {void} this - no description * @param {ISave} save - The save object to write data into the save file. * @returns {void} **/ export function SaveGlobal(this: void, save: ISave): void /** * * Saves entitys @EntityFuncs:GetTable to the save game file that is being saved. * * @name saverestore.SaveEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/SaveEntity * @param {void} this - no description * @param {Entity} ent - The entity to save @EntityFuncs:GetTable of. * @param {ISave} save - The save object to save @EntityFuncs:GetTable to. * @returns {void} **/ export function SaveEntity(this: void, ent: Entity, save: ISave): void /** * * Loads a variable from the save game file that is being loaded. * Variables will be read in the save order you have saved them. * * @name saverestore.ReadVar * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/ReadVar * @param {void} this - no description * @param {IRestore} save - The restore object to read variables from. * @returns {any} - The variable that was read, if any. **/ export function ReadVar(this: void, save: IRestore): any /** * * Reads a table from the save game file that is being loaded. * * @name saverestore.ReadTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/ReadTable * @param {void} this - no description * @param {IRestore} save - The restore object to read the table from. * @returns {table} - The table that has been read, if any **/ export function ReadTable(this: void, save: IRestore): table /** * * Called by the engine just before @saverestore.SaveGlobal is. * * @name saverestore.PreSave * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/PreSave * @internal * @param {void} this - no description * @returns {void} **/ export function PreSave(this: void): void /** * * Called by the engine just before @saverestore.LoadGlobal is. * * @name saverestore.PreRestore * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/PreRestore * @internal * @param {void} this - no description * @returns {void} **/ export function PreRestore(this: void): void /** * * Called by engine when a save is being loaded. * This handles loading gamemode and calls all of the hooks added with @saverestore.AddRestoreHook. * * @name saverestore.LoadGlobal * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/LoadGlobal * @internal * @param {void} this - no description * @param {IRestore} save - The restore object to read data from the save file with. * @returns {void} **/ export function LoadGlobal(this: void, save: IRestore): void /** * * Loads @EntityFuncs:GetTable from the save game file that is being loaded and merges it with the given entitys @EntityFuncs:GetTable. * * @name saverestore.LoadEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/LoadEntity * @param {void} this - no description * @param {Entity} ent - The entity which will receive the loaded values from the save. * @param {IRestore} save - The restore object to read the @EntityFuncs:GetTable from. * @returns {void} **/ export function LoadEntity(this: void, ent: Entity, save: IRestore): void /** * * Adds a save hook for the Half-Life 2 save system. You can this to carry data through level transitions in Half-Life 2. * * @name saverestore.AddSaveHook * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/AddSaveHook * @param {void} this - no description * @param {string} identifier - The unique identifier for this hook. * @param {function} callback - The function to be called when an engine save is being saved. It has one argument: * You can also use those functions to save data: * @saverestore.WriteVar * @saverestore.WriteTable * @saverestore.SaveEntity * @returns {void} **/ export function AddSaveHook(this: void, identifier: string, callback: saverestoreAddSaveHookCallback): void /** * * Adds a restore/load hook for the Half-Life 2 save system. * * @name saverestore.AddRestoreHook * @realm client, server * @wiki https://wiki.garrysmod.com/page/saverestore/AddRestoreHook * @param {void} this - no description * @param {string} identifier - The unique identifier for this hook. * @param {function} callback - The function to be called when an engine save is being loaded. It has one argument: * You can also use those functions to read data: * @saverestore.ReadVar * @saverestore.ReadTable * @saverestore.LoadEntity * @returns {void} **/ export function AddRestoreHook(this: void, identifier: string, callback: saverestoreAddRestoreHookCallback): void } declare namespace resource { /** * * Adds a workshop addon for the client to download before entering the server. * Having the raw files from a workshop item does not count as having already downloaded it. * So players who previously downloaded a map through Fast Download will have to re-download it if you use the workshop. * You should try to only add addons that have custom content ( models, sounds, etc ). * Gamemodes that are [workshop enabled](https://wiki.garrysmod.com/page/Gamemode_Creation#Gamemode_Text_File) are automatically added to this list - so there's no need to add them. * The server's current map is also automatically added, if it is loaded from a workshop addon. * * @name resource.AddWorkshop * @realm server * @wiki https://wiki.garrysmod.com/page/resource/AddWorkshop * @warning This will not "install" the addon on your server, see [Workshop for Dedicated Servers](https://wiki.garrysmod.com/page/Workshop%20for%20Dedicated%20Servers) for installing Steam Workshop addons onto your servers * @param {void} this - no description * @param {string} workshopid - The workshop id of the file. This cannot be a collection. * @returns {void} **/ export function AddWorkshop(this: void, workshopid: string): void /** * * Adds the specified file to the files the client should download. * * @name resource.AddSingleFile * @realm server * @wiki https://wiki.garrysmod.com/page/resource/AddSingleFile * @note There's a 8192 downloadable file limit. If you need more, consider using Workshop addons - @resource.AddWorkshop. You should also consider the fact that you have way too many downloads. This limit is shared among all resource.Add functions. * @param {void} this - no description * @param {string} path - Path of the file to be added, relative to garrysmod/ * @returns {void} **/ export function AddSingleFile(this: void, path: string): void /** * * Adds the specified and all related files to the files the client should download. * For convenience, this function will automatically add any other files that are related to the selected one, and throw an error if it can't find them. For example, a .vmt file will automatically add the .vtf with the same name, and a .mdl file will automatically add all .vvd, .ani, .dx80.vtx, .dx90.vtx, .sw.vtx, .phy and .jpg files with the same name, with a separate error for each missing file. If you do not want it to do this, use [resource.AddSingleFile](https://wiki.garrysmod.com/page/resource/AddSingleFile). * * @name resource.AddFile * @realm server * @wiki https://wiki.garrysmod.com/page/resource/AddFile * @note There's a 8192 downloadable file limit. If you need more, consider using Workshop addons - @resource.AddWorkshop. You should also consider the fact that you have way too many downloads. This limit is shared among all resource.Add functions. * @note Running this function using a path relative to the main garrysmod/ folder will not work for files in addons and gamemodes. Instead, the files must be added relative to their respective content folders. For example, a sound file from an addon would use the path "sound/[FILENAME_AND_EXTENSION]," despite the file being located in "addons/[ADDON_NAME]/sound/[FILENAME_AND_EXTENSION]" * @param {void} this - no description * @param {string} path - Virtual path of the file to be added, relative to garrysmod/. Do not add .bz2 to the filepath. Do not put gamemodes//content/ or addons// into the path. * @returns {void} **/ export function AddFile(this: void, path: string): void } declare namespace render { /** * * Copies the entire screen to the screen effect texture, which can be acquired via @render.GetScreenEffectTexture. This function is mainly intended to be used in @GamemodeHooks:RenderScreenspaceEffects * * @name render.UpdateScreenEffectTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/UpdateScreenEffectTexture * @param {void} this - no description * @returns {void} **/ export function UpdateScreenEffectTexture(this: void): void /** * * Pretty much alias of @render.UpdatePowerOfTwoTexture but does not return the texture. * * @name render.UpdateRefractTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/UpdateRefractTexture * @param {void} this - no description * @returns {void} **/ export function UpdateRefractTexture(this: void): void /** * * Updates the power of two texture. * * @name render.UpdatePowerOfTwoTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/UpdatePowerOfTwoTexture * @param {void} this - no description * @returns {ITexture} - Returns @render.GetPowerOfTwoTexture. **/ export function UpdatePowerOfTwoTexture(this: void): ITexture /** * * Updates the texture returned by @render.GetFullScreenDepthTexture. * Silently fails if @render.SupportsPixelShaders_2_0 returns false. * * @name render.UpdateFullScreenDepthTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/UpdateFullScreenDepthTexture * @param {void} this - no description * @returns {void} **/ export function UpdateFullScreenDepthTexture(this: void): void /** * * Enables HDR tone mapping which influences the brightness. * * @name render.TurnOnToneMapping * @realm client * @wiki https://wiki.garrysmod.com/page/render/TurnOnToneMapping * @param {void} this - no description * @returns {void} **/ export function TurnOnToneMapping(this: void): void /** * * Suppresses or enables any engine lighting for any upcoming render operation. * * @name render.SuppressEngineLighting * @realm client * @wiki https://wiki.garrysmod.com/page/render/SuppressEngineLighting * @bug #4070 This does not affect @IMesh typees. * @param {void} this - no description * @param {boolean} suppressLighting - True to suppress false to enable. * @returns {void} **/ export function SuppressEngineLighting(this: void, suppressLighting: boolean): void /** * * Returns if the current settings and the system allow the usage of vertex shaders 2.0. * * @name render.SupportsVertexShaders_2_0 * @realm client * @wiki https://wiki.garrysmod.com/page/render/SupportsVertexShaders 2 0 * @param {void} this - no description * @returns {boolean} - Whether Vertex Shaders 2.0 are supported or not. **/ export function SupportsVertexShaders_2_0(this: void): boolean /** * * Returns if the current settings and the system allow the usage of pixel shaders 2.0. * * @name render.SupportsPixelShaders_2_0 * @realm client * @wiki https://wiki.garrysmod.com/page/render/SupportsPixelShaders 2 0 * @param {void} this - no description * @returns {boolean} - Whether Pixel Shaders 2.0 are supported or not. **/ export function SupportsPixelShaders_2_0(this: void): boolean /** * * Returns if the current settings and the system allow the usage of pixel shaders 1.4. * * @name render.SupportsPixelShaders_1_4 * @realm client * @wiki https://wiki.garrysmod.com/page/render/SupportsPixelShaders 1 4 * @param {void} this - no description * @returns {boolean} - Whether Pixel Shaders 1.4 are supported or not. **/ export function SupportsPixelShaders_1_4(this: void): boolean /** * * Start a new beam draw operation. * * @name render.StartBeam * @realm client * @wiki https://wiki.garrysmod.com/page/render/StartBeam * @rendering function:3d * @param {void} this - no description * @param {number} segmentCount - Amount of beam segments that are about to be drawn. * @returns {void} **/ export function StartBeam(this: void, segmentCount: number): void /** * * Returns whether the game supports HDR, i.e. if the DirectX level is higher than or equal to 8. * * @name render.SupportsHDR * @realm client * @wiki https://wiki.garrysmod.com/page/render/SupportsHDR * @param {void} this - no description * @returns {boolean} - supportsHDR **/ export function SupportsHDR(this: void): boolean /** * * Swaps the frame buffers/cycles the frame. In other words, this updates the screen. * If you take a really long time during a single frame render, it is a good idea to use this and let the user know that the game isn't stuck. * * @name render.Spin * @realm client * @wiki https://wiki.garrysmod.com/page/render/Spin * @param {void} this - no description * @returns {void} **/ export function Spin(this: void): void /** * @name render.SetWriteDepthToDestAlpha * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetWriteDepthToDestAlpha * @param {void} this - no description * @param {boolean} enable - no description * @returns {void} **/ export function SetWriteDepthToDestAlpha(this: void, enable: boolean): void /** * * Changes the view port position and size. The values will be clamped to the game's screen resolution. * If you are looking to render something to a texture (render target), you should use @render.PushRenderTarget. * * @name render.SetViewPort * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetViewPort * @note This function will override values of @ScrW function and @ScrH function with the ones you set. * @param {void} this - no description * @param {number} x - X origin of the view port. * @param {number} y - Y origin of the view port. * @param {number} w - Width of the view port. * @param {number} h - Height of the view port. * @returns {void} **/ export function SetViewPort(this: void, x: number, y: number, w: number, h: number): void /** * @name render.SetToneMappingScaleLinear * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetToneMappingScaleLinear * @param {void} this - no description * @param {Vector} vec - no description * @returns {void} **/ export function SetToneMappingScaleLinear(this: void, vec: Vector): void /** * * Sets the operation to be performed on the stencil buffer values if the stencil test is passed but the depth buffer test fails. * * @name render.SetStencilZFailOperation * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilZFailOperation * @param {void} this - no description * @param {STENCILOPERATION} zFailOperation - Z fail operation function, see @STENCILOPERATION enum * @returns {void} **/ export function SetStencilZFailOperation(this: void, zFailOperation: STENCILOPERATION): void /** * * Sets the unsigned 8-bit write bitflag mask to be used for any writes to the stencil buffer. * * @name render.SetStencilWriteMask * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilWriteMask * @param {void} this - no description * @param {number} mask - The mask bitflag. * @returns {void} **/ export function SetStencilWriteMask(this: void, mask: number): void /** * * Sets the unsigned 8-bit test bitflag mask to be used for any stencil testing. * * @name render.SetStencilTestMask * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilTestMask * @param {void} this - no description * @param {number} mask - The mask bitflag. * @returns {void} **/ export function SetStencilTestMask(this: void, mask: number): void /** * * Sets the reference value which will be used for all stencil operations. This is an unsigned integer. * * @name render.SetStencilReferenceValue * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilReferenceValue * @param {void} this - no description * @param {number} referenceValue - Reference value. * @returns {void} **/ export function SetStencilReferenceValue(this: void, referenceValue: number): void /** * * Sets the operation to be performed on the stencil buffer values if the compare function was successful. * * @name render.SetStencilPassOperation * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilPassOperation * @param {void} this - no description * @param {STENCILOPERATION} passOperation - Pass operation function, see @STENCILOPERATION enum * @returns {void} **/ export function SetStencilPassOperation(this: void, passOperation: STENCILOPERATION): void /** * * Sets whether stencil tests are carried out for each rendered pixel. * Only pixels passing the stencil test are written to the render target. * * @name render.SetStencilEnable * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilEnable * @param {void} this - no description * @param {boolean} newState - The new state. * @returns {void} **/ export function SetStencilEnable(this: void, newState: boolean): void /** * * Sets the operation to be performed on the stencil buffer values if the compare function was not successful. * Note that this takes place **before** depth testing. * * @name render.SetStencilFailOperation * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilFailOperation * @param {void} this - no description * @param {STENCILOPERATION} failOperation - Fail operation function, see @STENCILOPERATION enum * @returns {void} **/ export function SetStencilFailOperation(this: void, failOperation: STENCILOPERATION): void /** * * Sets the compare function of the stencil. * Pixels which fail the stencil comparison function are not written to the render target. The operation to be performed on the stencil buffer values for these pixels can be set using @render.SetStencilFailOperation. * Pixels which pass the stencil comparison function are written to the render target unless they fail the depth buffer test (where applicable). The operation to perform on the stencil buffer values for these pixels can be set using @render.SetStencilPassOperation and @render.SetStencilZFailOperation. * * @name render.SetStencilCompareFunction * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetStencilCompareFunction * @param {void} this - no description * @param {STENCILCOMPARISONFUNCTION} compareFunction - Compare function, see @STENCILCOMPARISONFUNCTION enum, and @STENCIL enum for short. * @returns {void} **/ export function SetStencilCompareFunction(this: void, compareFunction: STENCILCOMPARISONFUNCTION): void /** * * Sets the maximum shadow projection range. * * @name render.SetShadowDistance * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetShadowDistance * @param {void} this - no description * @param {number} shadowDistance - The new maximum shadow distance. * @returns {void} **/ export function SetShadowDistance(this: void, shadowDistance: number): void /** * * Sets whether any future render operations will ignore shadow drawing. * * @name render.SetShadowsDisabled * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetShadowsDisabled * @param {void} this - no description * @param {boolean} newState - no description * @returns {void} **/ export function SetShadowsDisabled(this: void, newState: boolean): void /** * * Sets the shadow projection direction. * * @name render.SetShadowDirection * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetShadowDirection * @param {void} this - no description * @param {Vector} shadowDirections - The new shadow direction. * @returns {void} **/ export function SetShadowDirection(this: void, shadowDirections: Vector): void /** * * Sets the shadow color. * * @name render.SetShadowColor * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetShadowColor * @param {void} this - no description * @param {number} red - The red channel of the shadow color. * @param {number} green - The green channel of the shadow color. * @param {number} blue - The blue channel of the shadow color. * @returns {void} **/ export function SetShadowColor(this: void, red: number, green: number, blue: number): void /** * * Sets the render target with the specified index to the specified rt. * * @name render.SetRenderTargetEx * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetRenderTargetEx * @param {void} this - no description * @param {number} rtIndex - The index of the rt to set. * @param {ITexture} texture - The new render target to be used. * @returns {void} **/ export function SetRenderTargetEx(this: void, rtIndex: number, texture: ITexture): void /** * * Sets a scissoring rect which limits the drawing area. * * @name render.SetScissorRect * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetScissorRect * @param {void} this - no description * @param {number} startX - X start coordinate of the scissor rect. * @param {number} startY - Y start coordinate of the scissor rect. * @param {number} endX - X end coordinate of the scissor rect. * @param {number} endY - Y end coordinate of the scissor rect. * @param {boolean} enable - Enable or disable the scissor rect. * @returns {void} **/ export function SetScissorRect(this: void, startX: number, startY: number, endX: number, endY: number, enable: boolean): void /** * * Sets the render target to the specified rt. * * @name render.SetRenderTarget * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetRenderTarget * @param {void} this - no description * @param {ITexture} texture - The new render target to be used. * @returns {void} **/ export function SetRenderTarget(this: void, texture: ITexture): void /** * * Sets up the ambient lighting for any upcoming render operation. Ambient lighting can be seen as a cube enclosing the object to be drawn, each of its faces representing a directional light source that shines towards the object. Thus, there is a total of six different light sources that can be configured separately. * Light color components are not restricted to a specific range (i.e. 0-255), instead, higher values will result in a brighter light. * * @name render.SetModelLighting * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetModelLighting * @param {void} this - no description * @param {BOX} lightDirection - The light source to edit, see @BOX enum. * @param {number} red - The red component of the light color. * @param {number} green - The green component of the light color. * @param {number} blue - The blue component of the light color. * @returns {void} **/ export function SetModelLighting(this: void, lightDirection: BOX, red: number, green: number, blue: number): void /** * * Sets the material to be used in any upcoming render operation using the @render library. * Not to be confused with @surface.SetMaterial. * * @name render.SetMaterial * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetMaterial * @rendering function:2d * @param {void} this - no description * @param {IMaterial} mat - The material to be used. * @returns {void} **/ export function SetMaterial(this: void, mat: IMaterial): void /** * * Sets up the local lighting for any upcoming render operation. Up to 4 local lights can be defined, with one of three different types (point, directional, spot). * Disables all local lights if called with no arguments. * * @name render.SetLocalModelLights * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetLocalModelLights * @param {void} this - no description * @param {LocalLight} lights - A table containing up to 4 tables for each light source that should be set up. Each of these tables should contain the properties of its associated light source, see @LocalLight structure. * @returns {void} **/ export function SetLocalModelLights(this: void, lights?: LocalLight): void /** * * Sets the texture to be used as the lightmap in upcoming rendering operations. This is required when rendering meshes using a material with a lightmapped shader such as LightmappedGeneric. * * @name render.SetLightmapTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetLightmapTexture * @rendering function:2d * @param {void} this - no description * @param {ITexture} tex - The texture to be used as the lightmap. * @returns {void} **/ export function SetLightmapTexture(this: void, tex: ITexture): void /** * * Sets the lighting origin. * * @name render.SetLightingOrigin * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetLightingOrigin * @bug #2804 This does not work for prop_physics. * @param {void} this - no description * @param {Vector} lightingOrigin - The position from which the light should be "emitted". * @returns {void} **/ export function SetLightingOrigin(this: void, lightingOrigin: Vector): void /** * * Sets lighting mode when rendering something. * * @name render.SetLightingMode * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetLightingMode * @note **Do not forget to restore the default value** to avoid unexpected behavior, like the world and the HUD/UI being affected * @param {void} this - no description * @param {number} Mode - Lighting render mode * Possible values are: * * 0 - Default * * 1 - Total fullbright, similar to *mat_fullbright 1* but excluding some weapon view models * * 2 - Increased brightness(?), models look fullbright * @returns {void} **/ export function SetLightingMode(this: void, Mode: number): void /** * * Sets the goal HDR tone mapping scale. * Use this in a rendering/think hook as it is reset every frame. * * @name render.SetGoalToneMappingScale * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetGoalToneMappingScale * @param {void} this - no description * @param {number} scale - The target scale. * @returns {void} **/ export function SetGoalToneMappingScale(this: void, scale: number): void /** * * If the fog mode is set to [MATERIAL_FOG_LINEAR_BELOW_FOG_Z](https://wiki.garrysmod.com/page/Enums/MATERIAL_FOG), the fog will only be rendered below the specified height. * * @name render.SetFogZ * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetFogZ * @param {void} this - no description * @param {number} fogZ - The fog Z. * @returns {void} **/ export function SetFogZ(this: void, fogZ: number): void /** * * Sets the color modulation. * * @name render.SetColorModulation * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetColorModulation * @param {void} this - no description * @param {number} r - The red channel multiplier normal ranging from 0-1. * @param {number} g - The green channel multiplier normal ranging from 0-1. * @param {number} b - The blue channel multiplier normal ranging from 0-1. * @returns {void} **/ export function SetColorModulation(this: void, r: number, g: number, b: number): void /** * * Sets the current drawing material to "color". * The material is defined as: * "UnlitGeneric" * { * "$basetexture" "color/white" * "$model" 1 * "$translucent" 1 * "$vertexalpha" 1 * "$vertexcolor" 1 * } * * @name render.SetColorMaterial * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetColorMaterial * @param {void} this - no description * @returns {void} **/ export function SetColorMaterial(this: void): void /** * * Sets the current drawing material to "color_ignorez". * The material is defined as: * "UnlitGeneric" * { * "$basetexture" "color/white" * "$model" 1 * "$translucent" 1 * "$vertexalpha" 1 * "$vertexcolor" 1 * "$ignorez" 1 * } * * @name render.SetColorMaterialIgnoreZ * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetColorMaterialIgnoreZ * @param {void} this - no description * @returns {void} **/ export function SetColorMaterialIgnoreZ(this: void): void /** * * Sets the alpha blending for every upcoming render operation. * * @name render.SetBlend * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetBlend * @bug #3166 This does not affect non-model render.Draw* functions. * @param {void} this - no description * @param {number} blending - Blending value from 0-1. * @returns {void} **/ export function SetBlend(this: void, blending: number): void /** * * Sets the ambient lighting for any upcoming render operation. * * @name render.SetAmbientLight * @realm client * @wiki https://wiki.garrysmod.com/page/render/SetAmbientLight * @param {void} this - no description * @param {number} r - The red part of the color, 0-1. * @param {number} g - The green part of the color, 0-1. * @param {number} b - The blue part of the color, 0-1. * @returns {void} **/ export function SetAmbientLight(this: void, r: number, g: number, b: number): void /** * * Resets the HDR tone multiplier to the specified value. * This will only work on HDR maps, and the value will automatically fade to what it was ( or whatever @render.SetGoalToneMappingScale is ) if called only once. * * @name render.ResetToneMappingScale * @realm client * @wiki https://wiki.garrysmod.com/page/render/ResetToneMappingScale * @param {void} this - no description * @param {number} scale - The value which should be used as multiplier. * @returns {void} **/ export function ResetToneMappingScale(this: void, scale: number): void /** * * Resets the model lighting to the specified color. * Calls @render.SetModelLighting for every direction with given color. * * @name render.ResetModelLighting * @realm client * @wiki https://wiki.garrysmod.com/page/render/ResetModelLighting * @param {void} this - no description * @param {number} r - The red part of the color, 0-1 * @param {number} g - The green part of the color, 0-1 * @param {number} b - The blue part of the color, 0-1 * @returns {void} **/ export function ResetModelLighting(this: void, r: number, g: number, b: number): void /** * * Renders the scene with the specified viewData to the current active render target. * * @name render.RenderView * @realm client * @wiki https://wiki.garrysmod.com/page/render/RenderView * @bug #1330 Static props and LODs are rendered improperly due to incorrectly perceived distance. * @param {void} this - no description * @param {ViewData} view - The view data to be used in the rendering. See @ViewData structure. Any missing value is assumed to be that of the current view. Similarly, you can make a normal render by simply not passing this table at all. * @returns {void} **/ export function RenderView(this: void, view?: ViewData): void /** * * Renders the HUD on the screen. * * @name render.RenderHUD * @realm client * @wiki https://wiki.garrysmod.com/page/render/RenderHUD * @param {void} this - no description * @param {number} x - X position for the HUD draw origin. * @param {number} y - Y position for the HUD draw origin. * @param {number} w - Width of the HUD draw. * @param {number} h - Height of the HUD draw. * @returns {void} **/ export function RenderHUD(this: void, x: number, y: number, w: number, h: number): void /** * * This applies the changes made to map lighting using @engine.LightStyle. * * @name render.RedownloadAllLightmaps * @realm client * @wiki https://wiki.garrysmod.com/page/render/RedownloadAllLightmaps * @param {void} this - no description * @param {boolean} DoStaticProps - When true, this will also apply lighting changes to static props. This is really slow on large maps. * @returns {void} **/ export function RedownloadAllLightmaps(this: void, DoStaticProps?: boolean): void /** * * Reads the color of the specified pixel from the RenderTarget sent by @render.CapturePixels * * @name render.ReadPixel * @realm client * @wiki https://wiki.garrysmod.com/page/render/ReadPixel * @param {void} this - no description * @param {number} x - The x coordinate. * @param {number} y - The y coordinate. * @returns {number} - r * @returns {number} - g * @returns {number} - b * @tupleReturn **/ export function ReadPixel(this: void, x: number, y: number): [number, number, number] /** * * Enables the flashlight projection for the upcoming rendering. * * @name render.PushFlashlightMode * @realm client * @wiki https://wiki.garrysmod.com/page/render/PushFlashlightMode * @bug #3029 This will leave models lit under specific conditions. * @param {void} this - no description * @param {boolean} enable - Whether the flashlight mode should be enabled or disabled. * @returns {void} **/ export function PushFlashlightMode(this: void, enable?: boolean): void /** * * Pushes a texture filter onto the minification texture filter stack. * * @name render.PushFilterMin * @realm client * @wiki https://wiki.garrysmod.com/page/render/PushFilterMin * @param {void} this - no description * @param {TEXFILTER} texFilterType - The texture filter type, see @TEXFILTER enum * @returns {void} **/ export function PushFilterMin(this: void, texFilterType: TEXFILTER): void /** * * Pushes the current render target and viewport to the RT stack then sets a new current render target and viewport. If the viewport is not specified, the dimensions of the render target are used instead. * This is similar to a call to @render.SetRenderTarget and @render.SetViewPort where the current render target and viewport have been saved beforehand, except the viewport isn't clipped to screen bounds. * See also @render.PopRenderTarget. * * @name render.PushRenderTarget * @realm client * @wiki https://wiki.garrysmod.com/page/render/PushRenderTarget * @note If you want to render to the render target in 2d mode and it is not the same size as the screen, use @cam.Start2D and @cam.End2D. * @note If the render target is bigger than the screen, rendering done with the surface library will be clipped to the screen bounds unless you call @surface.DisableClipping * @param {void} this - no description * @param {ITexture} texture - The new render target to be used. * @param {number} x - X origin of the viewport. * @param {number} y - Y origin of the viewport. * @param {number} w - Width of the viewport. * @param {number} h - Height of the viewport * @returns {void} **/ export function PushRenderTarget(this: void, texture: ITexture, x?: number, y?: number, w?: number, h?: number): void /** * * Pushes a texture filter onto the magnification texture filter stack. * * @name render.PushFilterMag * @realm client * @wiki https://wiki.garrysmod.com/page/render/PushFilterMag * @param {void} this - no description * @param {TEXFILTER} texFilterType - The texture filter type, see @TEXFILTER enum * @returns {void} **/ export function PushFilterMag(this: void, texFilterType: TEXFILTER): void /** * * Pushes a new clipping plane of the clip plane stack and sets it as active. * * @name render.PushCustomClipPlane * @realm client * @wiki https://wiki.garrysmod.com/page/render/PushCustomClipPlane * @note A max of 2 clip planes are supported on Linux/POSIX, and 6 on Windows. * @param {void} this - no description * @param {Vector} normal - The normal of the clipping plane. * @param {number} distance - The distance of the plane from the world origin. You can use @VectorFuncs:Dot between the normal and any point on the plane to find this, see [Example 1](https://wiki.garrysmod.com/page/#Example). * @returns {void} **/ export function PushCustomClipPlane(this: void, normal: Vector, distance: number): void /** * * Pops the current flashlight mode from the flashlight mode stack. * * @name render.PopFlashlightMode * @realm client * @wiki https://wiki.garrysmod.com/page/render/PopFlashlightMode * @param {void} this - no description * @returns {void} **/ export function PopFlashlightMode(this: void): void /** * * Pops the last render target and viewport from the RT stack and sets them as the current render target and viewport. * This is should be called to restore the previous render target and viewport after a call to @render.PushRenderTarget. * * @name render.PopRenderTarget * @realm client * @wiki https://wiki.garrysmod.com/page/render/PopRenderTarget * @param {void} this - no description * @returns {void} **/ export function PopRenderTarget(this: void): void /** * * Pops the current texture minification filter from the filter stack. * See @render.PushFilterMin * * @name render.PopFilterMin * @realm client * @wiki https://wiki.garrysmod.com/page/render/PopFilterMin * @param {void} this - no description * @returns {void} **/ export function PopFilterMin(this: void): void /** * * Removes the current active clipping plane from the clip plane stack. * * @name render.PopCustomClipPlane * @realm client * @wiki https://wiki.garrysmod.com/page/render/PopCustomClipPlane * @param {void} this - no description * @returns {void} **/ export function PopCustomClipPlane(this: void): void /** * * Pops the current texture magnification filter from the filter stack. * See @render.PushFilterMag * * @name render.PopFilterMag * @realm client * @wiki https://wiki.garrysmod.com/page/render/PopFilterMag * @param {void} this - no description * @returns {void} **/ export function PopFilterMag(this: void): void /** * @name render.PerformFullScreenStencilOperation * @realm client * @wiki https://wiki.garrysmod.com/page/render/PerformFullScreenStencilOperation * @param {void} this - no description * @returns {void} **/ export function PerformFullScreenStencilOperation(this: void): void /** * * Overrides the write behaviour of all next rendering operations towards the depth buffer. * * @name render.OverrideDepthEnable * @realm client * @wiki https://wiki.garrysmod.com/page/render/OverrideDepthEnable * @param {void} this - no description * @param {boolean} enable - Enable or disable the override. * @param {boolean} shouldWrite - If the previous argument is true, sets whether the next rendering operations should write to the depth buffer or not. Has no effect if the previous argument is false. * @returns {void} **/ export function OverrideDepthEnable(this: void, enable: boolean, shouldWrite: boolean): void /** * * Overrides the write behaviour of all next rendering operations towards the color channel of the current render target. * * @name render.OverrideColorWriteEnable * @realm client * @wiki https://wiki.garrysmod.com/page/render/OverrideColorWriteEnable * @param {void} this - no description * @param {boolean} enable - Enable or disable the override. * @param {boolean} shouldWrite - If the previous argument is true, sets whether the next rendering operations should write to the color channel or not. Has no effect if the previous argument is false. * @returns {void} **/ export function OverrideColorWriteEnable(this: void, enable: boolean, shouldWrite: boolean): void /** * * Overrides the internal graphical functions used to determine the final color and alpha of a rendered texture. * See also @render.OverrideAlphaWriteEnable. * * @name render.OverrideBlend * @realm client * @wiki https://wiki.garrysmod.com/page/render/OverrideBlend * @note Doing @surface library draw calls with alpha set to 0 is a no-op and won't have an effect. * @param {void} this - no description * @param {boolean} enabled - true to enable, false to disable. No other arguments are required when disabling. * @param {BLEND} srcBlend - The source color blend function @BLEND enum. Determines how a rendered texture's final color should be calculated. * @param {BLEND} destBlend - The destination color blend function @BLEND enum. * @param {BLENDFUNC} blendFunc - The blend mode used for drawing the color layer @BLENDFUNC enum. * @param {BLEND} srcBlendAlpha - The source alpha blend function @BLEND enum. Determines how a rendered texture's final alpha should be calculated. * @param {BLEND} destBlendAlpha - The destination alpha blend function @BLEND enum. * @param {BLENDFUNC} blendFuncAlpha - The blend mode used for drawing the alpha layer @BLENDFUNC enum. * @returns {void} **/ export function OverrideBlend(this: void, enabled: boolean, srcBlend: BLEND, destBlend: BLEND, blendFunc: BLENDFUNC, srcBlendAlpha?: BLEND, destBlendAlpha?: BLEND, blendFuncAlpha?: BLENDFUNC): void /** * * Overrides the internal graphical functions used to determine the final color and alpha of a rendered texture. * See also @render.OverrideAlphaWriteEnable. * * @name render.OverrideBlendFunc * @realm client * @wiki https://wiki.garrysmod.com/page/render/OverrideBlendFunc * @note Doing @surface library draw calls with alpha set to 0 is a no-op and will never have any effect. * @param {void} this - no description * @param {boolean} enabled - true to enable, false to disable. No other arguments are required when disabling. * @param {BLEND} srcBlend - The source color blend function @BLEND enum. Determines how a rendered texture's final color should be calculated. * @param {number} destBlend - no description * @param {BLEND} srcBlendAlpha - The source alpha blend function @BLEND enum. Determines how a rendered texture's final alpha should be calculated. * @param {number} destBlendAlpha - no description * @returns {void} **/ export function OverrideBlendFunc(this: void, enabled: boolean, srcBlend: BLEND, destBlend: number, srcBlendAlpha?: BLEND, destBlendAlpha?: number): void /** * * Overrides the write behaviour of all next rendering operations towards the alpha channel of the current render target. * See also @render.OverrideBlend. * * @name render.OverrideAlphaWriteEnable * @realm client * @wiki https://wiki.garrysmod.com/page/render/OverrideAlphaWriteEnable * @note Doing @surface library draw calls with alpha set to 0 is a no-op and will never have any effect. * @param {void} this - no description * @param {boolean} enable - Enable or disable the override. * @param {boolean} shouldWrite - If the previous argument is true, sets whether the next rendering operations should write to the alpha channel or not. Has no effect if the previous argument is false. * @returns {void} **/ export function OverrideAlphaWriteEnable(this: void, enable: boolean, shouldWrite: boolean): void /** * * Sets a material to override a model's default material. Similar to @EntityFuncs:SetMaterial except it uses an @IMaterial type argument and it can be used to change materials on models which are part of the world geometry. * * @name render.ModelMaterialOverride * @realm client * @wiki https://wiki.garrysmod.com/page/render/ModelMaterialOverride * @param {void} this - no description * @param {IMaterial} material - The material override. * @returns {void} **/ export function ModelMaterialOverride(this: void, material: IMaterial): void /** * * Creates a new @ClientsideModel function, renders it at the specified pos/ang, and removes it. Can also be given an existing @CSEnt type to reuse instead. * * @name render.Model * @realm client * @wiki https://wiki.garrysmod.com/page/render/Model * @note This function is only meant to be used in a single render pass kind of scenario, if you need to render a model continuously, use a cached @ClientsideModel function and provide it as a second argument. * @bug #3307 Using this with a map model (@game.GetWorld():[GetModel](https://wiki.garrysmod.com/page/Entity/GetModel)()) crashes the game. * @param {void} this - no description * @param {IrenderModelSettings} settings - Requires: * @param {CSEnt} ent - If provided, this entity will be reused instead of creating a new one with @ClientsideModel function. Note that the ent's model, position and angles will be changed, and @EntityFuncs:SetNoDraw will be set to true. * @returns {void} **/ export function Model(this: void, settings: IrenderModelSettings, ent?: CSEnt): void /** * * Returns the maximum texture width the renderer can handle. * * @name render.MaxTextureWidth * @realm client * @wiki https://wiki.garrysmod.com/page/render/MaxTextureWidth * @param {void} this - no description * @returns {number} - maxTextureWidth **/ export function MaxTextureWidth(this: void): number /** * * Returns the maximum texture height the renderer can handle. * * @name render.MaxTextureHeight * @realm client * @wiki https://wiki.garrysmod.com/page/render/MaxTextureHeight * @param {void} this - no description * @returns {number} - maxTextureHeight **/ export function MaxTextureHeight(this: void): number /** * * Similar to @render.MaterialOverride, but overrides the materials per index. * @render.MaterialOverride overrides effects of this function. * * @name render.MaterialOverrideByIndex * @realm client * @wiki https://wiki.garrysmod.com/page/render/MaterialOverrideByIndex * @param {void} this - no description * @param {number} index - Starts with 0, the index of the material to override * @param {IMaterial} material - The material to override with * @returns {void} **/ export function MaterialOverrideByIndex(this: void, index: number, material: IMaterial): void /** * * Sets the render material override for all next calls of @EntityFuncs:DrawModel. Also overrides @render.MaterialOverrideByIndex. * * @name render.MaterialOverride * @realm client * @wiki https://wiki.garrysmod.com/page/render/MaterialOverride * @param {void} this - no description * @param {IMaterial} material - The material to use as override, use nil to disable. * @returns {void} **/ export function MaterialOverride(this: void, material: IMaterial): void /** * * Performs a render trace and returns the color of the surface hit, this uses a low res version of the texture. * * @name render.GetSurfaceColor * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetSurfaceColor * @param {void} this - no description * @param {Vector} startPos - The start position to trace from. * @param {Vector} endPos - The end position of the trace. * @returns {Vector} - color **/ export function GetSurfaceColor(this: void, startPos: Vector, endPos: Vector): Vector /** * * Returns a vector representing linear tone mapping scale. * * @name render.GetToneMappingScaleLinear * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetToneMappingScaleLinear * @param {void} this - no description * @returns {Vector} - The vector representing linear tone mapping scale. **/ export function GetToneMappingScaleLinear(this: void): Vector /** * * @render/getsuperfptex * * @name render.GetSuperFPTex2 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetSuperFPTex2 * @param {void} this - no description * @returns {ITexture} - Render target named "__rt_supertexture2" **/ export function GetSuperFPTex2(this: void): ITexture /** * @name render.GetSmallTex1 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetSmallTex1 * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetSmallTex1(this: void): ITexture /** * * Returns a floating point texture the same resolution as the screen. * * @name render.GetSuperFPTex * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetSuperFPTex * @note The @gmodscreenspace shader doesn't behave as expected when drawing a floating-point texture to an integer texture (e.g. the default render target). Use an UnlitGeneric material instead * @param {void} this - no description * @returns {ITexture} - Render target named "__rt_supertexture1" **/ export function GetSuperFPTex(this: void): ITexture /** * @name render.GetSmallTex0 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetSmallTex0 * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetSmallTex0(this: void): ITexture /** * * Obtain an @ITexture type of the screen. You must call @render.UpdateScreenEffectTexture in order to update this texture with the currently rendered scene. * This texture is mainly used within @GamemodeHooks:RenderScreenspaceEffects * * @name render.GetScreenEffectTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetScreenEffectTexture * @param {void} this - no description * @param {number} textureIndex - Max index is 3, but engine only creates the first two for you. * @returns {ITexture} - no description **/ export function GetScreenEffectTexture(this: void, textureIndex?: number): ITexture /** * * Alias of @render.GetPowerOfTwoTexture. * * @name render.GetRefractTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetRefractTexture * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetRefractTexture(this: void): ITexture /** * * Returns the currently active render target. * Instead of saving the current render target using this function and restoring to it later, it is generally better practice to use @render.PushRenderTarget and @render.PopRenderTarget. * * @name render.GetRenderTarget * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetRenderTarget * @param {void} this - no description * @returns {ITexture} - The currently active Render Target **/ export function GetRenderTarget(this: void): ITexture /** * * Returns the _rt_ResolvedFullFrameDepth texture for SSAO depth. * * @name render.GetResolvedFullFrameDepth * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetResolvedFullFrameDepth * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetResolvedFullFrameDepth(this: void): ITexture /** * @name render.GetMorphTex1 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetMorphTex1 * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetMorphTex1(this: void): ITexture /** * @name render.GetMorphTex0 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetMorphTex0 * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetMorphTex0(this: void): ITexture /** * @name render.GetMoBlurTex1 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetMoBlurTex1 * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetMoBlurTex1(this: void): ITexture /** * * Returns the render target's power of two texture. * * @name render.GetPowerOfTwoTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetPowerOfTwoTexture * @param {void} this - no description * @returns {ITexture} - The power of two texture, which is **_rt_poweroftwofb** by default. **/ export function GetPowerOfTwoTexture(this: void): ITexture /** * @name render.GetMoBlurTex0 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetMoBlurTex0 * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetMoBlurTex0(this: void): ITexture /** * * Gets the light exposure on the specified position. * * @name render.GetLightColor * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetLightColor * @param {void} this - no description * @param {Vector} position - The position of the surface to get the light from. * @returns {Vector} - lightColor **/ export function GetLightColor(this: void, position: Vector): Vector /** * * Returns the fog mode. * * @name render.GetFogMode * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetFogMode * @param {void} this - no description * @returns {MATERIAL_FOG} - Fog mode, see @MATERIAL_FOG enum **/ export function GetFogMode(this: void): MATERIAL_FOG /** * * Returns the _rt_FullFrameDepth texture. Alias of _rt_PowerOfTwoFB * * @name render.GetFullScreenDepthTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetFullScreenDepthTexture * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetFullScreenDepthTexture(this: void): ITexture /** * * Returns the fog start and end distance. * * @name render.GetFogDistances * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetFogDistances * @param {void} this - no description * @returns {number} - Fog start distance set by @render.FogStart * @returns {number} - For end distance set by @render.FogEnd * @returns {number} - Fog Z distance set by @render.SetFogZ * @tupleReturn **/ export function GetFogDistances(this: void): [number, number, number] /** * * Returns the current fog color. * * @name render.GetFogColor * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetFogColor * @param {void} this - no description * @returns {number} - Red part of the color. * @returns {number} - Green part of the color * @returns {number} - Blue part of the color * @tupleReturn **/ export function GetFogColor(this: void): [number, number, number] /** * * Returns the maximum available directX version. * * @name render.GetDXLevel * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetDXLevel * @param {void} this - no description * @returns {number} - dxLevel **/ export function GetDXLevel(this: void): number /** * * Returns the current color modulation values as normals. * * @name render.GetColorModulation * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetColorModulation * @param {void} this - no description * @returns {number} - r **/ export function GetColorModulation(this: void): number /** * @name render.GetBloomTex1 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetBloomTex1 * @param {void} this - no description * @returns {ITexture} - no description **/ export function GetBloomTex1(this: void): ITexture /** * @name render.GetBloomTex0 * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetBloomTex0 * @param {void} this - no description * @returns {ITexture} - The bloom texture **/ export function GetBloomTex0(this: void): ITexture /** * * Returns the current alpha blending. * * @name render.GetBlend * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetBlend * @param {void} this - no description * @returns {number} - blend **/ export function GetBlend(this: void): number /** * * Returns the ambient color of the map. * * @name render.GetAmbientLightColor * @realm client * @wiki https://wiki.garrysmod.com/page/render/GetAmbientLightColor * @param {void} this - no description * @returns {Vector} - color **/ export function GetAmbientLightColor(this: void): Vector /** * * Sets the mode of fog. * * @name render.FogMode * @realm client * @wiki https://wiki.garrysmod.com/page/render/FogMode * @param {void} this - no description * @param {MATERIAL_FOG} fogMode - Fog mode, see @MATERIAL_FOG enum. * @returns {void} **/ export function FogMode(this: void, fogMode: MATERIAL_FOG): void /** * * Sets the distance at which the fog starts showing up. * * @name render.FogStart * @realm client * @wiki https://wiki.garrysmod.com/page/render/FogStart * @note If used in @GamemodeHooks:SetupSkyboxFog, this value **must** be scaled by the first argument of the hook * @param {void} this - no description * @param {number} fogStart - The distance at which the fog starts showing up. * @returns {void} **/ export function FogStart(this: void, fogStart: number): void /** * * Sets the maximum density of the fog. * * @name render.FogMaxDensity * @realm client * @wiki https://wiki.garrysmod.com/page/render/FogMaxDensity * @param {void} this - no description * @param {number} maxDensity - The maximum density of the fog, 0-1. * @returns {void} **/ export function FogMaxDensity(this: void, maxDensity: number): void /** * * Sets the at which the fog reaches its max density. * * @name render.FogEnd * @realm client * @wiki https://wiki.garrysmod.com/page/render/FogEnd * @note If used in @GamemodeHooks:SetupSkyboxFog, this value **must** be scaled by the first argument of the hook * @param {void} this - no description * @param {number} distance - The distance at which the fog reaches its max density. * @returns {void} **/ export function FogEnd(this: void, distance: number): void /** * * Ends the beam mesh of a beam started with @render.StartBeam. * * @name render.EndBeam * @realm client * @wiki https://wiki.garrysmod.com/page/render/EndBeam * @param {void} this - no description * @returns {void} **/ export function EndBeam(this: void): void /** * * Sets the color of the fog. * * @name render.FogColor * @realm client * @wiki https://wiki.garrysmod.com/page/render/FogColor * @param {void} this - no description * @param {number} red - Red channel of the fog color, 0 - 255. * @param {number} green - Green channel of the fog color, 0 - 255. * @param {number} blue - Blue channel of the fog color, 0 - 255. * @returns {void} **/ export function FogColor(this: void, red: number, green: number, blue: number): void /** * * Sets the status of the clip renderer, returning previous state. * * @name render.EnableClipping * @realm client * @wiki https://wiki.garrysmod.com/page/render/EnableClipping * @warning To prevent unintended rendering behavior of other mods/the game, you must reset the clipping state to its previous value. * @bug #3105 Reloading the map does not reset the previous value of this function. * @param {void} this - no description * @param {boolean} state - New clipping state. * @returns {boolean} - Previous clipping state. **/ export function EnableClipping(this: void, state: boolean): boolean /** * * Draws a wireframe box in 3D space. * * @name render.DrawWireframeBox * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawWireframeBox * @rendering function:3d * @param {void} this - no description * @param {Vector} position - Position of the box. * @param {Angle} angle - Angles of the box. * @param {Vector} mins - The lowest corner of the box. * @param {Vector} maxs - The highest corner of the box. * @param {Color} color - The color of the box. Uses the @IColor structure. * @param {boolean} writeZ - Sets whenever to write to the zBuffer. * @returns {void} **/ export function DrawWireframeBox(this: void, position: Vector, angle: Angle, mins: Vector, maxs: Vector, color?: Color, writeZ?: boolean): void /** * * Draws a wireframe sphere in 3d space. * * @name render.DrawWireframeSphere * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawWireframeSphere * @rendering function:3d * @param {void} this - no description * @param {Vector} position - Position of the sphere. * @param {number} radius - The size of the sphere. * @param {number} longitudeSteps - The amount of longitude steps. * The larger this number is, the smoother the sphere is. * @param {number} latitudeSteps - The amount of latitude steps. * The larger this number is, the smoother the sphere is. * @param {Color} color - The color of the wireframe. Uses the @IColor structure. * @param {boolean} writeZ - Whether or not to consider the Z buffer. If false, the wireframe will be drawn over everything currently drawn. If true, it will be drawn with depth considered, as if it were a regular object in 3D space. * @returns {void} **/ export function DrawWireframeSphere(this: void, position: Vector, radius: number, longitudeSteps: number, latitudeSteps: number, color?: Color, writeZ?: boolean): void /** * * Draws a textured rectangle. * * @name render.DrawTextureToScreenRect * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawTextureToScreenRect * @rendering function:2d * @param {void} this - no description * @param {ITexture} tex - The texture to draw * @param {number} x - The x coordinate of the rectangle to draw. * @param {number} y - The y coordinate of the rectangle to draw. * @param {number} width - The width of the rectangle to draw. * @param {number} height - The height of the rectangle to draw. * @returns {void} **/ export function DrawTextureToScreenRect(this: void, tex: ITexture, x: number, y: number, width: number, height: number): void /** * * Draws a texture over the whole screen. * * @name render.DrawTextureToScreen * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawTextureToScreen * @rendering function:2d * @param {void} this - no description * @param {ITexture} tex - The texture to draw * @returns {void} **/ export function DrawTextureToScreen(this: void, tex: ITexture): void /** * * Draws a sprite in 3D space. * * @name render.DrawSprite * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawSprite * @rendering function:3d * @param {void} this - no description * @param {Vector} position - Position of the sprite. * @param {number} width - Width of the sprite. * @param {number} height - Height of the sprite. * @param {Color} color - Color of the sprite. Uses the @IColor structure. * @returns {void} **/ export function DrawSprite(this: void, position: Vector, width: number, height: number, color?: Color): void /** * * Draws a sphere in 3D space. The material previously set with @render.SetMaterial will be applied the sphere's surface. * See also @render.DrawWireframeSphere for a wireframe equivalent. * * @name render.DrawSphere * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawSphere * @rendering function:3d * @param {void} this - no description * @param {Vector} position - Position of the sphere. * @param {number} radius - Radius of the sphere. Negative radius will make the sphere render inwards rather than outwards. * @param {number} longitudeSteps - The number of longitude steps. This controls the quality of the sphere. Higher quality will lower performance significantly. 50 is a good number to start with. * @param {number} latitudeSteps - The number of latitude steps. This controls the quality of the sphere. Higher quality will lower performance significantly. 50 is a good number to start with. * @param {Color} color - The color of the sphere. Uses the @IColor structure. * @returns {void} **/ export function DrawSphere(this: void, position: Vector, radius: number, longitudeSteps: number, latitudeSteps: number, color?: Color): void /** * * Draws the the current material set by @render.SetMaterial to the area specified. Color cannot be customized. * See also @render.DrawScreenQuad. * * @name render.DrawScreenQuadEx * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawScreenQuadEx * @rendering function:2d * @param {void} this - no description * @param {number} startX - X start position of the rect. * @param {number} startY - Y start position of the rect. * @param {number} width - Width of the rect. * @param {number} height - Height of the rect. * @returns {void} **/ export function DrawScreenQuadEx(this: void, startX: number, startY: number, width: number, height: number): void /** * * Draws a line in 3D space. * * @name render.DrawLine * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawLine * @rendering function:3d * @bug #1086 Enabling this option will cause the line to ignore the color's alpha. * @param {void} this - no description * @param {Vector} startPos - Line start position in world coordinates. * @param {Vector} endPos - Line end position in world coordinates. * @param {Color} color - The color to be used. Uses the @IColor structure. * @param {boolean} writeZ - Whether or not to consider the Z buffer. If false, the line will be drawn over everything currently drawn, if true, the line will be drawn with depth considered, as if it were a regular object in 3D space. * @returns {void} **/ export function DrawLine(this: void, startPos: Vector, endPos: Vector, color?: Color, writeZ?: boolean): void /** * * Draws the the current material set by @render.SetMaterial to the whole screen. The color cannot be customized. * See also @render.DrawScreenQuadEx. * * @name render.DrawScreenQuad * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawScreenQuad * @rendering function:2d * @param {void} this - no description * @returns {void} **/ export function DrawScreenQuad(this: void): void /** * * Draws 2 connected triangles. Expects material to be set by @render.SetMaterial. * * @name render.DrawQuad * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawQuad * @rendering function:3d * @param {void} this - no description * @param {Vector} vert1 - First vertex. * @param {Vector} vert2 - The second vertex. * @param {Vector} vert3 - The third vertex. * @param {Vector} vert4 - The fourth vertex. * @param {Color} color - The color of the quad. See @Color function * @returns {void} **/ export function DrawQuad(this: void, vert1: Vector, vert2: Vector, vert3: Vector, vert4: Vector, color?: Color): void /** * * Draws a quad. * * @name render.DrawQuadEasy * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawQuadEasy * @rendering function:3d * @param {void} this - no description * @param {Vector} position - Origin of the sprite. * @param {Vector} normal - The face direction of the quad. * @param {number} width - The width of the quad. * @param {number} height - The height of the quad. * @param {Color} color - The color of the quad. Uses the @IColor structure. * @param {number} rotation - The rotation of the quad counter-clockwise in degrees around the normal axis. In other words, the quad will always face the same way but this will rotate its corners. * @returns {void} **/ export function DrawQuadEasy(this: void, position: Vector, normal: Vector, width: number, height: number, color: Color, rotation?: number): void /** * * Changes the cull mode. * * @name render.CullMode * @realm client * @wiki https://wiki.garrysmod.com/page/render/CullMode * @param {void} this - no description * @param {MATERIAL_CULLMODE} cullMode - Cullmode, see @MATERIAL_CULLMODE enum * @returns {void} **/ export function CullMode(this: void, cullMode: MATERIAL_CULLMODE): void /** * * Set's the depth range of the upcoming render. * * @name render.DepthRange * @realm client * @wiki https://wiki.garrysmod.com/page/render/DepthRange * @param {void} this - no description * @param {number} depthmin - The minimum depth of the upcoming render. 0.0 = render normally; 1.0 = render nothing * @param {number} depthmax - The maximum depth of the upcoming render. 0.0 = render everything (through walls); 1.0 = render normally * @returns {void} **/ export function DepthRange(this: void, depthmin: number, depthmax: number): void /** * * Draws a box in 3D space. * * @name render.DrawBox * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawBox * @rendering function:3d * @param {void} this - no description * @param {Vector} position - Origin of the box. * @param {Angle} angles - Orientation of the box. * @param {Vector} mins - Start position of the box, relative to origin. * @param {Vector} maxs - End position of the box, relative to origin. * @param {Color} color - The color of the box. Uses the @IColor structure. * @returns {void} **/ export function DrawBox(this: void, position: Vector, angles: Angle, mins: Vector, maxs: Vector, color?: Color): void /** * * Draws textured beam. * * @name render.DrawBeam * @realm client * @wiki https://wiki.garrysmod.com/page/render/DrawBeam * @rendering function:3d * @param {void} this - no description * @param {Vector} startPos - Beam start position. * @param {Vector} endPos - Beam end position. * @param {number} width - The width of the beam. * @param {number} textureStart - The start coordinate of the texture used. * @param {number} textureEnd - The end coordinate of the texture used. * @param {Color} color - The color to be used. Uses the @IColor structure. * @returns {void} **/ export function DrawBeam(this: void, startPos: Vector, endPos: Vector, width: number, textureStart: number, textureEnd: number, color?: Color): void /** * * Copies the currently active Render Target to the specified texture. * * @name render.CopyRenderTargetToTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/CopyRenderTargetToTexture * @param {void} this - no description * @param {ITexture} Target - The texture to copy to * @returns {void} **/ export function CopyRenderTargetToTexture(this: void, Target: ITexture): void /** * * Copies the contents of one texture to another. Only works with rendertargets. * * @name render.CopyTexture * @realm client * @wiki https://wiki.garrysmod.com/page/render/CopyTexture * @param {void} this - no description * @param {ITexture} texture_from - no description * @param {ITexture} texture_to - no description * @returns {void} **/ export function CopyTexture(this: void, texture_from: ITexture, texture_to: ITexture): void /** * * Calculates the light color of a certain surface. * * @name render.ComputeLighting * @realm client * @wiki https://wiki.garrysmod.com/page/render/ComputeLighting * @param {void} this - no description * @param {Vector} position - The position of the surface to get the light from. * @param {Vector} normal - The normal of the surface to get the light from. * @returns {Vector} - A vector representing the light at that point. **/ export function ComputeLighting(this: void, position: Vector, normal: Vector): Vector /** * * Calculates the lighting caused by dynamic lights for the specified surface. * * @name render.ComputeDynamicLighting * @realm client * @wiki https://wiki.garrysmod.com/page/render/ComputeDynamicLighting * @param {void} this - no description * @param {Vector} position - The position to sample from. * @param {Vector} normal - The normal of the surface. * @returns {Vector} - A vector representing the light at that point. **/ export function ComputeDynamicLighting(this: void, position: Vector, normal: Vector): Vector /** * * Sets the stencil value in a specified rect. * This is **not** affected by @render.SetStencilWriteMask * * @name render.ClearStencilBufferRectangle * @realm client * @wiki https://wiki.garrysmod.com/page/render/ClearStencilBufferRectangle * @param {void} this - no description * @param {number} originX - X origin of the rectangle. * @param {number} originY - Y origin of the rectangle. * @param {number} endX - The end X coordinate of the rectangle. * @param {number} endY - The end Y coordinate of the rectangle. * @param {number} stencilValue - Value to set cleared stencil buffer to. * @returns {void} **/ export function ClearStencilBufferRectangle(this: void, originX: number, originY: number, endX: number, endY: number, stencilValue: number): void /** * * Resets all values in the stencil buffer to zero. * * @name render.ClearStencil * @realm client * @wiki https://wiki.garrysmod.com/page/render/ClearStencil * @param {void} this - no description * @returns {void} **/ export function ClearStencil(this: void): void /** * * Resets the depth buffer. * * @name render.ClearDepth * @realm client * @wiki https://wiki.garrysmod.com/page/render/ClearDepth * @bug #3317 This function also clears the stencil buffer. Use @render.Clear in the meantime. * @param {void} this - no description * @returns {void} **/ export function ClearDepth(this: void): void /** * * Clears a render target * It uses @render.Clear then @render.SetRenderTarget on the modified render target. * * @name render.ClearRenderTarget * @realm client * @wiki https://wiki.garrysmod.com/page/render/ClearRenderTarget * @param {void} this - no description * @param {ITexture} texture - no description * @param {Color} color - The color, see @IColor structure * @returns {void} **/ export function ClearRenderTarget(this: void, texture: ITexture, color: Color): void /** * * Clears the current rendertarget for obeying the current stencil buffer conditions. * * @name render.ClearBuffersObeyStencil * @realm client * @wiki https://wiki.garrysmod.com/page/render/ClearBuffersObeyStencil * @param {void} this - no description * @param {number} r - Value of the red channel to clear the current rt with. * @param {number} g - Value of the green channel to clear the current rt with. * @param {number} b - Value of the blue channel to clear the current rt with. * @param {number} a - Value of the alpha channel to clear the current rt with. * @param {boolean} depth - Clear the depth buffer. * @returns {void} **/ export function ClearBuffersObeyStencil(this: void, r: number, g: number, b: number, a: number, depth: boolean): void /** * * Clears the current render target and the specified buffers. * * @name render.Clear * @realm client * @wiki https://wiki.garrysmod.com/page/render/Clear * @bug #2085 This sets the alpha incorrectly for @surface library draw calls for render targets. * @param {void} this - no description * @param {number} r - Red component to clear to. * @param {number} g - Green component to clear to. * @param {number} b - Blue component to clear to. * @param {number} a - Alpha component to clear to. * @param {boolean} clearDepth - Clear the depth. * @param {boolean} clearStencil - Clear the stencil. * @returns {void} **/ export function Clear(this: void, r: number, g: number, b: number, a: number, clearDepth?: boolean, clearStencil?: boolean): void /** * * Dumps the current render target and allows the pixels to be accessed by @render.ReadPixel. * * @name render.CapturePixels * @realm client * @wiki https://wiki.garrysmod.com/page/render/CapturePixels * @param {void} this - no description * @returns {void} **/ export function CapturePixels(this: void): void /** * * Captures a part of the current render target and returns the data as a binary string in the given format. * Since the pixel buffer clears itself every frame, this will return a black screen outside of [render hooks](https://wiki.garrysmod.com/page/Category:Render_Hooks). To capture the user's final view, use @GamemodeHooks:PostRender. This will not capture the Steam overlay or third-party injections (such as the Discord overlay, Overwolf, and advanced cheats) on the user's screen. * * @name render.Capture * @realm client * @wiki https://wiki.garrysmod.com/page/render/Capture * @bug #2571 This sets the alpha channel incorrectly in PNG mode, causing the foreground to be rendered almost completely transparent. * @param {void} this - no description * @param {RenderCaptureData} captureData - Parameters of the capture. See @RenderCaptureData structure. * @returns {string} - binaryData **/ export function Capture(this: void, captureData: RenderCaptureData): string /** * * Blurs the render target ( or a given texture ) * * @name render.BlurRenderTarget * @realm client * @wiki https://wiki.garrysmod.com/page/render/BlurRenderTarget * @param {void} this - no description * @param {ITexture} rendertarget - The texture to blur * @param {number} blurx - Horizontal amount of blur * @param {number} blury - Vertical amount of blur * @param {number} passes - Amount of passes to go through * @returns {void} **/ export function BlurRenderTarget(this: void, rendertarget: ITexture, blurx: number, blury: number, passes: number): void /** * @name render.BrushMaterialOverride * @realm client * @wiki https://wiki.garrysmod.com/page/render/BrushMaterialOverride * @warning This function is broken and does absolutely nothing * @param {void} this - no description * @param {IMaterial} mat - no description * @returns {void} **/ export function BrushMaterialOverride(this: void, mat?: IMaterial): void /** * * Adds a beam segment to the beam started by @render.StartBeam. * * @name render.AddBeam * @realm client * @wiki https://wiki.garrysmod.com/page/render/AddBeam * @param {void} this - no description * @param {Vector} startPos - Beam start position. * @param {number} width - The width of the beam. * @param {number} textureEnd - The end coordinate of the texture used. * @param {Color} color - The color to be used. Uses the @IColor structure. * @returns {void} **/ export function AddBeam(this: void, startPos: Vector, width: number, textureEnd: number, color: Color): void interface IrenderModelSettings { /** * model - {string}: The model to draw **/ model: string /** * pos - {Vector}: The position to draw the model at **/ pos: Vector /** * angle - {Angle}: The angles to draw the model at **/ angle: Angle } } declare namespace properties { /** * * Opens properties menu for given entity. * * @name properties.OpenEntityMenu * @realm client, server * @wiki https://wiki.garrysmod.com/page/properties/OpenEntityMenu * @param {void} this - no description * @param {Entity} ent - The entity to open menu for * @param {table} tr - The trace that is passed as second argument to Action callback of a property * @returns {void} **/ export function OpenEntityMenu(this: void, ent: Entity, tr: table): void /** * * Checks if player hovers over any entities and open a properties menu for it. * * @name properties.OnScreenClick * @realm client, server * @wiki https://wiki.garrysmod.com/page/properties/OnScreenClick * @param {void} this - no description * @param {Vector} eyepos - The eye pos of a player * @param {Vector} eyevec - The aim vector of a player * @returns {void} **/ export function OnScreenClick(this: void, eyepos: Vector, eyevec: Vector): void /** * * Returns true if given entity can be targeted by the player via the properties system. * This should be used serverside in your properties to prevent abuse by clientside scripting. * * @name properties.CanBeTargeted * @realm client, server * @wiki https://wiki.garrysmod.com/page/properties/CanBeTargeted * @param {void} this - no description * @param {Entity} ent - The entity to test * @param {Player} ply - If given, will also perform a distance check based on the entity's Orientated Bounding Box. * @returns {boolean} - True if entity can be targeted, false otherwise **/ export function CanBeTargeted(this: void, ent: Entity, ply: Player): boolean /** * * Returns an entity player is hovering over with his cursor. * * @name properties.GetHovered * @realm client * @wiki https://wiki.garrysmod.com/page/properties/GetHovered * @param {void} this - no description * @param {Vector} pos - Eye position of local player, @EntityFuncs:EyePos * @param {Vector} aimVec - Aim vector of local player, @Player:GetAimVector * @returns {Entity} - The hovered entity **/ export function GetHovered(this: void, pos: Vector, aimVec: Vector): Entity /** * * Add properties to the properties module * * @name properties.Add * @realm client, server * @wiki https://wiki.garrysmod.com/page/properties/Add * @param {void} this - no description * @param {string} name - A unique name used to identify the property * @param {PropertyAdd} propertyData - A table that defines the property. Uses the @PropertyAdd structure. * @returns {void} **/ export function Add(this: void, name: string, propertyData: PropertyAdd): void } declare namespace presets { /** * * Renames preset. * * @name presets.Rename * @realm client * @wiki https://wiki.garrysmod.com/page/presets/Rename * @param {void} this - no description * @param {string} groupname - Preset group name * @param {string} oldname - Old preset name * @param {string} newname - New preset name * @returns {void} **/ export function Rename(this: void, groupname: string, oldname: string, newname: string): void /** * * Removes a preset entry from a preset group. * * @name presets.Remove * @realm client * @wiki https://wiki.garrysmod.com/page/presets/Remove * @param {void} this - no description * @param {string} groupname - Preset group to remove from * @param {string} name - Name of preset to remove * @returns {void} **/ export function Remove(this: void, groupname: string, name: string): void /** * * Used internally to ask the player if they want to override an already existing preset. * * @name presets.OverwritePresetPrompt * @realm client * @wiki https://wiki.garrysmod.com/page/presets/OverwritePresetPrompt * @internal * @param {void} this - no description * @param {function} callback - no description * @returns {void} **/ export function OverwritePresetPrompt(this: void, callback: UnknownFunc): void /** * * Returns a table with preset names and values from a single preset group. * * @name presets.GetTable * @realm client * @wiki https://wiki.garrysmod.com/page/presets/GetTable * @param {void} this - no description * @param {string} groupname - Preset group name. * @returns {table} - All presets in specified group. **/ export function GetTable(this: void, groupname: string): table /** * * Returns whether a preset with given name exists or not * * @name presets.Exists * @realm client * @wiki https://wiki.garrysmod.com/page/presets/Exists * @param {void} this - no description * @param {string} type - The preset group name, usually it's tool class name. * @param {string} name - Name of the preset to test * @returns {boolean} - true if the preset does exist **/ export function Exists(this: void, type: string, name: string): boolean /** * * Used internally to tell the player that the name they tried to use in their preset is not acceptable. * * @name presets.BadNameAlert * @realm client * @wiki https://wiki.garrysmod.com/page/presets/BadNameAlert * @internal * @param {void} this - no description * @returns {void} **/ export function BadNameAlert(this: void): void /** * * Adds preset to a preset group. * * @name presets.Add * @realm client * @wiki https://wiki.garrysmod.com/page/presets/Add * @param {void} this - no description * @param {string} groupname - The preset group name, usually it's tool class name. * @param {string} name - Preset name, must be unique. * @param {table} values - A table of preset console commands. * @returns {void} **/ export function Add(this: void, groupname: string, name: string, values: table): void } declare namespace player_manager { /** * * Returns the simplified name for a valid model path of a player model. * Opposite of @player_manager.TranslatePlayerModel. * * @name player_manager.TranslateToPlayerModelName * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/TranslateToPlayerModelName * @param {void} this - no description * @param {string} model - The model path to a player model * @returns {string} - The simplified name for that model **/ export function TranslateToPlayerModelName(this: void, model: string): string /** * * Retrieves correct hands for given player model. By default returns citizen hands. * * @name player_manager.TranslatePlayerHands * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/TranslatePlayerHands * @param {void} this - no description * @param {string} name - Player model name * @returns {table} - A table with following contents: * * @string type model - Model of hands * * @number type skin - Skin of hands * * @string type body - Bodygroups of hands **/ export function TranslatePlayerHands(this: void, name: string): table /** * * Returns the valid model path for a simplified name. * * @name player_manager.TranslatePlayerModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/TranslatePlayerModel * @param {void} this - no description * @param {string} shortName - The short name of the model. * @returns {string} - The valid model path for the short name. **/ export function TranslatePlayerModel(this: void, shortName: string): string /** * * Sets a player's class * * @name player_manager.SetPlayerClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/SetPlayerClass * @param {void} this - no description * @param {Player} ply - Player to set class * @param {string} classname - Name of class to set * @returns {void} **/ export function SetPlayerClass(this: void, ply: Player, classname: string): void /** * * Execute a named function within the player's set class * * @name player_manager.RunClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/RunClass * @param {void} this - no description * @param {Player} ply - Player to execute function on. * @param {string} funcName - Name of function. * @param {any[]} ...arguments - Optional arguments. Can be of any type. * @returns {any[]} - The values returned by the called function. **/ export function RunClass(this: void, ply: Player, funcName: string, ...arguments: any[]): any[] /** * * Register a class metatable to be assigned to players later * * @name player_manager.RegisterClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/RegisterClass * @param {void} this - no description * @param {string} name - Class name * @param {table} table - Class metatable * @param {string} base - Base class name * @returns {void} **/ export function RegisterClass(this: void, name: string, table: table, base: string): void /** * * Gets a players class * * @name player_manager.GetPlayerClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/GetPlayerClass * @param {void} this - no description * @param {Player} ply - Player to get class * @returns {string} - The players class **/ export function GetPlayerClass(this: void, ply: Player): string /** * * Applies basic class variables when the player spawns. * Called from @GamemodeHooks:PlayerSpawn in the base gamemode. * * @name player_manager.OnPlayerSpawn * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/OnPlayerSpawn * @param {void} this - no description * @param {Player} ply - Player to setup * @returns {void} **/ export function OnPlayerSpawn(this: void, ply: Player): void /** * * Clears a player's class association by setting their ClassID to 0 * * @name player_manager.ClearPlayerClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/ClearPlayerClass * @param {void} this - no description * @param {Player} ply - Player to clear class from * @returns {void} **/ export function ClearPlayerClass(this: void, ply: Player): void /** * * Returns the entire list of valid player models. * * @name player_manager.AllValidModels * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/AllValidModels * @param {void} this - no description * @returns {void} **/ export function AllValidModels(this: void): void /** * * Associates a simplified name with a path to a valid player model. * Only used internally. * * @name player_manager.AddValidModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/AddValidModel * @param {void} this - no description * @param {string} name - Simplified name * @param {string} model - Valid PlayerModel path * @returns {void} **/ export function AddValidModel(this: void, name: string, model: string): void /** * * Assigns view model hands to player model. * * @name player_manager.AddValidHands * @realm client, server * @wiki https://wiki.garrysmod.com/page/player manager/AddValidHands * @param {void} this - no description * @param {string} name - Player model name * @param {string} model - Hands model * @param {number} skin - Skin to apply to the hands * @param {string} bodygroups - Bodygroups to apply to the hands * @returns {void} **/ export function AddValidHands(this: void, name: string, model: string, skin: number, bodygroups: string): void } declare namespace player { /** * * Returns a table of all human ( non bot/AI ) players. * Unlike @player.GetAll, this does not include bots. * * @name player.GetHumans * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetHumans * @param {void} this - no description * @returns {table} - A table of all human ( non bot/AI ) players. **/ export function GetHumans(this: void): table /** * * Gives you the player count. * Similar to #@player.GetAll but with much better performance. * * @name player.GetCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetCount * @param {void} this - no description * @returns {number} - Number of players **/ export function GetCount(this: void): number /** * * Gets the player with the specified uniqueID (not recommended way to identify players). * * @name player.GetByUniqueID * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetByUniqueID * @warning It is highly recommended to use @player.GetByAccountID, @player.GetBySteamID or @player.GetBySteamID64 instead as this function can have collisions ( be same for different people ) while SteamID is guaranteed to unique to each player. * @param {void} this - no description * @param {string} uniqueID - The @Player:UniqueID to find the player by. * @returns {Player} - Player if one is found, false otherwise. **/ export function GetByUniqueID(this: void, uniqueID: string): Player /** * * Gets the player with the specified SteamID64. * * @name player.GetBySteamID64 * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetBySteamID64 * @param {void} this - no description * @param {string} steamID64 - The @Player:SteamID64 to find the player by. Also accepts numbers. * @returns {Player} - Player if one is found, false otherwise. **/ export function GetBySteamID64(this: void, steamID64: string): Player /** * * Gets the player with the specified connection ID. * Connection ID can be retrieved via @gameevent.Listen events. * For a function that returns a player based on their @EntityFuncs:EntIndex, see @Entity function. * For a function that returns a player based on their @Player:UserID, see @Player function. * * @name player.GetByID * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetByID * @param {void} this - no description * @param {number} connectionID - The connection ID to find the player by. * @returns {Player} - Player if one is found, nil otherwise **/ export function GetByID(this: void, connectionID: number): Player /** * * Gets the player with the specified SteamID. * * @name player.GetBySteamID * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetBySteamID * @param {void} this - no description * @param {string} steamID - The @Player:SteamID to find the player by. * @returns {Player} - Player if one is found, false otherwise. **/ export function GetBySteamID(this: void, steamID: string): Player /** * * Gets the player with the specified AccountID. * * @name player.GetByAccountID * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetByAccountID * @param {void} this - no description * @param {string} accountID - The @Player:AccountID to find the player by. * @returns {Player} - Player if one is found, false otherwise. **/ export function GetByAccountID(this: void, accountID: string): Player /** * * Returns a table of all bots on the server. * * @name player.GetBots * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetBots * @param {void} this - no description * @returns {table} - A table only containing bots ( AI / non human players ) **/ export function GetBots(this: void): table /** * * Gets all the current players in the server (not including connecting clients). * * @name player.GetAll * @realm client, server * @wiki https://wiki.garrysmod.com/page/player/GetAll * @note This function returns bots as well as human players. See @player.GetBots and @player.GetHumans. * @param {void} this - no description * @returns {table} - All @Player types currently in the server. **/ export function GetAll(this: void): table /** * * Similar to the serverside command "bot", this function creates a new Player bot with the given name. This bot will not obey to the usual "bot_*" commands, and it's the same bot base used in TF2 and CS:S. * The best way to control the behaviour of a Player bot right now is to use the @GamemodeHooks:StartCommand hook and modify its input serverside. * * @name player.CreateNextBot * @realm server * @wiki https://wiki.garrysmod.com/page/player/CreateNextBot * @note Despite this Player being fake, it has to be removed from the server by using @Player:Kick and **NOT** @EntityFuncs:Remove. * Also keep in mind that these bots still use player slots, so you won't be able to spawn them in singleplayer! * @note Any Bot created using this method will be considered UnAuthed by Garry's Mod * @param {void} this - no description * @param {string} botName - The name of the bot, using an already existing name will append brackets at the end of it with a number pertaining it. * Example: "Bot name test", "Bot name test(1)". * @returns {Player} - The newly created Player bot. Returns NULL if there's no Player slots available to host it. **/ export function CreateNextBot(this: void, botName: string): Player } declare namespace physenv { /** * * Sets the performance settings. * * @name physenv.SetPerformanceSettings * @realm client, server * @wiki https://wiki.garrysmod.com/page/physenv/SetPerformanceSettings * @param {void} this - no description * @param {PhysEnvPerformanceSettings} performanceSettings - The new performance settings. See @PhysEnvPerformanceSettings structure * @returns {void} **/ export function SetPerformanceSettings(this: void, performanceSettings: PhysEnvPerformanceSettings): void /** * * Sets the air density. * * @name physenv.SetAirDensity * @realm client, server * @wiki https://wiki.garrysmod.com/page/physenv/SetAirDensity * @param {void} this - no description * @param {number} airDensity - The new air density. * @returns {void} **/ export function SetAirDensity(this: void, airDensity: number): void /** * * Sets the directional gravity, does not work on players. * * @name physenv.SetGravity * @realm client, server * @wiki https://wiki.garrysmod.com/page/physenv/SetGravity * @param {void} this - no description * @param {Vector} gravity - The new gravity. * @returns {void} **/ export function SetGravity(this: void, gravity: Vector): void /** * * Gets the current performance settings in table form. * * @name physenv.GetPerformanceSettings * @realm client, server * @wiki https://wiki.garrysmod.com/page/physenv/GetPerformanceSettings * @param {void} this - no description * @returns {PhysEnvPerformanceSettings} - Performance settings. See @PhysEnvPerformanceSettings structure **/ export function GetPerformanceSettings(this: void): PhysEnvPerformanceSettings /** * * Returns the air density. * * @name physenv.GetAirDensity * @realm client, server * @wiki https://wiki.garrysmod.com/page/physenv/GetAirDensity * @param {void} this - no description * @returns {number} - airDensity **/ export function GetAirDensity(this: void): number /** * * Gets the global gravity. * * @name physenv.GetGravity * @realm client, server * @wiki https://wiki.garrysmod.com/page/physenv/GetGravity * @param {void} this - no description * @returns {Vector} - gravity **/ export function GetGravity(this: void): Vector /** * * Adds surface properties to the game's physics environment. * * @name physenv.AddSurfaceData * @realm client, server * @wiki https://wiki.garrysmod.com/page/physenv/AddSurfaceData * @bug #2604 The game has a limit of 128 surface properties - this includes properties loaded automatically from [surfaceproperties.txt](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/scripts/surfaceproperties.txt). Due to this, there's only a small amount of open slots that can be registered with GMod's provided surfaceproperties.txt. * @param {void} this - no description * @param {string} properties - The properties to add. Each one should include "base" or the game will crash due to some values being missing. * @returns {void} **/ export function AddSurfaceData(this: void, properties: string): void } declare namespace package { /** * * Sets a metatable for module with its __index field referring to the global environment, so that this module inherits values from the global environment. To be used as an option to @module function. * * @name package.seeall * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/package/seeall * @param {void} this - no description * @param {table} module - The module table to be given a metatable * @returns {void} **/ export function seeall(this: void, module: table): void } declare namespace os { /** * * Returns the system time in seconds past the unix epoch. If a table is supplied, the function attempts to build a system time with the specified table members. * * @name os.time * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/os/time * @param {void} this - no description * @param {DateData} dateData - Table to generate the time from. This table's data is interpreted as being in the local timezone. See @DateData structure * @returns {number} - Seconds passed since Unix epoch **/ export function time(this: void, dateData?: DateData): number /** * * Subtracts the second of the first value and rounds the result. * * @name os.difftime * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/os/difftime * @param {void} this - no description * @param {number} timeA - The first value. * @param {number} timeB - The value to subtract. * @returns {number} - diffTime **/ export function difftime(this: void, timeA: number, timeB: number): number /** * * Returns the date/time as a formatted string or in a table. * * @name os.date * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/os/date * @note This will be a @DateData structure if the first argument equals to '*t' or '!*t' * @bug #329 **Not all flags are available on all operating systems** and the result of using an invalid flag is undefined. This currently crashes the game on Windows. Most or all flags are available on OS X and Linux but considerably fewer are available on Windows. See http://msdn.microsoft.com/en-us/library/fe06s4ak.aspx for a list of available flags on Windows. Note that the **#** flags also crashes the game on Windows. * @param {void} this - no description * @param {string} format - The format string. * If this is equal to '*t' or '!*t' then this function will return a @DateData structure, otherwise it will return a string. * If this starts with an '!', the returned data will use the UTC timezone rather than the local timezone. * See http://www.mkssoftware.com/docs/man3/strftime.3.asp for available format flags. * @param {number} time - Time to use for the format. * @returns {string} - Formatted date **/ export function date(this: void, format: string, time: number): string /** * * Returns the approximate cpu time the application ran. * * @name os.clock * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/os/clock * @note This function has different precision on Linux (1/100). * @param {void} this - no description * @returns {number} - runtime **/ export function clock(this: void): number } declare namespace numpad { /** * @type numpadRegisterFunc * @param {void} this - no description * @param {Player} ply - The player who pressed the button * @param {any[]} ...args - The 4th and all subsequent arguments passed from @numpad.OnDown and/or @numpad.OnUp **/ type numpadRegisterFunc = (this: void, ply: Player, ...args: any[]) => unknown /** * * Either runs @numpad.Activate or @numpad.Deactivate depending on the key's current state * * @name numpad.Toggle * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/Toggle * @param {void} this - no description * @param {Player} ply - The player whose numpad should be simulated * @param {KEY} key - The key to press, corresponding to @KEY enum * @returns {void} **/ export function Toggle(this: void, ply: Player, key: KEY): void /** * * Removes a function added by either @numpad.OnUp or @numpad.OnDown * * @name numpad.Remove * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/Remove * @param {void} this - no description * @param {number} ID - The impulse ID returned by @numpad.OnUp or @numpad.OnDown * @returns {void} **/ export function Remove(this: void, ID: number): void /** * * Registers a numpad library action for use with @numpad.OnDown and @numpad.OnUp * * @name numpad.Register * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/Register * @param {void} this - no description * @param {string} id - The unique id of your action. * @param {function} func - The function to be executed. * Arguments are: * Returning **false** in this function will remove the listener which triggered this function (example: return false if one of your varargs is an entity which is no longer valid) * @returns {void} **/ export function Register(this: void, id: string, func: numpadRegisterFunc): void /** * * Calls a function registered with @numpad.Register when a player releases specified key. * See for key pressed action: @numpad.OnDown * * @name numpad.OnUp * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/OnUp * @param {void} this - no description * @param {Player} ply - The player whose numpad should be watched * @param {KEY} key - The key, corresponding to @KEY enum * @param {string} name - The name of the function to run, corresponding with the one used in @numpad.Register * @param {any[]} ...args - Arguments to pass to the function passed to @numpad.Register. * @returns {number} - The impulse ID **/ export function OnUp(this: void, ply: Player, key: KEY, name: string, ...args: any[]): number /** * * Calls a function registered with @numpad.Register when a player presses specified key. * See for key released action: @numpad.OnUp * * @name numpad.OnDown * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/OnDown * @param {void} this - no description * @param {Player} ply - The player whose numpad should be watched * @param {KEY} key - The key, corresponding to @KEY enum * @param {string} name - The name of the function to run, corresponding with the one used in @numpad.Register * @param {any[]} ...args - Arguments to pass to the function passed to @numpad.Register. * @returns {number} - The impulse ID **/ export function OnDown(this: void, ply: Player, key: KEY, name: string, ...args: any[]): number /** * * Returns true during a function added with @ numpad.Register when the third argument to @numpad.Activate is true. * This is caused when a numpad function is triggered by a button SENT being used. * * @name numpad.FromButton * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/FromButton * @param {void} this - no description * @returns {boolean} - wasButton **/ export function FromButton(this: void): boolean /** * * Deactivates numpad key owned by the player * * @name numpad.Deactivate * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/Deactivate * @param {void} this - no description * @param {Player} ply - The player whose numpad should be simulated * @param {KEY} key - The key to press, corresponding to @KEY enum * @param {boolean} isButton - Should this keypress pretend to be a from a gmod_button? (causes @numpad.FromButton to return true) * @returns {void} **/ export function Deactivate(this: void, ply: Player, key: KEY, isButton: boolean): void /** * * Activates numpad key owned by the player * * @name numpad.Activate * @realm server * @wiki https://wiki.garrysmod.com/page/numpad/Activate * @param {void} this - no description * @param {Player} ply - The player whose numpad should be simulated * @param {KEY} key - The key to press, see @KEY enum * @param {boolean} isButton - Should this keypress pretend to be a from a gmod_button? (causes @numpad.FromButton to return true) * @returns {void} **/ export function Activate(this: void, ply: Player, key: KEY, isButton: boolean): void } declare namespace notification { /** * * Adds a notification with an animated progress bar. * * @name notification.AddProgress * @realm client, menu * @wiki https://wiki.garrysmod.com/page/notification/AddProgress * @param {void} this - no description * @param {any} id - Can be any type. It's used as an index. * @param {string} strText - The text to show * @returns {void} **/ export function AddProgress(this: void, id: any, strText: string): void /** * * Removes the notification after 0.8 seconds. * * @name notification.Kill * @realm client, menu * @wiki https://wiki.garrysmod.com/page/notification/Kill * @param {void} this - no description * @param {any} uid - The unique ID of the notification * @returns {void} **/ export function Kill(this: void, uid: any): void /** * * Adds a standard notification to your screen. * * @name notification.AddLegacy * @realm client, menu * @wiki https://wiki.garrysmod.com/page/notification/AddLegacy * @param {void} this - no description * @param {string} text - The text to display. * @param {NOTIFY} type - Determines the notification method (e.g. icon) for displaying the notification. See the @NOTIFY enum. * @param {number} length - The number of seconds to display the notification for. * @returns {void} **/ export function AddLegacy(this: void, text: string, type: NOTIFY, length: number): void } declare namespace net { /** * @type netReceiveCallback * @param {void} this - no description * @param {number} len - Length of the message, in bits * @param {Player} ply - The player that sent the message, works only serverside **/ type netReceiveCallback = (this: void, len: number, ply: Player) => unknown /** * * Appends a vector to the current net message. * Vectors sent by this function are compressed, which may result in precision loss. XYZ components greater than 16384 or less than -16384 are irrecoverably altered (most significant bits are trimmed) and precision after the decimal point is low. * * @name net.WriteVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteVector * @param {void} this - no description * @param {Vector} vector - The vector to be sent. * @returns {void} **/ export function WriteVector(this: void, vector: Vector): void /** * * Appends an unsigned integer with the specified number of bits to the current net message. * Use @net.WriteInt if you want to send positive and negative numbers. Use @net.WriteFloat for a non-whole number (e.g. 2.25). * * @name net.WriteUInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteUInt * @note Unsigned numbers does not support negative numbers. * @param {void} this - no description * @param {number} unsignedInteger - The unsigned integer to be sent. * @param {number} numberOfBits - The size of the integer to be sent, in bits. Acceptable values range from any number 1 to 32 inclusive. For reference, 1 = bit, 4 = nibble, 8 = byte, 16 = short, 32 = long. * @returns {void} **/ export function WriteUInt(this: void, unsignedInteger: number, numberOfBits: number): void /** * * Appends any type of value to the current net message. * * @name net.WriteType * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteType * @internal Used internally by @net.WriteTable. * @note An additional 8-bit unsigned integer indicating the type will automatically be written to the packet before the value, in order to facilitate reading with @net.ReadType. If you know the data type you are writing, use a function meant for that specific data type to reduce amount of data sent. * @param {void} this - no description * @param {any} Data - The data to be sent * @returns {void} **/ export function WriteType(this: void, Data: any): void /** * * Appends a table to the current net message. Adds 16 extra bits per key/value pair so you're better off writing each individual key/value as the exact type if possible. * * @name net.WriteTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteTable * @warning All net messages have a 64kb buffer. This function will not check or error when that buffer is overflown. You might want to consider using @util.TableToJSON and @util.Compress and send the resulting string in 60kb chunks, doing the opposite on the receiving end. * @warning If the table contains a nil key the table may not be read correctly. * Not all objects can be sent over the network. Things like functions, @IMaterial types, etc will cause errors when reading the table from a net message. * @param {void} this - no description * @param {table} table - The table to be sent. * @returns {void} **/ export function WriteTable(this: void, table: table): void /** * * Appends a string to the current net message. The size of the string is 8 bits plus 8 bits for every ASCII character in the string. The maximum allowed length of a single written string is 65533 characters. * * @name net.WriteString * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteString * @param {void} this - no description * @param {string} str - The string to be sent. * @returns {void} **/ export function WriteString(this: void, str: string): void /** * * Writes a normalized/direction vector ( Vector with length of 1 ) to the net message. * This function uses less bandwidth compared to @net.WriteVector and will not send vectors with length of > 1 properly. * * @name net.WriteNormal * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteNormal * @param {void} this - no description * @param {Vector} normal - The normalized/direction vector to be send. * @returns {void} **/ export function WriteNormal(this: void, normal: Vector): void /** * * Writes a @VMatrix type to the current net message. * * @name net.WriteMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteMatrix * @param {void} this - no description * @param {VMatrix} matrix - The matrix to be sent. * @returns {void} **/ export function WriteMatrix(this: void, matrix: VMatrix): void /** * * Appends an integer - a whole number - to the current net message. Can be read back with @net.ReadInt on the receiving end. * Use @net.WriteUInt to send an unsigned number (that you know will never be negative). Use @net.WriteFloat for a non-whole number (e.g. 2.25). * * @name net.WriteInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteInt * @param {void} this - no description * @param {number} integer - The integer to be sent. * @param {number} bitCount - The amount of bits the number consists of. This must be 32 or less. * If you are unsure what to set, just set it to 32. * { * class="mw-collapsible mw-collapsed wikitable" * *+Consult the table below to determine the bit count you need. * ! Bit Count * ! Minimum value * ! Maximum value * *- * * 2 * * -2 * * 1 * *- * * 3 * * -4 * * 3 * *- * * 4 * * -8 * * 7 * *- * * 5 * * -16 * * 15 * *- * * 6 * * -32 * * 31 * *- * * 7 * * -64 * * 63 * *- * * 8 * * -128 * * 127 * *- * * 9 * * -256 * * 255 * *- * * 10 * * -512 * * 511 * *- * * 11 * * -1024 * * 1023 * *- * * 12 * * -2048 * * 2047 * *- * * 13 * * -4096 * * 4095 * *- * * 14 * * -8192 * * 8191 * *- * * 15 * * -16384 * * 16383 * *- * * 16 * * -32768 * * 32767 * *- * * 17 * * -65536 * * 65535 * *- * * 18 * * -131072 * * 131071 * *- * * 19 * * -262144 * * 262143 * *- * * 20 * * -524288 * * 524287 * *- * * 21 * * -1048576 * * 1048575 * *- * * 22 * * -2097152 * * 2097151 * *- * * 23 * * -4194304 * * 4194303 * *- * * 24 * * -8388608 * * 8388607 * *- * * 25 * * -16777216 * * 16777215 * *- * * 26 * * -33554432 * * 33554431 * *- * * 27 * * -67108864 * * 67108863 * *- * * 28 * * -134217728 * * 134217727 * *- * * 29 * * -268435456 * * 268435455 * *- * * 30 * * -536870912 * * 536870911 * *- * * 31 * * -1073741824 * * 1073741823 * *- * * 32 * * -2147483648 * * 2147483647 * * } * @returns {void} **/ export function WriteInt(this: void, integer: number, bitCount: number): void /** * * Appends a float (number with decimals) to the current net message. * * @name net.WriteFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteFloat * @param {void} this - no description * @param {number} float - The float to be sent. * @returns {void} **/ export function WriteFloat(this: void, float: number): void /** * * Appends an entity to the current net message. * * @name net.WriteEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteEntity * @param {void} this - no description * @param {Entity} entity - The entity to be sent. * @returns {void} **/ export function WriteEntity(this: void, entity: Entity): void /** * * Appends a double-precision number to the current net message. * * @name net.WriteDouble * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteDouble * @param {void} this - no description * @param {number} double - The double to be sent * @returns {void} **/ export function WriteDouble(this: void, double: number): void /** * * Writes a chunk of binary data to the message. * * @name net.WriteData * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteData * @param {void} this - no description * @param {string} binaryData - The binary data to be sent. * @param {number} length - The length of the binary data to be sent, in bytes. * @returns {void} **/ export function WriteData(this: void, binaryData: string, length: number): void /** * * Appends a @IColor structure to the current net message. * * @name net.WriteColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteColor * @param {void} this - no description * @param {Color} Color - The @IColor structure you want to append to the net message. * @returns {void} **/ export function WriteColor(this: void, Color: Color): void /** * * Appends a boolean to the current net message. Alias of @net.WriteBit * * @name net.WriteBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteBool * @param {void} this - no description * @param {boolean} boolean - Boolean value to write * @returns {void} **/ export function WriteBool(this: void, boolean: boolean): void /** * * Appends a boolean (as 1 or 0) to the current net message. * Please note that the bit is written here from a @boolean type (true/false) but @net.ReadBit returns a number. * * @name net.WriteBit * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteBit * @param {void} this - no description * @param {boolean} boolean - Bit status (false = 0, true = 1) * @returns {void} **/ export function WriteBit(this: void, boolean: boolean): void /** * * Writes an angle to the current net message. * * @name net.WriteAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/WriteAngle * @param {void} this - no description * @param {Angle} angle - The angle to be sent. * @returns {void} **/ export function WriteAngle(this: void, angle: Angle): void /** * * Begins a new net message. If another net message is already started and hasn't been sent yet, it will be discarded. * * @name net.Start * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/Start * @warning Each net message has a length limit of 64KB! * @warning The message name must be pooled with @util.AddNetworkString beforehand! * @param {void} this - no description * @param {string} messageName - The name of the message to send * @param {boolean} unreliable - If set to true, the message is not guaranteed to reach its destination * @returns {boolean} - True if the message has been started. **/ export function Start(this: void, messageName: string, unreliable?: boolean): boolean /** * * Sends the current message to the server. * * @name net.SendToServer * @realm client * @wiki https://wiki.garrysmod.com/page/net/SendToServer * @param {void} this - no description * @returns {void} **/ export function SendToServer(this: void): void /** * * Sends the message to all players the position is in the PVS of or, more simply said, sends the message to players that can potentially see this position. * * @name net.SendPVS * @realm server * @wiki https://wiki.garrysmod.com/page/net/SendPVS * @param {void} this - no description * @param {Vector} position - Position that must be in players' visibility set. * @returns {void} **/ export function SendPVS(this: void, position: Vector): void /** * * Sends the current message to all except the specified, or to all except all players in the table. * * @name net.SendOmit * @realm server * @wiki https://wiki.garrysmod.com/page/net/SendOmit * @param {void} this - no description * @param {Player} ply - The player(s) to NOT send the message to. Can be a table of players * @returns {void} **/ export function SendOmit(this: void, ply: Player): void /** * * Sends the message to all players that are in the same potentially audible set(PAS) as the position, or simply said, it adds all players that can potentially hear sounds from this position. * * @name net.SendPAS * @realm server * @wiki https://wiki.garrysmod.com/page/net/SendPAS * @param {void} this - no description * @param {Vector} position - PAS position. * @returns {void} **/ export function SendPAS(this: void, position: Vector): void /** * * Sends the current message to the specified player, or to all players listed in the table. * * @name net.Send * @realm server * @wiki https://wiki.garrysmod.com/page/net/Send * @param {void} this - no description * @param {CRecipientFilter} ply - The player(s) to send the message to. Can be a table of players or a @CRecipientFilter type. * @returns {void} **/ export function Send(this: void, ply: CRecipientFilter): void /** * * Adds a net message handler. Only one receiver can be used to receive the net message. * * @name net.Receive * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/Receive * @note The message-name is converted to lower-case so the message-names "*BigBlue*" and "*bigblue*" would be equal. * @warning You **must** put this function **outside** of any other function or hook for it to work properly unless you know what you are doing! * @warning You **must** read information in the same order as you write it. * @warning Each net message has a length limit of 64KB! * @param {void} this - no description * @param {string} messageName - The message name to hook to. * @param {function} callback - The function to be called if the specified message was received. Arguments are: * @returns {void} **/ export function Receive(this: void, messageName: string, callback: netReceiveCallback): void /** * * Reads a vector from the received net message. Vectors sent by this function are compressed, which may result in precision loss. See @net.WriteVector for more information. * * @name net.ReadVector * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadVector * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {Vector} - The read vector, or Vector(0,0,0) if no vector could be read. **/ export function ReadVector(this: void): Vector /** * * Reads an unsigned integer with the specified number of bits from the received net message. * * @name net.ReadUInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadUInt * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @param {number} numberOfBits - The size of the integer to be read, in bits. * @returns {number} - The unsigned integer read, or 0 if the integer could not be read. **/ export function ReadUInt(this: void, numberOfBits: number): number /** * * Reads a value from the net message with the specified type, written by @net.WriteType. * * @name net.ReadType * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadType * @internal Used internally by @net.ReadTable. * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @param {TYPE} typeID - The type of value to be read, using @TYPE enum. * @returns {any} - The value, or the respective blank value based on the type you're reading if the value could not be read. **/ export function ReadType(this: void, typeID?: TYPE): any /** * * Reads a null terminated string from the net stream. The size of the string is 8 bits plus 8 bits for every ASCII character in the string. * * @name net.ReadString * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadString * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {string} - The read string, or a string with 0 length if no string could be read. **/ export function ReadString(this: void): string /** * * Reads a table from the received net message. * See @net.WriteTable for extra info. * You may get net.ReadType: Couldn't read type X``` during the execution of the function, the problem is that you are sending objects that cannot be serialized/sent over the network. * * @name net.ReadTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadTable * @note Sometimes when sending a table through the net library, the order of the keys may be switched. So be cautious when comparing (See Example 1). * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {table} - Table recieved via the net message, or a blank table if no table could be read. **/ export function ReadTable(this: void): table /** * * Reads a normal vector from the net message. * * @name net.ReadNormal * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadNormal * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {Vector} - The normalized vector ( length = 1 ), or Vector(0,0,1) if no normal could be read. **/ export function ReadNormal(this: void): Vector /** * * Reads a @VMatrix type from the received net message. * * @name net.ReadMatrix * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadMatrix * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {VMatrix} - The matrix, or an empty matrix if no matrix could be read. **/ export function ReadMatrix(this: void): VMatrix /** * * Reads an integer from the received net message. * * @name net.ReadInt * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadInt * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @param {number} bitCount - The amount of bits to be read. * This must be set to what you set to @net.WriteInt. Read more information at @net.WriteInt. * @returns {number} - The read integer number, or 0 if no integer could be read. **/ export function ReadInt(this: void, bitCount: number): number /** * * Reads a word, basically unsigned short. This is used internally to read the "header" of the message which is an unsigned short which can be converted to the corresponding message name via @util.NetworkIDToString. * * @name net.ReadHeader * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadHeader * @internal * @param {void} this - no description * @returns {number} - The header number **/ export function ReadHeader(this: void): number /** * * Reads a floating point number from the received net message. * * @name net.ReadFloat * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadFloat * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {number} - The floating point number, or 0 if no number could be read. **/ export function ReadFloat(this: void): number /** * * Reads an entity from the received net message. You should always check if the specified entity exists as it may have been removed and therefor NULL if it is outside of the players PVS or was already removed. * * @name net.ReadEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadEntity * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {Entity} - The entity, or Entity(0) if no entity could be read. **/ export function ReadEntity(this: void): Entity /** * * Reads a double-precision number from the received net message. * * @name net.ReadDouble * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadDouble * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {number} - The double-precision number, or 0 if no number could be read. **/ export function ReadDouble(this: void): number /** * * Reads pure binary data from the message. * * @name net.ReadData * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadData * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @param {number} length - The length of the data to be read, in bytes. * @returns {string} - The binary data read, or a string containing one character with a byte of 0 if no data could be read. **/ export function ReadData(this: void, length: number): string /** * * Reads a @IColor structure from the current net message. * * @name net.ReadColor * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadColor * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {IColor} - The @IColor structure read from the current net message, or Color(0,0,0,0) if the color could not be read. **/ export function ReadColor(this: void): IColor /** * * Reads a bit from the received net message. * * @name net.ReadBit * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadBit * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {number} - 0 or 1, or 0 if the bit could not be read. **/ export function ReadBit(this: void): number /** * * Reads a boolean from the received net message. * * @name net.ReadBool * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadBool * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {boolean} - true or false, or false if the bool could not be read. **/ export function ReadBool(this: void): boolean /** * * Reads an angle from the received net message. * * @name net.ReadAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/ReadAngle * @warning You **must** read information in same order as you write it. * @param {void} this - no description * @returns {Angle} - The read angle, or Angle(0,0,0) if no angle could be read **/ export function ReadAngle(this: void): Angle /** * * Returns the size of the current message in bytes. * * @name net.BytesWritten * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/BytesWritten * @note This will include 3 extra bytes used by the engine internally to send the data over the network. * @param {void} this - no description * @returns {number} - The amount of bytes written to the current net message. * Returns nil if no net message has been started. * @returns {number} - The amount of bits written to the current net message. * Returns nil if no net message has been started. * @tupleReturn **/ export function BytesWritten(this: void): [number, number] /** * * Function called by the engine to tell the lua state a message arrived. * * @name net.Incoming * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/Incoming * @internal You may be looking for @net.Receive. * @param {void} this - no description * @param {number} length - The message length, in bits. * @param {Player} client - The player that sent the message. This will be nil in the client state. * @returns {void} **/ export function Incoming(this: void, length: number, client: Player): void /** * * Returns the amount of data left to read in the current message in bytes. Does nothing when sending data. * * @name net.BytesLeft * @realm client, server * @wiki https://wiki.garrysmod.com/page/net/BytesLeft * @param {void} this - no description * @returns {number} - The amount of data left to read in the current net message in bytes. * Returns nil if no net message has been started. * @returns {number} - The amount of data left to read in the current net message in bits. * Returns nil if no net message has been started. * @tupleReturn **/ export function BytesLeft(this: void): [number, number] /** * * Sends the currently built net message to all connected players. * More information can be found in [Net Library Usage](https://wiki.garrysmod.com/page/Net%20Library%20Usage). * * @name net.Broadcast * @realm server * @wiki https://wiki.garrysmod.com/page/net/Broadcast * @param {void} this - no description * @returns {void} **/ export function Broadcast(this: void): void } declare namespace navmesh { /** * * Sets the classname of the default spawn point entity, used before generating a new navmesh with @navmesh.BeginGeneration. * * @name navmesh.SetPlayerSpawnName * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/SetPlayerSpawnName * @param {void} this - no description * @param {string} spawnPointClass - The classname of what the player uses to spawn, automatically adds it to the walkable positions during map generation. * @returns {void} **/ export function SetPlayerSpawnName(this: void, spawnPointClass: string): void /** * * Saves any changes made to navmesh to the .nav file. * * @name navmesh.Save * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/Save * @param {void} this - no description * @returns {void} **/ export function Save(this: void): void /** * * Sets the @CNavLadder type as marked, so it can be used with editing console commands. * * @name navmesh.SetMarkedLadder * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/SetMarkedLadder * @param {void} this - no description * @param {CNavLadder} area - The @CNavLadder type to set as the marked ladder. * @returns {void} **/ export function SetMarkedLadder(this: void, area: CNavLadder): void /** * * Sets the @CNavArea type as marked, so it can be used with editing console commands. * * @name navmesh.SetMarkedArea * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/SetMarkedArea * @param {void} this - no description * @param {CNavArea} area - The @CNavArea type to set as the marked area. * @returns {void} **/ export function SetMarkedArea(this: void, area: CNavArea): void /** * * Deletes every @CNavArea type and @CNavLadder type on the map **without saving the changes**. * * @name navmesh.Reset * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/Reset * @param {void} this - no description * @returns {void} **/ export function Reset(this: void): void /** * * Returns true if a navmesh has been loaded when loading the map. * * @name navmesh.IsLoaded * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/IsLoaded * @param {void} this - no description * @returns {boolean} - Whether a navmesh has been loaded when loading the map. **/ export function IsLoaded(this: void): boolean /** * * Loads a new navmesh from the .nav file for current map discarding any changes made to the navmesh previously. * * @name navmesh.Load * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/Load * @param {void} this - no description * @returns {void} **/ export function Load(this: void): void /** * * Whether we're currently generating a new navmesh with @navmesh.BeginGeneration. * * @name navmesh.IsGenerating * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/IsGenerating * @param {void} this - no description * @returns {boolean} - Whether we're generating a nav mesh or not. **/ export function IsGenerating(this: void): boolean /** * * Returns the classname of the player spawn entity. * * @name navmesh.GetPlayerSpawnName * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetPlayerSpawnName * @param {void} this - no description * @returns {string} - The classname of the spawn point entity. By default returns "info_player_start" **/ export function GetPlayerSpawnName(this: void): string /** * * Returns the closest @CNavArea type to given position at the same height, or beneath it. * This function will ignore blocked @CNavArea types. See @navmesh.GetNavArea for a function that does see blocked areas. * * @name navmesh.GetNearestNavArea * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetNearestNavArea * @param {void} this - no description * @param {Vector} pos - The position to look from * @param {boolean} anyZ - This argument is ignored and has no effect * @param {number} maxDist - This is the maximum distance from the given position that the function will look for a @CNavArea type * @param {boolean} checkLOS - If this is set to true then the function will internally do a @util.TraceLine from the starting position to each potential @CNavArea type with a MASK_NPCSOLID_BRUSHONLY @MASK enum. If the trace fails then the @CNavArea type is ignored. * If this is set to false then the function will find the closest @CNavArea type through anything, including the world. * @param {boolean} checkGround - If checkGround is true then this function will internally call @navmesh.GetNavArea to check if there is a @CNavArea type directly below the position, and return it if so, before checking anywhere else. * @param {number} team - This will internally call @CNavArea:IsBlocked to check if the target @CNavArea type is not to be navigated by the given team. Currently this appears to do nothing. * @returns {CNavArea} - The closest @CNavArea type found with the given parameters. **/ export function GetNearestNavArea(this: void, pos: Vector, anyZ?: boolean, maxDist?: number, checkLOS?: boolean, checkGround?: boolean, team?: number): CNavArea /** * * Returns a @CNavLadder type by the given ID. * * @name navmesh.GetNavAreaByID * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetNavLadderByID * @param {void} this - no description * @param {number} id - ID of the @CNavLadder type to get. Starts with 1. * @returns {CNavLadder} - The @CNavLadder type with given ID. **/ export function GetNavAreaByID(this: void, id: number): CNavLadder /** * * Returns a @CNavArea type by the given ID. * * @name navmesh.GetNavAreaByID * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetNavAreaByID * @note Avoid calling this function every frame, as internally it does a lookup trough all the @CNavArea types, call this once and store the result * @param {void} this - no description * @param {number} id - ID of the @CNavArea type to get. Starts with 1. * @returns {CNavArea} - The @CNavArea type with given ID. **/ export function GetNavAreaByID(this: void, id: number): CNavArea /** * * Returns the highest ID of all nav areas on the map. While this can be used to get all nav areas, this number may not actually be the actual number of nav areas on the map. * * @name navmesh.GetNavAreaCount * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetNavAreaCount * @param {void} this - no description * @returns {number} - The highest ID of all nav areas on the map. **/ export function GetNavAreaCount(this: void): number /** * * Returns the Nav Area contained in this position that also satisfies the elevation limit. * This function will properly see blocked @CNavArea types. See @navmesh.GetNearestNavArea. * * @name navmesh.GetNavArea * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetNavArea * @param {void} this - no description * @param {Vector} pos - The position to search for. * @param {number} beneathLimit - The elevation limit at which the Nav Area will be searched. * @returns {CNavArea} - The nav area. **/ export function GetNavArea(this: void, pos: Vector, beneathLimit: number): CNavArea /** * * Returns the currently marked @CNavLadder type, for use with editing console commands. * * @name navmesh.GetMarkedLadder * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetMarkedLadder * @param {void} this - no description * @returns {CNavLadder} - The currently marked @CNavLadder type. **/ export function GetMarkedLadder(this: void): CNavLadder /** * * Returns the currently marked @CNavArea type, for use with editing console commands. * * @name navmesh.GetMarkedArea * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetMarkedArea * @param {void} this - no description * @returns {CNavArea} - The currently marked @CNavArea type. **/ export function GetMarkedArea(this: void): CNavArea /** * * Finds the closest standable ground at, above, or below the provided position. * * @name navmesh.GetGroundHeight * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetGroundHeight * @note The ground must have at least 32 units of empty space above it to be considered by this function, unless 16 layers are tested without finding valid ground. * @param {void} this - no description * @param {Vector} pos - Position to find the closest ground for. * @returns {number} - The height of the ground layer. * @returns {Vector} - The normal of the ground layer. * @tupleReturn **/ export function GetGroundHeight(this: void, pos: Vector): [number, Vector] /** * * Returns the position of the edit cursor when nav_edit is set to 1. * * @name navmesh.GetEditCursorPosition * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetEditCursorPosition * @param {void} this - no description * @returns {Vector} - The position of the edit cursor. **/ export function GetEditCursorPosition(this: void): Vector /** * * Returns an integer indexed table of all @CNavArea types on the current map. If the map doesn't have a navmesh generated then this will return an empty table. * * @name navmesh.GetAllNavAreas * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/GetAllNavAreas * @param {void} this - no description * @returns {CNavArea[]} - A table of all the @CNavArea types on the current map. **/ export function GetAllNavAreas(this: void): CNavArea[] /** * * Clears all the walkable positions, used before calling @navmesh.BeginGeneration. * * @name navmesh.ClearWalkableSeeds * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/ClearWalkableSeeds * @param {void} this - no description * @returns {void} **/ export function ClearWalkableSeeds(this: void): void /** * * Returns a bunch of areas within distance, used to find hiding spots by @NextBot types for example. * * @name navmesh.Find * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/Find * @param {void} this - no description * @param {Vector} pos - The position to search around * @param {number} radius - Radius to search within * @param {number} stepdown - Maximum stepdown( fall distance ) allowed * @param {number} stepup - Maximum stepup( jump height ) allowed * @returns {CNavArea[]} - A table of @CNavArea types **/ export function Find(this: void, pos: Vector, radius: number, stepdown: number, stepup: number): CNavArea[] /** * * Creates a new @CNavArea type. * * @name navmesh.CreateNavArea * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/CreateNavArea * @param {void} this - no description * @param {CNavArea} corner - The first corner of the new @CNavArea type * @param {CNavArea} opposite_corner - The opposite (diagonally) corner of the new @CNavArea type * @returns {CNavArea} - The new @CNavArea type or @nil type if we failed for some reason. **/ export function CreateNavArea(this: void, corner: CNavArea, opposite_corner: CNavArea): CNavArea /** * * Starts the generation of a new navmesh. * * @name navmesh.BeginGeneration * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/BeginGeneration * @note This process is highly resource intensive and it's not wise to use during normal gameplay * @param {void} this - no description * @returns {void} **/ export function BeginGeneration(this: void): void /** * * Add this position and normal to the list of walkable positions, used before map generation with @navmesh.BeginGeneration * * @name navmesh.AddWalkableSeed * @realm server * @wiki https://wiki.garrysmod.com/page/navmesh/AddWalkableSeed * @param {void} this - no description * @param {Vector} pos - The terrain position. * @param {Vector} dir - The normal of this terrain position. * @returns {void} **/ export function AddWalkableSeed(this: void, pos: Vector, dir: Vector): void } declare namespace motionsensor { /** * * Stops the motion capture. * * @name motionsensor.Stop * @realm client * @wiki https://wiki.garrysmod.com/page/motionsensor/Stop * @param {void} this - no description * @returns {void} **/ export function Stop(this: void): void /** * * This starts access to the kinect sensor. Note that this usually freezes the game for a couple of seconds. * * @name motionsensor.Start * @realm client, menu * @wiki https://wiki.garrysmod.com/page/motionsensor/Start * @param {void} this - no description * @returns {void} **/ export function Start(this: void): void /** * @name motionsensor.ProcessPositionTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/motionsensor/ProcessPositionTable * @param {void} this - no description * @param {table} translator - no description * @param {table} sensor - no description * @returns {Vector} - Pos. if !translator.PositionTable then return - {} **/ export function ProcessPositionTable(this: void, translator: table, sensor: table): Vector /** * @name motionsensor.ProcessAngle * @realm client, server * @wiki https://wiki.garrysmod.com/page/motionsensor/ProcessAngle * @param {void} this - no description * @param {table} translator - no description * @param {table} sensor - no description * @param {Vector} pos - no description * @param {Angle} ang - no description * @param {table} special_vectors - no description * @param {number} boneid - no description * @param {table} v - no description * @returns {boolean} - Return nil on failure **/ export function ProcessAngle(this: void, translator: table, sensor: table, pos: Vector, ang: Angle, special_vectors: table, boneid: number, v: table): boolean /** * @name motionsensor.ProcessAnglesTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/motionsensor/ProcessAnglesTable * @param {void} this - no description * @param {table} translator - no description * @param {table} sensor - no description * @param {Vector} pos - no description * @param {Angle} rotation - no description * @returns {Angle} - Ang. If !translator.AnglesTable then return - {} **/ export function ProcessAnglesTable(this: void, translator: table, sensor: table, pos: Vector, rotation: Angle): Angle /** * * Returns true if we have detected that there's a kinect connected to the PC * * @name motionsensor.IsAvailable * @realm client, menu * @wiki https://wiki.garrysmod.com/page/motionsensor/IsAvailable * @param {void} this - no description * @returns {boolean} - Connected or not **/ export function IsAvailable(this: void): boolean /** * * Return whether a kinect is connected - and active (ie - Start has been called). * * @name motionsensor.IsActive * @realm client * @wiki https://wiki.garrysmod.com/page/motionsensor/IsActive * @param {void} this - no description * @returns {boolean} - Connected and active or not **/ export function IsActive(this: void): boolean /** * @name motionsensor.GetSkeleton * @realm client * @wiki https://wiki.garrysmod.com/page/motionsensor/GetSkeleton * @param {void} this - no description * @returns {void} **/ export function GetSkeleton(this: void): void /** * * Returns the depth map material. * * @name motionsensor.GetColourMaterial * @realm client, menu * @wiki https://wiki.garrysmod.com/page/motionsensor/GetColourMaterial * @param {void} this - no description * @returns {IMaterial} - The material **/ export function GetColourMaterial(this: void): IMaterial /** * @name motionsensor.ChooseBuilderFromEntity * @realm client, server * @wiki https://wiki.garrysmod.com/page/motionsensor/ChooseBuilderFromEntity * @param {void} this - no description * @param {Entity} ent - Entity to choose builder for * @returns {string} - Chosen builder **/ export function ChooseBuilderFromEntity(this: void, ent: Entity): string /** * @name motionsensor.BuildSkeleton * @realm client, server * @wiki https://wiki.garrysmod.com/page/motionsensor/BuildSkeleton * @param {void} this - no description * @param {table} translator - no description * @param {Player} player - no description * @param {Angle} rotation - no description * @returns {Vector} - Pos * @returns {Angle} - ang * @returns {sensor} - sensor * @tupleReturn **/ export function BuildSkeleton(this: void, translator: table, player: Player, rotation: Angle): [Vector, Angle, sensor] } declare namespace mesh { /** * * Returns the amount of vertex that have yet been pushed. * * @name mesh.VertexCount * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/VertexCount * @param {void} this - no description * @returns {number} - vertexCount **/ export function VertexCount(this: void): number /** * * A table of four numbers. This is used by most shaders in Source to hold tangent information of the vertex ( tangentX, tangentY, tangentZ, tangentHandedness ). * * @name mesh.UserData * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/UserData * @note It is recommended to use @IMesh:BuildFromTriangles instead of the mesh library. * @param {void} this - no description * @param {number} tangentX - no description * @param {number} tangentY - no description * @param {number} tangentZ - no description * @param {number} tangentHandedness - no description * @returns {void} **/ export function UserData(this: void, tangentX: number, tangentY: number, tangentZ: number, tangentHandedness: number): void /** * * Sets the texture coordinates for the next vertex. * Non-zero values of stage require the currently bound material to support it. For example, any LightmappedGeneric material supports stages 1 and 2 (lightmap texture coordinates). * * @name mesh.TexCoord * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/TexCoord * @param {void} this - no description * @param {number} stage - The stage of the texture coordinate. * @param {number} u - U coordinate. * @param {number} v - V coordinate. * @returns {void} **/ export function TexCoord(this: void, stage: number, u: number, v: number): void /** * * Sets the s tangent to be used. * This function actually does nothing. * * @name mesh.TangentS * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/TangentS * @param {void} this - no description * @param {Vector} sTanger - The s tangent. * @returns {void} **/ export function TangentS(this: void, sTanger: Vector): void /** * * Sets the T tangent to be used. * This function actually does nothing. * * @name mesh.TangentT * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/TangentT * @param {void} this - no description * @param {Vector} tTanger - The t tangent. * @returns {void} **/ export function TangentT(this: void, tTanger: Vector): void /** * * Sets the specular map values. * This function actually does nothing. * * @name mesh.Specular * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/Specular * @param {void} this - no description * @param {number} r - The red channel multiplier of the specular map. * @param {number} g - The green channel multiplier of the specular map. * @param {number} b - The blue channel multiplier of the specular map. * @param {number} a - The alpha channel multiplier of the specular map. * @returns {void} **/ export function Specular(this: void, r: number, g: number, b: number, a: number): void /** * * Draws a quad using 4 vertices. * * @name mesh.Quad * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/Quad * @param {void} this - no description * @param {Vector} vertex1 - The first vertex. * @param {Vector} vertex2 - The second vertex. * @param {Vector} vertex3 - The third vertex. * @param {Vector} vertex4 - The fourth vertex. * @returns {void} **/ export function Quad(this: void, vertex1: Vector, vertex2: Vector, vertex3: Vector, vertex4: Vector): void /** * * Draws a quad using a position, a normal and the size. * * @name mesh.QuadEasy * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/QuadEasy * @param {void} this - no description * @param {Vector} position - The center of the quad. * @param {Vector} normal - The normal of the quad. * @param {number} sizeX - X size in pixels. * @param {number} sizeY - Y size in pixels. * @returns {void} **/ export function QuadEasy(this: void, position: Vector, normal: Vector, sizeX: number, sizeY: number): void /** * * Sets the position to be used for the next vertex. * * @name mesh.Position * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/Position * @param {void} this - no description * @param {Vector} position - The position of the vertex. * @returns {void} **/ export function Position(this: void, position: Vector): void /** * * Sets the normal to be used for the next vertex. * * @name mesh.Normal * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/Normal * @param {void} this - no description * @param {Vector} normal - The normal of the vertex. * @returns {void} **/ export function Normal(this: void, normal: Vector): void /** * * Ends the mesh and renders it. * * @name mesh.End * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/End * @param {void} this - no description * @returns {void} **/ export function End(this: void): void /** * * Sets the color to be used for the next vertex. * * @name mesh.Color * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/Color * @param {void} this - no description * @param {number} r - Red component. * @param {number} g - Green component. * @param {number} b - Blue component. * @param {number} a - Alpha component. * @returns {void} **/ export function Color(this: void, r: number, g: number, b: number, a: number): void /** * * Pushes the new vertex data onto the render stack. * * @name mesh.AdvanceVertex * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/AdvanceVertex * @param {void} this - no description * @returns {void} **/ export function AdvanceVertex(this: void): void /** * * Starts a new dynamic mesh. If an @IMesh type is passed, it will use that mesh instead. * * @name mesh.Begin * @realm client * @wiki https://wiki.garrysmod.com/page/mesh/Begin * @param {void} this - no description * @param {IMesh} mesh - Mesh to build. This argument can be removed if you wish to build a "dynamic" mesh. See examples below. * @param {MATERIAL} primitiveType - Primitive type, see @MATERIAL enum. * @param {number} primiteCount - The amount of primitives. * @returns {void} **/ export function Begin(this: void, mesh?: IMesh, primitiveType: MATERIAL, primiteCount: number): void } declare namespace menubar { /** * * Parents the menubar to the panel and displays the menubar. * * @name menubar.ParentTo * @realm client * @wiki https://wiki.garrysmod.com/page/menubar/ParentTo * @param {void} this - no description * @param {Panel} pnl - The panel to parent to * @returns {void} **/ export function ParentTo(this: void, pnl: Panel): void /** * * Checks if the supplied panel is parent to the menubar * * @name menubar.IsParent * @realm client * @wiki https://wiki.garrysmod.com/page/menubar/IsParent * @param {void} this - no description * @param {Panel} pnl - The panel to check * @returns {boolean} - Is parent or not **/ export function IsParent(this: void, pnl: Panel): boolean /** * * Creates the menu bar ( The bar at the top of the screen when holding C or Q in sandbox ) and docks it to the top of the screen. It will not appear. * Calling this multiple times will **NOT** remove previous panel. * * @name menubar.Init * @realm client * @wiki https://wiki.garrysmod.com/page/menubar/Init * @param {void} this - no description * @returns {void} **/ export function Init(this: void): void } declare namespace menu { /** * * Used by "Demo to Video" to record the frame. * * @name menu.RecordFrame * @realm client * @wiki https://wiki.garrysmod.com/page/menu/RecordFrame * @param {void} this - no description * @returns {void} **/ export function RecordFrame(this: void): void } declare namespace matproxy { /** * * Called by the engine from OnBind * * @name matproxy.Init * @realm client * @wiki https://wiki.garrysmod.com/page/matproxy/Init * @param {void} this - no description * @param {string} name - no description * @param {string} uname - no description * @param {IMaterial} mat - no description * @param {table} values - no description * @returns {void} **/ export function Init(this: void, name: string, uname: string, mat: IMaterial, values: table): void /** * * Called by the engine from OnBind * * @name matproxy.Call * @realm client * @wiki https://wiki.garrysmod.com/page/matproxy/Call * @param {void} this - no description * @param {string} uname - no description * @param {IMaterial} mat - no description * @param {Entity} ent - no description * @returns {void} **/ export function Call(this: void, uname: string, mat: IMaterial, ent: Entity): void /** * * Called by engine, returns true if we're overriding a proxy * * @name matproxy.ShouldOverrideProxy * @realm client * @wiki https://wiki.garrysmod.com/page/matproxy/ShouldOverrideProxy * @param {void} this - no description * @param {string} name - The name of proxy in question * @returns {boolean} - Are we overriding it? **/ export function ShouldOverrideProxy(this: void, name: string): boolean /** * * Adds a material proxy. * * @name matproxy.Add * @realm client * @wiki https://wiki.garrysmod.com/page/matproxy/Add * @param {void} this - no description * @param {MatProxyData} MatProxyData - The information about the proxy. See @MatProxyData structure * @returns {void} **/ export function Add(this: void, MatProxyData: MatProxyData): void } declare namespace math { /** * * Returns the [hyperbolic tangents](https://en.wikipedia.org/wiki/hyperbolic%20tangents) of the given number. * * @name math.tanh * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/tanh * @param {void} this - no description * @param {number} num - Angle in radians. * @returns {number} - The hyperbolic tangent of the given angle. **/ export function tanh(this: void, num: number): number /** * * Rounds towards zero. * * @name math.Truncate * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Truncate * @param {void} this - no description * @param {number} num - The number to truncate * @param {number} digits - The amount of digits to keep after the point. * @returns {void} **/ export function Truncate(this: void, num: number, digits?: number): void /** * * Returns the fraction of where the current time is relative to the start and end times * * @name math.TimeFraction * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/TimeFraction * @param {void} this - no description * @param {number} start - Start time in seconds * @param {number} end - End time in seconds * @param {number} current - Current time in seconds * @returns {number} - Fraction **/ export function TimeFraction(this: void, start: number, end: number, current: number): number /** * * Returns the [tangent](https://en.wikipedia.org/wiki/tangent%20(trigonometry)) of the given angle. * * @name math.tan * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/tan * @param {void} this - no description * @param {number} value - Angle in radians * @returns {number} - The tangent of the given angle. **/ export function tan(this: void, value: number): number /** * * Returns the square root of the number. * * @name math.sqrt * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/sqrt * @param {void} this - no description * @param {number} value - Value to get the square root of. * @returns {number} - squareRoot **/ export function sqrt(this: void, value: number): number /** * * Returns the [sine](https://en.wikipedia.org/wiki/sine) of given angle. * * @name math.sin * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/sin * @param {void} this - no description * @param {number} num - Angle in radians * @returns {number} - Sine for given angle **/ export function sin(this: void, num: number): number /** * * Returns the [hyperbolic sine](https://en.wikipedia.org/wiki/hyperbolic%20sine) of the given angle. * * @name math.sinh * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/sinh * @param {void} this - no description * @param {number} num - Angle in radians. * @returns {number} - The hyperbolic sine of the given angle. **/ export function sinh(this: void, num: number): number /** * * Rounds the given value to the nearest whole number or to the given decimal places. * * @name math.Round * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Round * @param {void} this - no description * @param {number} value - The value to round. * @param {number} decimals - The decimal places to round to. * @returns {number} - The rounded value. **/ export function Round(this: void, value: number, decimals?: number): number /** * * Remaps the value from one range to another * * @name math.Remap * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Remap * @param {void} this - no description * @param {number} value - The value * @param {number} inMin - The minimum of the initial range * @param {number} inMax - The maximum of the initial range * @param {number} outMin - The minimum of new range * @param {number} outMax - The maximum of new range * @returns {number} - The number in the new range **/ export function Remap(this: void, value: number, inMin: number, inMax: number, outMin: number, outMax: number): number /** * * When called without arguments, returns a uniform pseudo-random real number in the range 0 to 1 which includes 0 but excludes 1. * When called with an integer number m, returns a uniform pseudo-random integer in the range 1 to m inclusive. * When called with two integer numbers m and n, returns a uniform pseudo-random integer in the range m to n inclusive. * See also @math.Rand * * @name math.random * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/random * @param {void} this - no description * @param {number} m - If m is the only parameter: upper limit. * If n is also provided: lower limit. * If provided, this must be an integer. * @param {number} n - Upper limit. * If provided, this must be an integer. * @returns {number} - Random value **/ export function random(this: void, m?: number, n?: number): number /** * * Seeds the random number generator. The same seed will guarantee the same sequence of numbers each time with @math.random. * For shared random values across predicted realms, use @util.SharedRandom. * * @name math.randomseed * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/randomseed * @warning Incorrect usage of this function will affect *all* random numbers in the game. * @param {void} this - no description * @param {number} seed - The new seed * @returns {void} **/ export function randomseed(this: void, seed: number): void /** * * Returns a random float between min and max. * See also @math.random * * @name math.Rand * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Rand * @param {void} this - no description * @param {number} min - The minimum value. * @param {number} max - The maximum value. * @returns {number} - Random float between min and max. **/ export function Rand(this: void, min: number, max: number): number /** * * Converts an angle in degrees to it's equivalent in radians. * * @name math.rad * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/rad * @param {void} this - no description * @param {number} degrees - The angle measured in degrees. * @returns {number} - radians **/ export function rad(this: void, degrees: number): number /** * * Returns x raised to the power y. * In particular, math.pow(1.0, x) and math.pow(x, 0.0) always return 1.0, even when x is a zero or a NaN. If both x and y are finite, x is negative, and y is not an integer then math.pow(x, y) is undefined. * * @name math.pow * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/pow * @param {void} this - no description * @param {number} x - Base. * @param {number} y - Exponent. * @returns {number} - y power of x **/ export function pow(this: void, x: number, y: number): number /** * * Normalizes angle, so it returns value between -180 and 180. * * @name math.NormalizeAngle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/NormalizeAngle * @param {void} this - no description * @param {number} angle - The angle to normalize, in degrees. * @returns {number} - The normalized angle, in the range of -180 to 180 degrees. **/ export function NormalizeAngle(this: void, angle: number): number /** * * Returns the integral and fractional component of the modulo operation. * * @name math.modf * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/modf * @param {void} this - no description * @param {number} base - The base value. * @returns {number} - The integral component. * @returns {number} - The fractional component. * @tupleReturn **/ export function modf(this: void, base: number): [number, number] /** * * Returns the smallest value of all arguments. * * @name math.min * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/min * @param {void} this - no description * @param {any[]} ...numbers - Numbers to get the smallest from. * @returns {number} - The smallest number **/ export function min(this: void, ...numbers: any[]): number /** * * Returns the modulus of the specified values. Same as @math.fmod. * * @name math.mod * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/mod * @param {void} this - no description * @param {number} base - The base value * @param {number} modulator - Modulator * @returns {number} - The calculated modulus **/ export function mod(this: void, base: number, modulator: number): number /** * * Takes a normalised number and returns the floating point representation. * * @name math.ldexp * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/ldexp * @param {void} this - no description * @param {number} normalizedFraction - The value to get the normalized fraction and the exponent from. * @param {number} exponent - The value to get the normalized fraction and the exponent from. * @returns {number} - result **/ export function ldexp(this: void, normalizedFraction: number, exponent: number): number /** * * With one argument, return the natural logarithm of x (to base e). * With two arguments, return the logarithm of x to the given base, calculated as log(x)/log(base). * * @name math.log * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/log * @param {void} this - no description * @param {number} x - The value to get the base from exponent from. * @param {number} base - The logarithmic base. * @returns {number} - Logarithm of x to the given base **/ export function log(this: void, x: number, base?: number): number /** * * Returns the largest value of all arguments. * * @name math.max * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/max * @param {void} this - no description * @param {any[]} ...numbers - Numbers to get the largest from * @returns {number} - The largest number **/ export function max(this: void, ...numbers: any[]): number /** * * Returns the base-10 logarithm of x. This is usually more accurate than math.log(x, 10). * * @name math.log10 * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/log10 * @param {void} this - no description * @param {number} x - The value to get the base from exponent from. * @returns {void} **/ export function log10(this: void, x: number): void /** * * Converts an integer to a binary (base-2) string. * * @name math.IntToBin * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/IntToBin * @param {void} this - no description * @param {number} int - Number to be converted. * @returns {string} - Binary number string. The length of this will always be a multiple of 3. **/ export function IntToBin(this: void, int: number): string /** * * Used to split the number value into a normalized fraction and an exponent. Two values are returned: the first is a multiplier in the range 1/2 (inclusive) to 1 (exclusive) and the second is an integer exponent. * The result is such that x = m*2^e. * * @name math.frexp * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/frexp * @param {void} this - no description * @param {number} x - The value to get the normalized fraction and the exponent from. * @returns {number} - m, multiplier - between 0.5 and 1 * @returns {number} - e, exponent - always an integer * @tupleReturn **/ export function frexp(this: void, x: number): [number, number] /** * * Returns the modulus of the specified values. * While this is similar to the % operator, **it will return a negative value if the first argument is negative**, whereas the % operator will return a *positive* value **even if the first operand is negative**. * * @name math.fmod * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/fmod * @param {void} this - no description * @param {number} base - The base value. * @param {number} modulator - The modulator. * @returns {number} - The calculated modulus. **/ export function fmod(this: void, base: number, modulator: number): number /** * * Floors or rounds a number down. * * @name math.floor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/floor * @param {void} this - no description * @param {number} num - The number to be rounded down. * @returns {number} - floored numbers **/ export function floor(this: void, num: number): number /** * * Returns the x power of the Euler constant *[e](https://en.wikipedia.org/wiki/e%20(mathematical%20constant))*. * * @name math.exp * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/exp * @param {void} this - no description * @param {number} exponent - The exponent for the function. * @returns {number} - e to the specified power **/ export function exp(this: void, exponent: number): number /** * * Returns the difference between two points in 2D space. * * @name math.Distance * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Distance * @param {void} this - no description * @param {number} x1 - X position of first point * @param {number} y1 - Y position of first point * @param {number} x2 - X position of second point * @param {number} y2 - Y position of second point * @returns {number} - Distance between the two points **/ export function Distance(this: void, x1: number, y1: number, x2: number, y2: number): number /** * * Calculates the progress of a value fraction, taking in to account given easing fractions * * @name math.EaseInOut * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/EaseInOut * @param {void} this - no description * @param {number} progress - Fraction of the progress to ease * @param {number} easeIn - Fraction of how much easing to begin with * @param {number} easeOut - Fraction of how much easing to end with * @returns {number} - Eased Value **/ export function EaseInOut(this: void, progress: number, easeIn: number, easeOut: number): number /** * * Returns the difference between two points in 2D space. Alias of @math.Distance. * * @name math.Dist * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Dist * @param {void} this - no description * @param {number} x1 - X position of first point * @param {number} y1 - Y position of first point * @param {number} x2 - X position of second point * @param {number} y2 - Y position of second point * @returns {number} - Distance between the two points. **/ export function Dist(this: void, x1: number, y1: number, x2: number, y2: number): number /** * * Converts radians to degrees. * * @name math.deg * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/deg * @param {void} this - no description * @param {number} radians - Value to be converted to degrees. * @returns {number} - degrees **/ export function deg(this: void, radians: number): number /** * * Returns the [cosine](https://en.wikipedia.org/wiki/cosine) of given angle. * * @name math.cos * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/cos * @param {void} this - no description * @param {number} num - Angle in radians * @returns {number} - Cosine of given angle **/ export function cos(this: void, num: number): number /** * * Returns the [hyperbolic cosine](https://en.wikipedia.org/wiki/hyperbolic%20cosine) of the given angle. * * @name math.cosh * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/cosh * @param {void} this - no description * @param {number} num - Angle in radians. * @returns {number} - The hyperbolic cosine of the given angle. **/ export function cosh(this: void, num: number): number /** * * Clamps a number between a minimum and maximum value * * @name math.Clamp * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Clamp * @param {void} this - no description * @param {number} input - The number to clamp. * @param {number} min - The minimum value, this function will never return a number less than this. * @param {number} max - The maximum value, this function will never return a number greater than this. * @returns {number} - The clamped value. **/ export function Clamp(this: void, input: number, min: number, max: number): number /** * * Ceils or rounds a number up. * * @name math.ceil * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/ceil * @param {void} this - no description * @param {number} num - The number to be rounded up. * @returns {number} - ceiled numbers **/ export function ceil(this: void, num: number): number /** * * Basic code for Bezier-Spline algorithm, helper function for @math.BSplinePoint. * * @name math.calcBSplineN * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/calcBSplineN * @internal Use @math.BSplinePoint instead. * @bug Sending in a value < 1 will result in an infinite loop. * @param {void} this - no description * @param {number} i - no description * @param {number} k - no description * @param {number} t - no description * @param {number} tinc - no description * @returns {number} - no description **/ export function calcBSplineN(this: void, i: number, k: number, t: number, tinc: number): number /** * * Basic code for [Bézier-Spline](https://en.wikipedia.org/wiki/B%C3%A9zier%20curve) algorithm. * * @name math.BSplinePoint * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/BSplinePoint * @param {void} this - no description * @param {number} tDiff - From 0 to 1, where alongside the spline the point will be. * @param {Vector[]} tPoints - A table of @Vector types. The amount cannot be less than 4. * @param {number} tMax - Just leave this at 1. * @returns {Vector} - Point on Bezier curve, related to tDiff. **/ export function BSplinePoint(this: void, tDiff: number, tPoints: Vector[], tMax: number): Vector /** * * Converts a binary string into a number. * * @name math.BinToInt * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/BinToInt * @param {void} this - no description * @param {string} str - Binary string to convert * @returns {number} - Base 10 number. **/ export function BinToInt(this: void, str: string): number /** * * [atan2](https://en.wikipedia.org/wiki/atan2) functions like @math.atan(y / x), except it also takes into account the quadrant of the angle and so doesn't have a limited range of output. * * @name math.atan2 * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/atan2 * @note The Y argument comes first! * @param {void} this - no description * @param {number} y - Y coordinate. * @param {number} x - X coordinate. * @returns {number} - The angle of the line from (0, 0) to (x, y) in radians, in the range -pi to pi. **/ export function atan2(this: void, y: number, x: number): number /** * * Returns the [arc tangent](https://en.wikipedia.org/wiki/arc%20tangent) of the given number. * * @name math.atan * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/atan * @param {void} this - no description * @param {number} normal - Tangent value. * @returns {number} - An angle in radians, in the range -pi/2 to pi/2, which has the given tangent. **/ export function atan(this: void, normal: number): number /** * * Returns the [arc sine](https://en.wikipedia.org/wiki/arc%20sine) of the given number. * * @name math.asin * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/asin * @param {void} this - no description * @param {number} normal - Sine value in the range of -1 to 1. * @returns {number} - An angle in radians, in the range -pi/2 to pi/2, which has the given sine value. * [nan](https://wiki.garrysmod.com/page/nan) if the argument is out of range. **/ export function asin(this: void, normal: number): number /** * * Increments an angle towards another by specified rate. * * @name math.ApproachAngle * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/ApproachAngle * @note This function is for numbers representing angles (0-360), NOT @Angle type objects! * @param {void} this - no description * @param {number} currentAngle - The current angle to increase * @param {number} targetAngle - The angle to increase towards * @param {number} rate - The amount to approach the target angle by * @returns {number} - Modified angle **/ export function ApproachAngle(this: void, currentAngle: number, targetAngle: number, rate: number): number /** * * Gradually approaches the target value by the specified amount. * * @name math.Approach * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/Approach * @param {void} this - no description * @param {number} current - The value we're currently at. * @param {number} target - The target value. This function will never overshoot this value. * @param {number} change - The amount that the current value is allowed to change by to approach the target. (It makes no difference whether this is positive or negative.) * @returns {number} - New current value, closer to the target than it was previously. **/ export function Approach(this: void, current: number, target: number, change: number): number /** * * Calculates the difference between two angles. * * @name math.AngleDifference * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/AngleDifference * @param {void} this - no description * @param {number} a - The first angle. * @param {number} b - The second angle. * @returns {number} - The difference between the angles between -180 and 180 **/ export function AngleDifference(this: void, a: number, b: number): number /** * * Returns the [arc cosine](https://en.wikipedia.org/wiki/arc%20cosine) of the given number. * * @name math.acos * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/acos * @param {void} this - no description * @param {number} cos - Cosine value in range of -1 to 1. * @returns {number} - An angle in radians, between 0 and pi, which has the given cos value. * [nan](https://wiki.garrysmod.com/page/nan) if the argument is out of range. **/ export function acos(this: void, cos: number): number /** * * Calculates the absolute value of a number (effectively removes any negative sign). * * @name math.abs * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/math/abs * @param {void} this - no description * @param {number} x - The number to get the absolute value of. * @returns {number} - absolute_value **/ export function abs(this: void, x: number): number } declare namespace markup { /** * * Parses markup into a @ MarkupObject type. Currently, this only supports fonts and colors as demonstrated in the example. * * @name markup.Parse * @realm client * @wiki https://wiki.garrysmod.com/page/markup/Parse * @param {void} this - no description * @param {string} markup - The markup to be parsed. * @param {number} maxwidth - The max width of the output * @returns {MarkupObject} - The parsed markup object ready to be drawn. **/ export function Parse(this: void, markup: string, maxwidth: number): MarkupObject } declare namespace list { /** * * Returns true if the list contains the given key. * For a function that looks for values and not keys see @list.Contains. * * @name list.HasEntry * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/list/HasEntry * @param {void} this - no description * @param {string} list - List to search through * @param {any} key - The key to test * @returns {boolean} - Returns true if the list contains the key, false otherwise **/ export function HasEntry(this: void, list: string, key: any): boolean /** * * Sets a specific position in the named list to a value. * * @name list.Set * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/list/Set * @param {void} this - no description * @param {string} identifier - The list identifier * @param {any} key - The key in the list to set * @param {any} item - The item to set to the list as key * @returns {void} **/ export function Set(this: void, identifier: string, key: any, item: any): void /** * * Returns the actual table of the list stored at identifier. Modifying this will affect the stored list * * @name list.GetForEdit * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/list/GetForEdit * @param {void} this - no description * @param {string} identifier - The list identifier * @returns {table} - The actual list **/ export function GetForEdit(this: void, identifier: string): table /** * * Returns a copy of the list stored at identifier * * @name list.Get * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/list/Get * @param {void} this - no description * @param {string} identifier - The list identifier * @returns {table} - The copy of the list **/ export function Get(this: void, identifier: string): table /** * * Adds an item to a named list * * @name list.Add * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/list/Add * @param {void} this - no description * @param {string} identifier - The list identifier * @param {any} item - The item to add to the list * @returns {void} **/ export function Add(this: void, identifier: string, item: any): void /** * * Returns true if the list contains the value. (as a value - not a key) * For a function that looks for a key and not a value see @list.HasEntry. * * @name list.Contains * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/list/Contains * @param {void} this - no description * @param {string} list - List to search through * @param {any} value - The value to test * @returns {boolean} - Returns true if the list contains the value, false otherwise **/ export function Contains(this: void, list: string, value: any): boolean } declare namespace language { /** * * Retrieves the translated version of inputted string. Useful for concentrating multiple translated strings. * * @name language.GetPhrase * @realm client, menu * @wiki https://wiki.garrysmod.com/page/language/GetPhrase * @param {void} this - no description * @param {string} phrase - The phrase to translate * @returns {string} - The translated phrase, or the input string if no translation was found **/ export function GetPhrase(this: void, phrase: string): string /** * * Adds a language item. Language placeholders preceded with "#" are replaced with full text in Garry's Mod once registered with this function. * * @name language.Add * @realm client, menu * @wiki https://wiki.garrysmod.com/page/language/Add * @param {void} this - no description * @param {string} placeholder - The key for this phrase, without the preceding "#". * @param {string} fulltext - The phrase that should be displayed whenever this key is used. * @returns {void} **/ export function Add(this: void, placeholder: string, fulltext: string): void } declare namespace killicon { /** * * Returns the size of a kill icon. * * @name killicon.GetSize * @realm client * @wiki https://wiki.garrysmod.com/page/killicon/GetSize * @param {void} this - no description * @param {string} name - Classname of the kill icon * @returns {number} - Width of the kill icon * @returns {number} - Height of the kill icon * @tupleReturn **/ export function GetSize(this: void, name: string): [number, number] /** * * Checks if kill icon exists for given class. * * @name killicon.Exists * @realm client * @wiki https://wiki.garrysmod.com/page/killicon/Exists * @param {void} this - no description * @param {string} cls - The class to test * @returns {boolean} - Returns true if kill icon exists **/ export function Exists(this: void, cls: string): boolean /** * * Draws a kill icon. * * @name killicon.Draw * @realm client * @wiki https://wiki.garrysmod.com/page/killicon/Draw * @param {void} this - no description * @param {number} x - X coordinate of the icon * @param {number} y - Y coordinate of the icon * @param {string} name - Classname of the kill icon * @param {number} alpha - Alpha/transparency value ( 0 - 255 ) of the icon * @returns {void} **/ export function Draw(this: void, x: number, y: number, name: string, alpha: number): void /** * * Creates kill icon from existing one. * * @name killicon.AddAlias * @realm client * @wiki https://wiki.garrysmod.com/page/killicon/AddAlias * @param {void} this - no description * @param {string} new_class - New class of the kill icon * @param {string} existing_class - Already existing kill icon class * @returns {void} **/ export function AddAlias(this: void, new_class: string, existing_class: string): void /** * * Adds kill icon for given weapon/entity class using special font. * * @name killicon.AddFont * @realm client * @wiki https://wiki.garrysmod.com/page/killicon/AddFont * @param {void} this - no description * @param {string} cls - Weapon or entity class * @param {string} font - Font to be used * @param {string} symbol - The symbol to be used * @param {Color} color - Color of the killicon * @returns {void} **/ export function AddFont(this: void, cls: string, font: string, symbol: string, color: Color): void /** * * Creates new kill icon using a texture. * * @name killicon.Add * @realm client * @wiki https://wiki.garrysmod.com/page/killicon/Add * @param {void} this - no description * @param {string} cls - Weapon or entity class * @param {string} texture - Path to the texture * @param {Color} color - Color of the kill icon * @returns {void} **/ export function Add(this: void, cls: string, texture: string, color: Color): void } declare namespace jit.util { /** * * Return table fields: * * 0 (ref) (number): first IR ref for the snapshot * * 1 (nslots) (number): the number of valid slots * * all indexes except first 2 and last (there might not be any of these): the snapshot map * * last index in table (number): -16777216 (255 << 24) * * @name jit.util.tracesnap * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.tracesnap * @param {void} this - no description * @param {number} tr - trace index to retrieve snapshot for (gotten via @jit.attach) * @param {number} sn - snapshot index for trace (starting from 0 to nexit - 1, nexit gotten via @jit.util.traceinfo) * @returns {table} - snapshot **/ export function tracesnap(this: void, tr: number, sn: number): table /** * @name jit.util.tracemc * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.tracemc * @param {void} this - no description * @param {number} tr - no description * @returns {string} - mcode * @returns {number} - address * @returns {number} - loop * @tupleReturn **/ export function tracemc(this: void, tr: number): [string, number, number] /** * @name jit.util.traceir * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.traceir * @param {void} this - no description * @param {number} tr - no description * @param {number} index - no description * @returns {number} - m * @returns {number} - ot * @returns {number} - op1 * @returns {number} - op2 * @returns {number} - prev * @tupleReturn **/ export function traceir(this: void, tr: number, index: number): [number, number, number, number, number] /** * @name jit.util.tracek * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.tracek * @param {void} this - no description * @param {number} tr - no description * @param {number} index - no description * @returns {any} - k * @returns {number} - t * @returns {number} - slot; optional * @tupleReturn **/ export function tracek(this: void, tr: number, index: number): [any, number, number] /** * * Return table fields: * * link (number): the linked trace (0 for link types: none, return, interpreter) * * nk (number): the lowest IR constant (???) * * nins (number): the next IR instruction (???) * * linktype (string): the link type (none, root, loop, tail-recursion, up-recursion, down-recursion, interpreter, return) * * nexit (number): number of snapshots (for use with @jit.util.tracesnap) * * @name jit.util.traceinfo * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.traceinfo * @param {void} this - no description * @param {number} trace - trace index to retrieve info for (gotten via @jit.attach) * @returns {table} - trace info **/ export function traceinfo(this: void, trace: number): table /** * @name jit.util.traceexitstub * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.traceexitstub * @param {void} this - no description * @param {number} exitno - exit number to retrieve exit stub address from (gotten via @jit.attach with the texit event) * @returns {number} - exitstub trace address **/ export function traceexitstub(this: void, exitno: number): number /** * * Gets the address of a function from a list of 20 functions, for the list see [Ircalladdr Functions](https://wiki.garrysmod.com/page/Ircalladdr%20Functions) * * @name jit.util.ircalladdr * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.ircalladdr * @warning This function isn't officially documented on LuJIT wiki, use it at your own risk. * @param {void} this - no description * @param {number} index - The index of the function address to get from the ircalladdr func array (starting from 0) * @returns {number} - The address of the function **/ export function ircalladdr(this: void, index: number): number /** * * Does the exact same thing as debug.getupvalue except it only returns the name, not the name and the object. The upvalue indexes also start at 0 rather than 1, so doing jit.util.funcuvname(func, 0) will get you the same name as debug.getupvalue(func, 1) * * @name jit.util.funcuvname * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.funcuvname * @warning This function isn't officially documented on LuJIT wiki, use it at your own risk. * @param {void} this - no description * @param {function} func - Function to get the upvalue indexed from * @param {number} index - The upvalue index, starting from 0 * @returns {string} - The function returns nil if there is no upvalue with the given index, otherwise the name of the upvalue is returned **/ export function funcuvname(this: void, func: UnknownFunc, index: number): string /** * * Gets a constant at a certain index in a function. * * @name jit.util.funck * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.funck * @note Numbers constants goes from 0 (included) to n-1, n being the value of nconsts in @jit.util.funcinfo in other words, the consts goes from (nconsts-1) to -n * @note This function only works for Lua defined functions. * @note This will return a @proto type for functions that are created inside the target function - see Example 2. * @warning This function isn't officially documented on LuJIT wiki, use it at your own risk. * @param {void} this - no description * @param {function} func - Function to get constant from * @param {number} index - Constant index (counting down from the top of the function at -1) * @returns {any} - The constant found. **/ export function funck(this: void, func: UnknownFunc, index: number): any /** * * Retrieves LuaJIT information about a given function, similarly to @debug.getinfo. Possible table fields: * * linedefined: as for @debug.getinfo * * lastlinedefined: as for @debug.getinfo * * params: the number of parameters the function takes * * stackslots: the number of stack slots the function's local variable use * * upvalues: the number of upvalues the function uses * * bytecodes: the number of bytecodes it the compiled function * * gcconsts: the number of garbage collectable constants * * nconsts: the number of lua_Number (double) constants * * children: Boolean representing whether the function creates closures * * currentline: as for @debug.getinfo * * isvararg: if the function is a vararg function * * source: as for @debug.getinfo * * loc: a string describing the source and currentline, like ":" * * ffid: the fast function id of the function (if it is one). In this case only upvalues above and addr below are valid * * addr: the address of the function (if it is not a Lua function). If it's a C function rather than a fast function, only upvalues above is valid* * * @name jit.util.funcinfo * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.funcinfo * @param {void} this - no description * @param {function} func - Function or Proto to retrieve info about. * @param {number} pos - no description * @returns {table} - Information about the supplied function/proto. **/ export function funcinfo(this: void, func: UnknownFunc, pos?: number): table /** * * Returns bytecode of a function at a position. * * @name jit.util.funcbc * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/util.funcbc * @param {void} this - no description * @param {function} func - Function to retrieve bytecode from. * @param {number} pos - Position of the bytecode to retrieve. * @returns {number} - bytecode instruction * @returns {number} - bytecode opcode * @tupleReturn **/ export function funcbc(this: void, func: UnknownFunc, pos: number): [number, number] } declare namespace jit { /** * * Returns the status of the JIT compiler and the current optimizations enabled. * * @name jit.status * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/status * @param {void} this - no description * @returns {boolean} - Is JIT enabled * @returns {any} - Strings for CPU-specific features and enabled optimizations * @tupleReturn **/ export function status(this: void): [boolean, any] /** * * Enables LuaJIT Lua compilation. * * @name jit.on * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/on * @param {void} this - no description * @returns {void} **/ export function on(this: void): void /** * * Disables LuaJIT Lua compilation. * * @name jit.off * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/off * @param {void} this - no description * @returns {void} **/ export function off(this: void): void /** * * Flushes the whole cache of compiled code. * * @name jit.flush * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/flush * @param {void} this - no description * @returns {void} **/ export function flush(this: void): void /** * * You can attach callbacks to a number of compiler events with jit.attach. The callback can be called: * *when a function has been compiled to bytecode ("bc"); * *when trace recording starts or stops ("trace"); * *as a trace is being recorded ("record"); * *or when a trace exits through a side exit ("texit"). * Set a callback with jit.attach(callback, "event") and clear the same callback with jit.attach(callback) * * @name jit.attach * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/attach * @warning This function isn't officially documented on LuJIT wiki, use it at your own risk. * @param {void} this - no description * @param {any} callback - The callback function. * The arguments passed to the callback depend on the event being reported: * *"bc": * *"trace": * *"record": * *"texit": * @param {string} event - The event to hook into. * @returns {void} **/ export function attach(this: void, callback: any, event: string): void } declare namespace jit.opt { /** * * JIT compiler optimization control. The opt sub-module provides the backend for the -O command line LuaJIT option. * You can also use it programmatically, e.g.: * ``` * jit.opt.start(2) -- same as -O2 * jit.opt.start("-dce") * jit.opt.start("hotloop=10", "hotexit=2") * ``` * * @name jit.opt.start * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/jit/opt.start * @param {void} this - no description * @param {any[]} ...args - no description * @returns {void} **/ export function start(this: void, ...args: any[]): void } declare namespace input { /** * * Returns whether a mouse key was released in the same frame this function was called. * This function only works in Move hooks, and will detect mouse events even in main menu or when a typing in a text field. * * @name input.WasMouseReleased * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/WasMouseReleased * @param {void} this - no description * @param {MOUSE} key - The key to test, see @MOUSE enum * @returns {boolean} - True if the mouse key was released the same frame that this function was called, false otherwise. **/ export function WasMouseReleased(this: void, key: MOUSE): boolean /** * * Returns whether a mouse key was initially pressed in the same frame this function was called. * If @input.WasMouseDoublePressed returns true, this function will return false. * This function only works in Move hooks, and will detect mouse events even in main menu or when a typing in a text field. * * @name input.WasMousePressed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/WasMousePressed * @param {void} this - no description * @param {MOUSE} key - The key, see @MOUSE enum * @returns {boolean} - True if the mouse key was initially pressed the same frame that this function was called, false otherwise. **/ export function WasMousePressed(this: void, key: MOUSE): boolean /** * * Returns whether the key is being held down or not. * This function only works in Move hooks, and will detect key events even in main menu or when a typing in a text field. * * @name input.WasKeyTyped * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/WasKeyTyped * @param {void} this - no description * @param {KEY} key - The key to test, see @KEY enum * @returns {boolean} - Whether the key is being held down or not. **/ export function WasKeyTyped(this: void, key: KEY): boolean /** * * Returns whether a mouse key was double pressed in the same frame this function was called. * If this function returns true, @input.WasMousePressed will return false. * This function only works in Move hooks, and will detect mouse events even in main menu or when a typing in a text field. * * @name input.WasMouseDoublePressed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/WasMouseDoublePressed * @param {void} this - no description * @param {MOUSE} button - The mouse button to test, see @MOUSE enum * @returns {boolean} - Whether the mouse key was double pressed or not. **/ export function WasMouseDoublePressed(this: void, button: MOUSE): boolean /** * * Returns whether a key was released in the same frame this function was called. * This function only works in Move hooks, and will detect key releases even in main menu or when a typing in a text field. * * @name input.WasKeyReleased * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/WasKeyReleased * @param {void} this - no description * @param {KEY} key - The key, see @KEY enum. * @returns {boolean} - True if the key was released the same frame that this function was called, false otherwise. **/ export function WasKeyReleased(this: void, key: KEY): boolean /** * * Returns whether a key was initially pressed in the same frame this function was called. * This function only works in Move hooks, and will detect key presses even in main menu or when a typing in a text field. * * @name input.WasKeyPressed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/WasKeyPressed * @param {void} this - no description * @param {KEY} key - The key, see @KEY enum. * @returns {boolean} - True if the key was initially pressed the same frame that this function was called, false otherwise. **/ export function WasKeyPressed(this: void, key: KEY): boolean /** * * Begins waiting for a key to be pressed so we can save it for @input.CheckKeyTrapping. Used by the @DBinder type. * * @name input.StartKeyTrapping * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/StartKeyTrapping * @param {void} this - no description * @returns {void} **/ export function StartKeyTrapping(this: void): void /** * * Sets the cursor's position on the screen, relative to the topleft corner of the window * * @name input.SetCursorPos * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/SetCursorPos * @param {void} this - no description * @param {number} mouseX - X coordinate for mouse position * @param {number} mouseY - Y coordinate for mouse position * @returns {void} **/ export function SetCursorPos(this: void, mouseX: number, mouseY: number): void /** * * Returns the bind string that the given key is bound to. * * @name input.LookupKeyBinding * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/LookupKeyBinding * @param {void} this - no description * @param {BUTTON_CODE} key - Key from @BUTTON_CODE enum * @returns {string} - The bind string of the given key. **/ export function LookupKeyBinding(this: void, key: BUTTON_CODE): string /** * * Switches to the provided weapon on the next CUserCmd generation/CreateMove call. Direct binding to [CInput::MakeWeaponSelection](https://github.com/LestaD/SourceEngine2007/blob/43a5c90a5ada1e69ca044595383be67f40b33c61/se2007/game/client/in_main.cpp#L929-L932). * * @name input.SelectWeapon * @realm client * @wiki https://wiki.garrysmod.com/page/input/SelectWeapon * @param {void} this - no description * @param {Weapon} weapon - The weapon entity to switch to. * @returns {void} **/ export function SelectWeapon(this: void, weapon: Weapon): void /** * * Gets the match uppercase key for the specified binding. * * @name input.LookupBinding * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/LookupBinding * @param {void} this - no description * @param {string} binding - The binding name * @param {boolean} exact - True if the binding should match exactly * @returns {string} - The first key found with that binding or no value if no key with given binding was found. * See also @input.GetKeyCode. **/ export function LookupBinding(this: void, binding: string, exact?: boolean): string /** * * Gets whether a shift key is being pressed * * @name input.IsShiftDown * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/IsShiftDown * @param {void} this - no description * @returns {boolean} - isDown **/ export function IsShiftDown(this: void): boolean /** * * Returns whether key trapping is activate and the next key press will be captured. * * @name input.IsKeyTrapping * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/IsKeyTrapping * @param {void} this - no description * @returns {boolean} - Whether key trapping active or not **/ export function IsKeyTrapping(this: void): boolean /** * * Gets whether a mouse button is down * * @name input.IsMouseDown * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/IsMouseDown * @param {void} this - no description * @param {MOUSE} mouseKey - The key, see @MOUSE enum * @returns {boolean} - Is the key down **/ export function IsMouseDown(this: void, mouseKey: MOUSE): boolean /** * * Gets whether a key is down * * @name input.IsKeyDown * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/IsKeyDown * @param {void} this - no description * @param {KEY} key - The key, see @KEY enum. * @returns {boolean} - Is the key down **/ export function IsKeyDown(this: void, key: KEY): boolean /** * * Returns whether a control key is being pressed * * @name input.IsControlDown * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/IsControlDown * @param {void} this - no description * @returns {boolean} - Is Ctrl key down or not **/ export function IsControlDown(this: void): boolean /** * * Gets whether the specified button code is down. * Unlike @input.IsKeyDown this can also detect joystick presses from @JOYSTICK enum * * @name input.IsButtonDown * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/IsButtonDown * @param {void} this - no description * @param {BUTTON_CODE} button - The button, valid values are in the range of @BUTTON_CODE enum. * @returns {boolean} - Is the button down **/ export function IsButtonDown(this: void, button: BUTTON_CODE): boolean /** * * Gets the button name from a numeric button code. The name needs to be translated with @language.GetPhrase before being displayed. * * @name input.GetKeyName * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/GetKeyName * @note Despite the name of the function, this also works for the full range of keys in @BUTTON_CODE enum. * @param {void} this - no description * @param {BUTTON_CODE} button - The button, see @BUTTON_CODE enum. * @returns {string} - Button name. **/ export function GetKeyName(this: void, button: BUTTON_CODE): string /** * * Gets the button code from a button name. This is opposite of @input.GetKeyName. * * @name input.GetKeyCode * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/GetKeyCode * @param {void} this - no description * @param {string} button - The internal button name, such as "e" or "shift". * @returns {BUTTON_CODE} - The button code, see @BUTTON_CODE enum. **/ export function GetKeyCode(this: void, button: string): BUTTON_CODE /** * * Returns the cursor's position on the screen * * @name input.GetCursorPos * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/GetCursorPos * @param {void} this - no description * @returns {number} - The cursors position on the X axis * @returns {number} - The cursors position on the Y axis * @tupleReturn **/ export function GetCursorPos(this: void): [number, number] /** * * Returns the last key captured by key trapping. * * @name input.CheckKeyTrapping * @realm client, menu * @wiki https://wiki.garrysmod.com/page/input/CheckKeyTrapping * @param {void} this - no description * @returns {KEY} - The key, see @KEY enum **/ export function CheckKeyTrapping(this: void): KEY } declare namespace http { /** * @type httpFetchOnSuccess * @param {void} this - no description * @param {string} body - no description * @param {string} size - equal to @string.len(body) * @param {table} headers - no description * @param {number} code - The HTTP success code **/ type httpFetchOnSuccess = (this: void, body: string, size: string, headers: table, code: number) => unknown /** * @type httpFetchOnFailure * @param {void} this - no description * @param {string} error - The error message **/ type httpFetchOnFailure = (this: void, error: string) => unknown /** * * Sends an asynchronous POST request to a HTTP server. * HTTP requests returning a status code >= 400 are still considered a success and will call the onSuccess callback. * The onFailure callback is usually only called on DNS or TCP errors (e.g. the website is unavailable or the domain does not exist) * * @name http.Post * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/http/Post * @param {void} this - no description * @param {string} url - The url to of the website to fetch. * @param {table} parameters - The post parameters to be send to the server. **Keys and values *must* be strings. * @param {function} onSuccess - The function called on success: function( string responseText, number contentLength, table responseHeaders, number statusCode ) * @param {function} onFailure - The function called on failure: function( string errorMessage ) * @param {table} headers - KeyValue table for headers * @returns {void} **/ export function Post(this: void, url: string, parameters: table, onSuccess?: UnknownFunc, onFailure?: UnknownFunc, headers?: table): void /** * * Launches a GET request. * * @name http.Fetch * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/http/Fetch * @param {void} this - no description * @param {string} url - The URL of the website to fetch. * @param {function} onSuccess - Function to be called on success. Arguments are * @param {function} onFailure - Function to be called on failure. Arguments are * @param {table} headers - KeyValue table for headers * @returns {void} **/ export function Fetch(this: void, url: string, onSuccess?: httpFetchOnSuccess, onFailure?: httpFetchOnFailure, headers?: table): void } declare namespace hook { /** * * Calls hooks associated with the given event. * Calls all hooks until one returns something other than nil and then returns that data. * If no hook returns any data, it will try to call the GAMEMODE: alternative, if one exists. * This function internally calls @hook.Call. * See also: @gamemode.Call - same as this, but does not call hooks if the gamemode hasn't defined the function. * * @name hook.Run * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/hook/Run * @param {void} this - no description * @param {string} eventName - The event to call hooks for * @param {any[]} ...args - The arguments to be passed to the hooks * @returns {any} - Returned data from called hooks **/ export function Run(this: void, eventName: string, ...args: any[]): any /** * * Removes the hook with the supplied identifier from the given event. * * @name hook.Remove * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/hook/Remove * @param {void} this - no description * @param {string} eventName - The event name. * @param {any} identifier - The unique identifier of the hook to remove, usually a string. * @returns {void} **/ export function Remove(this: void, eventName: string, identifier: any): void /** * * Returns a list of all the hooks registered with @hook.Add. * * @name hook.GetTable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/hook/GetTable * @param {void} this - no description * @returns {table[]} - A table of tables. See below for output example. **/ export function GetTable(this: void): table[] /** * * Calls all hooks associated with the given event until one returns something other than nil, and then returns that data. * In almost all cases, you should use @hook.Run instead - it calls hook.Call internally but supplies the gamemode table by itself, making your code neater. * * @name hook.Call * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/hook/Call * @param {void} this - no description * @param {string} eventName - The event to call hooks for * @param {table} gamemodeTable - If the gamemode is specified, the gamemode hook within will be called, otherwise not * @param {any[]} ...args - The arguments to be passed to the hooks * @returns {any[]} - Return data from called hooks. Limited to 6 return values **/ export function Call(this: void, eventName: string, gamemodeTable: table, ...args: any[]): any[] /** * * Add a hook to be called upon the given event occurring. * * @name hook.Add * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/hook/Add * @warning Returning any value besides nil from the hook's function will stop other hooks of the same event down the loop from being executed. Only return a value when absolutely necessary and when you know what you are doing.It WILL break other addons. * @param {void} this - no description * @param {string} eventName - The event to hook on to, see [GM Hooks](https://wiki.garrysmod.com/page/Category:GM%20Hooks) and [Sandbox Hooks](https://wiki.garrysmod.com/page/Category:SANDBOX%20Hooks) * @param {string | table | Entity | Panel | number | boolean} identifier - The unique identifier, usually a string. This can be used elsewhere in the code to replace or remove the hook. The identifier **should** be unique so that you do not accidentally override some other mods hook, unless that's what you are trying to do. * The identifier can be either a @string type, or a @table type/object with an IsValid function defined such as an @Entity type or @Panel type. @number types and @boolean types, for example, are not allowed. * If the identifier is a table/object, it will be inserted in front of the other arguments in the callback and the hook will be called as long as it's valid. However, as soon as IsValid( identifier ) returns false, the hook will be removed. * @param {function} func - The function to be called, arguments given to it depend on the [hook](https://wiki.garrysmod.com/page/Category:Hooks). * @returns {void} **/ export function Add(this: void, eventName: string, identifier: string | table | Entity | Panel | number | boolean, func: UnknownFunc): void } declare namespace hammer { /** * * Sends command to Hammer, if Hammer is running with the current map loaded. * * @name hammer.SendCommand * @realm server * @wiki https://wiki.garrysmod.com/page/hammer/SendCommand * @param {void} this - no description * @param {string} cmd - Command to send including arguments * All commands are in the format "command var1 var2 etc" * All commands that pick an entity with x y z , must use the exact position including decimals. i.e. -354.4523 123.4 -1224.325452 * List of commands * **"session_begin mapName mapVersion"** - Starts a hammer edit, locking the editor. mapName is the current map without path or suffix, mapVersion is the current version in the .vmf file * **"session_end"** - Ends a hammer edit, unlocking the editor. * **"map_check_version mapName mapVersion"** - This only works after session_begin, so you'd know the right version already and this only returns ok, this function is apparently useless * **"entity_create entityClass x y z"** - Creates an entity of entityClass at position x y z * **"entity_delete entityClass x y z"** - Deletes an entity of entityClass at position x y z * **"entity_set_keyvalue entityClass x y z "key" "value""** - Set's the KeyValue pair of an entity of entityClass at x y z. The Key name and Value String must be in quotes. * **"entity_rotate_incremental entityClass x y z incX incY incZ"** - Rotates an entity of entityClass at x y z by incX incY incZ * **"node_create nodeClass nodeID x y z"** - Creates an AI node of nodeClass with nodeID at x y z you should keep nodeID unique or you will have issues * **"node_delete nodeID"** - Deletes node(s) with nodeID, this will delete multiple nodes if they have the same nodeID * **"nodelink_create startNodeID endNodeID"** - Creates a link between AI nodes startNodeID and endNodeID * **"nodelink_delete startNodeID endNodeID"** - Removes a link between AI nodes startNodeID and endNodeID * @returns {string} - Returns "ok" if command succeeded otherwise returns "badcommand". * **All changes only happen in hammer, there is *NO* in game representation/feedback** **/ export function SendCommand(this: void, cmd: string): string } declare namespace halo { /** * * Returns the entity the halo library is currently rendering the halo for. * The main purpose of this function is to be used in @EntityHooks:Draw in order not to draw certain parts of the entity when the halo is being rendered, so there's no halo around unwanted entity parts, such as lasers, 3D2D displays, etc. * * @name halo.RenderedEntity * @realm client * @wiki https://wiki.garrysmod.com/page/halo/RenderedEntity * @param {void} this - no description * @returns {Entity} - If set, the currently rendered entity by the halo library. **/ export function RenderedEntity(this: void): Entity /** * * Renders a halo according to the specified table, only used internally, called from a PostDrawEffects hook added by the halo library * * @name halo.Render * @realm client * @wiki https://wiki.garrysmod.com/page/halo/Render * @internal * @param {void} this - no description * @param {table} entry - Table with info about the halo to draw. * @returns {void} **/ export function Render(this: void, entry: table): void /** * * Applies a "halo" glow effect to one or multiple entities. * * @name halo.Add * @realm client * @wiki https://wiki.garrysmod.com/page/halo/Add * @warning Using this function outside of the PreDrawHalos hook can cause instability or crashes. * @param {void} this - no description * @param {table} entities - A table of entities to add the halo effect to * @param {Color} color - The desired color of the halo. See @IColor structure * @param {number} blurX - The strength of the halo's blur on the x axis. * @param {number} blurY - The strength of the halo's blur on the y axis. * @param {number} passes - The number of times the halo should be drawn per frame. Increasing this may hinder player FPS. * @param {boolean} additive - Sets the render mode of the halo to additive. * @param {boolean} ignoreZ - Renders the halo through anything when set to true. * @returns {void} **/ export function Add(this: void, entities: table, color: Color, blurX?: number, blurY?: number, passes?: number, additive?: boolean, ignoreZ?: boolean): void } declare namespace GWEN { /** * @type GWENCreateTextureNormalReturn * @param {void} this - no description * @param {number} x - X coordinate for the box * @param {number} y - Y coordinate for the box * @param {number} w - Width of the box * @param {number} h - Height of the box * @param {IColor} clr - Optional color, default is white. Uses the @IColor structure **/ type GWENCreateTextureNormalReturn = (this: void, x: number, y: number, w: number, h: number, clr: IColor) => unknown /** * @type GWENCreateTextureCenteredReturn * @param {void} this - no description * @param {number} x - X coordinate for the box * @param {number} y - Y coordinate for the box * @param {number} w - Width of the box * @param {number} h - Height of the box * @param {IColor} clr - Optional color, default is white. Uses the @IColor structure **/ type GWENCreateTextureCenteredReturn = (this: void, x: number, y: number, w: number, h: number, clr: IColor) => unknown /** * @type GWENCreateTextureBorderReturn * @param {void} this - no description * @param {number} x - X coordinate for the box * @param {number} y - Y coordinate for the box * @param {number} w - Width of the box * @param {number} h - Height of the box * @param {IColor} clr - Optional color, default is white. Uses the @IColor structure **/ type GWENCreateTextureBorderReturn = (this: void, x: number, y: number, w: number, h: number, clr: IColor) => unknown /** * * When used in a material skin, it returns a color value from a point in the skin image. * * @name GWEN.TextureColor * @realm client, menu * @wiki https://wiki.garrysmod.com/page/GWEN/TextureColor * @param {void} this - no description * @param {number} x - X position of the pixel to get the color from. * @param {number} y - Y position of the pixel to get the color from. * @returns {IColor} - The color of the point on the skin as a @IColor structure. **/ export function TextureColor(this: void, x: number, y: number): IColor /** * * Used in derma skins to create a rectangle drawing function from an image. The texture of the rectangle will be scaled. The texture is taken from SKIN.GwenTexture * * @name GWEN.CreateTextureNormal * @realm client, menu * @wiki https://wiki.garrysmod.com/page/GWEN/CreateTextureNormal * @param {void} this - no description * @param {number} x - The X coordinate on the texture * @param {number} y - The Y coordinate on the texture * @param {number} w - Width of the area on texture * @param {number} h - Height of the area on texture * @returns {function} - The drawing function. Arguments are: **/ export function CreateTextureNormal(this: void, x: number, y: number, w: number, h: number): GWENCreateTextureNormalReturn /** * * Used in derma skins to create a rectangle drawing function from an image. The rectangle will not be scaled, but instead it will be drawn in the center of the box. The texture is taken from SKIN.GwenTexture * * @name GWEN.CreateTextureCentered * @realm client, menu * @wiki https://wiki.garrysmod.com/page/GWEN/CreateTextureCentered * @param {void} this - no description * @param {number} x - The X coordinate on the texture * @param {number} y - The Y coordinate on the texture * @param {number} w - Width of the area on texture * @param {number} h - Height of the area on texture * @returns {function} - The drawing function. Arguments are: **/ export function CreateTextureCentered(this: void, x: number, y: number, w: number, h: number): GWENCreateTextureCenteredReturn /** * * Used in derma skins to create a bordered rectangle drawing function from an image. The texture is taken either from last argument or from SKIN.GwenTexture * * @name GWEN.CreateTextureBorder * @realm client, menu * @wiki https://wiki.garrysmod.com/page/GWEN/CreateTextureBorder * @param {void} this - no description * @param {number} x - The X coordinate on the texture * @param {number} y - The Y coordinate on the texture * @param {number} w - Width of the area on texture * @param {number} h - Height of the area on texture * @param {number} left - Left width of border * @param {number} top - Top width of border * @param {number} right - Right width of border * @param {number} bottom - Bottom width of border * @param {IMaterial} source - Texture of source image to create a bordered rectangle from. Uses SKIN.GwenTexture if not set. * @returns {function} - The drawing function. Arguments are: **/ export function CreateTextureBorder(this: void, x: number, y: number, w: number, h: number, left: number, top: number, right: number, bottom: number, source?: IMaterial): GWENCreateTextureBorderReturn } declare namespace gui { /** * * Shows console in the game UI. * * @name gui.ShowConsole * @realm menu * @wiki https://wiki.garrysmod.com/page/gui/ShowConsole * @param {void} this - no description * @returns {void} **/ export function ShowConsole(this: void): void /** * * Sets the cursor's position on the screen, relative to the topleft corner of the window * * @name gui.SetMousePos * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/SetMousePos * @param {void} this - no description * @param {number} mouseX - The X coordinate to move the cursor to. * @param {number} mouseY - The Y coordinate to move the cursor to. * @returns {void} **/ export function SetMousePos(this: void, mouseX: number, mouseY: number): void /** * * Converts the specified screen position to a **direction** vector local to the player's view. A related function is @VectorFuncs:ToScreen, which translates a 3D position to a screen coordinate. * @util.AimVector is a more generic version of this, using a custom view instead of the player's current view. * * @name gui.ScreenToVector * @realm client * @wiki https://wiki.garrysmod.com/page/gui/ScreenToVector * @param {void} this - no description * @param {number} x - X coordinate on the screen. * @param {number} y - Y coordinate on the screen. * @returns {Vector} - Direction **/ export function ScreenToVector(this: void, x: number, y: number): Vector /** * * Opens specified URL in the steam overlay browser. The URL has to start with either http:// or https:// * * @name gui.OpenURL * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/OpenURL * @note User will be asked for confirmation before the website will open. * @bug #3383 You can't click the confirmation if a modal panel has focus. * @param {void} this - no description * @param {string} url - URL to open * @returns {void} **/ export function OpenURL(this: void, url: string): void /** * * Returns y component of the mouse position. * * @name gui.MouseY * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/MouseY * @param {void} this - no description * @returns {number} - mouseY **/ export function MouseY(this: void): number /** * * Returns x component of the mouse position. * * @name gui.MouseX * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/MouseX * @param {void} this - no description * @returns {number} - mouseX **/ export function MouseX(this: void): number /** * * Returns the cursor's position on the screen, or 0, 0 if cursor is not visible. * * @name gui.MousePos * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/MousePos * @param {void} this - no description * @returns {number} - mouseX * @returns {number} - mouseY * @tupleReturn **/ export function MousePos(this: void): [number, number] /** * * Returns whenever the game menu overlay ( main menu ) is open or not. * * @name gui.IsGameUIVisible * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/IsGameUIVisible * @param {void} this - no description * @returns {boolean} - Whenever the game menu overlay ( main menu ) is open or not **/ export function IsGameUIVisible(this: void): boolean /** * * Returns whether the console is visible or not. * * @name gui.IsConsoleVisible * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/IsConsoleVisible * @param {void} this - no description * @returns {boolean} - Whether the console is visible or not. **/ export function IsConsoleVisible(this: void): boolean /** * * Simulates a mouse wheel scroll with the given delta. * * @name gui.InternalMouseWheeled * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalMouseWheeled * @param {void} this - no description * @param {number} delta - The amount of scrolling to simulate. * @returns {void} **/ export function InternalMouseWheeled(this: void, delta: number): void /** * * Simulates a mouse key release for the given mouse key. * * @name gui.InternalMouseReleased * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalMouseReleased * @param {void} this - no description * @param {MOUSE} key - The key, see @MOUSE enum. * @returns {void} **/ export function InternalMouseReleased(this: void, key: MOUSE): void /** * * Simulates a mouse key press for the given mouse key. * * @name gui.InternalMousePressed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalMousePressed * @param {void} this - no description * @param {MOUSE} key - The key, see @MOUSE enum. * @returns {void} **/ export function InternalMousePressed(this: void, key: MOUSE): void /** * * Simulates a double mouse key press for the given mouse key. * * @name gui.InternalMouseDoublePressed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalMouseDoublePressed * @param {void} this - no description * @param {MOUSE} key - The key, see @MOUSE enum. * @returns {void} **/ export function InternalMouseDoublePressed(this: void, key: MOUSE): void /** * * Simulates an ASCII symbol writing. * Use to write text in the chat or in VGUI. * Doesn't work while the main menu is open! * * @name gui.InternalKeyTyped * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalKeyTyped * @param {void} this - no description * @param {number} code - ASCII code of symbol, see http://www.mikroe.com/img/publication/spa/pic-books/programming-in-basic/chapter/04/fig4-24.gif * @returns {void} **/ export function InternalKeyTyped(this: void, code: number): void /** * * Simulates a key type typing to the specified key. * * @name gui.InternalKeyCodeTyped * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalKeyCodeTyped * @param {void} this - no description * @param {KEY} key - The key, see @KEY enum. * @returns {void} **/ export function InternalKeyCodeTyped(this: void, key: KEY): void /** * * Simulates a key release for the given key. * * @name gui.InternalKeyCodeReleased * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalKeyCodeReleased * @param {void} this - no description * @param {KEY} key - The key, see @KEY enum. * @returns {void} **/ export function InternalKeyCodeReleased(this: void, key: KEY): void /** * * Simulates a key press for the given key. * * @name gui.InternalKeyCodePressed * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalKeyCodePressed * @param {void} this - no description * @param {KEY} key - The key, see @KEY enum. * @returns {void} **/ export function InternalKeyCodePressed(this: void, key: KEY): void /** * * Simulates a mouse move with the given deltas. * * @name gui.InternalCursorMoved * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/InternalCursorMoved * @param {void} this - no description * @param {number} deltaX - The movement delta on the x axis. * @param {number} deltaY - The movement delta on the y axis. * @returns {void} **/ export function InternalCursorMoved(this: void, deltaX: number, deltaY: number): void /** * * Hides the game menu overlay. * * @name gui.HideGameUI * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/HideGameUI * @param {void} this - no description * @returns {void} **/ export function HideGameUI(this: void): void /** * * Opens the game menu overlay. * * @name gui.ActivateGameUI * @realm client, menu * @wiki https://wiki.garrysmod.com/page/gui/ActivateGameUI * @param {void} this - no description * @returns {void} **/ export function ActivateGameUI(this: void): void /** * * Enables the mouse cursor without restricting player movement, like using Sandbox's context menu. * * @name gui.EnableScreenClicker * @realm client * @wiki https://wiki.garrysmod.com/page/gui/EnableScreenClicker * @bug #982 Some @CUserCmd type functions to return incorrect values will return incorrect values when this function is active. * @param {void} this - no description * @param {boolean} enabled - Whether the cursor should be enabled or not. (true = enable, false = disable) * @returns {void} **/ export function EnableScreenClicker(this: void, enabled: boolean): void } declare namespace gmsave { /** * * Returns if we should save this entity in a duplication or a map save or not. * * @name gmsave.ShouldSaveEntity * @realm server * @wiki https://wiki.garrysmod.com/page/gmsave/ShouldSaveEntity * @param {void} this - no description * @param {Entity} ent - The entity * @param {table} t - A table containing classname key with entities classname. * @returns {boolean} - Should save entity or not **/ export function ShouldSaveEntity(this: void, ent: Entity, t: table): boolean /** * * Saves the map * * @name gmsave.SaveMap * @realm server * @wiki https://wiki.garrysmod.com/page/gmsave/SaveMap * @param {void} this - no description * @param {Player} ply - The player, whose position should be saved for loading the save * @returns {string} - The encoded to JSON string containing save data **/ export function SaveMap(this: void, ply: Player): string /** * * Sets player position and angles from supplied table * * @name gmsave.PlayerLoad * @realm server * @wiki https://wiki.garrysmod.com/page/gmsave/PlayerLoad * @param {void} this - no description * @param {Player} ply - The player to "load" values for * @param {table} data - A table containing Origin and Angle keys for position and angles to set. * @returns {void} **/ export function PlayerLoad(this: void, ply: Player, data: table): void /** * * Returns a table containing player position and angles. Used by @gmsave.SaveMap. * * @name gmsave.PlayerSave * @realm server * @wiki https://wiki.garrysmod.com/page/gmsave/PlayerSave * @param {void} this - no description * @param {Player} ply - The player to "save" * @returns {table} - A table containing player position ( Origin ) and angles ( Angle ) **/ export function PlayerSave(this: void, ply: Player): table /** * * Loads a saved map. * * @name gmsave.LoadMap * @realm server * @wiki https://wiki.garrysmod.com/page/gmsave/LoadMap * @param {void} this - no description * @param {string} mapData - The JSON encoded string containing all the map data. * @param {Player} ply - The player to load positions for * @returns {void} **/ export function LoadMap(this: void, mapData: string, ply: Player): void } declare namespace gmod { /** * * Returns @GAMEMODE global. * * @name gmod.GetGamemode * @realm client, server * @wiki https://wiki.garrysmod.com/page/gmod/GetGamemode * @param {void} this - no description * @returns {table} - GAMEMODE **/ export function GetGamemode(this: void): table } declare namespace gamemode { /** * * This returns the internally stored gamemode table. * * @name gamemode.Get * @realm client, server * @wiki https://wiki.garrysmod.com/page/gamemode/Get * @internal * @param {void} this - no description * @param {string} name - The name of the gamemode you want to get * @returns {table} - The gamemode's table **/ export function Get(this: void, name: string): table /** * * Called by the engine when a gamemode is being loaded. * * @name gamemode.Register * @realm client, server * @wiki https://wiki.garrysmod.com/page/gamemode/Register * @internal * @param {void} this - no description * @param {table} gm - Your GM table * @param {string} name - Name of your gamemode, lowercase, no spaces. * @param {string} derived - The gamemode name that your gamemode is derived from * @returns {void} **/ export function Register(this: void, gm: table, name: string, derived: string): void /** * * Called by the engine to call a hook within the loaded gamemode. * The supplied event 'name' must be defined in the active gamemode. Otherwise, nothing will happen - not even hooks added with @hook.Add will be called. * This is similar to @hook.Run and @hook.Call, except the hook library will call hooks created with hook.Add even if there is no corresponding gamemode function. * * @name gamemode.Call * @realm client, server * @wiki https://wiki.garrysmod.com/page/gamemode/Call * @param {void} this - no description * @param {string} name - The name of the hook to call. * @param {any[]} ...args - The arguments * @returns {any} - The result of the hook function - can be up to 6 values. Returns false if the gamemode function doesn't exist (i.e. nothing happened), but remember - a hook can also return false. **/ export function Call(this: void, name: string, ...args: any[]): any } declare namespace gameevent { /** * * Add a game event listener. * * @name gameevent.Listen * @realm client, server * @wiki https://wiki.garrysmod.com/page/gameevent/Listen * @param {void} this - no description * @param {string} eventName - The event to listen to, travels through hooks with eventName as event. * List of valid events can be found [here](https://wiki.garrysmod.com/page/Game_Events). * @returns {void} **/ export function Listen(this: void, eventName: string): void } declare namespace game { /** * * Sets the time scale of the game. * This function is supposed to remove the need of using the host_timescale convar, which is cheat protected. * To slow down or speed up the movement of a specific player, use @Player:SetLaggedMovementValue instead. * * @name game.SetTimeScale * @realm server * @wiki https://wiki.garrysmod.com/page/game/SetTimeScale * @note Like host_timescale, this method does not affect sounds, if you wish to change that, look into @GamemodeHooks:EntityEmitSound. * @param {void} this - no description * @param {number} timeScale - The new timescale, minimum value is 0.001 and maximum is 5. * @returns {void} **/ export function SetTimeScale(this: void, timeScale: number): void /** * * Returns position the player should start from, this is not the same thing as spawn points, it is used to properly transit the player between maps. * * @name game.StartSpot * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/StartSpot * @param {void} this - no description * @returns {Vector} - startSpot **/ export function StartSpot(this: void): Vector /** * * Returns whenever the current session is a single player game. * * @name game.SinglePlayer * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/SinglePlayer * @param {void} this - no description * @returns {boolean} - isSinglePlayer **/ export function SinglePlayer(this: void): boolean /** * * Sets the difficulty level of the game, can be retrieved with @game.GetSkillLevel. * This will automatically change whenever the "skill" convar is modified serverside. * * @name game.SetSkillLevel * @realm server * @wiki https://wiki.garrysmod.com/page/game/SetSkillLevel * @bug #3491 This function will not work if the skill convar doesn't match the targeted value. To work around this, you must use RunConsoleCommand("skill", num) alongside this function. * @param {void} this - no description * @param {number} level - The difficulty level, Easy( 1 ), Normal( 2 ), Hard( 3 ). * @returns {void} **/ export function SetSkillLevel(this: void, level: number): void /** * * Sets whether a Global State is off, active or dead ( inactive ) * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for more information. * * @name game.SetGlobalState * @realm server * @wiki https://wiki.garrysmod.com/page/game/SetGlobalState * @param {void} this - no description * @param {string} name - The name of the Global State to set. * If the Global State by that name does not exist, it will be created. * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for a list of default global states. * @param {GLOBAL} state - The state of the Global State. See @GLOBAL enum * @returns {void} **/ export function SetGlobalState(this: void, name: string, state: GLOBAL): void /** * * Sets the counter of a Global State. * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for more information. * * @name game.SetGlobalCounter * @realm server * @wiki https://wiki.garrysmod.com/page/game/SetGlobalCounter * @param {void} this - no description * @param {string} name - The name of the Global State to set. * If the Global State by that name does not exist, it will be created. * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for a list of default global states. * @param {number} count - The value to set for that Global State. * @returns {void} **/ export function SetGlobalCounter(this: void, name: string, count: number): void /** * * Removes all the clientside ragdolls. * * @name game.RemoveRagdolls * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/RemoveRagdolls * @param {void} this - no description * @returns {void} **/ export function RemoveRagdolls(this: void): void /** * * Loads the next map according to the nextlevel convar, or from the current mapcycle file set by the respective convar. * * @name game.LoadNextMap * @realm server * @wiki https://wiki.garrysmod.com/page/game/LoadNextMap * @param {void} this - no description * @returns {void} **/ export function LoadNextMap(this: void): void /** * * Returns the map load type of the current map. * After changing the map with the console command *changelevel*, "newgame" is returned. With *changelevel2* (single player only), "transition" is returned. * * @name game.MapLoadType * @realm server * @wiki https://wiki.garrysmod.com/page/game/MapLoadType * @param {void} this - no description * @returns {string} - The load type. Possible values are: "newgame", "loadgame", "transition", "background". **/ export function MapLoadType(this: void): string /** * * Mounts a GMA addon from the disk. Any error models currently loaded that the mounted addon provides will be reloaded. * Can be used with @steamworks.DownloadUGC * * @name game.MountGMA * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/MountGMA * @param {void} this - no description * @param {string} path - Location of the GMA file to mount, relative to the garrysmod directory * @returns {boolean} - success * @returns {table} - If successful, a table of files that have been mounted * @tupleReturn **/ export function MountGMA(this: void, path: string): [boolean, table] /** * * Returns the maximum amount of players (including bots) that the server can have. * * @name game.MaxPlayers * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/MaxPlayers * @param {void} this - no description * @returns {number} - The maximum amount of players **/ export function MaxPlayers(this: void): number /** * * Kicks a player from the server. This can be ran before the player has spawned. * * @name game.KickID * @realm server * @wiki https://wiki.garrysmod.com/page/game/KickID * @warning This will be shortened to ~512 chars, though this includes the command itself and the player index so will realistically be more around ~498. It is recommended to avoid going near the limit to avoid truncation. * @param {void} this - no description * @param {string} id - UserID or SteamID of the player to kick. * @param {string} reason - Reason to display to the player. This can span across multiple lines. * @returns {void} **/ export function KickID(this: void, id: string, reason?: string): void /** * * Returns the time scale of the game * * @name game.GetTimeScale * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetTimeScale * @param {void} this - no description * @returns {number} - The time scale **/ export function GetTimeScale(this: void): number /** * * Returns the worldspawn entity. * * @name game.GetWorld * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetWorld * @param {void} this - no description * @returns {Entity} - The world **/ export function GetWorld(this: void): Entity /** * * Returns true if the server is a dedicated server, false if it is a [Listen server](https://en.wikipedia.org/wiki/Listen%20server) or a singleplayer game. * * @name game.IsDedicated * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/IsDedicated * @bug #1495 This always returns false on the client. * @param {void} this - no description * @returns {boolean} - Is the server dedicated or not. **/ export function IsDedicated(this: void): boolean /** * * Returns the difficulty level of the game. * **TIP:** You can use this function in your scripted NPCs or Nextbots to make them harder, however, it is a good idea to lock powerful attacks behind the highest difficulty instead of just increasing the health. * * @name game.GetSkillLevel * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetSkillLevel * @note Internally this is tied to the gamerules entity, so you'll have to wait to wait until @GamemodeHooks:InitPostEntity is called to return the skill level * @param {void} this - no description * @returns {number} - The difficulty level, Easy( 1 ), Normal( 2 ), Hard( 3 ). **/ export function GetSkillLevel(this: void): number /** * * Returns the VBSP version of the current map. * * @name game.GetMapVersion * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetMapVersion * @param {void} this - no description * @returns {number} - mapVersion **/ export function GetMapVersion(this: void): number /** * * Returns the next map that would be loaded according to the file that is set by the mapcyclefile convar. * * @name game.GetMapNext * @realm server * @wiki https://wiki.garrysmod.com/page/game/GetMapNext * @param {void} this - no description * @returns {string} - nextMap **/ export function GetMapNext(this: void): string /** * * Returns the name of the current map, without a file extension. * On the menu state, returns "menu". * * @name game.GetMap * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/game/GetMap * @param {void} this - no description * @returns {string} - The name of the current map, without a file extension. **/ export function GetMap(this: void): string /** * * Returns the public IP address and port of the current server. This will return the IP/port that you are connecting through when ran clientside. * * @name game.GetIPAddress * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetIPAddress * @note Returns "0.0.0.0:0" in singleplayer. * @bug #3001 Returns "0.0.0.0:*port*" on the server when called too early, including in @GamemodeHooks:Initialize and @GamemodeHooks:InitPostEntity. This bug seems to only happen the first time a server is launched, and will return the correct value after switching maps. * @param {void} this - no description * @returns {string} - The IP address and port in the format "x.x.x.x:x" **/ export function GetIPAddress(this: void): string /** * * Returns the counter of a Global State. * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for more information. * * @name game.GetGlobalCounter * @realm server * @wiki https://wiki.garrysmod.com/page/game/GetGlobalCounter * @param {void} this - no description * @param {string} name - The name of the Global State to set. * If the Global State by that name does not exist, it will be created. * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for a list of default global states. * @returns {number} - The value of the given Global State, 0 if the global state doesn't exist. **/ export function GetGlobalCounter(this: void, name: string): number /** * * Returns whether a Global State is off, active or dead ( inactive ) * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for more information. * * @name game.GetGlobalState * @realm server * @wiki https://wiki.garrysmod.com/page/game/GetGlobalState * @param {void} this - no description * @param {string} name - The name of the Global State to retrieve the state of. * If the Global State by that name does not exist, **GLOBAL_DEAD** will be returned. * See [Global States](https://wiki.garrysmod.com/page/Global%20States) for a list of default global states. * @returns {GLOBAL} - The state of the Global State. See @GLOBAL enum **/ export function GetGlobalState(this: void, name: string): GLOBAL /** * * Returns a list of all ammo types currently registered. * * @name game.GetAmmoTypes * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoTypes * @param {void} this - no description * @returns {table} - A table containing all ammo types. The keys are ammo IDs, the values are the names associated with those IDs. **/ export function GetAmmoTypes(this: void): table /** * * Returns the damage given ammo type should do to players. * * @name game.GetAmmoPlayerDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoPlayerDamage * @param {void} this - no description * @param {number} id - Ammo ID to retrieve the damage info of. Starts from 1. * @returns {number} - no description **/ export function GetAmmoPlayerDamage(this: void, id: number): number /** * * Returns the damage given ammo type should do to NPCs. * * @name game.GetAmmoNPCDamage * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoNPCDamage * @param {void} this - no description * @param {number} id - Ammo ID to retrieve the damage info of. Starts from 1. * @returns {number} - no description **/ export function GetAmmoNPCDamage(this: void, id: number): number /** * * Returns the ammo name for given ammo type ID. * See @game.GetAmmoID for reverse. * * @name game.GetAmmoName * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoName * @param {void} this - no description * @param {number} id - Ammo ID to retrieve the name of. Starts from 1. * @returns {string} - The name of given ammo type ID or nil if ammo type ID is invalid. **/ export function GetAmmoName(this: void, id: number): string /** * * Returns the ammo bullet force that is applied when an entity is hit by a bullet of given ammo type. * * @name game.GetAmmoForce * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoForce * @param {void} this - no description * @param {number} id - Ammo ID to retrieve the force of. Starts from 1. * @returns {number} - no description **/ export function GetAmmoForce(this: void, id: number): number /** * * Returns the ammo type ID for given ammo type name. * See @game.GetAmmoName for reverse. * * @name game.GetAmmoID * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoID * @param {void} this - no description * @param {string} name - Name of the ammo type to look up ID of * @returns {number} - The ammo type ID of given ammo type name, or -1 if not found **/ export function GetAmmoID(this: void, name: string): number /** * * Returns the real maximum amount of ammo of given ammo ID. * * @name game.GetAmmoMax * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoMax * @note Currently all ammo types have overridden maximum value of reserve ammo set to 9999. * @param {void} this - no description * @param {number} id - Ammo type ID * @returns {number} - The maximum amount of reserve ammo a player can hold of this ammo type. **/ export function GetAmmoMax(this: void, id: number): number /** * * Returns the @AmmoData structure for given ID. * * @name game.GetAmmoData * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoData * @param {void} this - no description * @param {number} id - ID of the ammo type to look up the data for * @returns {AmmoData} - The @AmmoData structure containing all ammo data **/ export function GetAmmoData(this: void, id: number): AmmoData /** * * Runs a console command. * Make sure to add a newline ("\n") at the end of the command. * * @name game.ConsoleCommand * @realm server * @wiki https://wiki.garrysmod.com/page/game/ConsoleCommand * @warning If you use data that were received from a client, you should avoid using this function because newline and semicolon (at least) allow the client to run arbitrary commands! * For safety, you are urged to prefer using @RunConsoleCommand function in this case. * @param {void} this - no description * @param {string} stringCommand - String containing the command and arguments to be ran. * @returns {void} **/ export function ConsoleCommand(this: void, stringCommand: string): void /** * * If called serverside it will remove ALL entities which were not created by the map(not players or weapons held by players). * On the client it will remove decals, sounds, gibs, dead NPCs, and entities created via @ents.CreateClientProp. * This function calls @GamemodeHooks:PreCleanupMap before cleaning up the map and @GamemodeHooks:PostCleanupMap after cleaning up the map. * * @name game.CleanUpMap * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/CleanUpMap * @bug #1142 Calling this in a @EntityHooks:StartTouch or @EntityHooks:Touch hook will crash the game. * @bug #2874 Calling this destroys all BASS streams. * @bug #3637 This can crash when removing _firesmoke entities. * @param {void} this - no description * @param {boolean} dontSendToClients - If set to true, don't run this functions on all clients. * @param {table} ExtraFilters - Entity classes not to reset during cleanup. * @returns {void} **/ export function CleanUpMap(this: void, dontSendToClients?: boolean, ExtraFilters?: table): void /** * * Returns the damage type of given ammo type. * * @name game.GetAmmoDamageType * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/GetAmmoDamageType * @param {void} this - no description * @param {number} id - Ammo ID to retrieve the damage type of. Starts from 1. * @returns {DMG} - See @DMG enum **/ export function GetAmmoDamageType(this: void, id: number): DMG /** * * Called by the engine to retrieve the ammo types. * * @name game.BuildAmmoTypes * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/BuildAmmoTypes * @internal Consider using @game.GetAmmoTypes and @game.GetAmmoData instead. * @param {void} this - no description * @returns {table} - All ammo types registered via @game.AddAmmoType, sorted by its name value. **/ export function BuildAmmoTypes(this: void): table /** * * Loads a particle file. * * @name game.AddParticles * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/AddParticles * @note You will still need to call this function clientside regardless if you create the particle effects serverside. * @param {void} this - no description * @param {string} particleFileName - The path of the file to add. Must be (file).pcf. * @returns {void} **/ export function AddParticles(this: void, particleFileName: string): void /** * * Registers a new decal. * * @name game.AddDecal * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/AddDecal * @warning There's a rather low limit of around 256 for decals that may be registered and they are not cleared on map load. * @param {void} this - no description * @param {string} decalName - The name of the decal. * @param {string} materialName - The material to be used for the decal. May also be a list of material names, in which case a random material from that list will be chosen every time the decal is placed. * @returns {void} **/ export function AddDecal(this: void, decalName: string, materialName: string): void /** * * Adds a new ammo type to the game. * You can find a list of default ammo types [here](https://wiki.garrysmod.com/page/Default_Ammo_Types). * * @name game.AddAmmoType * @realm client, server * @wiki https://wiki.garrysmod.com/page/game/AddAmmoType * @note This function must be called in @GamemodeHooks:Initialize. * @note There is a limit of 128 ammo types, including the default ones. * @warning This function must be called shared or you will have unexpected problems. * @bug This will have unpredictable results when registering ammo types with the same name but different capitalisation. * @param {void} this - no description * @param {AmmoData} ammoData - The attributes of the ammo. See the @AmmoData structure. * @returns {void} **/ export function AddAmmoType(this: void, ammoData: AmmoData): void } declare namespace frame_blend { /** * * Returns amount of frames needed to render? * * @name frame_blend.RenderableFrames * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/RenderableFrames * @internal * @validate * @param {void} this - no description * @returns {number} - Amount of frames needed to render? **/ export function RenderableFrames(this: void): number /** * * Returns whether we should skip frame or not * * @name frame_blend.ShouldSkipFrame * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/ShouldSkipFrame * @param {void} this - no description * @returns {boolean} - Should the frame be skipped or not **/ export function ShouldSkipFrame(this: void): boolean /** * * Returns whether frame blend post processing effect is enabled or not. * * @name frame_blend.IsActive * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/IsActive * @param {void} this - no description * @returns {boolean} - Is frame blend enabled or not **/ export function IsActive(this: void): boolean /** * * Returns whether the current frame is the last frame? * * @name frame_blend.IsLastFrame * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/IsLastFrame * @internal * @validate * @param {void} this - no description * @returns {boolean} - Whether the current frame is the last frame? **/ export function IsLastFrame(this: void): boolean /** * * Renders the frame onto internal render target. * * @name frame_blend.CompleteFrame * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/CompleteFrame * @internal * @param {void} this - no description * @returns {void} **/ export function CompleteFrame(this: void): void /** * * Actually draws the frame blend effect. * * @name frame_blend.DrawPreview * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/DrawPreview * @internal * @param {void} this - no description * @returns {void} **/ export function DrawPreview(this: void): void /** * * Adds a frame to the blend. Calls @frame_blend.CompleteFrame once enough frames have passed since last @frame_blend.CompleteFrame call. * * @name frame_blend.AddFrame * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/AddFrame * @internal * @param {void} this - no description * @returns {void} **/ export function AddFrame(this: void): void /** * * Blends the frame(s). * * @name frame_blend.BlendFrame * @realm client * @wiki https://wiki.garrysmod.com/page/frame blend/BlendFrame * @internal * @param {void} this - no description * @returns {void} **/ export function BlendFrame(this: void): void } declare namespace file { /** * * Writes the given string to a file. Erases all previous data in the file. To add data without deleting previous data, use @file.Append. * * @name file.Write * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Write * @param {void} this - no description * @param {string} fileName - The name of the file being written into. The path is relative to the **data/ ** folder. * This argument will be forced lowercase. * The filename **must** end with one of the following: * * .txt * * .jpg * * .png * * .vtf * * .dat * * .json * Restricted symbols are: " :``` * @param {string} content - The content that will be written into the file. * @returns {void} **/ export function Write(this: void, fileName: string, content: string): void /** * * Returns when the file or folder was lasted modified in Unix time. * * @name file.Time * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Time * @param {void} this - no description * @param {string} path - The **file** or **folder** path. * @param {string} gamePath - The game path to be used. * * "GAME" Structured like base folder (garrysmod/), searches all the mounted content (main folder, addons, mounted games etc) * * "LUA" or "lsv" - All Lua folders (lua/) including gamesmodes and addons * * "DATA" Data folder (garrysmod/data) * * "MOD" Strictly the game folder (garrysmod/), ignores mounting. * @returns {number} - Seconds passed since Unix epoch. **/ export function Time(this: void, path: string, gamePath: string): number /** * * Returns the file's size in bytes. If the file is not found, returns -1. * * @name file.Size * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Size * @param {void} this - no description * @param {string} fileName - The file's name. * @param {string} path - The path type. * * "GAME" Structured like base folder (garrysmod/), searches all the mounted content (main folder, addons, mounted games etc) * * "LUA" or "lsv" - All Lua folders (lua/) including gamesmodes and addons * * "DATA" Data folder (garrysmod/data) * * "MOD" Strictly the game folder (garrysmod/), ignores mounting. * @returns {void} **/ export function Size(this: void, fileName: string, path: string): void /** * * Attempts to rename a file with the given name to another given name. * This function is constrained to the data/ folder. * * @name file.Rename * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Rename * @param {void} this - no description * @param {string} orignalFileName - The original file or folder name. See @file.Write for details on filename restrictions when writing to files. * This argument will be forced lowercase. * @param {string} targetFileName - The target file or folder name. See @file.Write for details on filename restrictions when writing to files. * This argument will be forced lowercase. * @returns {boolean} - True on success, false otherwise. **/ export function Rename(this: void, orignalFileName: string, targetFileName: string): boolean /** * * Returns the content of a file. * Beware of casing -- some filesystems are case-sensitive. SRCDS on Linux seems to force file/directory creation to lowercase, but will not modify read operations. * * @name file.Read * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Read * @param {void} this - no description * @param {string} fileName - The name of the file. * @param {string} path - The path used to look up the file. * * "GAME" Structured like base folder (garrysmod/), searches all the mounted content (main folder, addons, mounted games etc) * * "LUA" or "lsv" - All Lua folders (lua/) including gamesmodes and addons * * "DATA" Data folder (garrysmod/data) * * "MOD" Strictly the game folder (garrysmod/), ignores mounting. * It can also be a boolean: * * true = "GAME" * * false = "DATA" * @returns {string} - The data from the file as a string, or nil if the file isn't found **/ export function Read(this: void, fileName: string, path?: string): string /** * * Attempts to open a file with the given mode. * * @name file.Open * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Open * @param {void} this - no description * @param {string} fileName - The files name. See @file.Write for details on filename restrictions when writing to files. * @param {string} fileMode - The mode to open the file in. Possible values are: * * **r** - read mode * * **w** - write mode * * **a** - append mode * * **rb** - binary read mode * * **wb** - binary write mode * * **ab** - binary append mode * @param {string} path - The path type. See [File Search Paths](https://wiki.garrysmod.com/page/File%20Search%20Paths) * Common paths are: * * "GAME" - Structured like base folder (garrysmod/), searches all the mounted content (main folder, addons, mounted games etc) * * "LUA" or "lsv" - All Lua folders (lua/) including gamesmodes and addons * * "DATA" - Local to Data folder, has write access (garrysmod/data) * * "MOD" - Strictly the game folder (garrysmod/), ignores mounting. * @returns {File} - The opened file object, or nil if it failed to open due to it not existing or being used by another process. **/ export function Open(this: void, fileName: string, fileMode: string, path: string): File /** * * Returns whether the given file is a directory or not. * * @name file.IsDir * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/IsDir * @param {void} this - no description * @param {string} fileName - The file or directory's name. * @param {string} path - The path type. * @returns {boolean} - True if the given path is a directory or false if it is a file. **/ export function IsDir(this: void, fileName: string, path: string): boolean /** * * Returns a list of files and directories inside a single folder. * * @name file.Find * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Find * @param {void} this - no description * @param {string} name - The wildcard to search for. "models/ *.mdl" will list .mdl files in the models/ folder. * @param {string} path - The path to look for the files and directories in. See [this list](https://wiki.garrysmod.com/page/File_Search_Paths) for a list of valid paths. * @param {string} sorting - The sorting to be used, optional. * * "nameasc" sort the files ascending by name * * "namedesc" sort the files descending by name * * "dateasc" sort the files ascending by date * * "datedesc" sort the files descending by date * @returns {table} - A table of found files, or nil if the path is invalid * @returns {table} - A table of found directories, or nil if the path is invalid * @tupleReturn **/ export function Find(this: void, name: string, path: string, sorting?: string): [table, table] /** * * Returns a boolean of whether the file or directory exists or not. * * @name file.Exists * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Exists * @param {void} this - no description * @param {string} name - The file or directory's name. * @param {string} path - The path of where to look for the file. * * "GAME" Structured like base folder (garrysmod/), searches all the mounted content (main folder, addons, mounted games etc) * * "LUA" or "lsv" - All Lua folders (lua/) including gamesmodes and addons * * "DATA" Data folder (garrysmod/data) * * "MOD" Strictly the game folder (garrysmod/), ignores mounting. * @returns {boolean} - Returns true if the file exists and false if it is not. **/ export function Exists(this: void, name: string, path: string): boolean /** * * Creates a directory that is relative to the *data* folder. * * @name file.CreateDir * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/CreateDir * @param {void} this - no description * @param {string} name - The directory's name. * @returns {void} **/ export function CreateDir(this: void, name: string): void /** * * Deletes a file or *empty* folder that is relative to the **data** folder. * You can't remove any files outside of **data** folder. * * @name file.Delete * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Delete * @param {void} this - no description * @param {string} name - The file name * @returns {void} **/ export function Delete(this: void, name: string): void /** * * Appends a file relative to the *data* folder. * * @name file.Append * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/file/Append * @param {void} this - no description * @param {string} name - The file's name. * @param {string} content - The content which should be appended to the file. * @returns {void} **/ export function Append(this: void, name: string, content: string): void } declare namespace ents { /** * * Returns entity that has given @EntityFuncs:MapCreationID. * * @name ents.GetMapCreatedEntity * @realm server * @wiki https://wiki.garrysmod.com/page/ents/GetMapCreatedEntity * @param {void} this - no description * @param {number} id - Entity's creation id * @returns {Entity} - Found entity **/ export function GetMapCreatedEntity(this: void, id: number): Entity /** * * Returns the amount of networked entities, which is limited to 8192. @ents.Create will fail somewhere between 8064 and 8176 - this can vary based on the amount of existing temp ents. * * @name ents.GetEdictCount * @realm server * @wiki https://wiki.garrysmod.com/page/ents/GetEdictCount * @param {void} this - no description * @returns {number} - Number of networked entities **/ export function GetEdictCount(this: void): number /** * * Gives you the amount of currently existing entities. * Similar to #@ents.GetAll but with much better performance. * * @name ents.GetCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/GetCount * @param {void} this - no description * @param {boolean} IncludeKillMe - Include entities with the FL_KILLME flag. This will skip an internal loop, and the function will be more efficient as a byproduct. * @returns {number} - Number of entities **/ export function GetCount(this: void, IncludeKillMe?: boolean): number /** * * Returns an entity by its index. Same as @Entity function. * * @name ents.GetByIndex * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/GetByIndex * @param {void} this - no description * @param {number} entIdx - The index of the entity. * @returns {Entity} - The entity if it exists. **/ export function GetByIndex(this: void, entIdx: number): Entity /** * * Returns a table of all existing entities. * * @name ents.GetAll * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/GetAll * @param {void} this - no description * @returns {Entity[]} - Table of all existing @Entity types. **/ export function GetAll(this: void): Entity[] /** * * Fires a use event. * * @name ents.FireTargets * @realm server * @wiki https://wiki.garrysmod.com/page/ents/FireTargets * @param {void} this - no description * @param {string} target - Name of the target entity. * @param {Entity} activator - Activator of the event. * @param {Entity} caller - Caller of the event. * @param {USE} usetype - Use type. See the @USE enum. * @param {number} value - This value is passed to @EntityHooks:Use, but isn't used by any default entities in the engine. * @returns {void} **/ export function FireTargets(this: void, target: string, activator: Entity, caller: Entity, usetype: USE, value: number): void /** * * Gets all entities within the specified sphere. * * @name ents.FindInSphere * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindInSphere * @note Clientside entities will not be returned by this function. * @param {void} this - no description * @param {Vector} origin - Center of the sphere. * @param {number} radius - Radius of the sphere. * @returns {Entity[]} - A table of all found @Entity types. Has a limit of 1024 entities. **/ export function FindInSphere(this: void, origin: Vector, radius: number): Entity[] /** * * [2D visualization of the actual shape of the cone, click to enlarge](https://wiki.garrysmod.com/page/File:ents.FindInCone.png) * Finds and returns all entities within the specified cone. Only entities whose @EntityFuncs:WorldSpaceCenter is within the cone are considered to be in it. * The "cone" is actually a conical "slice" of an axis-aligned box (see: @ents.FindInBox). The image to the right shows approximately how this function would look in 2D. Due to this, the entity may be farther than the specified range! * * @name ents.FindInCone * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindInCone * @note Clientside entities will not be returned by this function. * @warning If there are more than 512 entities in the axis-aligned box around the origin, then the result may be incomplete! * @param {void} this - no description * @param {Vector} origin - The tip of the cone. * @param {Vector} normal - Direction of the cone. * @param {number} range - The range of the cone/box around the origin. * @param {number} angle_cos - The [cosine](https://wiki.garrysmod.com/page/math/cos) of the angle between the center of the cone to its edges, which is half the overall angle of the cone. * 1 makes a 0° cone, 0.707 makes approximately 90°, 0 makes 180°, and so on. * @returns {Entity[]} - A table of all found @Entity types. **/ export function FindInCone(this: void, origin: Vector, normal: Vector, range: number, angle_cos: number): Entity[] /** * * Finds all entities that lie within a [PVS](https://developer.valvesoftware.com/wiki/PVS). * * @name ents.FindInPVS * @realm server * @wiki https://wiki.garrysmod.com/page/ents/FindInPVS * @note The function won't take in to account @AddOriginToPVS function and the like. * @param {void} this - no description * @param {Entity | Vector} viewPoint - @Entity type or @Vector type to find entities within the PVS of. If a player is given, this function will use the player's view entity. * @returns {table} - The found @Entity types. **/ export function FindInPVS(this: void, viewPoint: Entity | Vector): table /** * * Returns all entities within the specified box. * * @name ents.FindInBox * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindInBox * @note Clientside entities will not be returned by this function. * @warning There is a limit of 512 entities for the output! * @param {void} this - no description * @param {Vector} boxMins - The box minimum coordinates. * @param {Vector} boxMaxs - The box maximum coordinates. * @returns {table} - A table of all found entities. **/ export function FindInBox(this: void, boxMins: Vector, boxMaxs: Vector): table /** * * Gets all entities with the given hammer targetname. This works internally by iterating over @ents.GetAll. * Doesn't do anything on client. * * @name ents.FindByName * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindByName * @note A player's Name is his nickname, see @Player:GetName * @param {void} this - no description * @param {string} name - The targetname to look for * @returns {table} - A table of all found entities **/ export function FindByName(this: void, name: string): table /** * * Gets all entities with the given model, supports wildcards. This works internally by iterating over @ents.GetAll. * * @name ents.FindByModel * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindByModel * @bug #2872 This currently only supports trailing asterisks (*) for wildcards. * @param {void} this - no description * @param {string} model - The model of the entities to find. * @returns {table} - A table of all found entities. **/ export function FindByModel(this: void, model: string): table /** * * Gets all entities with the given class, supports wildcards. This works internally by iterating over @ents.GetAll. Even if internally ents.GetAll is used, It is faster to use ents.FindByClass than ents.GetAll with a single class comparison. * * @name ents.FindByClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindByClass * @note Asterisks (*) are the only wildcard supported. * @param {void} this - no description * @param {string} cls - The class of the entities to find. * @returns {table} - A table containing all found entities **/ export function FindByClass(this: void, cls: string): table /** * * Finds all entities that are of given class and are children of given entity. This works internally by iterating over @ents.GetAll. * * @name ents.FindByClassAndParent * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindByClassAndParent * @param {void} this - no description * @param {string} cls - The class of entities to search for * @param {Entity} parent - Parent of entities that are being searched for * @returns {table} - A table of found entities or nil if none are found **/ export function FindByClassAndParent(this: void, cls: string, parent: Entity): table /** * * Returns a table of all entities along the ray. The ray does not stop on collisions, meaning it will go through walls/entities. * * @name ents.FindAlongRay * @realm client, server * @wiki https://wiki.garrysmod.com/page/ents/FindAlongRay * @param {void} this - no description * @param {Vector} start - The start position of the ray * @param {Vector} end - The end position of the ray * @param {Vector} mins - The mins corner of the ray * @param {Vector} maxs - The maxs corner of the ray * @returns {table} - Table of the found entities. **/ export function FindAlongRay(this: void, start: Vector, end: Vector, mins?: Vector, maxs?: Vector): table /** * * Creates an entity. This function will fail and return NULL if the networked-edict limit is hit (around 8176), or the provided entity class doesn't exist. * * @name ents.Create * @realm server * @wiki https://wiki.garrysmod.com/page/ents/Create * @warning Do not use before @GamemodeHooks:InitPostEntity has been called, otherwise the server will crash! * If you need to perform entity creation when the game starts, create a hook for @GamemodeHooks:InitPostEntity and do it there * @param {void} this - no description * @param {string} cls - The classname of the entity to create * @returns {Entity} - The created entity, or NULL if failed **/ export function Create(this: void, cls: string): Entity /** * * Creates a clientside only prop. See also @ClientsideModel function. * * @name ents.CreateClientProp * @realm client * @wiki https://wiki.garrysmod.com/page/ents/CreateClientProp * @warning Model must be precached with @util.PrecacheModel on the server before usage. * @bug #1387 Clientside entities are not garbage-collected, thus you must store a reference to the object and call @CSEnt:Remove manually. * @bug #3268 Projected textures do not work on clientside props under specific conditions (see [this explanation](https://github.com/Facepunch/garrysmod-issues/issues/3268#issuecomment-324821962)). * @param {void} this - no description * @param {string} model - The model for the entity to be created. * @returns {CSEnt} - Created entity. **/ export function CreateClientProp(this: void, model?: string): CSEnt /** * * Creates a clientside only scripted entity. The scripted entity must be of "anim" type. * * @name ents.CreateClientside * @realm client * @wiki https://wiki.garrysmod.com/page/ents/CreateClientside * @param {void} this - no description * @param {string} cls - The class name of the entity to create. * @returns {Entity} - Created entity. **/ export function CreateClientside(this: void, cls: string): Entity } declare namespace engine { /** * * Stores savedata into the game (can be loaded using the LoadGame menu) * * @name engine.WriteSave * @realm client * @wiki https://wiki.garrysmod.com/page/engine/WriteSave * @param {void} this - no description * @param {string} saveData - Data generated by gmsave.SaveMap * @param {string} name - Name the save will have. * @param {number} time - When the save was saved during the game (Put CurTime here) * @param {string} map - The map the save is used for. * @returns {void} **/ export function WriteSave(this: void, saveData: string, name: string, time: number, map: string): void /** * * Saves a duplication as a file. * * @name engine.WriteDupe * @realm client * @wiki https://wiki.garrysmod.com/page/engine/WriteDupe * @param {void} this - no description * @param {string} dupe - Dupe table, encoded by @util.TableToJSON and compressed by @util.Compress * @param {string} jpeg - The dupe icon, created by @render.Capture * @returns {void} **/ export function WriteDupe(this: void, dupe: string, jpeg: string): void /** * * Returns video recording settings set by @video.Record. Used by Demo-To-Video feature. * * @name engine.VideoSettings * @realm client * @wiki https://wiki.garrysmod.com/page/engine/VideoSettings * @param {void} this - no description * @returns {VideoData} - The video recording settings, see @VideoData structure. **/ export function VideoSettings(this: void): VideoData /** * * Returns the number of seconds between each gametick. * * @name engine.TickInterval * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/engine/TickInterval * @param {void} this - no description * @returns {number} - Number of seconds between each gametick. **/ export function TickInterval(this: void): number /** * * Sets the mounting options for mountable content. * * @name engine.SetMounted * @realm menu * @wiki https://wiki.garrysmod.com/page/engine/SetMounted * @param {void} this - no description * @param {string} depotID - The depot id of the game to mount. * @param {boolean} doMount - The mount state, true to mount, false to unmount * @returns {void} **/ export function SetMounted(this: void, depotID: string, doMount: boolean): void /** * * Returns an estimate of the server's performance. Equivalent to calling @FrameTime function from the server, according to source code. * * @name engine.ServerFrameTime * @realm client * @wiki https://wiki.garrysmod.com/page/engine/ServerFrameTime * @param {void} this - no description * @returns {number} - Frame time * @returns {number} - Server Framerate Std Deviation * @tupleReturn **/ export function ServerFrameTime(this: void): [number, number] /** * * Returns the number of ticks since the game server started. * * @name engine.TickCount * @realm client, server * @wiki https://wiki.garrysmod.com/page/engine/TickCount * @param {void} this - no description * @returns {number} - Number of ticks since the game server started. **/ export function TickCount(this: void): number /** * * Loads a duplication from the local filesystem. * * @name engine.OpenDupe * @realm client * @wiki https://wiki.garrysmod.com/page/engine/OpenDupe * @param {void} this - no description * @param {string} dupeName - Name of the file. e.g, engine.OpenDupe("dupes/8b809dd7a1a9a375e75be01cdc12e61f.dupe") * @returns {string} - Compressed dupeData. Use util.JSONToTable to make it into a format useable by the duplicator tool. **/ export function OpenDupe(this: void, dupeName: string): string /** * * This is a direct binding to the function “engine->LightStyle”. This function allows you to change the default light style of the map - so you can make lighting lighter or darker. You’ll need to call @render.RedownloadAllLightmaps clientside to refresh the lightmaps to this new color. * * @name engine.LightStyle * @realm server * @wiki https://wiki.garrysmod.com/page/engine/LightStyle * @bug #3626 Calling this function with arguments 0 and "a" will cause dynamic lights such as those produced by the Light tool to stop working. * @param {void} this - no description * @param {number} lightstyle - The lightstyle to edit. 0 to 63. If you want to edit map lighting, you want to set this to 0. * @param {string} pattern - The pattern to change the lightstyle to. "a" is the darkest, "z" is the brightest. You can use stuff like "abcxyz" to make flashing patterns. The normal brightness for a map is "m". Values over "z" are allowed, "~" for instance. * @returns {void} **/ export function LightStyle(this: void, lightstyle: number, pattern: string): void /** * * Returns true if the game is currently recording a demo file (.dem) using gm_demo * * @name engine.IsRecordingDemo * @realm client, menu * @wiki https://wiki.garrysmod.com/page/engine/IsRecordingDemo * @param {void} this - no description * @returns {boolean} - Whether the game is currently recording a demo or not. **/ export function IsRecordingDemo(this: void): boolean /** * * Returns true if we're currently playing a demo. * You will notice that there's no server-side version of this. That's because there is no server when playing a demo. Demos are both recorded and played back purely clientside. * * @name engine.IsPlayingDemo * @realm client, menu * @wiki https://wiki.garrysmod.com/page/engine/IsPlayingDemo * @param {void} this - no description * @returns {boolean} - Whether the game is currently playing a demo or not. **/ export function IsPlayingDemo(this: void): boolean /** * * Returns the UGC (demos, saves and dupes) the player have subscribed to on the workshop. * * @name engine.GetUserContent * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/engine/GetUserContent * @param {void} this - no description * @returns {table} - Returns a table with 6 keys (title, type, tags, wsid, timeadded) **/ export function GetUserContent(this: void): table /** * * Returns an array of tables corresponding to all games from which Garry's Mod supports mounting content. * * @name engine.GetGames * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/engine/GetGames * @param {void} this - no description * @returns {table[]} - A table of tables containing all mountable games **/ export function GetGames(this: void): table[] /** * * Returns a table containing info for all installed gamemodes * * @name engine.GetGamemodes * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/engine/GetGamemodes * @param {void} this - no description * @returns {table} - gamemodes **/ export function GetGamemodes(this: void): table /** * * Returns time scale of demo playback. * If not during demo playback, returns 1. * * @name engine.GetDemoPlaybackTimeScale * @realm client, menu * @wiki https://wiki.garrysmod.com/page/engine/GetDemoPlaybackTimeScale * @param {void} this - no description * @returns {number} - The time scale of demo playback, value of demo_timescale console variable. **/ export function GetDemoPlaybackTimeScale(this: void): number /** * * Returns total amount of ticks of currently loaded demo. * If not playing a demo, returns 0 or the value of last played demo. * * @name engine.GetDemoPlaybackTotalTicks * @realm client, menu * @wiki https://wiki.garrysmod.com/page/engine/GetDemoPlaybackTotalTicks * @param {void} this - no description * @returns {number} - Total amount of ticks of currently loaded demo. **/ export function GetDemoPlaybackTotalTicks(this: void): number /** * * Current tick of currently loaded demo. * If not playing a demo, it will return amount of ticks since last demo playback. * * @name engine.GetDemoPlaybackTick * @realm client, menu * @wiki https://wiki.garrysmod.com/page/engine/GetDemoPlaybackTick * @param {void} this - no description * @returns {number} - The amount of ticks of currently loaded demo. **/ export function GetDemoPlaybackTick(this: void): number /** * * When starting playing a demo, @engine.GetDemoPlaybackTick will be reset and its old value will be added to this functions return value. * * @name engine.GetDemoPlaybackStartTick * @realm client, menu * @wiki https://wiki.garrysmod.com/page/engine/GetDemoPlaybackStartTick * @param {void} this - no description * @returns {number} - no description **/ export function GetDemoPlaybackStartTick(this: void): number /** * * Returns a list of addons the player have subscribed to on the workshop. * This list will also include "Floating" .gma addons that are mounted by the game, but not the folder addons. * * @name engine.GetAddons * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/engine/GetAddons * @param {void} this - no description * @returns {table} - A table with 6 keys (downloaded, models, title, file, mounted, wsid) **/ export function GetAddons(this: void): table /** * * Closes the server and completely exits. * This is only functional when running in server test mode (launch option -systemtest). Server test mode is used internally at Facepunch as part of the build process to make sure that the dedicated servers aren't crashing on startup. * * @name engine.CloseServer * @realm server * @wiki https://wiki.garrysmod.com/page/engine/CloseServer * @param {void} this - no description * @returns {void} **/ export function CloseServer(this: void): void /** * * Returns the name of the currently running gamemode. * * @name engine.ActiveGamemode * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/engine/ActiveGamemode * @bug #1988 This will return the incorrect gamemode name on the client if used too early. * @param {void} this - no description * @returns {string} - The active gamemode's name. This is the name of the gamemode's folder. **/ export function ActiveGamemode(this: void): string } declare namespace effects { /** * * Registers a new effect. * * @name effects.Register * @realm client * @wiki https://wiki.garrysmod.com/page/effects/Register * @internal * @param {void} this - no description * @param {table} effect_table - Effect table. * @param {string} name - Effect name. * @returns {void} **/ export function Register(this: void, effect_table: table, name: string): void /** * * Returns the table of the effect specified. * * @name effects.Create * @realm client * @wiki https://wiki.garrysmod.com/page/effects/Create * @internal You are looking for @util.Effect. * @param {void} this - no description * @param {string} name - Effect name. * @returns {table} - Effect table. **/ export function Create(this: void, name: string): table } declare namespace duplicator { /** * @type duplicatorRegisterBoneModifierBoneModifier * @param {void} this - no description * @param {Player} ply - no description * @param {Entity} ent - no description * @param {number} boneID - no description * @param {PhysObj} bone - no description * @param {table} data - no description **/ type duplicatorRegisterBoneModifierBoneModifier = (this: void, ply: Player, ent: Entity, boneID: number, bone: PhysObj, data: table) => unknown /** * * "Work out the AABB size" * * @name duplicator.WorkoutSize * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/WorkoutSize * @param {void} this - no description * @param {table} Ents - A table of entity duplication datums. * @returns {void} **/ export function WorkoutSize(this: void, Ents: table): void /** * * Stores an entity modifier into an entity for saving * * @name duplicator.StoreEntityModifier * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/StoreEntityModifier * @param {void} this - no description * @param {Entity} entity - The entity to store modifier in * @param {string} name - Unique modifier name as defined in @duplicator.RegisterEntityModifier * @param {table} data - Modifier data * @returns {void} **/ export function StoreEntityModifier(this: void, entity: Entity, name: string, data: table): void /** * * Stores bone mod data for a registered bone modification function * * @name duplicator.StoreBoneModifier * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/StoreBoneModifier * @param {void} this - no description * @param {Entity} ent - The entity to add bone mod data to * @param {number} boneID - The bone ID. * See @EntityFuncs:GetPhysicsObjectNum * @param {any} key - The key for the bone modification * @param {table} data - The bone modification data that is passed to the bone modification function * @returns {void} **/ export function StoreBoneModifier(this: void, ent: Entity, boneID: number, key: any, data: table): void /** * * "When a copy is copied it will be translated according to these. * If you set them - make sure to set them back to 0 0 0!" * * @name duplicator.SetLocalPos * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/SetLocalPos * @param {void} this - no description * @param {Vector} v - The position to offset all pastes from * @returns {void} **/ export function SetLocalPos(this: void, v: Vector): void /** * * Help to remove certain map created entities before creating the saved entities * This is obviously so we don't get duplicate props everywhere. * It should be called before calling Paste. * * @name duplicator.RemoveMapCreatedEntities * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/RemoveMapCreatedEntities * @param {void} this - no description * @returns {void} **/ export function RemoveMapCreatedEntities(this: void): void /** * * "When a copy is copied it will be translated according to these. * If you set them - make sure to set them back to 0 0 0!" * * @name duplicator.SetLocalAng * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/SetLocalAng * @param {void} this - no description * @param {Angle} v - The angle to offset all pastes from * @returns {void} **/ export function SetLocalAng(this: void, v: Angle): void /** * * This allows you to specify a specific function to be run when your SENT is pasted with the duplicator, instead of relying on the generic automatic functions. * * @name duplicator.RegisterEntityClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/RegisterEntityClass * @note Automatically calls @duplicator.Allow for the entity class. * @param {void} this - no description * @param {string} name - The ClassName of the entity you wish to register a factory for * @param {function} func - The factory function you want to have called. It should have the arguments (Player, ...) where ... is whatever arguments you request to be passed. * @param {any[]} ...args - Strings of the names of arguments you want passed to function the from the @EntityCopyData structure. As a special case, "Data" will pass the whole structure. * @returns {void} **/ export function RegisterEntityClass(this: void, name: string, func: UnknownFunc, ...args: any[]): void /** * * This allows you to register tweaks to entities. For instance, if you were making an "unbreakable" addon, you would use this to enable saving the "unbreakable" state of entities between duplications. * This function registers a piece of generic code that is run on all entities with this modifier. In order to have it actually run, use @duplicator.StoreEntityModifier. * This function does nothing when run clientside. * * @name duplicator.RegisterEntityModifier * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/RegisterEntityModifier * @param {void} this - no description * @param {string} name - An identifier for your modification. This is not limited, so be verbose. "Person's 'Unbreakable' mod" is far less likely to cause conflicts than "unbreakable" * @param {function} func - The function to be called for your modification. It should have the arguments (Player, Entity, Data), where data is what you pass to @duplicator.StoreEntityModifier. * @returns {void} **/ export function RegisterEntityModifier(this: void, name: string, func: UnknownFunc): void /** * * Register a function used for creating a duplicated constraint. * * @name duplicator.RegisterConstraint * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/RegisterConstraint * @param {void} this - no description * @param {string} name - The unique name of new constraint * @param {function} callback - Function to be called when this constraint is created * @param {any} ...args - Arguments passed to the callback function * @returns {void} **/ export function RegisterConstraint(this: void, name: string, callback: UnknownFunc, ...args: any): void /** * * Registers a function to be called on each of an entity's bones when @duplicator.ApplyBoneModifiers is called. * * @name duplicator.RegisterBoneModifier * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/RegisterBoneModifier * @note This function is available to call on the client, but registered functions aren't used anywhere! * @param {void} this - no description * @param {any} key - The type of the key doesn't appear to matter, but it is preferable to use a string. * @param {function} boneModifier - Function called on each bone that an ent has. Called during @duplicator.ApplyBoneModifiers. * Function parameters are: * The data table that is passed to boneModifier is set with @duplicator.StoreBoneModifier * @returns {void} **/ export function RegisterBoneModifier(this: void, key: any, boneModifier: duplicatorRegisterBoneModifierBoneModifier): void /** * * "Given entity list and constraint list, create all entities and return their tables" * Calls @duplicator.CreateEntityFromTable on each sub-table of EntityList. If an entity is actually created, it calls @EntityHooks:OnDuplicated with the entity's duplicator data, then @duplicator.ApplyEntityModifiers, @duplicator.ApplyBoneModifiers and finally @EntityHooks:PostEntityPaste is called. * The constraints are then created with @duplicator.CreateConstraintFromTable. * * @name duplicator.Paste * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/Paste * @param {void} this - no description * @param {Player} Player - The player who wants to create something * @param {table} EntityList - A table of duplicator data to create the entities from * @param {table} ConstraintList - A table of duplicator data to create the constraints from * @returns {table} - List of created entities * @returns {table} - List of created constraints * @tupleReturn **/ export function Paste(this: void, Player: Player, EntityList: table, ConstraintList: table): [table, table] /** * * Returns whether the entity can be duplicated or not * * @name duplicator.IsAllowed * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/IsAllowed * @param {void} this - no description * @param {string} classname - An entity's classname * @returns {boolean} - Returns true if the entity can be duplicated (nil otherwise) **/ export function IsAllowed(this: void, classname: string): boolean /** * * "Generic function for duplicating stuff" * This is called when @duplicator.CreateEntityFromTable can't find an entity factory to build with. It calls @duplicator.DoGeneric and @duplicator.DoGenericPhysics to apply standard duplicator stored things such as the model and position. * * @name duplicator.GenericDuplicatorFunction * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/GenericDuplicatorFunction * @param {void} this - no description * @param {Player} ply - The player who wants to create something * @param {table} data - The duplication data to build the entity with * @returns {Entity} - The newly created entity **/ export function GenericDuplicatorFunction(this: void, ply: Player, data: table): Entity /** * * Fills entStorageTable with all of the entities in a group connected with constraints. Fills constraintStorageTable with all of the constrains constraining the group. * * @name duplicator.GetAllConstrainedEntitiesAndConstraints * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/GetAllConstrainedEntitiesAndConstraints * @internal * @param {void} this - no description * @param {Entity} ent - The entity to start from * @param {table} entStorageTable - The table the entities will be inserted into * @param {table} constraintStorageTable - The table the constraints will be inserted into * @returns {table} - entStorageTable * @returns {table} - constraintStorageTable * @tupleReturn **/ export function GetAllConstrainedEntitiesAndConstraints(this: void, ent: Entity, entStorageTable: table, constraintStorageTable: table): [table, table] /** * * Returns the entity class factory registered with @duplicator.RegisterEntityClass. * * @name duplicator.FindEntityClass * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/FindEntityClass * @param {void} this - no description * @param {string} name - The name of the entity class factory * @returns {IduplicatorFindEntityClassReturn} - Is compromised of the following members: **/ export function FindEntityClass(this: void, name: string): IduplicatorFindEntityClassReturn /** * * "Applies bone data, generically." * If data contains a PhysicsObjects table, it moves, re-angles and if relevent freezes all specified bones, first converting from local coordinates to world coordinates. * * @name duplicator.DoGenericPhysics * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/DoGenericPhysics * @param {void} this - no description * @param {Entity} ent - The entity to be applied upon * @param {Player} ply - The player who owns the entity. Unused in function as of early 2013 * @param {table} data - The data to be applied onto the entity * @returns {void} **/ export function DoGenericPhysics(this: void, ent: Entity, ply?: Player, data: table): void /** * * "Applies generic every-day entity stuff for ent from table data." * Depending on the values of Model, Angle, Pos, Skin, Flex, Bonemanip, ModelScale, ColGroup, Name, and BodyG (@table type of multiple values) in the data table, this calls @EntityFuncs:SetModel, @EntityFuncs:SetAngles, @EntityFuncs:SetPos, @EntityFuncs:SetSkin, @duplicator.DoFlex, @duplicator.DoBoneManipulator, @EntityFuncs:SetModelScale, @EntityFuncs:SetCollisionGroup, @EntityFuncs:SetName, @EntityFuncs:SetBodygroup on ent. * If ent has a RestoreNetworkVars function, it is called with data.DT. * * @name duplicator.DoGeneric * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/DoGeneric * @param {void} this - no description * @param {Entity} ent - The entity to be applied upon * @param {table} data - The data to be applied onto the entity * @returns {void} **/ export function DoGeneric(this: void, ent: Entity, data: table): void /** * * Restores the flex data using @EntityFuncs:SetFlexWeight and @EntityFuncs:SetFlexScale * * @name duplicator.DoFlex * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/DoFlex * @param {void} this - no description * @param {Entity} ent - The entity to restore the flexes on * @param {table} flex - The flexes to restore * @param {number} scale - The flex scale to apply. (Flex scale is unchanged if omitted) * @returns {void} **/ export function DoFlex(this: void, ent: Entity, flex: table, scale?: number): void /** * * "Restores the bone's data." * Loops through Bones and calls @EntityFuncs:ManipulateBoneScale, @EntityFuncs:ManipulateBoneAngles and @EntityFuncs:ManipulateBonePosition on ent with the table keys and the subtable values s, a and p respectively. * * @name duplicator.DoBoneManipulator * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/DoBoneManipulator * @param {void} this - no description * @param {Entity} ent - The entity to be bone manipulated * @param {BoneManipulationData} bones - Table with a @BoneManipulationData structure for every bone (that has manipulations applied) using the bone ID as the table index. * @returns {void} **/ export function DoBoneManipulator(this: void, ent: Entity, bones: BoneManipulationData): void /** * * "Create an entity from a table." * This creates an entity using the data in EntTable. * If an entity factory has been registered for the entity's Class, it will be called. * Otherwise, @duplicator.GenericDuplicatorFunction will be called instead. * * @name duplicator.CreateEntityFromTable * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/CreateEntityFromTable * @param {void} this - no description * @param {Player} ply - The player who wants to create something * @param {EntityCopyData} entTable - The duplication data to build the entity with. See @EntityCopyData structure * @returns {Entity} - The newly created entity **/ export function CreateEntityFromTable(this: void, ply: Player, entTable: EntityCopyData): Entity /** * * Creates a constraint from a saved/copied constraint table. * * @name duplicator.CreateConstraintFromTable * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/CreateConstraintFromTable * @internal * @param {void} this - no description * @param {table} constraint - Saved/copied constraint table * @param {table} entityList - The list of entities that are to be constrained * @returns {Entity} - The newly created constraint entity **/ export function CreateConstraintFromTable(this: void, constraint: table, entityList: table): Entity /** * * Returns a table with some entity data that can be used to create a new entity with @duplicator.CreateEntityFromTable * * @name duplicator.CopyEntTable * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/CopyEntTable * @param {void} this - no description * @param {Entity} ent - The entity table to save * @returns {EntityCopyData} - See @EntityCopyData structure **/ export function CopyEntTable(this: void, ent: Entity): EntityCopyData /** * * Copies the passed table of entities to save for later. * * @name duplicator.CopyEnts * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/CopyEnts * @param {void} this - no description * @param {table} ents - A table of entities to save/copy. * @returns {IduplicatorCopyEntsReturn} - A table containing duplication info which includes the following members: **/ export function CopyEnts(this: void, ents: table): IduplicatorCopyEntsReturn /** * * Copies the entity, and all of its constraints and entities, then returns them in a table. * * @name duplicator.Copy * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/Copy * @param {void} this - no description * @param {Entity} ent - The entity to duplicate. The function will automatically copy all constrained entities. * @param {table} tableToAdd - A preexisting table to add entities and constraints in from. * Uses the same table format as the table returned from this function. * @returns {IduplicatorCopyReturn} - A table containing duplication info which includes the following members: * The values of Mins & Maxs from the table are returned from @duplicator.WorkoutSize **/ export function Copy(this: void, ent: Entity, tableToAdd?: table): IduplicatorCopyReturn /** * * Clears/removes the chosen entity modifier from the entity. * * @name duplicator.ClearEntityModifier * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/ClearEntityModifier * @param {void} this - no description * @param {Entity} ent - The entity the modification is stored on * @param {any} key - The key of the stored entity modifier * @returns {void} **/ export function ClearEntityModifier(this: void, ent: Entity, key: any): void /** * * Calls every function registered with @duplicator.RegisterEntityModifier on the entity. * * @name duplicator.ApplyEntityModifiers * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/ApplyEntityModifiers * @param {void} this - no description * @param {Player} ply - The player whose entity this is * @param {Entity} ent - The entity in question * @returns {void} **/ export function ApplyEntityModifiers(this: void, ply: Player, ent: Entity): void /** * * Allow this entity to be duplicated * * @name duplicator.Allow * @realm client, server * @wiki https://wiki.garrysmod.com/page/duplicator/Allow * @param {void} this - no description * @param {string} classname - An entity's classname * @returns {void} **/ export function Allow(this: void, classname: string): void /** * * Calls every function registered with @duplicator.RegisterBoneModifier on each bone the ent has. * * @name duplicator.ApplyBoneModifiers * @realm server * @wiki https://wiki.garrysmod.com/page/duplicator/ApplyBoneModifiers * @param {void} this - no description * @param {Player} ply - The player whose entity this is * @param {Entity} ent - The entity in question * @returns {void} **/ export function ApplyBoneModifiers(this: void, ply: Player, ent: Entity): void interface IduplicatorFindEntityClassReturn { /** * Func - {function}: The function that creates the entity **/ Func: UnknownFunc /** * Args - {table}: Arguments to pass to the function **/ Args: table } interface IduplicatorCopyEntsReturn { /** * Entities - {table}: no description **/ Entities: table /** * Constraints - {table}: no description **/ Constraints: table /** * Mins - {Vector}: no description **/ Mins: Vector /** * Maxs - {Vector}: no description **/ Maxs: Vector } interface IduplicatorCopyReturn { /** * Entities - {table}: no description **/ Entities: table /** * Constraints - {table}: no description **/ Constraints: table /** * Mins - {Vector}: no description **/ Mins: Vector /** * Maxs - {Vector}: no description **/ Maxs: Vector } } declare namespace drive { /** * * The user command is received by the server and then converted into a move. This is also run clientside when in multiplayer, for prediction to work. * * @name drive.StartMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/StartMove * @internal * @param {void} this - no description * @param {Player} ply - The player * @param {CMoveData} mv - The move data * @param {CUserCmd} cmd - The user command * @returns {boolean} - true if succeeded **/ export function StartMove(this: void, ply: Player, mv: CMoveData, cmd: CUserCmd): boolean /** * * Called when the player first starts driving this entity * * @name drive.Start * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/Start * @param {void} this - no description * @param {Player} ply - The player * @param {Entity} ent - The entity * @returns {void} **/ export function Start(this: void, ply: Player, ent: Entity): void /** * * Registers a new entity drive. * * @name drive.Register * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/Register * @param {void} this - no description * @param {string} name - The name of the drive. * @param {table} data - The data required to create the drive. This includes the functions used by the drive. * @param {string} base - The base of the drive. * @returns {void} **/ export function Register(this: void, name: string, data: table, base: string): void /** * * Stops the player from driving anything. ( For example a prop in sandbox ) * * @name drive.PlayerStopDriving * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/PlayerStopDriving * @param {void} this - no description * @param {Player} ply - The player to affect * @returns {void} **/ export function PlayerStopDriving(this: void, ply: Player): void /** * * Starts driving for the player. * * @name drive.PlayerStartDriving * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/PlayerStartDriving * @param {void} this - no description * @param {Player} ply - The player to affect * @param {Entity} ent - The entity to drive * @param {string} mode - The driving mode * @returns {void} **/ export function PlayerStartDriving(this: void, ply: Player, ent: Entity, mode: string): void /** * * The move is executed here. * * @name drive.Move * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/Move * @internal * @param {void} this - no description * @param {Player} ply - The player * @param {CMoveData} mv - The move data * @returns {boolean} - true if succeeded **/ export function Move(this: void, ply: Player, mv: CMoveData): boolean /** * * Returns ( or creates if inexistent ) a driving method. * * @name drive.GetMethod * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/GetMethod * @internal * @param {void} this - no description * @param {Player} ply - The player * @returns {table} - A method object. **/ export function GetMethod(this: void, ply: Player): table /** * * The move is finished. Copy mv back into the target. * * @name drive.FinishMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/FinishMove * @internal * @param {void} this - no description * @param {Player} ply - The player * @param {CMoveData} mv - The move data * @returns {boolean} - true if succeeded **/ export function FinishMove(this: void, ply: Player, mv: CMoveData): boolean /** * * Player has stopped driving the entity. * * @name drive.End * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/End * @param {void} this - no description * @param {Player} ply - The player * @param {Entity} ent - The entity * @returns {void} **/ export function End(this: void, ply: Player, ent: Entity): void /** * * Destroys players current driving method. * * @name drive.DestroyMethod * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/DestroyMethod * @internal * @param {void} this - no description * @param {Player} ply - The player to affect * @returns {void} **/ export function DestroyMethod(this: void, ply: Player): void /** * * Clientside, the client creates the cmd (usercommand) from their input device (mouse, keyboard) and then it's sent to the server. Restrict view angles here. * * @name drive.CreateMove * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/CreateMove * @internal * @param {void} this - no description * @param {CUserCmd} cmd - The user command * @returns {boolean} - true if succeeded **/ export function CreateMove(this: void, cmd: CUserCmd): boolean /** * * Optionally alter the view. * * @name drive.CalcView * @realm client, server * @wiki https://wiki.garrysmod.com/page/drive/CalcView * @internal * @param {void} this - no description * @param {Player} ply - The player * @param {ViewData} view - The view, see @ViewData structure * @returns {boolean} - true if succeeded **/ export function CalcView(this: void, ply: Player, view: ViewData): boolean } declare namespace draw { /** * * Draws a rounded box with text in it. * * @name draw.WordBox * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/WordBox * @rendering function:2d * @param {void} this - no description * @param {number} bordersize - Size of border, should be multiple of 2. Ideally this will be 8 or 16. * @param {number} x - The X Coordinate. * @param {number} y - The Y Coordinate. * @param {string} text - Text to draw. * @param {string} font - Font to draw in. See @surface.CreateFont to create your own, or [here](https://wiki.garrysmod.com/page/Default_Fonts) for a list of default fonts. * @param {Color} boxcolor - The box color. Uses the @IColor structure. * @param {Color} textcolor - The text color. Uses the @IColor structure. * @returns {number} - The width of the word box. * @returns {number} - The height of the word box. * @tupleReturn **/ export function WordBox(this: void, bordersize: number, x: number, y: number, text: string, font: string, boxcolor: Color, textcolor: Color): [number, number] /** * * Draws a texture with a table structure. * * @name draw.TexturedQuad * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/TexturedQuad * @rendering function:2d * @param {void} this - no description * @param {TextureData} texturedata - The texture properties. See @TextureData structure * @returns {void} **/ export function TexturedQuad(this: void, texturedata: TextureData): void /** * * Works like @draw.Text, but draws the text as a shadow. * * @name draw.TextShadow * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/TextShadow * @rendering function:2d * @param {void} this - no description * @param {TextData} textdata - The text properties. See @TextData structure * @param {number} distance - How far away the shadow appears. * @param {number} alpha - How visible the shadow is (0-255). * @returns {void} **/ export function TextShadow(this: void, textdata: TextData, distance: number, alpha?: number): void /** * * Works like @draw.SimpleText but uses a table structure instead. * * @name draw.Text * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/Text * @rendering function:2d * @param {void} this - no description * @param {TextData} textdata - The text properties. See the @TextData structure * @returns {number} - Width of drawn text * @returns {number} - Height of drawn text * @tupleReturn **/ export function Text(this: void, textdata: TextData): [number, number] /** * * Draws text on the screen. * * @name draw.SimpleText * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/SimpleText * @rendering function:2d * @param {void} this - no description * @param {string} text - The text to be drawn. * @param {string} font - The font. See @surface.CreateFont to create your own, or see [Default Fonts](https://wiki.garrysmod.com/page/Default%20Fonts) for a list of default fonts. * @param {number} x - The X Coordinate. * @param {number} y - The Y Coordinate. * @param {Color} color - The color of the text. Uses the @IColor structure. * @param {TEXT_ALIGN} xAlign - The alignment of the X coordinate using @TEXT_ALIGN enum. * @param {TEXT_ALIGN} yAlign - The alignment of the Y coordinate using @TEXT_ALIGN enum. * @returns {number} - The width of the text. Same value as if you were calling @surface.GetTextSize. * @returns {number} - The height of the text. Same value as if you were calling @surface.GetTextSize. * @tupleReturn **/ export function SimpleText(this: void, text: string, font?: string, x?: number, y?: number, color?: Color, xAlign?: TEXT_ALIGN, yAlign?: TEXT_ALIGN): [number, number] /** * * Creates a simple line of text that is outlined. * * @name draw.SimpleTextOutlined * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/SimpleTextOutlined * @rendering function:2d * @param {void} this - no description * @param {string} Text - The text to draw. * @param {string} font - The font name to draw with. See @surface.CreateFont to create your own, or [here](https://wiki.garrysmod.com/page/Default_Fonts) for a list of default fonts. * @param {number} x - The X Coordinate. * @param {number} y - The Y Coordinate. * @param {Color} color - The color of the text. Uses the @IColor structure. * @param {TEXT_ALIGN} xAlign - The alignment of the X Coordinate using @TEXT_ALIGN enum. * @param {TEXT_ALIGN} yAlign - The alignment of the Y Coordinate using @TEXT_ALIGN enum. * @param {number} outlinewidth - Width of the outline. * @param {Color} outlinecolor - Color of the outline. Uses the @IColor structure. * @returns {number} - The width of the text. Same value as if you were calling @surface.GetTextSize. * @returns {number} - The height of the text. Same value as if you were calling @surface.GetTextSize. * @tupleReturn **/ export function SimpleTextOutlined(this: void, Text: string, font?: string, x?: number, y?: number, color?: Color, xAlign?: TEXT_ALIGN, yAlign?: TEXT_ALIGN, outlinewidth: number, outlinecolor?: Color): [number, number] /** * * Draws a rounded rectangle. This function also lets you specify which corners are drawn rounded. * * @name draw.RoundedBoxEx * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/RoundedBoxEx * @rendering function:2d * @param {void} this - no description * @param {number} cornerRadius - Radius of the rounded corners, works best with a power of 2 number. * @param {number} x - The x coordinate of the top left of the rectangle. * @param {number} y - The y coordinate of the top left of the rectangle. * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * @param {Color} color - The color to fill the rectangle with. Uses the @IColor structure. * @param {boolean} roundTopLeft - Whether the top left corner should be rounded. * @param {boolean} roundTopRight - Whether the top right corner should be rounded. * @param {boolean} roundBottomLeft - Whether the bottom left corner should be rounded. * @param {boolean} roundBottomRight - Whether the bottom right corner should be rounded. * @returns {void} **/ export function RoundedBoxEx(this: void, cornerRadius: number, x: number, y: number, width: number, height: number, color: Color, roundTopLeft?: boolean, roundTopRight?: boolean, roundBottomLeft?: boolean, roundBottomRight?: boolean): void /** * * Draws a rounded rectangle. * * @name draw.RoundedBox * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/RoundedBox * @rendering function:2d * @note If you intend to draw a non-rounded rectangle, then it's more efficient to use @surface.DrawRect. * @param {void} this - no description * @param {number} cornerRadius - Radius of the rounded corners, works best with a multiple of 2. * @param {number} x - The x coordinate of the top left of the rectangle. * @param {number} y - The y coordinate of the top left of the rectangle. * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * @param {Color} color - The color to fill the rectangle with. Uses the @IColor structure. * @returns {void} **/ export function RoundedBox(this: void, cornerRadius: number, x: number, y: number, width: number, height: number, color: Color): void /** * * Sets drawing texture to a default white texture (vgui/white) via @surface.SetMaterial. Useful for resetting the drawing texture. * * @name draw.NoTexture * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/NoTexture * @rendering function:2d * @param {void} this - no description * @returns {void} **/ export function NoTexture(this: void): void /** * * Returns the height of the specified font in pixels. * * @name draw.GetFontHeight * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/GetFontHeight * @rendering function:2d * @param {void} this - no description * @param {string} font - Name of the font to get the height of. * @returns {number} - The font height **/ export function GetFontHeight(this: void, font: string): number /** * * Simple draw text at position, but this will expand newlines and tabs. * See also @MarkupObject type for limited width and markup support. * * @name draw.DrawText * @realm client, menu * @wiki https://wiki.garrysmod.com/page/draw/DrawText * @rendering function:2d * @param {void} this - no description * @param {string} text - Text to be drawn. * @param {string} font - Name of font to draw the text in. See @surface.CreateFont to create your own, or [Default Fonts](https://wiki.garrysmod.com/page/Default%20Fonts) for a list of default fonts. * @param {number} x - The X Coordinate. * @param {number} y - The Y Coordinate. * @param {Color} color - Color to draw the text in. Uses the @IColor structure. * @param {TEXT_ALIGN} xAlign - Where to align the text horizontally. Uses the @TEXT_ALIGN enum. * @returns {void} **/ export function DrawText(this: void, text: string, font?: string, x?: number, y?: number, color?: Color, xAlign?: TEXT_ALIGN): void } declare namespace dragndrop { /** * * Updates the receiver to drop the panels onto. Called from @dragndrop.Think. * * @name dragndrop.UpdateReceiver * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/UpdateReceiver * @internal * @param {void} this - no description * @returns {void} **/ export function UpdateReceiver(this: void): void /** * * Handles all the drag'n'drop processes. Calls @dragndrop.UpdateReceiver and @dragndrop.HoverThink. * * @name dragndrop.Think * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/Think * @internal * @param {void} this - no description * @returns {void} **/ export function Think(this: void): void /** * * Starts the drag'n'drop. * * @name dragndrop.StartDragging * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/StartDragging * @internal * @param {void} this - no description * @returns {void} **/ export function StartDragging(this: void): void /** * * Stops the drag'n'drop and calls @dragndrop.Clear. * * @name dragndrop.StopDragging * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/StopDragging * @param {void} this - no description * @returns {void} **/ export function StopDragging(this: void): void /** * * Returns whether the user is dragging something with the drag'n'drop system. * * @name dragndrop.IsDragging * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/IsDragging * @param {void} this - no description * @returns {boolean} - True if the user is dragging something with the drag'n'drop system. **/ export function IsDragging(this: void): boolean /** * * Handles the hover think. Called from @dragndrop.Think. * * @name dragndrop.HoverThink * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/HoverThink * @internal * @param {void} this - no description * @returns {void} **/ export function HoverThink(this: void): void /** * * Returns a table of currently dragged panels. * * @name dragndrop.GetDroppable * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/GetDroppable * @param {void} this - no description * @param {string} name - If set, the function will return only the panels with this @Panel:Droppable name. * @returns {table} - A table of all panels that are being currently dragged, if any. **/ export function GetDroppable(this: void, name?: string): table /** * * Handles the drop action of drag'n'drop library. * * @name dragndrop.Drop * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/Drop * @internal * @param {void} this - no description * @returns {void} **/ export function Drop(this: void): void /** * * If returns true, calls @dragndrop.StopDragging in @dragndrop.Drop. Seems to be broken and does nothing. Is it for override? * * @name dragndrop.HandleDroppedInGame * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/HandleDroppedInGame * @param {void} this - no description * @returns {void} **/ export function HandleDroppedInGame(this: void): void /** * * Clears all the internal drag'n'drop variables. * * @name dragndrop.Clear * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/Clear * @param {void} this - no description * @returns {void} **/ export function Clear(this: void): void /** * * Calls the receiver function of hovered panel. * * @name dragndrop.CallReceiverFunction * @realm client, menu * @wiki https://wiki.garrysmod.com/page/dragndrop/CallReceiverFunction * @internal * @param {void} this - no description * @param {boolean} bDoDrop - true if the mouse was released, false if we right clicked. * @param {number} command - The command value. This should be the ID of the clicked dropdown menu ( if right clicked, or nil ) * @param {number} mx - The local to the panel mouse cursor X position when the click happened. * @param {number} my - The local to the panel mouse cursor Y position when the click happened. * @returns {void} **/ export function CallReceiverFunction(this: void, bDoDrop: boolean, command: number, mx: number, my: number): void } declare namespace derma { /** * * Returns a function to draw a specified texture of panels skin. * * @name derma.SkinTexture * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/SkinTexture * @param {void} this - no description * @param {string} name - The identifier of the texture * @param {Panel} pnl - Panel to get the skin of. * @param {any} fallback - What to return if we failed to retrieve the texture * @returns {function} - A function that is created with the @GWEN library to draw a texture. **/ export function SkinTexture(this: void, name: string, pnl: Panel, fallback?: any): UnknownFunc /** * * Returns how many times @derma.RefreshSkins has been called. * * @name derma.SkinChangeIndex * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/SkinChangeIndex * @param {void} this - no description * @returns {number} - Amount of times @derma.RefreshSkins has been called. **/ export function SkinChangeIndex(this: void): number /** * * Calls the specified hook for the given panel * * @name derma.SkinHook * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/SkinHook * @param {void} this - no description * @param {string} type - The type of hook to run * @param {string} name - The name of the hook to run * @param {Panel} panel - The panel to call the hook for * @param {number} w - The width of the panel * @param {number} h - The height of the panel * @returns {any} - The returned variable from the skin hook **/ export function SkinHook(this: void, type: string, name: string, panel: Panel, w: number, h: number): any /** * * Clears all cached panels so that they reassess which skin they should be using. * * @name derma.RefreshSkins * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/RefreshSkins * @param {void} this - no description * @returns {void} **/ export function RefreshSkins(this: void): void /** * * Returns a copy of the table containing every Derma skin * * @name derma.GetSkinTable * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/GetSkinTable * @param {void} this - no description * @returns {table} - Table of every Derma skin **/ export function GetSkinTable(this: void): table /** * * Returns the default skin table, which can be changed with the hook [GM/ForceDermaSkin](https://wiki.garrysmod.com/page/GM/ForceDermaSkin) * * @name derma.GetDefaultSkin * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/GetDefaultSkin * @param {void} this - no description * @returns {table} - Skin table **/ export function GetDefaultSkin(this: void): table /** * * Returns the skin table of the skin with the supplied name * * @name derma.GetNamedSkin * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/GetNamedSkin * @param {void} this - no description * @param {string} name - Name of skin * @returns {table} - Skin table **/ export function GetNamedSkin(this: void, name: string): table /** * * Defines a new skin so that it is usable by Derma. The default skin can be found in "garrysmod/lua/skins/default.lua" * * @name derma.DefineSkin * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/DefineSkin * @param {void} this - no description * @param {string} name - Name of the skin * @param {string} descriptions - Description of the skin * @param {table} skin - Table containing skin data * @returns {void} **/ export function DefineSkin(this: void, name: string, descriptions: string, skin: table): void /** * * Returns the @derma.Controls table, a list of all derma controls registered with @derma.DefineControl. * * @name derma.GetControlList * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/GetControlList * @param {void} this - no description * @returns {table} - A listing of all available derma-based controls. See @derma.Controls for structure and contents. **/ export function GetControlList(this: void): table /** * * Defines a new Derma control with an optional base. * This calls @vgui.Register internally, but also does the following: * * Adds the control to @derma.GetControlList * * Adds a key "Derma" - This is returned by @derma.GetControlList * * Makes a global table with the name of the control (This is technically deprecated and should not be relied upon) * * If reloading (i.e. called this function with name of an existing panel), updates all existing instances of panels with this name. (Updates functions, calls @PanelHooks:PreAutoRefresh and @PanelHooks:PostAutoRefresh, etc.) * * @name derma.DefineControl * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/DefineControl * @param {void} this - no description * @param {string} name - Name of the newly created control * @param {string} description - Description of the control * @param {table} tab - Table containing control methods and properties * @param {string} base - Derma control to base the new control off of * @returns {table} - A table containing the new control's methods and properties **/ export function DefineControl(this: void, name: string, description: string, tab: table, base: string): table /** * * Gets the color from a Derma skin of a panel and returns default color if not found * * @name derma.Color * @realm client, menu * @wiki https://wiki.garrysmod.com/page/derma/Color * @param {void} this - no description * @param {string} name - no description * @param {Panel} pnl - no description * @param {table} def - The default color in case of failure. * @returns {void} **/ export function Color(this: void, name: string, pnl: Panel, def: table): void } declare namespace debugoverlay { /** * * Displays a colored triangle at the specified coordinates. * * @name debugoverlay.Triangle * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Triangle * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} pos1 - First point of the triangle * @param {Vector} pos2 - Second point of the triangle * @param {Vector} pos3 - Third point of the triangle * @param {number} lifetime - Number of seconds to appear * @param {Color} color - The color of the box. Uses the @IColor structure * @param {boolean} ignoreZ - If true, will draw on top of everything; ignoring the Z buffer * @returns {void} **/ export function Triangle(this: void, pos1: Vector, pos2: Vector, pos3: Vector, lifetime?: number, color?: Color, ignoreZ?: boolean): void /** * * Displays text at the specified position. * * @name debugoverlay.Text * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Text * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} origin - Position origin * @param {string} text - String message to display * @param {number} lifetime - Number of seconds to appear * @param {boolean} viewCheck - Clip text that is obscured * @returns {void} **/ export function Text(this: void, origin: Vector, text: string, lifetime?: number, viewCheck?: boolean): void /** * * Displays "swept" box, two boxes connected with lines by their verices. * * @name debugoverlay.SweptBox * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/SweptBox * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} vStart - The start position of the box. * @param {Vector} vEnd - The end position of the box. * @param {Vector} vMins - The "minimum" edge of the box. * @param {Vector} vMaxs - The "maximum" edge of the box. * @param {Angle} ang - no description * @param {number} lifetime - Number of seconds to appear * @param {Color} color - The color of the box. Uses the @IColor structure * @returns {void} **/ export function SweptBox(this: void, vStart: Vector, vEnd: Vector, vMins: Vector, vMaxs: Vector, ang: Angle, lifetime?: number, color?: Color): void /** * * Displays text triangle at the specified coordinates. * * @name debugoverlay.ScreenText * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/ScreenText * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {number} x - The position of the text, from 0 ( left ) to 1 ( right ). * @param {number} y - The position of the text, from 0 ( top ) to 1 ( bottom ). * @param {string} text - The text to display * @param {number} lifetime - Number of seconds to appear * @param {Color} color - The color of the box. Uses the @IColor structure * @returns {void} **/ export function ScreenText(this: void, x: number, y: number, text: string, lifetime?: number, color?: Color): void /** * * Displays a coloured sphere at the specified position. * * @name debugoverlay.Sphere * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Sphere * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} origin - Position origin * @param {number} size - Size of the sphere * @param {number} lifetime - Number of seconds to appear * @param {Color} color - The color of the sphere. Uses the @IColor structure * @param {boolean} ignoreZ - If true, will draw on top of everything; ignoring the Z buffer * @returns {void} **/ export function Sphere(this: void, origin: Vector, size: number, lifetime?: number, color?: Color, ignoreZ?: boolean): void /** * * Displays a coloured line at the specified position. * * @name debugoverlay.Line * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Line * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} pos1 - First position of the line * @param {Vector} pos2 - Second position of the line * @param {number} lifetime - Number of seconds to appear * @param {Color} color - The color of the line. Uses the @IColor structure * @param {boolean} ignoreZ - If true, will draw on top of everything; ignoring the Z buffer * @returns {void} **/ export function Line(this: void, pos1: Vector, pos2: Vector, lifetime?: number, color?: Color, ignoreZ?: boolean): void /** * * Draws a 3D grid of limited size in given position. * * @name debugoverlay.Grid * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Grid * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} position - no description * @returns {void} **/ export function Grid(this: void, position: Vector): void /** * * Displays 2D text at the specified coordinates. * * @name debugoverlay.EntityTextAtPosition * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/EntityTextAtPosition * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} pos - The position in 3D to display the text. * @param {number} line - Line of text, will offset text on the to display the new line unobstructed * @param {string} text - The text to display * @param {number} lifetime - Number of seconds to appear * @param {Color} color - The color of the box. Uses the @IColor structure * @returns {void} **/ export function EntityTextAtPosition(this: void, pos: Vector, line: number, text: string, lifetime?: number, color?: Color): void /** * * Creates a coloured cross at the specified position for the specified time. * * @name debugoverlay.Cross * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Cross * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} position - Position origin * @param {number} size - Size of the cross * @param {number} lifetime - Number of seconds the cross to appear * @param {Color} color - The color of the cross. Uses the @IColor structure * @param {boolean} ignoreZ - If true, will draw on top of everything; ignoring the Z buffer * @returns {void} **/ export function Cross(this: void, position: Vector, size: number, lifetime?: number, color?: Color, ignoreZ?: boolean): void /** * * Displays a solid colored rotated box at the specified position. * * @name debugoverlay.BoxAngles * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/BoxAngles * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} pos - World position * @param {Vector} mins - The mins of the box (lowest corner) * @param {Vector} maxs - The maxs of the box (highest corner) * @param {Angle} ang - The angle to draw the box at * @param {number} lifetime - Amount of seconds to show the box * @param {Color} color - The color of the box. Uses the @IColor structure * @returns {void} **/ export function BoxAngles(this: void, pos: Vector, mins: Vector, maxs: Vector, ang: Angle, lifetime?: number, color?: Color): void /** * * Displays an axis indicator at the specified position. * * @name debugoverlay.Axis * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Axis * @note This function will silently fail if the **developer** @ConVar type is set to 0 * @param {void} this - no description * @param {Vector} origin - Position origin * @param {Angle} ang - Angle of the axis * @param {number} size - Size of the axis * @param {number} lifetime - Number of seconds to appear * @param {boolean} ignoreZ - If true, will draw on top of everything; ignoring the Z buffer * @returns {void} **/ export function Axis(this: void, origin: Vector, ang: Angle, size: number, lifetime?: number, ignoreZ?: boolean): void /** * * Displays a solid coloured box at the specified position. * * @name debugoverlay.Box * @realm client, server * @wiki https://wiki.garrysmod.com/page/debugoverlay/Box * @note This function will silently fail if the **developer** @ConVar type is set to 0. * @param {void} this - no description * @param {Vector} origin - Position origin * @param {Vector} mins - Minimum bounds of the box * @param {Vector} maxs - Maximum bounds of the box * @param {number} lifetime - Number of seconds to appear * @param {Color} color - The color of the box. Uses the @IColor structure * @returns {void} **/ export function Box(this: void, origin: Vector, mins: Vector, maxs: Vector, lifetime?: number, color?: Color): void } declare namespace debug { /** * * Make the n1-th upvalue of the Lua closure f1 refer to the n2-th upvalue of the Lua closure f2. * * @name debug.upvaluejoin * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/upvaluejoin * @deleted This function was removed due to security concerns. * @param {void} this - no description * @param {function} f1 - no description * @param {number} n1 - no description * @param {function} f2 - no description * @param {number} n2 - no description * @returns {void} **/ export function upvaluejoin(this: void, f1: UnknownFunc, n1: number, f2: UnknownFunc, n2: number): void /** * * Returns an unique identifier for the upvalue indexed from func * * @name debug.upvalueid * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/upvalueid * @deleted This function was removed due to security concerns. * @param {void} this - no description * @param {function} func - The function to index the upvalue from * @param {number} index - The index from func * @returns {number} - A unique identifier **/ export function upvalueid(this: void, func: UnknownFunc, index: number): number /** * * Returns a full execution stack trace. * * @name debug.traceback * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/traceback * @param {void} this - no description * @param {thread} thread - Thread (ie. error object from xpcall error handler) to build traceback for. * @param {string} message - Appended at the beginning of the traceback. * @param {number} level - Which level to start the traceback. * @returns {string} - A dump of the execution stack. **/ export function traceback(this: void, thread?: thread, message?: string, level?: number): string /** * * Prints out the lua function call stack to the console. * * @name debug.Trace * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/Trace * @param {void} this - no description * @returns {void} **/ export function Trace(this: void): void /** * * Sets the variable indexed from func * * @name debug.setupvalue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/setupvalue * @deleted This function was removed due to security concerns. * @param {void} this - no description * @param {function} func - The function to index the upvalue from * @param {number} index - The index from func * @param {any} val - The value to set the upvalue to. * @returns {string} - Returns nil if there is no upvalue with the given index, otherwise it returns the upvalue's name. **/ export function setupvalue(this: void, func: UnknownFunc, index: number, val?: any): string /** * * Sets the object's metatable. Unlike @setmetatable function, this function works regardless of whether the first object passed is a valid table or not; this function even works on primitive datatypes such as numbers, functions, and even nil. * * @name debug.setmetatable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/setmetatable * @param {void} this - no description * @param {any} object - Object to set the metatable for. * @param {table} metatable - The metatable to set for the object. * If this argument is nil, then the object's metatable is removed. * @returns {boolean} - true if the object's metatable was set successfully. **/ export function setmetatable(this: void, object: any, metatable: table): boolean /** * * Sets a local variable's value. * * @name debug.setlocal * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/setlocal * @deleted This function was removed due to security concerns. * @param {void} this - no description * @param {thread} thread - The thread * @param {number} level - The level above the thread. * 0 is the function that was called (most always this function)'s arguments * 1 is the thread that had called this function. * 2 is the thread that had called the function that started the thread that called this function. * @param {number} index - The variable's index you want to get. * 1 = the first local defined in the thread * 2 = the second local defined in the thread * @param {any} value - The value to set the local to * @returns {string} - The name of the local variable if the local at the index exists, otherwise nil is returned. **/ export function setlocal(this: void, thread?: thread, level: number, index: number, value?: any): string /** * * Sets the environment of the passed object. * * @name debug.setfenv * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/setfenv * @param {void} this - no description * @param {table} object - Object to set environment of * @param {table} env - Environment to set * @returns {table} - The object **/ export function setfenv(this: void, object: table, env: table): table /** * * Used for getting variable values in an index from the passed function. This does nothing for C functions. * * @name debug.getupvalue * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/getupvalue * @param {void} this - no description * @param {function} func - Function to get the upvalue indexed from. * @param {number} index - The index in the upvalue array. The max number of entries can be found in @debug.getinfo's "[nups](https://wiki.garrysmod.com/page/Structures/DebugInfo)" key. * @returns {string} - Name of the upvalue. Will be nil if the index was out of range ( @debug.getinfo.nups), or the function was defined in C. * @returns {any} - Value of the upvalue. * @tupleReturn **/ export function getupvalue(this: void, func: UnknownFunc, index: number): [string, any] /** * * Sets the given function as a Lua hook. This is completely different to gamemode hooks. The thread argument can be completely omitted and calling this function with no arguments will remove the current hook. This is used by default for infinite loop detection. More information on hooks can be found at http://www.lua.org/pil/23.2.html * Hooks are not always ran when code that has been compiled by LuaJIT's JIT compiler is being executed. This means that relying on them for infinite loop protection is unwise. * * @name debug.sethook * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/sethook * @param {void} this - no description * @param {thread} thread - Thread to set the hook on. This argument can be omited * @param {function} hook - Function for the hook to call * @param {string} mask - The hook's mask * @param {number} count - How often to call the hook (in instructions). 0 for every instruction * @returns {void} **/ export function sethook(this: void, thread: thread, hook: UnknownFunc, mask: string, count: number): void /** * * Returns the metatable of an object. This function ignores the metatable's __metatable field. * * @name debug.getmetatable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/getmetatable * @param {void} this - no description * @param {any} object - The object to retrieve the metatable from. * @returns {table} - The metatable of the given object. **/ export function getmetatable(this: void, object: any): table /** * * Returns the internal Lua registry table. * The Lua registry is used by the engine and binary modules to create references to Lua values. Avoid creating entries into the registry with a number as the key, as they are reserved for the reference system. * * @name debug.getregistry * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/getregistry * @warning Improper editing of the registry can result in unintended side effects, including crashing of the game. * @param {void} this - no description * @returns {table} - The Lua registry **/ export function getregistry(this: void): table /** * * Gets the name and value of a local variable indexed from the level * * @name debug.getlocal * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/getlocal * @note Variables with names starting with **(** are **internal variables**. * @warning When a function has a tailcall return, you cannot access the locals of this function * @param {void} this - no description * @param {thread} thread - The thread * @param {number} level - The level above the thread. * 0 = the function that was called (most always this function)'s arguments * 1 = the thread that had called this function. * 2 = the thread that had called the function that started the thread that called this function. * A function defined in Lua can also be passed as the level. The index will specify the parameter's name to be returned (a parameter will have a value of nil). * @param {number} index - The variable's index you want to get. * 1 = the first local defined in the thread * 2 = the second local defined in the thread * etc... * @returns {string} - The name of the variable * Sometimes this will be "(*temporary)" if the local variable had no name. * @returns {any} - The value of the local variable. * @tupleReturn **/ export function getlocal(this: void, thread?: thread, level: number, index: number): [string, any] /** * * Returns debug information about a function. * * @name debug.getinfo * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/getinfo * @param {void} this - no description * @param {function} funcOrStackLevel - Takes either a function or a number representing the stack level as an argument. Stack level 0 always corresponds to the debug.getinfo call, 1 would be the function calling debug.getinfo, and so on. * Returns useful information about that function in a table. * @param {string} fields - A string whose characters specify the information to be retrieved. * * f - Populates the func field. * * l - Populates the currentline field. * * L - Populates the activelines field. * * n - Populates the name and namewhat fields - only works if stack level is passed rather than function pointer. * * S - Populates the location fields (lastlinedefined, linedefined, short_src, source and what). * * u - Populates the argument and upvalue fields (isvararg, nparams, nups) * @returns {DebugInfo} - A table as a @DebugInfo structure containing information about the function you passed. Can return nil if the stack level didn't point to a valid stack frame. **/ export function getinfo(this: void, funcOrStackLevel: UnknownFunc, fields?: string): DebugInfo /** * * Returns the environment of the passed object. This can be set with @debug.setfenv * * @name debug.getfenv * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/getfenv * @param {void} this - no description * @param {table} object - Object to get environment of * @returns {table} - Environment **/ export function getfenv(this: void, object: table): table /** * * Returns the current hook settings of the passed thread. The thread argument can be omitted. This is unrelated to [gamemode hooks](https://wiki.garrysmod.com/page/Category:GM%20Hooks). More information on hooks can be found at http://www.lua.org/pil/23.2.html * * @name debug.gethook * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/gethook * @param {void} this - no description * @param {thread} thread - Which thread to retrieve its hook from * @returns {function} - Hook function * @returns {string} - Hook mask * @returns {number} - Hook count * @tupleReturn **/ export function gethook(this: void, thread?: thread): [UnknownFunc, string, number] /** * * Enters an interactive mode with the user, running each string that the user enters. Using simple commands and other debug facilities, the user can inspect global and local variables, change their values, evaluate expressions, and so on. A line containing only the word cont finishes this function, so that the caller continues its execution. * * Commands for debug.debug are not lexically nested within any function, and so have no direct access to local variables. * * This only works on the source dedicated server. * * To exit this interactive mode, you can press Ctrl + Z then Enter OR type the word 'cont' on a single line and press enter. * * @name debug.debug * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/debug/debug * @param {void} this - no description * @returns {void} **/ export function debug(this: void): void } declare namespace cvars { /** * @type cvarsAddChangeCallbackCallback * @param {void} this - no description * @param {string} convar - The name of the convar. * @param {string} oldValue - The old value of the convar. * @param {string} newValue - The new value of the convar. **/ type cvarsAddChangeCallbackCallback = (this: void, convar: string, oldValue: string, newValue: string) => unknown /** * * Retrieves console variable as a string. * * @name cvars.str * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cvars/String * @param {void} this - no description * @param {string} cvar - Name of console variable * @param {any} def - The value to return if the console variable does not exist * @returns {string} - Retrieved value **/ export function str(this: void, cvar: string, def?: any): string /** * * Removes a callback for a convar using the the callback's identifier. The identifier should be the third argument specified for @cvars.AddChangeCallback. * * @name cvars.RemoveChangeCallback * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cvars/RemoveChangeCallback * @param {void} this - no description * @param {string} name - The name of the convar to remove the callback from. * @param {string} indentifier - The callback's identifier. * @returns {void} **/ export function RemoveChangeCallback(this: void, name: string, indentifier: string): void /** * * Called by the engine when a convar value changes. * * @name cvars.OnConVarChanged * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cvars/OnConVarChanged * @internal You are probably looking for @cvars.AddChangeCallback. * @param {void} this - no description * @param {string} name - Convar name * @param {string} oldVal - The old value of the convar * @param {string} newVal - The new value of the convar * @returns {void} **/ export function OnConVarChanged(this: void, name: string, oldVal: string, newVal: string): void /** * * Retrieves console variable as a number. * * @name cvars.num * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cvars/Number * @param {void} this - no description * @param {string} cvar - Name of console variable * @param {any} def - The value to return if the console variable does not exist * @returns {number} - Retrieved value **/ export function num(this: void, cvar: string, def?: any): number /** * * Returns a table of the given @ConVar types callbacks. * * @name cvars.GetConVarCallbacks * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cvars/GetConVarCallbacks * @param {void} this - no description * @param {string} name - The name of the @ConVar type. * @param {boolean} createIfNotFound - Whether or not to create the internal callback table for given @ConVar type if there isn't one yet. * This argument is internal and should not be used. * @returns {table} - A table of the convar's callbacks, or nil if the convar doesn't exist. **/ export function GetConVarCallbacks(this: void, name: string, createIfNotFound?: boolean): table /** * * Retrieves console variable as a boolean. * * @name cvars.Bool * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cvars/Bool * @param {void} this - no description * @param {string} cvar - Name of console variable * @param {boolean} def - The value to return if the console variable does not exist * @returns {boolean} - Retrieved value **/ export function Bool(this: void, cvar: string, def?: boolean): boolean /** * * Adds a callback to be called when the named convar changes. * * @name cvars.AddChangeCallback * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cvars/AddChangeCallback * @bug #1440 This does not callback convars in the menu state. * @bug #3503 This does not callback convars on the client with FCVAR_GAMEDLL and convars on the server without FCVAR_GAMEDLL. * @bug #3740 This does not callback convars on the client with FCVAR_REPLICATED. * @param {void} this - no description * @param {string} name - The name of the convar to add the change callback to. * @param {function} callback - The function to be called when the convar changes. The arguments passed are: * @param {string} identifier - If set, you will be able to remove the callback using @cvars.RemoveChangeCallback. * @returns {void} **/ export function AddChangeCallback(this: void, name: string, callback: cvarsAddChangeCallbackCallback, identifier?: string): void } declare namespace coroutine { /** * * Returns a function which calling is equivalent with calling @coroutine.resume with the coroutine and all extra parameters. * * @name coroutine.wrap * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/coroutine/wrap * @param {void} this - no description * @param {function} coroutine - Coroutine to resume. * @returns {function} - func **/ export function wrap(this: void, coroutine: UnknownFunc): UnknownFunc /** * * Pauses the active coroutine and passes all additional variables to the call of @coroutine.resume that resumed the coroutine last time, and returns all additional variables that were passed to the previous call of resume. * * @name coroutine.yield * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/coroutine/yield * @param {void} this - no description * @param {any[]} ...returnValue - Arguments to be returned by the last call of @coroutine.resume * @returns {any[]} - Arguments that were set previously by @coroutine.resume **/ export function yield(this: void, ...returnValue: any[]): any[] /** * * Yields the coroutine for the given duration before continuing. * This only works inside a coroutine. * This function uses @CurTime function instead of @RealTime function. * * @name coroutine.wait * @realm client, server * @wiki https://wiki.garrysmod.com/page/coroutine/wait * @param {void} this - no description * @param {number} duration - The number of seconds to wait * @returns {void} **/ export function wait(this: void, duration: number): void /** * * Returns the status of the coroutine passed to it, the possible statuses are "suspended", "running", and "dead". * * @name coroutine.status * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/coroutine/status * @param {void} this - no description * @param {thread} coroutine - Coroutine to check the status of. * @returns {string} - status **/ export function status(this: void, coroutine: thread): string /** * * Returns the active coroutine or nil if we are not within a coroutine. * * @name coroutine.running * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/coroutine/running * @param {void} this - no description * @returns {thread} - coroutine **/ export function running(this: void): thread /** * * Resumes the given coroutine and passes the given vararg to either the function arguments or the @coroutine.yield that is inside that function and returns whatever yield is called with the next time or by the final return in the function. * * @name coroutine.resume * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/coroutine/resume * @param {void} this - no description * @param {thread} coroutine - Coroutine to resume. * @param {any[]} ...args - Arguments to be returned by @coroutine.yield. * @returns {boolean} - If the executed thread code had no errors occur within it. * @returns {any[]} - If an error occured, this will be a string containing the error message. Otherwise, this will be arguments that were yielded. * @tupleReturn **/ export function resume(this: void, coroutine: thread, ...args: any[]): [boolean, any[]] /** * * Creates a coroutine of the given function. * * @name coroutine.create * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/coroutine/create * @param {void} this - no description * @param {function} func - The function for the coroutine to use * @returns {thread} - coroutine **/ export function create(this: void, func: UnknownFunc): thread } declare namespace cookie { /** * * Sets the value of a cookie, which is saved automatically by the @sql library. * These are stored in the *.db files - cl.db for clients, mn.db for menu state and sv.db for servers. * [Category:Menu](https://wiki.garrysmod.com/page/Category:Menu) * * @name cookie.Set * @realm client, server * @wiki https://wiki.garrysmod.com/page/cookie/Set * @param {void} this - no description * @param {string} key - The name of the cookie that you want to set. * @param {string} value - Value to store in the cookie. * @returns {void} **/ export function Set(this: void, key: string, value: string): void /** * * Gets the value of a cookie on the client as a string. * * @name cookie.GetString * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cookie/GetString * @param {void} this - no description * @param {string} name - The name of the cookie that you want to get. * @param {any} def - Value to return if the cookie does not exist. * @returns {string} - The cookie value **/ export function GetString(this: void, name: string, def?: any): string /** * * Gets the value of a cookie on the client as a number. * * @name cookie.GetNumber * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cookie/GetNumber * @param {void} this - no description * @param {string} name - The name of the cookie that you want to get. * @param {any} def - Value to return if the cookie does not exist. * @returns {number} - The cookie value **/ export function GetNumber(this: void, name: string, def?: any): number /** * * Deletes a cookie on the client. * * @name cookie.Delete * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/cookie/Delete * @param {void} this - no description * @param {string} name - The name of the cookie that you want to delete. * @returns {void} **/ export function Delete(this: void, name: string): void } declare namespace controlpanel { /** * * Returns (or creates if not exists) a controlpanel. * * @name controlpanel.Get * @realm client * @wiki https://wiki.garrysmod.com/page/controlpanel/Get * @param {void} this - no description * @param {string} name - The name of the panel. * @returns {Panel} - ControlPanel **/ export function Get(this: void, name: string): Panel /** * * Clears ALL the control panels ( for tools ) * * @name controlpanel.Clear * @realm client * @wiki https://wiki.garrysmod.com/page/controlpanel/Clear * @param {void} this - no description * @returns {void} **/ export function Clear(this: void): void } declare namespace construct { /** * * Creates a magnet. * * @name construct.Magnet * @realm server * @wiki https://wiki.garrysmod.com/page/construct/Magnet * @param {void} this - no description * @param {Player} ply - Player that will have the numpad control over the magnet * @param {Vector} pos - The position of the magnet * @param {Angle} ang - The angles of the magnet * @param {string} model - The model of the maget * @param {string} material - Material of the magnet ( texture ) * @param {KEY} key - The key to toggle the magnet, see @KEY enum * @param {number} maxObjects - Maximum amount of objects the magnet can hold * @param {number} strength - Strength of the magnet * @param {number} nopull - If > 0, disallows the magnet to pull objects towards it * @param {number} allowrot - If > 0, allows rotation of the objects attached * @param {number} startOn - If > 0, enabled from spawn * @param {number} toggle - If != 0, pressing the key toggles the magnet, otherwise you'll have to hold the key to keep it enabled * @param {Vector} vel - Velocity to set on spawn * @param {Angle} aVel - Angular velocity to set on spawn * @param {boolean} frozen - Freeze the magnet on start * @returns {Entity} - The magnet **/ export function Magnet(this: void, ply: Player, pos: Vector, ang: Angle, model: string, material: string, key: KEY, maxObjects: number, strength: number, nopull?: number, allowrot?: number, startOn?: number, toggle: number, vel?: Vector, aVel?: Angle, frozen?: boolean): Entity /** * * Sets props physical properties. * * @name construct.SetPhysProp * @realm server * @wiki https://wiki.garrysmod.com/page/construct/SetPhysProp * @param {void} this - no description * @param {Player} ply - The player. This variable is not used and can be left out. * @param {Entity} ent - The entity to apply properties to * @param {number} physObjID - You can use this or the argument below. This will be used in case you don't provide argument below. * @param {PhysObj} physObj - The physics object to apply the properties to * @param {PhysProperties} data - The table containing properties to apply. See @PhysProperties structure * @returns {void} **/ export function SetPhysProp(this: void, ply: Player, ent: Entity, physObjID: number, physObj: PhysObj, data: PhysProperties): void } declare namespace constraint { /** * * Creates a Winch constraint. * * @name constraint.Winch * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Winch * @param {void} this - no description * @param {Player} pl - The player that will be used to call @numpad.OnDown and @numpad.OnUp. * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls), * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls). * @param {Vector} LPos1 - no description * @param {Vector} LPos2 - no description * @param {number} width - The width of the rope. * @param {KEY} fwd_bind - The key binding for "forward", corresponding to an @KEY enum * @param {KEY} bwd_bind - The key binding for "backwards", corresponding to an @KEY enum * @param {number} fwd_speed - Forward speed. * @param {number} bwd_speed - Backwards speed. * @param {string} material - The material of the rope. * @param {boolean} toggle - Whether the winch should be on toggle. * @returns {Entity} - Constraint. Can return nil. Will return false if the constraint could not be created. * @returns {Entity} - rope. Will return nil if the constraint could not be created. * @returns {Entity} - controller. Can return nil. * @tupleReturn **/ export function Winch(this: void, pl: Player, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, width: number, fwd_bind: KEY, bwd_bind: KEY, fwd_speed: number, bwd_speed: number, material: string, toggle: boolean): [Entity, Entity, Entity] /** * * Creates a weld constraint * * @name constraint.Weld * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Weld * @param {void} this - no description * @param {Entity} ent1 - The first entity * @param {Entity} ent2 - The second entity * @param {number} bone1 - The bonenumber of the first entity (0 for monoboned entities) * PhysObj number for ragdolls, see: @EntityFuncs:TranslateBoneToPhysBone. * @param {number} bone2 - The bonenumber of the second entity * @param {number} forcelimit - The amount of force appliable to the constraint before it will break (0 is never) * @param {boolean} nocollide - Should ent1 be nocollided to ent2 via this constraint * @param {boolean} deleteent1onbreak - If true, when ent2 is removed, ent1 will also be removed * @returns {Entity} - constraint **/ export function Weld(this: void, ent1: Entity, ent2: Entity, bone1: number, bone2: number, forcelimit: number, nocollide: boolean, deleteent1onbreak: boolean): Entity /** * * Creates a slider constraint. * * @name constraint.Slider * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Slider * @param {void} this - no description * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls), * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls). * @param {Vector} LPos1 - no description * @param {Vector} LPos2 - no description * @param {number} width - The width of the rope. * @param {string} material - The material of the rope. * @returns {Entity} - Constraint. Will return false if the constraint could not be created. * @returns {Entity} - rope. Will return nil if the constraint could not be created. * @tupleReturn **/ export function Slider(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, width: number, material: string): [Entity, Entity] /** * * Creates a rope constraint - with rope! * * @name constraint.Rope * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Rope * @param {void} this - no description * @param {Entity} Ent1 - First entity * @param {Entity} Ent2 - Second entity * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls) * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls) * @param {Vector} LPos1 - Position of first end of the rope. Local to Ent1. * @param {Vector} LPos2 - Position of second end of the rope. Local to Ent2. * @param {number} length - Length of the rope. * @param {number} addlength - Amount to add to the length of the rope. Works as it does in the Rope tool. * @param {number} forcelimit - Amount of force until it breaks (0 = unbreakable). * @param {number} width - Width of the rope. * @param {string} material - Material of the rope. * @param {boolean} rigid - Whether the constraint is rigid. * @returns {Entity} - Constraint. Will be a keyframe_rope if you roping to the same bone on the same entity. Will return false if the constraint could not be created. * @returns {Entity} - rope. Will return nil if "Constraint" is a keyframe_rope or if the constraint could not be created. * @tupleReturn **/ export function Rope(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, length: number, addlength: number, forcelimit: number, width: number, material: string, rigid: boolean): [Entity, Entity] /** * * Attempts to remove all constraints of a specified type associated with an entity * * @name constraint.RemoveConstraints * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/RemoveConstraints * @param {void} this - no description * @param {Entity} ent - The entity to check * @param {string} type - The constraint type to remove (eg. "Weld", "Elastic", "NoCollide") * @returns {boolean} - Whether we removed any constraints or not * @returns {number} - The amount of constraints removed * @tupleReturn **/ export function RemoveConstraints(this: void, ent: Entity, type: string): [boolean, number] /** * * Attempts to remove all constraints associated with an entity * * @name constraint.RemoveAll * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/RemoveAll * @param {void} this - no description * @param {Entity} ent - The entity to remove constraints from * @returns {boolean} - Whether any constraints were removed * @returns {number} - Number of constraints removed * @tupleReturn **/ export function RemoveAll(this: void, ent: Entity): [boolean, number] /** * * Creates a pulley constraint. * * @name constraint.Pulley * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Pulley * @param {void} this - no description * @param {Entity} Ent1 - no description * @param {Entity} Ent4 - no description * @param {number} Bone1 - no description * @param {number} Bone4 - no description * @param {Vector} LPos1 - no description * @param {Vector} LPos4 - no description * @param {Vector} WPos2 - no description * @param {Vector} WPos3 - no description * @param {number} forcelimit - Amount of force until it breaks (0 = unbreakable) * @param {boolean} rigid - Whether the constraint is rigid. * @param {number} width - Width of the rope. * @param {string} material - Material of the rope. * @returns {Entity} - Constraint. Will return false if the constraint could not be created. **/ export function Pulley(this: void, Ent1: Entity, Ent4: Entity, Bone1: number, Bone4: number, LPos1: Vector, LPos4: Vector, WPos2: Vector, WPos3: Vector, forcelimit: number, rigid: boolean, width: number, material: string): Entity /** * * Creates an no-collide "constraint". Disables collision between two entities. * * @name constraint.NoCollide * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/NoCollide * @note Does not work with players. * @param {void} this - no description * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls). * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls). * @returns {Entity} - Constraint. Will return false if the constraint could not be created. **/ export function NoCollide(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number): Entity /** * * Creates a muscle constraint. * * @name constraint.Muscle * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Muscle * @param {void} this - no description * @param {Player} pl - The player that will be used to call @numpad.OnDown. * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls) * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls) * @param {Vector} LPos1 - no description * @param {Vector} LPos2 - no description * @param {number} Length1 - no description * @param {number} Length2 - no description * @param {number} width - Width of the rope. * @param {KEY} key - The key binding, corresponding to an @KEY enum * @param {number} fixed - Whether the constraint is fixed. * @param {number} period - no description * @param {number} amplitude - no description * @param {boolean} starton - no description * @param {string} material - Material of the rope. * @returns {Entity} - Constraint. Will return false if the constraint could not be created. * @returns {Entity} - rope. Will return nil if the constraint could not be created. * @returns {Entity} - controller. Will return nil if the constraint could not be created. * @returns {Entity} - slider. Will return nil if the fixed argument is not 1 or if the constraint could not be created. * @tupleReturn **/ export function Muscle(this: void, pl: Player, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, Length1: number, Length2: number, width: number, key: KEY, fixed: number, period: number, amplitude: number, starton: boolean, material: string): [Entity, Entity, Entity, Entity] /** * * Creates a motor constraint. * * @name constraint.Motor * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Motor * @param {void} this - no description * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls) * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls) * @param {Vector} LPos1 - no description * @param {Vector} LPos2 - no description * @param {number} friction - no description * @param {number} torque - no description * @param {number} forcetime - no description * @param {number} nocollide - Whether the entities should be no-collided. * @param {number} toggle - Whether the constraint is on toggle. * @param {Player} pl - The player that will be used to call @numpad.OnDown and @numpad.OnUp. * @param {number} forcelimit - Amount of force until it breaks (0 = unbreakable) * @param {KEY} numpadkey_fwd - The key binding for "forward", corresponding to an @KEY enum * @param {KEY} numpadkey_bwd - The key binding for "backwards", corresponding to an @KEY enum * @param {number} direction - no description * @param {Vector} LocalAxis - no description * @returns {Entity} - Constraint. Will return false if the constraint could not be created. * @returns {Entity} - axis. Will return nil if the constraint could not be created. * @tupleReturn **/ export function Motor(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, friction: number, torque: number, forcetime: number, nocollide: number, toggle: number, pl: Player, forcelimit: number, numpadkey_fwd: KEY, numpadkey_bwd: KEY, direction: number, LocalAxis: Vector): [Entity, Entity] /** * * Creates a keep upright constraint. * * @name constraint.Keepupright * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Keepupright * @note This function only works on prop_physics or prop_ragdoll. * @param {void} this - no description * @param {Entity} ent - The entity to keep upright * @param {Angle} ang - The angle defined as "upright" * @param {number} bone - The bone of the entity to constrain (0 for boneless) * @param {number} angularLimit - Basically, the strength of the constraint * @returns {Entity} - The created constraint, if any or false if the constraint failed to set **/ export function Keepupright(this: void, ent: Entity, ang: Angle, bone: number, angularLimit: number): Entity /** * * Creates a Hydraulic constraint. * * @name constraint.Hydraulic * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Hydraulic * @param {void} this - no description * @param {Player} pl - The player that will be used to call @numpad.OnDown. * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls), * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls). * @param {Vector} LPos1 - no description * @param {Vector} LPos2 - no description * @param {number} Length1 - no description * @param {number} Length2 - no description * @param {number} width - The width of the rope. * @param {KEY} key - The key binding, corresponding to an @KEY enum * @param {number} fixed - Whether the hydraulic is fixed. * @param {number} speed - no description * @param {string} material - The material of the rope. * @returns {Entity} - Constraint. Will return false if the constraint could not be created. * @returns {Entity} - rope. Will return nil if the constraint could not be created. * @returns {Entity} - controller. Can return nil depending on how the constraint was created. Will return nil if the constraint could not be created. * @returns {Entity} - slider. Can return nil depending on how the constraint was created. Will return nil if the constraint could not be created. * @tupleReturn **/ export function Hydraulic(this: void, pl: Player, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, Length1: number, Length2: number, width: number, key: KEY, fixed: number, speed: number, material: string): [Entity, Entity, Entity, Entity] /** * * Returns true if the entity has constraints attached to it * * @name constraint.HasConstraints * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/HasConstraints * @param {void} this - no description * @param {Entity} ent - The entity to check * @returns {boolean} - Whether the entity has any constraints or not. **/ export function HasConstraints(this: void, ent: Entity): boolean /** * * Returns a table of all constraints directly connected to the entity * * @name constraint.GetTable * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/GetTable * @param {void} this - no description * @param {Entity} ent - The entity to check * @returns {table} - A list of all constraints connected to the entity. **/ export function GetTable(this: void, ent: Entity): table /** * * Returns a table of all entities recursively constrained to an entitiy. * * @name constraint.GetAllConstrainedEntities * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/GetAllConstrainedEntities * @param {void} this - no description * @param {Entity} ent - The entity to check * @param {table} ResultTable - Table used to return result. Optional. * @returns {table} - A table containing all of the constrained entities. This includes all entities constrained to entities constrained to the supplied entity, etc. **/ export function GetAllConstrainedEntities(this: void, ent: Entity, ResultTable?: table): table /** * * Make this entity forget any constraints it knows about. Note that this will not actually remove the constraints. * * @name constraint.ForgetConstraints * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/ForgetConstraints * @param {void} this - no description * @param {Entity} ent - The entity that will forget its constraints. * @returns {void} **/ export function ForgetConstraints(this: void, ent: Entity): void /** * * Returns a table of all constraints of a specific type directly connected to the entity * * @name constraint.FindConstraints * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/FindConstraints * @param {void} this - no description * @param {Entity} ent - The entity to check * @param {string} type - The type of constraint (eg. "Weld", "Elastic", "NoCollide") * @returns {table} - All the constraints of this entity. **/ export function FindConstraints(this: void, ent: Entity, type: string): table /** * * Returns the other entity involved in the first constraint of a specific type directly connected to the entity * * @name constraint.FindConstraintEntity * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/FindConstraintEntity * @param {void} this - no description * @param {Entity} ent - The entity to check * @param {string} type - The type of constraint (eg. "Weld", "Elastic", "NoCollide") * @returns {Entity} - The other entity. **/ export function FindConstraintEntity(this: void, ent: Entity, type: string): Entity /** * * Returns the first constraint of a specific type directly connected to the entity found * * @name constraint.FindConstraint * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/FindConstraint * @param {void} this - no description * @param {Entity} ent - The entity to check * @param {string} type - The type of constraint (eg. "Weld", "Elastic", "NoCollide") * @returns {table} - The constraint table, set with @constraint.AddConstraintTable **/ export function FindConstraint(this: void, ent: Entity, type: string): table /** * * Returns the constraint of a specified type between two entities, if it exists * * @name constraint.Find * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Find * @param {void} this - no description * @param {Entity} ent1 - The first entity to check * @param {Entity} ent2 - The second entity to check * @param {string} type - The constraint type to look for (eg. "Weld", "Elastic", "NoCollide") * @param {number} bone1 - The bone number for the first entity (0 for monoboned entities) * @param {number} bone2 - The bone number for the second entity * @returns {Entity} - constraint **/ export function Find(this: void, ent1: Entity, ent2: Entity, type: string, bone1: number, bone2: number): Entity /** * * Creates an elastic constraint. * * @name constraint.Elastic * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Elastic * @param {void} this - no description * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls) * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls) * @param {Vector} LPos1 - Position of first end of the rope. Local to Ent1. * @param {Vector} LPos2 - Position of second end of the rope. Local to Ent2. * @param {number} constant - no description * @param {number} damping - no description * @param {number} rdamping - no description * @param {string} material - The material of the rope. * @param {number} width - Width of rope. * @param {boolean} stretchonly - no description * @returns {Entity} - Constraint. Will return false if the constraint could not be created. * @returns {Entity} - rope. Will return nil if the constraint could not be created. * @tupleReturn **/ export function Elastic(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, constant: number, damping: number, rdamping: number, material: string, width: number, stretchonly: boolean): [Entity, Entity] /** * * Creates an invisible, non-moveable anchor point in the world to which things can be attached. * * @name constraint.CreateStaticAnchorPoint * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/CreateStaticAnchorPoint * @param {void} this - no description * @param {Vector} pos - The position to spawn the anchor at * @returns {Entity} - anchor * @returns {PhysObj} - physicsObject, * @returns {number} - bone * @returns {Vector} - LPos * @tupleReturn **/ export function CreateStaticAnchorPoint(this: void, pos: Vector): [Entity, PhysObj, number, Vector] /** * * Creates a rope without any constraint * * @name constraint.CreateKeyframeRope * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/CreateKeyframeRope * @param {void} this - no description * @param {Vector} pos - no description * @param {number} width - no description * @param {string} material - no description * @param {Entity} Constraint - no description * @param {Entity} Ent1 - no description * @param {Vector} LPos1 - no description * @param {number} Bone1 - no description * @param {Entity} Ent2 - no description * @param {Vector} LPos2 - no description * @param {number} Bone2 - no description * @param {table} kv - no description * @returns {Entity} - rope **/ export function CreateKeyframeRope(this: void, pos: Vector, width: number, material: string, Constraint: Entity, Ent1: Entity, LPos1: Vector, Bone1: number, Ent2: Entity, LPos2: Vector, Bone2: number, kv: table): Entity /** * * Basic checks to make sure that the specified entity and bone are valid. Returns false if we should not be constraining the entity. * * @name constraint.CanConstrain * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/CanConstrain * @param {void} this - no description * @param {Entity} ent - The entity to check * @param {number} bone - The bone of the entity to check (use 0 for mono boned ents) * @returns {boolean} - shouldConstrain **/ export function CanConstrain(this: void, ent: Entity, bone: number): boolean /** * * Creates a ballsocket joint. * * @name constraint.Ballsocket * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Ballsocket * @param {void} this - no description * @param {Entity} Ent1 - First entity * @param {Entity} Ent2 - Second entity * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls) * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls) * @param {Vector} LocalPos - Centerposition of the joint, relative to the **second** entity. * @param {number} forcelimit - Amount of force until it breaks (0 = unbreakable) * @param {number} torquelimit - Amount of torque (rotation speed) until it breaks (0 = unbreakable) * @param {number} nocollide - Whether the entities should be nocollided * @returns {Entity} - Constraint. Will return false if the constraint could not be created. **/ export function Ballsocket(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LocalPos: Vector, forcelimit: number, torquelimit: number, nocollide: number): Entity /** * * Creates an axis constraint. * * @name constraint.Axis * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/Axis * @param {void} this - no description * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls) * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls) * @param {Vector} LPos1 - Position on the first entity, in its local space coordinates. * @param {Vector} LPos2 - Position on the second entity, in its local space coordinates. * @param {number} forcelimit - Amount of force until it breaks (0 = unbreakable) * @param {number} torquelimit - Amount of torque (rotational force) until it breaks (0 = unbreakable) * @param {number} friction - Constraint friction. * @param {number} nocollide - Whether the entities should be no-collided. * @param {Vector} LocalAxis - If you include the LocalAxis then LPos2 will not be used in the final constraint. However, LPos2 is still a required argument. * @param {boolean} DontAddTable - Whether or not to add the constraint info on the entity table. See @constraint.AddConstraintTable. * @returns {Entity} - Constraint. Will return false if the constraint could not be created. **/ export function Axis(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, forcelimit: number, torquelimit: number, friction: number, nocollide: number, LocalAxis: Vector, DontAddTable: boolean): Entity /** * * Creates an advanced ballsocket (ragdoll) constraint. * Uses a https://developer.valvesoftware.com/wiki/Phys_ragdollconstraint * * @name constraint.AdvBallsocket * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/AdvBallsocket * @param {void} this - no description * @param {Entity} Ent1 - First entity. * @param {Entity} Ent2 - Second entity. * @param {number} Bone1 - Bone of first entity (0 for non-ragdolls) * @param {number} Bone2 - Bone of second entity (0 for non-ragdolls) * @param {Vector} LPos1 - Position on the first entity, in its local space coordinates. * @param {Vector} LPos2 - Position on the second entity, in its local space coordinates. * @param {number} forcelimit - Amount of force until it breaks (0 = unbreakable) * @param {number} torquelimit - Amount of torque (rotation speed) until it breaks (0 = unbreakable) * @param {number} xmin - Minimum angle in rotations around the X axis local to the constraint. * @param {number} ymin - Minimum angle in rotations around the Y axis local to the constraint. * @param {number} zmin - Minimum angle in rotations around the Z axis local to the constraint. * @param {number} xmax - Maximum angle in rotations around the X axis local to the constraint. * @param {number} ymax - Maximum angle in rotations around the Y axis local to the constraint. * @param {number} zmax - Maximum angle in rotations around the Z axis local to the constraint. * @param {number} xfric - Rotational friction in the X axis local to the constraint. * @param {number} yfric - Rotational friction in the Y axis local to the constraint. * @param {number} zfric - Rotational friction in the Z axis local to the constraint. * @param {number} onlyrotation - Only limit rotation, free movement. * @param {number} nocollide - Whether the entities should be no-collided. * @returns {Entity} - A phys_ragdollconstraint entity. Will return false if the constraint could not be created. **/ export function AdvBallsocket(this: void, Ent1: Entity, Ent2: Entity, Bone1: number, Bone2: number, LPos1: Vector, LPos2: Vector, forcelimit: number, torquelimit: number, xmin: number, ymin: number, zmin: number, xmax: number, ymax: number, zmax: number, xfric: number, yfric: number, zfric: number, onlyrotation: number, nocollide: number): Entity /** * * Stores info about the constraints on the entity's table. The only difference between this and @constraint.AddConstraintTable is that the constraint does not get deleted when the entity is removed. * * @name constraint.AddConstraintTableNoDelete * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/AddConstraintTableNoDelete * @param {void} this - no description * @param {Entity} ent1 - The entity to store the information on. * @param {Entity} constrt - The constraint to store in the entity's table. * @param {Entity} ent2 - Optional. If different from *ent1*, the info will also be stored in the table for this entity. * @param {Entity} ent3 - Optional. Same as *ent2*. * @param {Entity} ent4 - Optional. Same as *ent2*. * @returns {void} **/ export function AddConstraintTableNoDelete(this: void, ent1: Entity, constrt: Entity, ent2?: Entity, ent3?: Entity, ent4?: Entity): void /** * * Stores information about constraints in an entity's table. * * @name constraint.AddConstraintTable * @realm server * @wiki https://wiki.garrysmod.com/page/constraint/AddConstraintTable * @param {void} this - no description * @param {Entity} ent1 - The entity to store the information on. * @param {Entity} constrt - The constraint to store in the entity's table. * @param {Entity} ent2 - Optional. If different from *ent1*, the info will also be stored in the table for this entity. * @param {Entity} ent3 - Optional. Same as *ent2*. * @param {Entity} ent4 - Optional. Same as *ent2*. * @returns {void} **/ export function AddConstraintTable(this: void, ent1: Entity, constrt: Entity, ent2?: Entity, ent3?: Entity, ent4?: Entity): void } declare namespace concommand { /** * @type concommandAddCallback * @param {void} this - no description * @param {Player} ply - The player that ran the concommand. NULL entity if command was entered with the dedicated server console. * @param {string} cmd - The concommand string (if one callback is used for several concommands). * @param {string[]} args - A table of all string arguments. * @param {string} argStr - The arguments as a string. **/ type concommandAddCallback = (this: void, ply: Player, cmd: string, args: string[], argStr: string) => unknown /** * @type concommandAddAutoComplete * @param {void} this - no description * @param {string} cmd - The concommand this autocompletion is for. * @param {string} args - The arguments typed so far. **/ type concommandAddAutoComplete = (this: void, cmd?: string, args?: string) => unknown /** * * Used by the engine to run a console command's callback function. This will only be called for commands that were added with @AddConsoleCommand function, which @concommand.Add calls internally. An error is sent to the player's chat if no callback is found. * This will still be called for concommands removed with @concommand.Remove but will return false. * * @name concommand.Run * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/concommand/Run * @internal You might be looking for @RunConsoleCommand function or @Player:ConCommand. * @param {void} this - no description * @param {Player} ply - Player to run concommand on * @param {string} cmd - Command name * @param {any} args - Command arguments. * Can be table or string * @param {string} argumentString - string of all arguments sent to the command * @returns {boolean} - *true* if the console command with the given name exists, and *false* if it doesn't. **/ export function Run(this: void, ply: Player, cmd: string, args: any, argumentString: string): boolean /** * * Removes a console command. * * @name concommand.Remove * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/concommand/Remove * @bug #1183 This will not always remove the command from auto-complete. * @bug #1183 @concommand.Add will fail if the concommand was previously removed with this function in a different realm (creating a command on the client that was removed from the server and vice-versa). * @param {void} this - no description * @param {string} name - The name of the command to be removed. * @returns {void} **/ export function Remove(this: void, name: string): void /** * * Returns the tables of all console command callbacks, and autocomplete functions, that were added to the game with @concommand.Add. * * @name concommand.GetTable * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/concommand/GetTable * @param {void} this - no description * @returns {table} - Table of command callback functions. * @returns {table} - Table of command autocomplete functions. * @tupleReturn **/ export function GetTable(this: void): [table, table] /** * * Used by the engine to call the autocomplete function for a console command, and retrieve returned options. * * @name concommand.AutoComplete * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/concommand/AutoComplete * @internal * @param {void} this - no description * @param {string} command - Name of command * @param {string} arguments - Arguments given to the command * @returns {table} - Possibilities for auto-completion. This is the return value of the auto-complete callback. **/ export function AutoComplete(this: void, command: string, arguments: string): table /** * * Creates a console command that runs a function in lua with optional autocompletion function and help text. * * @name concommand.Add * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/concommand/Add * @bug #1183 This will fail if the concommand was previously removed with @concommand.Remove in a different realm (creating a command on the client that was removed from the server and vice-versa). * @param {void} this - no description * @param {string} name - The command name to be used in console. * This cannot be a name of existing console command or console variable. It will silently fail if it is. * @param {function} callback - The function to run when the concommand is executed. Arguments passed are: * @param {function} autoComplete - The function to call which should return a table of options for autocompletion. ([Autocompletion Tutorial](https://wiki.garrysmod.com/page/Autocomplete%20Tutorial)) * This only properly works on the client since it is **not** networked. Arguments passed are: * @param {string} helpText - The text to display should a user run 'help cmdName'. * @param {FCVAR} flags - Concommand modifier flags. See @FCVAR enum. * @returns {void} **/ export function Add(this: void, name: string, callback: concommandAddCallback, autoComplete?: concommandAddAutoComplete, helpText?: string, flags?: FCVAR): void } declare namespace cleanup { /** * * Repopulates the clients cleanup menu * * @name cleanup.UpdateUI * @realm client * @wiki https://wiki.garrysmod.com/page/cleanup/UpdateUI * @param {void} this - no description * @returns {void} **/ export function UpdateUI(this: void): void /** * * Replaces one entity in the cleanup module with another * * @name cleanup.ReplaceEntity * @realm server * @wiki https://wiki.garrysmod.com/page/cleanup/ReplaceEntity * @param {void} this - no description * @param {Entity} from - Old entity * @param {Entity} to - New entity * @returns {boolean} - Whether any action was taken. **/ export function ReplaceEntity(this: void, from: Entity, to: Entity): boolean /** * * Registers a new cleanup type. * * @name cleanup.Register * @realm client, server * @wiki https://wiki.garrysmod.com/page/cleanup/Register * @param {void} this - no description * @param {string} type - Name of type. * @returns {void} **/ export function Register(this: void, type: string): void /** * * Gets the table of cleanup types. * * @name cleanup.GetTable * @realm client, server * @wiki https://wiki.garrysmod.com/page/cleanup/GetTable * @param {void} this - no description * @returns {table} - cleanup_types **/ export function GetTable(this: void): table /** * * Gets the cleanup list. * * @name cleanup.GetList * @realm server * @wiki https://wiki.garrysmod.com/page/cleanup/GetList * @param {void} this - no description * @returns {void} **/ export function GetList(this: void): void /** * * Called by the *gmod_cleanup* console command. Allows players to cleanup their own props. * * @name cleanup.CC_Cleanup * @realm server * @wiki https://wiki.garrysmod.com/page/cleanup/CC Cleanup * @internal * @param {void} this - no description * @param {Player} pl - The player that called the console command. * @param {string} command - The console command that called this function. * @param {table} args - First and only arg is the cleanup type. * @returns {void} **/ export function CC_Cleanup(this: void, pl: Player, command: string, args: table): void /** * * Adds an entity to a player's cleanup list. * * @name cleanup.Add * @realm server * @wiki https://wiki.garrysmod.com/page/cleanup/Add * @param {void} this - no description * @param {Player} pl - Who's cleanup list to add the entity to. * @param {string} type - The type of cleanup. * @param {Entity} ent - The entity to add to the player's cleanup list. * @returns {void} **/ export function Add(this: void, pl: Player, type: string, ent: Entity): void /** * * Called by the *gmod_admin_cleanup* console command. Allows admins to clean up the server. * * @name cleanup.CC_AdminCleanup * @realm server * @wiki https://wiki.garrysmod.com/page/cleanup/CC AdminCleanup * @internal * @param {void} this - no description * @param {Player} pl - The player that called the console command. * @param {string} command - The console command that called this function. * @param {table} args - First and only arg is the cleanup type. * @returns {void} **/ export function CC_AdminCleanup(this: void, pl: Player, command: string, args: table): void } declare namespace chat { /** * * Plays the chat "tick" sound. * * @name chat.PlaySound * @realm client * @wiki https://wiki.garrysmod.com/page/chat/PlaySound * @param {void} this - no description * @returns {void} **/ export function PlaySound(this: void): void /** * * Opens the chat window. * * @name chat.Open * @realm client * @wiki https://wiki.garrysmod.com/page/chat/Open * @param {void} this - no description * @param {number} mode - If equals 1, opens public chat, otherwise opens team chat * @returns {void} **/ export function Open(this: void, mode: number): void /** * * Returns the chatbox size. * * @name chat.GetChatBoxSize * @realm client * @wiki https://wiki.garrysmod.com/page/chat/GetChatBoxSize * @param {void} this - no description * @returns {number} - The width of the chatbox. * @returns {number} - The height of the chatbox. * @tupleReturn **/ export function GetChatBoxSize(this: void): [number, number] /** * * Returns the chatbox position. * * @name chat.GetChatBoxPos * @realm client * @wiki https://wiki.garrysmod.com/page/chat/GetChatBoxPos * @param {void} this - no description * @returns {number} - The X coordinate of the chatbox's position. * @returns {number} - The Y coordinate of the chatbox's position. * @tupleReturn **/ export function GetChatBoxPos(this: void): [number, number] /** * * Adds text to the local player's chat box (which only they can read). * * @name chat.AddText * @realm client * @wiki https://wiki.garrysmod.com/page/chat/AddText * @param {void} this - no description * @param {table | string | Player | any | Entity} ...arguments - The arguments. Arguments can be: * * @table type - @IColor structure. Will set the color for all following strings until the next Color argument. * * @string type - Text to be added to the chat box. * * @Player type - Adds the name of the player in the player's team color to the chat box. * * @any type - Any other type, such as @Entity type will be converted to string and added as text. * @returns {void} **/ export function AddText(this: void, ...arguments: table | string | Player | any | Entity): void /** * * Closes the chat window. * * @name chat.Close * @realm client * @wiki https://wiki.garrysmod.com/page/chat/Close * @param {void} this - no description * @returns {void} **/ export function Close(this: void): void } declare namespace cam { /** * * Sets up a new 3d context using orthographic projection. * * @name cam.StartOrthoView * @realm client * @wiki https://wiki.garrysmod.com/page/cam/StartOrthoView * @param {void} this - no description * @param {number} leftOffset - The left plane offset. * @param {number} topOffset - The top plane offset. * @param {number} rightOffset - The right plane offset. * @param {number} bottomOffset - The bottom plane offset. * @returns {void} **/ export function StartOrthoView(this: void, leftOffset: number, topOffset: number, rightOffset: number, bottomOffset: number): void /** * * Sets up a new 2D rendering context. Must be finished by @cam.End3D2D. This function pushes a new matrix onto the stack. (@cam.PushModelMatrix) * * @name cam.Start3D2D * @realm client * @wiki https://wiki.garrysmod.com/page/cam/Start3D2D * @rendering function:3d * @param {void} this - no description * @param {Vector} pos - Origin of the 3D2D context, ie. the top left corner, (0, 0). * @param {Angle} angles - Angles of the 3D2D context. * +x in the 2d context corresponds to +x of the angle (its forward direction). * +y in the 2d context corresponds to -y of the angle (its right direction). * If (dx, dy) are your desired (+x, +y) unit vectors, the angle you want is dx:AngleEx(dx:Cross(-dy)). * @param {number} scale - The scale of the render context. * If scale is 1 then 1 pixel in 2D context will equal to 1 unit in 3D context. * @returns {void} **/ export function Start3D2D(this: void, pos: Vector, angles: Angle, scale: number): void /** * * Sets up a new 3D rendering context. Must be finished by @cam.End3D. * For more advanced settings such as an orthographic view, use @cam.Start instead. * * @name cam.Start3D * @realm client * @wiki https://wiki.garrysmod.com/page/cam/Start3D * @rendering start:3d * @bug #1995 Negative x/y values won't work. * @bug #2682 This will not update current view properties. * @param {void} this - no description * @param {Vector} pos - Render cam position. * @param {Angle} angles - Render cam angles. * @param {number} fov - Field of view. * @param {number} x - X coordinate of where to start the new view port. * @param {number} y - Y coordinate of where to start the new view port. * @param {number} w - Width of the new viewport. * @param {number} h - Height of the new viewport. * @param {number} zNear - Distance to near clipping plane. * @param {number} zFar - Distance to far clipping plane. * @returns {void} **/ export function Start3D(this: void, pos?: Vector, angles?: Angle, fov?: number, x?: number, y?: number, w?: number, h?: number, zNear?: number, zFar?: number): void /** * * Sets up a new 2D rendering context. Must be finished by @cam.End2D. * This is almost always used with a render target from the @render library. To set its position use @render.SetViewPort with a target already stored. * * @name cam.Start2D * @realm client * @wiki https://wiki.garrysmod.com/page/cam/Start2D * @rendering start:2d * @note This will put an identity matrix at the top of the model matrix stack. If you are trying to use @cam.PushModelMatrix, call it after this function and not before. * @param {void} this - no description * @returns {void} **/ export function Start2D(this: void): void /** * * Sets up a new rendering context. This is an extended version of @cam.Start3D and @cam.Start2D. Must be finished by @cam.End3D or @cam.End2D. * * @name cam.Start * @realm client * @wiki https://wiki.garrysmod.com/page/cam/Start * @bug #2682 This will not update current view properties for 3D contexts. * @param {void} this - no description * @param {RenderCamData} dataTbl - Render context config. See @RenderCamData structure * @returns {void} **/ export function Start(this: void, dataTbl: RenderCamData): void /** * * Pops the current active rendering matrix from the stack and reinstates the previous one. * * @name cam.PopModelMatrix * @realm client * @wiki https://wiki.garrysmod.com/page/cam/PopModelMatrix * @param {void} this - no description * @returns {void} **/ export function PopModelMatrix(this: void): void /** * * Pushes the specified matrix onto the render matrix stack. Unlike opengl, this will replace the current model matrix. * * @name cam.PushModelMatrix * @realm client * @wiki https://wiki.garrysmod.com/page/cam/PushModelMatrix * @param {void} this - no description * @param {VMatrix} matrix - The matrix to push. * @param {boolean} multiply - If set, multiplies given matrix with currently active matrix (@cam.GetModelMatrix) before pushing. * @returns {void} **/ export function PushModelMatrix(this: void, matrix: VMatrix, multiply?: boolean): void /** * * Switches the renderer back to the previous drawing mode from a 3D orthographic rendering context. * * @name cam.EndOrthoView * @realm client * @wiki https://wiki.garrysmod.com/page/cam/EndOrthoView * @param {void} this - no description * @returns {void} **/ export function EndOrthoView(this: void): void /** * * Switches the renderer back to the previous drawing mode from a 3D2D context. * * @name cam.End3D2D * @realm client * @wiki https://wiki.garrysmod.com/page/cam/End3D2D * @bug #1091 This will crash the game if there is no context to end. * @param {void} this - no description * @returns {void} **/ export function End3D2D(this: void): void /** * * Returns the currently active model matrix. (TODO: Does this actually mean the matrix on top of the stack? Probably) * * @name cam.GetModelMatrix * @realm client * @wiki https://wiki.garrysmod.com/page/cam/GetModelMatrix * @param {void} this - no description * @returns {VMatrix} - The currently active matrix. **/ export function GetModelMatrix(this: void): VMatrix /** * * Switches the renderer back to the previous drawing mode from a 3D context. * * @name cam.End3D * @realm client * @wiki https://wiki.garrysmod.com/page/cam/End3D * @bug #1091 This will crash the game if there is no context to end. * @param {void} this - no description * @returns {void} **/ export function End3D(this: void): void /** * * Switches the renderer back to the previous drawing mode from a 2D context. * * @name cam.End2D * @realm client * @wiki https://wiki.garrysmod.com/page/cam/End2D * @bug #1091 This will crash the game if there is no context to end. * @param {void} this - no description * @returns {void} **/ export function End2D(this: void): void /** * * Switches the renderer back to the previous drawing mode from a 3D context. * This function is an alias of @cam.End3D. * * @name cam.End * @realm client * @wiki https://wiki.garrysmod.com/page/cam/End * @bug #1091 This will crash the game if there is no context to end. * @param {void} this - no description * @returns {void} **/ export function End(this: void): void /** * * Tells the renderer to ignore the depth buffer and draw any upcoming operation "ontop" of everything that was drawn yet. * * @name cam.IgnoreZ * @realm client * @wiki https://wiki.garrysmod.com/page/cam/IgnoreZ * @param {void} this - no description * @param {boolean} ignoreZ - Determines whenever to ignore the depth buffer or not. * @returns {void} **/ export function IgnoreZ(this: void, ignoreZ: boolean): void /** * * Shakes the screen at a certain position. * * @name cam.ApplyShake * @realm client * @wiki https://wiki.garrysmod.com/page/cam/ApplyShake * @param {void} this - no description * @param {Vector} pos - Origin of the shake. * @param {Angle} angles - Angles of the shake. * @param {number} factor - The shake factor. * @returns {void} **/ export function ApplyShake(this: void, pos: Vector, angles: Angle, factor: number): void } declare namespace bit { /** * * Returns the hexadecimal representation of the number with the specified digits. * * @name bit.tohex * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/tohex * @param {void} this - no description * @param {number} value - The value to be normalized. * @param {number} digits - The number of digits. Optional * @returns {string} - hexString **/ export function tohex(this: void, value: number, digits?: number): string /** * * Normalizes the specified value and clamps it in the range of a signed 32bit integer. * * @name bit.tobit * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/tobit * @param {void} this - no description * @param {number} value - The value to be normalized. * @returns {number} - swapped **/ export function tobit(this: void, value: number): number /** * * Returns the right shifted value. * * @name bit.rshift * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/rshift * @param {void} this - no description * @param {number} value - The value to be manipulated. * @param {number} shiftCount - Amounts of bits to shift right by. * @returns {number} - shiftedValue **/ export function rshift(this: void, value: number, shiftCount: number): number /** * * Returns the right rotated value. * * @name bit.ror * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/ror * @param {void} this - no description * @param {number} value - The value to be manipulated. * @param {number} shiftCount - Amounts of bits to rotate right by. * @returns {number} - shiftedValue **/ export function ror(this: void, value: number, shiftCount: number): number /** * * Returns the left rotated value. * * @name bit.rol * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/rol * @param {void} this - no description * @param {number} value - The value to be manipulated. * @param {number} shiftCount - Amounts of bits to rotate left by. * @returns {number} - shiftedValue **/ export function rol(this: void, value: number, shiftCount: number): number /** * * Returns the left shifted value. * * @name bit.lshift * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/lshift * @param {void} this - no description * @param {number} value - The value to be manipulated. * @param {number} shiftCount - Amounts of bits to shift left by. * @returns {number} - shiftedValue **/ export function lshift(this: void, value: number, shiftCount: number): number /** * * Returns the bitwise xor of all values specified. * * @name bit.bxor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/bxor * @param {void} this - no description * @param {number} value - The value to be manipulated. * @param {number} otherValues - Values bit xor with. Optional. * @returns {number} - bitwiseXOr **/ export function bxor(this: void, value: number, otherValues?: number): number /** * * Swaps the byte order. * * @name bit.bswap * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/bswap * @param {void} this - no description * @param {number} value - The value to be byte swapped. * @returns {number} - swapped **/ export function bswap(this: void, value: number): number /** * * Returns the bitwise OR of all values specified. * * @name bit.bor * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/bor * @param {void} this - no description * @param {number} value1 - The first value. * @param {any[]} ...args - Extra values to be evaluated. (must all be numbers) * @returns {number} - The bitwise OR result between all numbers. **/ export function bor(this: void, value1: number, ...args: any[]): number /** * * Returns the bitwise not of the value. * * @name bit.bnot * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/bnot * @param {void} this - no description * @param {number} value - The value to be inverted. * @returns {number} - bitwiseNot **/ export function bnot(this: void, value: number): number /** * * Performs the bitwise "and" for all values specified. * * @name bit.band * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/band * @param {void} this - no description * @param {number} value - The value to be manipulated. * @param {number} otherValues - Values bit to perform bitwise "and" with. Optional. * @returns {number} - Result of bitwise "and" operation. **/ export function band(this: void, value: number, otherValues?: number): number /** * * Returns the arithmetically shifted value. * * @name bit.arshift * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/bit/arshift * @param {void} this - no description * @param {number} value - The value to be manipulated. * @param {number} shiftCount - Amounts of bits to shift. * @returns {number} - shiftedValue **/ export function arshift(this: void, value: number, shiftCount: number): number } declare namespace baseclass { /** * * Add a new base class that can be derived by others. This is done automatically for: * * widgets * * panels * * drive modes * * entities * * weapons * * gamemodes (with prefix "gamemode_") * * @name baseclass.Set * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/baseclass/Set * @param {void} this - no description * @param {string} name - The name of this base class. Must be completely unique. * @param {table} tab - The base class. * @returns {void} **/ export function Set(this: void, name: string, tab: table): void /** * * Gets the base class of an an object. * This is used not just by entities, but also by widgets, panels, drive modes, weapons and gamemodes (with "gamemode_" prefix). * The keyword **DEFINE_BASECLASS** translates into a call to this function. In the engine, it is replaced with: * ```local BaseClass = baseclass.Get``` * * @name baseclass.Get * @realm client, server, menu * @wiki https://wiki.garrysmod.com/page/baseclass/Get * @param {void} this - no description * @param {string} name - The child class. * @returns {table} - The base class's meta table. **/ export function Get(this: void, name: string): table } declare namespace ai_task { /** * * Create a new empty task. Used by @Schedule:AddTask and @Schedule:EngTask. * * @name ai_task.next * @realm server * @wiki https://wiki.garrysmod.com/page/ai task/New * @param {void} this - no description * @returns {Task} - The new task object. **/ export function next(this: void): Task } declare namespace ai_schedule { /** * * Creates a schedule for scripted NPC. * * @name ai_schedule.New * @realm server * @wiki https://wiki.garrysmod.com/page/ai schedule/New * @param {void} this - no description * @param {string} name - Name of the schedule. * @returns {table} - A table containing schedule information to be used with @EntityHooks:StartSchedule. **/ export function New(this: void, name: string): table } declare namespace ai { /** * * Translates a task name to its corresponding ID. * * @name ai.GetTaskID * @realm server * @wiki https://wiki.garrysmod.com/page/ai/GetTaskID * @param {void} this - no description * @param {string} task - The task name. * @returns {number} - The task ID, see [ai_task.h](https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/server/ai_task.h#L89-L502). Returns -1 if the schedule name isn't valid. **/ export function GetTaskID(this: void, task: string): number /** * * Translates a schedule name to its corresponding ID. * * @name ai.GetScheduleID * @realm server * @wiki https://wiki.garrysmod.com/page/ai/GetScheduleID * @param {void} this - no description * @param {string} sched - Then schedule name. In most cases, this will be the same as the @SCHED enum name. * @returns {SCHED} - The schedule ID, see @SCHED enum. Returns -1 if the schedule name isn't valid. **/ export function GetScheduleID(this: void, sched: string): SCHED } declare namespace achievements { /** * * Adds one to the count of how many times the spawnmenu has been opened. Once this count reaches 100,000, the 'Menu User' achievement is unlocked. * * @name achievements.SpawnMenuOpen * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/SpawnMenuOpen * @internal * @param {void} this - no description * @returns {void} **/ export function SpawnMenuOpen(this: void): void /** * * Adds one to the count of props spawned. Once this count reaches 5000, the 'Creator' achievement is unlocked. * * @name achievements.SpawnedProp * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/SpawnedProp * @internal * @param {void} this - no description * @returns {void} **/ export function SpawnedProp(this: void): void /** * * Adds one to the count of ragdolls spawned. Once this count reaches 2000, the 'Dollhouse' achievement is unlocked. * * @name achievements.SpawnedRagdoll * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/SpawnedRagdoll * @internal * @param {void} this - no description * @returns {void} **/ export function SpawnedRagdoll(this: void): void /** * * Adds one to the count of NPCs spawned. Once this count reaches 1000, the 'Procreator' achievement is unlocked. * * @name achievements.SpawnedNPC * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/SpawnedNPC * @internal * @param {void} this - no description * @returns {void} **/ export function SpawnedNPC(this: void): void /** * * Adds one to the count of things removed. Once this count reaches 5000, the 'Destroyer' achievement is unlocked. * * @name achievements.Remover * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/Remover * @internal * @param {void} this - no description * @returns {void} **/ export function Remover(this: void): void /** * * Adds one to the count of friendly NPCs killed. Once this count reaches 1000, the 'Bad Friend' achievement is unlocked. * * @name achievements.IncGoodies * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/IncGoodies * @internal * @param {void} this - no description * @returns {void} **/ export function IncGoodies(this: void): void /** * * Used in GMod 12 in the achievements menu to show the user if they have unlocked certain achievements. * * @name achievements.IsAchieved * @realm client, menu * @wiki https://wiki.garrysmod.com/page/achievements/IsAchieved * @param {void} this - no description * @param {number} AchievementID - Internal Achievement ID number * @returns {boolean} - Returns true if the given achievementID is achieved. **/ export function IsAchieved(this: void, AchievementID: number): boolean /** * * Adds one to the count of innocent animals killed. Once this count reaches 1000, the 'Innocent Bystander' achievement is unlocked. * * @name achievements.IncBystander * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/IncBystander * @internal * @param {void} this - no description * @returns {void} **/ export function IncBystander(this: void): void /** * * Adds one to the count of baddies killed. Once this count reaches 1000, the 'War Zone' achievement is unlocked. * * @name achievements.IncBaddies * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/IncBaddies * @internal * @param {void} this - no description * @returns {void} **/ export function IncBaddies(this: void): void /** * * Retrieves name of given achievement * * @name achievements.GetName * @realm client, menu * @wiki https://wiki.garrysmod.com/page/achievements/GetName * @param {void} this - no description * @param {number} achievementID - The ID of achievement to retrieve name of. Note: IDs start from 0, not 1. * @returns {string} - Name of an achievement **/ export function GetName(this: void, achievementID: number): string /** * * Retrieves progress goal of given achievement * * @name achievements.GetGoal * @realm client, menu * @wiki https://wiki.garrysmod.com/page/achievements/GetGoal * @param {void} this - no description * @param {number} achievementID - The ID of achievement to retrieve goal of. Note: IDs start from 0, not 1. * @returns {number} - Progress goal of an achievement **/ export function GetGoal(this: void, achievementID: number): number /** * * Retrieves description of given achievement * * @name achievements.GetDesc * @realm client, menu * @wiki https://wiki.garrysmod.com/page/achievements/GetDesc * @param {void} this - no description * @param {number} achievementID - The ID of achievement to retrieve description of. Note: IDs start from 0, not 1. * @returns {string} - Description of an achievement **/ export function GetDesc(this: void, achievementID: number): string /** * * Retrieves progress of given achievement * * @name achievements.GetCount * @realm client, menu * @wiki https://wiki.garrysmod.com/page/achievements/GetCount * @param {void} this - no description * @param {number} achievementID - The ID of achievement to retrieve progress of. Note: IDs start from 0, not 1. * @returns {void} **/ export function GetCount(this: void, achievementID: number): void /** * * Adds one to the count of balls eaten. Once this count reaches 200, the 'Ball Eater' achievement is unlocked. * * @name achievements.EatBall * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/EatBall * @internal * @param {void} this - no description * @returns {void} **/ export function EatBall(this: void): void /** * * Adds one to the count of balloons burst. Once this count reaches 1000, the 'Popper' achievement is unlocked. * * @name achievements.BalloonPopped * @realm client * @wiki https://wiki.garrysmod.com/page/achievements/BalloonPopped * @internal * @param {void} this - no description * @returns {void} **/ export function BalloonPopped(this: void): void /** * * Returns the amount of achievements in Garry's Mod. * * @name achievements.Count * @realm client, menu * @wiki https://wiki.garrysmod.com/page/achievements/Count * @param {void} this - no description * @returns {number} - The amount of achievements available. **/ export function Count(this: void): number }