Free Codes and Mods!!!


 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 MW3 Zombies

View previous topic View next topic Go down 
AuthorMessage
$pacebound
Admin
Admin
avatar

Posts : 69
Points : 203
Rep : 0
Join date : 2012-01-15
Age : 19
Location : Elm Street

PostSubject: MW3 Zombies   Sat Jan 21, 2012 11:53 am

Ok This Is MW3 Zombies The Code Is Already In

Code:
// Approved by Syntax Checker
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_wii_utility;

main()
{
level thread onPlayerConnect();
level thread PickZombies();
level thread globalVars();
level thread monitorLeftAlive();   
level thread spawnMapSpecificModels();

level.doPrematch = false;
level.teamBased = true;

level.onPlayerKilled = ::onPlayerKilled;
}

spawnMapSpecificModels()
{
switch( GetDvar( "mapname" ) )
{
case "mp_dome":
level thread addPerkBox( ( 406, -431, -370 ), ( 450, 1002, 78 ), "waypoint_capture_flag", "Overkill", ::ThreePrimaries );
break;
default:
break;
}
}

onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

player thread onPlayerSpawned();
player thread setupMatch();
player thread onPlayerDamage();
player thread playerVars();
}
}

onPlayerDamage()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "damage", damage, attacker, direction_vec, point, meansOfDeath, modelName, tagName, partName, iDFlags, weapon );

if( attacker.isInfected == false && attacker.pers["team"] == "allies" )
{
if( self.isInfected == true && self.pers["team"] == "axis" ) attacker thread addMoney( damage * level.cash_multiplier );
}
}
}

onPlayerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
if( level.gameHasBegun == true )
{
if( self.pers["team"] == "allies" && self.isInfected == false && sMeansOfDeath != "MOD_SUICIDE" ) self thread changeToZombie();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "spawned_player" );

self thread LoopVision();

if( self.pers["team"] == "allies" )
{
if( self.isInfected == true )
{
self maps\mp\gametypes\_menus::addToTeam( "axis" );
}
else if( self.isInfected == false )
{
self thread setHumanDetails();
}
}
else if( self.pers["team"] == "axis" )
{
if( self.isInfected == true )
{
self thread setZombieDetails();
}
else if( self.isInfected == false )
{
self maps\mp\gametypes\_menus::addToTeam( "allies" );
}
}
}
}

LoopVision()
{
for( i = 0; i < 10; i++ )
{
self VisionSetNakedForPlayer( level.Vision, 1 );
wait 1;
}
}

setupMatch()
{
if( self.pers["team"] == "allies" ) wait 0.01;
else if( self.pers["team"] != "allies" )
{
self maps\mp\gametypes\_menus::addToTeam( "allies" );
}
self.isInfected = false;
}

globalVars()
{
level.gameHasBegun = false;
level.gameHasEnded = false;
level.Seconds = 0;
level.Minutes = 0;
level.zombies = 0;
level.cash_multiplier = 1;
level.mysteryBoxOrigins = [];
level.mysteryBoxAngles = [];
level.mysteryBoxLimit = 5;
level.Vision = "mpnuke";

setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 );
setDvar( "scr_game_hardpoints", 0 );
setDvar( "scr_game_killstreaks", 0 );

level thread addMysteryBoxOrigins( "mp_dome", ( 67, -354, -375 ), ( 608, 837, -297 ), ( -188, 2116, -275 ) );
level thread addMysteryBoxAngles( "mp_dome", ( 0, 21, 0 ), ( 0, -8, 0 ), ( 0, 266, 0 ) );

level thread SpawnBox();
}

playerVars()
{
self.AllowedGuns = 2;
self.cash = 5000;

self.CashDisplay = self createFontString( "objective", 1.75 );
self.CashDisplay setPoint( "LEFT", "CENTER", -260, -85 );
self.CashDisplay setText( "Cash: " + self.cash );
}

