31.10.2010, 01:46
i use the right key but it don't run
it not show the Animation
it not show the Animation
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys & KEY_RIGHT) && (team[playerid] == 2)) { if(UsingAnimation[playerid] == 1) { TogglePlayerControllable(playerid, 1); ApplyAnimation(playerid,"TRAIN", "TRAN_GTUP",4.1,0,1,1,1,1); UsingAnimation[playerid] = 0; SetTimerEx("stopanimation", 4000, 0, "i", playerid); } new Float:hp, Float:a; new target = GetClosestPlayer(playerid); if(target == INVALID_PLAYER_ID || target == playerid) return 1; if(team[target] == 2) return 1; GetPlayerArmour(target,a); if(GetDistanceBetweenPlayers(playerid,target) <= 2) { if(a > 0) SetPlayerArmour(target, a-5); else { GetPlayerHealth(target,hp); if(hp-5 > -5) SetPlayerHealth(target, hp-5); GetPlayerHealth(playerid,hp); if(hp+2 < 200) SetPlayerHealth(playerid, hp+2); } } } return 1; } public stopanimation(playerid) { ApplyAnimation(playerid,"PED", "IDLE_STANCE",4.1,0,0,0,0,1); return 1; }