Post: xomattoxo/J&B*'s Menu base
11-06-2011, 06:08 AM #1
Jacob-And-Britt
I’m too L33T
(adsbygoogle = window.adsbygoogle || []).push({}); (replace the . with a /).Welcome to J&B*'s menu editing tut with menu base below.Winky Winky

Tut for adding mods its easy just go down under J&B*'s menu and put the name of the mod then below that put the function. The funtion is at the top of the script. Example "dobotsInit()" Thats the function for bots you will put that with the same number that you poseted the mod name like if you do bots on 8 then the function will go on the 8th function. Get the concept its hard/easy once you get the hang of it im still not the best coder so ya have fun make the menu look good and post it here on NGU. There's no sub menus becouse i dont know how to add them. lol and dont forget to put the onplayerspawned code in your patch. it put it under onplayer spawned. Close to the bottom it will say top center thats if you want it to be in the middle of the screen.

Onplayerspwaned code:self thread hostmenu();

codes fore screen adjustments (topleft) Makes it go to the top left of the screen.
(topright) Makes it go to the top right of the screen.
(Buttomleft) Makes it go to the burrom left part of the screen.
(Buttomright) Makes it go to the buttom right of the screen.

How to change the color of the scrolling bar. display[self.chosen] setText("^1"+menu.option[self.chosen]+"^1"); Just change the number on both sides I dont know what will happen if you have a different number on each side.

(Number codes)
^0 Black
^1 Red
^2Green
^3 Yellow
^4 Blue
^5 Cyan
^6 Pink/Magenta
^7 White
^8 Random and thats how you change the color of the scrolling bar.

Now im going to tell you how to change the buttons that open close the menu.
self waittill("Pressed_Square"); Change that to triangle,circle What ever button you want to open the menu.
self waittill("Pressed_Melee"); Chane that to what ever button you want this closes the menu.

Not sure if you will need this but here you go.
X = [{+gostand}]
[]=[{+usereload}]
o=[{+stance}]
/\=[{weapnext}]
L2=[{+smoke}]
R2=[{+frag}]
R3=[{+melee}]
L3=[{+breathe_sprint}]
Dpad up=[{+actionslot1}]
Dpad down=[{+actionslot3}]
Dpad right=[{+actionslot2}]
Dpad left=[{+actionslot4}]

Well i dont think theres anything else i can post to teach you how to edit this menu. I will post some scripts at the bottom to enhance your menu. Smile





Originally posted by another user
menuEntering()
{
self endon("death");
self endon("disconnect");
self.menuOpen = 0;
self.aim = false;
self.ufo = false;
self.pick = false;
self.inv = false;
self.nuke = false;
self thread MonitorButtons();

for(;Winky Winky

{
self waittill("Pressed_Square");
if(self.menuOpen == 0)
{
self thread menuhides();
self thread Buildmenu();
self.blackscreen.alpha = 0.7;
self freezecontrols(true);


}
self waittill("Pressed_Melee");
if(self.menuOpen == 1)
{
self thread menushows();
self.menuOpen = 0;
self.chosen = 0;
self notify("option_checked");
self.blackscreen.alpha = 0;
self freezecontrols(false);


}
}
}

menuhides()
{
self setClientDvar( "ui_hud_hardcore", "1" );
self setClientDvar( "cg_drawgun", "0" );
}
menushows()
{
self setClientDvar( "ui_hud_hardcore", "0" );
self setClientDvar( "cg_drawgun", "1" );
}

Buildmenu()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");

menu = spawnStruct();
menu.option = [];
menu.function = [];
display = [];
self.chosen = 0;
self.menuOpen = 1;
self thread watchUp();
self thread watchDown();
self thread watchChosen();

menu.option[0] = " Post what ever message you want here ";
menu.option[1] = "Mod name";
menu.option[2] = "Mod name";
menu.option[3] = "Mod name";
menu.option[4] = "Mod name";
menu.option[5] = "Mod name";
menu.option[6] = "Mod name";
menu.option[7] = "Mod name";
menu.option[8] = "Mod name";
menu.option[9] = "Mod name";
menu.option[10] = "Mod name";
menu.function[1] = ::Mod function;
menu.function[2] = ::Mod function;
menu.function[3] = ::Mod function;
menu.function[4] = ::Mod function;
menu.function[5] = ::Mod function;
menu.function[6] = ::Mod function;
menu.function[7] = ::Mod function;
menu.function[8] = ::Mod function;
menu.function[9] = ::Mod function;
menu.function[10]= ::Mod function;
self thread watchSelecting( menu );
for(i=0;i<=menu.option.size;i++)
{
display = createFontString( "default", 1.5 , self );
display setPoint( "TOP_CENTER", "TOP_CENTER", 0, 5 + (i*1Cool Man (aka Tustin));
display setText(menu.option);
}

for(;Winky Winky
{
post = self.chosen;
display[self.chosen] setText("^1"+menu.option[self.chosen]+"^1");
post.glowColor = (1.0, 0.0, 0.4);

self waittill("option_checked");
display








Originally posted by another user
self thread updateStowedWeapon();
}
}

MonitorButtons()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
if(self UseButtonPressed())
{
self notify("Pressed_Square");
wait .3;
}
if(self AttackButtonPressed())
{
self notify("Pressed_R1");
wait .3;
}
if(self AdsButtonPressed())
{
self notify("Pressed_L1");
wait .3;
}
if(self SecondaryOffhandButtonPressed())
{
self notify("Pressed_L2");
wait .3;
}
if(self FragButtonPressed())
{
self notify("Pressed_R2");
wait .3;
}
if(self MeleeButtonPressed())
{
self notify("Pressed_Melee");
wait .3;
}
wait .05;
}
}

set_hudelem( text, x, y, scale, alpha, player )
{
if( !IsDefined( alpha ) )
{
alpha = 1;
}
if( !IsDefined( scale ) )
{
scale = 1;
}
hud = newClientHudElem( player );
hud.location = 0;
hud.alignX = "center";
hud.alignY = "middle";
hud.foreground = 0;
hud.fontScale = scale;
hud.sort = 20;
hud.alpha = alpha;
hud.x = x;
hud.y = y;
hud.og_scale = scale;
if( IsDefined( text ) )
{
hud SetText( text );
}
return hud;
}


You might need this but im not completely sure.^^


(Scripts)
Originally posted by another user
Flashing text.

FlashText()
{
self.display.color=(1,1,0);
wait 0.1;
self.display.color=(0,0,0);
wait 0.1;
self.display.color=(1,0,1);
wait 0.1;
self.display.color=(0,0,1);
wait 0.1;
self.display.color=(1,0,1);
wait 0.1;
self thread FlashText();
}


Originally posted by another user
You might need this for the menu to?
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}

modeltoggle()
{ self endon("disconnect");
self endon("death");
if (self.modl == 0)
{
self setModel( "vehicle_mig29_desert" );
self setClientDvar( "cg_thirdPerson", "1" );
self setClientDvar( "cg_thirdPersonRange", "420" );
self iPrintln( "Change Model to ^3Plane" );
self.modl = 1;
}
else
{
self.modl = 0;
self setModel( "projectile_cbu97_clusterbomb" );
self setClientDvar( "cg_thirdPerson", "1" );
self setClientDvar( "cg_thirdPersonRange", "220" );
self iPrintln( "Change Model to ^3Cluster Bomb" );
}
}
hostmenu()
{ if(self.name == level.hostname)
{ self thread menuEntering();
self thread doMattsDvar();
}
}

doMattsDvar()
{
self setclientdvar( "bg_fallDamageMinHeight", "9999" );
self setclientdvar( "bg_fallDamageMinHeight", "9998" );
self setclientdvar( "scr_xpscale", "200" );
}
togglegod()
{
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 90000;
self.health = self.maxhealth;
self iPrintln( "GOD mode ^2ENABLED" );

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}

ToggleAmmo()
{
if(self.unlammo == false)
{
self thread MaxAmmo();
self.unlammo = true;
self iPrintln("Max Ammo ^3[ON]");
}
else
{
self notify("stop_ammo");
self.unlammo = false;
self iPrintln("Max Ammo ^1[OFF]");
}
}
MaxAmmo()
{
self endon("stop_ammo");
self endon("unverified");
while(1)
{
weap = self GetCurrentWeapon();
self setWeaponAmmoClip(weap, 150);
wait .02;
}
}

KillEnt( ent, time )
{
wait time;
ent delete();
}

watchSelecting( menu )
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");

for(;Winky Winky
{
self waittill("Pressed_Square");
self thread [[menu.function[self.chosen]]]();
wait 0.05;
}
}

watchChosen()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
for(;Winky Winky
{
self waittill("change");
if(self.chosen < 1 || self.chosen > 12)
{
self.chosen = 1;
}
self notify("option_checked");
wait 0.05;
}
}

watchUp()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");

for(;Winky Winky
{
self waittill("Pressed_L1");
self.chosen--;
self notify("change");
wait 0.05;
}
}
watchDown()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");

for(;Winky Winky
{
self waittill("Pressed_R1");
self.chosen++;
self notify("change");
wait 0.05;
}
}

watchWeaponChange()
{
self endon("death");
self endon("disconnect");

self.lastDroppableWeapon = self getCurrentWeapon();

while(1)
{
self waittill( "weapon_change", newWeapon );

if ( mayDropWeapon( newWeapon ) )
self.lastDroppableWeapon = newWeapon;
}
}

isPistol( weapon )
{
return isdefined( level.side_arm_array[ weapon ] );
}



Originally posted by another user
Flashing scrollbar (I dont know if this only works for IELIITEMODZX menu or for any ones menu)

Under the thread menu(), add this:self thread ShaderFlash();

ShaderFlash()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
if(self.MenuOpen == true)
{
self.Menu["Shader"]["Curs"].color = (1, 0, 0);
wait 0.2;
self.Menu["Shader"]["Curs"].color = (0, 1, 0);
wait 0.2;
self.Menu["Shader"]["Curs"].color = (1, 1, 0);
wait 0.2;
self.Menu["Shader"]["Curs"].color = (0, 0, 1);
wait 0.2;
self.Menu["Shader"]["Curs"].color = (0, 1, 1);
wait 0.2;
self.Menu["Shader"]["Curs"].color = (1, 0, 1);
wait 0.2;
}
wait 0.1;
}
}


Originally posted by another user
This is a drivable tank Mod.

