Advertisement
H3ck4r

Untitled

May 13th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. local showPlayerBlips = false
  2. local ignorePlayerNameDistance = false
  3. local disPlayerNames = 70
  4. local playerSource = 0
  5.  
  6. function DrawText3D(x,y,z, text) -- some useful function, use it if you want!
  7. local onScreen,_x,_y=World3dToScreen2d(x,y,z)
  8. local px,py,pz=table.unpack(GetGameplayCamCoords())
  9. local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
  10.  
  11. local scale = (1/dist)*2
  12. local fov = (1/GetGameplayCamFov())*100
  13. local scale = scale*fov
  14.  
  15. if onScreen then
  16. SetTextScale(0.0*scale, 0.55*scale)
  17. SetTextFont(0)
  18. SetTextProportional(1)
  19. -- SetTextScale(0.0, 0.55)
  20. SetTextColour(255, 255, 255, 255)
  21. SetTextDropshadow(0, 0, 0, 0, 255)
  22. SetTextEdge(2, 0, 0, 0, 150)
  23. SetTextDropShadow()
  24. SetTextOutline()
  25. SetTextEntry("STRING")
  26. SetTextCentre(1)
  27. AddTextComponentString(text)
  28. DrawText(_x,_y)
  29. end
  30. end
  31.  
  32. Citizen.CreateThread(function()
  33. while true do
  34. for i=0,99 do
  35. N_0x31698aa80e0223f8(i)
  36. end
  37. for id = 0, 31 do
  38. if ((NetworkIsPlayerActive( id )) and GetPlayerPed( id ) ~= GetPlayerPed( -1 )) then
  39. ped = GetPlayerPed( id )
  40.  
  41. x1, y1, z1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) )
  42. x2, y2, z2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) )
  43. distance = math.floor(GetDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, true))
  44.  
  45. if(ignorePlayerNameDistance) then
  46. DrawText3D(x2, y2, z2+1, GetPlayerName(id))
  47. -- For just the player's source id use this or use the line above for name and source id | DrawText3D(x2, y2, z2+1, GetPlayerServerId(id))
  48. end
  49.  
  50. if ((distance < disPlayerNames)) then
  51. if not (ignorePlayerNameDistance) then
  52. DrawText3D(x2, y2, z2+1, GetPlayerName(id))
  53. -- For just the player's source id use this or use the line above for name and source id | DrawText3D(x2, y2, z2+1, GetPlayerServerId(id))
  54. end
  55. end
  56. end
  57. end
  58. Citizen.Wait(0)
  59. end
  60. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement