1.1 --- a/core/smn_player.cpp Sat Jul 14 00:35:08 2007 +0000
1.2 +++ b/core/smn_player.cpp Sat Jul 14 00:47:30 2007 +0000
1.3 @@ -864,7 +864,7 @@
1.4 return g_Players.GetClientOfUserId(params[1]);
1.5 }
1.6
1.7 -static cell_t ShowActivity(IPluginContext *pContext, const cell_t *params)
1.8 +static cell_t _ShowActivity(IPluginContext *pContext, const cell_t *params, const char *tag, cell_t fmt_param)
1.9 {
1.10 char message[255];
1.11 char buffer[255];
1.12 @@ -894,15 +894,15 @@
1.13 if (replyto == SM_REPLY_CONSOLE)
1.14 {
1.15 g_SourceMod.SetGlobalTarget(client);
1.16 - g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
1.17 - UTIL_Format(message, sizeof(message), "[SM] %s\n", buffer);
1.18 + g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, fmt_param);
1.19 + UTIL_Format(message, sizeof(message), "%s%s\n", tag, buffer);
1.20 engine->ClientPrintf(pPlayer->GetEdict(), message);
1.21 display_in_chat = true;
1.22 }
1.23 } else {
1.24 g_SourceMod.SetGlobalTarget(LANG_SERVER);
1.25 - g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
1.26 - UTIL_Format(message, sizeof(message), "[SM] %s\n", buffer);
1.27 + g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, fmt_param);
1.28 + UTIL_Format(message, sizeof(message), "%s%s\n", tag, buffer);
1.29 META_CONPRINT(message);
1.30 }
1.31
1.32 @@ -934,8 +934,8 @@
1.33 {
1.34 newsign = name;
1.35 }
1.36 - g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
1.37 - UTIL_Format(message, sizeof(message), "[SM] %s: %s", newsign, buffer);
1.38 + g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, fmt_param);
1.39 + UTIL_Format(message, sizeof(message), "%s%s: %s", tag, newsign, buffer);
1.40 g_HL2.TextMsg(i, HUD_PRINTTALK, message);
1.41 }
1.42 } else {
1.43 @@ -950,8 +950,8 @@
1.44 {
1.45 newsign = name;
1.46 }
1.47 - g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
1.48 - UTIL_Format(message, sizeof(message), "[SM] %s: %s", newsign, buffer);
1.49 + g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, fmt_param);
1.50 + UTIL_Format(message, sizeof(message), "%s%s: %s", tag, newsign, buffer);
1.51 g_HL2.TextMsg(i, HUD_PRINTTALK, message);
1.52 }
1.53 }
1.54 @@ -960,6 +960,19 @@
1.55 return 1;
1.56 }
1.57
1.58 +static cell_t ShowActivity(IPluginContext *pContext, const cell_t *params)
1.59 +{
1.60 + return _ShowActivity(pContext, params, "[SM] ", 2);
1.61 +}
1.62 +
1.63 +static cell_t ShowActivityEx(IPluginContext *pContext, const cell_t *params)
1.64 +{
1.65 + char *str;
1.66 + pContext->LocalToString(params[2], &str);
1.67 +
1.68 + return _ShowActivity(pContext, params, str, 3);
1.69 +}
1.70 +
1.71 static cell_t KickClient(IPluginContext *pContext, const cell_t *params)
1.72 {
1.73 int client = params[1];