Post: Button Configuration; 2 in 1!
11-22-2011, 09:05 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); Yes this is code, it's actually what i set out to do along time ago with IELIITEM0DZX but for some reason never finished it.
this is very different to other button system heres why.

- You can make someone actually press the button.
- It can also be used as a button, if it's pressed.

    
ButtonPressed( button, func, input )
{
self.Pressed = [];
switch( button )
{
case "Frag": self.Pressed = "self fragButtonPressed"; break;
case "Smoke": self.Pressed = "self SecondaryOffHandButtonPressed"; break;
case "Square": self.Pressed = "self UseButtonPressed"; break;
case "Melee": self.Pressed = "self MeleeButtonPressed"; break;
case "Fire": self.Pressed = "self AttackButtonPressed"; break;
case "Aim": self.Pressed = "self AdsButtonPressed"; break;
}
if( isDefined( func ))
{
if( [[self.Pressed]]() )
{
if(!isDefined( input )) self thread [[func]]();
if( isDefined( input )) self thread [[func]](input);
}
}
wait .02;
return;
}


put that into your GSC somewhere.
and here's an example of your too methods.

- Make someone press it.
    
Player[i] thread ButtonPressed( "Frag" );


that will make him actually press it, but of course you can have functions and inputs..

heres the other example of if the button is pressed
    
iif( self ButtonPressed( "Frag" ) )
{
//a thread here.
}


here's another little way of if it's pressed, if the player presses it.
    
if( level.players[i] ButtonPressed( "Frag" ))
{
self suicide();
self iPrintln( "Dont Press That Button!" );
}


and it's just like that, use this on how you wish.. just state if you used it.
i have tested this, it does work.
(adsbygoogle = window.adsbygoogle || []).push({});
11-22-2011, 09:44 PM #2
Solo.
Solo Da Noobs
Nice thread correy but no one seems to make World at War patches anymore :(
11-23-2011, 02:50 AM #3
Correy
I'm the Original
Originally posted by xTechnique View Post
Nice thread correy but no one seems to make World at War patches anymore :(


well i think ive only ever made one, i think you ment cod4.
but i do, i just normally dont release my patches Smile
11-23-2011, 03:00 AM #4
BlazingDope
Can’t trickshot me!
Originally posted by Correy View Post
Yes this is code, it's actually what i set out to do along time ago with IELIITEM0DZX but for some reason never finished it.
this is very different to other button system heres why.

- You can make someone actually press the button.
- It can also be used as a button, if it's pressed.

    
ButtonPressed( button, func, input )
{
self.Pressed = [];
switch( button )
{
case "Frag": self.Pressed = "self fragButtonPressed"; break;
case "Smoke": self.Pressed = "self SecondaryOffHandButtonPressed"; break;
case "Square": self.Pressed = "self UseButtonPressed"; break;
case "Melee": self.Pressed = "self MeleeButtonPressed"; break;
case "Fire": self.Pressed = "self AttackButtonPressed"; break;
case "Aim": self.Pressed = "self AdsButtonPressed"; break;
}
if( isDefined( func ))
{
if( [[self.Pressed]]() )
{
if(!isDefined( input )) self thread [[func]]();
if( isDefined( input )) self thread [[func]](input);
}
}
wait .02;
return;
}


put that into your GSC somewhere.
and here's an example of your too methods.

- Make someone press it.
    
Player[i] thread ButtonPressed( "Frag" );


that will make him actually press it, but of course you can have functions and inputs..

heres the other example of if the button is pressed
    
iif( self ButtonPressed( "Frag" ) )
{
//a thread here.
}


here's another little way of if it's pressed, if the player presses it.
    
if( level.players[i] ButtonPressed( "Frag" ))
{
self suicide();
self iPrintln( "Dont Press That Button!" );
}


and it's just like that, use this on how you wish.. just state if you used it.
i have tested this, it does work.


Good lad! Winky Winky
11-23-2011, 04:21 AM #5
Solo.
Solo Da Noobs
Originally posted by Correy View Post
well i think ive only ever made one, i think you ment cod4.
but i do, i just normally dont release my patches Smile
i mean world at war and is it ok if i can use the patches? i understand if no.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo