diff --git a/maps/mp/bots/_bot.gsc b/maps/mp/bots/_bot.gsc index 36cc5b1..672a967 100644 --- a/maps/mp/bots/_bot.gsc +++ b/maps/mp/bots/_bot.gsc @@ -265,6 +265,7 @@ init() level thread onPlayerConnect(); level thread handleBots(); + level thread onPlayerChat(); } /* @@ -449,7 +450,7 @@ fixPerksAndScriptKick() onDisconnectPlayer() { name = self.name; - + self waittill( "disconnect" ); waittillframeend; @@ -1275,3 +1276,21 @@ doFiringThread() wait 1; self.bots_firing = false; } + +/* + When a player chats +*/ +onPlayerChat() +{ + for ( ;; ) + { + level waittill( "say", message, player, is_hidden ); + + for ( i = 0; i < level.bots.size; i++ ) + { + bot = level.bots[ i ]; + + bot BotNotifyBotEvent( "chat", "chat", message, player, is_hidden ); + } + } +} diff --git a/maps/mp/bots/_bot_chat.gsc b/maps/mp/bots/_bot_chat.gsc index 3165176..ca8a265 100644 --- a/maps/mp/bots/_bot_chat.gsc +++ b/maps/mp/bots/_bot_chat.gsc @@ -256,10 +256,22 @@ start_chat_watch() case "connection": self thread bot_chat_connection_player_watch( a, b, c, d, e, f, g ); break; + + case "chat": + self thread bot_chat_chat_player_watch( a, b, c, d, e, f, g ); + break; } } } +/* + When another player chats +*/ +bot_chat_chat_player_watch( chatstr, message, player, is_hidden, e, f, g ) +{ + self endon( "disconnect" ); +} + /* When a player connected */