SA-MP Forums Archive
Preventing textdraw resolution problem? - 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: Preventing textdraw resolution problem? (/showthread.php?tid=631707)



Preventing textdraw resolution problem? - DuyDang2412 - 03.04.2017

Hello guys, I see that some servers have their tips/tricks to prevent the textdraw resolution problem, their textdraws display well in all resolutions and I really want to know the way they do it, can somebody please tell me?
Thanks in advanced.


Re: Preventing textdraw resolution problem? - Vince - 03.04.2017

Use only whole numbers for the coordinates. GetPlayerCameraAspectRatio may also have been used.


Re: Preventing textdraw resolution problem? - DuyDang2412 - 03.04.2017

I think if I don't use decimals, the coordinates would be different from the original and of course, it won't display well.


Re: Preventing textdraw resolution problem? - DRIFT_HUNTER - 03.04.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
Use only whole numbers for the coordinates. GetPlayerCameraAspectRatio may also have been used.
From wiki:
pawn Код:
The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display.
As far as i know nobody changes that option, and by default its off if im not wrong (meaning it will return 5:4).


Re: Preventing textdraw resolution problem? - DuyDang2412 - 04.04.2017

So which is the best way? Do you guys know?


Re: Preventing textdraw resolution problem? - NaS - 04.04.2017

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
From wiki:
pawn Код:
The return value of this function represents the value of the "widescreen" option in the game's display settings, not the actual aspect ratio of the player's display.
As far as i know nobody changes that option, and by default its off if im not wrong (meaning it will return 5:4).
Why would nobody change that option? I guess everyone with a modern Screen should do so otherwise the game just looks weird.

Also it doesn't affect the TextDraw grid. Not even the radar is "fixed" to be a circle, it remains an egg.


Re: Preventing textdraw resolution problem? - denNorske - 04.04.2017

It's not smart as a developer to consider the probability of when the screen aspect ratio changes. If I were you, I would check the aspect ratio no matter what in order to get a proper result. (if needed)

Otherwise I can't say anything besides keeping the Floats at whole numbers when you position the textdraws. Is there anything specific you struggle with, let us know. Perhaps we can give a specific tip regarding it. (don't forget pics)


Re: Preventing textdraw resolution problem? - DuyDang2412 - 04.04.2017

I'm trying it, thanks!