Post: Freezing whenever i add ToggleGod
07-17-2015, 10:36 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Ok so i tried godmode and it froze when loading the map (froze just after Free For All faded in)
Tried this several times in the past, and i failed. yes i took out the godmode enable / disable where the menu loads and closes.

Heres the code:
    
ToggleGod()
{
if(self.God==false)
{
self iprintlnbold("God Mode[^2ON^7]"); // Text to Notify that God Mode is on
self enableInvulnerability(); // Enables God Mode
self.God=true; // true/false Statement
}
else
{
self iprintlnbold("God Mode[^1OFF^7]"); //Text to Notify that God Mode is off
self disableInvulnerability(); //Disables God Mode
self.God=false; //true/false Statement
}
}


And i call it like this:
    
self MenuOption("Sub Menu 1", 0, "God Mode", ::ToggleGod);


so whats the problem? why am i freezing?
Its freezing even when i remove the call from option, but when i remove the function itself, it does not freeze :/
(adsbygoogle = window.adsbygoogle || []).push({});
07-17-2015, 11:54 PM #2
DrHackHD
Bounty hunter
Try This:
ToggleGod()
{
if(self.God==false)
{
self iprintlnbold("God Mode[^2ON^7]");
self enableInvulnerability();
self.godenabled=true;
self.God=true;
}
else
{
self iprintlnbold("God Mode[^1OFF^7]");
self disableInvulnerability();
self.godenabled=false;
self.God=false;
}
}
07-17-2015, 11:57 PM #3
Originally posted by DrHackHD View Post
Try This:
ToggleGod()
{
if(self.God==false)
{
self iprintlnbold("God Mode[^2ON^7]");
self enableInvulnerability();
self.godenabled=true;
self.God=true;
}
else
{
self iprintlnbold("God Mode[^1OFF^7]");
self disableInvulnerability();
self.godenabled=false;
self.God=false;
}
}


Will try that! Thanks!
07-18-2015, 12:02 AM #4
Originally posted by RussianLobbyz View Post
Will try that! Thanks!


It worked sort of, now im freezing when Loading bar is at Quarter way through
07-18-2015, 03:01 AM #5
bump
.
07-18-2015, 03:10 AM #6
Dacoco
I void warranties.
Originally posted by RussianLobbyz View Post
Ok so i tried godmode and it froze when loading the map (froze just after Free For All faded in)
Tried this several times in the past, and i failed. yes i took out the godmode enable / disable where the menu loads and closes.

Heres the code:
    
ToggleGod()
{
if(self.God==false)
{
self iprintlnbold("God Mode[^2ON^7]"); // Text to Notify that God Mode is on
self enableInvulnerability(); // Enables God Mode
self.God=true; // true/false Statement
}
else
{
self iprintlnbold("God Mode[^1OFF^7]"); //Text to Notify that God Mode is off
self disableInvulnerability(); //Disables God Mode
self.God=false; //true/false Statement
}
}


And i call it like this:
    
self MenuOption("Sub Menu 1", 0, "God Mode", ::ToggleGod);


so whats the problem? why am i freezing?
Its freezing even when i remove the call from option, but when i remove the function itself, it does not freeze :/


try this
    toggleGodMode()
{
if(self.God==false)
{
self iPrintln("GodMode: ^2On");
self.maxhealth=999999999;
self.health=self.maxhealth;
if(self.health<self.maxhealth)self.health=self.maxhealth;
self enableInvulnerability();
self.godenabled=true;
self.God=true;
}
else
{
self iPrintln("GodMode: ^1Off");
self.maxhealth=100;
self.health=self.maxhealth;
self disableInvulnerability();
self.godenabled=false;
self.God=false;
}
}


call with
    ::toggleGodMode
07-18-2015, 12:48 PM #7
Originally posted by Duh
try this
    toggleGodMode()
{
if(self.God==false)
{
self iPrintln("GodMode: ^2On");
self.maxhealth=999999999;
self.health=self.maxhealth;
if(self.health<self.maxhealth)self.health=self.maxhealth;
self enableInvulnerability();
self.godenabled=true;
self.God=true;
}
else
{
self iPrintln("GodMode: ^1Off");
self.maxhealth=100;
self.health=self.maxhealth;
self disableInvulnerability();
self.godenabled=false;
self.God=false;
}
}


call with
    ::toggleGodMode


Now its freezing back at where the Free-For-All fades in.
07-18-2015, 03:37 PM #8
-Numb
You talkin to me?
Originally posted by RussianLobbyz View Post
Ok so i tried godmode and it froze when loading the map (froze just after Free For All faded in)
Tried this several times in the past, and i failed. yes i took out the godmode enable / disable where the menu loads and closes.

Heres the code:
    
ToggleGod()
{
if(self.God==false)
{
self iprintlnbold("God Mode[^2ON^7]"); // Text to Notify that God Mode is on
self enableInvulnerability(); // Enables God Mode
self.God=true; // true/false Statement
}
else
{
self iprintlnbold("God Mode[^1OFF^7]"); //Text to Notify that God Mode is off
self disableInvulnerability(); //Disables God Mode
self.God=false; //true/false Statement
}
}


And i call it like this:
    
self MenuOption("Sub Menu 1", 0, "God Mode", ::ToggleGod);


so whats the problem? why am i freezing?
Its freezing even when i remove the call from option, but when i remove the function itself, it does not freeze :/


There is nothing wrong with the godmode function you got at the start. "self MenuOption("Sub Menu 1", 0, "God Mode", ::ToggleGod);" seems to look okay too..
You said that you had removed godmode from the menu opening and closing, maybe you made an error then.
07-18-2015, 03:42 PM #9
Originally posted by Numb View Post
There is nothing wrong with the godmode function you got at the start. "self MenuOption("Sub Menu 1", 0, "God Mode", ::ToggleGod);" seems to look okay too..
You said that you had removed godmode from the menu opening and closing, maybe you made an error then.


yes i double checked, i got it working now, but the "Bind NoClip to R2" from TehMerkMods thread (Managed Code List Part 3) seemed to have been freezing, but the noclip stand alone is not disabling for some odd reason.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo