Added compiled GSC loading by overriding existing scripts & implemented fix for change team not being available
This commit is contained in:
BIN
data/scripts/mp/gametypes/_clientids.gsc
Normal file
BIN
data/scripts/mp/gametypes/_clientids.gsc
Normal file
Binary file not shown.
33
data/scripts/mp/gametypes/_clientids.gsc_raw
Normal file
33
data/scripts/mp/gametypes/_clientids.gsc_raw
Normal file
@ -0,0 +1,33 @@
|
||||
#using scripts\codescripts\struct;
|
||||
|
||||
#using scripts\shared\callbacks_shared;
|
||||
#using scripts\shared\system_shared;
|
||||
|
||||
#insert scripts\shared\shared.gsh;
|
||||
|
||||
#namespace clientids;
|
||||
|
||||
REGISTER_SYSTEM( "clientids", &__init__, undefined )
|
||||
|
||||
function __init__()
|
||||
{
|
||||
callback::on_start_gametype( &init );
|
||||
callback::on_connect( &on_player_connect );
|
||||
}
|
||||
|
||||
function init()
|
||||
{
|
||||
level.clientid = 0;
|
||||
wait 0.5;
|
||||
level.allow_teamchange = "1";
|
||||
}
|
||||
|
||||
function on_player_connect()
|
||||
{
|
||||
self.clientid = matchRecordNewPlayer( self );
|
||||
if ( !isdefined( self.clientid ) || self.clientid == -1 )
|
||||
{
|
||||
self.clientid = level.clientid;
|
||||
level.clientid++;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user