Hooked autobuy/rebuy, added fog to visual effects, create effect functions in visualeffects.inc, fixed ambience, hooked mp_restartgame, mother count is rounded to nearest instead of ceiling, recoded cvars.inc and added logging, recoded event.inc, killed respawn timers on round end.

This commit is contained in:
Greyscale
2009-04-27 04:00:38 +02:00
parent 65411df2c0
commit abd38ee033
14 changed files with 738 additions and 301 deletions

View File

@ -42,7 +42,9 @@ RestrictInit()
gRestrictedWeapons = CreateArray(32, 0);
// Hook buy command.
RegConsoleCmd("buy", RestrictBuyHook);
RegConsoleCmd("buy", RestrictBuyCommand);
RegConsoleCmd("autobuy", RestrictBuyCommand);
RegConsoleCmd("rebuy", RestrictBuyCommand);
}
/**
@ -136,7 +138,7 @@ RestrictDefaultRestrictions()
*/
RestrictValidateWeaponGroups()
{
// If log flag check fails, don't log.
// If log flag check fails, then don't log.
if (!LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_WEAPONS))
{
return;
@ -215,17 +217,18 @@ RestrictOnClientDisconnect(client)
* @param client The client index.
* @param argc Argument count.
*/
public Action:RestrictBuyHook(client, argc)
public Action:RestrictBuyCommand(client, argc)
{
// If plugin is disabled then stop.
new bool:enabled = GetConVarBool(g_hCvarsList[CVAR_ENABLE]);
/*new bool:enabled = GetConVarBool(g_hCvarsList[CVAR_ENABLE]);
if (!enabled)
{
// Allow command.
return Plugin_Continue;
}
}*/
// Disabled
// If player is a zombie then block command.
// If player is a zombie, then block command.
if (InfectIsClientInfected(client))
{
ZR_PrintToChat(client, "Zombie cant use weapon");

View File

@ -108,7 +108,7 @@ WeaponsLoad()
*/
WeaponsValidateConfig()
{
// If log flag check fails, don't log.
// If log flag check fails, then don't log.
if (!LogCheckFlag(LOG_CORE_EVENTS, LOG_MODULE_WEAPONS))
{
return;