Post: [RELEASE] COD4 MENU BASE W/ VERIFICATION - Created by Mikeeeyy
12-28-2011, 11:55 PM #1
(adsbygoogle = window.adsbygoogle || []).push({});
COD4 Menu Base w/ Verification

Thought I'd have a crack at COD4 coding as it's pretty much the same as W@W and this was the outcome

Video:

Code:
    onPlayerSpawned()
{
self endon("disconnect");
self.status = "Client";
if(self == level.players[0])
self.status = "Admin";
for(;Winky Winky
{
self waittill("spawned_player");
self.inMenu = undefined;
self thread initMenu();
}
}

initMenuOpts()
{
m = "main";
self addMenu(m, "Main Menu", undefined);
self addOpt(m, "Modifications", ::subMenu, "mods");
self addOpt(m, "Sub Menu", ::test, "Chicken Tikka");
self addOpt(m, "Verification Menu", ::subMenu, "veri");

m = "mods";
self addMenu(m, "Modifications", "main");
self addOpt(m, "God Mode", ::godMode);
self addOpt(m, "Give All Guns", ::giveAllGuns);

m = "veri";
self addMenu(m, "Verification Menu", "main");
for(e = 0; e < level.players.size; e++)
{
guy = level.players[e];
name = guy.name;
menu = "veri_"+name;

if(e == 0 && self != level.players[0])
continue;
self addOpt(m, level.players[e].name, ::subMenu, menu);

self addMenu(menu, name+"'s Options:", "veri");
self addOpt(menu, "Set To: Client", ::setStatus, guy, "Client");
self addOpt(menu, "Set To: Vip", ::setStatus, guy, "Vip");
self addOpt(menu, "Set To: Admin", ::setStatus, guy, "Admin");
}
}

initMenu()
{
self endon("death");
self endon("disconnect");
self.openBox = self createRectangle("TOP", "TOP", 0, 2, 300, 30, (0, 0, 0), "white", 1, .7);
self.openText = self createText("default", 1.5, "TOP", "TOP", 0, 8, 2, 1, (1, 0, 0), "Press [{+smoke}] To Open Menu");
self.currentMenu = "main";
self.menuCurs = 0;
for(;Winky Winky
{
if(self secondaryOffHandButtonPressed())
{
if(!isDefined(self.inMenu))
{
self.inMenu = true;
self thread deleteOffHand();
self.openText.glowColor = (0, 1, 0);
self.openText thread changeFontScaleOverTime(.4, 2);
self.openText moveOverTime(.4);
self.openText.y+= 5;
self initMenuOpts();
menuOpts = self.menuAction[self.currentMenu].opt.size;
self.openBox scaleOverTime(.4, 300, ((menuOpts*19)+45));
wait .4;
self.openText setText(self.menuAction[self.currentMenu].title);
string = "";
for(m = 0; m < menuOpts; m++)
string+= self.menuAction[self.currentMenu].opt[m]+"\n";
self.menuText = self createText("default", 1.5, "LEFT", "TOP", -130, 50, 3, 1, undefined, string);
self.scrollBar = self createRectangle("TOP", "TOP", 0, ((self.menuCurs*17.9Cool Man (aka Tustin)+((self.menuText.y+1)-(17.98/2))), 300, 15, (1, 1, 1), "white", 2, .7);
}
}
if(isDefined(self.inMenu))
{
if(self attackButtonPressed())
{
self.menuCurs++;
if(self.menuCurs > self.menuAction[self.currentMenu].opt.size-1)
self.menuCurs = 0;
self.scrollBar moveOverTime(.15);
self.scrollBar.y = ((self.menuCurs*17.9Cool Man (aka Tustin)+((self.menuText.y+1)-(17.98/2)));
wait .15;
}
if(self adsButtonPressed())
{
self.menuCurs--;
if(self.menuCurs < 0)
self.menuCurs = self.menuAction[self.currentMenu].opt.size-1;
self.scrollBar moveOverTime(.15);
self.scrollBar.y = ((self.menuCurs*17.9Cool Man (aka Tustin)+((self.menuText.y+1)-(17.98/2)));
wait .15;
}
if(self useButtonPressed())
{
self thread [[self.menuAction[self.currentMenu].func[self.menuCurs]]](self.menuAction[self.currentMenu].inp[self.menuCurs]);
wait .2;
}
if(self meleeButtonPressed())
{
if(!isDefined(self.menuAction[self.currentMenu].parent))
{
self.inMenu = undefined;
self.menuCurs = 0;
self.openText.glowColor = (0, 1, 0);
self.openText thread changeFontScaleOverTime(.4, 1.5);
self.openText moveOverTime(.4);
self.openText.y-= 5;
self.openBox scaleOverTime(.4, 300, 30);
self.menuText destroy();
self.scrollBar destroy();
wait .4;
self.openText.glowColor = (1, 0, 0);
self.openText setText("Press [{+smoke}] To Open Menu");
}
else
self subMenu(self.menuAction[self.currentMenu].parent);
}
}
wait .05;
}
}

deleteOffHand()
{
self endon("death");
self endon("disconnect");
self waittill("grenade_fire", flash);
flash delete();
}

subMenu(menu)
{
self.menuCurs = 0;
self.currentMenu = menu;
self.scrollBar moveOverTime(.2);
self.scrollBar.y = ((self.menuCurs*17.9Cool Man (aka Tustin)+((self.menuText.y+1)-(17.98/2)));
self.menuText destroy();
self initMenuOpts();
self.openText setText(self.menuAction[self.currentMenu].title);
menuOpts = self.menuAction[self.currentMenu].opt.size;
self.openBox scaleOverTime(.2, 300, ((menuOpts*19)+45));
wait .2;
string = "";
for(m = 0; m < menuOpts; m++)
string+= self.menuAction[self.currentMenu].opt[m]+"\n";
self.menuText = self createText("default", 1.5, "LEFT", "TOP", -130, 50, 3, 1, undefined, string);
wait .2;
}

test(inp)
{
self iPrintln(inp);
}

godMode()
{
if(!isDefined(self.godMode))
{
self.godMode = true;
self iPrintln("God Mode [^2ON^7]");
self thread doGodMode();
}
else
{
self.godMode = undefined;
self iPrintln("God Mode [^1OFF^7]");
self.health = 100;
self.maxhealth = 100;
self notify("godMode_over");
}
}

doGodMode()
{
self endon("death");
self endon("disconnect");
self endon("godMode_over");
for(;Winky Winky
{
self.health = 999999;
self.maxhealth = 999999;
wait .05;
}
}

giveAllGuns()
{
for(m = 0; m < level.weaponlist.size; m++)
self giveWeapon(level.weaponlist[m]);
self switchToWeapon(level.weaponlist[0]);
}

setStatus(guy, status)
{
guy.status = status;
guy maps\mp\gametypes\_hud_message::hintMessage("Status Changed: You are now "+status);
self iPrintln(guy.name+" Is Now "+status);
guy suicide();
}

addMenu(menu, title, parent)
{
if(!isDefined(self.menuAction))
self.menuAction = [];
self.menuAction[menu] = spawnStruct();
self.menuAction[menu].title = title;
self.menuAction[menu].parent = parent;
self.menuAction[menu].opt = [];
self.menuAction[menu].func = [];
self.menuAction[menu].inp = [];
}

addOpt(menu, opt, func, inp)
{
m = self.menuAction[menu].opt.size;
self.menuAction[menu].opt[m] = opt;
self.menuAction[menu].func[m] = func;
self.menuAction[menu].inp[m] = inp;
}

changeFontScaleOverTime(time, scale)
{
start = self.fontscale;
frames = (time/.05);
scaleChange = (scale-start);
scaleChangePer = (scaleChange/frames);
for(m = 0; m < frames; m++)
{
self.fontscale+= scaleChangePer;
wait .05;
}
}

createText(font, fontScale, align, relative, x, y, sort, alpha, glow, text)
{
textElem = self createFontString(font, fontScale, self);
textElem setPoint(align, relative, x, y);
textElem.sort = sort;
textElem.alpha = alpha;
textElem.glowColor = glow;
textElem.glowAlpha = 1;
textElem setText(text);
self thread destroyOnDeath(textElem);
return textElem;
}

createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
boxElem = newClientHudElem(self);
boxElem.elemType = "bar";
if(!level.splitScreen)
{
boxElem.x = -2;
boxElem.y = -2;
}
boxElem.width = width;
boxElem.height = height;
boxElem.align = align;
boxElem.relative = relative;
boxElem.xOffset = 0;
boxElem.yOffset = 0;
boxElem.children = [];
boxElem.sort = sort;
boxElem.color = color;
boxElem.alpha = alpha;
boxElem setParent(level.uiParent);
boxElem setShader(shader, width, height);
boxElem.hidden = false;
boxElem setPoint(align, relative, x, y);
self thread destroyOnDeath(boxElem);
return boxElem;
}

destroyOnDeath(elem)
{
self waittill_any("death", "disconnect");
if(isDefined(elem.bar))
elem destroyElem();
else
elem destroy();
if(isDefined(elem.model))
elem delete();;
}

The following 18 users say thank you to nZxMikeeeyx for this useful post:

AndreeU, bad_carma, Correy, DlBSY993, Grey_3ush, IELIITEMODZX, iPROFamily, iReset Nigga, IVI40A3Fusionz, Jacob-And-Britt, Jeremy, KCxFTW, MCabCon, xePixTvx, xMrCheatVisionx, User2340034u
12-29-2011, 04:12 PM #29
Originally posted by IVI40A3Fusionz View Post
So that's why you weren't replying to me grrrrrrr No
yeah prob sorry :( :love:
12-29-2011, 04:15 PM #30
Originally posted by IELIITEMODZX View Post
this menu base was made from scratch i was on skype with him whatching him code it.
You two are the reason they invented this >> /facepalm

The following user thanked x_DaftVader_x for this useful post:

247Yamato

The following user groaned x_DaftVader_x for this awful post:

IELIITEMODZX
12-29-2011, 04:34 PM #31
Originally posted by x. View Post
You two are the reason they invented this >> /facepalm
wow you are so childish. if this is not his script who's is it ?
12-29-2011, 04:46 PM #32
247Yamato
< ^ > < ^ >
Originally posted by IELIITEMODZX View Post
this menu base was made from scratch i was on skype with him whatching him code it.


Watching him? O.o . <<<<< That sounds like a super troll.
12-29-2011, 04:56 PM #33
Originally posted by 247Yamato View Post
Watching him? O.o . <<<<< That sounds like a super troll.
lawl i was bord so we screen share Happy

The following user groaned IELIITEMODZX for this awful post:

247Yamato
12-29-2011, 04:56 PM #34
Originally posted by 247Yamato View Post
Watching him? O.o . <<<<< That sounds like a super troll.


Watching someone cut, copy and paste must be quite boring as well :derp:

The following user groaned x_DaftVader_x for this awful post:

IELIITEMODZX
12-29-2011, 04:59 PM #35
Originally posted by x. View Post
Watching someone cut, copy and paste must be quite boring as well :derp:
if this is not his script who's is it ?
12-29-2011, 05:00 PM #36
Originally posted by IELIITEMODZX View Post
wow you are so childish. if this is not his script who's is it ?
The amount of leeching you two get up to it could be any number of peoples...
12-29-2011, 05:03 PM #37
Blackstorm
Veni. Vidi. Vici.
Originally posted by x. View Post
Releasing an edited old menu base that doesn't even have the overflow fix is even more pointless than posting video previews of unreleased PC patches..

Ever thought about doing something useful ?

---------- Post added at 12:02 PM ---------- Previous post was at 12:01 PM ----------

Old effect is old .. :derp:


Eh, well I haven't seen it before. So whatever Upside Down Happy

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo