meters player have ran
#2

I have an idea.
It isn't actually exact to calculate meters that a player run but works
Make some variables
1.player run and walk meters amount
2.player old pos
3.player new pos

For example
pawn Код:
new Float:pTotalmeters[MAX_PLAYERS];
new Float:pOldPos[MAX_PLAYERS][3];
new Float:pNewPos[MAX_PLAYERS][3];
Set a timer.
Every 1 second that timer call the callback, ger player position (with loop for all players) and get distance between player position and player old position (with old player pos variable that we defined) and add it to totalplayermeters variable
+= dis………..
And after this, update old player position with new poaition.

Srry i'm with my cellphone and i couldn't give you some examples
Hope i helped.
Good luck
Reply


Messages In This Thread
meters player have ran - by Onfroi - 27.11.2014, 18:34
Re: meters player have ran - by M4D - 27.11.2014, 19:44
Re: meters player have ran - by Onfroi - 27.11.2014, 19:53
Re: meters player have ran - by Pottus - 27.11.2014, 19:55
Re: meters player have ran - by M4D - 27.11.2014, 20:06

Forum Jump:


Users browsing this thread: 6 Guest(s)