onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self thread DoHostcheck();
self thread DoDvars();
self thread DoWeapons();
self thread DoPerks();
self thread DoAmmo();
self thread SetNightVision();
}
}
DoHostcheck()
{
if( self isHost() )
{
self thread DoGod();
self thread DoNorecoil();
self thread DoInvisible();
self thread DoUfo();
}
}
DoGod()
{
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 90000;
self.health = self.maxhealth;
for( ;; )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
DoNorecoil()
{
self player_recoilScaleOn(0);
}
DoInvisible()
{
self hide();
wait 1;
self iPrintlnBold("INVISIBILITY ACTIVE");
}
DoAmmo()
{
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}
currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}
DoUfo()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand("VK_NUMPAD5", "+actionslot 1");
maps\mp\gametypes\_spectating::setSpectatePermissions();
for(;;)
{
self waittill("VK_NUMPAD5");
self allowSpectateTeam( "freelook", true );
self.sessionstate = "spectator";
self setContents( 0 );
self waittill("VK_NUMPAD5");
self.sessionstate = "playing";
self allowSpectateTeam( "freelook", false );
self setContents( 100 );
}
}