addMoney( points )
{
self endon( "disconnect" );

self.cash = self.cash + points;
self.CashDisplay setText( "Cash: " + self.cash );
hud_score = NewClientHudElem( self );
hud_score.alpha = 0;
hud_score.font = "objective";
hud_score.fontscale = 1.9;
hud_score.x = 550;
hud_score.y = 300;
if( points >= 0 ) hud_score.color = ( 1, 1, 0 );
else if( points < 0 ) hud_score.color = ( 1, 0, 0 );
hud_score.alignX = "right";
hud_score.alignY = "middle";
hud_score.horzAlign = "fullscreen";
hud_score.vertAlign = "fullscreen";
hud_score setText( points );
hud_score ClearAllTextAfterHudelem();
direction = randomint( 340 );
hud_score FadeOverTime( .5 );
hud_score.alpha = 1;
hud_score MoveOverTime( 10 );
hud_score.x = cos( direction ) * randomint( 250 );
hud_score.y = sin( direction ) * randomint( 250 );
wait 1.3;
hud_score FadeOverTime( .3 );
hud_score.alpha = 0;
wait .3;
hud_score destroy();
}

monitorLeftAlive()
{
for(;;)
{
wait 0.01;

if( level.gameHasBegun == true && level.zombies >= level.players.size )
{
level notify( "game_ended" );
VisionSetNaked( "mpintro", 1 );
foreach( player in level.players ) player freezeControls( true );
foreach( Queer in level.players ) Queer thread maps\mp\gametypes\_hud_message::hintMessage( "Humans survived " + level.Minutes + " Minutes and " + level.Seconds + " Seconds" );
wait 10;
Map_Restart( false );
}
}
}   

monitorTimer()
{
level endon( "game_ended" );

for(;;)
{
for( i = 0; i < 61; i++ )
{
level.Seconds++;
if( level.Seconds == 60 )
{
level.Seconds = 0;
level.Minutes++;
}
wait 1;
}
}
}

PickZombies()
{
ZombieText = createServerFontString( "extrabig", 2 );
ZombieText setPoint( "CENTER", "TOP", 0, 0 );
ZombieText.glow = 1;
ZombieText.glowColor = ( 1, 0, 0 );
ZombieText.glowAlpha = 0.6;
ZombieText.sort = 1111;
ZombieText setText( "Zombies being picked in:" );

ZombieTimer = createServerFontString( "extrabig", 2 );
ZombieTimer setPoint( "CENTER", "TOP", 0, 40 );
ZombieTimer.sort = 1111;
ZombieTimer maps\mp\gametypes\_hud::fontPulseInit();

for( i = 60; i > -1; i-- )
{
ZombieTimer setValue( i );
ZombieTimer thread maps\mp\gametypes\_hud::fontPulse( level );
wait 1;
}

ZombieTimer fadeOverTime( 1 );
ZombieText fadeOverTime( 1 );

ZombieTimer.alpha = 0;
ZombieText.alpha = 0;

wait 1;

ZombieTimer destroyElem();
ZombieText destroyElem();

players = level.players.size;

Zombies = 0;
if( players <= 5 ) Zombies = 1;
else if( players <= 10 ) Zombies = 2;

Random[0] = RandomInt( players );
Random[1] = RandomInt( players );

if( players > 1 )
{
for(;;)
{
Random[1] = RandomInt( players );
if( Random[0] == Random[1] ) wait 0.01;
else if( Random[0] != Random[1] ) break;
}
}


Zombie = [];
Zombie[0] = level.players[Random[0]];
Zombie[1] = level.players[Random[1]];
for( i = 0; i < Zombie.size; i++ ) Zombie[i] thread changeToZombie();

level thread monitorTimer();
setExpFog( 400, 500, 0, 0, 0, 1 );

wait 0.1;
for( i = 0; i < Zombies; i++ ) iPrintlnBold( "^1" + Zombie[i].name + " Has Been Infected!" );
level.gameHasBegun = true;

level.Vision = "mpnuke_aftermath";
foreach( player in level.players ) player VisionSetNakedForPlayer( "mpnuke_aftermath", 1 );
}

changeToZombie()
{
self.isInfected = true;
self maps\mp\gametypes\_menus::addToTeam( "axis" );
self suicide();
level.zombies++;
if( level.gameHasBegun == true ) iPrintlnBold( self.name + " ^2Has Been Infected!" );
}

