SA-MP Forums Archive
TextDraw Distance Meters! - 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: TextDraw Distance Meters! (/showthread.php?tid=596088)



TextDraw Distance Meters! - TuFF12 - 12.12.2015

hello i have a problem with truck system! i create a textdraw to show distance from point
Code:
new
                Float: fDistance = GetPlayerDistanceFromPoint(playerid, -1215.4589, 1814.6609, 41.7188),
                szMessage[44];
                format(szMessage,sizeof(szMessage),"~p~Distance:~w~~n~%0.2f Meters",fDistance);
                TextDrawSetString(Dis, szMessage);
                TextDrawShowForPlayer(playerid, Dis);
                CT[playerid] = 1;
				GameTextForPlayer(playerid,"~p~Mission~w~ started",4500,3);
				SCM(playerid, COLOR_LIGHTBLUE, "You started a truck mission. Go to the checkpoint to get the money $$$");
				SetPlayerCheckpoint(playerid, -1215.4589,1814.6609,41.7188, 3.0);
i want the textdraw change when i get close to point how can i do that please i need help

Sorry for my bad english


Re: TextDraw Distance Meters! - Yochui - 12.12.2015

Try using a half second timer which updates the textdraw.