PivityGmodStore

Creating a new booster upgrade

The first thing you do is navigate to addons/ch_boost_upgrades/lua/ch_boost_system/shared/boosts

In here you create a new lua file and paste the following inside:

CH_BoostUpgrades.AddBoost( {
Name = "Name of boost",
Identifier = "arrestbonus",
Description = "With this booster package ....",
Image = Material( "materials/craphead_scripts/ch_boost_upgrades/boosts/cocaine.png", "noclamp smooth" ),
Enabled = true,
Cooldown = 60,
Duration = 120,
Price = 1250,
CustomCheck = function( ply )
return true
end,
CustomCheckFailMessage = "",
Activated = function()
-- add your code here when boost is activated
end,
Expired = function()
-- add code here for when boost expires
end,
} )

The first three lines define name, description and the image shown in-game in the menu. Change it to your liking.

Cooldown, duration and price is set on line 7, 8 and 9.

If you want to do a custom check for donators, ranks, level or whatever then you should read this article.

Now the Activated and Expired fields are your custom code. It does require Lua knowledge to be able to create something here, but only your imagination can stop you. You can input ANYTHING.

If you want zombies to spawn on the map, then you can use ents.Create and spawn them whereever you like, or you can view the default boosts to get inspiration on how to work with hooks.

The Expired field is then used to "clean up" whatever you did in the Activated field.

If you have a suggestions for a general boost that can suit more servers, then you are very welcome to open a support ticket.

Can't find what you're looking for?

Contact support