Post: Why don't these button shortcuts work first try?
06-24-2016, 08:39 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); 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(;Winky Winky
** *{
** *** *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;
}
06-24-2016, 09:04 PM #2
HiddenHour
I defeated!
Originally posted by HeAdsWillRoLL View Post
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(;Winky Winky
** *{
** *** *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(;Winky Winky
{
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.

The following user thanked HiddenHour for this useful post:

HeAdsWillRoLL
06-24-2016, 09:09 PM #3
Originally posted by HiddenHour View Post
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.


Thanks! That explains so much with other issues I was having too ahah!!
06-24-2016, 09:50 PM #4
HiddenHour
I defeated!
Originally posted by HeAdsWillRoLL View Post
Thanks! That explains so much with other issues I was having too ahah!!


Good luck my friend Tustin

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo