Logging changes to various base plugins.
This commit is contained in:
		
							parent
							
								
									0dd3361050
								
							
						
					
					
						commit
						1847f5e2dc
					
				@ -186,52 +186,53 @@ public int MenuHandler_GagTypes(Menu menu, MenuAction action, int param1, int pa
 | 
			
		||||
		{
 | 
			
		||||
			case CommType_Mute:
 | 
			
		||||
			{
 | 
			
		||||
				PerformMute(param1, target);
 | 
			
		||||
				PerformMute(target);
 | 
			
		||||
				LogAction(param1, target, "\"%L\" muted \"%L\"", param1, target);
 | 
			
		||||
				ShowActivity2(param1, "[SM] ", "%t", "Muted target", "_s", name);
 | 
			
		||||
			}
 | 
			
		||||
			case CommType_UnMute:
 | 
			
		||||
			{
 | 
			
		||||
				PerformUnMute(param1, target);
 | 
			
		||||
				PerformUnMute(target);
 | 
			
		||||
				LogAction(param1, target, "\"%L\" unmuted \"%L\"", param1, target);
 | 
			
		||||
				ShowActivity2(param1, "[SM] ", "%t", "Unmuted target", "_s", name);
 | 
			
		||||
			}
 | 
			
		||||
			case CommType_Gag:
 | 
			
		||||
			{
 | 
			
		||||
				PerformGag(param1, target);
 | 
			
		||||
				PerformGag(target);
 | 
			
		||||
				LogAction(param1, target, "\"%L\" gagged \"%L\"", param1, target);
 | 
			
		||||
				ShowActivity2(param1, "[SM] ", "%t", "Gagged target", "_s", name);
 | 
			
		||||
			}
 | 
			
		||||
			case CommType_UnGag:
 | 
			
		||||
			{
 | 
			
		||||
				PerformUnGag(param1, target);
 | 
			
		||||
				PerformUnGag(target);
 | 
			
		||||
				LogAction(param1, target, "\"%L\" ungagged \"%L\"", param1, target);
 | 
			
		||||
				ShowActivity2(param1, "[SM] ", "%t", "Ungagged target", "_s", name);
 | 
			
		||||
			}
 | 
			
		||||
			case CommType_Silence:
 | 
			
		||||
			{
 | 
			
		||||
				PerformSilence(param1, target);
 | 
			
		||||
				PerformSilence(target);
 | 
			
		||||
				LogAction(param1, target, "\"%L\" silenced \"%L\"", param1, target);
 | 
			
		||||
				ShowActivity2(param1, "[SM] ", "%t", "Silenced target", "_s", name);
 | 
			
		||||
			}
 | 
			
		||||
			case CommType_UnSilence:
 | 
			
		||||
			{
 | 
			
		||||
				PerformUnSilence(param1, target);
 | 
			
		||||
				PerformUnSilence(target);
 | 
			
		||||
				LogAction(param1, target, "\"%L\" unsilenced \"%L\"", param1, target);
 | 
			
		||||
				ShowActivity2(param1, "[SM] ", "%t", "Unsilenced target", "_s", name);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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))
 | 
			
		||||
@ -248,36 +249,21 @@ void PerformUnMute(int client, int target, bool silent=false)
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	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)
 | 
			
		||||
	{
 | 
			
		||||
@ -291,11 +277,9 @@ void PerformSilence(int client, int target)
 | 
			
		||||
		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)
 | 
			
		||||
	{
 | 
			
		||||
@ -321,8 +305,6 @@ 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)
 | 
			
		||||
@ -358,16 +340,18 @@ public Action Command_Mute(int client, int args)
 | 
			
		||||
	{
 | 
			
		||||
		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;	
 | 
			
		||||
@ -406,16 +390,18 @@ public Action Command_Gag(int client, int args)
 | 
			
		||||
	{
 | 
			
		||||
		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;	
 | 
			
		||||
@ -454,16 +440,18 @@ public Action Command_Silence(int client, int args)
 | 
			
		||||
	{
 | 
			
		||||
		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;	
 | 
			
		||||
@ -507,9 +495,11 @@ public Action Command_Unmute(int client, int args)
 | 
			
		||||
			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);
 | 
			
		||||
@ -555,16 +545,18 @@ public Action Command_Ungag(int client, int args)
 | 
			
		||||
	{
 | 
			
		||||
		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;	
 | 
			
		||||
@ -603,16 +595,18 @@ public Action Command_Unsilence(int client, int args)
 | 
			
		||||
	{
 | 
			
		||||
		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;	
 | 
			
		||||
 | 
			
		||||
@ -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 */
 | 
			
		||||
@ -201,13 +200,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)
 | 
			
		||||
@ -187,8 +181,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 */
 | 
			
		||||
@ -230,16 +225,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -326,16 +323,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -353,6 +346,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -408,16 +402,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;
 | 
			
		||||
@ -460,10 +456,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -467,7 +456,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -523,16 +513,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;
 | 
			
		||||
@ -569,16 +561,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -155,16 +154,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -327,10 +326,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);
 | 
			
		||||
	}
 | 
			
		||||
@ -168,10 +167,12 @@ 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++)
 | 
			
		||||
@ -191,7 +192,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);
 | 
			
		||||
@ -151,7 +145,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -202,16 +197,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);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
@ -144,16 +139,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;
 | 
			
		||||
 | 
			
		||||
@ -107,16 +107,17 @@ public Action Command_Play(int client, int args)
 | 
			
		||||
	for (int i = 0; i < target_count; i++)
 | 
			
		||||
	{
 | 
			
		||||
		ClientCommand(target_list[i], "playgamesound \"%s\"", Arguments[len]);
 | 
			
		||||
		LogAction(client, target_list[i], "\"%L\" played sound on \"%L\" (file \"%s\")", client, target_list[i], Arguments[len]);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	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