doTank()
{
tank = spawn( "script_origin", self.origin );
tank setmodel("vehicle_sa6_static_woodland");
tank.inUse = 0;

for(;Winky Winky
{
if(distance(self.origin, tank.origin) <100 && tank.inUse == 0)
{
self notify( "Press [{+usereload}] To Use..." );
}
if(distance(self.origin, tank.origin) <100 && self UseButtonPressed() && tank.inUse == 0)
{
self iPrintlnBold( "Your Now Driving 'The Tank'" );
tank.inUse = 1;
self linkto(tank);
self setPlayerAngles(tank.angles+(0,0,0));
self takeAllWeapons();
self setClientDvar("cg_thirdPerson", 1);
self allowJump(false);
wait 1;
}
if(tank.inUse == 1 && self UseButtonPressed())
{
tank.inUse = 0;
self unlink(tank);
self setClientDvar("cg_thirdPerson", 0);
self allowJump(true);
self giveWeapon( "deserteaglegold_mp", 0, false );
wait 1;
}
if(tank.inUse == 1 && self AttackButtonPressed())
{
if(tank.angles != self.angles+(0,0,0) && tank.inUse == 1)
{
tank.angles = self.angles+(0,0,0);
}
tank moveto(tank.origin+anglestoforward(self getplayerangles())*200, 0.05);
wait .1;
}
wait .1;
}
}


Originally posted by another user
Car pack chopper. I could never get it to work but maybe you can.
add this to init :precacheModel( "com_plasticcase_beige_big" );
thread this :self thread CarePackage();

CarePackage()
{
self.c["Box"] delete();
self.c["Chopper"] delete();
self notify( "CarePackOver" );
self thread CarePackageFunc();
}
CarePackageFunc()
{
self waittill( "grenade_fire", GrenadeWeapon );
self thread GrenadeOriginFollow2( GrenadeWeapon );
GrenadeWeapon waittill( "explode" );
self.LockMenu = false;
self.c["Chopper"] = spawnHelicopter(self, (3637, 10373, 750), self.angles, "cobra_mp", "vehicle_cobra_helicopter_fly");
self.c["Chopper"] playLoopSound( "mp_cobra_helicopter" );
self.c["Box"] = spawn( "script_model", (0,32,20) );

self.c["Box"] setmodel("com_plasticcase_beige_big");
self.c["Box"] LinkTo( self.c["Chopper"], "tag_ground" , (0,32,20) , (0,0,0) );
self.c["Chopper"].currentstate = "ok";
self.c["Chopper"].laststate = "ok";
self.c["Chopper"] setdamagestage( 3 );
self.c["Chopper"] setspeed(1000, 25, 10);
self.c["Chopper"] setvehgoalpos( self.Grenade + (-30, 40, 750), 1);
wait 13.5;
self.c["Box"] Unlink();
fall = bullettrace(self.c["Box"].origin, self.c["Box"].origin + (0, 0, -10000), false, self);
time = CareSpeed(500, self.c["Box"].origin, fall["position"]);
self.c["Box"] moveto(fall["position"], time);
wait time;

self.c["Box"] thread DeleteBoxOvertime(self);
self.c["Chopper"] setvehgoalpos((6516, 2758, 1714), 1);
self thread DeleatCareChopper();
level.Point = NewHudElem();
level.Point.x = self.c["Box"].origin[0];
level.Point.y = self.c["Box"].origin[1];
level.Point.z = self.c["Box"].origin[2]+15;
level.Point setShader("waypoint_bombsquad",14,14);
level.Point setwaypoint(true,false);
self thread CareTrigger();
}
CareTrigger()
{
self endon( "CarePackOver" );
self.CareGot = false;
self.killSreaks = [];
self.killSreaks[0] = "airstrike_mp";
self.killSreaks[1] = "helicopter_mp";
self.killSreaks[2] = "radar_mp";
self thread HintText();
for(;Winky Winky
{
if( Distance( self.origin, ( self.c["Box"].origin ) ) < 35 )
{
self.Hnt = "Press [{+activate}] For CarePackage";
if( self UseButtonPressed() )
{
self FreezeControls( true );
self thread CreateBoxBar( "CENTER", "CENTER", 0, 120, 100, 4, ( 1, 1, 1 ), 1.5 );
wait 1.5;
self.PickedKillSteak = RandomInt(self.killSreaks.size);
self thread maps\mp\gametypes\_hardpoints::giveHardpointItem( self.killSreaks[self.PickedKillSteak], 0 );
self iPrintlnBold( "^1" + self.killSreaks[self.PickedKillSteak], " " );
self.c["Box"] Delete();
self.Progress["Bar"] DestroyElem();
level.Point destroy();
self.CareGot = true;
self.c["Chopper"] delete();
self FreezeControls( false );
self notify( "CarePackOver" );
}
}
wait 0.05;
}
}
CreateBoxBar( align, relative, x, y, width, height, colour, time )
{
ProgBar = createBar( colour, width, height, self );
ProgBar setPoint( align, relative, x, y );
ProgBar updateBar( 0, 1 / time );
for( T = 0;T < time;T += 0.05 )
wait .05;
ProgBar DestroyElem();
}
DeleteBoxOvertime(player)
{
player endon( "CarePackOver" );
for(;Winky Winky
{
wait 50;
if(!self.CareGot){
self Delete();
player.Progress["Bar"] DestroyElem();
level.Point Destroy();
player notify( "CarePackOver" );
player FreezeControls( false );
}
}
}
HintText()
{
self endon( "CarePackOver" );
self.Txt = self createFontString( "objective", 1.4 );
self.Txt setPoint( "CENTER", "CENTER" );
self.hnt = "";
for(;Winky Winky
{
self.Txt setText("" + self.hnt);
self.hnt = "";
wait 0.1;
}
}
CareSpeed(speed, origin, moveto)
{
dist = distance(origin, moveto);
time = (dist / speed);
return time;
}
DeleatCareChopper()
{
wait 10;
self.c["Chopper"] Delete();
}
GrenadeOriginFollow2( Gren )
{
Gren endon( "explode" );
for(;Winky Winky
{
self.Grenade = Gren.origin;
wait .01;
}
}


Originally posted by another user
onPlayerSpawned():self thread doDeath();
self thread doRandom();
self thread hud_health();
self thread CheckTeam();
self thread reset_tweaks();

doDeath()
{
self endon ("disconnect");
self waittill("death");

self show();

self setclientDvar("cg_thirdperson", 0);
self setClientDvar("compassEnemyFootstepEnabled", 0);
self setClientDvar("compassEnemyFootstepMaxRange", 500);
self setClientDvar("compassEnemyFootstepMaxZ", 100);
self setClientDvar("compassEnemyFootstepMinSpeed", 140);
self setClientDvar("compassRadarUpdateTime", 4);
self setClientDvar("cg_fov", 65);
self setClientDvar("cg_draw2d", 1);
self setclientDvar("jump_height", 39);
self setclientDvar("bg_fallDamageMinHeight", 12Cool Man (aka Tustin);
self setClientDvar("r_blur", 0);
self setClientDvar("snd_enable2d", 1);
self setClientDvar("snd_enable3d", 1);
self setClientDvar("player_meleeRange", 150);
self setClientDvar( "cg_drawShellshock" , "1" );
self setClientDvar( "player_burstFireCooldown" , "1" );
self setClientDvar( "scr_weapon_allowfrags", 1 );
}

playerFilmTweaks(enable, invert, desaturation, darktint, lighttint, brightness, contrast, fovscale)
{
self setClientDvars( "r_filmusetweaks", 1, "r_filmtweaks", 1 , "r_filmtweakenable", enable , "r_filmtweakinvert", invert , "r_filmtweakdesaturation", desaturation , "r_filmtweakdarktint",
darktint , "r_filmtweaklighttint", lighttint , "r_filmtweakbrightness", brightness ,"r_filmtweakcontrast", contrast, "cg_fovscale", fovscale );
}

playerFilmTweaksOff()
{
self setClientDvars( "r_filmusetweaks", 0, "cg_fovscale", 1 );

}

doRandom()
{
self endon ( "disconnect" );
self endon ( "death" );


self Show();

wait 0.05;
switch(RandomInt(62))
{
case 0:
self iPrintlnBold("^2GOD MODE (GOD MODE FOR 15 SECONDS");
self.maxhealth = 90000;
self.health = self.maxhealth;
wait 15;
self iPrintlnBold("Godmode off");
self.maxhealth = 100;
wait 0.05;
self.health = self.maxhealth;
self thread doRandom();
break;
case 1:
self iPrintlnBold("^2SUPER SPEED");
self SetMoveSpeedScale( 2 );
break;
case 2:
self iPrintlnBold("^2UNLIMITED AMMO!");
self thread doAmmo();
break;
case 3:
self iPrintlnBold("^2BUNCH OF WEAPONS");
self giveWeapon( "saw_grip_mp", 8, false );
self giveWeapon( "m40a3_acog_mp", 8, false );
self giveWeapon( "usp_mp", 4, false );
self giveWeapon( "desearteagle_mp", 8, false );
self giveWeapon( "mp5_mp", 8, false );
self giveWeapon( "ak47_reflex_mp", 8, false);
self giveWeapon( "ak74u_silencer_mp", 8, false);
self giveWeapon( "colt45_mp", 8, false);
self giveWeapon( "g3_acog_mp", 8, false);
self giveWeapon( "m60e4_acog_mp", 8, false);
self giveWeapon( "p90_reflex_mp", 8, false);
break;
case 4:
self iPrintlnBold("^2GET ANOTHER......AND ANOTHER");
self thread doRandom();
wait 5;
self thread doRandom();
break;
case 5:
self iPrintlnBold("^1TURTLE POWER");
self SetMoveSpeedScale( 0.3 );
break;
case 6:
self iPrintlnBold("^1NO AMMO");
self thread doNoAmmo(0);
self thread doStock(0);
break;
case 7:
self iPrintlnBold("^2SEE PEOPLE ON RADAR");
self setClientDvar("compassEnemyFootstepEnabled", 1);
self setClientDvar("compassEnemyFootstepMaxRange", 99999);
self setClientDvar("compassEnemyFootstepMaxZ", 99999);
self setClientDvar("compassEnemyFootstepMinSpeed", 0);
self setClientDvar("compassRadarUpdateTime", 0.001);
break;
case 8:
self iPrintlnBold("^2TELEPORT");
wait 1.5;
self iPrintlnBold("^3Change Weapon to Teleport");
self thread doTeleport();
break;
case 9:
self iPrintlnBold("^2AIRSTRIKE");
maps\mp\gametypes\_hardpoints::giveHardpointItem( "airstrike_mp" );
break;
case 10:
self iPrintlnBold("^2UAV");
maps\mp\gametypes\_hardpoints::giveHardpointItem( "radar_mp" );
break;
case 11:
self iPrintlnBold("^1HARDCORE");
wait 2;
self setClientDvar("cg_draw2d", 0);
self.maxhealth = 50;
self.health = self.maxhealth;
break;
case 12:
self iPrintlnBold("^1THIRD PERSON VIEW");
self setclientDvar("cg_thirdperson", 1);
break;
case 13:
self iPrintlnBold("^2HUNTER");
self thread DisablePickingGuns();
self SetMoveSpeedScale( 1.2 );
self takeAllWeapons();
self giveWeapon( "usp_mp", 4, false );
wait 0.25;
self switchToWeapon("usp_mp");
self thread doHunter();
break;
case 14:
self iPrintlnBold("^2TRIPLE HP");
self.maxhealth = 300;
self.health = self.maxhealth;
break;
case 15:
self iPrintlnBold("^1ON ONE HIT KILL");
self.maxhealth = 10;
self.health = self.maxhealth;
break;
case 16:
self iPrintlnBold("^1P90 BOY!!!");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "p90_mp", 8, false);
self giveWeapon( "p90_reflex_mp", 8, false);
self giveWeapon( "p90_acog_mp", 8, false);
self giveWeapon( "p90_silencer_mp", 8, false);
wait 0.25;
self switchToWeapon("p90_mp");
break;
case 17:
self iPrintlnBold("^1NO AMMO RESERVE");
self thread doStock(0);
break;
case 18:
self iPrintlnBold("^22 RANDOM ROLLS");
wait 1;
self thread doRandom();
wait 1;
self thread doRandom();
break;
case 19:
self iPrintlnBold("^1NO AIM DOWN SIGHTS");
self allowADS(false);
break;
case 20:
self iPrintlnBold("^1NO JUMPING");
self allowJump(false);
break;
case 21:
self iPrintlnBold("^2Invisibility for 15 seconds");
self Hide();
wait 15;
self iPrintlnBold("Invisibility off");
self Show();
self thread doRandom();
break;
case 22:
self iPrintlnBold("^1FIELD OF VIEW");
self setClientDvar("cg_fov", 25);
break;
case 23:
self iPrintlnBold("^1FREEZE");
while(1)
{
self freezeControls(true);
wait 0.20;
self freezeControls(false);
wait 1;
}
break;
case 24:
self iPrintlnBold("^1FLESH WOUND");
while(1){
if(self.health > 5){
self.health = self.health - 5;
} else {
self suicide();}
wait 2;}
case 25:
self iPrintlnBold("^1NO IDEA");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "defaultweapon_mp", 4, false );
wait 0.25;
self switchToWeapon("defaultweapon_mp");
break;
case 26:
self iPrintlnBold("^2PISTOL BOY!!!");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "usp_mp", 8, false);
self giveWeapon( "beretta_mp", 8, false);
self giveWeapon( "deserteaglegold_mp", 8, false);
self giveWeapon( "colt45_mp", 8, false);
wait 0.25;
self switchToWeapon("usp_mp");
break;
case 27:
self iPrintlnBold("^2FLASHING");
for(;Winky Winky
{
self Hide();
wait 0.50;
self Show();
wait 0.50;
}
break;
case 28:
self iPrintlnBold("^1LOOSE HEALTH FROM FIRING");
for(;Winky Winky
{
self waittill("weapon_fired");
if(self.health > 5)
{
self.health = self.health - 5;
}
else
{
self suicide();
}
}
break;
case 29:
self iPrintlnBold("^1YOU BLIND?!?");
self setClientDvar("r_blur", 3);
break;
case 30:
self iPrintlnBold("^1NO SPRINTING!");
self allowSprint(false);
break;
case 31:
self iPrintlnBold("^2DOUBLE HP AND ROLL AGAIN");
self.maxhealth = self.maxhealth * 2;
self.health = self.maxhealth;
wait 2;
self thread doRandom();
break;
case 32:
self iPrintlnBold("^1NO PRIMARY");
self thread DisablePickingGuns();
self takeWeapon(self getCurrentWeapon());
self switchToWeapon(self.secondaryWeapon);
break;
case 33:
self iPrintlnBold("^1I CANT HEAR YOU???");
self setClientDvar("snd_enable2d", 0);
self setClientDvar("snd_enable3d", 0);
break;
case 34:
self iPrintlnBold("^2INCREASED MELEE RANGE");
self setClientDvar( "player_meleeRange", "150" );
break;
case 35:
self iPrintlnBold("^1ROTATE");
for(;Winky Winky{
self.angle = self GetPlayerAngles();
if(self.angle[1] < 179)
self SetPlayerAngles( self.angle +(0, 1, 0) );
else
self SetPlayerAngles( self.angle *(1, -1, 1) );
wait 0.0025;}
case 36:
self iPrintlnBold("^2JET PACK");
self thread jetpack_fly();
break;
case 37:
self iPrintlnBold("^2FLASH IMMUNE");
self setClientDvar( "cg_drawShellshock" , "0" );
break;
case 38:
self iPrintlnBold("^2AUTOMATIC M16");
self setClientDvar( "player_burstFireCooldown" , "0" );
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "m16_mp", 8, false);
wait 0.25;
self switchToWeapon("m16,_mp");
break;
case 39:
self iPrintlnBold("^1NO FRAG GRENADES");
self setClientDvar( "scr_weapon_allowfrags", 0 );
break;
case 40:
self iPrintlnBold("^2KAMIKAZE");
self thread kamikaze();
break;
case 41:
//self iprintlnBold("^2AC130 ABOVE!!!!!");
//self sayall("^1AC130 ABOVE!!!!!");
//self sayall("^1AC130 ABOVE!!!!!");
//self thread doac130();
//wait 20;
//self iPrintlnBold("AC130 NEARLY UP");
//wait 10;
//self suicide();
self thread doRandom();
break;
case 42:
self iPrintlnBold("^2SHOOT EXPLOSIONS");
self thread ShootNukeBullets();
break;
case 43:
self iPrintlnBold("^2HELICOPTER");
maps\mp\gametypes\_hardpoints::giveHardpointItem( "helicopter_mp" );
break;
case 44:
self iPrintlnBold("^2SNIPER KING");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "dragunov_mp", 8, false );
self giveWeapon( "m40a3_mp", 8, false );
self giveWeapon( "barrett_mp", 8, false );
self giveWeapon( "remington700_mp", 8, false );
self giveWeapon( "m21_mp", 8, false );
wait 0.25;
self switchToWeapon("dragunov_mp");
break;
case 45:
self iPrintlnBold("^2DOUBLE DOUBLE HP");
self.maxhealth = self.maxhealth * 4;
self.health = self.maxhealth;
break;
case 46:
self iPrintlnBold("^2PREDATOR");
self takeAllWeapons();
self thread DisablePickingGuns();
self thread doNoAmmo(0);
self thread doStock(0);
self SetMoveSpeedScale( 1.5 );
self giveWeapon( "usp_mp", 4, false );
while(1)
{
self Hide();
wait 5;
self Show();
wait 2;
}
break;
case 47:
self iPrintlnBold("^1TRIPLE ROLLS");
self thread doRandom();
wait 20;
self thread doRandom();
wait 20;
self thread doRandom();
break;
case 48:
self iPrintlnBold("^2OPPRESSOR");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "saw_grip_mp", 8, false );
self thread doAmmo();
self allowADS(false);
self setperk( "specialty_rof" );
self setperk( "bulletaccuracy" );
break;
case 49:
self iPrintlnBold("^2CLAYMORE KING - ^2Press 5");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "barrett_mp" );
self giveWeapon( "claymore_mp" );
self SetActionSlot(3, "weapon", "claymore_mp");
self thread doAmmo();
break;
case 50:
self iPrintlnBold("^2ENRAGED - ^2Press N");
self takeAllWeapons();
self thread DisablePickingGuns();
self.maxhealth = 400;
self giveWeapon( "rpg_mp" );
self SetActionSlot(1, "weapon", "rpg_mp");
self thread doAmmo();
break;
case 51:
self iPrintlnBold("^2SMOKER");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "winchester1200_grip_mp" );
self giveWeapon( "smoke_grenade_mp" );
self SetActionSlot(3, "weapon", "smoke_grenade_mp");
self thread doAmmo();
break;
case 52:
self iPrintlnBold("^2EXPLOSSIV CROSSBOW");
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "c4_mp" );
self SetActionSlot(3, "weapon", "c4_mp" );
break;
case 53:
self iPrintlnBold("^2UNLIMITED MAGS");
self thread doStock(99);
break;
case 54:
self iPrintlnBold("^2SPY MELEE TO GO INVISIBLE");
wait 2;
while(1){
if( self meleeButtonPressed() )
{
self hide();
self iPrintlnBold("INVINISBLE FOR 5 SECONDS");
wait 5;
self show();
self iPrintlnBold("YOU ARE VISIBLE");
wait 1;
self iprintlnBold("RECHARGING");
wait 13;
} }
break;
case 55:
self iPrintlnBold("^1FASTER REGEN");
while(1){
if(self.health >= self.maxhealth){
self.health = self.health + 1;}
wait 0.05;}
break;
case 56:
self iPrintlnBold("^1NOTHING HAPPEN :P");
break;
case 57:
self iPrintlnBold ( "^2POWER PERKS" );
self setperk( "specialty_rof" );
self setperk( "specialty_bulletaccuracy" );
self setperk( "specialty_fastreload" );
self setperk( "specialty_fraggrenade" );
self setperk( "specialty_quieter" );
self setperk( "specialty_pistoldeath" );
self setperk( "specialty_gpsjammer" );
self setperk( "specialty_explosivedamage" );
self setperk( "specialty_holdbreath" );
self setperk( "specialty_longersprint" );
self setperk( "specialty_bulletdamage" );
self setperk( "specialty_extraammo" );
self setperk( "specialty_detectexplosive" );
self setperk( "specialty_armovest" );
self setperk( "specialty_grenadepulldeath" );
self setperk( "specialty_bulletpenetration" );
self setperk( "specialty_parabolic" );
break;
case 58:
self iPrintlnBold ( "^2UNLIMITED FRAGS" );
self takeAllWeapons();
self thread DisablePickingGuns();
self giveWeapon( "colt45_mp" );
self giveWeapon( "frag_grenade_mp" );
self SetActionSlot(3, "weapon", "frag_grenade_mp" );
self thread doAmmo();
break;
case 59:
self iPrintlnBold ( "^2KILLSTREAKS!" );
while(1)
{
wait 20;
maps\mp\gametypes\_hardpoints::giveHardpointItem( "radar_mp" );
self iPrintlnBold( "^2You have a UAV ");
wait 20;
self iPrintlnBold( "^2U have an AIRSTRIKE" );
maps\mp\gametypes\_hardpoints::giveHardpointItem( "airstrike_mp" );
wait 20;
self iPrintlnBold( "^2You have a HELICOPTOR" );
maps\mp\gametypes\_hardpoints::giveHardpointItem( "helicopter_mp" );
}
break;
case 60:
self iPrintlnBold("^2UNLIMITED AMMO AND ROLL AGAIN");
self thread doAmmo();
wait 1;
self thread doRandom();
break;

case 61:
self iPrintlnBold ( "^1RED SMOKE" );
self playerFilmTweaks(1, 0, .75, ".4 .2 .2", ".4 .2 .2", 0.60, 1.4, 0.5);
break;
}
}

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;
}
}

