24.11.2016, 19:46
I preloaded the library, everything is running smoothly (no errors or warnings) and the player gets affected by the animation although others can't see the animation. It's like they just see the player in his current place like shaking but they don't see the animation.
Don't worry, I called the timer somewhere, the players cant see he animation though.
PHP код:
PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
public OnPlayerSpawn(playerid)
{
PreloadAnimLib(playerid, "PED");
return 1;
}
forward HitInLegTimer(playerid);
public HitInLegTimer(playerid)
{
new Float:pHp;
GetPlayerHealth(playerid, pHp);
SetPlayerHealth(playerid, pHp-2.0);
ApplyAnimation(playerid, "PED", "HIT_behind", 4.1, 0, 1, 1, 0, 500, 0);
shotinlegtimer[playerid] = SetTimerEx("HitInLegTimer", 5000, 0, "i", playerid);
}