VoidExpanse/scope-server: Difference between revisions

From AtomicTorchWiki
(Created page with "<noinclude> Category:VoidExpanse/api_scopes </noinclude> = Scope server = Used to get access to a specific script-related functions. '''Visibility:''' Global. == List o...")
 
No edit summary
 
Line 12: Line 12:
{{Scripting_api|GetAllPlayers|
{{Scripting_api|GetAllPlayers|
void |
void |
array if strings|
array of strings|
<pre style="margin:0px;">var obj = server.GetAllPlayers();</pre> |
<pre style="margin:0px;">var obj = server.GetAllPlayers();</pre> |
Returns an array of names of all players registered on server.
Returns an array of names of all players registered on server.
Line 21: Line 21:
array of strings|
array of strings|
<pre style="margin:0px;">var obj = server.GetConnectedPlayers();</pre> |
<pre style="margin:0px;">var obj = server.GetConnectedPlayers();</pre> |
Returns an array of names of all players, which are currently connected to game.
Returns an array of names of all players, which are currently connected to the game server.
}}
}}


Line 35: Line 35:
bool|
bool|
<pre style="margin:0px;">var obj = server.IsPlayerOnline("dlirry");</pre> |
<pre style="margin:0px;">var obj = server.IsPlayerOnline("dlirry");</pre> |
Returns whether specified player online.
Returns whether specified player is online.
}}
}}

Latest revision as of 04:09, 13 February 2014


Scope server

Used to get access to a specific script-related functions.

Visibility: Global.

List of functions

GetAllPlayers
Arguments Returns Example

void

array of strings

var obj = server.GetAllPlayers();
Description

Returns an array of names of all players registered on server.


GetConnectedPlayers
Arguments Returns Example

void

array of strings

var obj = server.GetConnectedPlayers();
Description

Returns an array of names of all players, which are currently connected to the game server.


IsPlayerExists
Arguments Returns Example

string: name

bool

var obj = server.IsPlayerExists("dlirry");
Description

Returns whether specified player exists.


IsPlayerOnline
Arguments Returns Example

string: name

bool

var obj = server.IsPlayerOnline("dlirry");
Description

Returns whether specified player is online.