12.10.2018, 07:29
Pressing a key for a few seconds (while pressing) shows the function.
is for OnPlayerKeyStateChange.
Do any idea how is possible?
is for OnPlayerKeyStateChange.
Do any idea how is possible?
#define HOLDING(%0) \
((newkeys & (%0)) == (%0))
if(HOLDING(YOUR_KEY))
{
//Yourcode
}
Pressing a key for a few seconds (while pressing) shows the function.
is for OnPlayerKeyStateChange. Do any idea how is possible? |
This?
pawn Код:
pawn Код:
|
Start a timer in OnPlayerKeyStateChange when they start pressing the key. Kill the timer in the same place if they ever release it. Then do what you want in the timer function.
|