Raised This Month: $ Target: $400
 0% 

Detect key


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CodeStepper
Member
Join Date: Jun 2013
Location: Polska
Old 07-16-2013 , 18:19   Detect key
Reply With Quote #1

Hi!
It is possible to detect which key user is pressing?
I know that I can do this:
PHP Code:
public client_PreThink(id)
{
new 
button get_user_button(id);

But it only capture a main keys. And what about h g or something else?

And it is possible to create own impulse which were be captured by client_impulse function?
CodeStepper is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-16-2013 , 18:26   Re: Detect key
Reply With Quote #2

Quote:
Originally Posted by CodeStepper View Post
It is possible to detect which key user is pressing?
No

Quote:
But it only capture a main keys. And what about h g or something else?
You can only catch the actions, not the keys

Quote:
And it is possible to create own impulse which were be captured by client_impulse function?
register_impulse
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
CodeStepper
Member
Join Date: Jun 2013
Location: Polska
Old 07-17-2013 , 05:55   Re: Detect key
Reply With Quote #3

Ok. Thanks
CodeStepper is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 07-17-2013 , 12:59   Re: Detect key
Reply With Quote #4

G for example it's drop command, so you can do this
PHP Code:
register_clcmd("drop""clcmd_yourfunction"
baneado is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-17-2013 , 17:07   Re: Detect key
Reply With Quote #5

Quote:
Originally Posted by baneado View Post
G for example it's drop command, so you can do this
PHP Code:
register_clcmd("drop""clcmd_yourfunction"
That is not always true which is why the actual answer to the question is no.
__________________
fysiks 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 06:32.


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