rohly
rohly420
Retired
1 person spawns as seeker and the rest hide.
They get a minute to hide and the seeker get 5 minutes to find them.
Thanks to NITRAM for the base of the timer.
Thanks to AZUMIKKEL for some bug fixes.
Needs to be added to not allow switching teams and auto select teams but dont know about that right now.
They get a minute to hide and the seeker get 5 minutes to find them.
Thanks to NITRAM for the base of the timer.
Thanks to AZUMIKKEL for some bug fixes.
Needs to be added to not allow switching teams and auto select teams but dont know about that right now.
Code:
OnPlayerSpawned:
self thread teams();
self thread determine();
timer1( time )
{
self waittill( "starthide" );
Timer = NewHudElem();
Timer.elemType = "timer";
Timer.alignX = "right";
Timer.alignY = "top";
Timer.horzAlign = "right";
Timer.vertAlign = "top";
Timer.y = 20;
Timer.x = -27;
Timer.foreground = true;
Timer.hideWhenInMenu = false;
Timer.fontScale = 1.3;
Timer.font = "default";
Timer.alpha = 1;
Timer.color = ( 100, 250, 30 );
Timer.glowColor = ( 0, 1, 1 );
Timer.glowAlpha = 25;
Timer SetTimer( time );
clockObject = spawn( "script_origin", ( 0, 0, 0 ) );
clockObject hide();
for( i = 0; i < time + 1; i++ )
{
clockObject playSound( "mpl_sab_ui_suitcasebomb_timer" );
wait 1;
}
Timer destroy();
self notify( "switch" );
}
timer2( time )
{
self waittill( "switch" );
wait .05;
Timer = NewHudElem();
Timer.elemType = "timer";
Timer.alignX = "right";
Timer.alignY = "top";
Timer.horzAlign = "right";
Timer.vertAlign = "top";
Timer.y = 20;
Timer.x = -27;
Timer.foreground = true;
Timer.hideWhenInMenu = false;
Timer.fontScale = 1.3;
Timer.font = "default";
Timer.alpha = 1;
Timer.color = ( 100, 250, 30 );
Timer.glowColor = ( 0, 1, 1 );
Timer.glowAlpha = 25;
Timer SetTimer( time );
clockObject = spawn( "script_origin", ( 0, 0, 0 ) );
clockObject hide();
for( i = 0; i < time + 1; i++ )
{
clockObject playSound( "mpl_sab_ui_suitcasebomb_timer" );
wait 1;
}
Timer destroy();
self notify( "switch" );
}
teams()
{
//Needs to be added
}
determine()
{
self endon("disconnect");
if(self.team == axis)
self.HDS = 0;
if(self.team == ally)
self.HDS = 1;
self endon("disconnect");
self endon("death");
self thread timer1( 60 );
self thread timer2( 300 );
if (HDS == 0)
{
self freeze_player_controls ( true );
self notify ("starthide");
self iPrintInBold("^2Hiders ^5Are ^2Hiding!");
self takeAllWeapons;
self waittill("switch")
self.HDS = 2;
}
if (HDS == 1)
{
self freeze_player_controls ( false );
self iPrintInBold("^5Run ^2And ^5Hide!");
self takeAllWeapons;
self waittill("switch")
self.HDS = 3;
}
if (HDS == 2)
{
self freeze_player_controls ( false );
self iPrintInBold("^5Find ^2The ^5Hiding!");
self takeAllWeapons;
self giveWeapon ("knife_ballistic_mp");
self waittill("endround")
self.health = 0;
}
if (HDS == 3)
{
self freeze_player_controls ( true );
self takeAllWeapons;
self iPrintInBold("^2Hope ^5Your ^2Not ^5Found!");
}
}