Logging changes to various base plugins.
This commit is contained in:
parent
19019d3a4b
commit
7cd130904b
@ -10,7 +10,7 @@
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
@ -45,7 +45,7 @@ void DisplayGagTypesMenu(int client)
|
||||
{
|
||||
Menu menu = new Menu(MenuHandler_GagTypes);
|
||||
int target = playerstate[client].gagTarget;
|
||||
|
||||
|
||||
char title[100];
|
||||
Format(title, sizeof(title), "%T: %N", "Choose Type", client, target);
|
||||
menu.SetTitle(title);
|
||||
@ -65,7 +65,7 @@ void DisplayGagTypesMenu(int client)
|
||||
AddTranslatedMenuItem(menu, "1", "UnMute Player", client);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!playerstate[target].isGagged)
|
||||
{
|
||||
if(CheckCommandAccess(client, "sm_gag", ADMFLAG_CHAT, false))
|
||||
@ -80,7 +80,7 @@ void DisplayGagTypesMenu(int client)
|
||||
AddTranslatedMenuItem(menu, "3", "UnGag Player", client);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!playerstate[target].isMuted || !playerstate[target].isGagged)
|
||||
{
|
||||
if(CheckCommandAccess(client, "sm_silence", ADMFLAG_CHAT, false))
|
||||
@ -95,7 +95,7 @@ void DisplayGagTypesMenu(int client)
|
||||
AddTranslatedMenuItem(menu, "5", "UnSilence Player", client);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
menu.Display(client, MENU_TIME_FOREVER);
|
||||
}
|
||||
|
||||
@ -109,18 +109,18 @@ void AddTranslatedMenuItem(Menu menu, const char[] opt, const char[] phrase, int
|
||||
void DisplayGagPlayerMenu(int client)
|
||||
{
|
||||
Menu menu = new Menu(MenuHandler_GagPlayer);
|
||||
|
||||
|
||||
char title[100];
|
||||
Format(title, sizeof(title), "%T:", "Gag/Mute player", client);
|
||||
menu.SetTitle(title);
|
||||
menu.ExitBackButton = true;
|
||||
|
||||
|
||||
AddTargetsToMenu(menu, client, true, false);
|
||||
|
||||
|
||||
menu.Display(client, MENU_TIME_FOREVER);
|
||||
}
|
||||
|
||||
public void AdminMenu_Gag(TopMenu topmenu,
|
||||
public void AdminMenu_Gag(TopMenu topmenu,
|
||||
TopMenuAction action,
|
||||
TopMenuObject object_id,
|
||||
int param,
|
||||
@ -154,7 +154,7 @@ public int MenuHandler_GagPlayer(Menu menu, MenuAction action, int param1, int p
|
||||
{
|
||||
char info[32];
|
||||
int userid, target;
|
||||
|
||||
|
||||
menu.GetItem(param2, info, sizeof(info));
|
||||
userid = StringToInt(info);
|
||||
|
||||
@ -193,12 +193,12 @@ public int MenuHandler_GagTypes(Menu menu, MenuAction action, int param1, int pa
|
||||
{
|
||||
char info[32];
|
||||
CommType type;
|
||||
|
||||
|
||||
menu.GetItem(param2, info, sizeof(info));
|
||||
type = view_as<CommType>(StringToInt(info));
|
||||
|
||||
|
||||
int target = playerstate[param1].gagTarget;
|
||||
|
||||
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
@ -207,42 +207,48 @@ public int MenuHandler_GagTypes(Menu menu, MenuAction action, int param1, int pa
|
||||
case CommType_Mute:
|
||||
{
|
||||
if(CheckCommandAccess(param1, "sm_mute", ADMFLAG_CHAT, false)){
|
||||
PerformMute(param1, target);
|
||||
PerformMute(target);
|
||||
LogAction(param1, target, "\"%L\" muted \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Muted target", "_s", name);
|
||||
}
|
||||
}
|
||||
case CommType_UnMute:
|
||||
{
|
||||
if(CheckCommandAccess(param1, "sm_unmute", ADMFLAG_CHAT, false)){
|
||||
PerformUnMute(param1, target);
|
||||
PerformUnMute(target);
|
||||
LogAction(param1, target, "\"%L\" unmuted \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Unmuted target", "_s", name);
|
||||
}
|
||||
}
|
||||
case CommType_Gag:
|
||||
{
|
||||
if(CheckCommandAccess(param1, "sm_gag", ADMFLAG_CHAT, false)){
|
||||
PerformGag(param1, target);
|
||||
PerformGag(target);
|
||||
LogAction(param1, target, "\"%L\" gagged \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Gagged target", "_s", name);
|
||||
}
|
||||
}
|
||||
case CommType_UnGag:
|
||||
{
|
||||
if(CheckCommandAccess(param1, "sm_ungag", ADMFLAG_CHAT, false)){
|
||||
PerformUnGag(param1, target);
|
||||
PerformUnGag(target);
|
||||
LogAction(param1, target, "\"%L\" ungagged \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Ungagged target", "_s", name);
|
||||
}
|
||||
}
|
||||
case CommType_Silence:
|
||||
{
|
||||
if(CheckCommandAccess(param1, "sm_silence", ADMFLAG_CHAT, false)){
|
||||
PerformSilence(param1, target);
|
||||
PerformSilence(target);
|
||||
LogAction(param1, target, "\"%L\" silenced \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Silenced target", "_s", name);
|
||||
}
|
||||
}
|
||||
case CommType_UnSilence:
|
||||
{
|
||||
if(CheckCommandAccess(param1, "sm_unsilence", ADMFLAG_CHAT, false)){
|
||||
PerformUnSilence(param1, target);
|
||||
PerformUnSilence(target);
|
||||
LogAction(param1, target, "\"%L\" unsilenced \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Unsilenced target", "_s", name);
|
||||
}
|
||||
}
|
||||
@ -252,20 +258,15 @@ public int MenuHandler_GagTypes(Menu menu, MenuAction action, int param1, int pa
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PerformMute(int client, int target, bool silent=false)
|
||||
void PerformMute(int target)
|
||||
{
|
||||
playerstate[target].isMuted = true;
|
||||
SetClientListeningFlags(target, VOICE_MUTED);
|
||||
|
||||
|
||||
FireOnClientMute(target, true);
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" muted \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
void PerformUnMute(int client, int target, bool silent=false)
|
||||
void PerformUnMute(int target)
|
||||
{
|
||||
playerstate[target].isMuted = false;
|
||||
if (g_Cvar_Deadtalk.IntValue == 1 && !IsPlayerAlive(target))
|
||||
@ -280,67 +281,50 @@ void PerformUnMute(int client, int target, bool silent=false)
|
||||
{
|
||||
SetClientListeningFlags(target, VOICE_NORMAL);
|
||||
}
|
||||
|
||||
|
||||
FireOnClientMute(target, false);
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" unmuted \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
void PerformGag(int client, int target, bool silent=false)
|
||||
void PerformGag(int target)
|
||||
{
|
||||
playerstate[target].isGagged = true;
|
||||
FireOnClientGag(target, true);
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" gagged \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
void PerformUnGag(int client, int target, bool silent=false)
|
||||
void PerformUnGag(int target)
|
||||
{
|
||||
playerstate[target].isGagged = false;
|
||||
FireOnClientGag(target, false);
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" ungagged \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
void PerformSilence(int client, int target)
|
||||
void PerformSilence(int target)
|
||||
{
|
||||
if (!playerstate[target].isGagged)
|
||||
{
|
||||
playerstate[target].isGagged = true;
|
||||
FireOnClientGag(target, true);
|
||||
}
|
||||
|
||||
|
||||
if (!playerstate[target].isMuted)
|
||||
{
|
||||
playerstate[target].isMuted = true;
|
||||
SetClientListeningFlags(target, VOICE_MUTED);
|
||||
FireOnClientMute(target, true);
|
||||
}
|
||||
|
||||
LogAction(client, target, "\"%L\" silenced \"%L\"", client, target);
|
||||
}
|
||||
|
||||
void PerformUnSilence(int client, int target)
|
||||
void PerformUnSilence(int target)
|
||||
{
|
||||
if (playerstate[target].isGagged)
|
||||
{
|
||||
playerstate[target].isGagged = false;
|
||||
FireOnClientGag(target, false);
|
||||
}
|
||||
|
||||
|
||||
if (playerstate[target].isMuted)
|
||||
{
|
||||
playerstate[target].isMuted = false;
|
||||
|
||||
|
||||
if (g_Cvar_Deadtalk.IntValue == 1 && !IsPlayerAlive(target))
|
||||
{
|
||||
SetClientListeningFlags(target, VOICE_LISTENALL);
|
||||
@ -355,30 +339,28 @@ void PerformUnSilence(int client, int target)
|
||||
}
|
||||
FireOnClientMute(target, false);
|
||||
}
|
||||
|
||||
LogAction(client, target, "\"%L\" unsilenced \"%L\"", client, target);
|
||||
}
|
||||
|
||||
public Action Command_Mute(int client, int args)
|
||||
{
|
||||
{
|
||||
if (args < 1)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_mute <player>");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
char arg[64];
|
||||
GetCmdArg(1, arg, sizeof(arg));
|
||||
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
int target_list[MAXPLAYERS], target_count;
|
||||
bool tn_is_ml;
|
||||
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
0,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
@ -391,42 +373,44 @@ public Action Command_Mute(int client, int args)
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
int target = target_list[i];
|
||||
|
||||
PerformMute(client, target);
|
||||
|
||||
PerformMute(target);
|
||||
}
|
||||
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Muted target", target_name);
|
||||
LogAction(client, -1, "\"%L\" muted \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Muted target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" muted \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action Command_Gag(int client, int args)
|
||||
{
|
||||
{
|
||||
if (args < 1)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_gag <player>");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
char arg[64];
|
||||
GetCmdArg(1, arg, sizeof(arg));
|
||||
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
int target_list[MAXPLAYERS], target_count;
|
||||
bool tn_is_ml;
|
||||
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
0,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
@ -439,42 +423,44 @@ public Action Command_Gag(int client, int args)
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
int target = target_list[i];
|
||||
|
||||
PerformGag(client, target);
|
||||
|
||||
PerformGag(target);
|
||||
}
|
||||
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Gagged target", target_name);
|
||||
LogAction(client, -1, "\"%L\" gagged \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Gagged target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" gagged \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action Command_Silence(int client, int args)
|
||||
{
|
||||
{
|
||||
if (args < 1)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_silence <player>");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
char arg[64];
|
||||
GetCmdArg(1, arg, sizeof(arg));
|
||||
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
int target_list[MAXPLAYERS], target_count;
|
||||
bool tn_is_ml;
|
||||
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
0,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
@ -487,42 +473,44 @@ public Action Command_Silence(int client, int args)
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
int target = target_list[i];
|
||||
|
||||
PerformSilence(client, target);
|
||||
|
||||
PerformSilence(target);
|
||||
}
|
||||
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Silenced target", target_name);
|
||||
LogAction(client, -1, "\"%L\" silenced \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Silenced target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" silenced \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action Command_Unmute(int client, int args)
|
||||
{
|
||||
{
|
||||
if (args < 1)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_unmute <player>");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
char arg[64];
|
||||
GetCmdArg(1, arg, sizeof(arg));
|
||||
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
int target_list[MAXPLAYERS], target_count;
|
||||
bool tn_is_ml;
|
||||
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
0,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
@ -535,15 +523,17 @@ public Action Command_Unmute(int client, int args)
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
int target = target_list[i];
|
||||
|
||||
|
||||
if (!playerstate[target].isMuted)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
PerformUnMute(client, target);
|
||||
|
||||
PerformUnMute(target);
|
||||
}
|
||||
|
||||
|
||||
LogAction(client, -1, "\"%L\" unmuted \"%s\"", client, target_name);
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Unmuted target", target_name);
|
||||
@ -552,30 +542,30 @@ public Action Command_Unmute(int client, int args)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Unmuted target", "_s", target_name);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action Command_Ungag(int client, int args)
|
||||
{
|
||||
{
|
||||
if (args < 1)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_ungag <player>");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
char arg[64];
|
||||
GetCmdArg(1, arg, sizeof(arg));
|
||||
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
int target_list[MAXPLAYERS], target_count;
|
||||
bool tn_is_ml;
|
||||
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
0,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
@ -588,42 +578,44 @@ public Action Command_Ungag(int client, int args)
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
int target = target_list[i];
|
||||
|
||||
PerformUnGag(client, target);
|
||||
|
||||
PerformUnGag(target);
|
||||
}
|
||||
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Ungagged target", target_name);
|
||||
LogAction(client, -1, "\"%L\" ungagged \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Ungagged target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" ungagged \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action Command_Unsilence(int client, int args)
|
||||
{
|
||||
{
|
||||
if (args < 1)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_unsilence <player>");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
char arg[64];
|
||||
GetCmdArg(1, arg, sizeof(arg));
|
||||
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
int target_list[MAXPLAYERS], target_count;
|
||||
bool tn_is_ml;
|
||||
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
client,
|
||||
target_list,
|
||||
MAXPLAYERS,
|
||||
0,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
@ -636,18 +628,20 @@ public Action Command_Unsilence(int client, int args)
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
int target = target_list[i];
|
||||
|
||||
PerformUnSilence(client, target);
|
||||
|
||||
PerformUnSilence(target);
|
||||
}
|
||||
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Unsilenced target", target_name);
|
||||
LogAction(client, -1, "\"%L\" unsilenced \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Unsilenced target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" unsilenced \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public int Native_SetClientGag(Handle hPlugin, int numParams)
|
||||
return false;
|
||||
}
|
||||
|
||||
PerformGag(-1, client, true);
|
||||
PerformGag(client);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -94,7 +94,7 @@ public int Native_SetClientGag(Handle hPlugin, int numParams)
|
||||
return false;
|
||||
}
|
||||
|
||||
PerformUnGag(-1, client, true);
|
||||
PerformUnGag(client);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -122,7 +122,7 @@ public int Native_SetClientMute(Handle hPlugin, int numParams)
|
||||
return false;
|
||||
}
|
||||
|
||||
PerformMute(-1, client, true);
|
||||
PerformMute(client);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -131,7 +131,7 @@ public int Native_SetClientMute(Handle hPlugin, int numParams)
|
||||
return false;
|
||||
}
|
||||
|
||||
PerformUnMute(-1, client, true);
|
||||
PerformUnMute(client);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -31,10 +31,8 @@
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
void PerformKick(int client, int target, const char[] reason)
|
||||
void PerformKick(int target, const char[] reason)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" kicked \"%L\" (reason \"%s\")", client, target, reason);
|
||||
|
||||
if (reason[0] == '\0')
|
||||
{
|
||||
KickClient(target, "%t", "Kicked by admin");
|
||||
@ -110,7 +108,8 @@ public int MenuHandler_Kick(Menu menu, MenuAction action, int param1, int param2
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Kicked target", "_s", name);
|
||||
PerformKick(param1, target, "");
|
||||
PerformKick(target, "");
|
||||
LogAction(param1, target, "\"%L\" kicked \"%L\"", param1, target);
|
||||
}
|
||||
|
||||
/* Re-draw the menu if they're still valid */
|
||||
@ -203,13 +202,22 @@ public Action Command_Kick(int client, int args)
|
||||
}
|
||||
else
|
||||
{
|
||||
PerformKick(client, target_list[i], reason);
|
||||
PerformKick(target_list[i], reason);
|
||||
}
|
||||
}
|
||||
|
||||
if (kick_self)
|
||||
{
|
||||
PerformKick(client, client, reason);
|
||||
PerformKick(client, reason);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
LogAction(client, -1, "\"%L\" kicked \"%s\" (reason \"%s\")", client, target_name, reason);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogAction(client, target_list[0], "\"%L\" kicked \"%L\" (reason \"%s\")", client, target_list[0], reason);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -59,18 +59,12 @@ void KillAllBeacons()
|
||||
}
|
||||
}
|
||||
|
||||
void PerformBeacon(int client, int target)
|
||||
void PerformBeacon(int target)
|
||||
{
|
||||
if (g_BeaconSerial[target] == 0)
|
||||
{
|
||||
CreateBeacon(target);
|
||||
LogAction(client, target, "\"%L\" set a beacon on \"%L\"", client, target);
|
||||
}
|
||||
else
|
||||
{
|
||||
KillBeacon(target);
|
||||
LogAction(client, target, "\"%L\" removed a beacon on \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
public Action Timer_Beacon(Handle timer, any value)
|
||||
@ -184,8 +178,9 @@ public int MenuHandler_Beacon(Menu menu, MenuAction action, int param1, int para
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformBeacon(param1, target);
|
||||
PerformBeacon(target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Toggled beacon on target", "_s", name);
|
||||
LogAction(param1, target, "\"%L\" toggled beacon on \"%L\"", param1, target);
|
||||
}
|
||||
|
||||
/* Re-draw the menu if they're still valid */
|
||||
@ -229,16 +224,18 @@ public Action Command_Beacon(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformBeacon(client, target_list[i]);
|
||||
PerformBeacon(target_list[i]);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled beacon on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" toggled beacon on \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled beacon on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" toggled beacon on \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
int g_BlindTarget[MAXPLAYERS+1];
|
||||
|
||||
void PerformBlind(int client, int target, int amount)
|
||||
void PerformBlind(int target, int amount)
|
||||
{
|
||||
int targets[2];
|
||||
targets[0] = target;
|
||||
@ -75,8 +75,6 @@ void PerformBlind(int client, int target, int amount)
|
||||
}
|
||||
|
||||
EndMessage();
|
||||
|
||||
LogAction(client, target, "\"%L\" set blind on \"%L\" (amount \"%d\")", client, target, amount);
|
||||
}
|
||||
|
||||
public void AdminMenu_Blind(TopMenu topmenu,
|
||||
@ -211,7 +209,8 @@ public int MenuHandler_Amount(Menu menu, MenuAction action, int param1, int para
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformBlind(param1, target, amount);
|
||||
PerformBlind(target, amount);
|
||||
LogAction(param1, target, "\"%L\" set blind on \"%L\", amount %d.", param1, target, amount);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Set blind on target", "_s", name, amount);
|
||||
}
|
||||
|
||||
@ -276,16 +275,18 @@ public Action Command_Blind(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformBlind(client, target_list[i], amount);
|
||||
PerformBlind(target_list[i], amount);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Set blind on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" set blind on \"%s\", amount %d.", client, target_name, amount);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Set blind on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" set blind on \"%L\", amount %d.", client, target_list[0], amount);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -106,7 +106,7 @@ void KillAllDrugs()
|
||||
}
|
||||
}
|
||||
|
||||
void PerformDrug(int client, int target, int toggle)
|
||||
void PerformDrug(int target, int toggle)
|
||||
{
|
||||
switch (toggle)
|
||||
{
|
||||
@ -115,12 +115,10 @@ void PerformDrug(int client, int target, int toggle)
|
||||
if (g_DrugTimers[target] == null)
|
||||
{
|
||||
CreateDrug(target);
|
||||
LogAction(client, target, "\"%L\" drugged \"%L\"", client, target);
|
||||
}
|
||||
else
|
||||
{
|
||||
KillDrug(target);
|
||||
LogAction(client, target, "\"%L\" undrugged \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,7 +127,6 @@ void PerformDrug(int client, int target, int toggle)
|
||||
if (g_DrugTimers[target] == null)
|
||||
{
|
||||
CreateDrug(target);
|
||||
LogAction(client, target, "\"%L\" drugged \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +135,6 @@ void PerformDrug(int client, int target, int toggle)
|
||||
if (g_DrugTimers[target] != null)
|
||||
{
|
||||
KillDrug(target);
|
||||
LogAction(client, target, "\"%L\" undrugged \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -268,7 +264,8 @@ public int MenuHandler_Drug(Menu menu, MenuAction action, int param1, int param2
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformDrug(param1, target, 2);
|
||||
PerformDrug(target, 2);
|
||||
LogAction(param1, target, "\"%L\" toggled drugs on \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Toggled drug on target", "_s", name);
|
||||
}
|
||||
|
||||
@ -328,16 +325,18 @@ public Action Command_Drug(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformDrug(client, target_list[i], toggle);
|
||||
PerformDrug(target_list[i], toggle);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled drug on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" toggled drugs on \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled drug on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" toggled drugs on \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -64,24 +64,16 @@ void KillAllFireBombs()
|
||||
}
|
||||
}
|
||||
|
||||
void PerformBurn(int client, int target, float seconds)
|
||||
{
|
||||
IgniteEntity(target, seconds);
|
||||
LogAction(client, target, "\"%L\" ignited \"%L\" (seconds \"%f\")", client, target, seconds);
|
||||
}
|
||||
|
||||
void PerformFireBomb(int client, int target)
|
||||
{
|
||||
if (g_FireBombSerial[client] == 0)
|
||||
{
|
||||
CreateFireBomb(target);
|
||||
LogAction(client, target, "\"%L\" set a FireBomb on \"%L\"", client, target);
|
||||
}
|
||||
else
|
||||
{
|
||||
KillFireBomb(target);
|
||||
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||
LogAction(client, target, "\"%L\" removed a FireBomb on \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,7 +298,8 @@ public int MenuHandler_Burn(Menu menu, MenuAction action, int param1, int param2
|
||||
{
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
PerformBurn(param1, target, 20.0);
|
||||
IgniteEntity(target, 20.0);
|
||||
LogAction(param1, target, "\"%L\" ignited \"%L\" (seconds \"20\")", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Set target on fire", "_s", name);
|
||||
}
|
||||
|
||||
@ -355,6 +348,7 @@ public int MenuHandler_FireBomb(Menu menu, MenuAction action, int param1, int pa
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformFireBomb(param1, target);
|
||||
LogAction(param1, target, "\"%L\" toggled FireBomb on \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Toggled FireBomb on target", "_s", name);
|
||||
}
|
||||
|
||||
@ -410,16 +404,18 @@ public Action Command_Burn(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformBurn(client, target_list[i], seconds);
|
||||
IgniteEntity(target_list[i], seconds);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Set target on fire", target_name);
|
||||
LogAction(client, -1, "\"%L\" ignited \"%s\" (seconds \"%f\")", client, target_name, seconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Set target on fire", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" ignited \"%L\" (seconds \"%f\")", client, target_list[0], seconds);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
@ -462,10 +458,12 @@ public Action Command_FireBomb(int client, int args)
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled FireBomb on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" toggled FireBomb on \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled FireBomb on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" toggled FireBomb on \"%L\"", client, target_list[0]);
|
||||
}
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
@ -33,12 +33,6 @@
|
||||
|
||||
int g_GravityTarget[MAXPLAYERS+1];
|
||||
|
||||
void PerformGravity(int client, int target, float amount)
|
||||
{
|
||||
SetEntityGravity(target, amount);
|
||||
LogAction(client, target, "\"%L\" set gravity on \"%L\" (amount \"%f\")", client, target, amount);
|
||||
}
|
||||
|
||||
public void AdminMenu_Gravity(TopMenu topmenu,
|
||||
TopMenuAction action,
|
||||
TopMenuObject object_id,
|
||||
@ -169,7 +163,8 @@ public int MenuHandler_GravityAmount(Menu menu, MenuAction action, int param1, i
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformGravity(param1, target, amount);
|
||||
SetEntityGravity(target, amount);
|
||||
LogAction(param1, target, "\"%L\" set gravity on \"%L\" to %f.", param1, target, amount);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Set gravity on target", "_s", name, amount);
|
||||
}
|
||||
|
||||
@ -229,16 +224,18 @@ public Action Command_Gravity(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformGravity(client, target_list[i], amount);
|
||||
SetEntityGravity(target_list[i], amount);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Set gravity on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" set gravity on \"%s\" to %f.", client, target_name, amount);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Set gravity on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" set gravity on \"%L\" to %f.", client, target_list[0], amount);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -125,24 +125,12 @@ void KillAllFreezes()
|
||||
}
|
||||
}
|
||||
|
||||
void PerformFreeze(int client, int target, int time)
|
||||
{
|
||||
FreezeClient(target, time);
|
||||
LogAction(client, target, "\"%L\" froze \"%L\"", client, target);
|
||||
}
|
||||
|
||||
void PerformFreezeBomb(int client, int target)
|
||||
void PerformFreezeBomb(int target)
|
||||
{
|
||||
if (g_FreezeBombSerial[target] != 0)
|
||||
{
|
||||
KillFreezeBomb(target);
|
||||
LogAction(client, target, "\"%L\" removed a FreezeBomb on \"%L\"", client, target);
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateFreezeBomb(target);
|
||||
LogAction(client, target, "\"%L\" set a FreezeBomb on \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
public Action Timer_Freeze(Handle timer, any value)
|
||||
@ -421,7 +409,8 @@ public int MenuHandler_Freeze(Menu menu, MenuAction action, int param1, int para
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformFreeze(param1, target, g_Cvar_FreezeDuration.IntValue);
|
||||
FreezeClient(target, g_Cvar_FreezeDuration.IntValue);
|
||||
LogAction(param1, target, "\"%L\" froze \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Froze target", "_s", name);
|
||||
}
|
||||
|
||||
@ -469,7 +458,8 @@ public int MenuHandler_FreezeBomb(Menu menu, MenuAction action, int param1, int
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformFreezeBomb(param1, target);
|
||||
PerformFreezeBomb(target);
|
||||
LogAction(param1, target, "\"%L\" toggled FreezeBomb on \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Toggled FreezeBomb on target", "_s", name);
|
||||
}
|
||||
|
||||
@ -522,16 +512,18 @@ public Action Command_Freeze(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformFreeze(client, target_list[i], seconds);
|
||||
FreezeClient(target_list[i], seconds);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Froze target", target_name);
|
||||
LogAction(client, -1, "\"%L\" froze \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Froze target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" froze \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
@ -568,16 +560,18 @@ public Action Command_FreezeBomb(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformFreezeBomb(client, target_list[i]);
|
||||
PerformFreezeBomb(target_list[i]);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled FreezeBomb on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" toggled FreezeBomb on \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled FreezeBomb on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" toggled FreezeBomb on \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
void PerformNoClip(int client, int target)
|
||||
void PerformNoClip(int target)
|
||||
{
|
||||
MoveType movetype = GetEntityMoveType(target);
|
||||
|
||||
@ -43,8 +43,6 @@ void PerformNoClip(int client, int target)
|
||||
{
|
||||
SetEntityMoveType(target, MOVETYPE_WALK);
|
||||
}
|
||||
|
||||
LogAction(client, target, "\"%L\" toggled noclip on \"%L\"", client, target);
|
||||
}
|
||||
|
||||
public void AdminMenu_NoClip(TopMenu topmenu,
|
||||
@ -112,7 +110,8 @@ public int MenuHandler_NoClip(Menu menu, MenuAction action, int param1, int para
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformNoClip(param1, target);
|
||||
PerformNoClip(target);
|
||||
LogAction(param1, target, "\"%L\" toggled noclip on \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Toggled noclip on target", "_s", name);
|
||||
}
|
||||
|
||||
@ -157,16 +156,18 @@ public Action Command_NoClip(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformNoClip(client, target_list[i]);
|
||||
PerformNoClip(target_list[i]);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled noclip on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" toggled noclip on \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled noclip on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" toggled noclip on \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -68,13 +68,11 @@ void PerformTimeBomb(int client, int target)
|
||||
if (g_TimeBombSerial[target] == 0)
|
||||
{
|
||||
CreateTimeBomb(target);
|
||||
LogAction(client, target, "\"%L\" set a TimeBomb on \"%L\"", client, target);
|
||||
}
|
||||
else
|
||||
{
|
||||
KillTimeBomb(target);
|
||||
SetEntityRenderColor(client, 255, 255, 255, 255);
|
||||
LogAction(client, target, "\"%L\" removed a TimeBomb on \"%L\"", client, target);
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,6 +277,7 @@ public int MenuHandler_TimeBomb(Menu menu, MenuAction action, int param1, int pa
|
||||
GetClientName(target, name, sizeof(name));
|
||||
|
||||
PerformTimeBomb(param1, target);
|
||||
LogAction(param1, target, "\"%L\" toggled TimeBomb on \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Toggled TimeBomb on target", "_s", name);
|
||||
}
|
||||
|
||||
@ -329,10 +328,12 @@ public Action Command_TimeBomb(int client, int args)
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled TimeBomb on target", target_name);
|
||||
LogAction(client, -1, "\"%L\" toggled TimeBomb on \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Toggled TimeBomb on target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" toggled TimeBomb on \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -33,10 +33,8 @@
|
||||
|
||||
char g_NewName[MAXPLAYERS+1][MAX_NAME_LENGTH];
|
||||
|
||||
void PerformRename(int client, int target)
|
||||
void PerformRename(int target)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" renamed \"%L\" (to \"%s\")", client, target, g_NewName[target]);
|
||||
|
||||
SetClientName(target, g_NewName[target]);
|
||||
|
||||
g_NewName[target][0] = '\0';
|
||||
@ -109,7 +107,8 @@ public int MenuHandler_Rename(Menu menu, MenuAction action, int param1, int para
|
||||
|
||||
RandomizeName(target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Renamed target", "_s", name);
|
||||
PerformRename(param1, target);
|
||||
LogAction(param1, target, "\"%L\" renamed \"%L\" to \"%s\")", param1, target, g_NewName[target]);
|
||||
PerformRename(target);
|
||||
}
|
||||
DisplayRenameTargetMenu(param1);
|
||||
}
|
||||
@ -170,12 +169,14 @@ public Action Command_Rename(int client, int args)
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Renamed target", target_name);
|
||||
LogAction(client, -1, "\"%L\" renamed \"%s\" to \"%s\")", client, target_name, arg2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Renamed target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" renamed \"%L\" to \"%s\")", client, target_list[0], arg2);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
if (randomize)
|
||||
@ -193,7 +194,7 @@ public Action Command_Rename(int client, int args)
|
||||
Format(g_NewName[target_list[i]], MAX_NAME_LENGTH, "%s", arg2);
|
||||
}
|
||||
}
|
||||
PerformRename(client, target_list[i]);
|
||||
PerformRename(target_list[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -33,12 +33,6 @@
|
||||
|
||||
int g_SlapDamage[MAXPLAYERS+1];
|
||||
|
||||
void PerformSlap(int client, int target, int damage)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" slapped \"%L\" (damage \"%d\")", client, target, damage);
|
||||
SlapPlayer(target, damage, true);
|
||||
}
|
||||
|
||||
void DisplaySlapDamageMenu(int client)
|
||||
{
|
||||
Menu menu = new Menu(MenuHandler_SlapDamage);
|
||||
@ -153,7 +147,8 @@ public int MenuHandler_Slap(Menu menu, MenuAction action, int param1, int param2
|
||||
{
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
PerformSlap(param1, target, g_SlapDamage[param1]);
|
||||
SlapPlayer(target, g_SlapDamage[param1]);
|
||||
LogAction(param1, target, "\"%L\" slapped \"%L\" (damage \"%d\")", param1, target, g_SlapDamage[param1]);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Slapped target", "_s", name);
|
||||
}
|
||||
|
||||
@ -206,16 +201,18 @@ public Action Command_Slap(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformSlap(client, target_list[i], damage);
|
||||
SlapPlayer(target_list[i], damage);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Slapped target", target_name);
|
||||
LogAction(client, -1, "\"%L\" slapped \"%s\" (damage \"%d\")", client, target_name, damage);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Slapped target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" slapped \"%L\" (damage \"%d\")", client, target_list[0], damage);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -31,12 +31,6 @@
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
void PerformSlay(int client, int target)
|
||||
{
|
||||
LogAction(client, target, "\"%L\" slayed \"%L\"", client, target);
|
||||
ForcePlayerSuicide(target);
|
||||
}
|
||||
|
||||
void DisplaySlayMenu(int client)
|
||||
{
|
||||
Menu menu = new Menu(MenuHandler_Slay);
|
||||
@ -105,7 +99,8 @@ public int MenuHandler_Slay(Menu menu, MenuAction action, int param1, int param2
|
||||
{
|
||||
char name[MAX_NAME_LENGTH];
|
||||
GetClientName(target, name, sizeof(name));
|
||||
PerformSlay(param1, target);
|
||||
ForcePlayerSuicide(target);
|
||||
LogAction(param1, target, "\"%L\" slayed \"%L\"", param1, target);
|
||||
ShowActivity2(param1, "[SM] ", "%t", "Slayed target", "_s", name);
|
||||
}
|
||||
|
||||
@ -146,16 +141,18 @@ public Action Command_Slay(int client, int args)
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
PerformSlay(client, target_list[i]);
|
||||
ForcePlayerSuicide(target_list[i]);
|
||||
}
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Slayed target", target_name);
|
||||
LogAction(client, -1, "\"%L\" slayed \"%s\"", client, target_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Slayed target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" slayed \"%L\"", client, target_list[0]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
@ -76,7 +76,7 @@ public Action Command_Play(int client, int args)
|
||||
|
||||
char SoundPath[PLATFORM_MAX_PATH];
|
||||
BreakString(Arguments[len], SoundPath, sizeof(SoundPath));
|
||||
|
||||
|
||||
/* Remove all double and single quotes out of the path */
|
||||
ReplaceString(SoundPath, sizeof(SoundPath), "\"", "");
|
||||
ReplaceString(SoundPath, sizeof(SoundPath), "'", "");
|
||||
@ -89,11 +89,11 @@ public Action Command_Play(int client, int args)
|
||||
ReplyToCommand(client, "[SM] Invalid filename");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
char target_name[MAX_TARGET_LENGTH];
|
||||
int target_list[MAXPLAYERS], target_count;
|
||||
bool tn_is_ml;
|
||||
|
||||
|
||||
if ((target_count = ProcessTargetString(
|
||||
Arg,
|
||||
client,
|
||||
@ -107,20 +107,21 @@ public Action Command_Play(int client, int args)
|
||||
ReplyToTargetError(client, target_count);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < target_count; i++)
|
||||
{
|
||||
ClientCommand(target_list[i], "playgamesound \"%s\"", SoundPath);
|
||||
LogAction(client, target_list[i], "\"%L\" played sound on \"%L\" (file \"%s\")", client, target_list[i], SoundPath);
|
||||
}
|
||||
|
||||
|
||||
if (tn_is_ml)
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Played sound to target", target_name);
|
||||
LogAction(client, -1, "\"%L\" played sound on \"%s\" (file \"%s\")", client, target_name, Arguments[len]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowActivity2(client, "[SM] ", "%t", "Played sound to target", "_s", target_name);
|
||||
LogAction(client, target_list[0], "\"%L\" played sound on \"%L\" (file \"%s\")", client, target_list[0], Arguments[len]);
|
||||
}
|
||||
|
||||
return Plugin_Handled;
|
||||
|
Loading…
Reference in New Issue
Block a user