- Messages
- 375
- Reaction score
- 148
- Points
- 903
i'm not sure why i'm getting script error's but i ported my bo3 menu witch was originally bo2 back to bo2
i already know about the hud:: i know it not suppose to be in there haven't took it out yet
i already know about the hud:: i know it not suppose to be in there haven't took it out yet
Code:
MST()
{
if (self.human == true)
{
self MM("^8S^7urvivor's: ^8S^7HOP", undefined);
self MO("^8S^7urvivor's: ^8S^7HOP", 0, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 1, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 2, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 3, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 4, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 5, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 6, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 7, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 8, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 9, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 10, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 11, "nothing", ::Test, "Nothing Added Atm");
self MO("^8S^7urvivor's: ^8S^7HOP", 12, "nothing", ::Test, "Nothing Added Atm");
//example of subs: self MO("^8S^7urvivor's: ^8S^7HOP", 4, "nothing", &SML, "Menu");
}
if (player.zombie == true)
{
self MM("^8I^7nfected: ^8S^7HOP", undefined);
self MO("^8I^7nfected: ^8S^7HOP", 0, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 1, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 2, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 3, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 4, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 5, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 6, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 7, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 8, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 9, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 10, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 11, "nothing", ::Test, "Nothing Added Atm");
self MO("^8I^7nfected: ^8S^7HOP", 12, "nothing", ::Test, "Nothing Added Atm");
}
}
Test(TestMessage)
{
iprintln(TestMessage);
}
MM(Menu, Parent)
{
self.Void.ScriptMenu["GetMenu"] = Menu;
self.Void.ScriptMenu["MenuCount"] = 0;
self.Void.ScriptMenu["MenuPrevious"][Menu] = Parent;
self.Void.ScriptMenu["o_index"][Menu] = 0;
self.Void.ScriptMenu["s_index"][Menu] = 0;
self.Void.ScriptMenu["l_index"][Menu] = 0;
}
MO(Menu, Index, Text, Func, Input, Input2)
{
self.Void.ScriptMenu["MenuText"][Menu][Index] = Text;
self.Void.ScriptMenu["MenuFunction"][Menu][Index] = Func;
self.Void.ScriptMenu["MenuInput"][Menu][Index] = Input;
self.Void.ScriptMenu["MenuInput2"][Menu][Index] = Input2;
if(Index < level.lastIndex)
self.Void.ScriptMenu["l_index"][Menu] = Index;
else
self.Void.ScriptMenu["l_index"][Menu] = level.lastIndex;
}
SML(input)
{
self.Void.ScriptMenu["MRV"] = input;
self.Void.ScriptMenu["Title"] destroy();
for(i = 0; i < self.Void.ScriptMenu["Text"].size; i++)
self.Void.ScriptMenu["Text"][i] destroy();
self ML(input);
}
ML(menu)
{
self freezeControls(false);
self.Void.ScriptMenu["MRV"] = menu;
self.Void.ScriptMenu["Title"] = self createText("LEFT", "TOP", 195, 30, "default", 2.3, 3, (1, 1, 1), 1, menu);
f_index = self.Void.ScriptMenu["o_index"][menu] - (self.Void.ScriptMenu["l_index"][menu] - (self.Void.ScriptMenu["l_index"][menu] - self.Void.ScriptMenu["s_index"][menu]));
l_index = self.Void.ScriptMenu["o_index"][menu] + self.Void.ScriptMenu["l_index"][menu] - self.Void.ScriptMenu["s_index"][menu];
index = 0;
for(i = f_index; i < l_index + 1; i++)
{
self.Void.ScriptMenu["Text"][index] = self createText("LEFT", "TOP", 190, 60 + (index * 15.6), "default", 1.3, 3, (1, 1, 1), 1, self.Void.ScriptMenu["MenuText"][menu][i]);
index++;
}
self.Void.ShaderElement["Scrollbar"] elemMoveY(0.2, self.Void.ScriptMenu["Text"][self.Void.ScriptMenu["s_index"][menu]].y + 1);
}
elemMoveY(time, input)
{
self moveOverTime(time);
self.y = input;
}
IHD()
{
for(;;)
{
self waittill("death");
self MenuIsClosing();
}
}
MenuIsClosing()
{
self setClientUIVisibilityFlag( "hud_visible", 1 );
self setClientUIVisibilityFlag( "weapon_hud_visible", 1 );
self.Void.ShaderElement["Background"] elemFade(.5, 0);
self.Void.ShaderElement["Scrollbar"] elemFade(.5, 0);
self.Void.ShaderElement["BorderLeft"] elemFade(.5, 0);
self.Void.ShaderElement["BorderRight"] elemFade(.5, 0);
self.Void.ShaderElement["BorderDown"] elemFade(.5, 0);
self.Void.ShaderElement["BorderLabel"] elemFade(.5, 0);
self.Void.ShaderElement["BorderTop"] elemFade(.5, 0);
self.Void.ShaderElement["Info1"] elemFade(.5, 0);
self.Void.ShaderElement["Info2"] elemFade(.5, 0);
self.Void.ShaderElement["Info3"] elemFade(.5, 0);
self.Void.ShaderElement["Info4"] elemFade(.5, 0);
self.Void.ShaderElement["Info5"] elemFade(.5, 0);
self.Void.ShaderElement["Info6"] elemFade(.5, 0);
self.bar elemFade(.5, 0);
self.bar2 elemFade(.5, 0);
self.bar3 elemFade(.5, 0);
self.txt elemFade(.5, 0);
self.InfoboxText FadeOverTime(0.3);
self.InfoboxText.alpha = 0;
self.Void.ScriptMenu["Title"] destroy();
for(i = 0; i < self.Void.ScriptMenu["Text"].size; i++)
self.Void.ScriptMenu["Text"][i] destroy();
wait 0.05;
self.MIO = false;
}
MenuIsClosing()
{
self setClientUIVisibilityFlag( "hud_visible", 1 );
self setClientUIVisibilityFlag( "weapon_hud_visible", 1 );
self.Void.ShaderElement["Background"] elemFade(.5, 0);
self.Void.ShaderElement["Scrollbar"] elemFade(.5, 0);
self.Void.ShaderElement["BorderLeft"] elemFade(.5, 0);
self.Void.ShaderElement["BorderRight"] elemFade(.5, 0);
self.Void.ShaderElement["BorderDown"] elemFade(.5, 0);
self.Void.ShaderElement["BorderLabel"] elemFade(.5, 0);
self.Void.ShaderElement["BorderTop"] elemFade(.5, 0);
self.Void.ShaderElement["Info1"] elemFade(.5, 0);
self.Void.ShaderElement["Info2"] elemFade(.5, 0);
self.Void.ShaderElement["Info3"] elemFade(.5, 0);
self.Void.ShaderElement["Info4"] elemFade(.5, 0);
self.Void.ShaderElement["Info5"] elemFade(.5, 0);
self.Void.ShaderElement["Info6"] elemFade(.5, 0);
self.bar elemFade(.5, 0);
self.bar2 elemFade(.5, 0);
self.bar3 elemFade(.5, 0);
self.txt elemFade(.5, 0);
self.InfoboxText FadeOverTime(0.3);
self.InfoboxText.alpha = 0;
self disableInvulnerability();
self.Void.ScriptMenu["Title"] destroy();
for(i = 0; i < self.Void.ScriptMenu["Text"].size; i++)
self.Void.ScriptMenu["Text"][i] destroy();
wait 0.05;
self.MIO = false;
}
createRectangle(align, relative, x, y, width, height, color, sort, alpha, shader)
{
uiElement = newClientHudElem( self );
uiElement.elemType = "bar";
uiElement.width = width;
uiElement.height = height;
uiElement.xOffset = 0;
uiElement.yOffset = 0;
uiElement.hidewheninmenu = true;
uiElement.children = [];
uiElement.sort = sort;
uiElement.color = color;
uiElement.alpha = alpha;
uiElement hud::setParent( level.uiParent );
uiElement setShader( shader, width , height );
uiElement.hidden = false;
uiElement hud::setPoint(align,relative,x,y);
return uiElement;
}
LoadShaders()
{
//MainHudBox...
// SetShader(align, relative, x, y, width, height, colour, shader, sort, alpha)
//function SetShader(align, relative, x, y, width, height, colour, shader, sort, alpha)//60
//function createRectangle(align, relative, x, y, width, height, color, sort, alpha, shader)
colors = level.colors;
self.Void.ShaderElement["Background"] = self createRectangle("LEFT", "TOP", 180, 125, 150, 230, colors["Background"], 0, 0, "white");//000
self.Void.ShaderElement["Scrollbar"] = self createRectangle("LEFT", "TOP", 180, 60, 150, 15, colors["Scrollbar"], 1, 0, "white");//100
self.Void.ShaderElement["BorderRight"] = self createRectangle("LEFT", "TOP", 328, 125, 3, 230, colors["BorderRight"], 2, 0, "white");//100
self.Void.ShaderElement["BorderLeft"] = self createRectangle("LEFT", "TOP", 180, 125, 3, 230, colors["BorderLeft"], 2, 0, "white");//100
self.Void.ShaderElement["BorderDown"] = self createRectangle("LEFT", "TOP", 180, 240, 150, 3, colors["BorderDown"], 2, 0, "white");//100
self.Void.ShaderElement["BorderLabel"] = self createRectangle("LEFT", "TOP", 180, 30, 150, 20, colors["BorderLabel"], 2, 0, "white");//100
self.Void.ShaderElement["BorderTop"] = self createRectangle("LEFT", "TOP", 180, 10, 152, 3, colors["BorderTop"], 1, 0, "white");//100
//InfoBox...
// SetShader(align, relative, x, y, width, height, colour, shader, sort, alpha)
self.Void.ShaderElement["Info1"] = self createRectangle("LEFT", "TOP", -200, 115, 120, 145, colors["Info1"], 0, 0, "white");//000
self.Void.ShaderElement["Info2"] = self createRectangle("LEFT", "TOP", -84, 115, 3, 145, colors["Info2"], 2, 0, "white");//100
self.Void.ShaderElement["Info3"] = self createRectangle("LEFT", "TOP", -200, 115, 3, 145, colors["Info3"], 2, 0, "white");//100
self.Void.ShaderElement["Info4"] = self createRectangle("LEFT", "TOP", -200, 186, 120, 3, colors["Info4"], 2, 0, "white");//100
self.Void.ShaderElement["Info5"] = self createRectangle("LEFT", "TOP", -200, 43, 120, 3, colors["Info5"], 2, 0, "white");//100
self.Void.ShaderElement["Info6"] = self createRectangle("LEFT", "TOP", -200, 60, 120, 20, colors["Info6"], 1, 0, "white");//100
//InfoBox ****
self.InfoboxText = hud::createFontString( "objective", 1.1);
self.InfoboxText hud::setPoint("LEFT", "TOP", -190, 60);
self.InfoboxText setText("InformationBox\n\nMenu Version: 1.9\nDonate: [email protected]\nCreator: JayCoder\nYT: JayCoder\nEnjoy the Menu");
self.InfoboxText.sort = 3;
self.InfoboxText elemcolor(1, (1, 1, 1));
}
//self forceHost();
function IMSBB()
{
self endon("disconnect");
self.MIO = false;
self.MenuLock = false;
self.Void = spawnStruct();
self thread LoadShaders();
self thread MST();
self thread IHD();
while (1)
{
if(self MeleeButtonPressed() && self AdsButtonPressed() && self.MIO == false)
{
if(self.MenuLock === false)
{
self MenuIsOpening();
self ML("Project Void");
wait 0.5;
}
if(self.MenuLock === true)
{
self iprintlnbold("^7Menu: ^1Locked");
}
}
else if(self MeleeButtonPressed() && self.MIO == true)
{
if(isDefined(self.Void.ScriptMenu["MenuPrevious"][self.Void.ScriptMenu["MRV"]]))
{
self SML(self.Void.ScriptMenu["MenuPrevious"][self.Void.ScriptMenu["MRV"]]);
}
else
{
self MenuIsClosing();
}
wait 0.5;
}
else if (self AdsButtonPressed() && self.MIO == true)
{
parent = self.Void.ScriptMenu["MRV"];
self.Void.ScriptMenu["o_index"][parent]--;
if(self.Void.ScriptMenu["o_index"][parent] < 0)
{
self.Void.ScriptMenu["o_index"][parent] = self.Void.ScriptMenu["MenuText"][parent].size - 1;
self.Void.ScriptMenu["s_index"][parent] = self.Void.ScriptMenu["l_index"][parent];
index = 0;
last_index = self.Void.ScriptMenu["l_index"][parent];
for(i = self.Void.ScriptMenu["o_index"][parent] - last_index; i < self.Void.ScriptMenu["MenuText"][parent].size; i++)
{
self.Void.ScriptMenu["Text"][index] setText(self.Void.ScriptMenu["MenuText"][parent][i]);
index++;
}
self.Void.ShaderElement["Scrollbar"] elemMoveY(0.2, self.Void.ScriptMenu["Text"][self.Void.ScriptMenu["s_index"][parent]].y);
}
else
{
if(self.Void.ScriptMenu["s_index"][parent] == 0)
{
index = 0;
last_index = self.Void.ScriptMenu["l_index"][parent];
for(i = self.Void.ScriptMenu["o_index"][parent]; i < self.Void.ScriptMenu["o_index"][parent] + last_index + 1; i++)
{
self.Void.ScriptMenu["Text"][index] setText(self.Void.ScriptMenu["MenuText"][parent][i]);
index++;
}
}
else
{
self.Void.ScriptMenu["s_index"][parent]--;
self.Void.ShaderElement["Scrollbar"] elemMoveY(0.2, self.Void.ScriptMenu["Text"][self.Void.ScriptMenu["s_index"][parent]].y);
}
}
wait.2;
}
else if (self AttackButtonpressed() && self.MIO == true)
{
parent = self.Void.ScriptMenu["MRV"];
self.Void.ScriptMenu["o_index"][parent]++;
if(self.Void.ScriptMenu["o_index"][parent] > self.Void.ScriptMenu["MenuText"][parent].size - 1)
{
self.Void.ScriptMenu["o_index"][parent] = 0;
self.Void.ScriptMenu["s_index"][parent] = 0;
for(i = 0; i < self.Void.ScriptMenu["l_index"][parent] + 1; i++)
self.Void.ScriptMenu["Text"][i] setText(self.Void.ScriptMenu["MenuText"][parent][i]);
self.Void.ShaderElement["Scrollbar"] elemMoveY(0.2, self.Void.ScriptMenu["Text"][self.Void.ScriptMenu["s_index"][parent]].y);
}
else
{
if(self.Void.ScriptMenu["s_index"][parent] == self.Void.ScriptMenu["l_index"][parent])
{
index = 0;
last_index = self.Void.ScriptMenu["l_index"][parent];
for(i = self.Void.ScriptMenu["o_index"][parent] - last_index; i < self.Void.ScriptMenu["o_index"][parent] + 1; i++)
{
self.Void.ScriptMenu["Text"][index] setText(self.Void.ScriptMenu["MenuText"][parent][i]);
index++;
}
}
else
{
self.Void.ScriptMenu["s_index"][parent]++;
self.Void.ShaderElement["Scrollbar"] elemMoveY(0.2, self.Void.ScriptMenu["Text"][self.Void.ScriptMenu["s_index"][parent]].y);
}
}
wait.2;
}
else if(self UseButtonPressed() && self.MIO == true)
{
self thread [[self.Void.ScriptMenu["MenuFunction"][self.Void.ScriptMenu["MRV"]][self.Void.ScriptMenu["o_index"][self.Void.ScriptMenu["MRV"]]]]](self.Void.ScriptMenu["MenuInput"][self.Void.ScriptMenu["MRV"]][self.Void.ScriptMenu["o_index"][self.Void.ScriptMenu["MRV"]]]);
self.Void.ShaderElement["Scrollbar"] scaleOverTime(0.2, 5, 15);
wait 0.5;
self.Void.ShaderElement["Scrollbar"] scaleOverTime(0.2, 150, 15);
wait 0.5;
}
wait 0.05;
}
}
NethierHORZ()
{
//nothing added yet
}
HUMAN100()
{
player = level.players[self.Void.ScriptMenu["ClientIndex"]];
player NethierHORZ();
player.zombie = false;
player.human = true;
self iPrintln( player.name + " Is A Human" );
}
ZOMBIE100()
{
player = level.players[self.Void.ScriptMenu["ClientIndex"]];
player NethierHORZ();
player.zombie = true;
player.human = false;
self iPrintln( player.name + " Is A Zombie" );
}