Page 1 of 1

[CS:GO] Grenade Pack 2

Posted: Thu Jan 23, 2020 11:24 am
by Andreeas
DESCRIPTION:
Give players the ability to hold more than 3 nades. By default, CS:GO limits players to 1 of each type, with a max 3 total nades. This plugin allows you to define how many of each type you want players to be able to carry.

- Ability to set a hard number of total grenades a player can carry, regardless of type.
- Ability to set a hard number of total "types" of grenades a player can carry. Example, you allow up to 4 HE, 3 Flash-bang, 2 Decoy, 3 Smoke, and 2 Molotov/Incendiary however you set total types to 3... that means players can only carry up to the max of 3 types (whatever types they choose, but max 3 types).

This plugin is VIP equipped:
VIP players can hold more of each type of nade than regular players can, if you set it up that way in the config file. If a player has the admin flag RESERVATION "a" they will be marked as VIP for this plugin.

*** You can override the flag needed for VIP by utilizing admin_overrides.cfg and assigning whatever flag you want to "gp2_csgo_vip"

As of 0.0.1.6 I've added a debug feature for this plugin, see CVar list for options.

Cvars:

Code: Select all

"sm_gp2_csgo_advertise" = "0" min. 0.000000 max. 1.000000
 - Advertise when nade limits change?

"sm_gp2_csgo_announce" = "5" min. 0.000000 max. 30.000000
 - Every X rounds the player is reminded of the plugin ['0' = Disable]

"sm_gp2_csgo_decoy" = "1" min. 0.000000 max. 100.000000
 - Maximum number of Decoy Grenades regular players are allowed to carry.

"sm_gp2_csgo_decoy_vip" = "2" min. 0.000000 max. 100.000000
 - Maximum number of Decoy Grenades VIP players are allowed to carry.

"sm_gp2_csgo_enabled" = "1" min. 0.000000 max. 1.000000
 - Enable or disable the plugin ['0' = Disable]

"sm_gp2_csgo_enforce" = "0" min. 0.000000 max. 1.000000
 - Enforce the limit so that players can't buy their max, use some, then buy more (they can still pick up more if they aren't carrying their max).

"sm_gp2_csgo_flashbang" = "2" min. 0.000000 max. 100.000000
 - Maximum number of Flashbang's regular players are allowed to carry.

"sm_gp2_csgo_flashbang_vip" = "4" min. 0.000000 max. 100.000000
 - Maximum number of Flashbang's VIP players are allowed to carry.

"sm_gp2_csgo_hegrenade" = "1" min. 0.000000 max. 100.000000
 - Maximum number of HE Grenades regular players are allowed to carry.

"sm_gp2_csgo_hegrenade_vip" = "3" min. 0.000000 max. 100.000000
 - Maximum number of HE Grenades VIP players are allowed to carry.

"sm_gp2_csgo_incgrenade" = "1" min. 0.000000 max. 100.000000
 - Maximum number of Incendery/Molotov regular players are allowed to carry.

"sm_gp2_csgo_incgrenade_vip" = "2" min. 0.000000 max. 100.000000
 - Maximum number of Incendery/Molotov VIP players are allowed to carry.

"sm_gp2_csgo_restrict" = "3" ( def. "0" ) min. 0.000000 max. 7.000000
 - Maximum number of different types of nades regular players are allowed to carry.

"sm_gp2_csgo_restrict_vip" = "4" ( def. "0" ) min. 0.000000 max. 7.000000
 - Maximum number of different types of nades VIP players are allowed to carry.

"sm_gp2_csgo_restricttype" = "1" ( def. "0" ) min. 0.000000 max. 1.000000
 - Use the nade type restriction settings?

"sm_gp2_csgo_smokegrenade" = "1" min. 0.000000 max. 100.000000
 - Maximum number of Smoke Grenades regular players are allowed to carry.

"sm_gp2_csgo_smokegrenade_vip" = "2" min. 0.000000 max. 100.000000
 - Maximum number of Smoke Grenades VIP players are allowed to carry.

"sm_gp2_csgo_total" = "3" ( def. "0" ) min. 0.000000 max. 99.000000
 - Maximum number of nades, regardless of type, regular players are allowed to carry.

"sm_gp2_csgo_total_vip" = "5" ( def. "0" ) min. 0.000000 max. 99.000000
 - Maximum number of nades, regardless of type, VIP players are allowed to carry.

"sm_gp2_csgo_totalnades" = "0" min. 0.000000 max. 1.000000
 - Use the total nades settings?

"sm_gp2_csgo_update" = "0" min. 0.000000 max. 1.000000
 - Use Updater plugin to auto-update GrenadePack2 when updates are available?

sm_gp2_csgo_debug = "0" min. 0.000000 max 1.000000
 - Set the debug mode, add up the values to determine what you want.
0 = No Debug
1 = Log Debug information
2 = Debug in-game msgs

"sm_gp2_csgo_version" = "0.0.1.3" notify singleplayer replicated ss_added
 - The version of 'Grenade Pack 2 for CS:GO'

"sm_gp2_csgo_version_build" = "1.5.0-dev+3756" ss_added
 - The version of SourceMod that 'Grenade Pack 2 for CS:GO' was compiled with.

Changelog:

Code: Select all

0.0.1.6
* Fixed bug when players spawn with nades and using Total Nades option, they are allowed to buy beyond the max allowed.
 - Reported by parthi (https://forums.alliedmods.net/showpost.php?p=2277978&postcount=47)

0.0.1.5
* Adjusted grenade offsets
* Fixed bug in CS_OnBuyCommand when using Total Nades option

0.0.1.4
* Adjusted grenade offsets for 08/15/13 CS:GO update

0.0.1.3
+ Added ability to define a hard set limit for nades players can have, regardless of type
+ Added ability to define a hard set limit for types of nades a player can have

0.0.1.2
* 01/23/13 CS:GO Update Fix

0.0.1.1
Cleaned up code a little

0.0.1.0
Initial Release
REQUIREMENTS:
Sourcemod 1.5.0-dev+3756 or better
SDKHooks - Version 2.2 (or better) for CS:GO

Optional:

Updater (if you want automatic updates)

Credits:
SourceMod Team
Greyscale - for original Grenade Pack idea for CS:S

KNOWN ISSUES:

None that I found, report them as you see them.

To Do List:
+ Add option where you can define a hard set limit of nades, like 4 - players (or ViPs) can have any combination of nades, limit 4 to carry. Two CVars for this, one for regulars and another for ViPs.

INSTALLATION:

Code: Select all

Copy the .smx to your sourcemod/plugins folder and the phrases.txt to your sourcemod/translation folder. When you run the plugin for the first time, it will auto generate a configuration file in your cfg/sourcemod folder named "plugin.GrenadePack2_csgo.cfg" - edit that to your liking then reload the plugin (or better, change the map).
The online compiler won't work, you have to download the .SMX file. This is due to custom include files (see .sp for what those are).

grenadepack2_csgo.phrases.txt
Get Plugin or Get Source
GrenadePack2_csgo.smx