ItsMods

Full Version: Bind thread on specific keys?!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
help me to get this code work Big Grin and it should end if the button is unpressed
PHP Code:
walk()
{
self endon"disconnect" );

    while(
1){
        if( !
self ButtonPressed ("+breath_sprint") ){
        
self setClientDvar("perk_weapSpreadMultiplier"0.15);
        
self SetMoveSpeedScale0.55 );
        
self setperk("specialty_quieter");
        
wait 0.01;
        }        
            else
        {    
        
self thread    customrecoil();
        
self SetMoveSpeedScale1.15 );
        
self unsetPerk("specialty_quieter");
        }
       
wait 0.5;    
    }

no one? Sad
Isn't it:
PHP Code:
while(;;) 

and why do you have:
PHP Code:
if( !self ButtonPressed ("+breath_sprint") ){ 
The "!"
/pushy
(06-03-2011, 14:27)surtek Wrote: [ -> ]Isn't it:
PHP Code:
while(;;) 

and why do you have:
PHP Code:
if( !self ButtonPressed ("+breath_sprint") ){ 
The "!"

No surtek, it's for(;Wink or while(1), they're the same thing. :>

Have you tried removing the plus sign?
(06-03-2011, 23:43)master131 Wrote: [ -> ]
(06-03-2011, 14:27)surtek Wrote: [ -> ]Isn't it:
PHP Code:
while(;;) 

and why do you have:
PHP Code:
if( !self ButtonPressed ("+breath_sprint") ){ 
The "!"

No surtek, it's for(;Wink or while(1), they're the same thing. :>

Have you tried removing the plus sign?

i'm not stupid i tried everything

if( !self ButtonPressed ("+breath_sprint") ){
if( !self ButtonPressed ("breath_sprint") ){
if( self ButtonPressed ("+breath_sprint") ){
if( self ButtonPressed ("breath_sprint") ){
if( self.ButtonPressed ("+breath_sprint") ){
if( self.ButtonPressed ("breath_sprint") ){
if( self.KeyPressed ("+breath_sprint") ){

etc...
/pushy
Isn't buttonPressed for a specific button (Like "DPAD_UP")? Also I think it only works on consoles.
what about
PHP Code:
if ( "sprint_begin" 
Pages: 1 2