AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detecting double press (https://forums.alliedmods.net/showthread.php?t=228689)

akcaliberg 10-25-2013 08:44

Detecting double press
 
Hi, I'm working on a Sprint plugin. When someone double-taps the forward button, he will run faster for a few seconds. The problem is, I want to set the time between first tap and second tap less than a second. But the systime unit is second. Is there any way to detect faster double taps ?

Set task can work, but I think it will be unefficient since I'm working with prethink

YamiKaitou 10-25-2013 09:13

Re: Detecting double press
 
Try get_gametime

akcaliberg 10-25-2013 16:43

Re: Detecting double press
 
I've just realized get_gametime returns float number :) thanks, solved.


All times are GMT -4. The time now is 23:20.

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