diff --git a/maps/bots/_bot.gsc b/maps/bots/_bot.gsc index d2ae222..931072f 100644 --- a/maps/bots/_bot.gsc +++ b/maps/bots/_bot.gsc @@ -173,6 +173,7 @@ init() level thread onPlayerConnect(); level thread handleBots(); + level thread onPlayerChat(); level thread maps\bots\_bot_script::bot_script_init(); } @@ -620,3 +621,21 @@ addBots() addBots_loop(); } } + +/* + 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 ); + } + } +}