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

GetClientButtons other than the defined?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fampat
Junior Member
Join Date: Jun 2009
Old 06-19-2009 , 03:29   GetClientButtons other than the defined?
Reply With Quote #1

Hi Folks,
i got a question, again , currently i use a menu to ask players to press key 1 if they want to respawn while in a specific phase of gameplay.

Due to i only have one possible answer to the question i state, i would rather use the OnGameFrame and GetClientButtons insteat of an menu, and fire my event if the player presses the "F4"-key.

So insteat of menu:
Code:
 
Respawn Now?
--------------
1. Yes
2. Close
I would like to have a centertext:
Code:
 
To respawn now press the <F4> key!
So is it possible to check if the client has pressed his "F4"-key?
If so, wich bitsum would the key be?
Is there a list of key-bitsums for sourcemod or a command i can get them showed?

Thanks for any help!

Last edited by Fampat; 06-19-2009 at 03:33.
Fampat is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 06-19-2009 , 06:02   Re: GetClientButtons other than the defined?
Reply With Quote #2

AFAIK you can only get buttons that are listed here (IN_...).
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
SAMURAI16
BANNED
Join Date: Sep 2006
Old 06-19-2009 , 06:58   Re: GetClientButtons other than the defined?
Reply With Quote #3

FYI, "m_nButtons" isn't able to hold a bit sum of all pressed keyboard keys, here is stored a bit sum of all activated corresponding special +/- commands like attack, jump, etc.
So it's impossible to catch when player press F4
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Fampat
Junior Member
Join Date: Jun 2009
Old 06-19-2009 , 07:05   Re: GetClientButtons other than the defined?
Reply With Quote #4

Ah ok, thanks for the info.
Fampat 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 19:15.


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