Wazarr94 / haxball_bot_headless

Ready-to-go scripts and functions for the HaxBall Headless API !
MIT License
46 stars 74 forks source link

Announcements and Color chat. #65

Closed peppewarrior1 closed 1 year ago

peppewarrior1 commented 1 year ago

I'm sorry again for the inconvenience ... unfortunately there is very little information and it is dated ...

First question: I would like to understand how to send announcements automatically every now and then like some rooms do... I haven't found anything around that satisfies me... Second question: I would like the admins and masters to have a different color when they write in the chat... can this be done?

Sorry again for the inconvenience...

Wazarr94 commented 1 year ago

1st question: use setInterval, which works the same as setTimeout except it runs every X milliseconds. 2nd question: It is not really easy to do in my script, but you would have to hide every message sent (return false in the function onPlayerChat) and resend it as an announcement with the properties you want.