SA-MP Forums Archive
How to get/set position based in the screen? - 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: How to get/set position based in the screen? (/showthread.php?tid=546232)



How to get/set position based in the screen? - JR_Junior - 14.11.2014

Hello friends... I want. to make a system, with text draws to teleport. players... to be sure, using the map like textdraw in the screen! When player move the textdraw and press a key... he will be teleported to the position in the map! I just want know how to get the position based in the position of the textdraw(movable). Any help?


Re: How to get/set position based in the screen? - Adawg - 14.11.2014

And, why don't you simply use the normal map and get the positions of where the players have clicked to teleport him? By using the OnPlayerClickMap functions or something like that. Using textdraws isn't a good ideas.

pawn Код:
//functions
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) {
    SetPlayerPosFindZ(playerid, fX, fY, fZ);
    return 1;
}



Re: How to get/set position based in the screen? - JR_Junior - 14.11.2014

I understand, but my system not is unique, some serves have.. I see this system in one server and decide to make too... the idea is not make the player press Esc, go to the map, remove the fucking automatic zoom, select the position, go back and execute the system... my system is 99% ready, the map in the screen, the point(movable textdraw) to select the point... but need only the calcutations to transform the positions of textdraw in positions of the map