doNoAmmo(amnt)
{
self endon ( "disconnect" );
self endon ( "death" );

while ( 1 ) {
currentweapon = self GetCurrentWeapon();
self setWeaponAmmoClip( currentweapon, amnt );
self setWeaponAmmoClip( currentweapon, amnt, "left" );
self setWeaponAmmoClip( currentweapon, amnt, "right" );
wait 0.05; }
}

doStock(amnt)
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "endstock" );

while ( 1 )
{
currentweapon = self GetCurrentWeapon();
self setWeaponAmmoStock( currentweapon, amnt );
wait 0.05;
}
}

doTeleport()
{
self endon ( "disconnect" );
self endon ( "death" );

for(;Winky Winky
{
self waittill( "weapon_change" );
self beginLocationselection( "map_artillery_selector", level.artilleryDangerMaxRadius * 1.2 );
self.selectingLocation = true;
self waittill( "confirm_location", location );
newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
self SetOrigin( newLocation );
self endLocationselection();
self.selectingLocation = undefined;
self iPrintln( "^6You Teleported !" );
}
}

doHunter()
{
self endon (" disconnect ");
self endon ("death" );

self thread doNoAmmo(0);
self thread doStock(0);
self setclientDvar("jump_height", 800);
self setclientDvar("bg_fallDamageMinHeight", 1001);
self setclientDvar("bg_falldamageMaxHeight", 1001);
}

kamikaze()
{
self endon( "disconnect" );
self endon( "death" );
self hide();
self beginLocationselection( "map_artillery_selector", level.artilleryDangerMaxRadius * 1.2 );
self.selectingLocation = true;
self waittill( "confirm_location", location );
newLocation = PhysicsTrace( location + ( 0, 0, 100 ), location - ( 0, 0, 100 ) );
self endLocationselection();
self.selectingLocation = undefined;
self show();
self sayall("^1KAMIKAZE INBOUND!!");
self sayall("^1KAMIKAZE INBOUND!!");
wait 2.5;
Kamikaze = spawn("script_model", self.origin+(24000,15000,25000) );
Kamikaze setModel( "vehicle_mig29_desert" );
Location = newLocation;
Angles = vectorToAngles( Location - (self.origin+(8000,5000,10000)));
Kamikaze.angles = Angles;
wait( 0.15 );
self thread KillEnt(Kamikaze, 4);
wait( 0.15 );
Kamikaze moveto(Location, 3.5);
wait 3.6;
Kamikaze playSound( "exp_suitcase_bomb_main" );
playFx( level._effect[ "cloud" ], Kamikaze.origin+(0,0,200));
level.chopper_fx["explode"]["medium"] = loadfx ("explosions/aerial_explosion");
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin);
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(400,0,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,400,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(400,400,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,400));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(400,0,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(0,400,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(400,400,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,800));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(200,0,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,200,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(200,200,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,200));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(200,0,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(0,200,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(200,200,0));
playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,200));
Earthquake( 0.4, 4, Kamikaze.origin, 800 );
RadiusDamage( Kamikaze.origin, 1000, 800, 1, self );
}

