Weapons module completed, added logging, thorough validations, and finished default configs.

This commit is contained in:
Greyscale
2009-04-14 04:58:05 +02:00
parent 44b0e776f2
commit 9031facaec
8 changed files with 177 additions and 111 deletions

View File

@ -135,6 +135,7 @@ public Action:Command_Respawn(client, argc)
}
/**
* Command callback for client command "zr_restrict"
* @param client The client index.
* @param argc Argument count.
*/
@ -159,24 +160,14 @@ public Action:Command_Restrict(client, argc)
new WpnRestrictQuery:output = RestrictRestrict(arg1, display);
RestrictPrintRestrictOutput(client, output, display, true);
if (LogFlagCheck(LOG_GAME_EVENTS, LOG_MODULE_COMMANDS))
{
decl String:client_name[64];
if (client > 0)
{
GetClientName(client, client_name, sizeof(client_name));
}
else
{
client_name = "Console\0";
}
ZR_LogMessageFormatted(client, "admin commands", "weapon restict", "\"%s\" restricted weapon (group): \"%s\".", true, client_name, arg1);
}
return Plugin_Handled;
}
/**
* Command callback for client command "zr_unrestrict"
* @param client The client index.
* @param argc Argument count.
*/
public Action:Command_Unrestrict(client, argc)
{
// If plugin is disabled then stop
@ -198,21 +189,6 @@ public Action:Command_Unrestrict(client, argc)
new WpnRestrictQuery:output = RestrictUnrestrict(arg1, display);
RestrictPrintUnrestrictOutput(client, output, display, true);
if (LogFlagCheck(LOG_GAME_EVENTS, LOG_MODULE_COMMANDS))
{
decl String:client_name[64];
if (client > 0)
{
GetClientName(client, client_name, sizeof(client_name));
}
else
{
client_name = "Console\0";
}
ZR_LogMessageFormatted(client, "admin commands", "weapon restict", "\"%s\" unrestricted weapon (group): \"%s\".", true, client_name, arg1);
}
return Plugin_Handled;
}