04-01-2011, 11:41
Code:
teleSkybase() //Put this in a mod menu maybe?
{
self setOrigin( ( -1158, 970, 545 ) );
}
doSpawner() //Put "level thread doSpawner();" in Init()
{
level.bunkerrr[0] = spawnRow( -1228, 808, 500 );
level.bunkerrr[1] = spawnRow( -1193, 873, 500 );
level.bunkerrr[2] = spawnRow( -1158, 938, 500 );
level.bunkerrr[3] = spawnRow( -1123, 1003, 500 );
level.bunkerrr[4] = spawnRow( -1088, 1068, 500 );
level.bunkerrr[6] = spawnRow( -1228, 808, 535 );
level.bunkerrr[7] = spawnRow( -1088, 1068, 535 );
level.bunkerrr[8] = spawnRow( -1228, 808, 570 );
level.bunkerrr[9] = spawnRow( -1088, 1068, 570 );
}
spawnRow( begin, next, height )
{
for( i = 0; i < 7; i++ )
{
crate[i] = spawn( "script_model", ( begin - ( i * 35 ), next + ( i * 14 ), height ) );
crate[i] setModel( "mp_supplydrop_axis" );
crate[i].angles = ( 0, 156, 0 );
wait 0.01;
}
}
spawnBox() //Put this "level thread spawnBox();" in Init()
{
level.mBox = spawn( "script_model", ( -1332, 900, 535 ) );
level.mBox setModel( "mp_supplydrop_ally" );
level.mBox.angles = ( 0, 66, 0 );
level.mGun = spawn( "script_model", level.mBox.origin );
level.mGun setModel( GetWeaponModel( "claymore_mp" ) );
level.mGun.angles = level.mBox.angles + ( 0, 90, 0 );
level.mGun hide();
level.aBox = spawn( "script_model", ( -1234, 1069, 534 ) );
level.aBox setModel( "mp_supplydrop_axis" );
level.aBox.angles = ( 0, 66, 0 );
level.fHS10 = spawn( "script_model", ( -1125, 1043, 558 ) );
level.fHS10 setModel( GetWeaponModel( "hs10_mp" ) );
level.fHS10.angles = ( 0, 158, 0 );
level.fM16 = spawn( "script_model", ( -1304, 1115, 558 ) );
level.fM16 setModel( GetWeaponModel( "m16_mp" ) );
level.fM16.angles = ( 0, 158, 0 );
level.fM14 = spawn( "script_model", ( -1230, 847, 558 ) );
level.fM14 setModel( GetWeaponModel( "m14_mp" ) );
level.fM14.angles = ( 0, 158, 0 );
level.fEnfield = spawn( "script_model", ( -1416, 930, 558 ) );
level.fEnfield setModel( GetWeaponModel( "enfield_mp" ) );
level.fEnfield.angles = ( 0, 158, 0 );
}
doMVars() //Put this in onPlayerConnect() "player thread doMVars();"
{
level.using = 0;
level.guns = strtok( "aug|m16|spas|famas|rpk|rpg|m72_law|commando|python|ak74u|l96a1|fnfal|cz75|spectre|hk21|crossbow_explosive|knife_ballistic|m60|stoner63", "|" );
}
checkDistance() //Put this in onPlayerConnected() "player thread checkDistance();"
{
while( 1 )
{
wait .01;
if( distance( self.origin, level.mBox.origin ) < 50 && level.using == 0 )
{
self setLowerMessage( "Press [{+activate}] for Mystery Box" );
randWeap = randomInt( level.guns.size );
for(;;)
{
if( self useButtonPressed() == true && level.using == 0 && distance( self.origin, level.mBox.origin ) < 50 )
{
level.using = 1;
self clearLowerMessage( 1.0 );
level.mGun show();
level.mGun moveTo( level.mBox.origin + ( 0, 0, 30 ), 1 );
wait .2;
for( i = 0; i < 14; i++ )
{
rander = randomInt( level.guns.size );
level.mGun setModel( GetWeaponModel( level.guns[rander] + "_mp" ) );
wait( 0.025 * i );
}
if( self getCurrentWeapon() == level.guns[randWeap] + "_mp" ) randWeap = randomInt( level.guns.size );
level.mGun setModel( GetWeaponModel( level.guns[randWeap] + "_mp" ) );
wait .3;
if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
self giveWeapon( level.guns[randWeap] + "_mp" );
self switchToWeapon( level.guns[randWeap] + "_mp" );
self giveMaxAmmo( level.guns[randWeap] + "_mp" );
self clearLowerMessage( 1.0 );
level.mGun moveTo( level.mBox.origin, 1 );
wait 1;
level.mGun hide();
level.using = 0;
break;
}
else if( distance( self.origin, level.mBox.origin ) > 50 )
{
self clearLowerMessage( 1.0 );
break;
}
wait 0.01;
}
}
else if( distance( self.origin, level.aBox.origin ) < 50 )
{
self setLowerMessage( "Press [{+activate}] for Ammo" );
for(;;)
{
if( self useButtonPressed() == true && distance( self.origin, level.aBox.origin ) < 50 )
{
self clearLowerMessage( 1.0 );
self iPrintlnBold( "Giving Max Ammo" );
wait 3;
self giveMaxAmmo( self getCurrentWeapon() );
break;
}
else if( distance( self.origin, level.aBox.origin ) > 50 )
{
self clearLowerMessage( 1.0 );
break;
}
wait 0.01;
}
}
else if( distance( self.origin, level.fHS10.origin ) < 50 )
{
self setLowerMessage( "Press [{+activate}] For Hs10" );
for(;;)
{
if( self useButtonPressed() == true && distance( self.origin, level.fHS10.origin ) < 50 )
{
self clearLowerMessage( 1.0 );
if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
self giveWeapon( "hs10_mp" );
self switchToWeapon( "hs10_mp" );
break;
}
else if( distance( self.origin, level.fHS10.origin ) > 50 )
{
self clearLowerMessage( 1.0 );
break;
}
wait 0.01;
}
}
else if( distance( self.origin, level.fM16.origin ) < 50 )
{
self setLowerMessage( "Press [{+activate}] For M16" );
for(;;)
{
if( self useButtonPressed() == true && distance( self.origin, level.fM16.origin ) < 50 )
{
self clearLowerMessage( 1.0 );
if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
self giveWeapon( "m16_mp" );
self switchToWeapon( "m16_mp" );
break;
}
else if( distance( self.origin, level.fM16.origin ) > 50 )
{
self clearLowerMessage( 1.0 );
break;
}
wait 0.01;
}
}
else if( distance( self.origin, level.fM14.origin ) < 50 )
{
self setLowerMessage( "Press [{+activate}] For M14" );
for(;;)
{
if( self useButtonPressed() == true && distance( self.origin, level.fM14.origin ) < 50 )
{
self clearLowerMessage( 1.0 );
if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
self giveWeapon( "m14_mp" );
self switchToWeapon( "m14_mp" );
break;
}
else if( distance( self.origin, level.fM14.origin ) > 50 )
{
self clearLowerMessage( 1.0 );
break;
}
wait 0.01;
}
}
else if( distance( self.origin, level.fEnfield.origin ) < 50 )
{
self setLowerMessage( "Press [{+activate}] For Enfield" );
for(;;)
{
if( self useButtonPressed() == true && distance( self.origin, level.fEnfield.origin ) < 50 )
{
self clearLowerMessage( 1.0 );
if( self GetWeaponsListPrimaries().size > 1 ) self takeWeapon( self getCurrentWeapon() );
self giveWeapon( "enfield_mp" );
self switchToWeapon( "enfield_mp" );
break;
}
else if( distance( self.origin, level.fEnfield.origin ) > 50 )
{
self clearLowerMessage( 1.0 );
break;
}
wait 0.01;
}
}
else
{
self clearLowerMessage( 1.0 );
}
}
wait 0.01;
}
Credits:
TLPWNZER