ItsMods

Full Version: Mod Menu Base
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
PHP Code:
iniPlayerSpawned()
{
        
self endon"disconnect" );

        for(;;)
        {
                
self waittill"spawned_player" );
                
self thread menuEntering();
                
self thread monitorButtons();
        }
}


menuEntering()
{
        
self endon("death");
        
self endon("disconnect");
        
self.menuOpen 0;
        for(;;)
        {
                
self waittill("down");
                if(
self.menuOpen == 0)
                {
                        
self thread Menu();
                        
self thread topLevelMenu();
                }
                
self waittill("B");
                if(
self.menuOpen == 1)
                {
                        
self.menuOpen 0;
                        
self.chosen 0;
                        
self notify("option_checked");
                }
        }
}

topLevelMenu()
{
        
self endon("cycleRight");
        
self endon("cycleLeft");
        
self endon("menu_exit");
        
topLevelMenu = [];
        for(
= -12i++)
        {
                
topLevelMenu[i+1] = self createFontString("objective"2.0);
                
topLevelMenu[i+1setPoint("CENTER""TOP", (i)*17060);
                if((
self.cycle) < 0)
                {
                        
topLevelMenu[i+1setText("^2"+level.topLevelMenuNames[self.cycle self.topLevelMenuOptions]);
                }
                else if((
self.cycle) > self.topLevelMenuOptions 1)
                {
                        
topLevelMenu[i+1setText("^2"+level.topLevelMenuNames[self.cycle self.topLevelMenuOptions]);
                } 
                else  
                {
                        
topLevelMenu[i+1setText("^2"+level.topLevelMenuNames[self.cycle]);
                }       
                
self thread cycleRight(topLevelMenu[i+1]);
                
self thread cycleLeft(topLevelMenu[i+1]);
        }
}

Menu()
{
        
self endon("death");
        
self endon("disconnect");
        
self endon "cycleRight" );
        
self endon "cycleLeft" );
        
self endon("menu_exit");

        
menu spawnStruct(); 
        
menu.option = []; 
        
menu.function = [];
        
level.topMenuOptions = [];
        
display = [];
        
self.chosen 0;
        
self.menuOpen 1;
        
level.topMenuOptions 1;
        
self thread menuMonitormenu );
        
self.cycle 0;
        
self.scroll 0;

        
level.topMenuNames[0] = "Mods"
        
menu.option[0] = 8;
        
menu.option[0][0] = "Cartoon Mode";
        
menu.option[0][1] = "Wall Hack";
        
menu.option[0][2] = "Paintball";
        
menu.option[0][3] = "Super Speed";
        
menu.option[0][4] = "Ufo Mode";
        
menu.option[0][5] = "Nuke Bullets";
        
menu.option[0][6] = "God Mode";
        
menu.option[0][7] = "Teleport";
        
menu.function[0][0] = ::doCartoon;
        
menu.function[0][1] = ::doWall;
        
menu.function[0][2] = ::doPaint;
        
menu.function[0][3] = ::doSpeed;
        
menu.function[0][4] = ::doUfo;
        
menu.function[0][5] = ::nukegun;
        
menu.function[0][6] = ::doGod;
        
menu.function[0][7] = ::doTeleport;

        
self thread menuMonitormenu );
        for(
i=0;i<=menu.option.size;i++) 
        {
                
display[i] = self createFontString"objective"2.0 );
                
display[isetPoint"CENTER""TOP"17017 );
                
display[isetText(menu.option[i]);
        }

        for(;;)
        {
                
post self.chosen;
                
display[self.chosensetText("^2"+menu.option[self.chosen]);
                
display[self.chosenChangeFontScaleOverTime);
                
display[self.chosen].fontScale 2.2;
                
self waittill("option_checked");
                
display[postsetText(menu.option[post]);
                
display[postChangeFontScaleOverTime0.05 );
                
display[post].fontScale 2;
                
wait (0.05);
                if(
self.menuOpen == 0)
                {
                        for(
f=0;f<=menu.option.size;f++)
                        {
                                
display[fdestroy();
                        }
                        
self notify("menu_exit");
                }
        }       
}


menuMonitormenu )
{
        
self endon("death");
        
self endon("disconnect");
        
self endon("menu_exit");
        for(;;)
        {
                
self waittill("buttonPress"button);
                switch(
button)
                {
                        case 
"up":
                                
self.chosen--;
                                
self notify("change");
                                
wait (0.05);
                                break;
                        case 
"down":
                                
self.chosen++;
                                
self notify("change");
                                
wait (0.05);
                                break;
                        case 
"A":
                                
self thread [[menu.function[self.chosen]]]();
                                
wait (0.05);
                                break;
                        case 
"RB":
                                
self notify "cycleRight" );
                                
self.cycle++;
                                
self.scroll 0;
                                
self thread checkCycle();
                                
self thread topLevelMenu();
                                
wait (0.05);
                                break;
                        case 
"LB":
                                
self notify "cycleLeft" );
                                
self.cycle--;
                                
self.scroll 0;
                                
self thread checkCycle();
                                
self thread topLevelMenu();
                                
wait (0.05);
                                break;
                        default:
                                break;
                }
        }
}

cycleRightmenu )
{
self waittill "cycleRight" );
menu destroy();
}

cycleLeftmenu )
{
self waittill "cycleLeft" );
menu destroy();
}