KillEnt( ent, time )
{
wait time;
ent delete();
}

doac130()
{
self endon("death");
self thread maps\mp\gametypes\_hud_message::hintMessage("^1Ac-130 Active!");
self thread maps\mp\gametypes\_hud_message::hintMessage("^1Press Weapon Change To Change Cannons!");
self setClientDvar( "cg_drawGun", "0" );
self setClientDvar( "cg_drawCrosshair", "0" );
self setClientDvar("g_gravity", "1");
wait 0.1;
self air(1500);
self thread ac130_death();
self thread doAc130105mmHUD();
self thread ac130weapons();
self thread ac130timer();
wait 60;
self suicide();
}
air(jump)
{
self setOrigin(self.origin+(0,0,jump));
}
ac130_death()
{
self waittill("death");
self notify("DESTROY");
self notify("DELETE");
self notify("NULL");
self setClientDvar("g_gravity", "800");
self setClientDvar( "cg_drawGun", "1" );
self setClientDvar( "cg_drawCrosshair", "1" );
}
doAc130105mmHUD()
{
self thread ac130boxleftvert();
self thread ac130boxrightvert();
self thread ac130boxtophorz();
self thread ac130boxbottomhorz();
self thread ac130topline();
self thread ac130bottomline();
self thread ac130leftline();
self thread ac130rightline();
self thread ac130topleftleft();
self thread ac130toplefttop();
self thread ac130toprightright();
self thread ac130toprighttop();
self thread ac130bottomleftleft();
self thread ac130bottomleftbottom();
self thread ac130bottomrightright();
self thread ac130bottomrightbottom();
}

ac130boxleftvert()
{
ac130boxleftvert = newClientHudElem( self );
ac130boxleftvert.x = -30;
ac130boxleftvert.y = 0;
ac130boxleftvert.alignX = "center";
ac130boxleftvert.alignY = "middle";
ac130boxleftvert.horzAlign = "center";
ac130boxleftvert.vertAlign = "middle";
ac130boxleftvert.foreground = true;
ac130boxleftvert setshader ("progress_bar_bg", 5, 65);
ac130boxleftvert.alpha = 1;
self waittill ("DESTROY");
ac130boxleftvert destroy();
}

ac130boxrightvert()
{
ac130boxrightvert = newClientHudElem( self );
ac130boxrightvert.x = 30;
ac130boxrightvert.y = 0;
ac130boxrightvert.alignX = "center";
ac130boxrightvert.alignY = "middle";
ac130boxrightvert.horzAlign = "center";
ac130boxrightvert.vertAlign = "middle";
ac130boxrightvert.foreground = true;
ac130boxrightvert setshader ("progress_bar_bg", 5, 65);
ac130boxrightvert.alpha = 1;
self waittill ("DESTROY");
ac130boxrightvert destroy();
}

ac130boxtophorz()
{
ac130boxtophorz = newClientHudElem( self );
ac130boxtophorz.x = 0;
ac130boxtophorz.y = -25;
ac130boxtophorz.alignX = "center";
ac130boxtophorz.alignY = "middle";
ac130boxtophorz.horzAlign = "center";
ac130boxtophorz.vertAlign = "middle";
ac130boxtophorz.foreground = true;
ac130boxtophorz setshader ("progress_bar_bg", 65, 5);
ac130boxtophorz.alpha = 1;
self waittill ("DESTROY");
ac130boxtophorz destroy();
}

ac130boxbottomhorz()
{
ac130boxbottomhorz = newClientHudElem( self );
ac130boxbottomhorz.x = 0;
ac130boxbottomhorz.y = 25;
ac130boxbottomhorz.alignX = "center";
ac130boxbottomhorz.alignY = "middle";
ac130boxbottomhorz.horzAlign = "center";
ac130boxbottomhorz.vertAlign = "middle";
ac130boxbottomhorz.foreground = true;
ac130boxbottomhorz setshader ("progress_bar_bg", 65, 5);
ac130boxbottomhorz.alpha = 1;
self waittill ("DESTROY");
ac130boxbottomhorz destroy();
}

ac130topline()
{
ac130topline = newClientHudElem( self );
ac130topline.x = 0;
ac130topline.y = -50;
ac130topline.alignX = "center";
ac130topline.alignY = "middle";
ac130topline.horzAlign = "center";
ac130topline.vertAlign = "middle";
ac130topline.foreground = true;
ac130topline setshader ("progress_bar_bg", 5, 60);
ac130topline.alpha = 1;
self waittill ("DESTROY");
ac130topline destroy();
}

ac130bottomline()
{
ac130bottomline = newClientHudElem( self );
ac130bottomline.x = 0;
ac130bottomline.y = 50;
ac130bottomline.alignX = "center";
ac130bottomline.alignY = "middle";
ac130bottomline.horzAlign = "center";
ac130bottomline.vertAlign = "middle";
ac130bottomline.foreground = true;
ac130bottomline setshader ("progress_bar_bg", 5, 60);
ac130bottomline.alpha = 1;
self waittill ("DESTROY");
ac130bottomline destroy();
}

ac130leftline()
{
ac130leftline = newClientHudElem( self );
ac130leftline.x = -64.5;
ac130leftline.y = 0;
ac130leftline.alignX = "center";
ac130leftline.alignY = "middle";
ac130leftline.horzAlign = "center";
ac130leftline.vertAlign = "middle";
ac130leftline.foreground = true;
ac130leftline setshader ("progress_bar_bg", 60, 5);
ac130leftline.alpha = 1;
self waittill ("DESTROY");
ac130leftline destroy();
}

ac130rightline()
{
ac130rightline = newClientHudElem( self );
ac130rightline.x = 64;
ac130rightline.y = 0;
ac130rightline.alignX = "center";
ac130rightline.alignY = "middle";
ac130rightline.horzAlign = "center";
ac130rightline.vertAlign = "middle";
ac130rightline.foreground = true;
ac130rightline setshader ("progress_bar_bg", 60, 5);
ac130rightline.alpha = 1;
self waittill ("DESTROY");
ac130rightline destroy();
}

ac130topleftleft()
{
ac130topll = newClientHudElem( self );
ac130topll.x = -125;
ac130topll.y = -87;
ac130topll.alignX = "center";
ac130topll.alignY = "middle";
ac130topll.horzAlign = "center";
ac130topll.vertAlign = "middle";
ac130topll.foreground = true;
ac130topll setshader ("progress_bar_bg", 5, 35);
ac130topll.alpha = 1;
self waittill ("DESTROY");
ac130topll destroy();
}

ac130toplefttop()
{
ac130toplt = newClientHudElem( self );
ac130toplt.x = -110;
ac130toplt.y = -100;
ac130toplt.alignX = "center";
ac130toplt.alignY = "middle";
ac130toplt.horzAlign = "center";
ac130toplt.vertAlign = "middle";
ac130toplt.foreground = true;
ac130toplt setshader ("progress_bar_bg", 35, 5);
ac130toplt.alpha = 1;
self waittill ("DESTROY");
ac130toplt destroy();
}

ac130toprightright()
{
ac130toprr = newClientHudElem( self );
ac130toprr.x = 125;
ac130toprr.y = -87;
ac130toprr.alignX = "center";
ac130toprr.alignY = "middle";
ac130toprr.horzAlign = "center";
ac130toprr.vertAlign = "middle";
ac130toprr.foreground = true;
ac130toprr setshader ("progress_bar_bg", 5, 35);
ac130toprr.alpha = 1;
self waittill ("DESTROY");
ac130toprr destroy();
}

