Guest User

Untitled

a guest
May 23rd, 2017
9,833
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- FiveM Client Script By Dawson G.
  2.  
  3. local showPlayerBlips = false
  4. local ignorePlayerNameDistance = false
  5. local disPlayerNames = 15
  6. local playerSource = 0
  7.  
  8. function DrawText3D(x,y,z, text) -- some useful function, use it if you want!
  9.     local onScreen,_x,_y=World3dToScreen2d(x,y,z)
  10.     local px,py,pz=table.unpack(GetGameplayCamCoords())
  11.     local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
  12.  
  13.     local scale = (1/dist)*2
  14.     local fov = (1/GetGameplayCamFov())*100
  15.     local scale = scale*fov
  16.    
  17.     if onScreen then
  18.         SetTextScale(0.0*scale, 0.55*scale)
  19.         SetTextFont(0)
  20.         SetTextProportional(1)
  21.         -- SetTextScale(0.0, 0.55)
  22.         SetTextColour(255, 255, 255, 255)
  23.         SetTextDropshadow(0, 0, 0, 0, 255)
  24.         SetTextEdge(2, 0, 0, 0, 150)
  25.         SetTextDropShadow()
  26.         SetTextOutline()
  27.         SetTextEntry("STRING")
  28.         SetTextCentre(1)
  29.         AddTextComponentString(text)
  30.         DrawText(_x,_y)
  31.     end
  32. end
  33.  
  34. Citizen.CreateThread(function()
  35.     while true do
  36.         for i=0,99 do
  37.             N_0x31698aa80e0223f8(i)
  38.         end
  39.         for id = 0, 31 do
  40.             if  ((NetworkIsPlayerActive( id )) and GetPlayerPed( id ) ~= GetPlayerPed( -1 )) then
  41.                 ped = GetPlayerPed( id )
  42.                 blip = GetBlipFromEntity( ped )
  43.  
  44.                 x1, y1, z1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) )
  45.                 x2, y2, z2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) )
  46.                 distance = math.floor(GetDistanceBetweenCoords(x1,  y1,  z1,  x2,  y2,  z2,  true))
  47.  
  48.                 if(ignorePlayerNameDistance) then
  49.                     DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. " | " .. string.sub(GetPlayerName(id), 1, 15))
  50.                 end
  51.  
  52.                 if ((distance < disPlayerNames)) then
  53.                     if not (ignorePlayerNameDistance) then
  54.                         DrawText3D(x2, y2, z2+1, GetPlayerServerId(id) .. " | " .. string.sub(GetPlayerName(id), 1, 15))
  55.                     end
  56.                 end  
  57.             end
  58.         end
  59.         Citizen.Wait(0)
  60.     end
  61. end)
RAW Paste Data