function main()
font = renderCreateFont('Segoe Script', 12, 5)
while true do wait(0)
if isKeyJustPressed(123) then
show = not show
end
if show then
pt = getAllChars()
for _,ph in pairs(pt) do
x,y,z = getCharCoordinates(ph)
wx,wy = convert3DCoordsToScreen(x,y,z - 0.96)
sp = getCharSpeed(PLAYER_PED)
h = renderGetFontDrawTextLength(font, string.format('SPEED: %.1f',sp))
h = h / 2
renderFontDrawText(font,string.format('SPEED: %.1f',sp), wx-h,wy,0xFFFFFFFF)
end
end
end
end