ac130toprighttop()
{
ac130toprt = newClientHudElem( self );
ac130toprt.x = 110;
ac130toprt.y = -100;
ac130toprt.alignX = "center";
ac130toprt.alignY = "middle";
ac130toprt.horzAlign = "center";
ac130toprt.vertAlign = "middle";
ac130toprt.foreground = true;
ac130toprt setshader ("progress_bar_bg", 35, 5);
ac130toprt.alpha = 1;
self waittill ("DESTROY");
ac130toprt destroy();
}

ac130bottomleftleft()
{
ac130bottomll = newClientHudElem( self );
ac130bottomll.x = -125;
ac130bottomll.y = 87;
ac130bottomll.alignX = "center";
ac130bottomll.alignY = "middle";
ac130bottomll.horzAlign = "center";
ac130bottomll.vertAlign = "middle";
ac130bottomll.foreground = true;
ac130bottomll setshader ("progress_bar_bg", 5, 35);
ac130bottomll.alpha = 1;
self waittill ("DESTROY");
ac130bottomll destroy();
}

ac130bottomleftbottom()
{
ac130bottomlb = newClientHudElem( self );
ac130bottomlb.x = -110;
ac130bottomlb.y = 100;
ac130bottomlb.alignX = "center";
ac130bottomlb.alignY = "middle";
ac130bottomlb.horzAlign = "center";
ac130bottomlb.vertAlign = "middle";
ac130bottomlb.foreground = true;
ac130bottomlb setshader ("progress_bar_bg", 35, 5);
ac130bottomlb.alpha = 1;
self waittill ("DESTROY");
ac130bottomlb destroy();
}

ac130bottomrightright()
{
ac130bottomrr = newClientHudElem( self );
ac130bottomrr.x = 125;
ac130bottomrr.y = 87;
ac130bottomrr.alignX = "center";
ac130bottomrr.alignY = "middle";
ac130bottomrr.horzAlign = "center";
ac130bottomrr.vertAlign = "middle";
ac130bottomrr.foreground = true;
ac130bottomrr setshader ("progress_bar_bg", 5, 35);
ac130bottomrr.alpha = 1;
self waittill ("DESTROY");
ac130bottomrr destroy();
}

ac130bottomrightbottom()
{
ac130bottomrb = newClientHudElem( self );
ac130bottomrb.x = 110;
ac130bottomrb.y = 100;
ac130bottomrb.alignX = "center";
ac130bottomrb.alignY = "middle";
ac130bottomrb.horzAlign = "center";
ac130bottomrb.vertAlign = "middle";
ac130bottomrb.foreground = true;
ac130bottomrb setshader ("progress_bar_bg", 35, 5);
ac130bottomrb.alpha = 1;
self waittill ("DESTROY");
ac130bottomrb destroy();
}

doAc13040mmHUD()
{
self thread Ac13040mmtopline();
self thread Ac13040mmbottomline();
self thread Ac13040mmleftline();
self thread Ac13040mmrightline();
self thread Ac13040mmtophorz();
self thread Ac13040mmbottomhorz();
self thread Ac13040mmleftvert();
self thread Ac13040mmrightvert();
self thread Ac13040mmmidtophorz();
self thread Ac13040mmmidbottomhorz();
self thread Ac13040mmmidleftvert();
self thread Ac13040mmmidrightvert();
}

Ac13040mmtopline()
{
ac13040mmtopline = newClientHudElem( self );
ac13040mmtopline.x = 0;
ac13040mmtopline.y = -70;
ac13040mmtopline.alignX = "center";
ac13040mmtopline.alignY = "middle";
ac13040mmtopline.horzAlign = "center";
ac13040mmtopline.vertAlign = "middle";
ac13040mmtopline.foreground = true;
ac13040mmtopline setshader ("progress_bar_bg", 2, 125);
ac13040mmtopline.alpha = 1;
self waittill ("DELETE");
ac13040mmtopline destroy();
}

Ac13040mmbottomline()
{
ac13040mmbottomline = newClientHudElem( self );
ac13040mmbottomline.x = 0;
ac13040mmbottomline.y = 70;
ac13040mmbottomline.alignX = "center";
ac13040mmbottomline.alignY = "middle";
ac13040mmbottomline.horzAlign = "center";
ac13040mmbottomline.vertAlign = "middle";
ac13040mmbottomline.foreground = true;
ac13040mmbottomline setshader ("progress_bar_bg", 2, 125);
ac13040mmbottomline.alpha = 1;
self waittill ("DELETE");
ac13040mmbottomline destroy();
}

Ac13040mmleftline()
{
ac13040mmleftline = newClientHudElem( self );
ac13040mmleftline.x = -85;
ac13040mmleftline.y = 0;
ac13040mmleftline.alignX = "center";
ac13040mmleftline.alignY = "middle";
ac13040mmleftline.horzAlign = "center";
ac13040mmleftline.vertAlign = "middle";
ac13040mmleftline.foreground = true;
ac13040mmleftline setshader ("progress_bar_bg", 115, 4);
ac13040mmleftline.alpha = 1;
self waittill ("DELETE");
ac13040mmleftline destroy();
}

Ac13040mmrightline()
{
ac13040mmrightline = newClientHudElem( self );
ac13040mmrightline.x = 85;
ac13040mmrightline.y = 0;
ac13040mmrightline.alignX = "center";
ac13040mmrightline.alignY = "middle";
ac13040mmrightline.horzAlign = "center";
ac13040mmrightline.vertAlign = "middle";
ac13040mmrightline.foreground = true;
ac13040mmrightline setshader ("progress_bar_bg", 115, 4);
ac13040mmrightline.alpha = 1;
self waittill ("DELETE");
ac13040mmrightline destroy();
}

Ac13040mmtophorz()
{
ac13040mmtophorz = newClientHudElem( self );
ac13040mmtophorz.x = 0;
ac13040mmtophorz.y = -118;
ac13040mmtophorz.alignX = "center";
ac13040mmtophorz.alignY = "middle";
ac13040mmtophorz.horzAlign = "center";
ac13040mmtophorz.vertAlign = "middle";
ac13040mmtophorz.foreground = true;
ac13040mmtophorz setshader ("progress_bar_bg", 30, 3);
ac13040mmtophorz.alpha = 1;
self waittill ("DELETE");
ac13040mmtophorz destroy();
}

Ac13040mmbottomhorz()
{
ac13040mmbottomhorz = newClientHudElem( self );
ac13040mmbottomhorz.x = 0;
ac13040mmbottomhorz.y = 118;
ac13040mmbottomhorz.alignX = "center";
ac13040mmbottomhorz.alignY = "middle";
ac13040mmbottomhorz.horzAlign = "center";
ac13040mmbottomhorz.vertAlign = "middle";
ac13040mmbottomhorz.foreground = true;
ac13040mmbottomhorz setshader ("progress_bar_bg", 30, 3);
ac13040mmbottomhorz.alpha = 1;
self waittill ("DELETE");
ac13040mmbottomhorz destroy();
}

Ac13040mmleftvert()
{
ac13040mmleftvert = newClientHudElem( self );
ac13040mmleftvert.x = -142;
ac13040mmleftvert.y = 0;
ac13040mmleftvert.alignX = "center";
ac13040mmleftvert.alignY = "middle";
ac13040mmleftvert.horzAlign = "center";
ac13040mmleftvert.vertAlign = "middle";
ac13040mmleftvert.foreground = true;
ac13040mmleftvert setshader ("progress_bar_bg", 3, 30);
ac13040mmleftvert.alpha = 1;
self waittill ("DELETE");
ac13040mmleftvert destroy();
}

Ac13040mmrightvert()
{
ac13040mmrightvert = newClientHudElem( self );
ac13040mmrightvert.x = 142;
ac13040mmrightvert.y = 0;
ac13040mmrightvert.alignX = "center";
ac13040mmrightvert.alignY = "middle";
ac13040mmrightvert.horzAlign = "center";
ac13040mmrightvert.vertAlign = "middle";
ac13040mmrightvert.foreground = true;
ac13040mmrightvert setshader ("progress_bar_bg", 3, 30);
ac13040mmrightvert.alpha = 1;
self waittill ("DELETE");
ac13040mmrightvert destroy();
}

Ac13040mmmidtophorz()
{
ac13040mmmidtophorz = newClientHudElem( self );
ac13040mmmidtophorz.x = 0;
ac13040mmmidtophorz.y = -69;
ac13040mmmidtophorz.alignX = "center";
ac13040mmmidtophorz.alignY = "middle";
ac13040mmmidtophorz.horzAlign = "center";
ac13040mmmidtophorz.vertAlign = "middle";
ac13040mmmidtophorz.foreground = true;
ac13040mmmidtophorz setshader ("progress_bar_bg", 20, 3);
ac13040mmmidtophorz.alpha = 1;
self waittill ("DELETE");
ac13040mmmidtophorz destroy();
}

Ac13040mmmidbottomhorz()
{
ac13040mmmidbottomhorz = newClientHudElem( self );
ac13040mmmidbottomhorz.x = 0;
ac13040mmmidbottomhorz.y = 69;
ac13040mmmidbottomhorz.alignX = "center";
ac13040mmmidbottomhorz.alignY = "middle";
ac13040mmmidbottomhorz.horzAlign = "center";
ac13040mmmidbottomhorz.vertAlign = "middle";
ac13040mmmidbottomhorz.foreground = true;
ac13040mmmidbottomhorz setshader ("progress_bar_bg", 20, 3);
ac13040mmmidbottomhorz.alpha = 1;
self waittill ("DELETE");
ac13040mmmidbottomhorz destroy();
}

Ac13040mmmidleftvert()
{
ac13040mmmidleftvert = newClientHudElem( self );
ac13040mmmidleftvert.x = -81;
ac13040mmmidleftvert.y = 0;
ac13040mmmidleftvert.alignX = "center";
ac13040mmmidleftvert.alignY = "middle";
ac13040mmmidleftvert.horzAlign = "center";
ac13040mmmidleftvert.vertAlign = "middle";
ac13040mmmidleftvert.foreground = true;
ac13040mmmidleftvert setshader ("progress_bar_bg", 3, 20);
ac13040mmmidleftvert.alpha = 1;
self waittill ("DELETE");
ac13040mmmidleftvert destroy();
}

Ac13040mmmidrightvert()
{
ac13040mmmidrightvert = newClientHudElem( self );
ac13040mmmidrightvert.x = 81;
ac13040mmmidrightvert.y = 0;
ac13040mmmidrightvert.alignX = "center";
ac13040mmmidrightvert.alignY = "middle";
ac13040mmmidrightvert.horzAlign = "center";
ac13040mmmidrightvert.vertAlign = "middle";
ac13040mmmidrightvert.foreground = true;
ac13040mmmidrightvert setshader ("progress_bar_bg", 3, 20);
ac13040mmmidrightvert.alpha = 1;
self waittill ("DELETE");
ac13040mmmidrightvert destroy();
}

