Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rpc = gbxremote.createClient(5000, '127.0.0.1');
- rpc.on('connect', function() {
- Async.parallel([
- function(callback) {
- rpc.query('GetServerOptions').then(function (res) {
- callback(null, res["CurrentMaxPlayers"], res["CurrentMaxSpectators"]);
- });
- },
- function(maxPlayers, maxSpectators, callback) {
- rpc.query('GetCurrentMapInfo').then(function (res) {
- callback(null, maxPlayers, maxSpectators, res["Name"]);
- });
- },
- function(maxPlayers, maxSpectators, currentMap, callback) {
- rpc.query('GetNextMapInfo').then(function (res) {
- callback(null, maxPlayers, maxSpectators, currentMap, nextMap);
- });
- },
- function(callback) {
- rpc.query('GetCurrentGameInfo').then(function (res) {
- callback(null, maxPlayers, maxSpectators, currentMap, nextMap, res["NbChallenge"]);
- });
- }
- ], (maxPlayers, maxSpectators, currentMap, nextMap, NbChallenge) => {
- // mach deinen schice hier :)
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement