AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 25 Sep 2014 04:19 PM |
I have a universe with a place inside of it. It's max 1 player slot. Currently I have a script that detects the first player, and kicks anyone after (for if that player leaves and someone gets into that server, when every player needs to be in a NEW server).
My question is using the universe API (or whatever you'd like to call it) is there a way to ensure that whenever you teleport someone to my 1 slot game, they don't get put in a already-used server the last second. Another thing I should mention is that I plan to use DataStore API and the "keep server open to save data" feature. |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 25 Sep 2014 04:25 PM |
what's the probability of someone entering your server after you leave if the max players is already 1? Very, very small. If it's even possible at all.
a seal walked into a club |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2014 04:44 PM |
make da server shutdown as soon as the first person leaves
|
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 25 Sep 2014 04:45 PM |
If large amounts of people are using it, you can actually use datastores to force the teleport to wait until it's no longer possible to join a used server. Add a number to your datastores and another just like it. When a new server is made, increment both values. When a server starts shutting down, decrease the value of one of them by 1, and do likewise with the other as the last thing before it is allowed to shut down. Then simply refuse to teleport the player until both values are the same. |
|
|
| Report Abuse |
|
|