How would you code an advert for ULX to show how many players are on another server?
Bump, If someone could help that would be amazing.
You could store the player count in MySQL which would require the server updating it manually. That method could work if both servers use a shared database server.
Alternatively, you could install the sockets dll and create a system where the servers communicate which eachother in real-time and send a message when a player connects / disconnects with the new round-count.
Or the third option, have the servers post their playerCount with a http.Fetch to a webserver you have.
Someone told me to use http.Fetch but I have no idea how. If someone could show me how that would be very helpful.
UnderYouFive you can't just come on here and expect people to code every little stupid thing you want on your server. Learn to code and do it yourself or hire a coder..
Look whose talking.
[url]http://wiki.garrysmod.com/page/http/Fetch[/url]
You can post it as a variable that the website uses and then fetch it since http.Fetch returns the websites HTML.
So for example just have a junk page on your website that all it stores is the number, and retrieve it from there!
The Wiki has a pretty helpful example example:
[url]http://wiki.garrysmod.com/page/http/Fetch[/url]
The easist way to do this in my opinion is post the data to a page, then send an rcon command wih that data to the other servers.
Sorry, you need to Log In to post a reply to this thread.