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:
Greyscale
2009-05-01 07:09:18 +02:00
parent 8da309e4f4
commit 0404230fc8
10 changed files with 378 additions and 74 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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));
}