[HELP]Textdraw showing coordinates
#1

Hello,

I have done a Textdraw that shows the Coordinates XYZ when the player moves, for example:
I'm at point A and the coordinates are: x=111.111 y=222.222 z=333.333 and then i move to point B and
the coordinates now are: x=122.111 y=233.222 z=344.333

My problem is that when another player joins, the coordinates are going in "conflict", for example:
My coordinates are 111.111 - 222.222 - 333.333, and then i dont move i stay still at my position, when the
other player moves, i see his coordinates on the textdraw, but i want just see my coordinates, and not the
coordinates of all player in one textdraw..
whats wrong??

Код:
public OnPlayerUpdate(playerid)
{
new xbarv5_pcountstr[100];
format(xbarv5_pcountstr,sizeof(xbarv5_pcountstr),"Players: ~y~%d/%d",GetPlayersOnline(),GetMaxPlayers());
TextDrawSetString(xbar7, xbarv5_pcountstr);
new xbarv5_position[300];
new Float:textX, Float:textY, Float:textZ;
GetPlayerPos(playerid, textX, textY, textZ);
format(xbarv5_position, sizeof(xbarv5_position),"Pos: ~y~x=~g~%f ~y~y=~g~%f ~y~z=~g~%f", textX, textY, textZ);
TextDrawSetString(xbar9, xbarv5_position);
return 1;
}
Reply
#2

for this u have to use PlayerTextDrawSetString insteat of TextDrawSetString
see this for its usage PlayerTextDrawSetString https://sampwiki.blast.hk/wiki/PlayerTextDrawSetString
Reply
#3

ok, but i have to change all the TextDrawCreate etc. to PlayerTextdrawCreate etc. ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)