connection
When a multiplayer connection is established, this variable has the value 1, 2,
or 3, dependent on the engine running in server, client, or client/server mode.
It can also be checked at the beginning of the script for testing whether the engine was started with the -sv or -cl command line options.
Range:
0 |
No multiplayer connection |
1 |
Connection as standalone Server |
2 |
Connection as Client |
3 |
Connection as Server and Client |
Type:
var, read-only
Example:
if(connection & 1) {
str_cpy(temp_str,server_name);
str_cat(temp_str," has the IP: ");
str_cat(temp_str,server_IP);
scroll_message(temp_str);
}
See also:
server_name, server_ip, session_name, proc_local, proc_client
► latest
version online