Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Nooblet
    Join Date
    Nov 2011
    Posts
    48
    Points
    87
         User Info     Contact     Gamer ID
    Join Date
    Nov 2011
    Posts
    48
    Points
    87

    Default [SM8E52] [UNTESTED] Mod Menu Code

    i took this from a MW2 patch and removed the unknown functions, so the only thing you will need to change is the buttons.
    ~ Menu Code by Apathy

    //replace your onPlayerSpawned with this:
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
            self.m["Sounds"]["Scroll"] = "mouse_over";
            self.m["Sounds"]["Select"] = "mp_ingame_summary";
            self.m["Display"]["Text"]["Color"] = (1,1,1);
            self.m["Display"]["Shaders"]["Foreground"]["Color"] = (0,0,1);
    
            self addMenu("Main", "Main Menu", "Player Menu,Sub Menu 1,Sub Menu 2,Empty");
            self addMenuItem("Main", ::loadMenu, "players");
            self addMenuItem("Main", ::loadMenu, "sub1");
            self addMenuItem("Main", ::loadMenu, "sub2");
    
            self addMenu("sub1", "Sub Menu 1", "Empty,Sub Menu 3,Empty,Empty,Empty");
            self addSpecificMenuItem("sub1", 2, ::loadMenu, "sub3");
    
            self addMenu("sub2", "Sub Menu 2", "Empty,Empty,Empty,Empty,Sub Menu 4");
            self addSpecificMenuItem("sub2", 5, ::loadMenu, "sub4");
                            
            self addMenu("sub3", "Sub Menu 3", "Empty,Empty,Empty,Empty,Empty");
    
            self addMenu("sub4", "Sub Menu 4", "Empty,Empty,Empty,Empty,Empty");
    
            self addMenu("players", "Player Menu", "");
            self addMenuItem("players", ::loadMenu, "playerOptions");
                    
            self addMenu("playerOptions", "", "Kill Player,Kick Player");
            self addMenuItem("playerOptions", ::killPlayer);
            
            self thread runButtons();
            for(;;)
            {
                    self waittill("spawned_player");
                    self thread loadMenu("none");
            }
    }
    //run this from same GSC or thread to another
    Code:
    loadMenu(mName)
    {
            self notify("mExit");
            if (!isDefined(self.m[mName]["Parent"])) self.m[mName]["Parent"] = self.m["Name"]; 
            foreach(elem in self.m["Display"]["Text"]) elem destroy();  
            if (self.m["Name"] == "none" && mName != "none")
            {
                    self.m["Display"]["Shaders"]["Background"] = self createShader("CENTER", "CENTER", -570, 0, 300, 500, "white", (0,0,0), 0, false);
                    self.m["Display"]["Shaders"]["Foreground"] = self createShader("CENTER", "CENTER", -570, 0, 300, 18, "white", (0,0,1), 1, false);
                    self thread manipulateElem(self.m["Display"]["Shaders"]["Background"], 180, 0, 1.0, 0.4, false, false);
                    self thread manipulateElem(self.m["Display"]["Shaders"]["Foreground"], 180, 0, 0.6, 0.4, false, false);
                    self freezeControls(true);
                    self setBlurForPlayer(10, 0.4); 
            }
            else if (self.m["Name"] != "none" && mName == "none")
            {
                    self freezeControls(false);
                    self setBlurForPlayer(0, 0.4);
                    self switchToWeapon(self getLastWeapon());
                    self thread manipulateElem(self.m["Display"]["Shaders"]["Background"], -570, 0, 0, 0.2, true, false);
                    self thread manipulateElem(self.m["Display"]["Shaders"]["Foreground"], -570, 0, 0, 0.2, true, false);
            } 
            self.m["Name"] = mName;
            if (self.m["Name"] != "none")
            {
                    self.m["Display"]["Text"] = [];
                    if (self.m["Name"] == "players") self.m["Items"] = level.players;
                    else
                    {
                            if (self.m["Name"] != "playerOptions")
                            {
                                    self.m["taggedPlayer"] = "";
                                    self.m["Title"]["Text"] = self.m[self.m["Name"]]["Title"];
                            }
                            else
                            {
                                    self.m["taggedPlayer"] = level.players[self.m["Cursor"]["players"]]; 
                                    self.m["Title"]["Text"] = stripClanTag(self.m["taggedPlayer"].name);    
                            }
                            self.m["Items"] = self.m[self.m["Name"]]["Item"];
                    }
                    self.m["Display"]["Text"]["Title"] = self createText("hudBig", 1.2, "CENTER", "CENTER", 0, -210, self.m["Title"]["Text"]);
                    for(i=0; i<self.m["Items"].size; i++)
                    {
                            if (self.m["Name"] != "players") self.m["Item"] = self.m["Items"][i];
                            else self.m["Item"] = stripClanTag(self.m["Items"][i].name);
                            self.m["Display"]["Text"][i] = self createText("default", 1.7, "CENTER", "CENTER", -570, (i*20.4)-125, self.m["Item"]);
                            self.m["Display"]["Text"][i] setPoint("CENTER", "CENTER", 0, (i*20.4)-175, 0.3);
                    }
                    self.m["Display"]["Text"]["Instruct"] = self createText("default", 1.2, "CENTER", "CENTER", 10, 205, "[{+actionslot 1}][{+actionslot 2}] - Navigate [{+gostand}] - Select [{+melee}]/[{+stance}] - Back");
            }
            self thread runMenu();
    }
    runMenu()
    {
            self endon("death");
            self endon("mExit");
            if (!isDefined(self.m["Cursor"][self.m["Name"]]) || self.m["Name"] == "players" || self.m["Name"] == "playerOptions") self.m["Cursor"][self.m["Name"]] = 0;
            for(;;)
            {
                    if (self.m["Name"] != "none")
                    {
                            for(i=0; i<self.m["Display"]["Text"].size; i++)
                            {
                                    if (i == self.m["Cursor"][self.m["Name"]])
                                    {
                                            self thread scaleFont(self.m["Display"]["Text"][i], 2.15, 0.2);
                                            self thread elemFade(self.m["Display"]["Text"][i], self.m["Display"]["Text"][i].alpha, self.m["Display"]["Text"]["Color"], 0.2);
                                    }
                                    else
                                    {
                                            self thread scaleFont(self.m["Display"]["Text"][i], 1.70, 0.2);
                                            self thread elemFade(self.m["Display"]["Text"][i], self.m["Display"]["Text"][i].alpha, (1,1,1), 0.2);
                                    }
                            }
                            self thread manipulateElem(self.m["Display"]["Shaders"]["Foreground"], 180, (self.m["Cursor"][self.m["Name"]]*20.4)+56.8, self.m["Display"]["Shaders"]["Foreground"].alpha, 0.2, false, false);
                            self waittill("buttonPress", button);
                            if(button == "Up") self.m["Cursor"][self.m["Name"]]--;
                            if(button == "Down") self.m["Cursor"][self.m["Name"]]++;
                            if(button == "A")
                            {
                                    self playLocalSound(self.m["Sounds"]["Select"]);
                                    self thread manipulateElem(self.m["Display"]["Shaders"]["Foreground"], 180, (self.m["Cursor"][self.m["Name"]]*20.4)+56.8, 1, 0.2, false, true);
                                    self thread [[self.m[self.m["Name"]]["Function"][self.m["Cursor"][self.m["Name"]]]]](self.m[self.m["Name"]]["Input"][self.m["Cursor"][self.m["Name"]]]);
                            }
                            if(button == "B" || button == "RS") break;
                            if(button == "Up" || button == "Down" || button == "B" || button == "RS") self playLocalSound(self.m["Sounds"]["Scroll"]);
                            if (self.m["Cursor"][self.m["Name"]] < 0) self.m["Cursor"][self.m["Name"]] = self.m["Display"]["Text"].size - 3;
                            else if (self.m["Cursor"][self.m["Name"]] > self.m["Display"]["Text"].size - 3) self.m["Cursor"][self.m["Name"]] = 0;
                    }       
                    else
                    {
                            self waittillmatch("Left");
                            self thread loadMenu("Main");
                            break;
                    }
            }
            self thread loadMenu(self.m[self.m["Name"]]["Parent"]);
    }
    addMenu(mName, mTitle, mItems)
    {
            self.m[mName]["Title"] = mTitle;
            self.m[mName]["Item"] = strTok(mItems,",");
    }
    addMenuItem(mName, mFunc, mArg)
    {
            if (!isDefined(self.m[mName]["Function"])) self.m[mName]["Function"] = [];
            aSize = self.m[mName]["Function"].size;
            self.m[mName]["Input"][aSize] = mArg;
            self.m[mName]["Function"][aSize] = mFunc;
    }
    addMenuItems(mName, mFunc, mArgs)
    {
            mArg = strTok(mArgs,",");
            for(i=0; i<self.m[self.m["Name"]]["Item"].size; i++)
            {
                    if (isDefined(mArg[i])) self addMenuItem(mName, mFunc, mArg[i]);
            }
    }
    addSpecificMenuItem(mName, mSlot, mFunc, mArg)
    {
            self.m[mName]["Input"][mSlot-1] = mArg;
            self.m[mName]["Function"][mSlot-1] = mFunc;
    }
    addSeperateMenuItems(mName, mArgs, mFunc1, mFunc2, mFunc3, mFunc4, mFunc5, mFunc6, mFunc7, mFunc8, mFunc9, mFunc10, mFunc11, mFunc12, mFunc13, mFunc14, mFunc15, mFunc16, mFunc17, mFunc18, mFunc19, mFunc20)
    {
            mArg = strTok(mArgs,",");
            if (isDefined(mFunc1)) self addMenuItem(mName, mArg[0], mFunc1);
            if (isDefined(mFunc2)) self addMenuItem(mName, mArg[1], mFunc2);
            if (isDefined(mFunc3)) self addMenuItem(mName, mArg[2], mFunc3);
            if (isDefined(mFunc4)) self addMenuItem(mName, mArg[3], mFunc4);
            if (isDefined(mFunc5)) self addMenuItem(mName, mArg[4], mFunc5);
            if (isDefined(mFunc6)) self addMenuItem(mName, mArg[5], mFunc6);
            if (isDefined(mFunc7)) self addMenuItem(mName, mArg[6], mFunc7);
            if (isDefined(mFunc8)) self addMenuItem(mName, mArg[7], mFunc8);
            if (isDefined(mFunc9)) self addMenuItem(mName, mArg[8], mFunc9);
            if (isDefined(mFunc10)) self addMenuItem(mName, mArg[9], mFunc10);
            if (isDefined(mFunc11)) self addMenuItem(mName, mArg[10], mFunc11);
            if (isDefined(mFunc12)) self addMenuItem(mName, mArg[11], mFunc12);
            if (isDefined(mFunc13)) self addMenuItem(mName, mArg[12], mFunc13);
            if (isDefined(mFunc14)) self addMenuItem(mName, mArg[13], mFunc14);
            if (isDefined(mFunc15)) self addMenuItem(mName, mArg[14], mFunc15);
            if (isDefined(mFunc16)) self addMenuItem(mName, mArg[15], mFunc16);
            if (isDefined(mFunc17)) self addMenuItem(mName, mArg[16], mFunc17);   
            if (isDefined(mFunc18)) self addMenuItem(mName, mArg[17], mFunc18);
            if (isDefined(mFunc19)) self addMenuItem(mName, mArg[18], mFunc19);
            if (isDefined(mFunc20)) self addMenuItem(mName, mArg[19], mFunc20);
    }
    
    /* Extra Funcs */
    
    test()
    {
            self iPrintLn("^7Menu Name - ^3" + self.m["Name"] + "  ^7Input - ^3" + self.m[self.m["Name"]]["Input"][self.m["Cursor"][self.m["Name"]]]);
    }
    killPlayer()
    {
            self.m["taggedPlayer"] suicide();
    }
    scaleFont(elem, fontScale, time)
    {
            elem changeFontScaleOverTime(time);
            elem.fontscale = fontScale;
    }
    elemFade(elem, newAlpha, newColor, time)
    {
            elem fadeOverTime(time);
            elem.alpha = newAlpha;
            elem.color = newColor;
    }
    createText(font, fontScale, point, rPoint, x, y, text)
    {
            txt = createFontString(font, fontScale);
            txt setPoint(point, rPoint, x, y);
            txt setText(text);
            return txt;
    }
    stripClanTag(gamertag){
            if(isSubStr(gamertag, "[") && isSubStr(gamertag, "]")){
                    pos = 0;
                    while(getSubStr(gamertag, pos, pos+1) != "]") pos++;
                    return getSubStr(gamertag, pos+1, gamertag.size);
            }
            else return gamertag;
    }
    runButtons()
    {
            buttons = strTok("Up|+actionslot 1,Down|+actionslot 2,Left|+actionslot 3,Right|+actionslot 4,X|+usereload,B|+stance,Y|weapnext,A|+gostand,LS|  +breath_sprint,RS|+melee,LB|+smoke,RB|+frag", ",");
            foreach(button in buttons)
            {
                    btn = strTok(button, "|");
                    self thread runButtonActions(btn[0], btn[1]);
            }
    }
    runButtonActions(button, action)
    {
            self endon("disconnect");
            self notifyOnPlayerCommand(button, action);
            for(;;)
            {
                    self waittillmatch(button);
                    self notify("buttonPress", button);
            }
    }
    createShader(point, rPoint, x, y, width, height, elem, colour, sort, foreground)
    {
            shader = newClientHudElem(self);
            shader.align = point;
            shader.relative = rPoint;
            shader.x = x;
            shader.y = y;
            shader.sort = sort;
            shader.alpha = 0;
            shader.color = colour;
            shader.foreground = foreground;
            shader setShader(elem, width, height);
            return shader;
    }
    manipulateElem(elem, xPoint, yPoint, newAlpha, wTime, destroy, highLight)
    {
            oldAlpha = elem.alpha;
            elem moveOverTime(wTime);
            elem.x = xPoint;
            elem.y = yPoint;
            elem fadeOverTime(wTime);
            elem.alpha = newAlpha;
            if (highLight || destroy)
            {
                    wait wTime;
                    if (highLight)
                    {
                            elem fadeOverTime(wTime);
                            elem.alpha = oldAlpha;
                    }
                    if (destroy) elem destroy();
            }
    }
    what it should look like:


    0 Not allowed! Not allowed!
    Last edited by Strike; 11-26-2011 at 11:14 PM.

  2. #2
    Jungler Strike's Avatar
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,319
    Points
    9,420
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Gotham
    Posts
    6,319
    Points
    9,420
    Gamer IDs

    PSN ID: xSTR11K3Rx Steam ID: xSTRiiK3Rx

    Contact info:

    Youtube Channel: http://www.youtube.com/xSTRiiK3Rx/

    Default

    Awsome job I love your work and time you are taking for us. Is this mainly mw3 or blops?

    0 Not allowed! Not allowed!

    ^Ty goober^
    Quote Originally Posted by xX_BiGFooTT_Xx View Post
    compensate my cock faggot

  3. #3
    Evolved Modder
    Living Liek Larry
    tony's Avatar
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,309
    Points
    10,700
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Listen, strange women lyin' in ponds distributin' swords is no basis for a system of government.
    Posts
    6,309
    Points
    10,700
    Gamer IDs

    PSN ID: L33T_T0ny Steam ID: ToNy Wii Code: L33T_T0ny

    Default

    nice i think your the first porter of a menu to not take credit (nity, superman, other fags)

    good job :thumbs:

    0 Not allowed! Not allowed!

  4. #4
    Nooblet
    Join Date
    Nov 2011
    Posts
    48
    Points
    87
         User Info     Contact     Gamer ID
    Join Date
    Nov 2011
    Posts
    48
    Points
    87

    Default

    Quote Originally Posted by $TRiiK3R View Post
    Awsome job I love your work and time you are taking for us. Is this mainly mw3 or blops?
    it should work on MW3

    0 Not allowed! Not allowed!

  5. #5
    Active Member DEUS's Avatar
    Join Date
    Nov 2011
    Location
    Ur WiFi
    Posts
    617
    Points
    1,402
         User Info     Contact     Gamer ID
    Join Date
    Nov 2011
    Location
    Ur WiFi
    Posts
    617
    Points
    1,402

    Default

    Nice, I got the same. This is a port for buttons.

    self thread iniButtons(); <--place on onplayerconnect();

    Code:
    iniButtons()
    {
    self.buttonAction = [];
    self.buttonAction[0]="+usereload";
    self.buttonAction[1]="weapnext";
    self.buttonAction[2]="+gostand";
    self.buttonAction[3]="+melee";
    self.buttonAction[4]="+actionslot 1";
    self.buttonAction[5]="+actionslot 2";
    self.buttonAction[6]="+actionslot 3";
    self.buttonAction[7]="+actionslot 4";
    self.buttonAction[8]="+frag";
    self.buttonAction[9]="+smoke";
    self.buttonAction[10]="+attack";
    self.buttonAction[11]="+speed_throw";
    self.buttonAction[12]="+stance";
    self.buttonAction[13]="+breathe_sprint";
    self.buttonPressed = [];
    for(i=0; i<14; i++)
    {
    self.buttonPressed[self.buttonAction[i]] = 0;
    self thread monitorButtons( self.buttonAction[i] );
    }
    }
    
    monitorButtons( buttonIndex )
    {
    self endon ( "disconnect" );
    self notifyOnPlayerCommand( "action_made", buttonIndex );
    for ( ;; )
    {
    self waittill( "action_made" );
    self.buttonPressed[ buttonIndex ] = 1;
    wait .05;
    self.buttonPressed[ buttonIndex ] = 0;
    }
    }
    
    isButtonPressed( actionID )
    {
    if ( self.buttonPressed[ actionID ] == 1)
    {
    self.buttonPressed[ actionID ] == 0;
    return 1;
    }
    else
    return 0;
    }

    0 Not allowed! Not allowed!

    Ignorance is contagious. It should be avoided at all times!!

  6. #6
    Nooblet xX4TH3WINXx's Avatar
    Join Date
    Oct 2011
    Posts
    40
    Points
    118
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Posts
    40
    Points
    118
    Gamer IDs

    PSN ID: Xenon_zH4ck3r

    Contact info:

    Youtube Channel: youtube.com/xX4TH3WINXx

    Default

    is there any way to get mw2 on wii

    0 Not allowed! Not allowed!
    Psn:iDo_BadAzZ_MoDz
    Xbox Gamertag:BrattiestData3
    Elite Mossy Mod Menu For Life

    ThatOneKid YouMayKnow

  7. #7
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

    Youtube Channel: http://www.youtube.com/l3g3darymods

    Default

    Quote Originally Posted by xX4TH3WINXx View Post
    is there any way to get mw2 on wii

    not a single way...you would have to start from scratch to make it for the wii

    0 Not allowed! Not allowed!

  8. #8
    Nooblet
    Join Date
    Aug 2011
    Posts
    32
    Points
    59
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    32
    Points
    59
    Gamer IDs

    Gamertag: uytr Steam ID: yu898l

    Default

    What language is this?

    0 Not allowed! Not allowed!

  9. #9
    Member
    Join Date
    Jul 2011
    Location
    U.S.A.
    Posts
    105
    Points
    388
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    U.S.A.
    Posts
    105
    Points
    388
    Gamer IDs

    PSN ID: Wiihacker2

    Default

    c++ and English

    0 Not allowed! Not allowed!
    I edit every mod ever created

  10. #10
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

    Youtube Channel: http://www.youtube.com/l3g3darymods

    Default

    Quote Originally Posted by wiihacker View Post
    c++ and English
    i don't know what your looking at, but thats not c++

    0 Not allowed! Not allowed!

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 02:13 AM.
Powered by vBulletin®
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.