SA-MP Forums Archive
Why does this SOMETIMES not apply the animation? - 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: Why does this SOMETIMES not apply the animation? (/showthread.php?tid=501848)



Why does this SOMETIMES not apply the animation? - Dokins - 20.03.2014

pawn Код:
if(Taser[playerid] == 1 && weaponid == 23 && hittype == 1)
    {
        new string[128];
        TogglePlayerControllable(hitid, false);
        ApplyAnimation(hitid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        SetTimerEx("Tasered", 10000, 0, "d", hitid);
        format(string, sizeof(string), "* %s has tasered %s *", GetNameEx(playerid), GetNameEx(hitid));
        ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
        return 0;
    }
It says the ProxDetector line EVERY TIME. It just won't always force the animation?

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
Under this function, although it was under OnPlayerShootPlayer, but this still didn't force anim everytime.


Re: Why does this SOMETIMES not apply the animation? - Chrillzen - 20.03.2014

pawn Код:
ApplyAnimation(hitid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
The last parameter is "forcesync".


Re: Why does this SOMETIMES not apply the animation? - Dokins - 20.03.2014

Ahh!! Thank you! Can you explain exactly what that means?


Re: Why does this SOMETIMES not apply the animation? - Chrillzen - 20.03.2014

Forcing the animation to show for all the players. I can't explain "Synchronization" better than this wikipedia page.

http://en.wikipedia.org/wiki/Synchronization