Raised This Month: $51 Target: $400
 12% 

Button press


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zakt4n
Member
Join Date: Jul 2011
Old 10-22-2011 , 13:18   Button press
Reply With Quote #1

How can i get if the player is pressing a button (that have a bind)?

Thanks!!!
zakt4n is offline
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 10-22-2011 , 13:27   Re: Button press
Reply With Quote #2

http://docs.sourcemod.net/api/index....d=show&id=864&

Work with sm 1.4 ;)
BoBzY is offline
zakt4n
Member
Join Date: Jul 2011
Old 10-22-2011 , 13:47   Re: Button press
Reply With Quote #3

but can i execute a command during the press of player?

like make player in noclip while he is pressing the button

Thanks!!!
zakt4n is offline
BoBzY
AlliedModders Donor
Join Date: Aug 2010
Location: Bruxelles
Old 10-22-2011 , 13:51   Re: Button press
Reply With Quote #4

Use the callback
BoBzY is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 10-22-2011 , 14:16   Re: Button press
Reply With Quote #5

My guess is he's asking how to find out when a player presses a KEY. An actual button, not an ingame entity.

You can't find out if a player presses "Y" or "Up Arrow" or sortlike, but you can find out if he issued a command like "+forward", which are commonly bound to certain keys.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
fs_wtong
Junior Member
Join Date: Oct 2011
Old 10-23-2011 , 04:20   Re: Button press
Reply With Quote #6

Use Old buttons this way!
fs_wtong is offline
Send a message via ICQ to fs_wtong
zakt4n
Member
Join Date: Jul 2011
Old 10-24-2011 , 15:02   Re: Button press
Reply With Quote #7

i'm looking for a code that i can do something WHILE the player is pressing the binded button (example: button p is binded to use the command "+hi"), so i want to do something during the press action

thanks
zakt4n is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode