AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Pressing a number (https://forums.alliedmods.net/showthread.php?t=184063)

Diegorkable 04-30-2012 11:56

Pressing a number
 
Hey guys,

I want to detect when players press the number "5".
I know that I can detect when a player's moving or shooting with FM_CmdStart, but there are no really button constants for numbers. Is there any way I can still do that?

Exolent[jNr] 04-30-2012 12:06

Re: Pressing a number
 
You can hook "slot5" since that's the default bind, but if player changes it then there's no guarantee.

Why do you want to hook 5? There could be a better solution depending on what you're doing.

Diegorkable 04-30-2012 14:11

Re: Pressing a number
 
Quote:

Originally Posted by Exolent[jNr] (Post 1699337)
You can hook "slot5" since that's the default bind, but if player changes it then there's no guarantee.

Why do you want to hook 5? There could be a better solution depending on what you're doing.

There always could be, but I was just wondering, nothing really I wanted to build with that :).
And yeah the probability that someone will hook slot5 on another key is low, so it's a pretty good method, thanks.


All times are GMT -4. The time now is 07:44.

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