Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Jancis71 on July 28, 2010, 07:54:09 PM

Title: GetPlayerSpeed
Post by: Jancis71 on July 28, 2010, 07:54:09 PM
I need help with GetPlayerSpeed function, i have no idea how can i do this.
Title: Re: GetPlayerSpeed
Post by: [AoD]NC on July 29, 2010, 02:59:09 AM
First of all say if you want to check one-two times the speed via a command or create a speedometer?

A sample GetPlayerSpeed() can be done by creating a new function that:
1. Saves your pos now.
2. Waits a while e.g. 500 ms.
3. Takes the saved pos and the pos now.
4. Some math (X1 - X2 and probably ^2).
5. Return the speed. However if you would like to see the speed in kmh, you will need maybe everything x4.

Maybe this can be helpful :).
Title: Re: GetPlayerSpeed
Post by: Jancis71 on July 29, 2010, 10:43:14 AM
There would be SetTimerEx very useful, thanks for answer.