Fixed humans winning on round end when no humans present, removed classes file cvar and made it use the config module, replaced SetFailState with LogMessageFormatted with fail flag, made the base config manipulator function.
This commit is contained in:
1 parent
8da309e4f4
commit
0404230fc8
10 files changed
+378
-74
No files matched your search
@@ -413,7 +413,7 @@ WeaponsMenuMarket(client)
|
||||
decl String:togglebuyzone[64];
|
||||
|
||||
decl String:curSetting[8];
|
||||
ZRBoolToConfigSetting(GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]), curSetting, sizeof(curSetting));
|
||||
ConfigBoolToSetting(GetConVarBool(g_hCvarsList[CVAR_WEAPONS_ZMARKET_BUYZONE]), curSetting, sizeof(curSetting));
|
||||
|
||||
Format(togglebuyzone, sizeof(togglebuyzone), "%t", "Weapons menu market toggle buyzone", curSetting);
|
||||
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
new Handle:gRestrictedWeapons = INVALID_HANDLE;
|
||||
|
||||
/**
|
||||
* Array to store keyvalue data.
|
||||
* Keyvalue handle to store weapon groups data.
|
||||
*
|
||||
* @redir config.inc
|
||||
*/
|
||||
new Handle:kvWeaponGroups = INVALID_HANDLE;
|
||||
|
||||
/**
|
||||
* Array that stores the "HookID" to be later unhooked on player disconnect.
|
||||
@@ -125,7 +126,7 @@ RestrictDefaultRestrictions()
|
||||
decl String:restrict[8];
|
||||
KvGetString(kvWeapons, "restrict", restrict, sizeof(restrict), "no");
|
||||
|
||||
if (ZRConfigSettingToBool(restrict))
|
||||
if (ConfigSettingToBool(restrict))
|
||||
{
|
||||
new WpnRestrictQuery:output = RestrictRestrict(weapon, display);
|
||||
RestrictPrintRestrictOutput(0, output, display, true);
|
||||
|
||||
+11
-10
@@ -27,18 +27,19 @@
|
||||
*/
|
||||
enum WeaponsType
|
||||
{
|
||||
Type_Invalid = -1,
|
||||
Type_Primary = 0,
|
||||
Type_Secondary = 1,
|
||||
Type_Melee = 2,
|
||||
Type_Projectile = 3,
|
||||
Type_Explosive = 4,
|
||||
Type_Invalid = -1, /** Invalid weapon (slot). */
|
||||
Type_Primary = 0, /** Primary weapon slot. */
|
||||
Type_Secondary = 1, /** Secondary weapon slot. */
|
||||
Type_Melee = 2, /** Melee (knife) weapon slot. */
|
||||
Type_Projectile = 3, /** Projectile (grenades, flashbangs, etc) weapon slot. */
|
||||
Type_Explosive = 4, /** Explosive (c4) weapon slot. */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Array to store keyvalue data.
|
||||
* Keyvalue handle to store weapon data.
|
||||
*
|
||||
* @redir config.inc
|
||||
*/
|
||||
new Handle:kvWeapons = INVALID_HANDLE;
|
||||
|
||||
#include "zr/weapons/restrict"
|
||||
#include "zr/weapons/markethandler"
|
||||
@@ -263,7 +264,7 @@ bool:WeaponsIsWeaponMenu(const String:weapon[])
|
||||
KvGetString(kvWeapons, "menu", menu, sizeof(menu), "yes");
|
||||
|
||||
// Return weapon's setting.
|
||||
return ZRConfigSettingToBool(menu);
|
||||
return ConfigSettingToBool(menu);
|
||||
}
|
||||
} while (KvGotoNextKey(kvWeapons));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user