Is it possible to have a chat box on a website displaying the chat of a GMod server? And for the users to communicate through them? If so, how?
Yes, it’s very possible. For displaying the chat of a GMod server you want to have Lua save chat messages to a file/database which can be read by PHP on your website and to communicate with them a database would be your best bet.
Communicating from the website to the server is a little more tricky but far from impossible. You could use the same file/db approach as server to website talk, and have the game check the file for updates, and if it found any, write it to everyone’s chat and clearing the file.
I was just scanning through the HLSW files. I’m wondering if I could use the same method they did. Any ideas?!
Thanks for the replies guys. They seem pretty advanced, but I may be able to do it. Or friends
HLSW uses logaddress_add to send the data. However, this requires connection through rcon, which you obviously don’t want on a web page. Just use a database.
It’s safe to connect with rcon through a webpage if you do it right.
You could also use LuaSockets to write an addon for this.
EDIT: But I think connecting to rcon is the best way.