Check player race position
#1

How to check or get player position on race??


I have tried using GetDistance in OnPlayerUpdate , but when the players change positions .
Example : from 1 to 2 or vice versa .
Textdraw on position players had continued to decrease or increase .
I want to grow only one position player numbers only .

How do I do that ?

Thank you.
Reply
#2

the easy way is to do it, is when they go through the checkpoint or you could use something like (see below) off a timer
Код:
stock GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z) {//By Sacky (Edited by Smugller)
	new Float:x1,Float:y1,Float:z1;
	new Float:dis;
	GetPlayerPos(playerid,x1,y1,z1);
	dis = floatsqroot((x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1));
	return floatround(dis);
}
Reply
#3

Thanks...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)