get player hold key time in sec.
tittle & how long player dont press the key?!
|
Re: get player hold key time in sec.
mini bump :( sry but its important.
|
Re: get player hold key time in sec.
On a game frame, GetClientButtons, then if a certain one is held down, start a very small timer, and keep doing that til it stops, then return the time.
|
Re: get player hold key time in sec.
Quote:
|
Re: get player hold key time in sec.
Quote:
PHP Code:
|
Re: get player hold key time in sec.
Witch buttons ?
All buttons ? One specific button ? Basically you hook FM_CmdStart. For a specific button : For first press : get_uc(uc, UC_Button) & IN_YOURBUTTON && !(entity_get_int(id, EV_INT_oldbutons) & IN_YOURBUTTON) At this time store get_gametime() Last press : !(get_uc(uc, UC_Button) & IN_YOURBUTTON) && entity_get_int(id, EV_INT_oldbutons) & IN_YOURBUTTON Then do get_gametime() - storetime. |
Re: get player hold key time in sec.
Quote:
Edit: ... |
Re: get player hold key time in sec.
nop i wannt IN_FORWARD
IN_BACK i wannt to add sound for example : if player hold the forward key >= 1 && <= 10. play the engine sound 1. if hold the forward >= 10.1 && <= 20, play the engine sound 2. like a real engine sound. but when the player less the key for 0.00001 sec. & press this again the sound willbe played again. omg its realy complicated :(( |
Re: get player hold key time in sec.
Quote:
2. For >= 1 && <= 10 then you need to change the conditions! |
Re: get player hold key time in sec.
sure i know how to change the key. i have another problem.
PHP Code:
|
| All times are GMT -4. The time now is 01:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.