setZombieDetails()
{
self ThermalVisionOn();

self takeAllweapons();
self GiveWeapon( "iw5_mp412_mp_tactical" );
self SwitchToWeapon( "iw5_mp412_mp_tactical" );
self setWeaponAmmoClip( "iw5_mp412_mp_tactical", 0 );
self setWeaponAmmoStock( "iw5_mp412_mp_tactical", 0 );

self.moveSpeedScaler = 1.2;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale() ;
}

setHumanDetails()
{
self ThermalVisionOff();

self takeAllweapons();
self GiveWeapon( "iw5_ump45_mp" );
self SwitchToWeapon( "iw5_ump45_mp" );

self.moveSpeedScaler = 1;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale() ;
}

addMysteryBoxOrigins( Map, o1, o2, o3, o4, o5 )
{
if( isDefined( o1 ) ) level.mysteryBoxOrigins[Map][0] = o1;
if( isDefined( o2 ) ) level.mysteryBoxOrigins[Map][1] = o2;
if( isDefined( o3 ) ) level.mysteryBoxOrigins[Map][2] = o3;
if( isDefined( o4 ) ) level.mysteryBoxOrigins[Map][3] = o4;
if( isDefined( o5 ) ) level.mysteryBoxOrigins[Map][4] = o5;
}

addMysteryBoxAngles( Map, a1, a2, a3, a4, a5 )
{
if( isDefined( a1 ) ) level.mysteryBoxAngles[Map][0] = a1;
if( isDefined( a2 ) ) level.mysteryBoxAngles[Map][1] = a2;
if( isDefined( a3 ) ) level.mysteryBoxAngles[Map][2] = a3;
if( isDefined( a4 ) ) level.mysteryBoxAngles[Map][3] = a4;
if( isDefined( a5 ) ) level.mysteryBoxAngles[Map][4] = a5;
}

SpawnBox()
{
Map = GetDvar( "mapname" );

Random = randomInt( level.mysteryBoxOrigins[Map].size );
Origin = level.mysteryBoxOrigins[Map][Random];
Angle = level.mysteryBoxAngles[Map][Random];

Box = spawn( "script_model", Origin );
Box SetModel( "com_plasticcase_friendly" );
Box.angles = Angle;
Box CloneBrushmodelToScriptmodel( level.airDropCrateCollision );

objective_add( 0, "active", Origin );
objective_icon( 0, "compass_objpoint_trap_friendly" );

Box.currentOrigin = Origin;

Box thread monitorDistance();
}

monitorDistance()
{
self.isUsing = false;
Num = RandomInt( 1000 );
Uses = 0;

for(;;)
{
wait 0.05;

foreach( player in level.players )
{
if( Distance( player.origin, self.origin ) < 50 && self.isUsing == false && player.isInfected == false && player.pers["team"] == "allies" )
{
player setLowerMessage( Num, "Press and Hold [{+activate}] to use Mystery Box" );

if( player UseButtonPressed() && self.isUsing == false && player.isInfected == false && player.pers["team"] == "allies" ) wait 0.2;
if( player UseButtonPressed() && self.isUsing == false && player.isInfected == false && player.pers["team"] == "allies" )
{
if( player.cash >= 950 )
{
Uses++;

self.isUsing = true;
player addMoney( -950 );
player clearLowerMessage( Num );

Gun = spawn( "script_model", self.origin );
Gun SetModel( "" );
Gun.angles = self.angles + ( 0, 180, 0 );

Gun moveTo( self.origin + ( 0, 0, 30 ), 2 );

Random = 0;
Weapon = 0;

for( i = 0; i < 15; i++ )
{
Random = randomInt( level.weaponList.size );
Weapon = level.weaponList[Random];
Gun SetModel( GetWeaponModel( Weapon ) );
wait( 0.025 * i );
}

if( Uses == level.mysteryBoxLimit )
{
Gun SetModel( "prop_suitcase_bomb" );
wait 3;
Gun Delete();
Gun Destroy();
self thread moveToNewLocation();
Uses = 0;
}   
else if( Uses != level.mysteryBoxLimit )
{
self thread monitorPickupWeapon( Gun, Weapon, player );
self waittill( "end_box" );

Gun MoveTo( self.origin, 0.5 );
wait 0.5;
Gun Delete();
Gun Destroy();
}
self.isUsing = false;
}
else if( player.cash < 950 ) player iPrintlnBold( "^1Not Enough Money" );
}
}
else player clearLowerMessage( Num );
}
}
}

