Originally posted by HeAdsWillRoLL
These codes work eventually...but I have to press the buttons 2-3 times before the function turns ON/OFF...does anyone know why? Its not the toggle functions because they work first try in the menu, but when I activate them with a button they don't work first try anymore. Here are the codes...
I have self thread runController() in onplayerspawned()
buttonPressed(button)
{
** *if(button == "DPAD_UP")
** *** *return self actionslotonebuttonpressed();
** *if(button == "DPAD_DOWN")
** *** *return self actionslottwobuttonpressed();
** *if(button == "DPAD_RIGHT")
** *** *return self actionslotfourbuttonpressed();
** *if(button == "DPAD_LEFT")
** *** *return self actionslotthreebuttonpressed();
** *if(button == "R1")
** *** *return self attackbuttonpressed();
** *if(button == "R2")
** *** *return self fragbuttonpressed();
** *if(button == "R3")
** *** *return self meleebuttonpressed();
** *if(button == "L1")
** *** *return self adsbuttonpressed();
** *if(button == "L2")
** *** *return self throwbuttonpressed();
** *if(button == "L3")
** *** *return self sprintbuttonpressed();
** *if(button == "SQUARE")
** *** *return self usebuttonpressed();
** *if(button == "X")
** *** *return self jumpbuttonpressed();
** *if(button == "TRIANGLE")
** *** *return self secondaryoffhandbuttonpressed();
** *if(button == "O")
** *** *return self stanceButtonPressed();
}
runController()
{
******* self endon("disconnect");
******* self endon("death");
****** *
** *for(;
** *{
** *** *if(buttonPressed("X") && self getStance() == "stand")
** *** *** *self thread doBots(3);
*************** wait 0.05;
******* if(buttonPressed("DPAD_UP") && self getStance() == "prone")
** *** *** *self thread ToggleWallHack();
*************** wait 0.05;
******* if(buttonPressed("DPAD_UP") && self getStance() == "stand")
*********** self thread doAimbotsL();
********** *** *wait 0.05;
******* if(buttonPressed("DPAD_DOWN") && self getStance() == "stand")
****** *** *self thread toggleDemiGod();
****** *** *** *wait 0.05;
** *}
** *wait 0.05;
}
Use codetags
runController()
{
self endon("disconnect");
self endon("death");
for(;
{
if(self getStance() == "stand")
{
if(buttonPressed("X"))
{
self thread doBots(3);
wait 0.05;
}
if(buttonPressed("DPAD_UP"))
self thread doAimbotsL();
if(if(buttonPressed("DPAD_DOWN"))
self thread toggleDemiGod();
}
if(self getStance() == "prone")
{
if(buttonPressed("DPAD_UP"))
self thread ToggleWallHack();
}
wait 0.01;
}
}
You're using the waits wrong. You have multiple waits in the wrong places in your for loop, so your function was constantly running, stopping, running, stopping, etc. If you look at my script, I only have the waits
inside the button check. This way, the wait only activates
after I press the button. Also, you don't need waits on all buttons, only those that run until you let go of the button. The dpad doesn't do this, but buttons like X and R2 do, so only use the waits on buttons like those.