AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   GetClientButtons other than the defined? (https://forums.alliedmods.net/showthread.php?t=95073)

Fampat 06-19-2009 03:29

GetClientButtons other than the defined?
 
Hi Folks,
i got a question, again :mrgreen:, 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!

exvel 06-19-2009 06:02

Re: GetClientButtons other than the defined?
 
AFAIK you can only get buttons that are listed here (IN_...).

SAMURAI16 06-19-2009 06:58

Re: GetClientButtons other than the defined?
 
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

Fampat 06-19-2009 07:05

Re: GetClientButtons other than the defined?
 
Ah ok, thanks for the info.


All times are GMT -4. The time now is 21:49.

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