Added ragdoll module that removes ragdolls normally or with effects.
*Added log entries, fixed typo. *Fixed some errors caused by disabling the weapons module. *Replaced strcmp with StrEqual
This commit is contained in:
@ -530,6 +530,20 @@ public ZRTools_Action:RestrictCanUse(client, weapon)
|
||||
return ZRTools_Continue;
|
||||
}
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
{
|
||||
return ZRTools_Continue;
|
||||
}
|
||||
|
||||
// If restrict module is disabled, then stop.
|
||||
new bool:restrict = GetConVarBool(g_hCvarsList[CVAR_WEAPONS_RESTRICT]);
|
||||
if (!restrict)
|
||||
{
|
||||
return ZRTools_Continue;
|
||||
}
|
||||
|
||||
// If the weapon is restricted, then prevent pickup.
|
||||
new index = WeaponsNameToIndex(weaponname);
|
||||
|
||||
@ -572,13 +586,6 @@ public ZRTools_Action:RestrictCanUse(client, weapon)
|
||||
*/
|
||||
public Action:RestrictCommand(client, argc)
|
||||
{
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command restrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
@ -597,6 +604,13 @@ public Action:RestrictCommand(client, argc)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command restrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
decl String:target[WEAPONS_MAX_LENGTH];
|
||||
|
||||
new args = GetCmdArgs();
|
||||
@ -626,13 +640,6 @@ public Action:RestrictCommand(client, argc)
|
||||
*/
|
||||
public Action:UnrestrictCommand(client, argc)
|
||||
{
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command unrestrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If weapons module is disabled, then stop.
|
||||
new bool:weapons = GetConVarBool(g_hCvarsList[CVAR_WEAPONS]);
|
||||
if (!weapons)
|
||||
@ -651,6 +658,13 @@ public Action:UnrestrictCommand(client, argc)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// If not enough arguments given, then stop.
|
||||
if (argc < 1)
|
||||
{
|
||||
TranslationReplyToCommand(client, "Weapons command unrestrict syntax");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
// arg1 = weapon being restricted
|
||||
decl String:target[WEAPONS_MAX_LENGTH];
|
||||
|
||||
|
Reference in New Issue
Block a user