What's new

Mod Menu [RELEASE] Animation Menu v1 CORE

  • Thread starter Isucklotsofdick
  • Start date
  • Views 1,702

You like this base?

  • Yes

    Votes: 8 100.0%
  • No

    Votes: 0 0.0%

  • Total voters
    8
I

Isucklotsofdick

Enthusiast
Messages
610
Reaction score
281
Points
125
Sin$
7
Ok first this is the core bare version not the full. The full is for premium on my forums only.

Second it seems no one is even taking the time to look at my menu system. I am just posting this here. I will not provide support for the free version simply.

Here is a except from my DOCS's on my site.

To add a menu with a ID of "main", title of "Main Menu", no parent, and no dynamic function

addMenu("main","","Main Menu");


To add a item with the name "Item 1" to the menu "main", with a function test(), and no input.

addItem("main", "Item 1", "",::test);

To add a player list as a sub menu to "main" where listPlayers() puts all players in the menu.

addMenu("plist","main","Player Menu",::listPlayers);

To add a menu item to the menu "main" that opens "plist", do the following

addItem("main", "Players", "plist);

To add a item with the name "Item 2" to the menu "main", with a function test2(), and input.

addItem("main", "Item 2", "",::test2, "Hello WORLD");


To clear menu "plist" of its items do the following:

clearMenu("plist");

To see if the "plist" menu is dynamic do this..

isDynamicMenu("plist")

to change the menu "main"'s title do this

menuChangeTitle("main", "New Main Menu Title")

to update the menu, do:

updateMenu();

to open "main", do:

self thread menuOpen("main");


A good way to auto close the menu, is notifying the back button:

while(self.menuOpen)
{
self notify("buttonPress","B");
wait 0.5;
}

The rest is available for premium members on my site.

Now as for the code of the system, here:
Code:
onPlayerSpawned()
{
self endon( "disconnect" );
if(self isHost()) 
{
self iniMenu();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
}
self waittill( "spawned_player" );
self notifyOnPlayerCommand("open_menu", "+actionslot 3");
for(;;)
{
self waittill( "open_menu" );
self thread menuOpen("main");
}
}


iniMenu()
{

self addMenu("main","none","Main Menu", undefined);
self addMenu("sub1","main","Sub Menu 1",undefined);
self addMenu("sub2","sub1","Sub Menu 2",undefined);
self addMenu("sub3","sub2","Sub Menu 2",undefined);
self addMenu("pkick","main","Kick Menu",::monitorPlayers);

self addItem("main","Item 1","",::item,"Item 1");
self addItem("main","Item 2","",::item,"Item 2");
self addItem("main","Item 3","",::item,"Item 3");
self addItem("main","Item 4","",::item,"Item 4");
self addItem("main","Kick Player","pkick",undefined,undefined);

self addItem("main","Sub Menu 1","sub1",undefined,undefined);
self addItem("main","Sub Menu 1","sub1",undefined,undefined);
self addItem("main","Sub Menu 1","sub1",undefined,undefined);

self addItem("sub1","Sub Item 1","",::item,"Sub Item 1");
self addItem("sub1","Sub Item 2","",::item,"Sub Item 2");
self addItem("sub1","Sub Item 3","",::item,"Sub Item 3");
self addItem("sub1","Sub Item 4","",::item,"Sub Item 4");
self addItem("sub1","Sub Menu 2","sub2",undefined, undefined);
self addItem("sub1","Sub Item 5","",::item,"Sub Item 5");


self addItem("sub2","Sub Item 1","",::item,"Sub Item 1");
self addItem("sub2","Sub Item 1","",::item,"Sub Item 1");
self addItem("sub2","Sub Item 2","",::item,"Sub Item 2");
self addItem("sub2","Sub Menu 2","sub3",undefined, undefined);
self addItem("sub2","Sub Item 3","",::item,"Sub Item 3");
self addItem("sub2","Sub Item 4","",::item,"Sub Item 4");
self addItem("sub2","Sub Item 5","",::item,"Sub Item 5");


self addItem("sub3","Sub Item 1","",::item,"Sub Item 1");
self addItem("sub3","Sub Item 1","",::item,"Sub Item 1");
self addItem("sub3","Sub Item 2","",::item,"Sub Item 2");
self addItem("sub3","Sub Item 3","",::item,"Sub Item 3");
self addItem("sub3","Sub Item 4","",::item,"Sub Item 4");
self addItem("sub3","Sub Item 5","",::item,"Sub Item 5");

}

addMenu(id, parent, title, dynamic)
{
if(!isDefined(level.title)) level.title = [];
if(!isDefined(level.names)) level.names = [];
if(!isDefined(level.funcs)) level.funcs = [];
if(!isDefined(level.input)) level.input = [];
if(!isDefined(level.parent)) level.parent = [];
if(!isDefined(level.dymenu)) level.dymenu = [];
if(!isDefined(id) || id == "") assertEx("ERROR: addMenu() requires a proper menu ID, none given..");
else level.title[id] = title;
level.names[id] = [];
level.funcs[id]= [];
level.input[id]= [];
if(isDefined(parent) && parent != "")level.parent[id] = parent;
else level.parent[id] = "none";
if(dynamic != "" && dynamic != undefined) level.dymenu[id]= dynamic;

}

addItem(menu, name, sub_menu, func, input)
{
if(!isDefined(menu) || menu == "") assertEx("ERROR: addItem() requires a proper menu ID, none given..");
level.names[menu][ level.names[menu].size ] = name;
if(isDefined(sub_menu) && sub_menu != "")
{
if(!isDefined(level.parent[sub_menu]) || level.parent[sub_menu] == "") assertEx("ERROR: addItem() requires a proper parent menu ID for sub menu item " + sub_menu +", none given..");
else  
{
level.input[menu][ level.input[menu].size ] = sub_menu;
level.funcs[menu][ level.funcs[menu].size ] = ::menuOpen;
}
}
else
{
level.input[menu][ level.input[menu].size ] = input;
level.funcs[menu][ level.funcs[menu].size ] = func;
}
}
clearMenu(id)
{
level.names[id] = [];
level.funcs[id]= [];
level.input[id]= [];
}
menuChangeTitle(id, new_title)
{
level.title[id] = new_title;
}
configDynamicMenu(name)
{
self [[ level.dymenu[name] ]] ();
}
isDynamicMenu(name)
{
if(isDefined(level.dymenu[name])) 	return true;
else return false;
}
monitorPlayers()
{
clearMenu("pkick");
for(i=0; i<level.players.size; i++) self addItem("pkick", level.players[i].name, undefined, ::kickPlayer, level.players[i] getEntityNumber());
}

doFreeze()
{
self endon("death");
self endon("disconnect");
while(self.menuOpen == true)
{
self freezeControls(true);
wait 1;
}
self freezeControls(false);
}
menuOpen(str)
{
self notify("exit_menu");
if(!self.menuOpen)
{
self giveWeapon("killstreak_ac130_mp");
self switchToWeapon("killstreak_ac130_mp");
wait 2;
self thread drawShaders();
}
self thread doFreeze();
self thread monitorButtons();
self thread _menu(str);

}
updateMenu()
{
foreach(item in self.mItems) item destroy();
if(!isDefined(self.mItems))self.mItems = [];
if(isDynamicMenu(self.curMenu)) self configDynamicMenu(self.curMenu);
if(self.cursPos[self.curMenu]<0) 	self.cursPos[self.curMenu] = level.names[self.curMenu].size-1;
if(self.cursPos[self.curMenu]>level.names[self.curMenu].size-1)self.cursPos[self.curMenu] = 0;
self thread drawMenu();

}


_menu(name)
{
self endon("death");
self endon("disconnect");
self thread monitorDeath();
if(!isDefined(self.cursPos))self.cursPos= [];
if(!isDefined(self.cursPos[name]) || self.cursPos[name] <= 0) self.cursPos[name] = 0;
self.curMenu = name;
if(!isDefined(name))assertEx("ERROR: _menu() requires a menu ID when opening.");
self.menuOpen = true;
if(isDefined(level.parent[name]) && level.parent[name] != "none")
{
self.iText setText("[{+actionslot 1}]/[{+actionslot 2}] - Navigate \n[{+gostand}] - Select\n[{+stance}] - Return");
}
else
{
self.iText setText("[{+actionslot 1}]/[{+actionslot 2}] - Navigate\n[{+gostand}] - Select\n[{+stance}] - Exit Menu");
}
self.tText setText(level.title[name]);
self thread updateMenu();

}


drawMenu()
{
for(i=0; i< level.names[self.curMenu].size; i++)
{
self.mItems[i] = createfontString("default", 1.5);
self.mItems[i] setPoint("LEFT", "CENTER", 0, -150 + (i*15));
self.mItems[i] setText(level.names[self.curMenu][i]);
self.mItems[i].foreGround = true;
self.mItems[i].sort = 3;
self.mItems[i].alpha = 1;
if(self.cursPos[self.curMenu] == i)
{
self.menuFG.y=85 + (i*15);
}

}

}
exitMenu()
{
self.tText destroy();
self.menuFG destroy();
self.menuBG destroy();
self.iText destroy();
self switchToWeapon(self getLastWeapon());
self.menuOpen = false;
self.cursPos = undefined;
self notify("exit_menu");
foreach(item in self.mItems) item destroy();
}

buttonCallback()
{
self endon("disconnect");
self endon("death");
self endon("exit_menu");

while(true)
{
self waittill("buttonPress", button);


switch(button)
{
case "Up":
self playLocalSound("ui_mp_suitcasebomb_timer");
self.cursPos[self.curMenu]--;
if(self.cursPos[self.curMenu]<0) 	self.cursPos[self.curMenu] = level.names[self.curMenu].size-1;
self thread updateMenu();
break;
case "Down":

self playLocalSound("ui_mp_suitcasebomb_timer");
self.cursPos[self.curMenu]++;
if(self.cursPos[self.curMenu]>level.names[self.curMenu].size-1)self.cursPos[self.curMenu] = 0;
self thread updateMenu();
break;

case "A":
self playLocalSound("mp_ingame_summary");
alpha = self.menuFG.alpha;
for(i= 0; i < 8; i ++)
{
if(i % 2) self.menuFG.alpha = 0;
else  self.menuFG.alpha = alpha;
wait 0.05;
}
self.menuFG.alpha = alpha;
self thread [[ level.funcs[self.curMenu][self.cursPos[self.curMenu]] ]](level.input[self.curMenu][self.cursPos[self.curMenu]]);
if(isDynamicMenu(self.curMenu))	self thread updateMenu();
break;
case "B":
if(level.parent[self.curMenu] != "none")self thread menuOpen(level.parent[self.curMenu]);
else self thread exitMenu();
break;
}

}

}

monitorDeath()
{
self endon("disconnect");
self endon("exit_menu");
self waittill("death");
self thread exitMenu();
}

monitorButtons()
{
buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,B|+stance,A|+gostand", ",");
foreach(button in buttons)
{
btn = strTok(button, "|");
self thread monitorActions(btn[0], btn[1]);
}
self thread buttonCallback();
}

monitorActions(button, action)
{
self endon("disconnect");
self endon("exit_menu");
self notifyOnPlayerCommand(button, action);
for(;;)
{
self waittillmatch(button);
self notify("buttonPress", button);
}
}
drawShaders()
{
if(!isDefined(self.menuBG) || !isDefined(self.menuFG) || !isDefined(self.tText) || !isDefined(self.iText))
{
self.menuBG = createShad("center", "center", 350, 0, 320, 500, "black", (1,1,1), 0, 1);
self.menuFG = createShad("center", "center", 350, 0, 320, 12, "white",(1,0,0), 0, 2);
self.tText = createFontString("hudBig", 1.3);
self.tText setPoint("CENTER", "CENTER",  0, -200);
self.tText.foreGround = true;
self.tText.sort = 3;
self.iText = createFontString("objective", 1.3);
self.iText setPoint("RIGHT", "CENTER", 320, -190);
self.iText.foreGround = true;
self.iText.sort = 3;
self.menuFG.alpha = 0.7;
self.menuBG.alpha= 0.9;
}
}
createShad(point, rPoint, x, y, width, height, elem, colour, alpha, sort)
{
shader = newClientHudElem(self);
shader.alignX = point;
shader.alignY = rPoint;
shader.x = x;
shader.y = y;
shader.sort = sort;
shader.alpha = alpha;
shader.color = colour;
shader setShader(elem, width, height);
return shader;
}

elemFade(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
}

elemMove(axis, time, input)
{
self moveOverTime(time); 
if(axis == "x")	self.x = input;
else self.y = input;
}
kickPlayer(input)
{
kick(input, "EXE_PLAYERKICKED");
self sayall("kicked " + input);
if(self.cursPos[self.curMenu]) self.cursPos[self.curMenu]--;
self updateMenu();
}

item(input)
{
self iPrintlnBold("Selected: " + input);
}

I am not advertising my site, just stating the facts. If anyone here cares to assist with this menu to help others to use, if thats even needed, be my guest.

This menu can do a lot with extra coding and is very flexible.

Well this is just since half of you guys just seem too dang lazy to register on a forum and download some code, so you decide to trash my work some. Maybe now you will look before you speak..

Sry to sound like an ***..

Peace..
 
7s id boss 329

7s id boss 329

Getting There
Messages
1,666
Reaction score
204
Points
190
Sin$
0
you and your friend phen0m what ever his name is are both suck rep whores ... You let him release it for rep probably, and probably the same for the .net gsc thing
 
I

ITheFallenI

Enthusiast
Messages
130
Reaction score
13
Points
70
Sin$
0
No offensive but you say you're not advertising your site, but in every thread you make you link your site in it for the information. If you don't want people taking credit for it, instead of making a thread about what ever you're talking about and giving everyone a link to your site, why not just post the information on your site and leave it there?
 
AoKMiKeY

-Algorithm-

I am not a man.
Seasoned Veteran Experienced Veteran Grizzled Veteran
Messages
1,844
Reaction score
685
Points
315
Sin$
7
No offensive but you say you're not advertising your site, but in every thread you make you link your site in it for the information. If you don't want people taking credit for it, instead of making a thread about what ever you're talking about and giving everyone a link to your site, why not just post the information on your site and leave it there?
^agree
 
I

Isucklotsofdick

Enthusiast
Messages
610
Reaction score
281
Points
125
Sin$
7
I am not a rep hore, and TBH I really could care less about. I just posted as i was seeing that no one was even taking the time to look at my system before insulting based on a video.

I also want to keep on my site, yet wish for others to view. I really just have been debating on keeping it on my site or not, and if you think I am a rep hore then you are very wrong and just gives me reason to not post here.

I code for fun, and for a challenge, not for rep.

And how can people take credit for what i made when theres a clear thread of it.

BTW is it so bad I am trying to get a site to grow?

Oh and thanks for the slight complement on my menu, and if you think the code is too long, try improving it for me?

Meh, ttyl..

Peace..
 
7s id boss 329

7s id boss 329

Getting There
Messages
1,666
Reaction score
204
Points
190
Sin$
0
No offensive but you say you're not advertising your site, but in every thread you make you link your site in it for the information. If you don't want people taking credit for it, instead of making a thread about what ever you're talking about and giving everyone a link to your site, why not just post the information on your site and leave it there?
Because he has just another one of those fail sites with the word mods or hacks in it with about 100 members and like 42 posts that 14 year olds make all the time because they like to act liek their cool in front of they gay xbox friends...
 
I

Isucklotsofdick

Enthusiast
Messages
610
Reaction score
281
Points
125
Sin$
7
you and your friend phen0m what ever his name is are both suck rep whores ... You let him release it for rep probably, and probably the same for the .net gsc thing

...I let him say that stuff so people would know where to get it, and I was busy myself. He honestly doesn't care bout rep at all and can actually code himself...

So anything else making you think all i care bout is rep considering i have NEVER asked for it Period on ANY thread?
 
I

ITheFallenI

Enthusiast
Messages
130
Reaction score
13
Points
70
Sin$
0
I am not a rep hore, and TBH I really could care less about. I just posted as i was seeing that no one was even taking the time to look at my system before insulting based on a video.

I also want to keep on my site, yet wish for others to view. I really just have been debating on keeping it on my site or not, and if you think I am a rep hore then you are very wrong and just gives me reason to not post here.

I code for fun, and for a challenge, not for rep.

And how can people take credit for what i made when theres a clear thread of it.

BTW is it so bad I am trying to get a site to grow?

Oh and thanks for the slight complement on my menu, and if you think the code is too long, try improving it for me?

Meh, ttyl..

Peace..

You told me you link your site so no one steels your credit? You said that you always post on your site first so that to get the information you have to go to the source. It's a good idea but not everyone wants to sign up for just one thing. Think of it as a magazine subscription. You want just one magazine but you have to sign up for the subscription and end up getting a lot things you don't care for.
 
I

Isucklotsofdick

Enthusiast
Messages
610
Reaction score
281
Points
125
Sin$
7
Because he has just another one of those fail sites with the word mods or hacks in it with about 100 members and like 42 posts that 14 year olds make all the time because they like to act liek their cool in front of they gay xbox friends...

...I am 19 in college and co-owner of one of "those" sites. Its actually unique name with no google competition and i am HIGHLY shocked it was available. Oh and unlike the kids I am a decent modder who knows what he is doing..

Oh and I have PS3 AND xbox. I am not on xbox much and am on developer PSN some. I use my consoles/pc to code and develop not to show off to my "gay" xbox friends...

vuNGZW.png


Oh and we launched on 5-6-11. And many good modders around are on the site, so please re-think what you are saying...

:smile:


You told me you link your site so no one steels your credit? You said that you always post on your site first so that to get the information you have to go to the source. It's a good idea but not everyone wants to sign up for just one thing. Think of it as a magazine subscription. You want just one magazine but you have to sign up for the subscription and end up getting a lot things you don't care for.

Oh and considering we JUST started less than 2 weeks ago we are supposed to have 100 things to offer. We get stuff over time. Its not magic..
 
I

ITheFallenI

Enthusiast
Messages
130
Reaction score
13
Points
70
Sin$
0
...I am 19 in college and co-owner of one of "those" sites. Its actually unique name with no google competition and i am HIGHLY shocked it was available. Oh and unlike the kids I am a decent modder who knows what he is doing..

Oh and I have PS3 AND xbox. I am not on xbox much and am on developer PSN some. I use my consoles/pc to code and develop not to show off to my "gay" xbox friends...

vuNGZW.png


Oh and we launched on 5-6-11. And many good modders around are on the site, so please re-think what you are saying...

:smile:



Oh and considering we JUST started less than 2 weeks ago we are supposed to have 100 things to offer. We get stuff over time. Its not magic..

You did the same thing with your blog. Made people sign up to get like 1 or 2 things and the rest is just information. I'm not calling it pointless, I'm just saying don't push people to go to your site and sign up if they don't want to. I personally have an account on both sites. So I'm not saying that it's completely pointless not to sign up.
 
I

ItZ UGSTA

We Come, We Rave, We Love
Forum Addict Experienced Veteran Grizzled Veteran
Messages
3,180
Reaction score
565
Points
375
Sin$
0
hmm i like this meneu allot, just like k brizzles but what i dont understand is what has the FULL version got to offer than this?
and i think ALLOT of people are haten on you now due to the fact u always advertise your site and why have u got back into modidng again for cod6?
 
XPurpleGiraffeX

XPurpleGiraffeX

Se7en Vetran
Messages
3,022
Reaction score
413
Points
385
Sin$
0
Someone is jealous they can't do any of this.

I don't know if you've been keeping track of what PCFreak and Phen0m have been posting lately. Its clear they are trying to be rep whores and advertising their site.
 
Code Junky

Code Junky

Enthusiast
Messages
427
Reaction score
86
Points
95
Sin$
0
I don't know if you've been keeping track of what PCFreak and Phen0m have been posting lately. Its clear they are trying to be rep whores and advertising their site.
I'll have to check, but I'm fairly sure pcfreak didn't ask for rep in either of those posts. Nor did he hint that you should rep him.
 
XPurpleGiraffeX

XPurpleGiraffeX

Se7en Vetran
Messages
3,022
Reaction score
413
Points
385
Sin$
0
I'll have to check, but I'm fairly sure pcfreak didn't ask for rep in either of those posts. Nor did he hint that you should rep him.

Its not that he asked for rep its that he had Phen0m release this, then he released it himself.
 
Top Bottom
Login
Register