The Helix Snippets extension provides a set of code snippets for the Helix Garry's Mod gamemode. Easily insert common code patterns and improve your development efficiency with this Visual Studio Code extension.
- Snippet Library: A collection of useful snippets for Helix development.
- Easy Insertion: Quickly insert code snippets with just a few keystrokes.
- Visual Studio Code Integration: Seamlessly integrates with Visual Studio Code for a smooth coding experience.
- Install the Helix Snippets extension from the Visual Studio Code Marketplace.
- Open a Lua file.
- Type the snippet prefix and press
Tab
to insert the snippet.
- Fedox - Founder
- Winkarst - Made a huge load of contributions
local PLUGIN = PLUGIN
PLUGIN.name = "NAME"
PLUGIN.description = "DESCRIPTION"
PLUGIN.author = "AUTHOR"
PLUGIN.schema = "SCHEMA"
CLASS.name = "NAME"
CLASS.faction = FACTION_NAME
CLASS.isDefault = true
function CLASS:CanSwitchTo(client)
end
if (SERVER) then
function CLASS:OnLeave(client)
end
function CLASS:OnSet(client)
end
function CLASS:OnSpawn(client)
end
end
CLASS_NAME = CLASS.index
FACTION.name = "NAME"
FACTION.description = "DESCRIPTION"
FACTION.color = Color(255, 255, 255, 255)
FACTION.isDefault = true
FACTION.models = {
"MODEL",
}
function FACTION:GetDefaultName(client)
end
if (SERVER) then
function FACTION:OnCharacterCreated(client, character)
end
function FACTION:OnSpawn(client)
end
function FACTION:OnTransferred(character)
end
end
FACTION_NAME = FACTION.index
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.price = 1
ITEM.category = "CategoryName"
ITEM.noBusiness = false
ITEM.factions = {"faction1", "faction2"}
ITEM.classes = {"class1", "class2"}
ITEM.flag = "flags"
ITEM.iconCam = {pos = Vector(0, 0, 0), ang = Angle(0, 0, 0), fov = 70}
ITEM.functions.Option = {
name = "OptionName",
OnClick = function(item)
-- OnClick functionality here
end,
OnRun = function(item)
-- OnRun functionality here
return false
end,
OnCanRun = function(item)
-- OnCanRun checks here
end,
}
function ITEM:GetName()
return self.name
end
function ITEM:GetDescription()
return self.description
end
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.outfitCategory = "CATEGORY"
ITEM.newSkin = 1
ITEM.bodyGroups = {
["BODYGROUPNAME"] = 1,
}
ITEM.replacements = "MODEL"
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.outfitCategory = "CATEGORY"
ITEM.pacData = {}
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.invWidth = 1
ITEM.invHeight = 1
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.ammo = "AMMO"
ITEM.ammoAmount = 1
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.class = "WEAPONCLASS"
ITEM.weaponCategory = "CATEGORY"