#using scripts\codescripts\struct; #using scripts\shared\clientfield_shared; #using scripts\shared\system_shared; #namespace client_flag; function autoexec __init__sytem__() { system::register("client_flag",&__init__,undefined,undefined); } function __init__() { clientfield::register( "scriptmover", "ctf_flag_away", 1, 1, "int", &setCTFAway, !true, !true ); } function setCTFAway( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump ) { team = self.team; SetFlagAsAway( localClientNum, team, newVal ); self thread clearCTFAway( localClientNum, team ); } function clearCTFAway( localClientNum, team ) { self waittill( "entityshutdown" ); SetFlagAsAway( localClientNum, team, 0 ); }