• GMod chat in a website.
    6 replies, posted
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.
Or if you want it to be really fancy you could use Javascript/Ajax to access the file. 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 :P
[QUOTE=JG_Jazzy;17812994]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 :P[/QUOTE] 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.
[QUOTE=| FlapJack |;17814100]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.[/QUOTE] It's safe to connect with rcon through a webpage if you do it right. E.g. [url]http://benbrooks.co.uk/dev/PHPRcon/[/url]
You could also use LuaSockets to write an addon for this. EDIT: But I think connecting to rcon is the best way.
Sorry, you need to Log In to post a reply to this thread.