Add includes

This commit is contained in:
Jackzie 2024-01-05 19:47:44 -06:00
parent 015aa8081d
commit 206cebac14
2 changed files with 25 additions and 0 deletions

View file

@ -329,6 +329,25 @@ stock int GetPrimaryAmmo(int client) {
else
return -1;
}
stock int GetSecondaryAmmo(int client, int weapon) {
int activeWpn = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
if(activeWpn == weapon) {
int offset = GetEntProp(weapon, Prop_Data, "m_iPrimaryAmmoType");
return GetEntProp(client, Prop_Send, "m_iAmmo", _, offset);
} else {
return GetEntProp(activeWpn, Prop_Send, "m_iExtraPrimaryAmmo");
}
}
stock void SetSecondaryAmmo(int client, int weapon, int ammo) {
int activeWpn = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
if(activeWpn == weapon) {
int offset = GetEntProp(weapon, Prop_Data, "m_iPrimaryAmmoType");
SetEntProp(client, Prop_Send, "m_iAmmo", ammo, _, offset);
} else {
SetEntProp(activeWpn, Prop_Send, "m_iExtraPrimaryAmmo", ammo);
}
}
stock void CheatCommand(int client, const char[] command, const char[] argument1, const char[] argument2) {
int userFlags = GetUserFlagBits(client);
SetUserFlagBits(client, ADMFLAG_ROOT);

View file

@ -0,0 +1,6 @@
enum ReserveMode {
Reserve_None = 0,
Reserve_Watch,
Reserve_AdminOnly,
Reserve_Private
}