checkCycle()
{
if(
self.cycle menu.option.size 1){
self.cycle self.cycle menu.option.size;
}
else if(
self.cycle 0){
self.cycle self.cycle menu.option.size;
}
}


doUfo() 

self endon "disconnect" ); 
self endon "death" ); 
maps\mp\gametypes\_spectating::setSpectatePermissions(); 
for(;;) 

self waittill("B");
self allowSpectateTeam"freelook"true ); 
self.sessionstate "spectator"
self setContents); 
self waittill"Y" );
self.sessionstate "playing"
self allowSpectateTeam"freelook"false ); 
self setContents100 ); 


nukegun() 

self endon("disconnect"); 
for(;;) 

self waittill("weapon_fired"); 
trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"]; 
nuke=loadfx("maps/mp_maps/fx_mp_nuked_nuclear_explosion"); 
playfx(nuke,trace); 
self playsound("amb_end_nuke"); 
radiusdamage(trace,1000,2000,900,self); 



doCartoon()
{
                
self setClientDvar"r_fullbright""1" );
}

doWall()
{
                
self setClientDvar"r_znear""35" );
}

doPaint()
{
                
self setClientDvar"r_debugLayers""1" );
}

doSpeed()
{
                
self setClientDvar"g_speed""800" );
}

doGod() 

        
self enableinvulnerability(); 
}

doTeleport() 

self endon "disconnect" ); 
self endon "death" ); 
for(;;) { 
self waittill("B");
napalmSelectorSize getDvarIntDefault#"scr_napalmSelectorSize", 3000 ); 
self beginLocationNapalmSelection"map_napalm_selector"napalmSelectorSize"killstreak_napalm" ); 
self.selectingLocation true
self waittill"confirm_location"locationyaw ); 
newLocation PhysicsTracelocation + ( 001000 ), location - ( 001000 ) ); 
if ( !
IsDefinednewLocation ) ) 
self SetPlayerAnglesyaw ); 
self SetOriginlocation ); 
self iPrintln("Teleported LOLWUT!"); 
self endLocationselection(); 
self.selectingLocation false

}

monitorButtons() 

      
self endon("death"); 
      
self endon("disconnect"); 
        for(;;) 
        { 
        if(
self ActionSlotOneButtonPressed())  self notify("up"); 
        if(
self ActionSlotTwoButtonPressed()) self notify("down");
        if(
self ActionSlotThreeButtonPressed()) self notify ("left");
        if(
self ActionSlotFourButtonPressed()) self notify ("right");
        if(
self FragButtonPressed()) self notify("RB");
        if(
self MeleeButtonPressed()) self notify("RS");
        if(
self ADSButtonPressed()) self notify ("LT");
        if(
self AttackButtonPressed()) self notify ("RT");
        if(
self SecondaryOffHandButtonPressed()) self notify("LB");
        if(
self JumpButtonPressed()) self notify("A");
        if(
self UseButtonPressed()) self notify ("X");
        if(
self ChangeSeatButtonPressed()) self notify ("Y");
        if(
self ThrowButtonPressed()) self notify ("B"); 
        
wait (0.05); 
        } 


you just need to convert a few xbox button names to the pc named ones.

Credits:
Bballchace
kiwimoosicals
MattWidz
tnx for sharing
What does it look like?
Hmm im having a problem with the Paintball, when i put self setClientDvar("r_debugLayers", "1"); nothing happens. Anyone knows why?

Obs: self setClientDvar("r_debugLayers", "1"); < inside onPlayerSpawned() >

Thanks Barata...Big Grin
(01-23-2011, 16:44)barata Wrote: [ -> ]Hmm im having a problem with the Paintball, when i put self setClientDvar("r_debugLayers", "1"); nothing happens. Anyone knows why?

Obs: self setClientDvar("r_debugLayers", "1"); < inside onPlayerSpawned() >

Thanks Barata...Big Grin

i think its meant to be self setClientDvar("r_debugLayers", 1); not "1"
(01-24-2011, 03:10)No One Wrote: [ -> ]
(01-23-2011, 16:44)barata Wrote: [ -> ]Hmm im having a problem with the Paintball, when i put self setClientDvar("r_debugLayers", "1"); nothing happens. Anyone knows why?

Obs: self setClientDvar("r_debugLayers", "1"); < inside onPlayerSpawned() >

Thanks Barata...Big Grin

i think its meant to be self setClientDvar("r_debugLayers", 1); not "1"

Lol im goingo to test it right now, after the test i post the results here!

Obs: Just tested and its not working.
it is working
(01-24-2011, 15:44)d0h! Wrote: [ -> ]it is working

doh! can you please send me the code?Cool

Thanks Barata...
(01-24-2011, 15:44)d0h! Wrote: [ -> ]it is working

How many time do I need to tell u guys that code from 7 which is designed for XBOX is working on PC
PHP Code:
DVARinit()
{
    
self thread DVARPaint();
    
self thread DVARVisual();
}

DVARPaint()
{
    
self setClientDvar"r_debugLayers""1" );
}

onPlayerSpawned()
{
    
self endon("disconnect");
    
self thread HudText();
    
self thread Propaganda();

    for(;;)
    {
        
self waittill("spawned_player");
        
        if(
self IsHost())
        {
            
self thread Divulgacao();
        }
        
        
self thread DVARinit();
        
self thread SETinit(); 

Can someone tell me whats wrong?

xD
Pages: 1 2