Jump to content

guiGetScreenSize doesnt work


BucketBull

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...