Jump to content

Speedometer


Recommended Posts

I'm making a new speedometer for my server.

I need , when I'm get in the vehicle, speedometer need to start.

How can I do that? I'm trying but doesn't work.

 

 if isPedInVehicle then
        dxDrawLinedRectangle(screenW-185, 700, 170, 22, tocolor(0, 0, 0, 255), true)
        dxDrawRectangle(screenW-185, 700, 170, 22, tocolor(0, 0, 0, 100), true)
        dxDrawRectangle(screenW-184, 701, 169/240, 21, tocolor(66, 133, 244, 230), true)
        dxDrawText("Hiz: "..vehicleSpeed.." km/h", (screenW*2)-290, 1408, 100, 20, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false)
        dxDrawText("Hiz: "..vehicleSpeed.." km/h", (screenW*2)-290, 1404, 100, 20, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false)
        end
        end

 

Edited by Gabriele01
Link to comment
2 hours ago, Mohameddz said:

Have you add script in Meta.xml?

Meta.xml


<meta>
	<info author="Your name" type="script" name="Your script name" />
	
	<script src="client.lua" type="client" />
<meta>

 

Yes,I have.

17 minutes ago, a7zan said:

use this


onClientVehicleEnter
onClientVehicleExit

 

I'll try it.

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