local maxSpeed = 20
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
if isCharInAnyCar(PLAYER_PED) then
local speed = getCarSpeed(storeCarCharIsInNoSave(PLAYER_PED))
printStringNow('Speed: '..math.floor(speed), 50)
if isButtonPressed(Player, 16) then
if speed > maxSpeed then
setGameKeyState(16, 0)
end
end
end
end
end