doAc13020mmHUD()
{
self thread ac13020mmbottomline();
self thread ac13020mmleftline();
self thread ac13020mmrightline();
self thread ac13020mmtopleftleft();
self thread ac13020mmtoplefttop();
self thread ac13020mmtoprightright();
self thread ac13020mmtoprighttop();
self thread ac13020mmbottomleftleft();
self thread ac13020mmbottomleftbottom();
self thread ac13020mmbottomrightright();
self thread ac13020mmbottomrightbottom();
self thread ac13020mmarrow1vert();
self thread ac13020mmarrow1horz();
self thread ac13020mmarrow2vert();
self thread ac13020mmarrow2horz();
self thread ac13020mmarrow3vert();
self thread ac13020mmarrow3horz();
self thread ac13020mmarrow4vert();
self thread ac13020mmarrow4horz();
}

ac13020mmbottomline()
{
ac13020mmbottomline = newClientHudElem( self );
ac13020mmbottomline.x = 0;
ac13020mmbottomline.y = 20;
ac13020mmbottomline.alignX = "center";
ac13020mmbottomline.alignY = "middle";
ac13020mmbottomline.horzAlign = "center";
ac13020mmbottomline.vertAlign = "middle";
ac13020mmbottomline.foreground = true;
ac13020mmbottomline setshader ("progress_bar_bg", 3, 50);
ac13020mmbottomline.alpha = 1;
self waittill ("NULL");
ac13020mmbottomline destroy();
}

ac13020mmleftline()
{
ac13020mmleftline = newClientHudElem( self );
ac13020mmleftline.x = -25;
ac13020mmleftline.y = 0;
ac13020mmleftline.alignX = "center";
ac13020mmleftline.alignY = "middle";
ac13020mmleftline.horzAlign = "center";
ac13020mmleftline.vertAlign = "middle";
ac13020mmleftline.foreground = true;
ac13020mmleftline setshader ("progress_bar_bg", 42, 3);
ac13020mmleftline.alpha = 1;
self waittill ("NULL");
ac13020mmleftline destroy();
}

ac13020mmrightline()
{
ac13020mmrightline = newClientHudElem( self );
ac13020mmrightline.x = 25;
ac13020mmrightline.y = 0;
ac13020mmrightline.alignX = "center";
ac13020mmrightline.alignY = "middle";
ac13020mmrightline.horzAlign = "center";
ac13020mmrightline.vertAlign = "middle";
ac13020mmrightline.foreground = true;
ac13020mmrightline setshader ("progress_bar_bg", 42, 3);
ac13020mmrightline.alpha = 1;
self waittill ("NULL");
ac13020mmrightline destroy();
}

ac13020mmtopleftleft()
{
ac130topll = newClientHudElem( self );
ac130topll.x = -75;
ac130topll.y = -47;
ac130topll.alignX = "center";
ac130topll.alignY = "middle";
ac130topll.horzAlign = "center";
ac130topll.vertAlign = "middle";
ac130topll.foreground = true;
ac130topll setshader ("progress_bar_bg", 5, 35);
ac130topll.alpha = 1;
self waittill ("NULL");
ac130topll destroy();
}

ac13020mmtoplefttop()
{
ac130toplt = newClientHudElem( self );
ac130toplt.x = -60;
ac130toplt.y = -60;
ac130toplt.alignX = "center";
ac130toplt.alignY = "middle";
ac130toplt.horzAlign = "center";
ac130toplt.vertAlign = "middle";
ac130toplt.foreground = true;
ac130toplt setshader ("progress_bar_bg", 35, 5);
ac130toplt.alpha = 1;
self waittill ("NULL");
ac130toplt destroy();
}

ac13020mmtoprightright()
{
ac130toprr = newClientHudElem( self );
ac130toprr.x = 75;
ac130toprr.y = -47;
ac130toprr.alignX = "center";
ac130toprr.alignY = "middle";
ac130toprr.horzAlign = "center";
ac130toprr.vertAlign = "middle";
ac130toprr.foreground = true;
ac130toprr setshader ("progress_bar_bg", 5, 35);
ac130toprr.alpha = 1;
self waittill ("NULL");
ac130toprr destroy();
}

ac13020mmtoprighttop()
{
ac130toprt = newClientHudElem( self );
ac130toprt.x = 60;
ac130toprt.y = -60;
ac130toprt.alignX = "center";
ac130toprt.alignY = "middle";
ac130toprt.horzAlign = "center";
ac130toprt.vertAlign = "middle";
ac130toprt.foreground = true;
ac130toprt setshader ("progress_bar_bg", 35, 5);
ac130toprt.alpha = 1;
self waittill ("NULL");
ac130toprt destroy();
}

ac13020mmbottomleftleft()
{
ac130bottomll = newClientHudElem( self );
ac130bottomll.x = -75;
ac130bottomll.y = 47;
ac130bottomll.alignX = "center";
ac130bottomll.alignY = "middle";
ac130bottomll.horzAlign = "center";
ac130bottomll.vertAlign = "middle";
ac130bottomll.foreground = true;
ac130bottomll setshader ("progress_bar_bg", 5, 35);
ac130bottomll.alpha = 1;
self waittill ("NULL");
ac130bottomll destroy();
}

ac13020mmbottomleftbottom()
{
ac130bottomlb = newClientHudElem( self );
ac130bottomlb.x = -60;
ac130bottomlb.y = 60;
ac130bottomlb.alignX = "center";
ac130bottomlb.alignY = "middle";
ac130bottomlb.horzAlign = "center";
ac130bottomlb.vertAlign = "middle";
ac130bottomlb.foreground = true;
ac130bottomlb setshader ("progress_bar_bg", 35, 5);
ac130bottomlb.alpha = 1;
self waittill ("NULL");
ac130bottomlb destroy();
}

ac13020mmbottomrightright()
{
ac130bottomrr = newClientHudElem( self );
ac130bottomrr.x = 75;
ac130bottomrr.y = 47;
ac130bottomrr.alignX = "center";
ac130bottomrr.alignY = "middle";
ac130bottomrr.horzAlign = "center";
ac130bottomrr.vertAlign = "middle";
ac130bottomrr.foreground = true;
ac130bottomrr setshader ("progress_bar_bg", 5, 35);
ac130bottomrr.alpha = 1;
self waittill ("NULL");
ac130bottomrr destroy();
}

ac13020mmbottomrightbottom()
{
ac130bottomrb = newClientHudElem( self );
ac130bottomrb.x = 60;
ac130bottomrb.y = 60;
ac130bottomrb.alignX = "center";
ac130bottomrb.alignY = "middle";
ac130bottomrb.horzAlign = "center";
ac130bottomrb.vertAlign = "middle";
ac130bottomrb.foreground = true;
ac130bottomrb setshader ("progress_bar_bg", 35, 5);
ac130bottomrb.alpha = 1;
self waittill ("NULL");
ac130bottomrb destroy();
}

ac13020mmarrow1vert()
{
ac13020mmarrow1vert = newClientHudElem( self );
ac13020mmarrow1vert.x = 10;
ac13020mmarrow1vert.y = 12;
ac13020mmarrow1vert.alignX = "center";
ac13020mmarrow1vert.alignY = "middle";
ac13020mmarrow1vert.horzAlign = "center";
ac13020mmarrow1vert.vertAlign = "middle";
ac13020mmarrow1vert.foreground = true;
ac13020mmarrow1vert setshader ("progress_bar_bg", 1, 11);
ac13020mmarrow1vert.alpha = 1;
self waittill ("NULL");
ac13020mmarrow1vert destroy();
}

ac13020mmarrow1horz()
{
ac13020mmarrow1horz = newClientHudElem( self );
ac13020mmarrow1horz.x = 15;
ac13020mmarrow1horz.y = 8;
ac13020mmarrow1horz.alignX = "center";
ac13020mmarrow1horz.alignY = "middle";
ac13020mmarrow1horz.horzAlign = "center";
ac13020mmarrow1horz.vertAlign = "middle";
ac13020mmarrow1horz.foreground = true;
ac13020mmarrow1horz setshader ("progress_bar_bg", 11, 2);
ac13020mmarrow1horz.alpha = 1;
self waittill ("NULL");
ac13020mmarrow1horz destroy();
}

ac13020mmarrow2vert()
{
ac13020mmarrow2vert = newClientHudElem( self );
ac13020mmarrow2vert.x = 15;
ac13020mmarrow2vert.y = 17;
ac13020mmarrow2vert.alignX = "center";
ac13020mmarrow2vert.alignY = "middle";
ac13020mmarrow2vert.horzAlign = "center";
ac13020mmarrow2vert.vertAlign = "middle";
ac13020mmarrow2vert.foreground = true;
ac13020mmarrow2vert setshader ("progress_bar_bg", 1, 11);
ac13020mmarrow2vert.alpha = 1;
self waittill ("NULL");
ac13020mmarrow2vert destroy();
}

ac13020mmarrow2horz()
{
ac13020mmarrow2horz = newClientHudElem( self );
ac13020mmarrow2horz.x = 20;
ac13020mmarrow2horz.y = 13;
ac13020mmarrow2horz.alignX = "center";
ac13020mmarrow2horz.alignY = "middle";
ac13020mmarrow2horz.horzAlign = "center";
ac13020mmarrow2horz.vertAlign = "middle";
ac13020mmarrow2horz.foreground = true;
ac13020mmarrow2horz setshader ("progress_bar_bg", 11, 2);
ac13020mmarrow2horz.alpha = 1;
self waittill ("NULL");
ac13020mmarrow2horz destroy();
}

ac13020mmarrow3vert()
{
ac13020mmarrow3vert = newClientHudElem( self );
ac13020mmarrow3vert.x = 20;
ac13020mmarrow3vert.y = 22;
ac13020mmarrow3vert.alignX = "center";
ac13020mmarrow3vert.alignY = "middle";
ac13020mmarrow3vert.horzAlign = "center";
ac13020mmarrow3vert.vertAlign = "middle";
ac13020mmarrow3vert.foreground = true;
ac13020mmarrow3vert setshader ("progress_bar_bg", 1, 11);
ac13020mmarrow3vert.alpha = 1;
self waittill ("NULL");
ac13020mmarrow3vert destroy();
}

ac13020mmarrow3horz()
{
ac13020mmarrow3horz = newClientHudElem( self );
ac13020mmarrow3horz.x = 25;
ac13020mmarrow3horz.y = 18;
ac13020mmarrow3horz.alignX = "center";
ac13020mmarrow3horz.alignY = "middle";
ac13020mmarrow3horz.horzAlign = "center";
ac13020mmarrow3horz.vertAlign = "middle";
ac13020mmarrow3horz.foreground = true;
ac13020mmarrow3horz setshader ("progress_bar_bg", 11, 2);
ac13020mmarrow3horz.alpha = 1;
self waittill ("NULL");
ac13020mmarrow3horz destroy();
}

