15.08.2018, 15:17
(
Last edited by linhpro200294; 15/08/2018 at 06:45 PM.
)
Hi, I did successfully BrokenLeg but while experimenting it does not stop animating it. You know how to fix this please help me.
For example: When you shoot a foot in the foot must stand a 10s space with normal travel.
Code :
Code :
For example: When you shoot a foot in the foot must stand a 10s space with normal travel.
Code :
Quote:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(GetPVarInt(playerid, "BrokenLeg") && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { if(newkeys & KEY_SPRINT || newkeys & KEY_JUMP) { ApplyAnimation(playerid, "PED", "FALL_collapse",4.1,0,1,1,0,0); ApplyAnimation(playerid, "PED", "FALL_collapse",4.1,0,1,1,0,0); } } |
Quote:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID) { if(bodypart == 7 || bodypart == 8 || amount > 6.0)//bodypart == 8 { SetPVarInt(playerid, "BrokenLeg", 1); SendClientMessage(playerid, COLOR_LIGHTRED, "-> Ban da bi ban vao chan, ban se bi nga khi chay va nhay ."); } SetPlayerHealth(playerid, amount); CallbackDamages(playerid, issuerid, bodypart, weaponid, amount); } |