SA-MP Forums Archive
Custom default movement system. - 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: Custom default movement system. (/showthread.php?tid=471242)



Custom default movement system. - Unri - 22.10.2013

Hello. I have noticed that some servers allow you to change your slow walk type and that your run animation is the one, that the character in default san andreas is using. Could someone explain me how do they code it?


Respuesta: Custom default movement system. - [CG]Milito - 22.10.2013

check this
https://sampwiki.blast.hk/wiki/UsePlayerPedAnims


Re: Custom default movement system. - Memoryz - 22.10.2013

When a key is pressed, they check which style the player wants, and then applies the animation via ApplyAnimation.


Re: Custom default movement system. - Unri - 22.10.2013

Quote:
Originally Posted by [CG]Milito
Посмотреть сообщение
Thanks.

Quote:
Originally Posted by Memoryz
Посмотреть сообщение
When a key is pressed, they check which style the player wants, and then applies the animation via ApplyAnimation.
Wouldnt a check on every forward key press lag the server? And wouldnt it make it possible for an intentionall attack on the server?


Re: Custom default movement system. - Memoryz - 22.10.2013

Quote:
Originally Posted by Unri
Посмотреть сообщение
Thanks.



Wouldnt a check on every forward key press lag the server? And wouldnt it make it possible for an intentionall attack on the server?
Well, this is one way of accomplishing this, there are others, but I'm sure this method wouldn't cause much of an issue with lag, it all depends on the way you script it, and how you might optimize it to work efficiently.