Skip to content

Winkarst-cpu/helix-snippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

local PLUGIN = PLUGIN

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

helix.class

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

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

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

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

ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.outfitCategory = "CATEGORY"
ITEM.pacData = {}

helix.item.bag

ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.invWidth = 1
ITEM.invHeight = 1

helix.item.ammo

ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.ammo = "AMMO"
ITEM.ammoAmount = 1

helix.item.weapon

ITEM.name = "NAME"
ITEM.description = "DESCRIPTION"
ITEM.model = "MODEL"
ITEM.width = 1
ITEM.height = 1
ITEM.class = "WEAPONCLASS"
ITEM.weaponCategory = "CATEGORY"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%