Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local speed = 0
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- local ped = GetPlayerPed(-1)
- if IsPedShooting(ped) and IsPedInAnyVehicle(ped, true) then
- local vehicle = GetVehiclePedIsIn(ped, true)
- if GetPedInVehicleSeat(vehicle, -1) == ped then
- speed = GetEntitySpeed(vehicle)
- local mph = speed * 2.236936
- SetTextFont(0)
- SetTextProportional(1)
- SetTextScale(0.0, 0.5)
- SetTextDropshadow(1, 0, 0, 0, 255)
- SetTextEdge(1, 0, 0, 0, 255)
- SetTextDropShadow()
- SetTextOutline()
- SetTextEntry("STRING")
- SetTextCentre(true)
- AddTextComponentString("~r~" .. math.ceil(mph) .. " ~p~MPH")
- DrawText(0.5, 0.87)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement