Logging changes to various base plugins.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user