Skip to content

Commit

Permalink
Add commands to ban OP4 ammo
Browse files Browse the repository at this point in the history
  • Loading branch information
ry13y04 committed Oct 8, 2024
1 parent 23a3b0a commit 0923159
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions binary/dlls/aggamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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,
};


Expand Down
6 changes: 6 additions & 0 deletions binary/dlls/agglobal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions binary/dlls/agglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0923159

Please sign in to comment.