23.03.2014, 20:05
Hi Guys When i Press SPRINT Button The Player Start Runing 100% and when i want to stop i can't why ?
The problem is I can't make them stop
The problem is I can't make them stop
Код:
#define HOLDING(%0) \ ((newkeys & (%0)) == (%0)) #define RELEASED(%0) \ (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
Код:
if (HOLDING( KEY_SPRINT )) { if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; } ApplyAnimation(playerid,"MUSCULAR","MuscleSprint",4.0,1,1,1,1,1); return 1; } else if (RELEASED( KEY_SPRINT )) { if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; } ClearAnimations(playerid); return 1; }