├── README.md ├── images └── logo.png ├── language-configuration.json ├── package.json ├── snippets ├── classFuncs.json ├── custom.json ├── enums.json ├── funcs.json ├── globals.json ├── hooks.json ├── keywords.json └── panelFuncs.json └── syntaxes └── lua.tmLanguage /README.md: -------------------------------------------------------------------------------- 1 | VSCode GLua syntax highlighting, autocomplete and useful snippets. It will automatically work on any .lua file you open. 2 | 3 | ![giff](https://fi1.es/lsJlS/download) 4 | 5 | Credits to Falco for lua.tmLanguage and JohnnyCrazy for glua-scrapper 6 | 7 | Get it here: https://marketplace.visualstudio.com/items?itemName=aStonedPenguin.glua 8 | -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuperiorServers/vscode-glua/b998ccd777781010986c0e0688e0147ca4ee7041/images/logo.png -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": "--", 4 | "blockComment": [ "--[[", "]]" ] 5 | }, 6 | "brackets": [ 7 | ["{", "}"], 8 | ["[", "]"], 9 | ["(", ")"] 10 | ], 11 | "autoClosingPairs": [ 12 | ["{", "}"], 13 | ["[", "]"], 14 | ["(", ")"], 15 | ["\"", "\""], 16 | ["'", "'"], 17 | { "open": "/*", "close": "\n\n*/", "notIn": ["string", "comment"] }, 18 | { "open": "--[[", "close": "\n\n]]", "notIn": ["string", "comment"] } 19 | ], 20 | "surroundingPairs": [ 21 | ["{", "}"], 22 | ["[", "]"], 23 | ["(", ")"], 24 | ["\"", "\""], 25 | ["'", "'"] 26 | ] 27 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "glua", 3 | "description": "GLua language support for Visual Studio Code", 4 | "version": "1.1.0", 5 | "engines": { 6 | "vscode": "^0.10.1" 7 | }, 8 | "icon": "images/logo.png", 9 | "publisher": "aStonedPenguin", 10 | "categories": [ 11 | "Languages", 12 | "Snippets" 13 | ], 14 | "contributes": { 15 | "snippets": [ 16 | { 17 | "language": "glua", 18 | "path": "./snippets/custom.json" 19 | }, 20 | { 21 | "language": "glua", 22 | "path": "./snippets/enums.json" 23 | }, 24 | { 25 | "language": "glua", 26 | "path": "./snippets/classFuncs.json" 27 | }, 28 | { 29 | "language": "glua", 30 | "path": "./snippets/funcs.json" 31 | }, 32 | { 33 | "language": "glua", 34 | "path": "./snippets/globals.json" 35 | }, 36 | { 37 | "language": "glua", 38 | "path": "./snippets/hooks.json" 39 | }, 40 | { 41 | "language": "glua", 42 | "path": "./snippets/panelFuncs.json" 43 | }, 44 | { 45 | "language": "glua", 46 | "path": "./snippets/keywords.json" 47 | } 48 | ], 49 | "languages": [ 50 | { 51 | "id": "glua", 52 | "aliases": [ 53 | "GLua" 54 | ], 55 | "extensions": [ 56 | ".lua" 57 | ], 58 | "configuration": "./language-configuration.json" 59 | } 60 | ], 61 | "grammars": [ 62 | { 63 | "language": "glua", 64 | "scopeName": "source.lua", 65 | "path": "./syntaxes/lua.tmLanguage" 66 | } 67 | ] 68 | } 69 | } -------------------------------------------------------------------------------- /snippets/custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "a-comment": 3 | { 4 | "body": 5 | [ 6 | "--[[", 7 | "\t$0", 8 | "]]" 9 | ], 10 | "prefix": "a-comment", 11 | "description": "Makes a block comment" 12 | }, 13 | "a-forloop": 14 | { 15 | "body": 16 | [ 17 | "for ${1:var} = ${2:index}, ${3:count} do", 18 | "\t$0", 19 | "end" 20 | ], 21 | "prefix": "a-forloop", 22 | "description": "Makes a for loop" 23 | }, 24 | "a-pairsloop": 25 | { 26 | "body": 27 | [ 28 | "for ${1:key}, ${2:value} in pairs(${3:table}) do", 29 | "\t$0", 30 | "end" 31 | ], 32 | "prefix": "a-pairsloop", 33 | "description": "Makes a pairs loop" 34 | }, 35 | "a-ipairsloop": 36 | { 37 | "body": 38 | [ 39 | "for ${1:key}, ${2:value} in ipairs(${3:table}) do", 40 | "\t$0", 41 | "end" 42 | ], 43 | "prefix": "a-ipairsloop", 44 | "description": "Makes an ipairs loop" 45 | } 46 | } -------------------------------------------------------------------------------- /snippets/globals.json: -------------------------------------------------------------------------------- 1 | { 2 | "_G.AccessorFunc": { 3 | "prefix": "AccessorFunc", 4 | "body": "AccessorFunc(${1:table tab}, ${2:any key}, ${3:string name}, ${4:number force=nil})$0", 5 | "description": "(All) Function: _G.AccessorFunc\n\nAdds simple Get/Set accessor functions on the specified table." 6 | }, 7 | "_G.Add_NPC_Class": { 8 | "prefix": "Add_NPC_Class", 9 | "body": "Add_NPC_Class(${1:string name})$0", 10 | "description": "(All) Function: _G.Add_NPC_Class\n\nDefines a global entity class variable with an automatic value in order to prevent collisions with other Enum.CLASS. You should prefix your variable with CLASS_ for consistency." 11 | }, 12 | "_G.AddBackgroundImage": { 13 | "prefix": "AddBackgroundImage", 14 | "body": "AddBackgroundImage(${1:string path})$0", 15 | "description": "(Menu) Function: _G.AddBackgroundImage\n\nAdds the specified image path to the main menu background pool. Image can be png or jpeg." 16 | }, 17 | "_G.AddConsoleCommand": { 18 | "prefix": "AddConsoleCommand", 19 | "body": "AddConsoleCommand(${1:string name}, ${2:string helpText}, ${3:number flags})$0", 20 | "description": "(All) Function: _G.AddConsoleCommand\n\n[Internal] .Use concommand.Run instead.Tells the engine to register a console command. If the command was ran, the engine calls concommand.Run." 21 | }, 22 | "_G.AddCSLuaFile": { 23 | "prefix": "AddCSLuaFile", 24 | "body": "AddCSLuaFile(${1:string file=current file})$0", 25 | "description": "(Shared) Function: _G.AddCSLuaFile\n\nMarks 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." 26 | }, 27 | "_G.AddonMaterial": { 28 | "prefix": "AddonMaterial", 29 | "body": "AddonMaterial(${1:string name})$0", 30 | "description": "(Client and Menu) Function: _G.AddonMaterial\n\nLoads the specified image from the /cache folder, used in combination steamworks.Download." 31 | }, 32 | "_G.AddOriginToPVS": { 33 | "prefix": "AddOriginToPVS", 34 | "body": "AddOriginToPVS(${1:Vector position})$0", 35 | "description": "(Server) Function: _G.AddOriginToPVS\n\nAdds the specified vector to the PVS which is currently building. This allows all objects in visleafs visible from that vector to be drawn." 36 | }, 37 | "_G.AddWorldTip": { 38 | "prefix": "AddWorldTip", 39 | "body": "AddWorldTip(${1:number entindex=nil}, ${2:string text}, ${3:number dieTime=SysTime() + 0.05}, ${4:Vector pos=ent:GetPos()}, ${5:Entity ent=nil})$0", 40 | "description": "(Client) Function: _G.AddWorldTip\n\nThis function creates a World Tip, similar to the one shown when aiming at a Thruster where it shows you its force." 41 | }, 42 | "_G.Angle": { 43 | "prefix": "Angle", 44 | "body": "Angle(${1:number pitch=0}, ${2:number yaw=0}, ${3:number roll=0})$0", 45 | "description": "(All) Function: _G.Angle\n\nCreates an Angle object." 46 | }, 47 | "_G.AngleRand": { 48 | "prefix": "AngleRand", 49 | "body": "AngleRand()$0", 50 | "description": "(All) Function: _G.AngleRand\n\nReturns an angle with a randomized pitch, yaw and roll, first one between -90 and 90, the rest between -180 and 180 degrees." 51 | }, 52 | "_G.assert": { 53 | "prefix": "assert", 54 | "body": "assert(${1:any expression}, ${2:string errorMessage=\"assertion failed!\"})$0", 55 | "description": "(All) Function: _G.assert\n\nIf the result of the first argument is false or nil, an error is thrown with the second argument as the message." 56 | }, 57 | "_G.BroadcastLua": { 58 | "prefix": "BroadcastLua", 59 | "body": "BroadcastLua(${1:string code})$0", 60 | "description": "(Server) Function: _G.BroadcastLua\n\nSends the specified Lua code to all connected clients and executes it." 61 | }, 62 | "_G.BuildNetworkedVarsTable": { 63 | "prefix": "BuildNetworkedVarsTable", 64 | "body": "BuildNetworkedVarsTable()$0", 65 | "description": "(Shared) Function: _G.BuildNetworkedVarsTable\n\nDumps the networked variables of all entities into one table and returns it." 66 | }, 67 | "_G.CancelLoading": { 68 | "prefix": "CancelLoading", 69 | "body": "CancelLoading()$0", 70 | "description": "(Menu) Function: _G.CancelLoading\n\nAborts joining of the server you are currently joining." 71 | }, 72 | "_G.ChangeBackground": { 73 | "prefix": "ChangeBackground", 74 | "body": "ChangeBackground(${1:string currentgm})$0", 75 | "description": "(Menu) Function: _G.ChangeBackground\n\nSets the active main menu background image to a random entry from the background images pool. Images are added with _G.AddBackgroundImage." 76 | }, 77 | "_G.ChangeTooltip": { 78 | "prefix": "ChangeTooltip", 79 | "body": "ChangeTooltip(${1:Panel panel})$0", 80 | "description": "(Client and Menu) Function: _G.ChangeTooltip\n\nAutomatically called by the engine when a panel is hovered over with the mouse" 81 | }, 82 | "_G.ClearBackgroundImages": { 83 | "prefix": "ClearBackgroundImages", 84 | "body": "ClearBackgroundImages()$0", 85 | "description": "(Menu) Function: _G.ClearBackgroundImages\n\nEmpties the pool of main menu background images." 86 | }, 87 | "_G.ClientsideModel": { 88 | "prefix": "ClientsideModel", 89 | "body": "ClientsideModel(${1:string model}, ${2:number renderGroup=RENDERGROUP_OTHER})$0", 90 | "description": "(Client) Function: _G.ClientsideModel\n\nCreates a non physical entity that only exists on the client." 91 | }, 92 | "_G.ClientsideRagdoll": { 93 | "prefix": "ClientsideRagdoll", 94 | "body": "ClientsideRagdoll(${1:string model}, ${2:number renderGroup=RENDER_GROUP_OPAQUE})$0", 95 | "description": "(Client) Function: _G.ClientsideRagdoll\n\nCreates a fully clientside ragdoll." 96 | }, 97 | "_G.ClientsideScene": { 98 | "prefix": "ClientsideScene", 99 | "body": "ClientsideScene(${1:string name}, ${2:Entity targetEnt})$0", 100 | "description": "(Client) Function: _G.ClientsideScene\n\nCreates a scene entity based on the scene name and the entity." 101 | }, 102 | "_G.CloseDermaMenus": { 103 | "prefix": "CloseDermaMenus", 104 | "body": "CloseDermaMenus()$0", 105 | "description": "(Client and Menu) Function: _G.CloseDermaMenus\n\nCloses all Derma menus that have been passed to _G.RegisterDermaMenuForClose and calls GM.CloseDermaMenus" 106 | }, 107 | "_G.collectgarbage": { 108 | "prefix": "collectgarbage", 109 | "body": "collectgarbage(${1:string action=\"collect\"}, ${2:number arg})$0", 110 | "description": "(All) Function: _G.collectgarbage\n\nExecutes the specified action on the garbage collector." 111 | }, 112 | "_G.Color": { 113 | "prefix": "Color", 114 | "body": "Color(${1:number r}, ${2:number g}, ${3:number b}, ${4:number a=255})$0", 115 | "description": "(All) Function: _G.Color\n\nCreates a Color." 116 | }, 117 | "_G.ColorAlpha": { 118 | "prefix": "ColorAlpha", 119 | "body": "ColorAlpha(${1:table color}, ${2:number alpha})$0", 120 | "description": "(All) Function: _G.ColorAlpha\n\nReturns a new Color with the RGB components of the given Color and the alpha value specified." 121 | }, 122 | "_G.ColorRand": { 123 | "prefix": "ColorRand", 124 | "body": "ColorRand(${1:boolean a=false})$0", 125 | "description": "(All) Function: _G.ColorRand\n\nCreates a Color with randomized red, green, and blue components. If the alpha argument is true, alpha will also be randomized." 126 | }, 127 | "_G.ColorToHSV": { 128 | "prefix": "ColorToHSV", 129 | "body": "ColorToHSV(${1:table color})$0", 130 | "description": "(All) Function: _G.ColorToHSV\n\nConverts a Color into HSV color space." 131 | }, 132 | "_G.CompileFile": { 133 | "prefix": "CompileFile", 134 | "body": "CompileFile(${1:string path})$0", 135 | "description": "(Shared) Function: _G.CompileFile\n\nAttempts to compile the given file. If successful, returns a function that can be called to perform the actual execution of the script." 136 | }, 137 | "_G.CompileString": { 138 | "prefix": "CompileString", 139 | "body": "CompileString(${1:string code}, ${2:string identifier}, ${3:boolean HandleError=true})$0", 140 | "description": "(All) Function: _G.CompileString\n\nThis function will compile the code argument as lua code and return a function that will execute that code. " 141 | }, 142 | "_G.ConsoleAutoComplete": { 143 | "prefix": "ConsoleAutoComplete", 144 | "body": "ConsoleAutoComplete(${1:string text})$0", 145 | "description": "(Menu) Function: _G.ConsoleAutoComplete\n\nReturns a table of console command names beginning with the given text." 146 | }, 147 | "_G.ConVarExists": { 148 | "prefix": "ConVarExists", 149 | "body": "ConVarExists(${1:string name})$0", 150 | "description": "(All) Function: _G.ConVarExists\n\nReturns whether a ConVar with the given name exists or not" 151 | }, 152 | "_G.CreateClientConVar": { 153 | "prefix": "CreateClientConVar", 154 | "body": "CreateClientConVar(${1:string name}, ${2:string default}, ${3:boolean shouldsave=true}, ${4:boolean userdata=false}, ${5:string helptext=\"\"})$0", 155 | "description": "(All) Function: _G.CreateClientConVar\n\nMakes a clientside-only console variable" 156 | }, 157 | "_G.CreateConVar": { 158 | "prefix": "CreateConVar", 159 | "body": "CreateConVar(${1:string name}, ${2:string value}, ${3:number flags}, ${4:string helptext})$0", 160 | "description": "(All) Function: _G.CreateConVar\n\nCreates a console variable (ConVar), in general these are for things like gamemode/server settings." 161 | }, 162 | "_G.CreateMaterial": { 163 | "prefix": "CreateMaterial", 164 | "body": "CreateMaterial(${1:string name}, ${2:string shaderName}, ${3:table materialData})$0", 165 | "description": "(Client and Menu) Function: _G.CreateMaterial\n\nCreates a new material with the specified name and shader." 166 | }, 167 | "_G.CreateParticleSystem": { 168 | "prefix": "CreateParticleSystem", 169 | "body": "CreateParticleSystem(${1:Entity ent}, ${2:string effect}, ${3:number partAttachment}, ${4:number entAttachment=0}, ${5:Vector offset=Vector( 0, 0, 0 )})$0", 170 | "description": "(Client) Function: _G.CreateParticleSystem\n\nCreates a new particle system" 171 | }, 172 | "_G.CreateSound": { 173 | "prefix": "CreateSound", 174 | "body": "CreateSound(${1:Entity targetEnt}, ${2:string soundName}, ${3:CRecipientFilter filter=[https://developer.valvesoftware.com/wiki/CRecipientFilter#Derived_classes CPASAttenuationFilter]})$0", 175 | "description": "(Shared) Function: _G.CreateSound\n\nReturns a sound parented to the specified entity." 176 | }, 177 | "_G.CreateSprite": { 178 | "prefix": "CreateSprite", 179 | "body": "CreateSprite(${1:IMaterial material})$0", 180 | "description": "(Client) Function: _G.CreateSprite\n\nCreates and returns a new DSprite element with the supplied material." 181 | }, 182 | "_G.CurTime": { 183 | "prefix": "CurTime", 184 | "body": "CurTime()$0", 185 | "description": "(All) Function: _G.CurTime\n\nReturns the uptime of the server in seconds (to at least 4 decimal places)" 186 | }, 187 | "_G.DamageInfo": { 188 | "prefix": "DamageInfo", 189 | "body": "DamageInfo()$0", 190 | "description": "(Shared) Function: _G.DamageInfo\n\nReturns an CTakeDamageInfo object." 191 | }, 192 | "_G.DebugInfo": { 193 | "prefix": "DebugInfo", 194 | "body": "DebugInfo(${1:number slot}, ${2:string info})$0", 195 | "description": "(All) Function: _G.DebugInfo\n\nWrites text to the right hand side of the screen, like the old error system. Messages disappear after a couple of seconds." 196 | }, 197 | "_G.DeriveGamemode": { 198 | "prefix": "DeriveGamemode", 199 | "body": "DeriveGamemode(${1:string base})$0", 200 | "description": "(Shared) Function: _G.DeriveGamemode\n\nRetrieves data from a gamemode to use in yours. This also sets a BaseClass field on your GM table to the gamemode you are deriving from. It appears that this function works by running the init and cl_init Lua files of the target gamemode, then overriding functions that appear in both the target and your gamemode with your gamemode's functions." 201 | }, 202 | "_G.Derma_Anim": { 203 | "prefix": "Derma_Anim", 204 | "body": "Derma_Anim(${1:string name}, ${2:Panel panel}, ${3:function func})$0", 205 | "description": "(Client and Menu) Function: _G.Derma_Anim\n\nCreates a new derma animation." 206 | }, 207 | "_G.Derma_DrawBackgroundBlur": { 208 | "prefix": "Derma_DrawBackgroundBlur", 209 | "body": "Derma_DrawBackgroundBlur(${1:Panel panel}, ${2:number startTime})$0", 210 | "description": "(Client and Menu) Function: _G.Derma_DrawBackgroundBlur\n\nDraws background blur around the given panel." 211 | }, 212 | "_G.Derma_Hook": { 213 | "prefix": "Derma_Hook", 214 | "body": "Derma_Hook(${1:Panel panel}, ${2:string functionName}, ${3:string hookName}, ${4:string typeName})$0", 215 | "description": "(Client and Menu) Function: _G.Derma_Hook\n\nCreates panel method that calls the supplied Derma skin hook via derma.SkinHook" 216 | }, 217 | "_G.Derma_Install_Convar_Functions": { 218 | "prefix": "Derma_Install_Convar_Functions", 219 | "body": "Derma_Install_Convar_Functions(${1:Panel target})$0", 220 | "description": "(Client and Menu) Function: _G.Derma_Install_Convar_Functions\n\nMakes the panel (usually an input of sorts) respond to changes in console variables by adding next functions to the panel:" 221 | }, 222 | "_G.Derma_Message": { 223 | "prefix": "Derma_Message", 224 | "body": "Derma_Message(${1:string Text}, ${2:string Title}, ${3:string Button})$0", 225 | "description": "(Client and Menu) Function: _G.Derma_Message\n\nCreates a derma window to display information" 226 | }, 227 | "_G.Derma_Query": { 228 | "prefix": "Derma_Query", 229 | "body": "Derma_Query(${1:string text=\"Message Text (Second Parameter)\"}, ${2:string title=\"Message Title (First Parameter)\"}, ${3:string btn1text}, ${4:function btn1func=nil}, ${5:string btn2text=nil}, ${6:function btn2func=nil}, ${7:string btn3text=nil}, ${8:function btn3func=nil}, ${9:string btn4text=nil}, ${10:function btn4func=nil})$0", 230 | "description": "(Client and Menu) Function: _G.Derma_Query\n\nShows a message box in the middle of the screen, with up to 4 buttons they can press." 231 | }, 232 | "_G.Derma_StringRequest": { 233 | "prefix": "Derma_StringRequest", 234 | "body": "Derma_StringRequest(${1:string title}, ${2:string subtitle}, ${3:string default}, ${4:function confirm}, ${5:function cancel=nil}, ${6:string confirmText=\"OK\"}, ${7:string cancelText=\"Cancel\"})$0", 235 | "description": "(Client and Menu) Function: _G.Derma_StringRequest\n\nCreates a derma window asking players to input a string." 236 | }, 237 | "_G.DermaMenu": { 238 | "prefix": "DermaMenu", 239 | "body": "DermaMenu(${1:Panel parent})$0", 240 | "description": "(Client and Menu) Function: _G.DermaMenu\n\nCreates a DMenu similar to a contextmenu and closes any current menus" 241 | }, 242 | "_G.DisableClipping": { 243 | "prefix": "DisableClipping", 244 | "body": "DisableClipping(${1:boolean disable})$0", 245 | "description": "(Client and Menu) Function: _G.DisableClipping\n\nSets whether rendering should be limited to being inside a panel or not." 246 | }, 247 | "_G.DOF_Kill": { 248 | "prefix": "DOF_Kill", 249 | "body": "DOF_Kill()$0", 250 | "description": "(Client) Function: _G.DOF_Kill\n\nCancels current DOF post-process effect started with _G.DOF_Start" 251 | }, 252 | "_G.DOF_Start": { 253 | "prefix": "DOF_Start", 254 | "body": "DOF_Start()$0", 255 | "description": "(Client) Function: _G.DOF_Start\n\nCancels any existing DOF post-process effects." 256 | }, 257 | "_G.DOFModeHack": { 258 | "prefix": "DOFModeHack", 259 | "body": "DOFModeHack()$0", 260 | "description": "(Client) Function: _G.DOFModeHack\n\nA hacky method used to fix some bugs regarding DoF." 261 | }, 262 | "_G.DrawBackground": { 263 | "prefix": "DrawBackground", 264 | "body": "DrawBackground()$0", 265 | "description": "(Menu) Function: _G.DrawBackground\n\n[Internal] Draws the currently active main menu background image and handles transitioning between background images." 266 | }, 267 | "_G.DrawBloom": { 268 | "prefix": "DrawBloom", 269 | "body": "DrawBloom(${1:number Darken}, ${2:number Multiply}, ${3:number SizeX}, ${4:number SizeY}, ${5:number Passes}, ${6:number ColorMultiply}, ${7:number Red}, ${8:number Green}, ${9:number Blue})$0", 270 | "description": "(Client) Function: _G.DrawBloom\n\nDraws the bloom shader, which creates a glowing effect from bright objects." 271 | }, 272 | "_G.DrawColorModify": { 273 | "prefix": "DrawColorModify", 274 | "body": "DrawColorModify(${1:table modifyParameters})$0", 275 | "description": "(Client) Function: _G.DrawColorModify\n\nDraws the Color Modify shader, which can be used to adjust colors on screen." 276 | }, 277 | "_G.DrawMaterialOverlay": { 278 | "prefix": "DrawMaterialOverlay", 279 | "body": "DrawMaterialOverlay(${1:string Material}, ${2:number RefractAmount})$0", 280 | "description": "(Client) Function: _G.DrawMaterialOverlay\n\nDraws a material overlay on the screen." 281 | }, 282 | "_G.DrawMotionBlur": { 283 | "prefix": "DrawMotionBlur", 284 | "body": "DrawMotionBlur(${1:number AddAlpha}, ${2:number DrawAlpha}, ${3:number Delay})$0", 285 | "description": "(Client) Function: _G.DrawMotionBlur\n\nCreates a motion blur effect by drawing your screen multiple times." 286 | }, 287 | "_G.DrawSharpen": { 288 | "prefix": "DrawSharpen", 289 | "body": "DrawSharpen(${1:number Contrast}, ${2:number Distance})$0", 290 | "description": "(Client) Function: _G.DrawSharpen\n\nDraws the sharpen shader, which creates more contrast." 291 | }, 292 | "_G.DrawSobel": { 293 | "prefix": "DrawSobel", 294 | "body": "DrawSobel(${1:number Threshold})$0", 295 | "description": "(Client) Function: _G.DrawSobel\n\nDraws the sobel shader, which detects edges and draws a black border." 296 | }, 297 | "_G.DrawSunbeams": { 298 | "prefix": "DrawSunbeams", 299 | "body": "DrawSunbeams(${1:number darken}, ${2:number multiplier}, ${3:number sunSize}, ${4:number sunX}, ${5:number sunY})$0", 300 | "description": "(Client) Function: _G.DrawSunbeams\n\nRenders the post-processing effect of beams of light originating from the map's sun. Utilises the \"pp/sunbeams\" material" 301 | }, 302 | "_G.DrawTexturize": { 303 | "prefix": "DrawTexturize", 304 | "body": "DrawTexturize(${1:number Scale}, ${2:number BaseTexture})$0", 305 | "description": "(Client) Function: _G.DrawTexturize\n\nDraws the texturize shader, which replaces each pixel on your screen with a different part of the texture depending on its brightness. See [[Shaders/g_texturize.g_texturize]] for information on making the texture." 306 | }, 307 | "_G.DrawToyTown": { 308 | "prefix": "DrawToyTown", 309 | "body": "DrawToyTown(${1:number Passes}, ${2:number Height})$0", 310 | "description": "(Client) Function: _G.DrawToyTown\n\nDraws 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." 311 | }, 312 | "_G.DropEntityIfHeld": { 313 | "prefix": "DropEntityIfHeld", 314 | "body": "DropEntityIfHeld(${1:Entity ent})$0", 315 | "description": "(Shared) Function: _G.DropEntityIfHeld\n\nDrops the specified entity if it is being held by any player with Gravity Gun or use pickup." 316 | }, 317 | "_G.DynamicLight": { 318 | "prefix": "DynamicLight", 319 | "body": "DynamicLight(${1:number index})$0", 320 | "description": "(Client) Function: _G.DynamicLight\n\nCreates or replaces a dynamic light with the given id." 321 | }, 322 | "_G.EffectData": { 323 | "prefix": "EffectData", 324 | "body": "EffectData()$0", 325 | "description": "(Shared) Function: _G.EffectData\n\nReturns a CEffectData object to be used with util.Effect." 326 | }, 327 | "_G.Either": { 328 | "prefix": "Either", 329 | "body": "Either(${1:boolean condition}, ${2:any truevar}, ${3:any falsevar})$0", 330 | "description": "(All) Function: _G.Either\n\nAn '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." 331 | }, 332 | "_G.EmitSentence": { 333 | "prefix": "EmitSentence", 334 | "body": "EmitSentence(${1:string soundName}, ${2:Vector position}, ${3:number entity}, ${4:number channel=CHAN_AUTO}, ${5:number volume=1}, ${6:number soundLevel=75}, ${7:number soundFlags=0}, ${8:number pitch=100})$0", 335 | "description": "(Shared) Function: _G.EmitSentence\n\nPlays a sentence from scripts/sentences.txt" 336 | }, 337 | "_G.EmitSound": { 338 | "prefix": "EmitSound", 339 | "body": "EmitSound(${1:string soundName}, ${2:Vector position}, ${3:number entity}, ${4:number channel=CHAN_AUTO}, ${5:number volume=1}, ${6:number soundLevel=75}, ${7:number soundFlags=0}, ${8:number pitch=100})$0", 340 | "description": "(Shared) Function: _G.EmitSound\n\nEmits the specified sound at the specified position." 341 | }, 342 | "_G.EndTooltip": { 343 | "prefix": "EndTooltip", 344 | "body": "EndTooltip(${1:Panel panel})$0", 345 | "description": "(Client and Menu) Function: _G.EndTooltip\n\nRemoves the currently active tool tip from the screen." 346 | }, 347 | "_G.Entity": { 348 | "prefix": "Entity", 349 | "body": "Entity(${1:number entityIndex})$0", 350 | "description": "(Shared) Function: _G.Entity\n\nReturns the entity with the matching Entity.EntIndex." 351 | }, 352 | "_G.Error": { 353 | "prefix": "Error", 354 | "body": "Error(${1:vararg arguments})$0", 355 | "description": "(All) Function: _G.Error\n\nThrows a Lua error with the specified message and stack level." 356 | }, 357 | "_G.error": { 358 | "prefix": "error", 359 | "body": "error(${1:string message}, ${2:number errorLevel=1})$0", 360 | "description": "(All) Function: _G.error\n\nThrows a Lua error and breaks out of the current call stack." 361 | }, 362 | "_G.ErrorNoHalt": { 363 | "prefix": "ErrorNoHalt", 364 | "body": "ErrorNoHalt(${1:vararg arguments})$0", 365 | "description": "(All) Function: _G.ErrorNoHalt\n\nThrows a Lua error but does not break out of the current call stack." 366 | }, 367 | "_G.EyeAngles": { 368 | "prefix": "EyeAngles", 369 | "body": "EyeAngles()$0", 370 | "description": "(Client) Function: _G.EyeAngles\n\nReturns the angles of the current render context as calculated by GM.CalcView. This function is only reliable inside rendering hooks." 371 | }, 372 | "_G.EyePos": { 373 | "prefix": "EyePos", 374 | "body": "EyePos()$0", 375 | "description": "(Client) Function: _G.EyePos\n\nReturns the origin of the current render context as calculated by GM.CalcView. This function is only reliable inside rendering hooks." 376 | }, 377 | "_G.EyeVector": { 378 | "prefix": "EyeVector", 379 | "body": "EyeVector()$0", 380 | "description": "(Client) Function: _G.EyeVector\n\nReturns the normal vector of the current render context as calculated by GM.CalcView, similar to _G.EyeAngles. This function is only reliable inside rendering hooks." 381 | }, 382 | "_G.FindMetaTable": { 383 | "prefix": "FindMetaTable", 384 | "body": "FindMetaTable(${1:string metaName})$0", 385 | "description": "(All) Function: _G.FindMetaTable\n\nReturns the meta table for the class with the matching name." 386 | }, 387 | "_G.FindTooltip": { 388 | "prefix": "FindTooltip", 389 | "body": "FindTooltip(${1:Panel panel})$0", 390 | "description": "(Client and Menu) Function: _G.FindTooltip\n\nReturns the tool-tip text and tool-tip-panel (if any) of the given panel as well as itself" 391 | }, 392 | "_G.Format": { 393 | "prefix": "Format", 394 | "body": "Format(${1:string format}, ${2:vararg formatParameters})$0", 395 | "description": "(All) Function: _G.Format\n\nFormats the specified values into the string given. Same as string.format." 396 | }, 397 | "_G.FrameNumber": { 398 | "prefix": "FrameNumber", 399 | "body": "FrameNumber()$0", 400 | "description": "(Client) Function: _G.FrameNumber\n\nReturns the number of frames rendered since the game was launched." 401 | }, 402 | "_G.FrameTime": { 403 | "prefix": "FrameTime", 404 | "body": "FrameTime()$0", 405 | "description": "(All) Function: _G.FrameTime\n\nReturns the _G.CurTime-based time in seconds it took to render the last frame." 406 | }, 407 | "_G.GameDetails": { 408 | "prefix": "GameDetails", 409 | "body": "GameDetails(${1:string servername}, ${2:string serverurl}, ${3:string mapname}, ${4:number maxplayers}, ${5:string steamid}, ${6:string gamemode})$0", 410 | "description": "(Menu) Function: _G.GameDetails\n\nCallback function for when the client has joined a server. This function shows the server's loading URL by default." 411 | }, 412 | "_G.gcinfo": { 413 | "prefix": "gcinfo", 414 | "body": "gcinfo()$0", 415 | "description": "(All) Function: _G.gcinfo\n\n[Deprecated] .This function was deprecated in Lua 5.1 and is removed in Lua 5.2. Use _G.collectgarbage( \"count\" ) instead. Returns the current floored dynamic memory usage of Lua in kilobytes." 416 | }, 417 | "_G.GetConVar": { 418 | "prefix": "GetConVar", 419 | "body": "GetConVar(${1:string name})$0", 420 | "description": "(All) Function: _G.GetConVar\n\nGets the ConVar with the specified name. This function caches the ConVar object internally." 421 | }, 422 | "_G.GetConVar_Internal": { 423 | "prefix": "GetConVar_Internal", 424 | "body": "GetConVar_Internal(${1:string name})$0", 425 | "description": "(All) Function: _G.GetConVar_Internal\n\n[Internal] Gets the ConVar with the specified name. This function doesn't cache the convar." 426 | }, 427 | "_G.GetConVarNumber": { 428 | "prefix": "GetConVarNumber", 429 | "body": "GetConVarNumber(${1:string name})$0", 430 | "description": "(All) Function: _G.GetConVarNumber\n\n[Deprecated] .Store the ConVar object retrieved with _G.GetConVar and call ConVar.GetInt or ConVar.GetFloat on it.Gets the numeric value ConVar with the specified name." 431 | }, 432 | "_G.GetConVarString": { 433 | "prefix": "GetConVarString", 434 | "body": "GetConVarString(${1:string name})$0", 435 | "description": "(All) Function: _G.GetConVarString\n\n[Deprecated] .Store the ConVar object retrieved with _G.GetConVar and call ConVar.GetString on it.Gets the string value ConVar with the specified name." 436 | }, 437 | "_G.GetDefaultLoadingHTML": { 438 | "prefix": "GetDefaultLoadingHTML", 439 | "body": "GetDefaultLoadingHTML()$0", 440 | "description": "(Menu) Function: _G.GetDefaultLoadingHTML\n\nReturns the default loading screen URL (asset://garrysmod/html/loading.html)" 441 | }, 442 | "_G.GetDemoFileDetails": { 443 | "prefix": "GetDemoFileDetails", 444 | "body": "GetDemoFileDetails(${1:string filename})$0", 445 | "description": "(Menu) Function: _G.GetDemoFileDetails\n\nRetrieves data about the demo with the specified filename. Similar to _G.GetSaveFileDetails." 446 | }, 447 | "_G.GetDownloadables": { 448 | "prefix": "GetDownloadables", 449 | "body": "GetDownloadables()$0", 450 | "description": "(Menu) Function: _G.GetDownloadables\n\nReturns a table with the names of files needed from the server you are currently joining." 451 | }, 452 | "_G.getfenv": { 453 | "prefix": "getfenv", 454 | "body": "getfenv(${1:function location=1})$0", 455 | "description": "(All) Function: _G.getfenv\n\nReturns the environment table of either the stack level or the function specified." 456 | }, 457 | "_G.GetGlobalAngle": { 458 | "prefix": "GetGlobalAngle", 459 | "body": "GetGlobalAngle(${1:string index}, ${2:Angle default=Angle( 0, 0, 0 )})$0", 460 | "description": "(Shared) Function: _G.GetGlobalAngle\n\nReturns an angle that is shared between the server and all clients." 461 | }, 462 | "_G.GetGlobalBool": { 463 | "prefix": "GetGlobalBool", 464 | "body": "GetGlobalBool(${1:string index}, ${2:boolean default=false})$0", 465 | "description": "(Shared) Function: _G.GetGlobalBool\n\nReturns a boolean that is shared between the server and all clients." 466 | }, 467 | "_G.GetGlobalEntity": { 468 | "prefix": "GetGlobalEntity", 469 | "body": "GetGlobalEntity(${1:string index}, ${2:Entity default=NULL})$0", 470 | "description": "(Shared) Function: _G.GetGlobalEntity\n\nReturns an entity that is shared between the server and all clients." 471 | }, 472 | "_G.GetGlobalFloat": { 473 | "prefix": "GetGlobalFloat", 474 | "body": "GetGlobalFloat(${1:string index}, ${2:number default=0})$0", 475 | "description": "(Shared) Function: _G.GetGlobalFloat\n\nReturns a float that is shared between the server and all clients." 476 | }, 477 | "_G.GetGlobalInt": { 478 | "prefix": "GetGlobalInt", 479 | "body": "GetGlobalInt(${1:string index}, ${2:number default=0})$0", 480 | "description": "(Shared) Function: _G.GetGlobalInt\n\nReturns an integer that is shared between the server and all clients." 481 | }, 482 | "_G.GetGlobalString": { 483 | "prefix": "GetGlobalString", 484 | "body": "GetGlobalString(${1:string index}, ${2:string default=\"\"})$0", 485 | "description": "(Shared) Function: _G.GetGlobalString\n\nReturns a string that is shared between the server and all clients." 486 | }, 487 | "_G.GetGlobalVector": { 488 | "prefix": "GetGlobalVector", 489 | "body": "GetGlobalVector(${1:string Index}, ${2:Vector Default})$0", 490 | "description": "(Shared) Function: _G.GetGlobalVector\n\nReturns a vector that is shared between the server and all clients." 491 | }, 492 | "_G.GetHostName": { 493 | "prefix": "GetHostName", 494 | "body": "GetHostName()$0", 495 | "description": "(Shared) Function: _G.GetHostName\n\nReturns the name of the current server." 496 | }, 497 | "_G.GetHUDPanel": { 498 | "prefix": "GetHUDPanel", 499 | "body": "GetHUDPanel()$0", 500 | "description": "(Client) Function: _G.GetHUDPanel\n\nReturns the panel that is used as a wrapper for the HUD." 501 | }, 502 | "_G.GetLoadPanel": { 503 | "prefix": "GetLoadPanel", 504 | "body": "GetLoadPanel()$0", 505 | "description": "(Menu) Function: _G.GetLoadPanel\n\nReturns the loading screen panel and creates it if it doesn't exist." 506 | }, 507 | "_G.GetLoadStatus": { 508 | "prefix": "GetLoadStatus", 509 | "body": "GetLoadStatus()$0", 510 | "description": "(Menu) Function: _G.GetLoadStatus\n\nReturns the current status of the server join progress." 511 | }, 512 | "_G.GetMapList": { 513 | "prefix": "GetMapList", 514 | "body": "GetMapList()$0", 515 | "description": "(Menu) Function: _G.GetMapList\n\nReturns a table with the names of all maps and categories that you have on your client." 516 | }, 517 | "_G.getmetatable": { 518 | "prefix": "getmetatable", 519 | "body": "getmetatable(${1:any object})$0", 520 | "description": "(All) Function: _G.getmetatable\n\nReturns the metatable of an object. This function obeys the metatable's __metatable field, and will return that field if the metatable has it set." 521 | }, 522 | "_G.GetOverlayPanel": { 523 | "prefix": "GetOverlayPanel", 524 | "body": "GetOverlayPanel()$0", 525 | "description": "(Menu) Function: _G.GetOverlayPanel\n\nReturns the menu overlay panel, a container for panels like the error panel created in GM.OnLuaError." 526 | }, 527 | "_G.GetRenderTarget": { 528 | "prefix": "GetRenderTarget", 529 | "body": "GetRenderTarget(${1:string name}, ${2:number width}, ${3:number height}, ${4:boolean additive})$0", 530 | "description": "(Client) Function: _G.GetRenderTarget\n\nCreates or gets the rendertarget with the given name." 531 | }, 532 | "_G.GetRenderTargetEx": { 533 | "prefix": "GetRenderTargetEx", 534 | "body": "GetRenderTargetEx(${1:string name}, ${2:number width}, ${3:number height}, ${4:number sizeMode}, ${5:number depthMode}, ${6:number textureFlags}, ${7:number rtFlags}, ${8:number imageFormat})$0", 535 | "description": "(Client) Function: _G.GetRenderTargetEx\n\nCreates (or gets if it already exsits) the rendertarget with the given name, this function allows to adjust the creation of a rendertarget more than _G.GetRenderTarget." 536 | }, 537 | "_G.GetSaveFileDetails": { 538 | "prefix": "GetSaveFileDetails", 539 | "body": "GetSaveFileDetails(${1:string filename})$0", 540 | "description": "(Menu) Function: _G.GetSaveFileDetails\n\nRetrieves data about the save with the specified filename. Similar to _G.GetDemoFileDetails." 541 | }, 542 | "_G.GetViewEntity": { 543 | "prefix": "GetViewEntity", 544 | "body": "GetViewEntity()$0", 545 | "description": "(Client) Function: _G.GetViewEntity\n\nReturns the entity the client is using to see from (such as the player itself, the camera, or another entity)." 546 | }, 547 | "_G.HSVToColor": { 548 | "prefix": "HSVToColor", 549 | "body": "HSVToColor(${1:number hue}, ${2:number saturation}, ${3:number value})$0", 550 | "description": "(All) Function: _G.HSVToColor\n\nConverts a color from HSV color space into RGB color space and returns a Color." 551 | }, 552 | "_G.HTTP": { 553 | "prefix": "HTTP", 554 | "body": "HTTP(${1:table parameters})$0", 555 | "description": "(All) Function: _G.HTTP\n\nLaunches a threaded http request with the given parameters" 556 | }, 557 | "_G.include": { 558 | "prefix": "include", 559 | "body": "include(${1:string fileName})$0", 560 | "description": "(All) Function: _G.include\n\nExecutes a Lua script either relative to the current file, or absolute(relative to the /lua/ folder)." 561 | }, 562 | "_G.IncludeCS": { 563 | "prefix": "IncludeCS", 564 | "body": "IncludeCS(${1:string filename})$0", 565 | "description": "(All) Function: _G.IncludeCS\n\n[Deprecated] .To send the target file to the client simply call AddCSLuaFile() in the target file itself." 566 | }, 567 | "_G.ipairs": { 568 | "prefix": "ipairs", 569 | "body": "ipairs(${1:table tab})$0", 570 | "description": "(All) Function: _G.ipairs\n\nReturns an iterator function for a for loop, to return ordered key-value pairs from a table." 571 | }, 572 | "_G.isangle": { 573 | "prefix": "isangle", 574 | "body": "isangle(${1:any variable})$0", 575 | "description": "(All) Function: _G.isangle\n\nReturns if the passed object is an Angle." 576 | }, 577 | "_G.isbool": { 578 | "prefix": "isbool", 579 | "body": "isbool(${1:any variable})$0", 580 | "description": "(All) Function: _G.isbool\n\nReturns if the passed object is a boolean." 581 | }, 582 | "_G.IsColor": { 583 | "prefix": "IsColor", 584 | "body": "IsColor(${1:any Object})$0", 585 | "description": "(All) Function: _G.IsColor\n\nReturns whether the given object does or doesn't have a ''metatable'' of a color." 586 | }, 587 | "_G.IsEnemyEntityName": { 588 | "prefix": "IsEnemyEntityName", 589 | "body": "IsEnemyEntityName(${1:string className})$0", 590 | "description": "(All) Function: _G.IsEnemyEntityName\n\nReturns if the given NPC class name is an enemy." 591 | }, 592 | "_G.IsEntity": { 593 | "prefix": "IsEntity", 594 | "body": "IsEntity(${1:any variable})$0", 595 | "description": "(Shared) Function: _G.IsEntity\n\nReturns if the passed object is an Entity. Alias of _G.isentity." 596 | }, 597 | "_G.isentity": { 598 | "prefix": "isentity", 599 | "body": "isentity(${1:any variable})$0", 600 | "description": "(All) Function: _G.isentity\n\nReturns if the passed object is an Entity." 601 | }, 602 | "_G.IsFirstTimePredicted": { 603 | "prefix": "IsFirstTimePredicted", 604 | "body": "IsFirstTimePredicted()$0", 605 | "description": "(Shared) Function: _G.IsFirstTimePredicted\n\nReturns if this is the first time this hook was predicted." 606 | }, 607 | "_G.IsFriendEntityName": { 608 | "prefix": "IsFriendEntityName", 609 | "body": "IsFriendEntityName(${1:string className})$0", 610 | "description": "(All) Function: _G.IsFriendEntityName\n\nReturns if the given NPC class name is a friend." 611 | }, 612 | "_G.isfunction": { 613 | "prefix": "isfunction", 614 | "body": "isfunction(${1:any variable})$0", 615 | "description": "(All) Function: _G.isfunction\n\nReturns if the passed object is a function." 616 | }, 617 | "_G.IsInGame": { 618 | "prefix": "IsInGame", 619 | "body": "IsInGame()$0", 620 | "description": "(Menu) Function: _G.IsInGame\n\nReturns true if the client is currently playing either a singleplayer or multiplayer game." 621 | }, 622 | "_G.ismatrix": { 623 | "prefix": "ismatrix", 624 | "body": "ismatrix(${1:any variable})$0", 625 | "description": "(All) Function: _G.ismatrix\n\nReturns whether the passed object is a VMatrix." 626 | }, 627 | "_G.IsMounted": { 628 | "prefix": "IsMounted", 629 | "body": "IsMounted(${1:string game})$0", 630 | "description": "(All) Function: _G.IsMounted\n\nChecks whether or not a game is currently mounted. Uses data given by engine.GetGames. Currently does not work correctly serverside on dedicated servers." 631 | }, 632 | "_G.isnumber": { 633 | "prefix": "isnumber", 634 | "body": "isnumber(${1:any variable})$0", 635 | "description": "(All) Function: _G.isnumber\n\nReturns if the passed object is a number." 636 | }, 637 | "_G.ispanel": { 638 | "prefix": "ispanel", 639 | "body": "ispanel(${1:any variable})$0", 640 | "description": "(All) Function: _G.ispanel\n\nReturns if the passed object is a Panel." 641 | }, 642 | "_G.isstring": { 643 | "prefix": "isstring", 644 | "body": "isstring(${1:any variable})$0", 645 | "description": "(All) Function: _G.isstring\n\nReturns if the passed object is a string." 646 | }, 647 | "_G.istable": { 648 | "prefix": "istable", 649 | "body": "istable(${1:any variable})$0", 650 | "description": "(All) Function: _G.istable\n\nReturns if the passed object is a table." 651 | }, 652 | "_G.IsTableOfEntitiesValid": { 653 | "prefix": "IsTableOfEntitiesValid", 654 | "body": "IsTableOfEntitiesValid(${1:table table})$0", 655 | "description": "(All) Function: _G.IsTableOfEntitiesValid\n\nReturns whether or not every element within a table is a valid entity" 656 | }, 657 | "_G.IsUselessModel": { 658 | "prefix": "IsUselessModel", 659 | "body": "IsUselessModel(${1:string modelName})$0", 660 | "description": "(All) Function: _G.IsUselessModel\n\nReturns whether or not a model is useless by checking that the file path is that of a proper model." 661 | }, 662 | "_G.IsValid": { 663 | "prefix": "IsValid", 664 | "body": "IsValid(${1:any toBeValidated})$0", 665 | "description": "(All) Function: _G.IsValid\n\nReturns whether an object is valid or not. (Such as Entitys, Type.Panels, custom Type.table objects and more)Checks that an object is not nil, has an IsValid method and if this method returns true." 666 | }, 667 | "_G.isvector": { 668 | "prefix": "isvector", 669 | "body": "isvector(${1:any variable})$0", 670 | "description": "(All) Function: _G.isvector\n\nReturns if the passed object is a Vector." 671 | }, 672 | "_G.JoinServer": { 673 | "prefix": "JoinServer", 674 | "body": "JoinServer(${1:string IP})$0", 675 | "description": "(Menu) Function: _G.JoinServer\n\nJoins the server with the specified IP." 676 | }, 677 | "_G.JS_Language": { 678 | "prefix": "JS_Language", 679 | "body": "JS_Language(${1:Panel htmlPanel})$0", 680 | "description": "(Client and Menu) Function: _G.JS_Language\n\nAdds javascript function 'language.Update' to an HTML panel as a method to call Lua's language.GetPhrase function." 681 | }, 682 | "_G.JS_Utility": { 683 | "prefix": "JS_Utility", 684 | "body": "JS_Utility(${1:Panel htmlPanel})$0", 685 | "description": "(Client and Menu) Function: _G.JS_Utility\n\nAdds javascript function 'util.MotionSensorAvailable' to an HTML panel as a method to call Lua's motionsensor.IsAvailable function." 686 | }, 687 | "_G.JS_Workshop": { 688 | "prefix": "JS_Workshop", 689 | "body": "JS_Workshop(${1:Panel htmlPanel})$0", 690 | "description": "(Client and Menu) Function: _G.JS_Workshop\n\nAdds workshop related javascript functions to an HTML panel, used by the \"Dupes\" and \"Saves\" tabs in the spawnmenu." 691 | }, 692 | "_G.Label": { 693 | "prefix": "Label", 694 | "body": "Label(${1:string text}, ${2:Panel parent=nil})$0", 695 | "description": "(Client and Menu) Function: _G.Label\n\nConvenience function that creates a DLabel, sets the text, and returns it" 696 | }, 697 | "_G.LanguageChanged": { 698 | "prefix": "LanguageChanged", 699 | "body": "LanguageChanged(${1:string lang})$0", 700 | "description": "(Menu) Function: _G.LanguageChanged\n\nCallback function for when the client's language changes. Called by the engine." 701 | }, 702 | "_G.Lerp": { 703 | "prefix": "Lerp", 704 | "body": "Lerp(${1:number t}, ${2:number from}, ${3:number to})$0", 705 | "description": "(All) Function: _G.Lerp\n\nPerforms a linear interpolation from the start number to the end number." 706 | }, 707 | "_G.LerpAngle": { 708 | "prefix": "LerpAngle", 709 | "body": "LerpAngle(${1:number ratio}, ${2:Angle angleStart}, ${3:Angle angleEnd})$0", 710 | "description": "(All) Function: _G.LerpAngle\n\nReturns point between first and second angle using given fraction and linear interpolation" 711 | }, 712 | "_G.LerpVector": { 713 | "prefix": "LerpVector", 714 | "body": "LerpVector(${1:number fraction}, ${2:Vector from}, ${3:Vector to})$0", 715 | "description": "(All) Function: _G.LerpVector\n\nLinear interpolation between two vectors. It is commonly used to smooth movement between two vectors." 716 | }, 717 | "_G.LoadLastMap": { 718 | "prefix": "LoadLastMap", 719 | "body": "LoadLastMap()$0", 720 | "description": "(Menu) Function: _G.LoadLastMap\n\n[Internal] This function is used to get the last map and category to which the map belongs from the cookie saved with _G.SaveLastMap." 721 | }, 722 | "_G.LoadPresets": { 723 | "prefix": "LoadPresets", 724 | "body": "LoadPresets()$0", 725 | "description": "(Client) Function: _G.LoadPresets\n\nLoads all preset settings for the presets and returns them in a table" 726 | }, 727 | "_G.Localize": { 728 | "prefix": "Localize", 729 | "body": "Localize(${1:string localisationToken}, ${2:string default})$0", 730 | "description": "(Client and Menu) Function: _G.Localize\n\nReturns a localisation for the given token, if none is found it will return the default(second) parameter." 731 | }, 732 | "_G.LocalPlayer": { 733 | "prefix": "LocalPlayer", 734 | "body": "LocalPlayer()$0", 735 | "description": "(Client) Function: _G.LocalPlayer\n\nReturns the player object of the current client." 736 | }, 737 | "_G.LocalToWorld": { 738 | "prefix": "LocalToWorld", 739 | "body": "LocalToWorld(${1:Vector localPos}, ${2:Angle localAng}, ${3:Vector originPos}, ${4:Angle originAngle})$0", 740 | "description": "(Shared) Function: _G.LocalToWorld\n\nTranslates the specified position and angle from the specified local coordinate system into worldspace coordinates." 741 | }, 742 | "_G.Material": { 743 | "prefix": "Material", 744 | "body": "Material(${1:string materialName}, ${2:string pngParameters=nil})$0", 745 | "description": "(All) Function: _G.Material\n\nEither returns the material with the given name, or loads the material interpreting the first argument as the path." 746 | }, 747 | "_G.Matrix": { 748 | "prefix": "Matrix", 749 | "body": "Matrix(${1:table data={{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}})$0", 750 | "description": "(Shared) Function: _G.Matrix\n\nReturns a VMatrix object." 751 | }, 752 | "_G.Mesh": { 753 | "prefix": "Mesh", 754 | "body": "Mesh(${1:IMaterial mat=nil})$0", 755 | "description": "(Client) Function: _G.Mesh\n\nReturns a new mesh object." 756 | }, 757 | "_G.Model": { 758 | "prefix": "Model", 759 | "body": "Model(${1:string model})$0", 760 | "description": "(All) Function: _G.Model\n\nRuns util.PrecacheModel and returns the string" 761 | }, 762 | "_G.module": { 763 | "prefix": "module", 764 | "body": "module(${1:string name}, ${2:vararg loaders})$0", 765 | "description": "(All) Function: _G.module\n\nCreates a table with the specified module name and sets the function environment for said table." 766 | }, 767 | "_G.Msg": { 768 | "prefix": "Msg", 769 | "body": "Msg(${1:vararg args})$0", 770 | "description": "(All) Function: _G.Msg\n\nWrites every given argument to the console." 771 | }, 772 | "_G.MsgAll": { 773 | "prefix": "MsgAll", 774 | "body": "MsgAll(${1:vararg args})$0", 775 | "description": "(Shared) Function: _G.MsgAll\n\nWorks exactly like _G.Msg except that, if called on the server, will print to all players consoles plus the server console." 776 | }, 777 | "_G.MsgC": { 778 | "prefix": "MsgC", 779 | "body": "MsgC(${1:vararg args})$0", 780 | "description": "(All) Function: _G.MsgC\n\nJust like _G.Msg, except it can also print colored text, just like chat.AddText." 781 | }, 782 | "_G.MsgN": { 783 | "prefix": "MsgN", 784 | "body": "MsgN(${1:vararg args})$0", 785 | "description": "(All) Function: _G.MsgN\n\nSame as _G.print, except it concatinates the arguments without inserting any whitespace in between them." 786 | }, 787 | "_G.NamedColor": { 788 | "prefix": "NamedColor", 789 | "body": "NamedColor(${1:string name})$0", 790 | "description": "(Client) Function: _G.NamedColor\n\nReturns named color defined in resource/ClientScheme.res. " 791 | }, 792 | "_G.newproxy": { 793 | "prefix": "newproxy", 794 | "body": "newproxy(${1:boolean addMetatable =false})$0", 795 | "description": "(All) Function: _G.newproxy\n\nReturns a new userdata object." 796 | }, 797 | "_G.next": { 798 | "prefix": "next", 799 | "body": "next(${1:table tab}, ${2:any prevKey=nil})$0", 800 | "description": "(All) Function: _G.next\n\nReturns the next key and value pair in a table." 801 | }, 802 | "_G.NumDownloadables": { 803 | "prefix": "NumDownloadables", 804 | "body": "NumDownloadables()$0", 805 | "description": "(Menu) Function: _G.NumDownloadables\n\nReturns the number of files needed from the server you are currently joining." 806 | }, 807 | "_G.NumModelSkins": { 808 | "prefix": "NumModelSkins", 809 | "body": "NumModelSkins(${1:string modelName})$0", 810 | "description": "(Client) Function: _G.NumModelSkins\n\nReturns the amount of skins the specified model has" 811 | }, 812 | "_G.OnModelLoaded": { 813 | "prefix": "OnModelLoaded", 814 | "body": "OnModelLoaded(${1:string modelName}, ${2:number numPostParams}, ${3:number numSeq}, ${4:number numAttachments}, ${5:number numBoneControllers}, ${6:number numSkins}, ${7:number size})$0", 815 | "description": "(Client) Function: _G.OnModelLoaded\n\n[Internal] Called by the engine when a model has been loaded. Caches model information with the sql." 816 | }, 817 | "_G.OpenFolder": { 818 | "prefix": "OpenFolder", 819 | "body": "OpenFolder(${1:string folder})$0", 820 | "description": "(Menu) Function: _G.OpenFolder\n\nOpens a folder with the given name in the garrysmod folder using the operating system's file browser. Currently broken on OS X and Linux." 821 | }, 822 | "_G.OrderVectors": { 823 | "prefix": "OrderVectors", 824 | "body": "OrderVectors(${1:Vector vector1}, ${2:Vector vector2})$0", 825 | "description": "(All) Function: _G.OrderVectors\n\nModifies the given vectors so that all of vector2's axis are larger than vector1's by switching them around. Also known as ordering vectors." 826 | }, 827 | "_G.pairs": { 828 | "prefix": "pairs", 829 | "body": "pairs(${1:table tab})$0", 830 | "description": "(All) Function: _G.pairs\n\nReturns an iterator function(_G.next) for a for loop that will return the values of the specified table in an arbitrary order." 831 | }, 832 | "_G.Particle": { 833 | "prefix": "Particle", 834 | "body": "Particle(${1:string file})$0", 835 | "description": "(All) Function: _G.Particle\n\nCalls game.AddParticles and returns given string." 836 | }, 837 | "_G.ParticleEffect": { 838 | "prefix": "ParticleEffect", 839 | "body": "ParticleEffect(${1:string particleName}, ${2:Vector position}, ${3:Angle angles}, ${4:Entity parent=NULL})$0", 840 | "description": "(Shared) Function: _G.ParticleEffect\n\nCreates a particle effect." 841 | }, 842 | "_G.ParticleEffectAttach": { 843 | "prefix": "ParticleEffectAttach", 844 | "body": "ParticleEffectAttach(${1:string particleName}, ${2:number attachType}, ${3:Entity entity}, ${4:number attachmentID})$0", 845 | "description": "(Shared) Function: _G.ParticleEffectAttach\n\nCreates a particle effect with specialized parameters." 846 | }, 847 | "_G.ParticleEmitter": { 848 | "prefix": "ParticleEmitter", 849 | "body": "ParticleEmitter(${1:Vector position}, ${2:boolean use3D})$0", 850 | "description": "(Client) Function: _G.ParticleEmitter\n\nCreates a new CLuaEmitter." 851 | }, 852 | "_G.Path": { 853 | "prefix": "Path", 854 | "body": "Path(${1:string type})$0", 855 | "description": "(Server) Function: _G.Path\n\nCreates a path for the bot to follow" 856 | }, 857 | "_G.pcall": { 858 | "prefix": "pcall", 859 | "body": "pcall(${1:function func}, ${2:vararg arguments})$0", 860 | "description": "(All) Function: _G.pcall\n\nCalls a function and catches an error that can be thrown while the execution of the call." 861 | }, 862 | "_G.Player": { 863 | "prefix": "Player", 864 | "body": "Player(${1:number playerIndex})$0", 865 | "description": "(Shared) Function: _G.Player\n\nReturns the player with the matching Player.UserID." 866 | }, 867 | "_G.PositionSpawnIcon": { 868 | "prefix": "PositionSpawnIcon", 869 | "body": "PositionSpawnIcon(${1:Entity model}, ${2:Vector position})$0", 870 | "description": "(Client) Function: _G.PositionSpawnIcon\n\nMoves the given model to the given position and returns view information based on its properties" 871 | }, 872 | "_G.PrecacheParticleSystem": { 873 | "prefix": "PrecacheParticleSystem", 874 | "body": "PrecacheParticleSystem(${1:string particleSystemName})$0", 875 | "description": "(Shared) Function: _G.PrecacheParticleSystem\n\nPrecaches the particle with the specified name." 876 | }, 877 | "_G.PrecacheScene": { 878 | "prefix": "PrecacheScene", 879 | "body": "PrecacheScene(${1:string scene})$0", 880 | "description": "(Server) Function: _G.PrecacheScene\n\nPrecaches a scene file." 881 | }, 882 | "_G.PrecacheSentenceFile": { 883 | "prefix": "PrecacheSentenceFile", 884 | "body": "PrecacheSentenceFile(${1:string filename})$0", 885 | "description": "(Server) Function: _G.PrecacheSentenceFile\n\nLoad and precache a custom sentence file." 886 | }, 887 | "_G.PrecacheSentenceGroup": { 888 | "prefix": "PrecacheSentenceGroup", 889 | "body": "PrecacheSentenceGroup(${1:string group})$0", 890 | "description": "(Server) Function: _G.PrecacheSentenceGroup\n\nPrecache a sentence group in a sentences.txt definition file." 891 | }, 892 | "_G.print": { 893 | "prefix": "print", 894 | "body": "print(${1:vararg args})$0", 895 | "description": "(All) Function: _G.print\n\nWrites every given argument to the console." 896 | }, 897 | "_G.PrintMessage": { 898 | "prefix": "PrintMessage", 899 | "body": "PrintMessage(${1:number type}, ${2:string message})$0", 900 | "description": "(Server) Function: _G.PrintMessage\n\nDisplays a message in the chat, console, or center of screen of every player." 901 | }, 902 | "_G.PrintTable": { 903 | "prefix": "PrintTable", 904 | "body": "PrintTable(${1:table tableToPrint}, ${2:number indent=0}, ${3:table done={}})$0", 905 | "description": "(All) Function: _G.PrintTable\n\nRecursively prints the contents of a table to the console." 906 | }, 907 | "_G.ProjectedTexture": { 908 | "prefix": "ProjectedTexture", 909 | "body": "ProjectedTexture()$0", 910 | "description": "(Client) Function: _G.ProjectedTexture\n\nCreates a new ProjectedTexture." 911 | }, 912 | "_G.ProtectedCall": { 913 | "prefix": "ProtectedCall", 914 | "body": "ProtectedCall(${1:function func})$0", 915 | "description": "(Shared) Function: _G.ProtectedCall\n\nRuns a function without stopping the whole script on error." 916 | }, 917 | "_G.RandomPairs": { 918 | "prefix": "RandomPairs", 919 | "body": "RandomPairs(${1:table table}, ${2:boolean descending})$0", 920 | "description": "(All) Function: _G.RandomPairs\n\nReturns an iterator function that can be used to loop through a table in random order" 921 | }, 922 | "_G.rawequal": { 923 | "prefix": "rawequal", 924 | "body": "rawequal(${1:any value1}, ${2:any value2})$0", 925 | "description": "(All) Function: _G.rawequal\n\nCompares the two values without calling their __eq operator." 926 | }, 927 | "_G.rawget": { 928 | "prefix": "rawget", 929 | "body": "rawget(${1:table table}, ${2:any index})$0", 930 | "description": "(All) Function: _G.rawget\n\nGets the value with the specified key from the table without calling the __index method." 931 | }, 932 | "_G.rawset": { 933 | "prefix": "rawset", 934 | "body": "rawset(${1:table table}, ${2:any index}, ${3:any value})$0", 935 | "description": "(All) Function: _G.rawset\n\nSets the value with the specified key from the table without calling the __newindex method." 936 | }, 937 | "_G.RealFrameTime": { 938 | "prefix": "RealFrameTime", 939 | "body": "RealFrameTime()$0", 940 | "description": "(Client) Function: _G.RealFrameTime\n\nReturns the real frame-time which is unaffected by host_timescale. To be used for GUI effects (for example)" 941 | }, 942 | "_G.RealTime": { 943 | "prefix": "RealTime", 944 | "body": "RealTime()$0", 945 | "description": "(Shared) Function: _G.RealTime\n\nReturns the uptime of the game/server in seconds (to at least 4 decimal places)" 946 | }, 947 | "_G.RecipientFilter": { 948 | "prefix": "RecipientFilter", 949 | "body": "RecipientFilter()$0", 950 | "description": "(Server) Function: _G.RecipientFilter\n\nCreates a new CRecipientFilter." 951 | }, 952 | "_G.RecordDemoFrame": { 953 | "prefix": "RecordDemoFrame", 954 | "body": "RecordDemoFrame()$0", 955 | "description": "(Menu) Function: _G.RecordDemoFrame\n\n[Internal] " 956 | }, 957 | "_G.RegisterDermaMenuForClose": { 958 | "prefix": "RegisterDermaMenuForClose", 959 | "body": "RegisterDermaMenuForClose(${1:Panel menu})$0", 960 | "description": "(Client and Menu) Function: _G.RegisterDermaMenuForClose\n\nRegisters a Derma element to be closed the next time _G.CloseDermaMenus is called" 961 | }, 962 | "_G.RememberCursorPosition": { 963 | "prefix": "RememberCursorPosition", 964 | "body": "RememberCursorPosition()$0", 965 | "description": "(Client and Menu) Function: _G.RememberCursorPosition\n\nSaves position of your cursor on screen. You can restore it by using _G.RestoreCursorPosition." 966 | }, 967 | "_G.RemoveTooltip": { 968 | "prefix": "RemoveTooltip", 969 | "body": "RemoveTooltip()$0", 970 | "description": "(Client and Menu) Function: _G.RemoveTooltip\n\nDoes the removing of the tooltip panel. Called by _G.EndTooltip." 971 | }, 972 | "_G.RenderAngles": { 973 | "prefix": "RenderAngles", 974 | "body": "RenderAngles()$0", 975 | "description": "(Client) Function: _G.RenderAngles\n\nReturns the angle that the clients view is being rendered at" 976 | }, 977 | "_G.RenderDoF": { 978 | "prefix": "RenderDoF", 979 | "body": "RenderDoF(${1:Vector origin}, ${2:Angle angle}, ${3:Vector usableFocusPoint}, ${4:number angleSize}, ${5:number radialSteps}, ${6:number passes}, ${7:boolean spin}, ${8:table inView}, ${9:number fov})$0", 980 | "description": "(Client) Function: _G.RenderDoF\n\nRenders a Depth of Field effect" 981 | }, 982 | "_G.RenderStereoscopy": { 983 | "prefix": "RenderStereoscopy", 984 | "body": "RenderStereoscopy(${1:Vector viewOrigin}, ${2:Angle viewAngles})$0", 985 | "description": "(Client) Function: _G.RenderStereoscopy\n\nRenders the stereoscopic post-process effect" 986 | }, 987 | "_G.RenderSuperDoF": { 988 | "prefix": "RenderSuperDoF", 989 | "body": "RenderSuperDoF(${1:Vector viewOrigin}, ${2:Angle viewAngles}, ${3:number viewFOV})$0", 990 | "description": "(Client) Function: _G.RenderSuperDoF\n\nRenders the Super Depth of Field post-process effect" 991 | }, 992 | "_G.require": { 993 | "prefix": "require", 994 | "body": "require(${1:string name})$0", 995 | "description": "(All) Function: _G.require\n\nFirst tries to load a binary module with the given name, if unsuccessful, it tries to load a Lua module with the given name." 996 | }, 997 | "_G.RestoreCursorPosition": { 998 | "prefix": "RestoreCursorPosition", 999 | "body": "RestoreCursorPosition()$0", 1000 | "description": "(Client and Menu) Function: _G.RestoreCursorPosition\n\nRestores position of your cursor on screen. You can save it by using _G.RememberCursorPosition." 1001 | }, 1002 | "_G.RunConsoleCommand": { 1003 | "prefix": "RunConsoleCommand", 1004 | "body": "RunConsoleCommand(${1:string command}, ${2:vararg arguments})$0", 1005 | "description": "(All) Function: _G.RunConsoleCommand\n\nExecutes the given console command with the parameters." 1006 | }, 1007 | "_G.RunGameUICommand": { 1008 | "prefix": "RunGameUICommand", 1009 | "body": "RunGameUICommand(${1:string command})$0", 1010 | "description": "(Menu) Function: _G.RunGameUICommand\n\nRuns a menu command. Equivalent to _G.RunConsoleCommand( \"gamemenucommand\", command ) unless the command starts with the \"engine\" keyword in which case it is equivalent to _G.RunConsoleCommand( command )." 1011 | }, 1012 | "_G.RunString": { 1013 | "prefix": "RunString", 1014 | "body": "RunString(${1:string code}, ${2:string identifier=\"RunString\"}, ${3:boolean handleError=true})$0", 1015 | "description": "(All) Function: _G.RunString\n\nEvaluates and executes the given code, will throw an error on failure." 1016 | }, 1017 | "_G.RunStringEx": { 1018 | "prefix": "RunStringEx", 1019 | "body": "RunStringEx()$0", 1020 | "description": "(All) Function: _G.RunStringEx\n\nAlias of _G.RunString." 1021 | }, 1022 | "_G.SafeRemoveEntity": { 1023 | "prefix": "SafeRemoveEntity", 1024 | "body": "SafeRemoveEntity(${1:Entity ent})$0", 1025 | "description": "(All) Function: _G.SafeRemoveEntity\n\nRemoves the given entity unless it is a player or the world entity" 1026 | }, 1027 | "_G.SafeRemoveEntityDelayed": { 1028 | "prefix": "SafeRemoveEntityDelayed", 1029 | "body": "SafeRemoveEntityDelayed(${1:Entity entity}, ${2:number delay})$0", 1030 | "description": "(All) Function: _G.SafeRemoveEntityDelayed\n\nRemoves entity after delay using _G.SafeRemoveEntity" 1031 | }, 1032 | "_G.SaveLastMap": { 1033 | "prefix": "SaveLastMap", 1034 | "body": "SaveLastMap(${1:string map}, ${2:string category})$0", 1035 | "description": "(Menu) Function: _G.SaveLastMap\n\n[Internal] " 1036 | }, 1037 | "_G.SavePresets": { 1038 | "prefix": "SavePresets", 1039 | "body": "SavePresets(${1:table presets})$0", 1040 | "description": "(Client) Function: _G.SavePresets\n\nOverwrites all presets with the supplied table. Used by the presets for preset saving" 1041 | }, 1042 | "_G.ScreenScale": { 1043 | "prefix": "ScreenScale", 1044 | "body": "ScreenScale(${1:number Size})$0", 1045 | "description": "(Client) Function: _G.ScreenScale\n\nReturns 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." 1046 | }, 1047 | "_G.ScrH": { 1048 | "prefix": "ScrH", 1049 | "body": "ScrH()$0", 1050 | "description": "(Client and Menu) Function: _G.ScrH\n\nReturns the height of GMod's window (in pixels)." 1051 | }, 1052 | "_G.ScrW": { 1053 | "prefix": "ScrW", 1054 | "body": "ScrW()$0", 1055 | "description": "(Client and Menu) Function: _G.ScrW\n\nGets the width of GMod window (in pixels)." 1056 | }, 1057 | "_G.select": { 1058 | "prefix": "select", 1059 | "body": "select(${1:any parameter}, ${2:vararg vararg})$0", 1060 | "description": "(All) Function: _G.select\n\nUsed to select single values from a vararg or get the count of values in it." 1061 | }, 1062 | "_G.SendUserMessage": { 1063 | "prefix": "SendUserMessage", 1064 | "body": "SendUserMessage(${1:string name}, ${2:any recipients}, ${3:vararg args})$0", 1065 | "description": "(Shared) Function: _G.SendUserMessage\n\nSend a usermessage" 1066 | }, 1067 | "_G.ServerLog": { 1068 | "prefix": "ServerLog", 1069 | "body": "ServerLog(${1:string parameter})$0", 1070 | "description": "(Server) Function: _G.ServerLog\n\nPrints \"ServerLog: PARAM\" without a newline, to the server log and console." 1071 | }, 1072 | "_G.SetClipboardText": { 1073 | "prefix": "SetClipboardText", 1074 | "body": "SetClipboardText(${1:string text})$0", 1075 | "description": "(Client and Menu) Function: _G.SetClipboardText\n\nAdds the given string to the computers clipboard, which can then be pasted in or outside of GMod with Ctrl V." 1076 | }, 1077 | "_G.setfenv": { 1078 | "prefix": "setfenv", 1079 | "body": "setfenv(${1:function location}, ${2:table enviroment})$0", 1080 | "description": "(All) Function: _G.setfenv\n\nSets the enviroment for a function or a stack level, if a function is passed, the return value will be the function, otherwise nil." 1081 | }, 1082 | "_G.SetGlobalAngle": { 1083 | "prefix": "SetGlobalAngle", 1084 | "body": "SetGlobalAngle(${1:any index}, ${2:Angle angle})$0", 1085 | "description": "(Shared) Function: _G.SetGlobalAngle\n\nDefines an angle to be automatically networked to clients" 1086 | }, 1087 | "_G.SetGlobalBool": { 1088 | "prefix": "SetGlobalBool", 1089 | "body": "SetGlobalBool(${1:any index}, ${2:boolean bool})$0", 1090 | "description": "(Shared) Function: _G.SetGlobalBool\n\nDefined a boolean to be automatically networked to clients" 1091 | }, 1092 | "_G.SetGlobalEntity": { 1093 | "prefix": "SetGlobalEntity", 1094 | "body": "SetGlobalEntity(${1:any index}, ${2:Entity ent})$0", 1095 | "description": "(Shared) Function: _G.SetGlobalEntity\n\nDefines an entity to be automatically networked to clients" 1096 | }, 1097 | "_G.SetGlobalFloat": { 1098 | "prefix": "SetGlobalFloat", 1099 | "body": "SetGlobalFloat(${1:any index}, ${2:number float})$0", 1100 | "description": "(Shared) Function: _G.SetGlobalFloat\n\nDefines a floating point number to be automatically networked to clients" 1101 | }, 1102 | "_G.SetGlobalInt": { 1103 | "prefix": "SetGlobalInt", 1104 | "body": "SetGlobalInt(${1:string Index}, ${2:number Value})$0", 1105 | "description": "(Shared) Function: _G.SetGlobalInt\n\nSets an integer that is shared between the server and all clients." 1106 | }, 1107 | "_G.SetGlobalString": { 1108 | "prefix": "SetGlobalString", 1109 | "body": "SetGlobalString(${1:any index}, ${2:string string})$0", 1110 | "description": "(Shared) Function: _G.SetGlobalString\n\nDefines a string with a maximum of 199 characters to be automatically networked to clients" 1111 | }, 1112 | "_G.SetGlobalVector": { 1113 | "prefix": "SetGlobalVector", 1114 | "body": "SetGlobalVector(${1:any index}, ${2:Vector vec})$0", 1115 | "description": "(Shared) Function: _G.SetGlobalVector\n\nDefines a vector to be automatically networked to clients" 1116 | }, 1117 | "_G.setmetatable": { 1118 | "prefix": "setmetatable", 1119 | "body": "setmetatable(${1:table Tab}, ${2:table Metatable})$0", 1120 | "description": "(All) Function: _G.setmetatable\n\nSets, changes or removes a table's metatable. Returns Tab (the first argument)." 1121 | }, 1122 | "_G.SetPhysConstraintSystem": { 1123 | "prefix": "SetPhysConstraintSystem", 1124 | "body": "SetPhysConstraintSystem(${1:Entity constraintSystem})$0", 1125 | "description": "(Shared) Function: _G.SetPhysConstraintSystem\n\nCalled by the engine to set which constraint system [https://developer.valvesoftware.com/wiki/Phys_constraintsystem] the next created constraints should use" 1126 | }, 1127 | "_G.SortedPairs": { 1128 | "prefix": "SortedPairs", 1129 | "body": "SortedPairs(${1:table table}, ${2:boolean desc=false})$0", 1130 | "description": "(All) Function: _G.SortedPairs\n\nThis function can be used in a for loop instead of _G.pairs. It sorts all '''keys''' alphabetically." 1131 | }, 1132 | "_G.SortedPairsByMemberValue": { 1133 | "prefix": "SortedPairsByMemberValue", 1134 | "body": "SortedPairsByMemberValue(${1:table table}, ${2:any memberKey}, ${3:boolean descending=false})$0", 1135 | "description": "(All) Function: _G.SortedPairsByMemberValue\n\nReturns 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." 1136 | }, 1137 | "_G.SortedPairsByValue": { 1138 | "prefix": "SortedPairsByValue", 1139 | "body": "SortedPairsByValue(${1:table table}, ${2:boolean descending=false})$0", 1140 | "description": "(All) Function: _G.SortedPairsByValue\n\nReturns an iterator function that can be used to loop through a table in order of its '''values'''." 1141 | }, 1142 | "_G.Sound": { 1143 | "prefix": "Sound", 1144 | "body": "Sound(${1:string soundPath})$0", 1145 | "description": "(All) Function: _G.Sound\n\nRuns util.PrecacheSound and returns the string" 1146 | }, 1147 | "_G.SoundDuration": { 1148 | "prefix": "SoundDuration", 1149 | "body": "SoundDuration(${1:string soundName})$0", 1150 | "description": "(Shared) Function: _G.SoundDuration\n\nReturns the duration of the sound specified in seconds." 1151 | }, 1152 | "_G.SQLStr": { 1153 | "prefix": "SQLStr", 1154 | "body": "SQLStr(${1:string input}, ${2:boolean noQuotes=false})$0", 1155 | "description": "(All) Function: _G.SQLStr\n\nReturns 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" 1156 | }, 1157 | "_G.SScale": { 1158 | "prefix": "SScale", 1159 | "body": "SScale(${1:number Size})$0", 1160 | "description": "(Client) Function: _G.SScale\n\n[Deprecated] .You should be using _G.ScreenScale instead." 1161 | }, 1162 | "_G.STNDRD": { 1163 | "prefix": "STNDRD", 1164 | "body": "STNDRD(${1:number number})$0", 1165 | "description": "(All) Function: _G.STNDRD\n\nReturns the ordinal suffix of a given number." 1166 | }, 1167 | "_G.SuppressHostEvents": { 1168 | "prefix": "SuppressHostEvents", 1169 | "body": "SuppressHostEvents(${1:Player suppressPlayer})$0", 1170 | "description": "(Server) Function: _G.SuppressHostEvents\n\nSuppress 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." 1171 | }, 1172 | "_G.SysTime": { 1173 | "prefix": "SysTime", 1174 | "body": "SysTime()$0", 1175 | "description": "(All) Function: _G.SysTime\n\nReturns a highly accurate time in seconds since the start up, ideal for benchmarking." 1176 | }, 1177 | "_G.TauntCamera": { 1178 | "prefix": "TauntCamera", 1179 | "body": "TauntCamera()$0", 1180 | "description": "(Shared) Function: _G.TauntCamera\n\nReturns a TauntCamera object" 1181 | }, 1182 | "_G.TextEntryLoseFocus": { 1183 | "prefix": "TextEntryLoseFocus", 1184 | "body": "TextEntryLoseFocus()$0", 1185 | "description": "(Client and Menu) Function: _G.TextEntryLoseFocus\n\nClears focus from any text entries player may have focused." 1186 | }, 1187 | "_G.TimedCos": { 1188 | "prefix": "TimedCos", 1189 | "body": "TimedCos(${1:number frequency}, ${2:number min}, ${3:number max}, ${4:number offset})$0", 1190 | "description": "(All) Function: _G.TimedCos\n\nReturns a cosine value that fluctuates based on the current time" 1191 | }, 1192 | "_G.TimedSin": { 1193 | "prefix": "TimedSin", 1194 | "body": "TimedSin(${1:number frequency}, ${2:number origin}, ${3:number max}, ${4:number offset})$0", 1195 | "description": "(All) Function: _G.TimedSin\n\nReturns a sine value that fluctuates based on _G.CurTime. The value returned will be between the start value plus/minus the range value." 1196 | }, 1197 | "_G.tobool": { 1198 | "prefix": "tobool", 1199 | "body": "tobool(${1:any val})$0", 1200 | "description": "(All) Function: _G.tobool\n\nAttempts to return an appropriate boolean for the given value" 1201 | }, 1202 | "_G.ToggleFavourite": { 1203 | "prefix": "ToggleFavourite", 1204 | "body": "ToggleFavourite(${1:string map})$0", 1205 | "description": "(Menu) Function: _G.ToggleFavourite\n\nToggles whether or not the named map is favorited in the new game list." 1206 | }, 1207 | "_G.tonumber": { 1208 | "prefix": "tonumber", 1209 | "body": "tonumber(${1:any value}, ${2:number base=10})$0", 1210 | "description": "(All) Function: _G.tonumber\n\nAttempts to convert the value to a number." 1211 | }, 1212 | "_G.tostring": { 1213 | "prefix": "tostring", 1214 | "body": "tostring(${1:any value})$0", 1215 | "description": "(All) Function: _G.tostring\n\nAttempts 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." 1216 | }, 1217 | "_G.TranslateDownloadableName": { 1218 | "prefix": "TranslateDownloadableName", 1219 | "body": "TranslateDownloadableName(${1:string filename})$0", 1220 | "description": "(Menu) Function: _G.TranslateDownloadableName\n\n[Deprecated] " 1221 | }, 1222 | "_G.type": { 1223 | "prefix": "type", 1224 | "body": "type(${1:any var})$0", 1225 | "description": "(All) Function: _G.type\n\nReturns a string representing the name of the type of the passed object." 1226 | }, 1227 | "_G.TypeID": { 1228 | "prefix": "TypeID", 1229 | "body": "TypeID(${1:any variable})$0", 1230 | "description": "(Shared) Function: _G.TypeID\n\nGets the associated type ID of the variable." 1231 | }, 1232 | "_G.unpack": { 1233 | "prefix": "unpack", 1234 | "body": "unpack(${1:table tbl}, ${2:number startIndex=1}, ${3:number endIndex=#tbl})$0", 1235 | "description": "(All) Function: _G.unpack\n\nThis 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." 1236 | }, 1237 | "_G.UnPredictedCurTime": { 1238 | "prefix": "UnPredictedCurTime", 1239 | "body": "UnPredictedCurTime()$0", 1240 | "description": "(All) Function: _G.UnPredictedCurTime\n\nReturns the current asynchronous in-game time." 1241 | }, 1242 | "_G.UpdateLoadPanel": { 1243 | "prefix": "UpdateLoadPanel", 1244 | "body": "UpdateLoadPanel(${1:string javascript})$0", 1245 | "description": "(Menu) Function: _G.UpdateLoadPanel\n\nRuns JavaScript on the loading screen panel (_G.GetLoadPanel)." 1246 | }, 1247 | "_G.UTIL_IsUselessModel": { 1248 | "prefix": "UTIL_IsUselessModel", 1249 | "body": "UTIL_IsUselessModel(${1:string modelName})$0", 1250 | "description": "(All) Function: _G.UTIL_IsUselessModel\n\n[Deprecated] .You should use _G.IsUselessModel instead." 1251 | }, 1252 | "_G.ValidPanel": { 1253 | "prefix": "ValidPanel", 1254 | "body": "ValidPanel(${1:Panel panel})$0", 1255 | "description": "(Client and Menu) Function: _G.ValidPanel\n\n[Deprecated] .You should use _G.IsValid instead" 1256 | }, 1257 | "_G.Vector": { 1258 | "prefix": "Vector", 1259 | "body": "Vector(${1:number x=0}, ${2:number y=0}, ${3:number z=0})$0", 1260 | "description": "(All) Function: _G.Vector\n\nCreates a Vector object." 1261 | }, 1262 | "_G.VectorRand": { 1263 | "prefix": "VectorRand", 1264 | "body": "VectorRand()$0", 1265 | "description": "(All) Function: _G.VectorRand\n\nReturns a random vector whose components are each between -1 and 1" 1266 | }, 1267 | "_G.VGUIFrameTime": { 1268 | "prefix": "VGUIFrameTime", 1269 | "body": "VGUIFrameTime()$0", 1270 | "description": "(Client and Menu) Function: _G.VGUIFrameTime\n\nReturns the time in seconds it took to render the VGUI." 1271 | }, 1272 | "_G.VGUIRect": { 1273 | "prefix": "VGUIRect", 1274 | "body": "VGUIRect(${1:number x}, ${2:number y}, ${3:number w}, ${4:number h})$0", 1275 | "description": "(Client) Function: _G.VGUIRect\n\nReturns a DShape Derma element with the given dimensions" 1276 | }, 1277 | "_G.VisualizeLayout": { 1278 | "prefix": "VisualizeLayout", 1279 | "body": "VisualizeLayout(${1:Panel panel})$0", 1280 | "description": "(Client and Menu) Function: _G.VisualizeLayout\n\nBriefly displays layout details of the given panel on-screen" 1281 | }, 1282 | "_G.WorkshopFileBase": { 1283 | "prefix": "WorkshopFileBase", 1284 | "body": "WorkshopFileBase(${1:string namespace}, ${2:table requiredTags})$0", 1285 | "description": "(Client and Menu) Function: _G.WorkshopFileBase\n\n[Internal] Returns a new WorkshopFileBase element" 1286 | }, 1287 | "_G.WorldToLocal": { 1288 | "prefix": "WorldToLocal", 1289 | "body": "WorldToLocal(${1:Vector position}, ${2:Angle angle}, ${3:Vector newSystemOrigin}, ${4:Angle newSystemAngles})$0", 1290 | "description": "(Shared) Function: _G.WorldToLocal\n\nTranslates the specified position and angle into the specified coordinate system." 1291 | } 1292 | } -------------------------------------------------------------------------------- /snippets/hooks.json: -------------------------------------------------------------------------------- 1 | { 2 | "EFFECT:EndTouch": { 3 | "prefix": "EndTouch", 4 | "body": "EndTouch()$0\r\n", 5 | "description": "(Client) Method: EFFECT:EndTouch\n\n" 6 | }, 7 | "EFFECT:Init": { 8 | "prefix": "Init", 9 | "body": "Init(${1:CEffectData effectData})$0\r\n", 10 | "description": "(Client) Method: EFFECT:Init\n\nCalled when the effect is created." 11 | }, 12 | "EFFECT:PhysicsCollide": { 13 | "prefix": "PhysicsCollide", 14 | "body": "PhysicsCollide(${1:table colData}, ${2:PhysObj collider})$0\r\n", 15 | "description": "(Client) Method: EFFECT:PhysicsCollide\n\nCalled when the effect collides with anything." 16 | }, 17 | "EFFECT:Render": { 18 | "prefix": "Render", 19 | "body": "Render()$0\r\n", 20 | "description": "(Client) Method: EFFECT:Render\n\nCalled when the effect should be rendered." 21 | }, 22 | "EFFECT:StartTouch": { 23 | "prefix": "StartTouch", 24 | "body": "StartTouch()$0\r\n", 25 | "description": "(Client) Method: EFFECT:StartTouch\n\n" 26 | }, 27 | "EFFECT:Think": { 28 | "prefix": "Think", 29 | "body": "Think()$0\r\n", 30 | "description": "(Client) Method: EFFECT:Think\n\nCalled when the effect should think, return false to kill the effect." 31 | }, 32 | "EFFECT:Touch": { 33 | "prefix": "Touch", 34 | "body": "Touch()$0\r\n", 35 | "description": "(Client) Method: EFFECT:Touch\n\n" 36 | }, 37 | "ENT:AcceptInput": { 38 | "prefix": "AcceptInput", 39 | "body": "AcceptInput(${1:string inputName}, ${2:Entity activator}, ${3:Entity called}, ${4:string data})$0\r\n", 40 | "description": "(Server) Method: ENT:AcceptInput\n\nCalled when another entity fires an event to this entity." 41 | }, 42 | "ENT:": { 43 | "prefix": "", 44 | "body": "(${1:Entity other})$0\r\n", 45 | "description": "(Server) Method: ENT:\n\nCalled when the entity is blocked." 46 | }, 47 | "ENT:CanProperty": { 48 | "prefix": "CanProperty", 49 | "body": "CanProperty(${1:Player ply}, ${2:string property})$0\r\n", 50 | "description": "(Shared) Method: ENT:CanProperty\n\nControls if a property can be used on this entity or not." 51 | }, 52 | "ENT:DoingEngineSchedule": { 53 | "prefix": "DoingEngineSchedule", 54 | "body": "DoingEngineSchedule()$0\r\n", 55 | "description": "(Server) Method: ENT:DoingEngineSchedule\n\nCalled whenever an engine schedule is being ran." 56 | }, 57 | "ENT:Draw": { 58 | "prefix": "Draw", 59 | "body": "Draw(${1:number flags})$0\r\n", 60 | "description": "(Client) Method: ENT:Draw\n\nCalled if and when the entity should be drawn opaquely, based on the Entity.GetRenderGroup of the entity." 61 | }, 62 | "ENT:EndTouch": { 63 | "prefix": "EndTouch", 64 | "body": "EndTouch(${1:Entity entity})$0\r\n", 65 | "description": "(Server) Method: ENT:EndTouch\n\nCalled when the entity stops touching another entity." 66 | }, 67 | "ENT:ExpressionFinished": { 68 | "prefix": "ExpressionFinished", 69 | "body": "ExpressionFinished(${1:string strExp})$0\r\n", 70 | "description": "(Server) Method: ENT:ExpressionFinished\n\nCalled when an NPC's expression has finished." 71 | }, 72 | "ENT:GetAttackSpread": { 73 | "prefix": "GetAttackSpread", 74 | "body": "GetAttackSpread(${1:Entity wep}, ${2:Entity target})$0\r\n", 75 | "description": "(Server) Method: ENT:GetAttackSpread\n\n Called to determine how good an NPC is at using a particular weapon." 76 | }, 77 | "ENT:GetRelationship": { 78 | "prefix": "GetRelationship", 79 | "body": "GetRelationship(${1:Entity ent})$0\r\n", 80 | "description": "(Server) Method: ENT:GetRelationship\n\nCalled when scripted NPC needs to check how he \"feels\" against another entity." 81 | }, 82 | "ENT:ImpactTrace": { 83 | "prefix": "ImpactTrace", 84 | "body": "ImpactTrace(${1:table traceResult}, ${2:number damageType}, ${3:string customImpactName=nil})$0\r\n", 85 | "description": "(Client) Method: ENT:ImpactTrace\n\nCalled when a bullet trace hits this entity and allows you to override the default behavior by returning true." 86 | }, 87 | "ENT:Initialize": { 88 | "prefix": "Initialize", 89 | "body": "Initialize()$0\r\n", 90 | "description": "(Shared) Method: ENT:Initialize\n\nCalled when the entity is created. This is called when you Entity.Spawn the custom entity." 91 | }, 92 | "ENT:NextTask": { 93 | "prefix": "NextTask", 94 | "body": "NextTask(${1:table sched})$0\r\n", 95 | "description": "(Server) Method: ENT:NextTask\n\nStart the next task in specific schedule." 96 | }, 97 | "ENT:OnCondition": { 98 | "prefix": "OnCondition", 99 | "body": "OnCondition(${1:number conditionID})$0\r\n", 100 | "description": "(Server) Method: ENT:OnCondition\n\nCalled each time the NPC updates its condition." 101 | }, 102 | "ENT:OnTakeDamage": { 103 | "prefix": "OnTakeDamage", 104 | "body": "OnTakeDamage(${1:CTakeDamageInfo damage})$0\r\n", 105 | "description": "(Server) Method: ENT:OnTakeDamage\n\nCalled when the entity is taking damage." 106 | }, 107 | "ENT:OnTaskComplete": { 108 | "prefix": "OnTaskComplete", 109 | "body": "OnTaskComplete()$0\r\n", 110 | "description": "(Server) Method: ENT:OnTaskComplete\n\nCalled from the engine when TaskComplete is called." 111 | }, 112 | "ENT:PassesTriggerFilters": { 113 | "prefix": "PassesTriggerFilters", 114 | "body": "PassesTriggerFilters(${1:Entity ent})$0\r\n", 115 | "description": "(Server) Method: ENT:PassesTriggerFilters\n\nPolls whenever the entity should trigger the brush." 116 | }, 117 | "ENT:PhysicsUpdate": { 118 | "prefix": "PhysicsUpdate", 119 | "body": "PhysicsUpdate(${1:PhysObj phys})$0\r\n", 120 | "description": "(Shared) Method: ENT:PhysicsUpdate\n\nCalled whenever the physics of the entity are updated." 121 | }, 122 | "ENT:PostEntityCopy": { 123 | "prefix": "PostEntityCopy", 124 | "body": "PostEntityCopy()$0\r\n", 125 | "description": "(Server) Method: ENT:PostEntityCopy\n\nCalled after the duplicator finished copying the entity" 126 | }, 127 | "ENT:PreEntityCopy": { 128 | "prefix": "PreEntityCopy", 129 | "body": "PreEntityCopy()$0\r\n", 130 | "description": "(Server) Method: ENT:PreEntityCopy\n\nCalled before the duplicator copies the entity." 131 | }, 132 | "ENT:RunAI": { 133 | "prefix": "RunAI", 134 | "body": "RunAI()$0\r\n", 135 | "description": "(Server) Method: ENT:RunAI\n\nCalled from the engine every 0.1 seconds." 136 | }, 137 | "ENT:RunTask": { 138 | "prefix": "RunTask", 139 | "body": "RunTask(${1:table task})$0\r\n", 140 | "description": "(Server) Method: ENT:RunTask\n\nCalled every think on running task." 141 | }, 142 | "ENT:ScheduleFinished": { 143 | "prefix": "ScheduleFinished", 144 | "body": "ScheduleFinished()$0\r\n", 145 | "description": "(Server) Method: ENT:ScheduleFinished\n\nCalled whenever a schedule is finished." 146 | }, 147 | "ENT:SelectSchedule": { 148 | "prefix": "SelectSchedule", 149 | "body": "SelectSchedule(${1:number iNPCState})$0\r\n", 150 | "description": "(Server) Method: ENT:SelectSchedule\n\nSet the schedule we should be playing right now. " 151 | }, 152 | "ENT:SetTask": { 153 | "prefix": "SetTask", 154 | "body": "SetTask(${1:table task})$0\r\n", 155 | "description": "(Server) Method: ENT:SetTask\n\nSets the current task." 156 | }, 157 | "ENT:SetupDataTables": { 158 | "prefix": "SetupDataTables", 159 | "body": "SetupDataTables()$0\r\n", 160 | "description": "(Shared) Method: ENT:SetupDataTables\n\nCalled when the entity should set up its [[Networking Entities. Data Tables]]." 161 | }, 162 | "ENT:SpawnFunction": { 163 | "prefix": "SpawnFunction", 164 | "body": "SpawnFunction(${1:Player ply}, ${2:table tr}, ${3:string ClassName})$0\r\n", 165 | "description": "(Server) Method: ENT:SpawnFunction\n\nThis is the spawn function. It's called when a client calls the entity to be spawned." 166 | }, 167 | "ENT:StartEngineSchedule": { 168 | "prefix": "StartEngineSchedule", 169 | "body": "StartEngineSchedule(${1:number scheduleID})$0\r\n", 170 | "description": "(Server) Method: ENT:StartEngineSchedule\n\nStarts an engine schedule." 171 | }, 172 | "ENT:StartEngineTask": { 173 | "prefix": "StartEngineTask", 174 | "body": "StartEngineTask(${1:number taskID}, ${2:number TaskData})$0\r\n", 175 | "description": "(Server) Method: ENT:StartEngineTask\n\nCalled when an engine task has been started on the entity." 176 | }, 177 | "ENT:StartSchedule": { 178 | "prefix": "StartSchedule", 179 | "body": "StartSchedule(${1:Schedule sched})$0\r\n", 180 | "description": "(Server) Method: ENT:StartSchedule\n\nStarts a schedule previously created by ai_schedule.New." 181 | }, 182 | "ENT:StartTask": { 183 | "prefix": "StartTask", 184 | "body": "StartTask(${1:Task task})$0\r\n", 185 | "description": "(Server) Method: ENT:StartTask\n\nCalled once on starting task." 186 | }, 187 | "ENT:StartTouch": { 188 | "prefix": "StartTouch", 189 | "body": "StartTouch(${1:Entity entity})$0\r\n", 190 | "description": "(Server) Method: ENT:StartTouch\n\nCalled when the entity starts touching another entity." 191 | }, 192 | "ENT:StoreOutput": { 193 | "prefix": "StoreOutput", 194 | "body": "StoreOutput(${1:string name}, ${2:string info})$0\r\n", 195 | "description": "(Server) Method: ENT:StoreOutput\n\nUsed to store an output so it can be triggered with ENTITY.TriggerOutput." 196 | }, 197 | "ENT:TaskFinished": { 198 | "prefix": "TaskFinished", 199 | "body": "TaskFinished()$0\r\n", 200 | "description": "(Server) Method: ENT:TaskFinished\n\nReturns true if the current running Task is finished." 201 | }, 202 | "ENT:TaskTime": { 203 | "prefix": "TaskTime", 204 | "body": "TaskTime()$0\r\n", 205 | "description": "(Server) Method: ENT:TaskTime\n\nReturns how many seconds we've been doing this current task" 206 | }, 207 | "ENT:TestCollision": { 208 | "prefix": "TestCollision", 209 | "body": "TestCollision(${1:Vector startpos}, ${2:Vector delta}, ${3:boolean isbox}, ${4:Vector extents})$0\r\n", 210 | "description": "(Shared) Method: ENT:TestCollision\n\nAllows you to override trace result when a trace hits the entitys Bounding Box." 211 | }, 212 | "ENT:Think": { 213 | "prefix": "Think", 214 | "body": "Think()$0\r\n", 215 | "description": "(Shared) Method: ENT:Think\n\nCalled every frame on the client." 216 | }, 217 | "ENT:TriggerOutput": { 218 | "prefix": "TriggerOutput", 219 | "body": "TriggerOutput(${1:string output}, ${2:Entity activator}, ${3:string data=nil})$0\r\n", 220 | "description": "(Server) Method: ENT:TriggerOutput\n\nTriggers all outputs stored using ENTITY.StoreOutput." 221 | }, 222 | "ENT:UpdateTransmitState": { 223 | "prefix": "UpdateTransmitState", 224 | "body": "UpdateTransmitState()$0\r\n", 225 | "description": "(Server) Method: ENT:UpdateTransmitState\n\nCalled whenever the transmit state should be updated." 226 | }, 227 | "GM:": { 228 | "prefix": "", 229 | "body": "(${1:Entity ent}, ${2:string input}, ${3:Entity activator}, ${4:Entity caller}, ${5:any value})$0\r\n", 230 | "description": "(Server) Method: GM:\n\nCalled when a map I/O event occurs." 231 | }, 232 | "GM:AdjustMouseSensitivity": { 233 | "prefix": "AdjustMouseSensitivity", 234 | "body": "AdjustMouseSensitivity(${1:number defaultSensitivity})$0\r\n", 235 | "description": "(Client) Method: GM:AdjustMouseSensitivity\n\nAllows you to adjust the mouse sensitivity." 236 | }, 237 | "GM:AllowPlayerPickup": { 238 | "prefix": "AllowPlayerPickup", 239 | "body": "AllowPlayerPickup(${1:Player ply}, ${2:Entity ent})$0\r\n", 240 | "description": "(Server) Method: GM:AllowPlayerPickup\n\nCalled when a player tries to pick up something using the \"use\" key, return to override." 241 | }, 242 | "GM:CalcMainActivity": { 243 | "prefix": "CalcMainActivity", 244 | "body": "CalcMainActivity(${1:Player ply}, ${2:Vector vel})$0\r\n", 245 | "description": "(Shared) Method: GM:CalcMainActivity\n\nThis hook is used to calculate animations for a player." 246 | }, 247 | "GM:CalcVehicleView": { 248 | "prefix": "CalcVehicleView", 249 | "body": "CalcVehicleView(${1:Vehicle veh}, ${2:Player ply}, ${3:table view})$0\r\n", 250 | "description": "(Client) Method: GM:CalcVehicleView\n\nCalled from GM.CalcView when player is in driving a vehicle." 251 | }, 252 | "GM:CalcViewModelView": { 253 | "prefix": "CalcViewModelView", 254 | "body": "CalcViewModelView(${1:Weapon wep}, ${2:Entity vm}, ${3:Vector oldPos}, ${4:Angle oldAng}, ${5:Vector pos}, ${6:Angle ang})$0\r\n", 255 | "description": "(Client) Method: GM:CalcViewModelView\n\nAllows overriding the position and angle of the viewmodel." 256 | }, 257 | "GM:CanEditVariable": { 258 | "prefix": "CanEditVariable", 259 | "body": "CanEditVariable(${1:Entity ent}, ${2:Player ply}, ${3:string key}, ${4:string val}, ${5:table editor})$0\r\n", 260 | "description": "(Server) Method: GM:CanEditVariable\n\nCalled when a variable is edited on an Entity (called by Edit Properties... menu), to determine if the edit should be permitted." 261 | }, 262 | "GM:CanExitVehicle": { 263 | "prefix": "CanExitVehicle", 264 | "body": "CanExitVehicle(${1:Vehicle veh}, ${2:Player ply})$0\r\n", 265 | "description": "(Server) Method: GM:CanExitVehicle\n\nDetermines if the player can exit the vehicle." 266 | }, 267 | "GM:CanPlayerUnfreeze": { 268 | "prefix": "CanPlayerUnfreeze", 269 | "body": "CanPlayerUnfreeze(${1:Player player}, ${2:Entity entity}, ${3:PhysObj phys})$0\r\n", 270 | "description": "(Server) Method: GM:CanPlayerUnfreeze\n\nDetermines if the player can unfreeze the entity." 271 | }, 272 | "GM:CaptureVideo": { 273 | "prefix": "CaptureVideo", 274 | "body": "CaptureVideo()$0\r\n", 275 | "description": "(Menu) Method: GM:CaptureVideo\n\nCalled each frame to record demos to video using IVideoWriter. " 276 | }, 277 | "GM:ChatTextChanged": { 278 | "prefix": "ChatTextChanged", 279 | "body": "ChatTextChanged(${1:string text})$0\r\n", 280 | "description": "(Client) Method: GM:ChatTextChanged\n\nCalled whenever the content of the user's chat input box is changed." 281 | }, 282 | "GM:ContextMenuOpen": { 283 | "prefix": "ContextMenuOpen", 284 | "body": "ContextMenuOpen()$0\r\n", 285 | "description": "(Client) Method: GM:ContextMenuOpen\n\nCalled when the context menu is trying to be opened. Return false to disallow it." 286 | }, 287 | "GM:CreateEntityRagdoll": { 288 | "prefix": "CreateEntityRagdoll", 289 | "body": "CreateEntityRagdoll(${1:Entity owner}, ${2:Entity ragdoll})$0\r\n", 290 | "description": "(Server) Method: GM:CreateEntityRagdoll\n\nCalled when a ragdoll of an entity has been created." 291 | }, 292 | "GM:DoPlayerDeath": { 293 | "prefix": "DoPlayerDeath", 294 | "body": "DoPlayerDeath(${1:Player ply}, ${2:Entity attacker}, ${3:CTakeDamageInfo dmg})$0\r\n", 295 | "description": "(Server) Method: GM:DoPlayerDeath\n\nHandles the player's death." 296 | }, 297 | "GM:DrawDeathNotice": { 298 | "prefix": "DrawDeathNotice", 299 | "body": "DrawDeathNotice(${1:number x}, ${2:number y})$0\r\n", 300 | "description": "(Client) Method: GM:DrawDeathNotice\n\nThis hook is called every frame to draw all of the current death notices." 301 | }, 302 | "GM:DrawMonitors": { 303 | "prefix": "DrawMonitors", 304 | "body": "DrawMonitors()$0\r\n", 305 | "description": "(Client) Method: GM:DrawMonitors\n\nCalled 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." 306 | }, 307 | "GM:EndEntityDriving": { 308 | "prefix": "EndEntityDriving", 309 | "body": "EndEntityDriving(${1:Entity ent}, ${2:Player ply})$0\r\n", 310 | "description": "(Shared) Method: GM:EndEntityDriving\n\nCalled right before an entity stops driving. Overriding this hook will cause it to not call drive.End and the player will not stop driving." 311 | }, 312 | "GM:EntityFireBullets": { 313 | "prefix": "EntityFireBullets", 314 | "body": "EntityFireBullets(${1:Entity ent}, ${2:table data})$0\r\n", 315 | "description": "(Shared) Method: GM:EntityFireBullets\n\nCalled every time a bullet is fired from an entity." 316 | }, 317 | "GM:EntityRemoved": { 318 | "prefix": "EntityRemoved", 319 | "body": "EntityRemoved(${1:Entity ent})$0\r\n", 320 | "description": "(Shared) Method: GM:EntityRemoved\n\nCalled right before the removal of an entity." 321 | }, 322 | "GM:GameContentChanged": { 323 | "prefix": "GameContentChanged", 324 | "body": "GameContentChanged()$0\r\n", 325 | "description": "(Menu) Method: GM:GameContentChanged\n\nCalled to refresh menu content once it has initialized or something has been mounted." 326 | }, 327 | "GM:GetMotionBlurValues": { 328 | "prefix": "GetMotionBlurValues", 329 | "body": "GetMotionBlurValues(${1:number horizontal}, ${2:number vertical}, ${3:number forward}, ${4:number rotational})$0\r\n", 330 | "description": "(Client) Method: GM:GetMotionBlurValues\n\nAllows you to modify the Source Engine's motion blur shaders." 331 | }, 332 | "GM:GetPreferredCarryAngles": { 333 | "prefix": "GetPreferredCarryAngles", 334 | "body": "GetPreferredCarryAngles(${1:Entity ent})$0\r\n", 335 | "description": "(Server) Method: GM:GetPreferredCarryAngles\n\nCalled to determine preferred carry angles for the entity. It works for both, use pickup and gravity gun pickup." 336 | }, 337 | "GM:GetTeamColor": { 338 | "prefix": "GetTeamColor", 339 | "body": "GetTeamColor(${1:Entity ent})$0\r\n", 340 | "description": "(Client) Method: GM:GetTeamColor\n\nReturns the color for the given entity's team. This is used in chat and deathnotice text." 341 | }, 342 | "GM:GetTeamNumColor": { 343 | "prefix": "GetTeamNumColor", 344 | "body": "GetTeamNumColor(${1:number team})$0\r\n", 345 | "description": "(Client) Method: GM:GetTeamNumColor\n\nReturns the team color for the given team index." 346 | }, 347 | "GM:GrabEarAnimation": { 348 | "prefix": "GrabEarAnimation", 349 | "body": "GrabEarAnimation(${1:Player ply})$0\r\n", 350 | "description": "(Shared) Method: GM:GrabEarAnimation\n\nOverride this hook to disable/change ear-grabbing in your gamemode." 351 | }, 352 | "GM:GravGunOnDropped": { 353 | "prefix": "GravGunOnDropped", 354 | "body": "GravGunOnDropped(${1:Player ply}, ${2:Entity ent})$0\r\n", 355 | "description": "(Server) Method: GM:GravGunOnDropped\n\nCalled when an entity is released by a gravity gun." 356 | }, 357 | "GM:GravGunOnPickedUp": { 358 | "prefix": "GravGunOnPickedUp", 359 | "body": "GravGunOnPickedUp(${1:Player ply}, ${2:Entity ent})$0\r\n", 360 | "description": "(Server) Method: GM:GravGunOnPickedUp\n\nCalled when an entity is picked up by a gravity gun." 361 | }, 362 | "GM:GravGunPickupAllowed": { 363 | "prefix": "GravGunPickupAllowed", 364 | "body": "GravGunPickupAllowed(${1:Player ply}, ${2:Entity ent})$0\r\n", 365 | "description": "(Shared) Method: GM:GravGunPickupAllowed\n\nReturns whether or not a player is allowed to pick up an entity with the gravity gun. Return true to allow." 366 | }, 367 | "GM:GravGunPunt": { 368 | "prefix": "GravGunPunt", 369 | "body": "GravGunPunt(${1:Player ply}, ${2:Entity ent})$0\r\n", 370 | "description": "(Shared) Method: GM:GravGunPunt\n\nCalled when an entity is about to be punted with the gravity gun (primary fire). Return true to allow and false to disallow." 371 | }, 372 | "GM:GUIMouseDoublePressed": { 373 | "prefix": "GUIMouseDoublePressed", 374 | "body": "GUIMouseDoublePressed(${1:number mouseCode}, ${2:Vector aimVector})$0\r\n", 375 | "description": "(Client) Method: GM:GUIMouseDoublePressed\n\nCalled 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." 376 | }, 377 | "GM:GUIMousePressed": { 378 | "prefix": "GUIMousePressed", 379 | "body": "GUIMousePressed(${1:number mouseCode}, ${2:Vector aimVector})$0\r\n", 380 | "description": "(Client) Method: GM:GUIMousePressed\n\nCalled 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." 381 | }, 382 | "GM:GUIMouseReleased": { 383 | "prefix": "GUIMouseReleased", 384 | "body": "GUIMouseReleased(${1:number mouseCode}, ${2:Vector aimVector})$0\r\n", 385 | "description": "(Client) Method: GM:GUIMouseReleased\n\nCalled 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." 386 | }, 387 | "GM:HandlePlayerDriving": { 388 | "prefix": "HandlePlayerDriving", 389 | "body": "HandlePlayerDriving(${1:Player ply})$0\r\n", 390 | "description": "(Shared) Method: GM:HandlePlayerDriving\n\nAllows to override player driving animations." 391 | }, 392 | "GM:HandlePlayerDucking": { 393 | "prefix": "HandlePlayerDucking", 394 | "body": "HandlePlayerDucking(${1:Player ply}, ${2:number velocity})$0\r\n", 395 | "description": "(Shared) Method: GM:HandlePlayerDucking\n\nAllows to override player crouch animations." 396 | }, 397 | "GM:HandlePlayerJumping": { 398 | "prefix": "HandlePlayerJumping", 399 | "body": "HandlePlayerJumping(${1:Player ply}, ${2:number velocity})$0\r\n", 400 | "description": "(Shared) Method: GM:HandlePlayerJumping\n\nAllows to override player jumping animations." 401 | }, 402 | "GM:HandlePlayerLanding": { 403 | "prefix": "HandlePlayerLanding", 404 | "body": "HandlePlayerLanding(${1:Player ply}, ${2:number velocity}, ${3:boolean onGround})$0\r\n", 405 | "description": "(Shared) Method: GM:HandlePlayerLanding\n\nAllows to override player landing animations." 406 | }, 407 | "GM:HandlePlayerNoClipping": { 408 | "prefix": "HandlePlayerNoClipping", 409 | "body": "HandlePlayerNoClipping(${1:Player ply}, ${2:number velocity})$0\r\n", 410 | "description": "(Shared) Method: GM:HandlePlayerNoClipping\n\nAllows to override player noclip animations." 411 | }, 412 | "GM:HandlePlayerSwimming": { 413 | "prefix": "HandlePlayerSwimming", 414 | "body": "HandlePlayerSwimming(${1:Player ply}, ${2:number velocity})$0\r\n", 415 | "description": "(Shared) Method: GM:HandlePlayerSwimming\n\nAllows to override player swimming animations." 416 | }, 417 | "GM:HandlePlayerVaulting": { 418 | "prefix": "HandlePlayerVaulting", 419 | "body": "HandlePlayerVaulting(${1:Player ply}, ${2:number velocity})$0\r\n", 420 | "description": "(Shared) Method: GM:HandlePlayerVaulting\n\nAllows to override player flying ( in mid-air, not noclipping ) animations." 421 | }, 422 | "GM:HideTeam": { 423 | "prefix": "HideTeam", 424 | "body": "HideTeam()$0\r\n", 425 | "description": "(Client) Method: GM:HideTeam\n\nHides the team selection panel." 426 | }, 427 | "GM:HUDAmmoPickedUp": { 428 | "prefix": "HUDAmmoPickedUp", 429 | "body": "HUDAmmoPickedUp(${1:string itemName}, ${2:number amount})$0\r\n", 430 | "description": "(Client) Method: GM:HUDAmmoPickedUp\n\nCalled when the client has picked up ammo. Override to disable default HUD notification." 431 | }, 432 | "GM:HUDDrawPickupHistory": { 433 | "prefix": "HUDDrawPickupHistory", 434 | "body": "HUDDrawPickupHistory()$0\r\n", 435 | "description": "(Client) Method: GM:HUDDrawPickupHistory\n\nRenders the HUD pick-up history. Override to hide default or draw your own HUD." 436 | }, 437 | "GM:HUDDrawScoreBoard": { 438 | "prefix": "HUDDrawScoreBoard", 439 | "body": "HUDDrawScoreBoard()$0\r\n", 440 | "description": "(Client) Method: GM:HUDDrawScoreBoard\n\nCalled every frame to render the scoreboard." 441 | }, 442 | "GM:HUDDrawTargetID": { 443 | "prefix": "HUDDrawTargetID", 444 | "body": "HUDDrawTargetID()$0\r\n", 445 | "description": "(Client) Method: GM:HUDDrawTargetID\n\nCalled from GM.HUDPaint to draw player info when you hover over a player with your crosshair or mouse." 446 | }, 447 | "GM:HUDItemPickedUp": { 448 | "prefix": "HUDItemPickedUp", 449 | "body": "HUDItemPickedUp(${1:string itemName})$0\r\n", 450 | "description": "(Client) Method: GM:HUDItemPickedUp\n\nCalled when an item has been picked up. Override to disable the default HUD notification." 451 | }, 452 | "GM:HUDPaintBackground": { 453 | "prefix": "HUDPaintBackground", 454 | "body": "HUDPaintBackground()$0\r\n", 455 | "description": "(Client) Method: GM:HUDPaintBackground\n\nCalled after GM.HUDPaint when the HUD background is being drawn." 456 | }, 457 | "GM:HUDWeaponPickedUp": { 458 | "prefix": "HUDWeaponPickedUp", 459 | "body": "HUDWeaponPickedUp(${1:Weapon weapon})$0\r\n", 460 | "description": "(Client) Method: GM:HUDWeaponPickedUp\n\nCalled when a weapon has been picked up. Override to disable the default HUD notification." 461 | }, 462 | "GM:Initialize": { 463 | "prefix": "Initialize", 464 | "body": "Initialize()$0\r\n", 465 | "description": "(Shared) Method: GM:Initialize\n\nCalled after the gamemode loads and starts." 466 | }, 467 | "GM:InputMouseApply": { 468 | "prefix": "InputMouseApply", 469 | "body": "InputMouseApply(${1:CUserCmd cmd}, ${2:number x}, ${3:number y}, ${4:Angle ang})$0\r\n", 470 | "description": "(Client) Method: GM:InputMouseApply\n\nAllows 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." 471 | }, 472 | "GM:MenuStart": { 473 | "prefix": "MenuStart", 474 | "body": "MenuStart()$0\r\n", 475 | "description": "(Menu) Method: GM:MenuStart\n\nCalled when ''menu.lua'' has finished loading." 476 | }, 477 | "GM:MouthMoveAnimation": { 478 | "prefix": "MouthMoveAnimation", 479 | "body": "MouthMoveAnimation(${1:Player ply})$0\r\n", 480 | "description": "(Shared) Method: GM:MouthMoveAnimation\n\nOverride this gamemode function to disable mouth movement when talking on voice chat." 481 | }, 482 | "GM:Move": { 483 | "prefix": "Move", 484 | "body": "Move(${1:Player ply}, ${2:CMoveData mv})$0\r\n", 485 | "description": "(Shared) Method: GM:Move\n\nThe Move hook is called for you to manipulate the player's MoveData. " 486 | }, 487 | "GM:NeedsDepthPass": { 488 | "prefix": "NeedsDepthPass", 489 | "body": "NeedsDepthPass()$0\r\n", 490 | "description": "(Client) Method: GM:NeedsDepthPass\n\nReturning true in this hook will cause it to render depth buffers defined with render.GetResolvedFullFrameDepth." 491 | }, 492 | "GM:NetworkEntityCreated": { 493 | "prefix": "NetworkEntityCreated", 494 | "body": "NetworkEntityCreated(${1:Entity ent})$0\r\n", 495 | "description": "(Client) Method: GM:NetworkEntityCreated\n\nCalled when an entity has been created over the network." 496 | }, 497 | "GM:NetworkIDValidated": { 498 | "prefix": "NetworkIDValidated", 499 | "body": "NetworkIDValidated(${1:string name}, ${2:string steamID})$0\r\n", 500 | "description": "(Server) Method: GM:NetworkIDValidated\n\nCalled when a player has been validated by Steam." 501 | }, 502 | "GM:OnAchievementAchieved": { 503 | "prefix": "OnAchievementAchieved", 504 | "body": "OnAchievementAchieved(${1:Player ply}, ${2:number achievement})$0\r\n", 505 | "description": "(Client) Method: GM:OnAchievementAchieved\n\nCalled when a player has achieved an achievement. You can get the name and other information from an achievement ID with the achievements library." 506 | }, 507 | "GM:OnChatTab": { 508 | "prefix": "OnChatTab", 509 | "body": "OnChatTab(${1:string text})$0\r\n", 510 | "description": "(Client) Method: GM:OnChatTab\n\nCalled when the local player presses TAB while having their chatbox opened." 511 | }, 512 | "GM:OnContextMenuClose": { 513 | "prefix": "OnContextMenuClose", 514 | "body": "OnContextMenuClose()$0\r\n", 515 | "description": "(Client) Method: GM:OnContextMenuClose\n\nCalled when the context menu was closed." 516 | }, 517 | "GM:OnContextMenuOpen": { 518 | "prefix": "OnContextMenuOpen", 519 | "body": "OnContextMenuOpen()$0\r\n", 520 | "description": "(Client) Method: GM:OnContextMenuOpen\n\nCalled when the context menu is opened." 521 | }, 522 | "GM:OnGamemodeLoaded": { 523 | "prefix": "OnGamemodeLoaded", 524 | "body": "OnGamemodeLoaded()$0\r\n", 525 | "description": "(Shared) Method: GM:OnGamemodeLoaded\n\nCalled when the gamemode is loaded." 526 | }, 527 | "GM:OnLuaError": { 528 | "prefix": "OnLuaError", 529 | "body": "OnLuaError(${1:string error}, ${2:number realm}, ${3:string name}, ${4:number id})$0\r\n", 530 | "description": "(Menu) Method: GM:OnLuaError\n\nCalled when a Lua error occurs, only works in the Menu realm." 531 | }, 532 | "GM:OnNPCKilled": { 533 | "prefix": "OnNPCKilled", 534 | "body": "OnNPCKilled(${1:NPC npc}, ${2:Entity attacker}, ${3:Entity inflictor})$0\r\n", 535 | "description": "(Server) Method: GM:OnNPCKilled\n\nCalled whenever an NPC is killed." 536 | }, 537 | "GM:OnPhysgunFreeze": { 538 | "prefix": "OnPhysgunFreeze", 539 | "body": "OnPhysgunFreeze(${1:Entity weapon}, ${2:PhysObj physobj}, ${3:Entity ent}, ${4:Player ply})$0\r\n", 540 | "description": "(Server) Method: GM:OnPhysgunFreeze\n\nCalled when a player freezes an entity with the Physgun." 541 | }, 542 | "GM:OnPhysgunReload": { 543 | "prefix": "OnPhysgunReload", 544 | "body": "OnPhysgunReload(${1:Weapon physgun}, ${2:Player ply})$0\r\n", 545 | "description": "(Server) Method: GM:OnPhysgunReload\n\nCalled when a player reloads with the physgun. Override this to disable default unfreezing behavior." 546 | }, 547 | "GM:OnPlayerHitGround": { 548 | "prefix": "OnPlayerHitGround", 549 | "body": "OnPlayerHitGround(${1:Entity player}, ${2:boolean inWater}, ${3:boolean onFloater}, ${4:number speed})$0\r\n", 550 | "description": "(Shared) Method: GM:OnPlayerHitGround\n\nCalled when a player makes contact with the ground." 551 | }, 552 | "GM:OnReloaded": { 553 | "prefix": "OnReloaded", 554 | "body": "OnReloaded()$0\r\n", 555 | "description": "(Shared) Method: GM:OnReloaded\n\nCalled when gamemode has been reloaded by auto refresh." 556 | }, 557 | "GM:OnTextEntryGetFocus": { 558 | "prefix": "OnTextEntryGetFocus", 559 | "body": "OnTextEntryGetFocus(${1:Panel panel})$0\r\n", 560 | "description": "(Client) Method: GM:OnTextEntryGetFocus\n\nCalled when a DTextEntry gets focus." 561 | }, 562 | "GM:OnTextEntryLoseFocus": { 563 | "prefix": "OnTextEntryLoseFocus", 564 | "body": "OnTextEntryLoseFocus(${1:Panel panel})$0\r\n", 565 | "description": "(Client) Method: GM:OnTextEntryLoseFocus\n\nCalled when DTextEntry loses focus." 566 | }, 567 | "GM:OnUndo": { 568 | "prefix": "OnUndo", 569 | "body": "OnUndo(${1:string name}, ${2:string customText})$0\r\n", 570 | "description": "(Client) Method: GM:OnUndo\n\nCalled when the player undoes something." 571 | }, 572 | "GM:OnViewModelChanged": { 573 | "prefix": "OnViewModelChanged", 574 | "body": "OnViewModelChanged(${1:Entity viewmodel}, ${2:string oldModel}, ${3:string newModel})$0\r\n", 575 | "description": "(Shared) Method: GM:OnViewModelChanged\n\nCalled when the player changes their weapon to another one - and their viewmodel model changes." 576 | }, 577 | "GM:PhysgunDrop": { 578 | "prefix": "PhysgunDrop", 579 | "body": "PhysgunDrop(${1:Player ply}, ${2:Entity ent})$0\r\n", 580 | "description": "(Shared) Method: GM:PhysgunDrop\n\nCalled when a player drops an entity with the Physgun." 581 | }, 582 | "GM:PhysgunPickup": { 583 | "prefix": "PhysgunPickup", 584 | "body": "PhysgunPickup(${1:Player player}, ${2:Entity entity})$0\r\n", 585 | "description": "(Shared) Method: GM:PhysgunPickup\n\nCalled whenever a player picks up an entity with the Physgun." 586 | }, 587 | "GM:PlayerAuthed": { 588 | "prefix": "PlayerAuthed", 589 | "body": "PlayerAuthed(${1:Player ply}, ${2:string steamid}, ${3:string uniqueid})$0\r\n", 590 | "description": "(Server) Method: GM:PlayerAuthed\n\nCalled once when the player is authenticated." 591 | }, 592 | "GM:PlayerBindPress": { 593 | "prefix": "PlayerBindPress", 594 | "body": "PlayerBindPress(${1:Player ply}, ${2:string bind}, ${3:boolean pressed})$0\r\n", 595 | "description": "(Client) Method: GM:PlayerBindPress\n\nRuns when a bind has been pressed. Allows to block commands." 596 | }, 597 | "GM:PlayerCanHearPlayersVoice": { 598 | "prefix": "PlayerCanHearPlayersVoice", 599 | "body": "PlayerCanHearPlayersVoice(${1:Player listener}, ${2:Player talker})$0\r\n", 600 | "description": "(Server) Method: GM:PlayerCanHearPlayersVoice\n\nDecides whether a player can hear another player using voice chat." 601 | }, 602 | "GM:PlayerCanJoinTeam": { 603 | "prefix": "PlayerCanJoinTeam", 604 | "body": "PlayerCanJoinTeam(${1:Player ply}, ${2:number team})$0\r\n", 605 | "description": "(Server) Method: GM:PlayerCanJoinTeam\n\nReturns whether or not a player is allowed to join a team" 606 | }, 607 | "GM:PlayerCanPickupItem": { 608 | "prefix": "PlayerCanPickupItem", 609 | "body": "PlayerCanPickupItem(${1:Player ply}, ${2:Entity item})$0\r\n", 610 | "description": "(Server) Method: GM:PlayerCanPickupItem\n\nReturns whether or not a player is allowed to pick an item up." 611 | }, 612 | "GM:PlayerCanPickupWeapon": { 613 | "prefix": "PlayerCanPickupWeapon", 614 | "body": "PlayerCanPickupWeapon(${1:Player ply}, ${2:Weapon wep})$0\r\n", 615 | "description": "(Server) Method: GM:PlayerCanPickupWeapon\n\nReturns whether or not a player is allowed to pick up a weapon." 616 | }, 617 | "GM:PlayerCanSeePlayersChat": { 618 | "prefix": "PlayerCanSeePlayersChat", 619 | "body": "PlayerCanSeePlayersChat(${1:string text}, ${2:boolean teamOnly}, ${3:Player listener}, ${4:Player speaker})$0\r\n", 620 | "description": "(Server) Method: GM:PlayerCanSeePlayersChat\n\nReturns whether or not the player can see the other player's chat." 621 | }, 622 | "GM:PlayerConnect": { 623 | "prefix": "PlayerConnect", 624 | "body": "PlayerConnect(${1:string name}, ${2:string ip})$0\r\n", 625 | "description": "(Shared) Method: GM:PlayerConnect\n\nExecutes when a player connects to the server." 626 | }, 627 | "GM:PlayerDeath": { 628 | "prefix": "PlayerDeath", 629 | "body": "PlayerDeath(${1:Player victim}, ${2:Entity inflictor}, ${3:Entity attacker})$0\r\n", 630 | "description": "(Server) Method: GM:PlayerDeath\n\nCalled when a player is killed by Player.Kill or any other normal means, except for when the player is killed with Player.KillSilent." 631 | }, 632 | "GM:PlayerDeathSound": { 633 | "prefix": "PlayerDeathSound", 634 | "body": "PlayerDeathSound()$0\r\n", 635 | "description": "(Server) Method: GM:PlayerDeathSound\n\nReturns whether or not the default death sound should be muted." 636 | }, 637 | "GM:PlayerDeathThink": { 638 | "prefix": "PlayerDeathThink", 639 | "body": "PlayerDeathThink(${1:Player ply})$0\r\n", 640 | "description": "(Server) Method: GM:PlayerDeathThink\n\nCalled every think while the player is dead. The return value will determine if the player respawns." 641 | }, 642 | "GM:PlayerDisconnected": { 643 | "prefix": "PlayerDisconnected", 644 | "body": "PlayerDisconnected(${1:Player ply})$0\r\n", 645 | "description": "(Server) Method: GM:PlayerDisconnected\n\nCalled when a player leaves the server." 646 | }, 647 | "GM:PlayerDriveAnimate": { 648 | "prefix": "PlayerDriveAnimate", 649 | "body": "PlayerDriveAnimate(${1:Player ply})$0\r\n", 650 | "description": "(Shared) Method: GM:PlayerDriveAnimate\n\nCalled to update the player's animation during a drive." 651 | }, 652 | "GM:PlayerEndVoice": { 653 | "prefix": "PlayerEndVoice", 654 | "body": "PlayerEndVoice(${1:Player ply})$0\r\n", 655 | "description": "(Client) Method: GM:PlayerEndVoice\n\nCalled when player stops using voice chat." 656 | }, 657 | "GM:PlayerFootstep": { 658 | "prefix": "PlayerFootstep", 659 | "body": "PlayerFootstep(${1:Player ply}, ${2:Vector pos}, ${3:number foot}, ${4:string sound}, ${5:number volume}, ${6:CRecipientFilter filter})$0\r\n", 660 | "description": "(Shared) Method: GM:PlayerFootstep\n\nCalled whenever a player steps. Return true to mute the normal sound." 661 | }, 662 | "GM:PlayerFrozeObject": { 663 | "prefix": "PlayerFrozeObject", 664 | "body": "PlayerFrozeObject(${1:Player ply}, ${2:Entity ent}, ${3:PhysObj physobj})$0\r\n", 665 | "description": "(Server) Method: GM:PlayerFrozeObject\n\nCalled when a player freezes an object." 666 | }, 667 | "GM:PlayerLeaveVehicle": { 668 | "prefix": "PlayerLeaveVehicle", 669 | "body": "PlayerLeaveVehicle(${1:Player ply}, ${2:Vehicle veh})$0\r\n", 670 | "description": "(Server) Method: GM:PlayerLeaveVehicle\n\nCalled when a player leaves a vehicle." 671 | }, 672 | "GM:PlayerPostThink": { 673 | "prefix": "PlayerPostThink", 674 | "body": "PlayerPostThink(${1:Player ply})$0\r\n", 675 | "description": "(Shared) Method: GM:PlayerPostThink\n\nCalled after the player's think." 676 | }, 677 | "GM:PlayerSelectSpawn": { 678 | "prefix": "PlayerSelectSpawn", 679 | "body": "PlayerSelectSpawn(${1:Player ply})$0\r\n", 680 | "description": "(Server) Method: GM:PlayerSelectSpawn\n\nCalled to determine a spawn point for a player to spawn at." 681 | }, 682 | "GM:PlayerSelectTeamSpawn": { 683 | "prefix": "PlayerSelectTeamSpawn", 684 | "body": "PlayerSelectTeamSpawn(${1:number team}, ${2:Player ply})$0\r\n", 685 | "description": "(Server) Method: GM:PlayerSelectTeamSpawn\n\nFind a team spawn point entity for this player." 686 | }, 687 | "GM:PlayerShouldTakeDamage": { 688 | "prefix": "PlayerShouldTakeDamage", 689 | "body": "PlayerShouldTakeDamage(${1:Player ply}, ${2:Entity attacker})$0\r\n", 690 | "description": "(Server) Method: GM:PlayerShouldTakeDamage\n\nReturns true if the player should take damage from the given attacker." 691 | }, 692 | "GM:PlayerShouldTaunt": { 693 | "prefix": "PlayerShouldTaunt", 694 | "body": "PlayerShouldTaunt(${1:Player ply}, ${2:number act})$0\r\n", 695 | "description": "(Server) Method: GM:PlayerShouldTaunt\n\nAllows to suppress player taunts." 696 | }, 697 | "GM:PlayerSilentDeath": { 698 | "prefix": "PlayerSilentDeath", 699 | "body": "PlayerSilentDeath(${1:Player ply})$0\r\n", 700 | "description": "(Server) Method: GM:PlayerSilentDeath\n\nCalled when the player is killed by Player.KillSilent." 701 | }, 702 | "GM:PlayerSpawnAsSpectator": { 703 | "prefix": "PlayerSpawnAsSpectator", 704 | "body": "PlayerSpawnAsSpectator(${1:Player ply})$0\r\n", 705 | "description": "(Server) Method: GM:PlayerSpawnAsSpectator\n\nCalled to spawn the player as a spectator." 706 | }, 707 | "GM:PlayerSpray": { 708 | "prefix": "PlayerSpray", 709 | "body": "PlayerSpray(${1:Player sprayer})$0\r\n", 710 | "description": "(Server) Method: GM:PlayerSpray\n\nDetermines if the player can spray using the \"impulse 201\" console command." 711 | }, 712 | "GM:PlayerStartTaunt": { 713 | "prefix": "PlayerStartTaunt", 714 | "body": "PlayerStartTaunt(${1:Player ply}, ${2:number act}, ${3:number length})$0\r\n", 715 | "description": "(Server) Method: GM:PlayerStartTaunt\n\nCalled when player starts taunting." 716 | }, 717 | "GM:PlayerStartVoice": { 718 | "prefix": "PlayerStartVoice", 719 | "body": "PlayerStartVoice(${1:Player ply})$0\r\n", 720 | "description": "(Client) Method: GM:PlayerStartVoice\n\nCalled when a player starts using voice chat." 721 | }, 722 | "GM:PlayerStepSoundTime": { 723 | "prefix": "PlayerStepSoundTime", 724 | "body": "PlayerStepSoundTime(${1:Player ply}, ${2:number type}, ${3:boolean walking})$0\r\n", 725 | "description": "(Shared) Method: GM:PlayerStepSoundTime\n\nAllows you to override the time between footsteps." 726 | }, 727 | "GM:PlayerSwitchFlashlight": { 728 | "prefix": "PlayerSwitchFlashlight", 729 | "body": "PlayerSwitchFlashlight(${1:Player ply}, ${2:boolean enabled})$0\r\n", 730 | "description": "(Server) Method: GM:PlayerSwitchFlashlight\n\nCalled whenever a player attempts to either turn on or off their flashlight, returning false will deny the change." 731 | }, 732 | "GM:PlayerTraceAttack": { 733 | "prefix": "PlayerTraceAttack", 734 | "body": "PlayerTraceAttack(${1:Player ply}, ${2:CTakeDamageInfo dmginfo}, ${3:Vector dir}, ${4:table trace})$0\r\n", 735 | "description": "(Shared) Method: GM:PlayerTraceAttack\n\nCalled when a player has been hit by a trace and damaged (such as from a bullet). Returning true overrides the damage handling and prevents GM.ScalePlayerDamage from being called." 736 | }, 737 | "GM:PlayerUnfrozeObject": { 738 | "prefix": "PlayerUnfrozeObject", 739 | "body": "PlayerUnfrozeObject(${1:Player ply}, ${2:Entity ent}, ${3:PhysObj physobj})$0\r\n", 740 | "description": "(Server) Method: GM:PlayerUnfrozeObject\n\nCalled when a player unfreezes an object." 741 | }, 742 | "GM:PopulateMenuBar": { 743 | "prefix": "PopulateMenuBar", 744 | "body": "PopulateMenuBar(${1:Panel menubar})$0\r\n", 745 | "description": "(Client) Method: GM:PopulateMenuBar\n\nCalled when it's time to populate the context menu menu bar at the top." 746 | }, 747 | "GM:PopulateSTOOLMenu": { 748 | "prefix": "PopulateSTOOLMenu", 749 | "body": "PopulateSTOOLMenu()$0\r\n", 750 | "description": "(Client) Method: GM:PopulateSTOOLMenu\n\nCalled to populate the Scripted Tool menu." 751 | }, 752 | "GM:PopulateToolMenu": { 753 | "prefix": "PopulateToolMenu", 754 | "body": "PopulateToolMenu()$0\r\n", 755 | "description": "(Client) Method: GM:PopulateToolMenu\n\nAdd the STOOLS to the tool menu. You want to call spawnmenu.AddToolMenuOption in this hook." 756 | }, 757 | "GM:PostDrawHUD": { 758 | "prefix": "PostDrawHUD", 759 | "body": "PostDrawHUD()$0\r\n", 760 | "description": "(Client) Method: GM:PostDrawHUD\n\nCalled after GM.PreDrawHUD, GM.HUDPaintBackground and GM.HUDPaint but before GM.DrawOverlay." 761 | }, 762 | "GM:PostDrawPlayerHands": { 763 | "prefix": "PostDrawPlayerHands", 764 | "body": "PostDrawPlayerHands(${1:Entity hands}, ${2:Entity vm}, ${3:Player ply}, ${4:Weapon weapon})$0\r\n", 765 | "description": "(Client) Method: GM:PostDrawPlayerHands\n\nCalled after the player hands are drawn." 766 | }, 767 | "GM:PostDrawTranslucentRenderables": { 768 | "prefix": "PostDrawTranslucentRenderables", 769 | "body": "PostDrawTranslucentRenderables(${1:boolean bDrawingDepth}, ${2:boolean bDrawingSkybox})$0\r\n", 770 | "description": "(Client) Method: GM:PostDrawTranslucentRenderables\n\nCalled after all translucent entities are drawn." 771 | }, 772 | "GM:PostGamemodeLoaded": { 773 | "prefix": "PostGamemodeLoaded", 774 | "body": "PostGamemodeLoaded()$0\r\n", 775 | "description": "(Shared) Method: GM:PostGamemodeLoaded\n\nCalled after the gamemode has loaded." 776 | }, 777 | "GM:PostPlayerDeath": { 778 | "prefix": "PostPlayerDeath", 779 | "body": "PostPlayerDeath(${1:Player ply})$0\r\n", 780 | "description": "(Server) Method: GM:PostPlayerDeath\n\nCalled right after GM.DoPlayerDeath and GM.PlayerSilentDeath." 781 | }, 782 | "GM:PostProcessPermitted": { 783 | "prefix": "PostProcessPermitted", 784 | "body": "PostProcessPermitted(${1:string ppeffect})$0\r\n", 785 | "description": "(Client) Method: GM:PostProcessPermitted\n\nAllows you to suppress post processing effect drawing." 786 | }, 787 | "GM:PostReloadToolsMenu": { 788 | "prefix": "PostReloadToolsMenu", 789 | "body": "PostReloadToolsMenu()$0\r\n", 790 | "description": "(Client) Method: GM:PostReloadToolsMenu\n\nCalled right after the Lua Loaded tool menus are reloaded. This is a good place to set up any ControlPanels." 791 | }, 792 | "GM:PreDrawPlayerHands": { 793 | "prefix": "PreDrawPlayerHands", 794 | "body": "PreDrawPlayerHands(${1:Entity hands}, ${2:Entity vm}, ${3:Player ply}, ${4:Weapon weapon})$0\r\n", 795 | "description": "(Client) Method: GM:PreDrawPlayerHands\n\nCalled before the player hands are drawn." 796 | }, 797 | "GM:PreDrawSkyBox": { 798 | "prefix": "PreDrawSkyBox", 799 | "body": "PreDrawSkyBox()$0\r\n", 800 | "description": "(Client) Method: GM:PreDrawSkyBox\n\nCalled before the sky box is drawn." 801 | }, 802 | "GM:PreDrawViewModel": { 803 | "prefix": "PreDrawViewModel", 804 | "body": "PreDrawViewModel(${1:Entity vm}, ${2:Player ply}, ${3:Weapon weapon})$0\r\n", 805 | "description": "(Client) Method: GM:PreDrawViewModel\n\nCalled before the view model has been drawn. This hook by default also calls this on weapons, so you can use WEAPON.PreDrawViewModel." 806 | }, 807 | "GM:PreGamemodeLoaded": { 808 | "prefix": "PreGamemodeLoaded", 809 | "body": "PreGamemodeLoaded()$0\r\n", 810 | "description": "(Shared) Method: GM:PreGamemodeLoaded\n\nCalled before the gamemode is loaded." 811 | }, 812 | "GM:PrePlayerDraw": { 813 | "prefix": "PrePlayerDraw", 814 | "body": "PrePlayerDraw(${1:Player player})$0\r\n", 815 | "description": "(Client) Method: GM:PrePlayerDraw\n\nCalled before the player is drawn." 816 | }, 817 | "GM:PreReloadToolsMenu": { 818 | "prefix": "PreReloadToolsMenu", 819 | "body": "PreReloadToolsMenu()$0\r\n", 820 | "description": "(Client) Method: GM:PreReloadToolsMenu\n\nCalled right before the Lua Loaded tool menus are reloaded." 821 | }, 822 | "GM:PreventScreenClicks": { 823 | "prefix": "PreventScreenClicks", 824 | "body": "PreventScreenClicks()$0\r\n", 825 | "description": "(Client) Method: GM:PreventScreenClicks\n\nThis will prevent IN_ATTACK from sending to server when player tries to shoot from C menu." 826 | }, 827 | "GM:PropBreak": { 828 | "prefix": "PropBreak", 829 | "body": "PropBreak(${1:Player attacker}, ${2:Entity prop})$0\r\n", 830 | "description": "(Shared) Method: GM:PropBreak\n\nCalled when a prop has been destroyed." 831 | }, 832 | "GM:RenderScene": { 833 | "prefix": "RenderScene", 834 | "body": "RenderScene(${1:Vector origin}, ${2:Angle angles}, ${3:number fov})$0\r\n", 835 | "description": "(Client) Method: GM:RenderScene\n\nRender the scene. Used by the \"Stereoscopy\" Post-processing effect." 836 | }, 837 | "GM:ScoreboardHide": { 838 | "prefix": "ScoreboardHide", 839 | "body": "ScoreboardHide()$0\r\n", 840 | "description": "(Client) Method: GM:ScoreboardHide\n\nCalled when player released the scoreboard button. ( TAB by default )" 841 | }, 842 | "GM:ScoreboardShow": { 843 | "prefix": "ScoreboardShow", 844 | "body": "ScoreboardShow()$0\r\n", 845 | "description": "(Client) Method: GM:ScoreboardShow\n\nCalled when player presses the scoreboard button. ( TAB by default )" 846 | }, 847 | "GM:SetPlayerSpeed": { 848 | "prefix": "SetPlayerSpeed", 849 | "body": "SetPlayerSpeed(${1:Player ply}, ${2:number walkSpeed}, ${3:number runSpeed})$0\r\n", 850 | "description": "(Shared) Method: GM:SetPlayerSpeed\n\nSets player run and sprint speeds." 851 | }, 852 | "GM:SetupPlayerVisibility": { 853 | "prefix": "SetupPlayerVisibility", 854 | "body": "SetupPlayerVisibility(${1:Player ply}, ${2:Entity viewEntity})$0\r\n", 855 | "description": "(Server) Method: GM:SetupPlayerVisibility\n\nAllows you to add extra positions to the player's PVS. This is the place to call _G.AddOriginToPVS." 856 | }, 857 | "GM:ShowHelp": { 858 | "prefix": "ShowHelp", 859 | "body": "ShowHelp(${1:Player ply})$0\r\n", 860 | "description": "(Server) Method: GM:ShowHelp\n\nCalled when a player executes gm_showhelp console command. ( Default bind is F1 )" 861 | }, 862 | "GM:ShowSpare1": { 863 | "prefix": "ShowSpare1", 864 | "body": "ShowSpare1(${1:Player ply})$0\r\n", 865 | "description": "(Server) Method: GM:ShowSpare1\n\nCalled when a player executes gm_showspare1 console command. ( Default bind is F3 )" 866 | }, 867 | "GM:ShowSpare2": { 868 | "prefix": "ShowSpare2", 869 | "body": "ShowSpare2(${1:Player ply})$0\r\n", 870 | "description": "(Server) Method: GM:ShowSpare2\n\nCalled when a player executes gm_showspare2 console command. ( Default bind is F4 )" 871 | }, 872 | "GM:ShowTeam": { 873 | "prefix": "ShowTeam", 874 | "body": "ShowTeam(${1:Player ply})$0\r\n", 875 | "description": "(Server) Method: GM:ShowTeam\n\nCalled when a player executes gm_showteam console command. ( Default bind is F2 )" 876 | }, 877 | "GM:SpawniconGenerated": { 878 | "prefix": "SpawniconGenerated", 879 | "body": "SpawniconGenerated(${1:string lastmodel}, ${2:string imagename}, ${3:number modelsleft})$0\r\n", 880 | "description": "(Client) Method: GM:SpawniconGenerated\n\nCalled when spawn icon is generated." 881 | }, 882 | "GM:StartGame": { 883 | "prefix": "StartGame", 884 | "body": "StartGame()$0\r\n", 885 | "description": "(Menu) Method: GM:StartGame\n\nCalled when you start a new game via the menu." 886 | }, 887 | "GM:Tick": { 888 | "prefix": "Tick", 889 | "body": "Tick()$0\r\n", 890 | "description": "(Shared) Method: GM:Tick\n\nCalled every server tick. Serverside, this is similar to GM.Think." 891 | }, 892 | "GM:TranslateActivity": { 893 | "prefix": "TranslateActivity", 894 | "body": "TranslateActivity(${1:Player ply}, ${2:number act})$0\r\n", 895 | "description": "(Shared) Method: GM:TranslateActivity\n\nAllows you to translate player activities." 896 | }, 897 | "GM:UpdateAnimation": { 898 | "prefix": "UpdateAnimation", 899 | "body": "UpdateAnimation(${1:Player ply}, ${2:number velocity}, ${3:number maxSeqGroundSpeed})$0\r\n", 900 | "description": "(Shared) Method: GM:UpdateAnimation\n\nAnimation updates (pose params etc) should be done here." 901 | }, 902 | "GM:VehicleMove": { 903 | "prefix": "VehicleMove", 904 | "body": "VehicleMove(${1:Player ply}, ${2:Vehicle veh}, ${3:CMoveData mv})$0\r\n", 905 | "description": "(Shared) Method: GM:VehicleMove\n\nCalled when you are driving a vehicle. This hook works just like GM.Move." 906 | }, 907 | "GM:VGUIMousePressAllowed": { 908 | "prefix": "VGUIMousePressAllowed", 909 | "body": "VGUIMousePressAllowed(${1:number button})$0\r\n", 910 | "description": "(Client) Method: GM:VGUIMousePressAllowed\n\n[[Category:Menu_Hooks]] Called when user clicks on a VGUI panel." 911 | }, 912 | "GM:VGUIMousePressed": { 913 | "prefix": "VGUIMousePressed", 914 | "body": "VGUIMousePressed(${1:Panel pnl}, ${2:number mouseCode})$0\r\n", 915 | "description": "(Client) Method: GM:VGUIMousePressed\n\n[[Category:Menu_Hooks]] Called when a mouse button is pressed on a VGUI element or menu." 916 | }, 917 | "GM:WorkshopDownloadFile": { 918 | "prefix": "WorkshopDownloadFile", 919 | "body": "WorkshopDownloadFile(${1:number id}, ${2:number imageID}, ${3:string title}, ${4:number size})$0\r\n", 920 | "description": "(Menu) Method: GM:WorkshopDownloadFile\n\nCalled when an addon from the Steam workshop begins downloading. Used by default to place details on the workshop downloading panel." 921 | }, 922 | "GM:WorkshopDownloadProgress": { 923 | "prefix": "WorkshopDownloadProgress", 924 | "body": "WorkshopDownloadProgress(${1:number id}, ${2:number imageID}, ${3:string title}, ${4:number downloaded}, ${5:number expected})$0\r\n", 925 | "description": "(Menu) Method: GM:WorkshopDownloadProgress\n\nCalled while an addon from the Steam workshop is downloading. Used by default to update details on the fancy workshop download panel." 926 | }, 927 | "GM:WorkshopDownloadTotals": { 928 | "prefix": "WorkshopDownloadTotals", 929 | "body": "WorkshopDownloadTotals(${1:number remain}, ${2:number total})$0\r\n", 930 | "description": "(Menu) Method: GM:WorkshopDownloadTotals\n\nCalled after GM.WorkshopStart." 931 | }, 932 | "GM:WorkshopEnd": { 933 | "prefix": "WorkshopEnd", 934 | "body": "WorkshopEnd()$0\r\n", 935 | "description": "(Menu) Method: GM:WorkshopEnd\n\nCalled when downloading content from Steam workshop ends. Used by default to hide fancy workshop downloading panel." 936 | }, 937 | "GM:WorkshopStart": { 938 | "prefix": "WorkshopStart", 939 | "body": "WorkshopStart()$0\r\n", 940 | "description": "(Menu) Method: GM:WorkshopStart\n\nCalled when downloading content from Steam workshop begins. Used by default to show fancy workshop downloading panel." 941 | }, 942 | "NEXTBOT:BehaveStart": { 943 | "prefix": "BehaveStart", 944 | "body": "BehaveStart()$0\r\n", 945 | "description": "(Server) Method: NEXTBOT:BehaveStart\n\nCalled to initialize the behaviour." 946 | }, 947 | "NEXTBOT:BehaveUpdate": { 948 | "prefix": "BehaveUpdate", 949 | "body": "BehaveUpdate(${1:number interval})$0\r\n", 950 | "description": "(Server) Method: NEXTBOT:BehaveUpdate\n\nCalled to update the bot's behaviour." 951 | }, 952 | "NEXTBOT:BodyUpdate": { 953 | "prefix": "BodyUpdate", 954 | "body": "BodyUpdate()$0\r\n", 955 | "description": "(Server) Method: NEXTBOT:BodyUpdate\n\nCalled to update the bot's animation." 956 | }, 957 | "NEXTBOT:OnContact": { 958 | "prefix": "OnContact", 959 | "body": "OnContact(${1:Entity ent})$0\r\n", 960 | "description": "(Server) Method: NEXTBOT:OnContact\n\nCalled when the nextbot touches another entity." 961 | }, 962 | "NEXTBOT:OnIgnite": { 963 | "prefix": "OnIgnite", 964 | "body": "OnIgnite()$0\r\n", 965 | "description": "(Server) Method: NEXTBOT:OnIgnite\n\nCalled when the bot is ignited." 966 | }, 967 | "NEXTBOT:OnInjured": { 968 | "prefix": "OnInjured", 969 | "body": "OnInjured(${1:CTakeDamageInfo info})$0\r\n", 970 | "description": "(Server) Method: NEXTBOT:OnInjured\n\nCalled when the bot gets hurt." 971 | }, 972 | "NEXTBOT:": { 973 | "prefix": "", 974 | "body": "(${1:CTakeDamageInfo info})$0\r\n", 975 | "description": "(Server) Method: NEXTBOT:\n\nCalled when the bot gets killed." 976 | }, 977 | "NEXTBOT:OnLandOnGround": { 978 | "prefix": "OnLandOnGround", 979 | "body": "OnLandOnGround(${1:Entity ent})$0\r\n", 980 | "description": "(Server) Method: NEXTBOT:OnLandOnGround\n\nCalled when the bot's feet return to the ground." 981 | }, 982 | "NEXTBOT:OnLeaveGround": { 983 | "prefix": "OnLeaveGround", 984 | "body": "OnLeaveGround(${1:Entity ent})$0\r\n", 985 | "description": "(Server) Method: NEXTBOT:OnLeaveGround\n\nCalled when the bot's feet leave the ground - for whatever reason." 986 | }, 987 | "NEXTBOT:OnNavAreaChanged": { 988 | "prefix": "OnNavAreaChanged", 989 | "body": "OnNavAreaChanged(${1:CNavArea old}, ${2:CNavArea new})$0\r\n", 990 | "description": "(Server) Method: NEXTBOT:OnNavAreaChanged\n\nCalled when the nextbot enters a new navigation area." 991 | }, 992 | "NEXTBOT:OnOtherKilled": { 993 | "prefix": "OnOtherKilled", 994 | "body": "OnOtherKilled(${1:Entity victim}, ${2:CTakeDamageInfo info})$0\r\n", 995 | "description": "(Server) Method: NEXTBOT:OnOtherKilled\n\nCalled when someone else or something else has been killed." 996 | }, 997 | "NEXTBOT:OnUnStuck": { 998 | "prefix": "OnUnStuck", 999 | "body": "OnUnStuck()$0\r\n", 1000 | "description": "(Server) Method: NEXTBOT:OnUnStuck\n\nCalled when the bot thinks it is un-stuck." 1001 | }, 1002 | "NEXTBOT:Think": { 1003 | "prefix": "Think", 1004 | "body": "Think()$0\r\n", 1005 | "description": "(Server) Method: NEXTBOT:Think\n\nCalled every tick." 1006 | }, 1007 | "NEXTBOT:Use": { 1008 | "prefix": "Use", 1009 | "body": "Use(${1:Entity activator}, ${2:Entity caller}, ${3:number type}, ${4:number value})$0\r\n", 1010 | "description": "(Server) Method: NEXTBOT:Use\n\nCalled when a player 'uses' the entity." 1011 | }, 1012 | "PANEL:ActionSignal": { 1013 | "prefix": "ActionSignal", 1014 | "body": "ActionSignal(${1:string signalName}, ${2:string signalValue})$0\r\n", 1015 | "description": "(Client) Method: PANEL:ActionSignal\n\nCalled whenever a panel receives a command signal from one of its children." 1016 | }, 1017 | "PANEL:": { 1018 | "prefix": "", 1019 | "body": "()$0\r\n", 1020 | "description": "(Client) Method: PANEL:\n\nCalled every frame unless Panel.IsVisible is set to false." 1021 | }, 1022 | "PANEL:ApplySchemeSettings": { 1023 | "prefix": "ApplySchemeSettings", 1024 | "body": "ApplySchemeSettings()$0\r\n", 1025 | "description": "(Client) Method: PANEL:ApplySchemeSettings\n\nCalled whenever the panel should apply its scheme(style)." 1026 | }, 1027 | "PANEL:Init": { 1028 | "prefix": "Init", 1029 | "body": "Init()$0\r\n", 1030 | "description": "(Client) Method: PANEL:Init\n\nCalled when the panel is created. This is called for each base type that the panel has." 1031 | }, 1032 | "PANEL:OnChangeTitle": { 1033 | "prefix": "OnChangeTitle", 1034 | "body": "OnChangeTitle(${1:string targetURL})$0\r\n", 1035 | "description": "(Client) Method: PANEL:OnChangeTitle\n\nCalled by HTML panels when the target URL of the frame has changed, this happens when you hover over a link." 1036 | }, 1037 | "PANEL:OnChildAdded": { 1038 | "prefix": "OnChildAdded", 1039 | "body": "OnChildAdded(${1:Panel child})$0\r\n", 1040 | "description": "(Client) Method: PANEL:OnChildAdded\n\nCalled whenever a child was parented to the panel." 1041 | }, 1042 | "PANEL:OnChildRemoved": { 1043 | "prefix": "OnChildRemoved", 1044 | "body": "OnChildRemoved(${1:Panel child})$0\r\n", 1045 | "description": "(Client) Method: PANEL:OnChildRemoved\n\nCalled whenever a child of the panel is about to removed." 1046 | }, 1047 | "PANEL:OnChildViewCreated": { 1048 | "prefix": "OnChildViewCreated", 1049 | "body": "OnChildViewCreated(${1:string sourceURL}, ${2:string targetURL}, ${3:boolean isPopup})$0\r\n", 1050 | "description": "(Client) Method: PANEL:OnChildViewCreated\n\nCalled by HTML panels when the page attempts to open a new child view (such as a popup or new tab)." 1051 | }, 1052 | "PANEL:OnCursorEntered": { 1053 | "prefix": "OnCursorEntered", 1054 | "body": "OnCursorEntered()$0\r\n", 1055 | "description": "(Client) Method: PANEL:OnCursorEntered\n\nCalled whenever the cursor entered the panels bounds." 1056 | }, 1057 | "PANEL:OnCursorExited": { 1058 | "prefix": "OnCursorExited", 1059 | "body": "OnCursorExited()$0\r\n", 1060 | "description": "(Client) Method: PANEL:OnCursorExited\n\nCalled whenever the cursor left the panels bounds." 1061 | }, 1062 | "PANEL:OnCursorMoved": { 1063 | "prefix": "OnCursorMoved", 1064 | "body": "OnCursorMoved(${1:number cursorX}, ${2:number cursorY})$0\r\n", 1065 | "description": "(Client) Method: PANEL:OnCursorMoved\n\nCalled whenever the cursor was moved with the panels bounds." 1066 | }, 1067 | "PANEL:OnDocumentReady": { 1068 | "prefix": "OnDocumentReady", 1069 | "body": "OnDocumentReady(${1:string url})$0\r\n", 1070 | "description": "(Client) Method: PANEL:OnDocumentReady\n\nCalled by HTML panels when the panel's DOM has been set up. You can run JavaScript in here." 1071 | }, 1072 | "PANEL:OnKeyCodePressed": { 1073 | "prefix": "OnKeyCodePressed", 1074 | "body": "OnKeyCodePressed(${1:number keyCode})$0\r\n", 1075 | "description": "(Client) Method: PANEL:OnKeyCodePressed\n\nCalled whenever a keyboard key was pressed while the panel is focused." 1076 | }, 1077 | "PANEL:OnMousePressed": { 1078 | "prefix": "OnMousePressed", 1079 | "body": "OnMousePressed(${1:number keyCode})$0\r\n", 1080 | "description": "(Client) Method: PANEL:OnMousePressed\n\nCalled whenever a mouse key was pressed while the panel is focused." 1081 | }, 1082 | "PANEL:OnMouseReleased": { 1083 | "prefix": "OnMouseReleased", 1084 | "body": "OnMouseReleased(${1:number keyCode})$0\r\n", 1085 | "description": "(Client) Method: PANEL:OnMouseReleased\n\nCalled whenever a mouse key was released while the panel is focused." 1086 | }, 1087 | "PANEL:OnMouseWheeled": { 1088 | "prefix": "OnMouseWheeled", 1089 | "body": "OnMouseWheeled(${1:number scrollDelta})$0\r\n", 1090 | "description": "(Client) Method: PANEL:OnMouseWheeled\n\nCalled whenever the mouse wheel was used." 1091 | }, 1092 | "PANEL:OnRemove": { 1093 | "prefix": "OnRemove", 1094 | "body": "OnRemove()$0\r\n", 1095 | "description": "(Client) Method: PANEL:OnRemove\n\nCalled when the panel is about to be removed." 1096 | }, 1097 | "PANEL:OnStartDragging": { 1098 | "prefix": "OnStartDragging", 1099 | "body": "OnStartDragging()$0\r\n", 1100 | "description": "(Client) Method: PANEL:OnStartDragging\n\n[Internal] Called by dragndrop.StartDragging when the panel starts being dragged." 1101 | }, 1102 | "PANEL:PaintOver": { 1103 | "prefix": "PaintOver", 1104 | "body": "PaintOver(${1:number width}, ${2:number height})$0\r\n", 1105 | "description": "(Client) Method: PANEL:PaintOver\n\nCalled whenever the panel and all its children were drawn, return true to override the default drawing." 1106 | }, 1107 | "PANEL:PerformLayout": { 1108 | "prefix": "PerformLayout", 1109 | "body": "PerformLayout(${1:number width}, ${2:number height})$0\r\n", 1110 | "description": "(Client) Method: PANEL:PerformLayout\n\nCalled whenever the panels layout was invalidated. This means all child panels must be re-positioned to fit the possibly new size of this panel." 1111 | }, 1112 | "PANEL:Think": { 1113 | "prefix": "Think", 1114 | "body": "Think()$0\r\n", 1115 | "description": "(Client) Method: PANEL:Think\n\nCalled every frame while Panel.IsVisible is true." 1116 | }, 1117 | "PLAYER:FinishMove": { 1118 | "prefix": "FinishMove", 1119 | "body": "FinishMove(${1:CMoveData mv})$0\r\n", 1120 | "description": "(Client) Method: PLAYER:FinishMove\n\nCalled from GM.FinishMove." 1121 | }, 1122 | "PLAYER:GetHandsModel": { 1123 | "prefix": "GetHandsModel", 1124 | "body": "GetHandsModel()$0\r\n", 1125 | "description": "(Client) Method: PLAYER:GetHandsModel\n\nCalled on player spawn to determine which hand model to use" 1126 | }, 1127 | "PLAYER:Init": { 1128 | "prefix": "Init", 1129 | "body": "Init()$0\r\n", 1130 | "description": "(Shared) Method: PLAYER:Init\n\nCalled when the class object is created" 1131 | }, 1132 | "PLAYER:Loadout": { 1133 | "prefix": "Loadout", 1134 | "body": "Loadout()$0\r\n", 1135 | "description": "(Server) Method: PLAYER:Loadout\n\nCalled on spawn to give the player their default loadout" 1136 | }, 1137 | "PLAYER:Move": { 1138 | "prefix": "Move", 1139 | "body": "Move(${1:CMoveData mv})$0\r\n", 1140 | "description": "(Client) Method: PLAYER:Move\n\nCalled from GM.Move." 1141 | }, 1142 | "PLAYER:PostDrawViewModel": { 1143 | "prefix": "PostDrawViewModel", 1144 | "body": "PostDrawViewModel(${1:Entity viewmodel}, ${2:Entity weapon})$0\r\n", 1145 | "description": "(Client) Method: PLAYER:PostDrawViewModel\n\nCalled after the viewmodel has been drawn" 1146 | }, 1147 | "PLAYER:PreDrawViewModel": { 1148 | "prefix": "PreDrawViewModel", 1149 | "body": "PreDrawViewModel(${1:Entity viewmodel}, ${2:Entity weapon})$0\r\n", 1150 | "description": "(Client) Method: PLAYER:PreDrawViewModel\n\nCalled before the viewmodel is drawn" 1151 | }, 1152 | "PLAYER:SetModel": { 1153 | "prefix": "SetModel", 1154 | "body": "SetModel()$0\r\n", 1155 | "description": "(Server) Method: PLAYER:SetModel\n\nCalled when we need to set player model from the class." 1156 | }, 1157 | "PLAYER:SetupDataTables": { 1158 | "prefix": "SetupDataTables", 1159 | "body": "SetupDataTables()$0\r\n", 1160 | "description": "(Shared) Method: PLAYER:SetupDataTables\n\nSet up the network table accessors" 1161 | }, 1162 | "PLAYER:Spawn": { 1163 | "prefix": "Spawn", 1164 | "body": "Spawn()$0\r\n", 1165 | "description": "(Server) Method: PLAYER:Spawn\n\nCalled when the player spawns" 1166 | }, 1167 | "PLAYER:StartMove": { 1168 | "prefix": "StartMove", 1169 | "body": "StartMove(${1:CUserCmd cmd}, ${2:CMoveData mv})$0\r\n", 1170 | "description": "(Client) Method: PLAYER:StartMove\n\nCalled from GM.CreateMove." 1171 | }, 1172 | "PLAYER:ViewModelChanged": { 1173 | "prefix": "ViewModelChanged", 1174 | "body": "ViewModelChanged(${1:Entity viewmodel}, ${2:string old}, ${3:string new})$0\r\n", 1175 | "description": "(Client) Method: PLAYER:ViewModelChanged\n\nCalled when the player changes their weapon to another one causing their viewmodel model to change" 1176 | }, 1177 | "SANDBOX:AddGamemodeToolMenuCategories": { 1178 | "prefix": "AddGamemodeToolMenuCategories", 1179 | "body": "AddGamemodeToolMenuCategories()$0\r\n", 1180 | "description": "(Client) Method: SANDBOX:AddGamemodeToolMenuCategories\n\n[Internal] " 1181 | }, 1182 | "SANDBOX:AddGamemodeToolMenuTabs": { 1183 | "prefix": "AddGamemodeToolMenuTabs", 1184 | "body": "AddGamemodeToolMenuTabs()$0\r\n", 1185 | "description": "(Client) Method: SANDBOX:AddGamemodeToolMenuTabs\n\n[Internal] " 1186 | }, 1187 | "SANDBOX:AddToolMenuCategories": { 1188 | "prefix": "AddToolMenuCategories", 1189 | "body": "AddToolMenuCategories()$0\r\n", 1190 | "description": "(Client) Method: SANDBOX:AddToolMenuCategories\n\nThis hook is used to add new categories to spawnmenu tool tabs." 1191 | }, 1192 | "SANDBOX:AddToolMenuTabs": { 1193 | "prefix": "AddToolMenuTabs", 1194 | "body": "AddToolMenuTabs()$0\r\n", 1195 | "description": "(Client) Method: SANDBOX:AddToolMenuTabs\n\nThis hook is used to add new tool tabs to spawnmenu." 1196 | }, 1197 | "SANDBOX:CanDrive": { 1198 | "prefix": "CanDrive", 1199 | "body": "CanDrive(${1:Player ply}, ${2:Entity ent})$0\r\n", 1200 | "description": "(Shared) Method: SANDBOX:CanDrive\n\nCalled when a player attempts to drive a prop via Prop Drive" 1201 | }, 1202 | "SANDBOX:CanProperty": { 1203 | "prefix": "CanProperty", 1204 | "body": "CanProperty(${1:Player ply}, ${2:string property}, ${3:Entity ent})$0\r\n", 1205 | "description": "(Shared) Method: SANDBOX:CanProperty\n\nControls if a property can be used or not." 1206 | }, 1207 | "SANDBOX:CanTool": { 1208 | "prefix": "CanTool", 1209 | "body": "CanTool(${1:Player ply}, ${2:table tr}, ${3:string tool})$0\r\n", 1210 | "description": "(Shared) Method: SANDBOX:CanTool\n\nCalled when a player attempts to fire their tool gun. Return true to specifically allow the attempt, false to block it." 1211 | }, 1212 | "SANDBOX:ContentSidebarSelection": { 1213 | "prefix": "ContentSidebarSelection", 1214 | "body": "ContentSidebarSelection(${1:Panel parent}, ${2:Panel node})$0\r\n", 1215 | "description": "(Client) Method: SANDBOX:ContentSidebarSelection\n\nCalled when player selects an item on the spawnmenu sidebar at the left." 1216 | }, 1217 | "SANDBOX:ContextMenuCreated": { 1218 | "prefix": "ContextMenuCreated", 1219 | "body": "ContextMenuCreated(${1:Panel g_ContextMenu})$0\r\n", 1220 | "description": "(Client) Method: SANDBOX:ContextMenuCreated\n\nCalled when the context menu is created." 1221 | }, 1222 | "SANDBOX:PersistenceLoad": { 1223 | "prefix": "PersistenceLoad", 1224 | "body": "PersistenceLoad()$0\r\n", 1225 | "description": "(Server) Method: SANDBOX:PersistenceLoad\n\nCalled when persistent props are loaded." 1226 | }, 1227 | "SANDBOX:PersistenceSave": { 1228 | "prefix": "PersistenceSave", 1229 | "body": "PersistenceSave()$0\r\n", 1230 | "description": "(Server) Method: SANDBOX:PersistenceSave\n\nCalled when persistent props are saved." 1231 | }, 1232 | "SANDBOX:PlayerGiveSWEP": { 1233 | "prefix": "PlayerGiveSWEP", 1234 | "body": "PlayerGiveSWEP(${1:Player ply}, ${2:string weapon}, ${3:table swep})$0\r\n", 1235 | "description": "(Server) Method: SANDBOX:PlayerGiveSWEP\n\nCalled when a player attempts to give themselves a weapon from the Q menu. ( Left mouse clicks on an icon )" 1236 | }, 1237 | "SANDBOX:PlayerSpawnedEffect": { 1238 | "prefix": "PlayerSpawnedEffect", 1239 | "body": "PlayerSpawnedEffect(${1:Player ply}, ${2:string model}, ${3:Entity ent})$0\r\n", 1240 | "description": "(Server) Method: SANDBOX:PlayerSpawnedEffect\n\nCalled after the player spawned an effect." 1241 | }, 1242 | "SANDBOX:PlayerSpawnedNPC": { 1243 | "prefix": "PlayerSpawnedNPC", 1244 | "body": "PlayerSpawnedNPC(${1:Player ply}, ${2:Entity ent})$0\r\n", 1245 | "description": "(Server) Method: SANDBOX:PlayerSpawnedNPC\n\nCalled after the player spawned an NPC." 1246 | }, 1247 | "SANDBOX:PlayerSpawnedProp": { 1248 | "prefix": "PlayerSpawnedProp", 1249 | "body": "PlayerSpawnedProp(${1:Player ply}, ${2:string model}, ${3:Entity entity})$0\r\n", 1250 | "description": "(Server) Method: SANDBOX:PlayerSpawnedProp\n\nCalled when a player has successfully spawned a prop from the Q menu." 1251 | }, 1252 | "SANDBOX:PlayerSpawnedRagdoll": { 1253 | "prefix": "PlayerSpawnedRagdoll", 1254 | "body": "PlayerSpawnedRagdoll(${1:Player ply}, ${2:string model}, ${3:Entity ent})$0\r\n", 1255 | "description": "(Server) Method: SANDBOX:PlayerSpawnedRagdoll\n\nCalled after the player spawned a ragdoll." 1256 | }, 1257 | "SANDBOX:PlayerSpawnedSENT": { 1258 | "prefix": "PlayerSpawnedSENT", 1259 | "body": "PlayerSpawnedSENT(${1:Player ply}, ${2:Entity ent})$0\r\n", 1260 | "description": "(Server) Method: SANDBOX:PlayerSpawnedSENT\n\nCalled after the player has spawned a scripted entity." 1261 | }, 1262 | "SANDBOX:": { 1263 | "prefix": "", 1264 | "body": "(${1:Player ply}, ${2:Entity ent})$0\r\n", 1265 | "description": "(Server) Method: SANDBOX:\n\nCalled after the player has spawned a scripted weapon from the spawnmenu with a middle mouse click." 1266 | }, 1267 | "SANDBOX:PlayerSpawnedVehicle": { 1268 | "prefix": "PlayerSpawnedVehicle", 1269 | "body": "PlayerSpawnedVehicle(${1:Player ply}, ${2:Entity ent})$0\r\n", 1270 | "description": "(Server) Method: SANDBOX:PlayerSpawnedVehicle\n\nCalled after the player spawned a vehicle." 1271 | }, 1272 | "SANDBOX:PlayerSpawnEffect": { 1273 | "prefix": "PlayerSpawnEffect", 1274 | "body": "PlayerSpawnEffect(${1:Player ply}, ${2:string model})$0\r\n", 1275 | "description": "(Server) Method: SANDBOX:PlayerSpawnEffect\n\nCalled to ask if player allowed to spawn a particular effect or not." 1276 | }, 1277 | "SANDBOX:PlayerSpawnNPC": { 1278 | "prefix": "PlayerSpawnNPC", 1279 | "body": "PlayerSpawnNPC(${1:Player ply}, ${2:string npc_type}, ${3:string weapon})$0\r\n", 1280 | "description": "(Server) Method: SANDBOX:PlayerSpawnNPC\n\nCalled to ask if player allowed to spawn a particular NPC or not." 1281 | }, 1282 | "SANDBOX:PlayerSpawnObject": { 1283 | "prefix": "PlayerSpawnObject", 1284 | "body": "PlayerSpawnObject(${1:Player ply}, ${2:string model}, ${3:number skin})$0\r\n", 1285 | "description": "(Server) Method: SANDBOX:PlayerSpawnObject\n\nCalled to ask whether player is allowed to spawn any objects." 1286 | }, 1287 | "SANDBOX:PlayerSpawnProp": { 1288 | "prefix": "PlayerSpawnProp", 1289 | "body": "PlayerSpawnProp(${1:Player ply}, ${2:string model})$0\r\n", 1290 | "description": "(Server) Method: SANDBOX:PlayerSpawnProp\n\nCalled when a player attempts to spawn a prop from the Q menu." 1291 | }, 1292 | "SANDBOX:PlayerSpawnRagdoll": { 1293 | "prefix": "PlayerSpawnRagdoll", 1294 | "body": "PlayerSpawnRagdoll(${1:Player ply}, ${2:string model})$0\r\n", 1295 | "description": "(Server) Method: SANDBOX:PlayerSpawnRagdoll\n\nCalled when a player attempts to spawn a ragdoll from the Q menu." 1296 | }, 1297 | "SANDBOX:PlayerSpawnSENT": { 1298 | "prefix": "PlayerSpawnSENT", 1299 | "body": "PlayerSpawnSENT(${1:Player ply}, ${2:string class})$0\r\n", 1300 | "description": "(Server) Method: SANDBOX:PlayerSpawnSENT\n\nCalled when a player attempts to spawn an Entity from the Q menu." 1301 | }, 1302 | "SANDBOX:PlayerSpawnVehicle": { 1303 | "prefix": "PlayerSpawnVehicle", 1304 | "body": "PlayerSpawnVehicle(${1:Player ply}, ${2:string model}, ${3:string name}, ${4:table table})$0\r\n", 1305 | "description": "(Server) Method: SANDBOX:PlayerSpawnVehicle\n\nCalled to ask if player allowed to spawn a particular vehicle or not." 1306 | }, 1307 | "SANDBOX:PopulatePropMenu": { 1308 | "prefix": "PopulatePropMenu", 1309 | "body": "PopulatePropMenu()$0\r\n", 1310 | "description": "(Client) Method: SANDBOX:PopulatePropMenu\n\nThis hook makes the engine load the spawnlist text files." 1311 | }, 1312 | "SANDBOX:SpawnMenuEnabled": { 1313 | "prefix": "SpawnMenuEnabled", 1314 | "body": "SpawnMenuEnabled()$0\r\n", 1315 | "description": "(Client) Method: SANDBOX:SpawnMenuEnabled\n\nIf false is returned then the spawn menu is never created." 1316 | }, 1317 | "TOOL:Deploy": { 1318 | "prefix": "Deploy", 1319 | "body": "Deploy()$0\r\n", 1320 | "description": "(Shared) Method: TOOL:Deploy\n\nCalled when WEAPON.Deploy of the toolgun is called." 1321 | }, 1322 | "TOOL:DrawHUD": { 1323 | "prefix": "DrawHUD", 1324 | "body": "DrawHUD()$0\r\n", 1325 | "description": "(Client) Method: TOOL:DrawHUD\n\nCalled when WEAPON.DrawHUD of the toolgun is called, only when the user has this tool selected." 1326 | }, 1327 | "TOOL:DrawToolScreen": { 1328 | "prefix": "DrawToolScreen", 1329 | "body": "DrawToolScreen(${1:number width}, ${2:number height})$0\r\n", 1330 | "description": "(Client) Method: TOOL:DrawToolScreen\n\nCalled after the default tool screen has been drawn." 1331 | }, 1332 | "TOOL:FreezeMovement": { 1333 | "prefix": "FreezeMovement", 1334 | "body": "FreezeMovement()$0\r\n", 1335 | "description": "(Client) Method: TOOL:FreezeMovement\n\nCalled when WEAPON.Think of the toolgun is called, only when the user has this tool selected." 1336 | }, 1337 | "TOOL:": { 1338 | "prefix": "", 1339 | "body": "()$0\r\n", 1340 | "description": "(Shared) Method: TOOL:\n\nCalled when WEAPON.Holster of the toolgun is called, as well as when switching between different toolguns." 1341 | }, 1342 | "TOOL:LeftClick": { 1343 | "prefix": "LeftClick", 1344 | "body": "LeftClick(${1:table tr})$0\r\n", 1345 | "description": "(Shared) Method: TOOL:LeftClick\n\nCalled when the user left clicks with the tool" 1346 | }, 1347 | "TOOL:Reload": { 1348 | "prefix": "Reload", 1349 | "body": "Reload(${1:table tr})$0\r\n", 1350 | "description": "(Shared) Method: TOOL:Reload\n\nCalled when the user presses the reload key with the tool out." 1351 | }, 1352 | "TOOL:RightClick": { 1353 | "prefix": "RightClick", 1354 | "body": "RightClick(${1:table tr})$0\r\n", 1355 | "description": "(Shared) Method: TOOL:RightClick\n\nCalled when the user right clicks with the tool." 1356 | }, 1357 | "TOOL:Think": { 1358 | "prefix": "Think", 1359 | "body": "Think()$0\r\n", 1360 | "description": "(Shared) Method: TOOL:Think\n\nCalled when WEAPON.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." 1361 | }, 1362 | "SWEP:AcceptInput": { 1363 | "prefix": "AcceptInput", 1364 | "body": "AcceptInput(${1:string inputName}, ${2:Entity activator}, ${3:Entity called}, ${4:string data})$0\r\n", 1365 | "description": "(Server) Method: SWEP:AcceptInput\n\nCalled when another entity fires an event to this entity." 1366 | }, 1367 | "SWEP:AdjustMouseSensitivity": { 1368 | "prefix": "AdjustMouseSensitivity", 1369 | "body": "AdjustMouseSensitivity()$0\r\n", 1370 | "description": "(Client) Method: SWEP:AdjustMouseSensitivity\n\nAllows you to adjust the mouse sensitivity. This hook only works if you haven't overridden GM.AdjustMouseSensitivity." 1371 | }, 1372 | "SWEP:Ammo1": { 1373 | "prefix": "Ammo1", 1374 | "body": "Ammo1()$0\r\n", 1375 | "description": "(Shared) Method: SWEP:Ammo1\n\nReturns how much of primary ammo the player has." 1376 | }, 1377 | "SWEP:Ammo2": { 1378 | "prefix": "Ammo2", 1379 | "body": "Ammo2()$0\r\n", 1380 | "description": "(Shared) Method: SWEP:Ammo2\n\nReturns how much of secondary ammo the player has." 1381 | }, 1382 | "SWEP:": { 1383 | "prefix": "", 1384 | "body": "(${1:Player ply}, ${2:Vector pos}, ${3:Angle ang}, ${4:number fov})$0\r\n", 1385 | "description": "(Client) Method: SWEP:\n\nAllows you to adjust player view while this weapon in use." 1386 | }, 1387 | "SWEP:CalcViewModelView": { 1388 | "prefix": "CalcViewModelView", 1389 | "body": "CalcViewModelView(${1:Entity vm}, ${2:Vector oldPos}, ${3:Angle oldAng}, ${4:Vector pos}, ${5:Angle ang})$0\r\n", 1390 | "description": "(Client) Method: SWEP:CalcViewModelView\n\nAllows overriding the position and angle of the viewmodel. This hook only works if you haven't overridden GM.CalcViewModelView." 1391 | }, 1392 | "SWEP:CanPrimaryAttack": { 1393 | "prefix": "CanPrimaryAttack", 1394 | "body": "CanPrimaryAttack()$0\r\n", 1395 | "description": "(Shared) Method: SWEP:CanPrimaryAttack\n\nHelper function for checking for no ammo." 1396 | }, 1397 | "SWEP:CanSecondaryAttack": { 1398 | "prefix": "CanSecondaryAttack", 1399 | "body": "CanSecondaryAttack()$0\r\n", 1400 | "description": "(Shared) Method: SWEP:CanSecondaryAttack\n\nHelper function for checking for no ammo." 1401 | }, 1402 | "SWEP:CustomAmmoDisplay": { 1403 | "prefix": "CustomAmmoDisplay", 1404 | "body": "CustomAmmoDisplay()$0\r\n", 1405 | "description": "(Client) Method: SWEP:CustomAmmoDisplay\n\nAllows you to use any numbers you want for the ammo display on the HUD." 1406 | }, 1407 | "SWEP:DoDrawCrosshair": { 1408 | "prefix": "DoDrawCrosshair", 1409 | "body": "DoDrawCrosshair(${1:number x}, ${2:number y})$0\r\n", 1410 | "description": "(Client) Method: SWEP:DoDrawCrosshair\n\nCalled when the crosshair is about to get drawn, and allows you to override it." 1411 | }, 1412 | "SWEP:DoImpactEffect": { 1413 | "prefix": "DoImpactEffect", 1414 | "body": "DoImpactEffect(${1:table tr}, ${2:number damageType})$0\r\n", 1415 | "description": "(Shared) Method: SWEP:DoImpactEffect\n\nCalled so the weapon can override the impact effects it makes." 1416 | }, 1417 | "SWEP:DrawHUD": { 1418 | "prefix": "DrawHUD", 1419 | "body": "DrawHUD()$0\r\n", 1420 | "description": "(Client) Method: SWEP:DrawHUD\n\nThis hook allows you to draw on screen while this weapon is in use." 1421 | }, 1422 | "SWEP:DrawHUDBackground": { 1423 | "prefix": "DrawHUDBackground", 1424 | "body": "DrawHUDBackground()$0\r\n", 1425 | "description": "(Client) Method: SWEP:DrawHUDBackground\n\nThis hook allows you to draw on screen while this weapon is in use. This hook is called '''before''' WEAPON.DrawHUD and is equivalent of GM.HUDPaintBackground." 1426 | }, 1427 | "SWEP:DrawWeaponSelection": { 1428 | "prefix": "DrawWeaponSelection", 1429 | "body": "DrawWeaponSelection(${1:number x}, ${2:number y}, ${3:number width}, ${4:number height}, ${5:number alpha})$0\r\n", 1430 | "description": "(Client) Method: SWEP:DrawWeaponSelection\n\nThis hook draws the selection icon in the weapon selection menu." 1431 | }, 1432 | "SWEP:DrawWorldModel": { 1433 | "prefix": "DrawWorldModel", 1434 | "body": "DrawWorldModel()$0\r\n", 1435 | "description": "(Client) Method: SWEP:DrawWorldModel\n\nCalled when we are about to draw the world model." 1436 | }, 1437 | "SWEP:DrawWorldModelTranslucent": { 1438 | "prefix": "DrawWorldModelTranslucent", 1439 | "body": "DrawWorldModelTranslucent()$0\r\n", 1440 | "description": "(Client) Method: SWEP:DrawWorldModelTranslucent\n\nCalled when we are about to draw the translucent world model." 1441 | }, 1442 | "SWEP:Equip": { 1443 | "prefix": "Equip", 1444 | "body": "Equip(${1:Entity NewOwner})$0\r\n", 1445 | "description": "(Server) Method: SWEP:Equip\n\nCalled when a player or NPC has picked the weapon up." 1446 | }, 1447 | "SWEP:EquipAmmo": { 1448 | "prefix": "EquipAmmo", 1449 | "body": "EquipAmmo(${1:Player ply})$0\r\n", 1450 | "description": "(Server) Method: SWEP:EquipAmmo\n\nThe player has picked up the weapon and has taken the ammo from it." 1451 | }, 1452 | "SWEP:FreezeMovement": { 1453 | "prefix": "FreezeMovement", 1454 | "body": "FreezeMovement()$0\r\n", 1455 | "description": "(Client) Method: SWEP:FreezeMovement\n\nThis hook allows you to freeze players screen." 1456 | }, 1457 | "SWEP:GetCapabilities": { 1458 | "prefix": "GetCapabilities", 1459 | "body": "GetCapabilities()$0\r\n", 1460 | "description": "(Server) Method: SWEP:GetCapabilities\n\nThis hook is for NPCs, you return what they should try to do with it." 1461 | }, 1462 | "SWEP:GetTracerOrigin": { 1463 | "prefix": "GetTracerOrigin", 1464 | "body": "GetTracerOrigin()$0\r\n", 1465 | "description": "(Client) Method: SWEP:GetTracerOrigin\n\nAllows you to override where the tracer effect comes from. ( Visual bullets )" 1466 | }, 1467 | "SWEP:GetViewModelPosition": { 1468 | "prefix": "GetViewModelPosition", 1469 | "body": "GetViewModelPosition(${1:Vector pos}, ${2:Angle ang})$0\r\n", 1470 | "description": "(Client) Method: SWEP:GetViewModelPosition\n\nThis hook allows you to adjust view model position and angles." 1471 | }, 1472 | "SWEP:HUDShouldDraw": { 1473 | "prefix": "HUDShouldDraw", 1474 | "body": "HUDShouldDraw(${1:string element})$0\r\n", 1475 | "description": "(Client) Method: SWEP:HUDShouldDraw\n\nThis hook determines which parts of the HUD to draw." 1476 | }, 1477 | "SWEP:Initialize": { 1478 | "prefix": "Initialize", 1479 | "body": "Initialize()$0\r\n", 1480 | "description": "(Shared) Method: SWEP:Initialize\n\nCalled when the weapon entity is created." 1481 | }, 1482 | "SWEP:OnReloaded": { 1483 | "prefix": "OnReloaded", 1484 | "body": "OnReloaded()$0\r\n", 1485 | "description": "(Shared) Method: SWEP:OnReloaded\n\nCalled whenever the weapons Lua script is reloaded." 1486 | }, 1487 | "SWEP:OnRemove": { 1488 | "prefix": "OnRemove", 1489 | "body": "OnRemove()$0\r\n", 1490 | "description": "(Shared) Method: SWEP:OnRemove\n\nCalled when the swep is about to be removed." 1491 | }, 1492 | "SWEP:PreDrawViewModel": { 1493 | "prefix": "PreDrawViewModel", 1494 | "body": "PreDrawViewModel(${1:Entity vm}, ${2:Weapon weapon}, ${3:Player ply})$0\r\n", 1495 | "description": "(Client) Method: SWEP:PreDrawViewModel\n\nAllows you to modify viewmodel while the weapon in use before it is drawn. This hook only works if you haven't overridden GM.PreDrawViewModel." 1496 | }, 1497 | "SWEP:PrintWeaponInfo": { 1498 | "prefix": "PrintWeaponInfo", 1499 | "body": "PrintWeaponInfo(${1:number x}, ${2:number y}, ${3:number alpha})$0\r\n", 1500 | "description": "(Client) Method: SWEP:PrintWeaponInfo\n\nA convenience function that draws the weapon info box, used in WEAPON.DrawWeaponSelection." 1501 | }, 1502 | "SWEP:Reload": { 1503 | "prefix": "Reload", 1504 | "body": "Reload()$0\r\n", 1505 | "description": "(Shared) Method: SWEP:Reload\n\nCalled when the reload key ( reload ) is pressed." 1506 | }, 1507 | "SWEP:SecondaryAttack": { 1508 | "prefix": "SecondaryAttack", 1509 | "body": "SecondaryAttack()$0\r\n", 1510 | "description": "(Shared) Method: SWEP:SecondaryAttack\n\nCalled when secondary attack button ( attack2 ) is pressed." 1511 | }, 1512 | "SWEP:SetDeploySpeed": { 1513 | "prefix": "SetDeploySpeed", 1514 | "body": "SetDeploySpeed(${1:number speed})$0\r\n", 1515 | "description": "(Shared) Method: SWEP:SetDeploySpeed\n\nSets the weapon deploy speed. This value needs to match on client and server." 1516 | }, 1517 | "SWEP:SetupDataTables": { 1518 | "prefix": "SetupDataTables", 1519 | "body": "SetupDataTables()$0\r\n", 1520 | "description": "(Shared) Method: SWEP:SetupDataTables\n\nCalled when the SWEP should set up its [[Networking Entities. Data Tables]]." 1521 | }, 1522 | "SWEP:SetWeaponHoldType": { 1523 | "prefix": "SetWeaponHoldType", 1524 | "body": "SetWeaponHoldType(${1:string name})$0\r\n", 1525 | "description": "(Shared) Method: SWEP:SetWeaponHoldType\n\nSets the hold type of the weapon. This must be called on '''both''' the server and the client to work properly." 1526 | }, 1527 | "SWEP:ShootEffects": { 1528 | "prefix": "ShootEffects", 1529 | "body": "ShootEffects()$0\r\n", 1530 | "description": "(Shared) Method: SWEP:ShootEffects\n\nA convenience function to create shoot effects." 1531 | }, 1532 | "SWEP:ShouldDropOnDie": { 1533 | "prefix": "ShouldDropOnDie", 1534 | "body": "ShouldDropOnDie()$0\r\n", 1535 | "description": "(Server) Method: SWEP:ShouldDropOnDie\n\nShould this weapon be dropped when its owner dies?" 1536 | }, 1537 | "SWEP:TakePrimaryAmmo": { 1538 | "prefix": "TakePrimaryAmmo", 1539 | "body": "TakePrimaryAmmo(${1:number amount})$0\r\n", 1540 | "description": "(Shared) Method: SWEP:TakePrimaryAmmo\n\nA convenience function to remove primary ammo from clip." 1541 | }, 1542 | "SWEP:TakeSecondaryAmmo": { 1543 | "prefix": "TakeSecondaryAmmo", 1544 | "body": "TakeSecondaryAmmo(${1:number amount})$0\r\n", 1545 | "description": "(Shared) Method: SWEP:TakeSecondaryAmmo\n\nA convenience function to remove secondary ammo from clip." 1546 | }, 1547 | "SWEP:TranslateFOV": { 1548 | "prefix": "TranslateFOV", 1549 | "body": "TranslateFOV(${1:number fov})$0\r\n", 1550 | "description": "(Client) Method: SWEP:TranslateFOV\n\nAllows to change players Field Of View while player holds the weapon." 1551 | } 1552 | } -------------------------------------------------------------------------------- /snippets/keywords.json: -------------------------------------------------------------------------------- 1 | { 2 | "Keyword - then": { 3 | "prefix": "then", 4 | "body": [ 5 | "then", 6 | "\t$0", 7 | "end" 8 | ], 9 | "description": "(Keyword) then" 10 | }, 11 | "Keyword - do": { 12 | "prefix": "do", 13 | "body": [ 14 | "do", 15 | "\t$0", 16 | "end" 17 | ], 18 | "description": "(Keyword) do" 19 | }, 20 | 21 | "Keyword - for": { 22 | "prefix": "do", 23 | "body": "for $0", 24 | "description": "(Keyword) for" 25 | }, 26 | "Keyword - in": { 27 | "prefix": "in", 28 | "body": "in $0", 29 | "description": "(Keyword) in" 30 | }, 31 | 32 | "Keyword - goto": { 33 | "prefix": "goto", 34 | "body": "goto ${1:block}", 35 | "description": "(Keyword) goto" 36 | }, 37 | 38 | "Keyword - goto block": { 39 | "prefix": "::", 40 | "body": "::${1:block}::", 41 | "description": "(Keyword) goto block" 42 | }, 43 | 44 | "Keyword - if": { 45 | "prefix": "if", 46 | "body": [ 47 | "if (${1:condition}) then", 48 | "\t$0", 49 | "end" 50 | ], 51 | "description": "(Keyword) if" 52 | }, 53 | "Keyword - elseif": { 54 | "prefix": "elseif", 55 | "body": [ 56 | "elseif (${1:condition}) then", 57 | "\t$0", 58 | "end" 59 | ], 60 | "description": "(Keyword) elseif" 61 | }, 62 | "Keyword - else": { 63 | "prefix": "elseif", 64 | "body": [ 65 | "else", 66 | "\t$0", 67 | "end" 68 | ], 69 | "description": "(Keyword) else" 70 | }, 71 | "Keyword - while": { 72 | "prefix": "while", 73 | "body": [ 74 | "while (${1:condition}) do", 75 | "\t$0", 76 | "end" 77 | ], 78 | "description": "(Keyword) while" 79 | }, 80 | "Keyword - repeat": { 81 | "prefix": "repeat", 82 | "body": [ 83 | "repeat", 84 | "\t$0", 85 | "until (${1:condition})" 86 | ], 87 | "description": "(Keyword) repeat" 88 | }, 89 | 90 | "Keyword - continue": { 91 | "prefix": "continue", 92 | "body": "continue $0", 93 | "description": "(Keyword) continue" 94 | }, 95 | "Keyword - break": { 96 | "prefix": "break", 97 | "body": "break $0", 98 | "description": "(Keyword) break" 99 | }, 100 | "Keyword - return": { 101 | "prefix": "return", 102 | "body": "return $0", 103 | "description": "(Keyword) return" 104 | }, 105 | 106 | "Keyword - or": { 107 | "prefix": "or", 108 | "body": "or $0", 109 | "description": "(Keyword) or" 110 | }, 111 | "Keyword - and": { 112 | "prefix": "and", 113 | "body": "and $0", 114 | "description": "(Keyword) and" 115 | }, 116 | 117 | "Keyword - local": { 118 | "prefix": "local", 119 | "body": "local $0", 120 | "description": "(Keyword) local" 121 | }, 122 | "Keyword - function": { 123 | "prefix": "function", 124 | "body": [ 125 | "function ${1:foo}(${2:arguments})", 126 | "\t$0", 127 | "end" 128 | ], 129 | "description": "(Keyword) function" 130 | }, 131 | 132 | "Keyword - true": { 133 | "prefix": "true", 134 | "body": "true $0", 135 | "description": "(Keyword) true" 136 | }, 137 | "Keyword - false": { 138 | "prefix": "false", 139 | "body": "false $0", 140 | "description": "(Keyword) false" 141 | }, 142 | "Keyword - nil": { 143 | "prefix": "nil", 144 | "body": "nil $0", 145 | "description": "(Keyword) nil" 146 | }, 147 | 148 | "Keyword - NULL": { 149 | "prefix": "NULL", 150 | "body": "NULL $0", 151 | "description": "(Keyword) NULL" 152 | }, 153 | "Keyword - _G": { 154 | "prefix": "_G", 155 | "body": "_G $0", 156 | "description": "(Keyword) _G" 157 | }, 158 | "Keyword - _VERSION": { 159 | "prefix": "_VERSION", 160 | "body": "_VERSION $0", 161 | "description": "(Keyword) _VERSION" 162 | } 163 | } --------------------------------------------------------------------------------