generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Custom Serverlist?

Previous Thread :: Next Thread 
awesomebawss is online. awesomebawss
Joined: 30 Aug 2013
Total Posts: 336
11 Mar 2017 07:49 PM
How would I go about making a custom serverlist sort of like what apocalypse rising has? How do you get the number of players in every running server in a place?


( ͡° ͜ʖ ͡°)
Report Abuse
awesomebawss is online. awesomebawss
Joined: 30 Aug 2013
Total Posts: 336
11 Mar 2017 07:50 PM
bump


( ͡° ͜ʖ ͡°)
Report Abuse
awesomebawss is online. awesomebawss
Joined: 30 Aug 2013
Total Posts: 336
11 Mar 2017 07:53 PM
bump2


( ͡° ͜ʖ ͡°)
Report Abuse
awesomebawss is online. awesomebawss
Joined: 30 Aug 2013
Total Posts: 336
11 Mar 2017 07:54 PM
bumping like a madman


( ͡° ͜ʖ ͡°)
Report Abuse
devHoodie is online. devHoodie
Joined: 04 Nov 2008
Total Posts: 30332
11 Mar 2017 07:54 PM
This is called Datastore service.

The same way they make server leaderboards.

http://wiki.roblox.com/index.php?title=Data_store

-- Former AKA : luis15232
Report Abuse
awesomebawss is online. awesomebawss
Joined: 30 Aug 2013
Total Posts: 336
11 Mar 2017 07:56 PM
ooooooooooooh so I would loop through the datastore and find how many players are in each server?


( ͡° ͜ʖ ͡°)
Report Abuse
devHoodie is online. devHoodie
Joined: 04 Nov 2008
Total Posts: 30332
11 Mar 2017 07:59 PM
Each server that gets created would save itself onto a "Serverlist" store value.
while wait(10) do
local Users = game.Players.NumPlayers
local serverID = game.JobId -- this is different for every server. it's used to teleport players to that server

local serverData = {Users,serverID}
DataStore:UpdateAsync("Serverlist",serverData)
end

something like this
-- Former AKA : luis15232
Report Abuse
devHoodie is online. devHoodie
Joined: 04 Nov 2008
Total Posts: 30332
11 Mar 2017 08:02 PM
That code i wrote is wrong btw



-- Former AKA : luis15232
Report Abuse
devHoodie is online. devHoodie
Joined: 04 Nov 2008
Total Posts: 30332
11 Mar 2017 08:03 PM
local serverData = {Users,serverID}
local servers = DataStore:GetAsync("Serverlist")
table.insert(servers,#servers,serverData)

DataStore:UpdateAsync("Serverlist",servers)

I meant to do something like this instead


-- Former AKA : luis15232
Report Abuse
devHoodie is online. devHoodie
Joined: 04 Nov 2008
Total Posts: 30332
11 Mar 2017 08:05 PM
Also don't forget to remove the server from the list once everyone leaves

-- Former AKA : luis15232
Report Abuse
awesomebawss is online. awesomebawss
Joined: 30 Aug 2013
Total Posts: 336
11 Mar 2017 08:19 PM
Thank you so much :O


( ͡° ͜ʖ ͡°)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image