monitorTimeout( Box, Num, Player )
{
Box endon( "end_box" );

self moveTo( Box.origin, 15 );
wait 13;
Player clearLowerMessage( Num );

Box notify( "end_box" );
}

monitorPickupWeapon( Gun, Weapon, Player )
{
self endon( "end_box" );

Num = randomInt( 1000 );
Gun thread monitorTimeout( self, Num, Player );

for(;;)
{
wait 0.05;

if( distance( self.origin, Player.origin ) < 50 )
{
Player setLowerMessage( Num, "Press and Hold [{+activate}] to trade weapons" );

if( Player UseButtonPressed() ) wait 0.2;
if( Player UseButtonPressed() )
{
Player clearLowerMessage( Num, 1 );

if( Player GetWeaponsListPrimaries().size > Player.AllowedGuns - 1 ) Player takeWeapon( Player getCurrentWeapon() );
Player GiveWeapon( Weapon );
Player SwitchToWeapon( Weapon );
Player GiveMaxAmmo( Weapon );

self notify( "end_box" );
}
}
else Player clearLowerMessage( Num );
}
}

moveToNewLocation()
{
Map = GetDvar( "mapname" );

Random = randomInt( level.mysteryBoxOrigins[Map].size );
Origin = level.mysteryBoxOrigins[Map][Random];
Angle = level.mysteryBoxAngles[Map][Random];

if( self.currentOrigin == Origin ) self thread moveToNewLocation();
else if( self.currentOrigin != Origin )
{
self moveTo( self.origin + ( 0, 0, 500 ), 5 );
wait 5;
self moveTo( Origin + ( 0, 0, 500 ), 8 );
wait 8;
self moveTo( Origin, 5 );
self rotateTo( Angle, 5 );
wait 5;
self.currentOrigin = Origin;
objective_position( 0, self.origin );
}
}

addPerkBox( origin, angle, shader, name, function )
{
Box = spawn( "script_model", origin );
Box.angles = angle;
Box setModel( "com_plasticcase_friendly" );
Box CloneBrushmodelToScriptmodel( level.airDropCrateCollision );

Box.name = name;
Box.func = function;

Box thread monitorDistancePerks();

iconOrg = origin;
icon = newTeamHudElem( "allies" );
icon.x = iconOrg[0];
icon.y = iconOrg[1];
icon.z = iconOrg[2] + 30;
icon.alpha = .89;
icon.archived = true;
icon setShader( shader, 16, 16 );
icon setWayPoint( true, shader );
}

monitorDistancePerks()
{
Num = randomInt( 1000 );

for(;;)
{
wait 0.05;

foreach( player in level.players )
{
if( distance( self.origin, player.origin ) < 75 )
{
player setLowerMessage( Num, "Press and Hold [{+activate}] for " + self.name );

if( player UseButtonPressed() && player.isInfected == false && player.pers["team"] == "allies" ) wait 0.2;
if( player UseButtonPressed() && player.isInfected == false && player.pers["team"] == "allies" )
{
if( player.cash >= 500 )
{
player addMoney( -500 );
player clearLowerMessage( Num );

player thread [[self.func]]();
player iPrintln( "You just purchased " + self.name );
}
else self iPrintln( "^1Not enough cash" );
}
}
else player clearLowerMessage( Num );
}
}
}

ThreePrimaries()
{
self.AllowedGuns = 3;
}

Pwnzers Menu http://www.mediafire.com/?0ddzi8g8fj0ni8y
Back to top Go down
View user profile http://goodcodes.forumotion.com
 
MW3 Zombies
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Zombies- Specifics, Likelihood, and Do We Even Want 'Em?
» Nazi Zombies Parody
» Gay Zombies
» All Zombies Must Die! now on XBL Arcade
» GOW: Judgment ZOMBIES!!!

Permissions in this forum:You cannot reply to topics in this forum
Free Codes and Mods!!! :: Wii Section :: Mods-
Jump to: