Advertisement
Smokahontas

FIVEM

Aug 18th, 2022
588
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local speed = 0
  2.  
  3. Citizen.CreateThread(function()
  4.     while true do
  5.         Citizen.Wait(0)
  6.         local ped = GetPlayerPed(-1)
  7.         if IsPedShooting(ped) and IsPedInAnyVehicle(ped, true) then
  8.             local vehicle = GetVehiclePedIsIn(ped, true)
  9.              if GetPedInVehicleSeat(vehicle, -1) == ped then
  10.                 speed = GetEntitySpeed(vehicle)
  11.                 local mph = speed * 2.236936
  12.                 SetTextFont(0)
  13.                 SetTextProportional(1)
  14.                 SetTextScale(0.0, 0.5)
  15.                 SetTextDropshadow(1, 0, 0, 0, 255)
  16.                 SetTextEdge(1, 0, 0, 0, 255)
  17.                 SetTextDropShadow()
  18.                 SetTextOutline()
  19.                 SetTextEntry("STRING")
  20.                 SetTextCentre(true)
  21.                 AddTextComponentString("~r~" .. math.ceil(mph) .. " ~p~MPH")
  22.                 DrawText(0.5, 0.87)
  23.             end
  24.         end
  25.     end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement