Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fedox-die-ente/helix-snippets
Helix Snippets is a Visual Studio code extension that provides snippets for the Garry's Mod gamemode 'Helix'.
https://github.com/fedox-die-ente/helix-snippets
garrysmod gmod snippets ts typescript vsc vsc-extension
Last synced: 17 days ago
JSON representation
Helix Snippets is a Visual Studio code extension that provides snippets for the Garry's Mod gamemode 'Helix'.
- Host: GitHub
- URL: https://github.com/fedox-die-ente/helix-snippets
- Owner: Fedox-die-Ente
- License: mit
- Created: 2024-01-12T15:01:14.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-05-21T15:45:48.000Z (8 months ago)
- Last Synced: 2024-11-06T07:09:08.080Z (2 months ago)
- Topics: garrysmod, gmod, snippets, ts, typescript, vsc, vsc-extension
- Language: TypeScript
- Homepage:
- Size: 1.87 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Helix Snippets Extension
## Overview
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.
## Features
- **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.## Usage
1. Install the [Helix Snippets extension](https://marketplace.visualstudio.com/items?itemName=Fedox.helix-snippets) from the Visual Studio Code Marketplace.
2. Open a Lua file.
3. Type the snippet prefix and press `Tab` to insert the snippet.## Contributors
1. Fedox - Founder
2. Winkarst - Made a huge load of contributions## Snippet Examples
### helix.plugin
```lua
local PLUGIN = PLUGINPLUGIN.name = "NAME"
PLUGIN.description = "DESCRIPTION"
PLUGIN.author = "AUTHOR"
PLUGIN.schema = "SCHEMA"
```### helix.class
```lua
CLASS.name = "NAME"
CLASS.faction = FACTION_NAME
CLASS.isDefault = truefunction CLASS:CanSwitchTo(client)
endif (SERVER) then
function CLASS:OnLeave(client)
endfunction CLASS:OnSet(client)
endfunction CLASS:OnSpawn(client)
end
endCLASS_NAME = CLASS.index
```### helix.faction
```lua
FACTION.name = "NAME"
FACTION.description = "DESCRIPTION"
FACTION.color = Color(255, 255, 255, 255)
FACTION.isDefault = true
FACTION.models = {
"MODEL",
}function FACTION:GetDefaultName(client)
endif (SERVER) then
function FACTION:OnCharacterCreated(client, character)
endfunction FACTION:OnSpawn(client)
endfunction FACTION:OnTransferred(character)
end
endFACTION_NAME = FACTION.index
```### helix.item
```lua
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
endfunction ITEM:GetDescription()
return self.description
end
```### helix.item.outfit
```lua
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"
```### helix.item.pacoutfit
```lua
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.outfitCategory = "CATEGORY"
ITEM.pacData = {}
```### helix.item.bag
```lua
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.invWidth = 1
ITEM.invHeight = 1
```### helix.item.ammo
```lua
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.ammo = "AMMO"
ITEM.ammoAmount = 1
```### helix.item.weapon
```lua
ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.class = "WEAPONCLASS"
ITEM.weaponCategory = "CATEGORY"
```