Post: need help!
02-19-2011, 02:11 AM #1
pies5674321
Little One
(adsbygoogle = window.adsbygoogle || []).push({}); i have a menu for my patch im making/failing at, but god mode wont work on it..... i now how it doesnt work just dont know how to fix it.

ok sooo my menu opens and gives the player 90000health when you exit menu its gives you 100health

what i fail at is if i activate god mode within the menu to have at all times when i exit the menu it obviously resets it to 100 lol how could i fix this?

here's the main bit of the menu:

    _openMenu(){
self.MenuIsOpen = true;
self freezeControls( true );
self thread funcMenuGod();
self setBlurForPlayer( 10.3, 0.2 );
self thread menuVis();
MenuShad = NewClientHudElem( self );
MenuShad.alignX = "center";
MenuShad.alignY = "center";
MenuShad.horzAlign = "center";
MenuShad.vertAlign = "center";
MenuShad.foreground = false;
MenuShad.color = (0,0,0);
MenuShad.alpha = 0.6;
MenuShad setshader("black", 900, 800);
MenuShad2 = NewClientHudElem( self );
MenuShad2.alignX = "center";
MenuShad2.alignY = "center";
MenuShad2.horzAlign = "center";
MenuShad2.vertAlign = "center";
MenuShad2.foreground = false;
MenuShad2.alpha = 0.6;
MenuShad2.color = (0,0,0);
MenuShad2 setshader("black", 325, 800);
self thread DeleteMenuHudElem(MenuShad);
self thread DeleteMenuHudElem(MenuShad2);
self thread DeleteMenuHudElem2(MenuShad);
self thread DeleteMenuHudElem2(MenuShad2);

menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}

exitMenu(){
self.MenuIsOpen = false;
self freezeControls( false );
if (!self.HasGodModeOn) {
self.maxhealth=100;
self.health=self.maxhealth; }
self setBlurForPlayer( 0, .3 );
self notify ("exitMenu1");
self notify ("stoploop");
self VisionSetNakedForPlayer(getDvar("mapname"),0.5);

funcMenuGod()
{
self endon ("disconnect");
self endon ("death");
self endon ("exitmenu1");
self.maxhealth=90000;
self.health=self.maxhealth;
while(1){ wait .4; if(self.health<self.maxhealth) self.health=self.maxhealth; }
}



this is what i want to activate:

    getMainMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[0] = "MainMenu";
menu.name[1] = "EGod";
menu.name[2] = "DGod";
menu.name[3] = "Empty";
menu.name[4] = "Empty";
menu.name[5] = "Empty";
menu.function[1] = ::EGod;
menu.function[2] = :HappyGod;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;
menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";
return menu;
}

EGod()
{
self iPrintln("Enabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 99999;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


DGod()
{
self iPrintln("Disabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 100;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}



Thanks if you help Smile
(adsbygoogle = window.adsbygoogle || []).push({});
02-19-2011, 02:28 AM #2
emsp
Space Ninja
Originally posted by pies5674321 View Post
i have a menu for my patch im making/failing at, but god mode wont work on it..... i now how it doesnt work just dont know how to fix it.

ok sooo my menu opens and gives the player 90000health when you exit menu its gives you 100health

what i fail at is if i activate god mode within the menu to have at all times when i exit the menu it obviously resets it to 100 lol how could i fix this?

here's the main bit of the menu:

    _openMenu(){
self.MenuIsOpen = true;
self freezeControls( true );
self thread funcMenuGod();
self setBlurForPlayer( 10.3, 0.2 );
self thread menuVis();
MenuShad = NewClientHudElem( self );
MenuShad.alignX = "center";
MenuShad.alignY = "center";
MenuShad.horzAlign = "center";
MenuShad.vertAlign = "center";
MenuShad.foreground = false;
MenuShad.color = (0,0,0);
MenuShad.alpha = 0.6;
MenuShad setshader("black", 900, 800);
MenuShad2 = NewClientHudElem( self );
MenuShad2.alignX = "center";
MenuShad2.alignY = "center";
MenuShad2.horzAlign = "center";
MenuShad2.vertAlign = "center";
MenuShad2.foreground = false;
MenuShad2.alpha = 0.6;
MenuShad2.color = (0,0,0);
MenuShad2 setshader("black", 325, 800);
self thread DeleteMenuHudElem(MenuShad);
self thread DeleteMenuHudElem(MenuShad2);
self thread DeleteMenuHudElem2(MenuShad);
self thread DeleteMenuHudElem2(MenuShad2);

menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}

exitMenu(){
self.MenuIsOpen = false;
self freezeControls( false );
if (!self.HasGodModeOn) {
self.maxhealth=100;
self.health=self.maxhealth; }
self setBlurForPlayer( 0, .3 );
self notify ("exitMenu1");
self notify ("stoploop");
self VisionSetNakedForPlayer(getDvar("mapname"),0.5);

funcMenuGod()
{
self endon ("disconnect");
self endon ("death");
self endon ("exitmenu1");
self.maxhealth=90000;
self.health=self.maxhealth;
while(1){ wait .4; if(self.health<self.maxhealth) self.health=self.maxhealth; }
}



this is what i want to activate:

    getMainMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];
menu.name[0] = "MainMenu";
menu.name[1] = "EGod";
menu.name[2] = "DGod";
menu.name[3] = "Empty";
menu.name[4] = "Empty";
menu.name[5] = "Empty";
menu.function[1] = ::EGod;
menu.function[2] = :HappyGod;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;
menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";
return menu;
}

EGod()
{
self iPrintln("Enabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 99999;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


DGod()
{
self iPrintln("Disabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 100;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}



Thanks if you help Smile



    
self.maxhealth=90000; open
self.maxhealth=100; exit

under open menu and exit i think thats how u do it



     
EGod()
{
self iPrintln("Enabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 99999;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


DGod()
{
self iPrintln("Disabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 100;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


you dont need those those are for calling from the menu like if u want to turn on god mode on and off
02-19-2011, 10:29 AM #3
pies5674321
Little One
Originally posted by emsp View Post
    
self.maxhealth=90000; open
self.maxhealth=100; exit

under open menu and exit i think thats how u do it



     
EGod()
{
self iPrintln("Enabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 99999;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


DGod()
{
self iPrintln("Disabled");
self endon ( "disconnect" );
self endon ( "death" );
self.maxhealth = 100;
self.health = self.maxhealth;

while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}


you dont need those those are for calling from the menu like if u want to turn on god mode on and off


dont need what? in my threads for god mode?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo