SA-MP Forums Archive
Animations timing - 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 timing (/showthread.php?tid=609821)



Animations timing - Maxandmov - 16.06.2016

Hey, pals, I kept wondering whether I can get some info about how long animation takes to make a full circle from the start to the end. Any ideas on how-to? Any way to measure it via some custom stock? It is quite necessary for me so my animation system don't get partially broken by my chat animations system.

Please answer as fast as you know if you happen to know how-to's. It's kind of rushy matter for me. Thanks.


Re: Animations timing - GangstaSunny - 17.06.2016

Maybe i dont understand you correctly, but:

You can use ApplyAnimation to set the time how long the animation should take. And if you want to know how long a actual animation takes that the player is doing you maybe can work with GetPlayerAnimation and a 1ms second timer. But i think this wont work pretty well. Even if you test it on localhost with an blank script the server does have a ping which will brake this maybe. Even if it would work on your localhost server there could be problems beetwen the client / server on a "real" server.


Re: Animations timing - Maxandmov - 17.06.2016

Yeah, this might do, I'll try that.


UPD: Yeah, that does the trick. Thanks a lot.