function main()
while true do wait(0)
if isCharInAnyCar(PLAYER_PED) and getActiveInterior() == 0 and not isCharInFlyingVehicle(PLAYER_PED) and not isCharInAnyBoat(PLAYER_PED) then
setTextRightJustify(true)
setTextScale(0.4, 1.4)
setTextEdge(1, 0, 0, 0, 200)
setTextColour(0, 255, 0, 200)
setGxtEntry('CRED333', string.format('%d', 2 * getCarSpeed(getCarCharIsUsing(PLAYER_PED))))
displayText(30.0, 432.5, 'CRED333')
end
end
end