Reorganized cvars.inc, organized all cvars into module groups (to be updated later), removed unused cvars, made classes and weapons core modules (event forwarding priority), updated spawn protect cvars, added cvars to disable weapons, restrict, and hitgroups
This commit is contained in:
1 parent
8ac1361a70
commit
41153af5f4
30 files changed
+533
-297
No files matched your search
+50
-8
@@ -37,7 +37,7 @@ CreateCommands()
|
||||
|
||||
public Action:Command_Infect(client, argc)
|
||||
{
|
||||
new bool:enabled = GetConVarBool(gCvars[CVAR_ENABLE]);
|
||||
new bool:enabled = GetConVarBool(g_hCvarsList[CVAR_ENABLE]);
|
||||
if (argc < 1 || !enabled)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
@@ -84,7 +84,7 @@ public Action:Command_Infect(client, argc)
|
||||
|
||||
public Action:Command_Respawn(client, argc)
|
||||
{
|
||||
new bool:enabled = GetConVarBool(gCvars[CVAR_ENABLE]);
|
||||
new bool:enabled = GetConVarBool(g_hCvarsList[CVAR_ENABLE]);
|
||||
if (argc < 1 || !enabled)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
@@ -136,17 +136,38 @@ public Action:Command_Respawn(client, argc)
|
||||
}
|
||||
|
||||
/**
|
||||
* Command callback for client command "zr_restrict"
|
||||
* Command callback (zr_restrict)
|
||||
* Restricts a weapon or group
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param argc Argument count.
|
||||
*/
|
||||
*/
|
||||
public Action:Command_Restrict(client, argc)
|
||||
{
|
||||
// Disabled.
|
||||
// If plugin is disabled then stop
|
||||
new bool:enabled = GetConVarBool(gCvars[CVAR_ENABLE]);
|
||||
/**new bool:enabled = GetConVarBool(g_hCvarsList[CVAR_ENABLE]);
|
||||
if (argc < 1 || !enabled)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
}*/
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
{
|
||||
// Tell client command is disabled.
|
||||
ZR_ReplyToCommand(client, "Feature is disabled");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If restrict module is disabled, then stop.
|
||||
new bool:restrict = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_RESTRICT]);
|
||||
if (!restrict)
|
||||
{
|
||||
// Tell client command is disabled.
|
||||
ZR_ReplyToCommand(client, "Feature is disabled");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// arg1 = weapon being restricted
|
||||
@@ -165,17 +186,38 @@ public Action:Command_Restrict(client, argc)
|
||||
}
|
||||
|
||||
/**
|
||||
* Command callback for client command "zr_unrestrict"
|
||||
* Command callback (zr_unrestrict)
|
||||
* Unrestricts a weapon or group
|
||||
*
|
||||
* @param client The client index.
|
||||
* @param argc Argument count.
|
||||
*/
|
||||
*/
|
||||
public Action:Command_Unrestrict(client, argc)
|
||||
{
|
||||
// Disabled.
|
||||
// If plugin is disabled then stop
|
||||
new bool:enabled = GetConVarBool(gCvars[CVAR_ENABLE]);
|
||||
/**new bool:enabled = GetConVarBool(g_hCvarsList[CVAR_ENABLE]);
|
||||
if (argc < 1 || !enabled)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
}*/
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
{
|
||||
// Tell client command is disabled.
|
||||
ZR_ReplyToCommand(client, "Feature is disabled");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If restrict module is disabled, then stop.
|
||||
new bool:restrict = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_RESTRICT]);
|
||||
if (!restrict)
|
||||
{
|
||||
// Tell client command is disabled.
|
||||
ZR_ReplyToCommand(client, "Feature is disabled");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// arg1 = weapon being restricted
|
||||
|
||||
Reference in new issue
Block a user