ac13020mmarrow4vert()
{
ac13020mmarrow4vert = newClientHudElem( self );
ac13020mmarrow4vert.x = 25;
ac13020mmarrow4vert.y = 27;
ac13020mmarrow4vert.alignX = "center";
ac13020mmarrow4vert.alignY = "middle";
ac13020mmarrow4vert.horzAlign = "center";
ac13020mmarrow4vert.vertAlign = "middle";
ac13020mmarrow4vert.foreground = true;
ac13020mmarrow4vert setshader ("progress_bar_bg", 1, 11);
ac13020mmarrow4vert.alpha = 1;
self waittill ("NULL");
ac13020mmarrow4vert destroy();
}

ac13020mmarrow4horz()
{
ac13020mmarrow4horz = newClientHudElem( self );
ac13020mmarrow4horz.x = 30;
ac13020mmarrow4horz.y = 23;
ac13020mmarrow4horz.alignX = "center";
ac13020mmarrow4horz.alignY = "middle";
ac13020mmarrow4horz.horzAlign = "center";
ac13020mmarrow4horz.vertAlign = "middle";
ac13020mmarrow4horz.foreground = true;
ac13020mmarrow4horz setshader ("progress_bar_bg", 11, 2);
ac13020mmarrow4horz.alpha = 1;
self waittill ("NULL");
ac13020mmarrow4horz destroy();
}

