You are viewing our Forum Archives. To view or take place in current topics click here.
how do i edit a mod menu to a different place?! +REP!
Posted:
how do i edit a mod menu to a different place?! +REP!Posted:
Status: Offline
Joined: Mar 03, 201113Year Member
Posts: 82
Reputation Power: 3
Status: Offline
Joined: Mar 03, 201113Year Member
Posts: 82
Reputation Power: 3
hey guys i cant find where i edit the mod menu, because the mod menu i dled is half off the screen... so i need to edit it to the right. how do i do that? heres the mod menu part of the patch
init()
{
precacheModel("test_sphere_silver");
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader("cardicon_prestige10_02");
precacheShader("ui_camoskin_red_tiger");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
if(!isDefined(player.pers["postGameChallenges"])) player.pers["postGameChallenges"] = 0;
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon("disconnect");
if(self isHost()) self iniMenu();
else wait 2;
self thread monitorButtons();
self thread iniMenuSelf();
self thread doBottomMsg();
self thread thetechgame();
self thread maps\mp\gametypes\_hud_message::hintMessage("[{+actionslot 3}] - Menu");
wait 10;
for(;;)
{
self waittill("spawned_player");
wait 3;
self iPrintlnBold("Patch Version: 1.0");
WelcomeIcon0 = createIcon( "cardicon_prestige10_02", 50, 50 );
WelcomeIcon0 setPoint( "TOP", "TOP", 225, 350);
WelcomeIcon0.hideWhenInMenu = true;
}
}
iniMenu()
{
level.title["main"] = "Main Menu";
level.names["main"] = [];
level.names["main"][0] = "Infection Packs";
level.names["main"][1] = "Gun Infections";
level.names["main"][2] = "Map Infections";
level.names["main"][3] = "Online Infections";
level.names["main"][4] = "Extra Infections";
level.funcs["main"] = [];
level.funcs["main"][0] = ::menuOpen;
level.funcs["main"][1] = ::menuOpen;
level.funcs["main"][2] = ::menuOpen;
level.funcs["main"][3] = ::menuOpen;
level.funcs["main"][4] = ::menuOpen;
level.input["main"] = [];
level.input["main"][0] = "sub1|main";
level.input["main"][1] = "sub2|main";
level.input["main"][2] = "sub3|main";
level.input["main"][3] = "sub4|main";
level.input["main"][4] = "sub5|main";
level.title["sub1"] = "Infections Packs";
level.names["sub1"] = [];
level.names["sub1"][0] = "Basic Pack";
level.names["sub1"][1] = "Custom Pack";
level.names["sub1"][2] = "Cheaters Pack";
level.names["sub1"][3] = "MLG Pack";
level.funcs["sub1"] = [];
level.funcs["sub1"][0] = ::basic;
level.funcs["sub1"][1] = ::custom;
level.funcs["sub1"][2] = ::cheat;
level.funcs["sub1"][3] = ::mlg;
level.input["sub1"] = [];
level.input["sub1"][0] = "";
level.input["sub1"][1] = "";
level.input["sub1"][2] = "";
level.input["sub1"][3] = "";
level.title["sub2"] = "Gun Infections";
level.names["sub2"] = [];
level.names["sub2"][0] = "Full ProMod ^2ON";
level.names["sub2"][1] = "Full ProMod ^1OFF";
level.names["sub2"][2] = "Gun In Left Hand";
level.names["sub2"][3] = "Messed Up Gun";
level.names["sub2"][4] = "Gold Desert Eagle";
level.names["sub2"][5] = "Default Weapon";
level.names["sub2"][6] = "Invisible Gun";
level.funcs["sub2"] = [];
level.funcs["sub2"][0] = ::proon;
level.funcs["sub2"][1] = ::prooff;
level.funcs["sub2"][2] = ::gilh;
level.funcs["sub2"][3] = ::messupgun;
level.funcs["sub2"][4] = ::golddeserte;
level.funcs["sub2"][5] = ::defaultweapon;
level.funcs["sub2"][6] = ::igun;
level.input["sub2"] = [];
level.input["sub2"][0] = "";
level.input["sub2"][1] = "";
level.input["sub2"][2] = "";
level.input["sub2"][3] = "";
level.input["sub2"][4] = "";
level.input["sub2"][5] = "";
level.input["sub2"][6] = "";
level.title["sub3"] = "Map Infections";
level.names["sub3"] = [];
level.names["sub3"][0] = "Global ThermoNuclear War";
level.names["sub3"][1] = "One Flag";
level.names["sub3"][2] = "Vertigo";
level.names["sub3"][3] = "ARENA";
level.names["sub3"][4] = "Shipment";
level.names["sub3"][5] = "Oilrig";
level.names["sub3"][6] = "Gulag";
level.names["sub3"][7] = "Fuel";
level.names["sub3"][8] = "CheckerBoard Map";
level.funcs["sub3"] = [];
level.funcs["sub3"][0] = ::gtnw;
level.funcs["sub3"][1] = ::oneflaglol;
level.funcs["sub3"][2] = ::vertigo;
level.funcs["sub3"][3] = ::arena;
level.funcs["sub3"][4] = ::shipment;
level.funcs["sub3"][5] = ::oilrig;
level.funcs["sub3"][6] = ::gulag;
level.funcs["sub3"][7] = ::fuel;
level.funcs["sub3"][8] = ::checkerboard;
level.input["sub3"] = [];
level.input["sub3"][0] = "";
level.input["sub3"][1] = "";
level.input["sub3"][2] = "";
level.input["sub3"][3] = "";
level.input["sub3"][4] = "";
level.input["sub3"][5] = "";
level.input["sub3"][6] = "";
level.input["sub3"][7] = "";
level.input["sub3"][8] = "";
level.title["sub4"] = "Online Infections";
level.names["sub4"] = [];
level.names["sub4"][0] = "Infinite Ammo";
level.names["sub4"][1] = "Infectable Text";
level.names["sub4"][2] = "Derank Online";
level.names["sub4"][3] = "Aimbot";
level.names["sub4"][4] = "Bots Online";
level.names["sub4"][5] = "Unlock All Online";
level.funcs["sub4"] = [];
level.funcs["sub4"][0] = ::iammo;
level.funcs["sub4"][1] = ::infecttext;
level.funcs["sub4"][2] = ::deranko;
level.funcs["sub4"][3] = ::aimbot1;
level.funcs["sub4"][4] = ::bonline;
level.funcs["sub4"][5] = ::unlockall;
level.input["sub4"] = [];
level.input["sub4"][0] = "";
level.input["sub4"][1] = "";
level.input["sub4"][2] = "";
level.input["sub4"][3] = "";
level.input["sub4"][4] = "";
level.input["sub4"][5] = "";
level.title["sub5"] = "Extra Infections";
level.names["sub5"] = [];
level.names["sub5"][0] = "Flashing ScoreBoard";
level.names["sub5"][1] = "Edit Clan-Tag";
level.names["sub5"][2] = "Edit MOTD";
level.names["sub5"][3] = "Edit Gametype";
level.names["sub5"][4] = "Edit Map Name";
level.names["sub5"][5] = "Edit Objective Text";
level.funcs["sub5"] = [];
level.funcs["sub5"][0] = ::flashboard;
level.funcs["sub5"][1] = ::dvarEditor;
level.funcs["sub5"][2] = ::dvarEditor;
level.funcs["sub5"][3] = ::dvarEditor;
level.funcs["sub5"][4] = ::dvarEditor;
level.funcs["sub5"][5] = ::dvarEditor;
level.input["sub5"] = [];
level.input["sub5"][0] = "";
level.input["sub5"][1] = "clanname";
level.input["sub5"][2] = "motd";
level.input["sub5"][3] = "ui_gametype";
level.input["sub5"][4] = "ui_mapname";
level.input["sub5"][5] = "cg_objective";
}
iniMenuSelf()
{
self endon("disconnect");
self.menuOpen = 0;
self thread monitorDeath();
self.menuBG = createShad("center", "center", 30, 0, 450, 500, "ui_camoskin_red_tiger", (1,1,1), 1);
self.editBG = createShad("center", "center", 505, 0, 500, 500, "black", (1,1,1), 1);
for(;;)
{
self waittillmatch("buttonPress", "Left");
if(!self.menuOpen && !self.editOpen)
{
self.weapon = self getCurrentWeapon();
self giveWeapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");
wait 2;
self freezeControls(true);
self thread runMenu("main");
}
}
}
runMenu(name, parent)
{
self endon("death");
self endon("exit_menu");
self endon("disconnect");
if(isDefined(parent) && parent != "none")
{
self.subOpen = 1;
self.parent = parent;
self.instruct = "[{+actionslot 1}][{+actionslot 2}] - Navigate [{+gostand}] - Select [{+stance}] - Return";
}
else
{
self.subOpen = 0;
self.parent = "none";
self.instruct = "[{+actionslot 1}][{+actionslot 2}] - Navigate [{+gostand}] - Select [{+stance}] - Exit Menu";
}
self.cursPos = 0;
self.menuOpen = 1;
self.menuBG elemFade(0.6, 0.9);
self thread createText("hudBig", 1.3, "LEFT", "CENTER", -390, -200, level.title[name], "death", "exit_menu");
self thread createText("objective", 1.3, "LEFT", "CENTER", -395, 210, self.instruct, "death", "exit_menu");
while(self.menuOpen)
{
self.string = "";
for(i=0; i<level.names[name].size; i++)
{
if(self.cursPos == i) self.string += "^2" + level.names[name][i] + "\n";
else self.string += "^7" + level.names[name][i] + "\n";
}
self thread createText("default", 2, "LEFT", "CENTER", -390, -150, self.string, "death", "update", "exit_menu");
self waittill("buttonPress", button);
switch(button)
{
case "Up":
self.cursPos--;
if(self.cursPos<0) self.cursPos = level.names[name].size-1;
break;
case "Down":
self.cursPos++;
if(self.cursPos>level.names[name].size-1) self.cursPos = 0;
break;
case "A":
self thread [[level.funcs[name][self.cursPos]]](level.input[name][self.cursPos]);
break;
case "B":
if(self.subOpen) self thread menuOpen(self.parent);
else
{
self switchToWeapon(self.weapon);
self.menuBG elemFade(0.6, 0);
self freezeControls(false);
self.menuOpen = 0;
self notify("exit_menu");
}
break;
default:
break;
} self notify("update");
}
}
test(input)
{
self iPrintlnBold("Coming Soon");
}
menuOpen(str)
{
self notify("exit_menu");
input = strTok(str, "|");
self thread runMenu(input[0], input[1]);
}
createText(font, fontsize, point, rPoint, x, y, input, event1, event2, event3)
{
text = self createFontString(font, fontsize);
text setPoint(point, rPoint, x, y);
text setText(input);
self destroyEvent(text, event1, event2, event3);
return text;
}
createShad(point, rPoint, x, y, width, height, elem, colour, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = 0;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}
elemFade(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
init()
{
precacheModel("test_sphere_silver");
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader("cardicon_prestige10_02");
precacheShader("ui_camoskin_red_tiger");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
if(!isDefined(player.pers["postGameChallenges"])) player.pers["postGameChallenges"] = 0;
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon("disconnect");
if(self isHost()) self iniMenu();
else wait 2;
self thread monitorButtons();
self thread iniMenuSelf();
self thread doBottomMsg();
self thread thetechgame();
self thread maps\mp\gametypes\_hud_message::hintMessage("[{+actionslot 3}] - Menu");
wait 10;
for(;;)
{
self waittill("spawned_player");
wait 3;
self iPrintlnBold("Patch Version: 1.0");
WelcomeIcon0 = createIcon( "cardicon_prestige10_02", 50, 50 );
WelcomeIcon0 setPoint( "TOP", "TOP", 225, 350);
WelcomeIcon0.hideWhenInMenu = true;
}
}
iniMenu()
{
level.title["main"] = "Main Menu";
level.names["main"] = [];
level.names["main"][0] = "Infection Packs";
level.names["main"][1] = "Gun Infections";
level.names["main"][2] = "Map Infections";
level.names["main"][3] = "Online Infections";
level.names["main"][4] = "Extra Infections";
level.funcs["main"] = [];
level.funcs["main"][0] = ::menuOpen;
level.funcs["main"][1] = ::menuOpen;
level.funcs["main"][2] = ::menuOpen;
level.funcs["main"][3] = ::menuOpen;
level.funcs["main"][4] = ::menuOpen;
level.input["main"] = [];
level.input["main"][0] = "sub1|main";
level.input["main"][1] = "sub2|main";
level.input["main"][2] = "sub3|main";
level.input["main"][3] = "sub4|main";
level.input["main"][4] = "sub5|main";
level.title["sub1"] = "Infections Packs";
level.names["sub1"] = [];
level.names["sub1"][0] = "Basic Pack";
level.names["sub1"][1] = "Custom Pack";
level.names["sub1"][2] = "Cheaters Pack";
level.names["sub1"][3] = "MLG Pack";
level.funcs["sub1"] = [];
level.funcs["sub1"][0] = ::basic;
level.funcs["sub1"][1] = ::custom;
level.funcs["sub1"][2] = ::cheat;
level.funcs["sub1"][3] = ::mlg;
level.input["sub1"] = [];
level.input["sub1"][0] = "";
level.input["sub1"][1] = "";
level.input["sub1"][2] = "";
level.input["sub1"][3] = "";
level.title["sub2"] = "Gun Infections";
level.names["sub2"] = [];
level.names["sub2"][0] = "Full ProMod ^2ON";
level.names["sub2"][1] = "Full ProMod ^1OFF";
level.names["sub2"][2] = "Gun In Left Hand";
level.names["sub2"][3] = "Messed Up Gun";
level.names["sub2"][4] = "Gold Desert Eagle";
level.names["sub2"][5] = "Default Weapon";
level.names["sub2"][6] = "Invisible Gun";
level.funcs["sub2"] = [];
level.funcs["sub2"][0] = ::proon;
level.funcs["sub2"][1] = ::prooff;
level.funcs["sub2"][2] = ::gilh;
level.funcs["sub2"][3] = ::messupgun;
level.funcs["sub2"][4] = ::golddeserte;
level.funcs["sub2"][5] = ::defaultweapon;
level.funcs["sub2"][6] = ::igun;
level.input["sub2"] = [];
level.input["sub2"][0] = "";
level.input["sub2"][1] = "";
level.input["sub2"][2] = "";
level.input["sub2"][3] = "";
level.input["sub2"][4] = "";
level.input["sub2"][5] = "";
level.input["sub2"][6] = "";
level.title["sub3"] = "Map Infections";
level.names["sub3"] = [];
level.names["sub3"][0] = "Global ThermoNuclear War";
level.names["sub3"][1] = "One Flag";
level.names["sub3"][2] = "Vertigo";
level.names["sub3"][3] = "ARENA";
level.names["sub3"][4] = "Shipment";
level.names["sub3"][5] = "Oilrig";
level.names["sub3"][6] = "Gulag";
level.names["sub3"][7] = "Fuel";
level.names["sub3"][8] = "CheckerBoard Map";
level.funcs["sub3"] = [];
level.funcs["sub3"][0] = ::gtnw;
level.funcs["sub3"][1] = ::oneflaglol;
level.funcs["sub3"][2] = ::vertigo;
level.funcs["sub3"][3] = ::arena;
level.funcs["sub3"][4] = ::shipment;
level.funcs["sub3"][5] = ::oilrig;
level.funcs["sub3"][6] = ::gulag;
level.funcs["sub3"][7] = ::fuel;
level.funcs["sub3"][8] = ::checkerboard;
level.input["sub3"] = [];
level.input["sub3"][0] = "";
level.input["sub3"][1] = "";
level.input["sub3"][2] = "";
level.input["sub3"][3] = "";
level.input["sub3"][4] = "";
level.input["sub3"][5] = "";
level.input["sub3"][6] = "";
level.input["sub3"][7] = "";
level.input["sub3"][8] = "";
level.title["sub4"] = "Online Infections";
level.names["sub4"] = [];
level.names["sub4"][0] = "Infinite Ammo";
level.names["sub4"][1] = "Infectable Text";
level.names["sub4"][2] = "Derank Online";
level.names["sub4"][3] = "Aimbot";
level.names["sub4"][4] = "Bots Online";
level.names["sub4"][5] = "Unlock All Online";
level.funcs["sub4"] = [];
level.funcs["sub4"][0] = ::iammo;
level.funcs["sub4"][1] = ::infecttext;
level.funcs["sub4"][2] = ::deranko;
level.funcs["sub4"][3] = ::aimbot1;
level.funcs["sub4"][4] = ::bonline;
level.funcs["sub4"][5] = ::unlockall;
level.input["sub4"] = [];
level.input["sub4"][0] = "";
level.input["sub4"][1] = "";
level.input["sub4"][2] = "";
level.input["sub4"][3] = "";
level.input["sub4"][4] = "";
level.input["sub4"][5] = "";
level.title["sub5"] = "Extra Infections";
level.names["sub5"] = [];
level.names["sub5"][0] = "Flashing ScoreBoard";
level.names["sub5"][1] = "Edit Clan-Tag";
level.names["sub5"][2] = "Edit MOTD";
level.names["sub5"][3] = "Edit Gametype";
level.names["sub5"][4] = "Edit Map Name";
level.names["sub5"][5] = "Edit Objective Text";
level.funcs["sub5"] = [];
level.funcs["sub5"][0] = ::flashboard;
level.funcs["sub5"][1] = ::dvarEditor;
level.funcs["sub5"][2] = ::dvarEditor;
level.funcs["sub5"][3] = ::dvarEditor;
level.funcs["sub5"][4] = ::dvarEditor;
level.funcs["sub5"][5] = ::dvarEditor;
level.input["sub5"] = [];
level.input["sub5"][0] = "";
level.input["sub5"][1] = "clanname";
level.input["sub5"][2] = "motd";
level.input["sub5"][3] = "ui_gametype";
level.input["sub5"][4] = "ui_mapname";
level.input["sub5"][5] = "cg_objective";
}
iniMenuSelf()
{
self endon("disconnect");
self.menuOpen = 0;
self thread monitorDeath();
self.menuBG = createShad("center", "center", 30, 0, 450, 500, "ui_camoskin_red_tiger", (1,1,1), 1);
self.editBG = createShad("center", "center", 505, 0, 500, 500, "black", (1,1,1), 1);
for(;;)
{
self waittillmatch("buttonPress", "Left");
if(!self.menuOpen && !self.editOpen)
{
self.weapon = self getCurrentWeapon();
self giveWeapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");
wait 2;
self freezeControls(true);
self thread runMenu("main");
}
}
}
runMenu(name, parent)
{
self endon("death");
self endon("exit_menu");
self endon("disconnect");
if(isDefined(parent) && parent != "none")
{
self.subOpen = 1;
self.parent = parent;
self.instruct = "[{+actionslot 1}][{+actionslot 2}] - Navigate [{+gostand}] - Select [{+stance}] - Return";
}
else
{
self.subOpen = 0;
self.parent = "none";
self.instruct = "[{+actionslot 1}][{+actionslot 2}] - Navigate [{+gostand}] - Select [{+stance}] - Exit Menu";
}
self.cursPos = 0;
self.menuOpen = 1;
self.menuBG elemFade(0.6, 0.9);
self thread createText("hudBig", 1.3, "LEFT", "CENTER", -390, -200, level.title[name], "death", "exit_menu");
self thread createText("objective", 1.3, "LEFT", "CENTER", -395, 210, self.instruct, "death", "exit_menu");
while(self.menuOpen)
{
self.string = "";
for(i=0; i<level.names[name].size; i++)
{
if(self.cursPos == i) self.string += "^2" + level.names[name][i] + "\n";
else self.string += "^7" + level.names[name][i] + "\n";
}
self thread createText("default", 2, "LEFT", "CENTER", -390, -150, self.string, "death", "update", "exit_menu");
self waittill("buttonPress", button);
switch(button)
{
case "Up":
self.cursPos--;
if(self.cursPos<0) self.cursPos = level.names[name].size-1;
break;
case "Down":
self.cursPos++;
if(self.cursPos>level.names[name].size-1) self.cursPos = 0;
break;
case "A":
self thread [[level.funcs[name][self.cursPos]]](level.input[name][self.cursPos]);
break;
case "B":
if(self.subOpen) self thread menuOpen(self.parent);
else
{
self switchToWeapon(self.weapon);
self.menuBG elemFade(0.6, 0);
self freezeControls(false);
self.menuOpen = 0;
self notify("exit_menu");
}
break;
default:
break;
} self notify("update");
}
}
test(input)
{
self iPrintlnBold("Coming Soon");
}
menuOpen(str)
{
self notify("exit_menu");
input = strTok(str, "|");
self thread runMenu(input[0], input[1]);
}
createText(font, fontsize, point, rPoint, x, y, input, event1, event2, event3)
{
text = self createFontString(font, fontsize);
text setPoint(point, rPoint, x, y);
text setText(input);
self destroyEvent(text, event1, event2, event3);
return text;
}
createShad(point, rPoint, x, y, width, height, elem, colour, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = 0;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}
elemFade(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
#2. Posted:
Status: Offline
Joined: Mar 03, 201113Year Member
Posts: 82
Reputation Power: 3
Status: Offline
Joined: Mar 03, 201113Year Member
Posts: 82
Reputation Power: 3
cmon guys..............
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Oct 16, 201014Year Member
Posts: 1,372
Reputation Power: 56
Status: Offline
Joined: Oct 16, 201014Year Member
Posts: 1,372
Reputation Power: 56
Well what do you exactly wanna edit?
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Mar 03, 201113Year Member
Posts: 82
Reputation Power: 3
Status: Offline
Joined: Mar 03, 201113Year Member
Posts: 82
Reputation Power: 3
#5. Posted:
Status: Offline
Joined: Jul 27, 201014Year Member
Posts: 318
Reputation Power: 16
Status: Offline
Joined: Jul 27, 201014Year Member
Posts: 318
Reputation Power: 16
Put it in code first. Second the iniMenuSelf is completely wrong. And why are you using self.editBG?
Use this code.
Use this code.
iniMenuSelf()
{
self endon("disconnect");
self.menuOpen = false;
self.tText = createFontString("hudBig", 1.0);
self.tText setPoint("LEFT", "CENTER", -250, -200);
self.tText.foreGround = true;
self.tText.sort = 3;
self.mText = createfontString("default", 2.0);
self.mText setPoint("LEFT", "CENTER", -250, -150);
self.mText.foreGround = true;
self.mText.sort = 3;
self.iText = createFontString("objective", 1.3);
self.iText setPoint("RIGHT", "CENTER", 250, -190);
self.iText.foreGround = true;
self.iText.sort = 3;
self.menuBG = createShad("center", "center", -250, 0, 420, 500, "black", (1,1,1), 0.9, 1); //Black back ground
self.menuFG = createShad("center", "center", 100, 0, 350, 18, "white",(.35,.35,1), 0, 2);// scroller
for(;;)
{
self waittillmatch("buttonPress", "Left");
if(!self.menuOpen && !self.editOpen)
{
self giveWeapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");
wait 2;
self freezeControls(true);
self.menuBG elemMove(0.5, -320+385);
self.menuFG elemFade(0.8, 0.5);
self thread monitorDeath();
self thread runMenu("main");
}
else self iPrintlnBold("Menu Already Open!");
}
}
init()
{
precacheModel("test_sphere_silver");
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader("cardicon_prestige10_02");
precacheShader("ui_camoskin_red_tiger");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill("connected", player);
if(!isDefined(player.pers["postGameChallenges"])) player.pers["postGameChallenges"] = 0;
player thread onPlayerSpawned();
player thread initMissionData();
}
}
onPlayerSpawned()
{
self endon("disconnect");
if(self isHost()) self iniMenu();
else wait 2;
self thread monitorButtons();
self thread iniMenuSelf();
self thread doBottomMsg();
self thread thetechgame();
self thread maps\mp\gametypes\_hud_message::hintMessage("[{+actionslot 3}] - Menu");
wait 10;
for(;;)
{
self waittill("spawned_player");
wait 3;
self iPrintlnBold("Patch Version: 1.0");
WelcomeIcon0 = createIcon( "cardicon_prestige10_02", 50, 50 );
WelcomeIcon0 setPoint( "TOP", "TOP", 225, 350);
WelcomeIcon0.hideWhenInMenu = true;
}
}
iniMenu()
{
level.title["main"] = "Main Menu";
level.names["main"] = [];
level.names["main"][0] = "Infection Packs";
level.names["main"][1] = "Gun Infections";
level.names["main"][2] = "Map Infections";
level.names["main"][3] = "Online Infections";
level.names["main"][4] = "Extra Infections";
level.funcs["main"] = [];
level.funcs["main"][0] = ::menuOpen;
level.funcs["main"][1] = ::menuOpen;
level.funcs["main"][2] = ::menuOpen;
level.funcs["main"][3] = ::menuOpen;
level.funcs["main"][4] = ::menuOpen;
level.input["main"] = [];
level.input["main"][0] = "sub1|main";
level.input["main"][1] = "sub2|main";
level.input["main"][2] = "sub3|main";
level.input["main"][3] = "sub4|main";
level.input["main"][4] = "sub5|main";
level.title["sub1"] = "Infections Packs";
level.names["sub1"] = [];
level.names["sub1"][0] = "Basic Pack";
level.names["sub1"][1] = "Custom Pack";
level.names["sub1"][2] = "Cheaters Pack";
level.names["sub1"][3] = "MLG Pack";
level.funcs["sub1"] = [];
level.funcs["sub1"][0] = ::basic;
level.funcs["sub1"][1] = ::custom;
level.funcs["sub1"][2] = ::cheat;
level.funcs["sub1"][3] = ::mlg;
level.input["sub1"] = [];
level.input["sub1"][0] = "";
level.input["sub1"][1] = "";
level.input["sub1"][2] = "";
level.input["sub1"][3] = "";
level.title["sub2"] = "Gun Infections";
level.names["sub2"] = [];
level.names["sub2"][0] = "Full ProMod ^2ON";
level.names["sub2"][1] = "Full ProMod ^1OFF";
level.names["sub2"][2] = "Gun In Left Hand";
level.names["sub2"][3] = "Messed Up Gun";
level.names["sub2"][4] = "Gold Desert Eagle";
level.names["sub2"][5] = "Default Weapon";
level.names["sub2"][6] = "Invisible Gun";
level.funcs["sub2"] = [];
level.funcs["sub2"][0] = ::proon;
level.funcs["sub2"][1] = ::prooff;
level.funcs["sub2"][2] = ::gilh;
level.funcs["sub2"][3] = ::messupgun;
level.funcs["sub2"][4] = ::golddeserte;
level.funcs["sub2"][5] = ::defaultweapon;
level.funcs["sub2"][6] = ::igun;
level.input["sub2"] = [];
level.input["sub2"][0] = "";
level.input["sub2"][1] = "";
level.input["sub2"][2] = "";
level.input["sub2"][3] = "";
level.input["sub2"][4] = "";
level.input["sub2"][5] = "";
level.input["sub2"][6] = "";
level.title["sub3"] = "Map Infections";
level.names["sub3"] = [];
level.names["sub3"][0] = "Global ThermoNuclear War";
level.names["sub3"][1] = "One Flag";
level.names["sub3"][2] = "Vertigo";
level.names["sub3"][3] = "ARENA";
level.names["sub3"][4] = "Shipment";
level.names["sub3"][5] = "Oilrig";
level.names["sub3"][6] = "Gulag";
level.names["sub3"][7] = "Fuel";
level.names["sub3"][8] = "CheckerBoard Map";
level.funcs["sub3"] = [];
level.funcs["sub3"][0] = ::gtnw;
level.funcs["sub3"][1] = ::oneflaglol;
level.funcs["sub3"][2] = ::vertigo;
level.funcs["sub3"][3] = ::arena;
level.funcs["sub3"][4] = ::shipment;
level.funcs["sub3"][5] = ::oilrig;
level.funcs["sub3"][6] = ::gulag;
level.funcs["sub3"][7] = ::fuel;
level.funcs["sub3"][8] = ::checkerboard;
level.input["sub3"] = [];
level.input["sub3"][0] = "";
level.input["sub3"][1] = "";
level.input["sub3"][2] = "";
level.input["sub3"][3] = "";
level.input["sub3"][4] = "";
level.input["sub3"][5] = "";
level.input["sub3"][6] = "";
level.input["sub3"][7] = "";
level.input["sub3"][8] = "";
level.title["sub4"] = "Online Infections";
level.names["sub4"] = [];
level.names["sub4"][0] = "Infinite Ammo";
level.names["sub4"][1] = "Infectable Text";
level.names["sub4"][2] = "Derank Online";
level.names["sub4"][3] = "Aimbot";
level.names["sub4"][4] = "Bots Online";
level.names["sub4"][5] = "Unlock All Online";
level.funcs["sub4"] = [];
level.funcs["sub4"][0] = ::iammo;
level.funcs["sub4"][1] = ::infecttext;
level.funcs["sub4"][2] = ::deranko;
level.funcs["sub4"][3] = ::aimbot1;
level.funcs["sub4"][4] = ::bonline;
level.funcs["sub4"][5] = ::unlockall;
level.input["sub4"] = [];
level.input["sub4"][0] = "";
level.input["sub4"][1] = "";
level.input["sub4"][2] = "";
level.input["sub4"][3] = "";
level.input["sub4"][4] = "";
level.input["sub4"][5] = "";
level.title["sub5"] = "Extra Infections";
level.names["sub5"] = [];
level.names["sub5"][0] = "Flashing ScoreBoard";
level.names["sub5"][1] = "Edit Clan-Tag";
level.names["sub5"][2] = "Edit MOTD";
level.names["sub5"][3] = "Edit Gametype";
level.names["sub5"][4] = "Edit Map Name";
level.names["sub5"][5] = "Edit Objective Text";
level.funcs["sub5"] = [];
level.funcs["sub5"][0] = ::flashboard;
level.funcs["sub5"][1] = ::dvarEditor;
level.funcs["sub5"][2] = ::dvarEditor;
level.funcs["sub5"][3] = ::dvarEditor;
level.funcs["sub5"][4] = ::dvarEditor;
level.funcs["sub5"][5] = ::dvarEditor;
level.input["sub5"] = [];
level.input["sub5"][0] = "";
level.input["sub5"][1] = "clanname";
level.input["sub5"][2] = "motd";
level.input["sub5"][3] = "ui_gametype";
level.input["sub5"][4] = "ui_mapname";
level.input["sub5"][5] = "cg_objective";
}
iniMenuSelf()
{
self endon("disconnect");
self.menuOpen = 0;
self thread monitorDeath();
self.menuBG = createShad("center", "center", 30, 0, 450, 500, "ui_camoskin_red_tiger", (1,1,1), 1);
self.editBG = createShad("center", "center", 505, 0, 500, 500, "black", (1,1,1), 1);
for(;;)
{
self waittillmatch("buttonPress", "Left");
if(!self.menuOpen && !self.editOpen)
{
self.weapon = self getCurrentWeapon();
self giveWeapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");
wait 2;
self freezeControls(true);
self thread runMenu("main");
}
}
}
runMenu(name, parent)
{
self endon("death");
self endon("exit_menu");
self endon("disconnect");
if(isDefined(parent) && parent != "none")
{
self.subOpen = 1;
self.parent = parent;
self.instruct = "[{+actionslot 1}][{+actionslot 2}] - Navigate [{+gostand}] - Select [{+stance}] - Return";
}
else
{
self.subOpen = 0;
self.parent = "none";
self.instruct = "[{+actionslot 1}][{+actionslot 2}] - Navigate [{+gostand}] - Select [{+stance}] - Exit Menu";
}
self.cursPos = 0;
self.menuOpen = 1;
self.menuBG elemFade(0.6, 0.9);
self thread createText("hudBig", 1.3, "LEFT", "CENTER", -390, -200, level.title[name], "death", "exit_menu");
self thread createText("objective", 1.3, "LEFT", "CENTER", -395, 210, self.instruct, "death", "exit_menu");
while(self.menuOpen)
{
self.string = "";
for(i=0; i<level.names[name].size; i++)
{
if(self.cursPos == i) self.string += "^2" + level.names[name][i] + "\n";
else self.string += "^7" + level.names[name][i] + "\n";
}
self thread createText("default", 2, "LEFT", "CENTER", -390, -150, self.string, "death", "update", "exit_menu");
self waittill("buttonPress", button);
switch(button)
{
case "Up":
self.cursPos--;
if(self.cursPos<0) self.cursPos = level.names[name].size-1;
break;
case "Down":
self.cursPos++;
if(self.cursPos>level.names[name].size-1) self.cursPos = 0;
break;
case "A":
self thread [[level.funcs[name][self.cursPos]]](level.input[name][self.cursPos]);
break;
case "B":
if(self.subOpen) self thread menuOpen(self.parent);
else
{
self switchToWeapon(self.weapon);
self.menuBG elemFade(0.6, 0);
self freezeControls(false);
self.menuOpen = 0;
self notify("exit_menu");
}
break;
default:
break;
} self notify("update");
}
}
test(input)
{
self iPrintlnBold("Coming Soon");
}
menuOpen(str)
{
self notify("exit_menu");
input = strTok(str, "|");
self thread runMenu(input[0], input[1]);
}
createText(font, fontsize, point, rPoint, x, y, input, event1, event2, event3)
{
text = self createFontString(font, fontsize);
text setPoint(point, rPoint, x, y);
text setText(input);
self destroyEvent(text, event1, event2, event3);
return text;
}
createShad(point, rPoint, x, y, width, height, elem, colour, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = 0;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}
elemFade(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
}
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Apr 20, 201113Year Member
Posts: 390
Reputation Power: 17
Status: Offline
Joined: Apr 20, 201113Year Member
Posts: 390
Reputation Power: 17
+Rep for your Jtag? Seems like a pretty fair deal aha xD
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.