Speedometer HUD

Could someone give me an example of a speedometer that displays speed in MPH when you are both in and out of a vehicle (Doesnt need to be fancy; no rounded boxes just the 2 digit sped display).

Wire debugger?

Its for an RP server and I dont want to add WireMod

Bump =/

ummm draw the gui yourself, but use the formula like
[lua]
if Player:InVehicle then
local MPH = Player:GetVelocity():Length() / 17.6
–Draw GUI here outputting the MPH
end
[/lua]

hook this to something to check if the player gets into a vehicle and do all this client side, but that is the same formlua that wire uses

[gamemodes\darkrp\gamemode\cl_init.lua:108] attempt to index global ‘Player’ (a function value)
Pops up in console

change “Player” to LocalPlayer()

[lua] if LocalPlayer():InVehicle then
local MPH = LocalPlayer():GetVelocity():Length() / 17.6
local struc = {}

struc.pos = {}
struc.pos[1] = 205 
struc.pos[2] = 555 
struc.color = Color(255,255,255,255)
struc.text = MPH
struc.font = "TargetID" 
struc.xalign = TEXT_ALIGN_CENTER 
struc.yalign = TEXT_ALIGN_CENTER
draw.Text( struc ) 

end [/lua]

[gamemodes\darkrp\gamemode\cl_init.lua:102] function arguments expected near ‘then’
[cpp]
Huh?

Nvm I got it working