BucketBull Posted April 19, 2016 Share Posted April 19, 2016 hey guys. I have a problem with my speedo. The picture is not the same in every resolution. I used guiGetScreenSize but it doesnt work. Here is the code: local resolution = {} resolution.Sx, resolution.Sy = guiGetScreenSize() resolution.X, resolution.Y = resolution.Sx/1920, resolution.Sy/1080 function speedo ( ) if isPedInVehicle (localPlayer) == false then return end dxDrawImage(resolution.X*1400,resolution.Y*760,resolution.X*512,resolution.Y*512, "files/speedo.png", 0, 0, 0, tocolor(255,255,255,200), false) end end Can you help me? Link to comment
Simple0x47 Posted April 19, 2016 Share Posted April 19, 2016 Why don't you convert the dxDrawImage coordenates into decimals by dividing your guiEditor output by your screen size? local x, y = guiGetScreenSize() --My screen size 1366x768 dxDrawImage(x*(500/1366), y*(312/768).[...]) Link to comment
BucketBull Posted April 21, 2016 Author Share Posted April 21, 2016 ok, but does it work in every resolutin? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now