Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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'.

Awesome Lists containing this project

README

        

Helix Snippets Extension


Helix Snippets Logo

## 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 = PLUGIN

PLUGIN.name = "NAME"
PLUGIN.description = "DESCRIPTION"
PLUGIN.author = "AUTHOR"
PLUGIN.schema = "SCHEMA"
```

### helix.class

```lua
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
```

### 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)
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
```

### 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
end

function 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"
```