Black Ops 3 Source Code Explorer
0.1
An script explorer for Black Ops 3 by ZeRoY
clientids_shared.gsc
Go to the documentation of this file.
1
#using scripts\codescripts\struct;
2
3
#using scripts\shared\callbacks_shared;
4
#using scripts\shared\system_shared;
5
6
#insert scripts\shared\shared.gsh;
7
8
#namespace clientids;
9
10
REGISTER_SYSTEM
(
"clientids"
, &
__init__
, undefined )
11
12
function
__init__
()
13
{
14
callback::on_start_gametype
( &
init
);
15
callback::on_connect
( &
on_player_connect
);
16
}
17
18
function
init
()
19
{
20
// this is now handled in code ( not lan )
21
// see s_nextScriptClientId
22
level.clientid = 0;
23
}
24
25
function
on_player_connect
()
26
{
27
self
.clientid = matchRecordNewPlayer(
self
);
28
if
( !isdefined(
self
.clientid ) ||
self
.clientid == -1 )
29
{
30
self
.clientid = level.clientid;
31
level.clientid++;
// Is this safe? What if a server runs for a long time and many people join/leave
32
}
33
34
/#
35
PrintLn(
"client: "
+
self
.
name
+
" clientid: "
+
self
.clientid);
36
#/
37
}
38
on_start_gametype
function on_start_gametype(func, obj)
Definition:
callbacks_shared.csc:285
on_player_connect
function on_player_connect()
Definition:
clientids_shared.gsc:25
REGISTER_SYSTEM
#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition:
shared.gsh:204
init
function init()
Definition:
clientids_shared.gsc:18
__init__
function __init__()
Definition:
clientids_shared.gsc:12
on_connect
function on_connect()
Definition:
_arena.gsc:20
name
class GroundFx name
scripts
shared
clientids_shared.gsc
Generated by
1.8.17