|
@@ -5,16 +5,18 @@
|
|
|
#include <tf2>
|
|
|
#include <tf2_stocks>
|
|
|
|
|
|
+#include <printvalvetranslation>
|
|
|
+
|
|
|
#pragma newdecls required
|
|
|
|
|
|
-#define PLUGIN_VERSION "1.3.7"
|
|
|
+#define PLUGIN_VERSION "1.3.8"
|
|
|
|
|
|
public Plugin myinfo = {
|
|
|
name = "[TF2] Bot Manager",
|
|
|
author = "nosoop (forked from Dr. McKay)",
|
|
|
description = "Allows for customization of TFBots",
|
|
|
version = PLUGIN_VERSION,
|
|
|
- url = "http://csrd.science"
|
|
|
+ url = "http://csrd.science/"
|
|
|
};
|
|
|
|
|
|
ConVar cvarBotQuota;
|
|
@@ -297,7 +299,12 @@ public Action Event_PlayerDisconnect(Event event, const char[] name, bool dontBr
|
|
|
|
|
|
if (IsFakeClient(client)) {
|
|
|
event.BroadcastDisabled = true;
|
|
|
- PrintToChatAll("\x01BOT \x07%06X%N \x01has left the game", GetTeamColor(GetClientTeam(client)), client);
|
|
|
+
|
|
|
+ char botDisplay[128];
|
|
|
+ Format(botDisplay, sizeof(botDisplay), "\x07%06X%N\x01",
|
|
|
+ GetTeamColor(GetClientTeam(client)), client);
|
|
|
+ PrintValveTranslationToAll(Destination_Chat, "game_player_left_game", botDisplay,
|
|
|
+ "TF_Scoreboard_Bot");
|
|
|
}
|
|
|
return Plugin_Continue;
|
|
|
}
|
|
@@ -313,9 +320,13 @@ public Action Event_PlayerTeam(Event event, const char[] name, bool dontBroadcas
|
|
|
if ((pos = joiningBots.FindValue(GetClientUserId(client))) != -1) {
|
|
|
joiningBots.Erase(pos);
|
|
|
|
|
|
- PrintToServer("BOT %N has joined the game", client);
|
|
|
- PrintToChatAll("\x01BOT \x07%06X%N \x01has joined the game",
|
|
|
+ PrintToServer("%N (BOT) has joined the game", client);
|
|
|
+
|
|
|
+ char botDisplay[128];
|
|
|
+ Format(botDisplay, sizeof(botDisplay), "\x07%06X%N\x01",
|
|
|
GetTeamColor(event.GetInt("team")), client);
|
|
|
+
|
|
|
+ PrintValveTranslationToAll(Destination_Chat, "game_player_joined_game", botDisplay);
|
|
|
}
|
|
|
}
|
|
|
return Plugin_Continue;
|