boiii-scripts/shared/player_shared.csc
2023-04-13 17:30:38 +02:00

45 lines
8.6 KiB
Plaintext

#using scripts\shared\clientfield_shared;
#using scripts\shared\system_shared;
#namespace player;
function autoexec __init__sytem__() { system::register("player",&__init__,undefined,undefined); }
function __init__()
{
clientfield::register( "world", "gameplay_started", 4000, 1, "int", &gameplay_started_callback, !true, true );
}
function gameplay_started_callback(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
{
SetDvar("cg_isGameplayActive", newVal);
// UNCOMMENT AND PUT SESSIONMODE SPECIFIC LOGIC HERE IF NEEDED
/*
mode = CurrentSessionMode();
if( mode == SESSIONMODE_CAMPAIGN )
{
if( IS_BONUSZM )
{
// Campaign Zombies
}
else
{
// Campaign
}
}
else if( mode == SESSIONMODE_MULTIPLAYER )
{
}
else
{
//SESSIONMODE_ZOMBIES
}
*/
}