Post: How to add On/Off Toggles in basic menu?
08-01-2015, 02:46 PM #1
Giselle_Modz
Save Point
(adsbygoogle = window.adsbygoogle || []).push({});
Hello NGU, i have a problem whit my menu. I can't add the On/Off Toggles in my menu. Im Using Stoned`s Yoda Menu base v4, Its a basic menu and i can't add the toggles.
Images of the base
You must login or register to view this content.
You must login or register to view this content.
You must login or register to view this content.
Its a simple menu base (Sorry for my bad english)
(adsbygoogle = window.adsbygoogle || []).push({});
08-22-2015, 08:42 PM #11
Tristen
Who’s Jim Erased?
i added toggle text in there for him
08-22-2015, 08:47 PM #12
itsSorrow
In my man cave
Originally posted by N View Post
i added toggle text in there for him


no you didn't
08-23-2015, 06:45 AM #13
coolmankiller
Can’t trickshot me!
Since everyone's not answering your question, and going off topic I'll show you how .

Add this to menu.
    "Test Var " + getBooleanStatus(self.testvar), ::test);


Add getBootleanStatus , and hook spawn bootlean to start on spawn in
Also , depending on your menu you may need to set a loop to update the options.
    getBooleanStatus(bool)
{
if (!isDefined(bool))
return "^1Disabled";

if (bool)
return "^2Enabled";
else
return "^1Disabled";
}

SpawnBooleans()
{
self.testvar = false;
}


Add the Boolean too your function here's an example:

    test()
{
self iprintln("Test");
self.testvar = !self.testvar; //Change to your bootlean var
}
08-23-2015, 07:13 AM #14
FRINZ
I’m too L33T
Originally posted by coolmankiller View Post
Since everyone's not answering your question, and going off topic I'll show you how .

Add this to menu.
    "Test Var " + getBooleanStatus(self.testvar), ::test);


Add getBootleanStatus , and hook spawn bootlean to start on spawn in
Also , depending on your menu you may need to set a loop to update the options.
    getBooleanStatus(bool)
{
if (!isDefined(bool))
return "^1Disabled";

if (bool)
return "^2Enabled";
else
return "^1Disabled";
}

SpawnBooleans()
{
self.testvar = false;
}


Add the Boolean too your function here's an example:

    test()
{
self iprintln("Test");
self.testvar = !self.testvar; //Change to your bootlean var
}


you forgot on thing m9 is that you hv to mk it false if to rest it lol so mk a reset Booleans

example you have self.testvar = !self.testvar;
ResetBooleans()
{
self.testvar = 0;
}

have that run in onPlayerSpawned()
So looks like this

onPlayerSpawned()
{
ResetBooleans();
}

then wen adding your script example superspeed
    Speed()
{
if(self.sppeeeed == 0)
{
setDvar("g_speed", "500");
self.sppeeeed = 1;
self.SupperSpeedz=!self.SupperSpeedz;
}
else
{
setDvar("g_speed", "200");
self.sppeeeed = 0;
self.SupperSpeedz=!self.SupperSpeedz;
}
}


Now that self.SupperSpeedz you add it to your Reset
ResetBooleans()
{
self.SupperSpeedz = 0;
}

So i call mine like so

"SuperSpeed"+"""""getBooleanStatus(self.SupperSpeedz )"""""""""""""" ::Speed); user use shit b0ss
Then add it "Test Var " + getBooleanStatus(self.testvar), ::test);



lol i dint see spawn Booleans in ur codethread c:::
my mistakes c:
08-23-2015, 08:04 AM #15
itsSorrow
In my man cave
Originally posted by Sexiness View Post
you forgot on thing m9 is that you hv to mk it false if to rest it lol so mk a reset Booleans

example you have self.testvar = !self.testvar;
ResetBooleans()
{
self.testvar = 0;
}

have that run in onPlayerSpawned()
So looks like this

onPlayerSpawned()
{
ResetBooleans();
}

then wen adding your script example superspeed
    Speed()
{
if(self.sppeeeed == 0)
{
setDvar("g_speed", "500");
self.sppeeeed = 1;
self.SupperSpeedz=!self.SupperSpeedz;
}
else
{
setDvar("g_speed", "200");
self.sppeeeed = 0;
self.SupperSpeedz=!self.SupperSpeedz;
}
}


Now that self.SupperSpeedz you add it to your Reset
ResetBooleans()
{
self.SupperSpeedz = 0;
}

So i call mine like so

"SuperSpeed"+getBooleanStatus(self.SupperSpeedz ), ::Speed);
Then add it "Test Var " + getBooleanStatus(self.testvar), ::test);



lol i dint see spawn Booleans in ur codethread c:::
my mistakes c:


froze .-.
08-23-2015, 08:12 AM #16
FRINZ
I’m too L33T
Originally posted by GentleSlugger View Post
froze .-.


lol Drack
08-23-2015, 08:12 AM #17
itsSorrow
In my man cave
Originally posted by Sexiness View Post
lol Drack


I froze on deez nuts Happy Happy
08-23-2015, 04:46 PM #18
coolmankiller
Can’t trickshot me!
Originally posted by Sexiness View Post
you forgot on thing m9 is that you hv to mk it false if to rest it lol so mk a reset Booleans

example you have self.testvar = !self.testvar;
ResetBooleans()
{
self.testvar = 0;
}

have that run in onPlayerSpawned()
So looks like this

onPlayerSpawned()
{
ResetBooleans();
}

then wen adding your script example superspeed
    Speed()
{
if(self.sppeeeed == 0)
{
setDvar("g_speed", "500");
self.sppeeeed = 1;
self.SupperSpeedz=!self.SupperSpeedz;
}
else
{
setDvar("g_speed", "200");
self.sppeeeed = 0;
self.SupperSpeedz=!self.SupperSpeedz;
}
}


Now that self.SupperSpeedz you add it to your Reset
ResetBooleans()
{
self.SupperSpeedz = 0;
}

So i call mine like so

"SuperSpeed"+"""""getBooleanStatus(self.SupperSpeedz )"""""""""""""" ::Speed); user use shit b0ss
Then add it "Test Var " + getBooleanStatus(self.testvar), ::test);



lol i dint see spawn Booleans in ur codethread c:::
my mistakes c:


Ummm..... Look at the code again , there's spawnbootlean :P . The codes all there

Edit: Just saw your edit lol

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo