Little Help - 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: Little Help (
/showthread.php?tid=585056)
Little Help -
Sanady - 10.08.2015
Hello everybody, today I wanted to make something very usefull for my server, but I got problem, my idea was to get aspect ration by function GetPlayerCameraAspectRatio, but when it`s returning me aspect ration it`s returning me in float, which I setted in script, but I still don`t get, how function gets that float?
This is my ratio:
Код:
[15:17:49] Your aspect ratio: 1.333333
Re: Little Help -
trablon - 10.08.2015
You will see float value if you are making it like '%f'.If you want that result as an integer or you want to convert anything you want.You have to use with this code;
for more information, go check it out ===>>>
https://sampwiki.blast.hk/wiki/Floatround
Re: Little Help -
Sanady - 10.08.2015
Quote:
Originally Posted by trablon
You will see float value if you are making it like '%f'.If you want that result as an integer or you want to convert anything you want.You have to use with this code; for more information, go check it out ===>>> https://sampwiki.blast.hk/wiki/Floatround
|
I understand that, but my question was how that function calculate aspect ratio in float?
Re: Little Help -
IstuntmanI - 10.08.2015
https://en.wikipedia.org/wiki/Aspect_ratio_(image)
4:3 is 1.3333 (because 4 divided by 3 is 1.3333).
16:9 is 1.7777
etc.