mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-05 20:33:20 +00:00
Add includes
This commit is contained in:
parent
015aa8081d
commit
206cebac14
2 changed files with 25 additions and 0 deletions
|
@ -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);
|
||||
|
|
6
scripting/include/l4d2_perms.inc
Normal file
6
scripting/include/l4d2_perms.inc
Normal file
|
@ -0,0 +1,6 @@
|
|||
enum ReserveMode {
|
||||
Reserve_None = 0,
|
||||
Reserve_Watch,
|
||||
Reserve_AdminOnly,
|
||||
Reserve_Private
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue