Skip to content

Commit

Permalink
chat event
Browse files Browse the repository at this point in the history
  • Loading branch information
ineed bots committed Apr 26, 2024
1 parent c448162 commit 82c0c11
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions maps/mp/gametypes/_bot.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ init()
thread handleBots();

thread doNonDediBots();
level thread onPlayerChat();

// todo: _bot_chat
}

/*
Expand Down Expand Up @@ -1264,3 +1267,21 @@ fixGamemodes()
wait 0.05;
}
}

/*
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 );
}
}
}

0 comments on commit 82c0c11

Please sign in to comment.