SA-MP Forums Archive
Animations - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Animations (/showthread.php?tid=622609)



Animations - TroubleFingers - 24.11.2016

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.

PHP код:
PreloadAnimLib(playeridanimlib[])
{
    
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(playeridpHp);
    
SetPlayerHealth(playeridpHp-2.0);
        
ApplyAnimation(playerid"PED""HIT_behind"4.101105000);
    
shotinlegtimer[playerid] = SetTimerEx("HitInLegTimer"50000"i"playerid);

Don't worry, I called the timer somewhere, the players cant see he animation though.