24.03.2017, 05:29
Anybody know a best way to detect if player is running?
I trying this:
But sometimes it bug, when player fall, player anim...
Its show player running when player is not and show player not running when player is running
I trying this:
Код:
if(HOLDING(KEY_SPRINT) || PRESSING(newkeys, KEY_SPRINT ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
PlayerRunning(playerid);
}
}
if(RELEASED(KEY_SPRINT))
{
CounterStopRunning[playerid] = SetTimerEx("PlayerNotRunning", 100, 0, "i", playerid);
}
Its show player running when player is not and show player not running when player is running