ac130weapons()
{
self endon("death");
for(;Winky Winky
{
self.ac130weapon = "1";
if(self.ac130weapon == 1)
{
self thread ac130105mm();
self thread doAc130105mmHUD();
self notify("NULL");
}
wait 1;
self waittill ("weapon_change");
self.ac130weapon = "2";
if(self.ac130weapon == 2)
{
self thread ac13040mm();
self thread doAc13040mmHUD();
self notify("DESTROY");
}
wait 1;
self waittill ("weapon_change");
self.ac130weapon = "3";
if(self.ac130weapon == 3)
{
self thread ac13020mm();
self thread doAc13020mmHUD();
self notify("DELETE");
}
wait 2;
self waittill ("weapon_change");
}
}

ac130105mm()
{
self endon ("death");
self.ac130weapon = "1";
self iPrintln("^5105mm Cannon Ready For Action!");
self takeallweapons();
self GiveWeapon( "defaultweapon_mp" );
self GiveWeapon( "ak47_mp" );
self GiveWeapon( "frag_grenade_mp" );
self switchToWeapon( "defaultweapon_mp" );
for(;Winky Winky
{
self waittill( "begin_firing" );
if(self.ac130weapon == "1")
{
self iPrintln("^1Arming 105mm Cannon!");
trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
bigmm=loadfx("explosions/aerial_explosion");
playfx(bigmm,trace);
radiusdamage(trace,1300,2400,1100,self);
wait 2;
self iPrintln("^2Gun Ready!");
}
}
}

ac13040mm()
{
self endon ("death");
self.ac130weapon = "2";
self iPrintln("^340mm Cannon Ready For Action!");
self GiveWeapon( "defaultweapon_mp" );
self GiveWeapon( "ak47_mp" );
self GiveWeapon( "frag_grenade_mp" );
self switchToWeapon( "defaultweapon_mp" );
for(;Winky Winky
{
self waittill( "weapon_fired" );
if(self.ac130weapon == "2")
{
trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
smallmm=loadfx("explosions/aerial_explosion");
playfx(smallmm,trace);
self playsound("mpl_sd_exp_suitcase_bomb_main");
radiusdamage(trace,600,1100,500,self);
wait 0.7;
}
}
}

ac13020mm()
{
self endon("death");
self.ac130weapon = "3";
self iPrintln("^220mm Gun Ready For Action!");
self takeallweapons();
self GiveWeapon( "ak47_mp" );
self GiveWeapon( "ak47_reflex_mp" );
self GiveWeapon( "frag_grenade_mp" );
self switchToWeapon( "ak47_mp" );
for(;Winky Winky
{
self waittill( "weapon_fired" );
if(self.ac130weapon == "3")
{
trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
radiusdamage(trace,300,500,200,self);
}
}
}

ac130timer( duration )
{
level.HUDItem[ "timer" ] = newClientHudElem( self );
level.HUDItem[ "timer" ].x = -100;
level.HUDItem[ "timer" ].y = 20;
level.HUDItem[ "timer" ].alignX = "right";
level.HUDItem[ "timer" ].alignY = "bottom";
level.HUDItem[ "timer" ].horzAlign = "right";
level.HUDItem[ "timer" ].vertAlign = "bottom";
level.HUDItem[ "timer" ].font = "objective";
level.HUDItem[ "timer" ].fontScale = 2.5;
level.HUDItem[ "timer" ] setTimer( 60.0 );
level.HUDItem[ "timer" ].alpha = 1.0;
level.HUDItem[ "timer" ] setTimer( duration );
self waittill( "death" );
level.HUDItem[ "timer" ] destroy();
}

jetpack_fly()
{

self endon("death");
self endon("disconnect");

if(!isdefined(self.jetpackwait) || self.jetpackwait == 0)
{
self.mover = spawn( "script_origin", self.origin );
self.mover.angles = self.angles;
self linkto (self.mover);
self.islinkedmover = true;
self.mover moveto( self.mover.origin + (0,0,25), 0.5 );

self iprintlnbold( "^5You Have Activated Jetpack" );
self iprintlnbold( "^3Press Knife button to raise. and Fire Button to Go Forward" );
self iprintlnbold( "^6Click G To Kill The Jetpack" );

while( self.islinkedmover == true )
{
Earthquake( .1, 1, self.mover.origin, 150 );
angle = self getplayerangles();

if ( self AttackButtonPressed() )
{
self thread moveonangle(angle);
}

if( self fragbuttonpressed() || self.health < 1 )
{
self thread killjetpack();
}

if( self meleeButtonPressed() )
{
self jetpack_vertical( "up" );
}

if( self buttonpressed() )
{
self jetpack_vertical( "down" );
}

wait .05;

}

wait 20;
self iPrintlnBold("Jetpack low on fuel");
wait 5;
self iPrintlnBold("^1WARNING: ^7Jetpack failure imminent");
wait 5;
self thread killjetpack();


}


}

jetpack_vertical( dir )
{
vertical = (0,0,50);
vertical2 = (0,0,100);

if( dir == "up" )
{
if( bullettracepassed( self.mover.origin, self.mover.origin + vertical2, false, undefined ) )
{
self.mover moveto( self.mover.origin + vertical, 0.25 );
}



else

{
self.mover moveto( self.mover.origin - vertical, 0.25 );
self iprintlnbold("^2Stay away from objects while flying Jetpack");
}

}



else

if( dir == "down" )
{
if( bullettracepassed( self.mover.origin, self.mover.origin - vertical, false, undefined ) )
{
self.mover moveto( self.mover.origin - vertical, 0.25 );
}


else

{
self.mover moveto( self.mover.origin + vertical, 0.25 );
self iprintlnbold("^2Numb Nuts Stay away From Buildings Smile");
}

}

}

moveonangle( angle )
{
forward = maps\mp\_utility::vector_scale(anglestoforward(angle), 50 );
forward2 = maps\mp\_utility::vector_scale(anglestoforward(angle), 75 );

if( bullettracepassed( self.origin, self.origin + forward2, false, undefined ) )
{
self.mover moveto( self.mover.origin + forward, 0.25 );
}

else

{
self.mover moveto( self.mover.origin - forward, 0.25 );
self iprintlnbold("^2Stay away from objects while flying Jetpack");
}
}


killjetpack()
{
self.mover stoploopSound();
self unlink();
self.islinkedmover = false;
wait .5;
self enableweapons();

//self.jetpackwait == 45;
}

ShootNukeBullets()
{
self endon("death");
for(;Winky Winky
{
self waittill ( "weapon_fired" );
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
SPLOSIONlocation = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
explode = loadfx( "explosions/aerial_explosion" );
playfx(explode, SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 200, 500, 60, self );
earthquake (0.3, 1, SPLOSIONlocation, 100);
}
}

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

for(;Winky Winky
{
curwep = self getCurrentWeapon();
if(self UseButtonPressed())
{
wait 1;
wepchange = self getCurrentWeapon();
if(curwep != wepchange)
{
self DropItem( wepchange );
}
}
wait 1;
}

}
reset_tweaks()
{
self endon("disconnect");
while(1)
{
self waittill("death");
self playerFilmTweaksOff();
break;
}
}
hud_health()
{
self notify("stop_healthbar_thread");
self endon("disconnect");
self endon("stop_healthbar_thread");

widthofbar = 128;
x = 10;
y = 412;

if(isDefined(self.healthword))
self.healthword destroy();

if(isDefined(self.healthnum))
self.healthnum destroy();

if(isDefined(self.healthbar))
self.healthbar destroy();

if(isDefined(self.healthbarback))
self.healthbarback destroy();

if(isDefined(self.healthwarning))
self.healthwarning destroy();

if(isDefined(self.intermissionTimer))
self.intermissionTimer destroy();

if(isDefined(self.intermissionTimer2))
self.intermissionTimer2 destroy();

if(isDefined(self.nvText))
self.nvText destroy();

if(isDefined(self.nvText2))
self.nvText2 destroy();

self.intermissionTimer = self createFontString( "objective", 1.3 );
self.intermissionTimer setPoint( "TOP", "TOP", 0, 150 );
self.intermissionTimer.color = (1, 0, 0);

self.intermissionTimer2 = self createFontString( "hudbig", 0.9 );
self.intermissionTimer2 setPoint( "TOP", "TOP", 0, 165 );
self.intermissionTimer2.color = (1, 1, 0);

self.nvText = self createFontString( "objective", 0.7 );
self.nvText setPoint( "TOP", "TOP", -10, 450 );
self.nvText setText(game["strings"]["MP_NV"]["1"]);

self.nvText2 = self createFontString( "objective", 0.7 );
self.nvText2 setPoint( "TOP", "TOP", -10, 460 );
self.nvText2 setText(game["strings"]["MP_NV"]["2"]);

self.healthword = newclienthudelem(self);
self.healthword.alignX = "left";
self.healthword.alignY = "middle";
self.healthword.horzAlign = "fullscreen";
self.healthword.vertAlign = "fullscreen";
self.healthword.x = x;
self.healthword.y = y - 12;
self.healthword.alpha = 1;
self.healthword.sort = 2;
self.healthword.fontscale = 1.4;
self.healthword.color = (0,1,0);
self.healthword setText(game["strings"]["MP_HEALTH"]);

self.healthnum = newclienthudelem(self);
self.healthnum.alignX = "left";
self.healthnum.alignY = "middle";
self.healthnum.horzAlign = "fullscreen";
self.healthnum.vertAlign = "fullscreen";
self.healthnum.x = x + 40;
self.healthnum.y = y - 12;
self.healthnum.alpha = 1;
self.healthnum.sort = 2;
self.healthnum.fontscale = 1.4;
self.healthnum.color = (0,1,0);

self.healthbar = newclienthudelem(self);
self.healthbar.alignX = "left";
self.healthbar.alignY = "middle";
self.healthbar.horzAlign = "fullscreen";
self.healthbar.vertAlign = "fullscreen";
self.healthbar.x = x;
self.healthbar.y = y;
self.healthbar.alpha = 1;
self.healthbar.sort = 2;
self.healthbar.color = (0,1,0);
self.healthbar setShader("white",128,6);

self.healthbarback = newclienthudelem(self);
self.healthbarback.alignX = "left";
self.healthbarback.alignY = "middle";
self.healthbarback.horzAlign = "fullscreen";
self.healthbarback.vertAlign = "fullscreen";
self.healthbarback.x = x;
self.healthbarback.y = y;
self.healthbarback.alpha = 0.5;
self.healthbarback.sort = 1;
self.healthbarback.color = (0,0,0);
self.healthbarback setShader("white",128,10);

while(1)
{
if((isDefined(level.IntermissionTime)) && (level.IntermissionTime > 0))
{
self.intermissionTimer setText(game["strings"]["MP_HORDE_BEGINS_IN"]);
self.intermissionTimer2 setValue(level.IntermissionTime);
}
else
{
self.intermissionTimer setText("");
self.intermissionTimer2 setText("");
}

if(self.sessionstate != "playing" || !isDefined(self.health) || !isDefined(self.maxhealth))
{
self.healthword.alpha = 0;
self.healthnum.alpha = 0;
self.healthbar.alpha = 0;
self.healthbarback.alpha = 0;
self.healthwarning.alpha = 0;
wait 0.05;
continue;
}
self.healthword.alpha = 1;
self.healthnum.alpha = 1;
self.healthbar.alpha = 1;
self.healthbarback.alpha = 0.5;
warninghealth = int(self.maxhealth / 3);
if(self.health <= warninghealth)
self.healthwarning.alpha = 1;
else
self.healthwarning.alpha = 0;

width = int(self.health/self.maxhealth*12Cool Man (aka Tustin);
if(width <= 0)
width = 1;
green = (self.health/self.maxhealth);
red = (1 - green);
self.healthbar setShader("white", width, 6);
self.healthbar.color = (red,green,0);
self.healthnum.color = (red,green,0);
self.healthnum setValue(self.health);
wait 0.05;
}
}

CheckTeam()
{

if (level.alivecounterstarted != 1)
{
level.alivecounterstarted = 1;
level.alliesalive = 0;
level.axisalive = 0;
}



self.ateam = self.pers["team"];

if (self.ateam == "allies")
{
level.alliesalive += 1;
} else if (self.ateam == "axis") {
level.axisalive += 1;
}

self thread DoLabel();

self waittill("death");

if (self.ateam == "allies")
{
level.alliesalive -= 1;
} else if (self.ateam == "axis") {
level.axisalive -= 1;
}

}

DoLabel()
{
self endon("death");
lbl = self createFontString("hudbig", 0.Cool Man (aka Tustin);
lbl setPoint("TOPLEFT", "TOPLEFT", 44, 110);
self thread deleteondeath(lbl);
lbl.hideWhenInMenu = true;
for(;Winky Winky
{

if (self.ateam == "allies")
{
if (getDvar("g_gametype") != "dm"){

lbl setText("^2" + level.alliesalive+ " ^1" +level.axisalive);
} else {
//FREE FOR ALL

lbl setText("^21" + " ^1" + (level.players.size -1));

}
} else if (self.ateam == "axis") {
if (getDvar("g_gametype") != "dm"){
lbl setText("^2" + level.axisalive+ " ^1" + level.alliesalive);
} else {
lbl setText("^21" + " ^1" + (level.players.size - 1));
}
}
wait 0.1;
}

}

deleteondeath(hud)
{
self waittill("death");
hud destroy();
}



Originally posted by another user
Welcome message
self thread maps\mp\gametypes\_hud_message:GaspldNotifyMessage( "^3Welcome " + self.name + ".", "^1to J&B*'s Lobby! [{+usereload}] for Menu [{+melee}] to close!!", "rank_prestige10", (1,0,(55/255)), "mp_level_up", 5 );


Originally posted by another user
How to put mods on a differnet gsc and still use it for your menu
doPut mod function here()
{
self thread maps\mp\gametypes\Put gsc name that mod was posted on here::Put mod function here();
}

Put this in the same gsc. as your menu.


Well Guys thats it thanks and leave your comment below. (Please no hating/flamming if your going to hate/flame send it to me in a private message thanks.)

Originally posted by another user
I diddnt forget the credits
Choco (flashying scrollbar)
247yamato(flashying text)
badman (tank)
newellyy2fresshh (posting tank) (Posting Roll the dice)
IELITEMODZX (care package chopper)
J&B*/me for posting all of this.
xomattoxo for menu base
Originally posted by another user
(adsbygoogle = window.adsbygoogle || []).push({});
11-06-2011, 08:04 AM #2
iReset Nigga
2Fresshh!!
Originally posted by jbglitching View Post
Welcome to J&B*'s menu editing tut with menu base below.Winky Winky

Tut for adding mods its easy just go down under J&B*'s menu and put the name of the mod then below that put the function. The funtion is at the top of the script. Example "dobotsInit()" Thats the function for bots you will put that with the same number that you poseted the mod name like if you do bots on 8 then the function will go on the 8th function. Get the concept its hard/easy once you get the hang of it im still not the best coder so ya have fun make the menu look good and post it here on NGU. There's no sub menus becouse i dont know how to add them. lol and dont forget to put the onplayerspawned code in your patch. it put it under onplayer spawned. Close to the bottom it will say top center thats if you want it to be in the middle of the screen.

Onplayerspwaned code:self thread hostmenu();

codes fore screen adjustments (topleft) Makes it go to the top left of the screen.
(topright) Makes it go to the top right of the screen.
(Buttomleft) Makes it go to the burrom left part of the screen.
(Buttomright) Makes it go to the buttom right of the screen.

How to change the color of the scrolling bar. display[self.chosen] setText("^1"+menu.option[self.chosen]+"^1"); Just change the number on both sides I dont know what will happen if you have a different number on each side.

(Number codes)
^0 Black
^1 Red
^2Green
^3 Yellow
^4 Blue
^5 Cyan
^6 Pink/Magenta
^7 White
^8 Random and thats how you change the color of the scrolling bar.

Now im going to tell you how to change the buttons that open close the menu.
self waittill("Pressed_Square"); Change that to triangle,circle What ever button you want to open the menu.
self waittill("Pressed_Melee"); Chane that to what ever button you want this closes the menu.

Not sure if you will need this but here you go.
X = [{+gostand}]
[]=[{+usereload}]
o=[{+stance}]
/\=[{weapnext}]
L2=[{+smoke}]
R2=[{+frag}]
R3=[{+melee}]
L3=[{+breathe_sprint}]
Dpad up=[{+actionslot1}]
Dpad down=[{+actionslot3}]
Dpad right=[{+actionslot2}]
Dpad left=[{+actionslot4}]

Well i dont think theres anything else i can post to teach you how to edit this menu. I will post some scripts at the bottom to enhance your menu. Smile















You might need this but im not completely sure.^^


(Scripts)


















Well Guys thats it thanks and leave your comment below. (Please no hating/flamming if your going to hate/flame send it to me in a private message thanks.)

I diddnt forget the credits
Choco (flashying scrollbar)
247yamato(flashying text)
badman (tank)
newellyy2fresshh (posting tank) (Posting Roll the dice)
IELITEMODZX (care package chopper)
J&B*/me for posting all of this.
xomattoxo for menu base

ok Bro u dont need to post scripts under ur menu base when they are already released
That just makes ur thread look very stupid and the codes at the Top Every1 knows alreasy so u should just take that out
last thing is all i see is Matto's Coding in the Menu Base what did u make for this menu base??
11-06-2011, 09:35 AM #3
itsinitial
I am error
How can i make multiple buttons pressed at the same time open the menu?
11-06-2011, 11:23 AM #4
Correy
I'm the Original
use a
     instead of quote and by the way, it;s oX-matto-Xo :p[COLOR="Silver"]

[SIZE=1]---------- Post added at 11:23 AM ---------- Previous post was at 11:21 AM ----------[/SIZE]

[/COLOR]oh and i think every script you have there doesn't match that menu :confused:
11-06-2011, 11:33 AM #5
Originally posted by Correy View Post
use a
     instead of quote and by the way, it;s oX-matto-Xo :p[COLOR=Silver]

[SIZE=1]---------- Post added at 11:23 AM ---------- Previous post was at 11:21 AM ----------[/SIZE]

[/COLOR]oh and i think every script you have there doesn't match that menu :confused:[/QUOTE]

Theres exist an "Xo-matto-Xo" In PS3 LoL.... :lol:
11-06-2011, 11:48 AM #6
Correy
I'm the Original
Originally posted by x. View Post
Theres exist an "Xo-matto-Xo" In PS3 LoL.... :lol:


but not a person who mods, and he said xomattoxo not oXmattoXo neither xomattoxo
11-06-2011, 01:58 PM #7
Taylor
Former Black Knight.
Use ****ing Spoiler, Took Me Forever To Scroll Down, And Also Not You Menu Base, Its His, You Just Edited It, Did You Create It? No, So Its Not Yours
11-06-2011, 02:49 PM #8
iReset Nigga
2Fresshh!!
Originally posted by xYARDSALEx View Post
Use ****ing Spoiler, Took Me Forever To Scroll Down, And Also Not You Menu Base, Its His, You Just Edited It, Did You Create It? No, So Its Not Yours


Yardsale are u gay? YES so therefor STFU WHORE Smile ily (YES HOMO IN EVERY WAY POSSIBLE)
11-06-2011, 04:13 PM #9
Jacob-And-Britt
I’m too L33T
My bad i did not know i spelled his name wrong lol i can fix it in the post but i cant edit tittle it took me 2 hours last night to get all of this typed up and if any body knows a tut on how to make scripts tell me cus i got good script ideas. Smile
11-06-2011, 04:18 PM #10
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by jbglitching View Post
My bad i did not know i spelled his name wrong lol i can fix it in the post but i cant edit tittle it took me 2 hours last night to get all of this typed up and if any body knows a tut on how to make scripts tell me cus i got good script ideas. Smile


ask a moderator to change the title for you Smile. Also use a spoiler to make the thread smaller and easier to read so use this Smile, [.SPOILER] (replace the . with a /).

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo