SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Discussion

Reply
 
Thread Tools Display Modes
Old 14/11/2018, 07:06 AM   #1
Craft.
Little Clucker
 
Craft.'s Avatar
 
Join Date: Feb 2012
Posts: 41
Reputation: 0
Default Moving Icon on textdraw

Essentially id like to make an area display on the screen showing a map using a textdraw. From this textdraw I would like to live update the player's location on the minimap. I already know how id like to display the map I just don't know if its possible to update the player's position like that on the minimap textdraw. Any tips are appreciated!
Craft. is offline   Reply With Quote
Old 14/11/2018, 04:39 PM   #2
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Posts: 1,652
Reputation: 513
Default Re: Moving Icon on textdraw

You'll need to calculate the player position on the Map TextDraw, which depends on the Map's size and position.
The SA Map is 6000.0m x 6000.0m, the TD grid is 640 x 480, and the map is just a part of that grid (eg. 200 x 200 at a specific position on the TD grid) so the player's coords must be transformed to that grid.

When you calculated the point on the TD grid you can create a (player) textdraw there for the icon, then keep updating it by destroying and recreating the icon.
NaS is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
textdraw icon, help DzDanieL Scripting Help 3 14/08/2014 03:05 PM
Moving a textdraw on the y-axis doesn't work. (TextDraw Editor) AndySedeyn Scripting Help 1 14/06/2014 03:50 PM
How To Moving Icon Entrence City Hall? (Roleplay) UserIndonesia Scripting Help 3 17/08/2012 03:59 PM
Moving an icon. Darnell Scripting Help 0 25/08/2011 12:54 PM
[HELP]Moving map icon buzifej Help Archive 2 16/01/2011 04:58 PM


All times are GMT. The time now is 06:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.