Jump to content

[HELP] Speedo problem


Animan99

Recommended Posts

Hi, i have started to make my own speedometer. When i speed up, the needle does not move correctly. at the start when i am not going fast, it fits right, but when my speed is higher, i goes out of my speedo "disc".

Pictures:

(low speed fits correctly)

http://kepfeltoltes.hu/150728/mta-scree ... es.hu_.png

(high speed does not)

http://kepfeltoltes.hu/150728/mta-scree ... es.hu_.png

anyone can help me? :) Thanks

Link to comment

Sry, forgot

  
sW, sH = guiGetScreenSize() 
Width, Height = 324, 246 
X = sW - Width 
Y = sH - Height 
  
function renderSpeedo() 
     
    local speed = getVehicleSpeed(getPedOccupiedVehicle(localPlayer))  
     
  
    dxDrawImage(X, Y, Width, Height, "fajlok/alap.png", 0, 0, 0) 
     
    dxDrawImage(X, Y, Width, Height, "fajlok/mutato1.png", speed*4.2 / getFormatGear() ) -- RPM needle 
    dxDrawImage(X, Y, Width, Height, "fajlok/mutato2.png", speed/1.3 ) -- SPEED NEEDLE 
    dxDrawText(speed, X + 150, Y + 150, 0, 0, tocolor(255, 255, 255, 150), 1.5, "arial" ) 
  
end  
  

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...