From 0923159d726462d0b246d7464a399c4137599840 Mon Sep 17 00:00:00 2001 From: ry13y04 <75205875+ry13y04@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:59:36 +0100 Subject: [PATCH] Add commands to ban OP4 ammo --- binary/dlls/aggamerules.cpp | 9 +++++++++ binary/dlls/agglobal.cpp | 6 ++++++ binary/dlls/agglobal.h | 3 +++ 3 files changed, 18 insertions(+) diff --git a/binary/dlls/aggamerules.cpp b/binary/dlls/aggamerules.cpp index 41e52496..c8490961 100644 --- a/binary/dlls/aggamerules.cpp +++ b/binary/dlls/aggamerules.cpp @@ -364,6 +364,12 @@ void AgGameRules::PlayerSpawn(CBasePlayer* pPlayer) pPlayer->GiveAmmo(BOLT_MAX_CARRY, "bolts", BOLT_MAX_CARRY); if (1 > ag_ban_rpg.value) pPlayer->GiveAmmo(ROCKET_MAX_CARRY, "rockets", ROCKET_MAX_CARRY); + if (1 > ag_ban_ammo556.value) + pPlayer->GiveAmmo(M249_MAX_CARRY, "556", M249_MAX_CARRY); + if (1 > ag_ban_ammo762.value) + pPlayer->GiveAmmo(EAGLE_MAX_CLIP, "762", EAGLE_MAX_CLIP); + if (1 > ag_ban_ammoSpore.value) + pPlayer->GiveAmmo(SPORELAUNCHER_MAX_CARRY, "spores", SPORELAUNCHER_MAX_CARRY); } else { @@ -812,6 +818,9 @@ FILE_GLOBAL BANWEAPON s_Bans[] = "ammo_357",&ag_ban_357ammo, "item_battery",&ag_ban_armour, "item_healthkit",&ag_ban_health, + "ammo_556",&ag_ban_ammo556, + "ammo_762",&ag_ban_ammo762, + "ammo_spore",&ag_ban_ammoSpore, }; diff --git a/binary/dlls/agglobal.cpp b/binary/dlls/agglobal.cpp index 60804800..30c60bd2 100644 --- a/binary/dlls/agglobal.cpp +++ b/binary/dlls/agglobal.cpp @@ -111,6 +111,9 @@ DLL_GLOBAL cvar_t ag_ban_uranium = { "sv_aura_ban_uranium","0" }; DLL_GLOBAL cvar_t ag_ban_bolts = { "sv_aura_ban_bolts","0" }; DLL_GLOBAL cvar_t ag_ban_rockets = { "sv_aura_ban_rockets","0" }; DLL_GLOBAL cvar_t ag_ban_357ammo = { "sv_aura_ban_357ammo","0" }; +DLL_GLOBAL cvar_t ag_ban_ammo556 = { "sv_aura_ban_ammo_556","0" }; +DLL_GLOBAL cvar_t ag_ban_ammo762 = { "sv_aura_ban_ammo_762","0" }; +DLL_GLOBAL cvar_t ag_ban_ammoSpore = { "sv_aura_ban_ammo_spore","0" }; DLL_GLOBAL cvar_t ag_ban_armour = { "sv_aura_ban_armour","0" }; DLL_GLOBAL cvar_t ag_ban_health = { "sv_aura_ban_health","0" }; @@ -329,6 +332,9 @@ void AgInitGame() CVAR_REGISTER(&ag_ban_bolts); CVAR_REGISTER(&ag_ban_rockets); CVAR_REGISTER(&ag_ban_357ammo); + CVAR_REGISTER(&ag_ban_ammo556); + CVAR_REGISTER(&ag_ban_ammo762); + CVAR_REGISTER(&ag_ban_ammoSpore); CVAR_REGISTER(&ag_ban_armour); CVAR_REGISTER(&ag_ban_health); diff --git a/binary/dlls/agglobal.h b/binary/dlls/agglobal.h index 5c22d60d..18a0ffbf 100644 --- a/binary/dlls/agglobal.h +++ b/binary/dlls/agglobal.h @@ -83,6 +83,9 @@ extern cvar_t ag_ban_uranium; extern cvar_t ag_ban_bolts; extern cvar_t ag_ban_rockets; extern cvar_t ag_ban_357ammo; +extern cvar_t ag_ban_ammo556; +extern cvar_t ag_ban_ammo762; +extern cvar_t ag_ban_ammoSpore; extern cvar_t ag_ban_armour; extern cvar_t ag_ban_health;