SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. x, y, z = 1744.1080322266,-1623.0484619141,112.63006591797
  2.  
  3. Citizen.CreateThread(function()
  4.   hooker = 1283141381
  5.  hooker = GetHashKey( "csb_oscar" )
  6.  RequestModel( hooker )
  7.  while ( not HasModelLoaded( hooker ) ) do
  8.    Citizen.Wait( 1 )
  9.  end
  10.  theHooker = CreatePed(4, hooker, x, y, z, 90, false, false)
  11.  SetModelAsNoLongerNeeded(hooker)
  12.  SetEntityHeading(theHooker, 110.0)
  13.  FreezeEntityPosition(theHooker, false)
  14.  SetEntityInvincible(theHooker, true)
  15.  SetBlockingOfNonTemporaryEvents(theHooker, true)
  16.  TaskStartScenarioAtPosition(theHooker, "mp_player_int_uppersalute",x, y, z-0.35, GetEntityHeading(theHooker), 0, 0, true)
  17. end)
  18.  
  19. Citizen.CreateThread(function()
  20.   while true do
  21.     local pos = GetEntityCoords(GetPlayerPed(-1), true)
  22.     if(GetDistanceBetweenCoords(pos.x, pos.y, pos.z, x, y, z) < 4.5)then
  23.       DrawText3D({x = x, y = y, z = z+0.9}, "Gunoier", 0.8)
  24.     end
  25.     Citizen.Wait(0)
  26.   end
  27. end)
  28.  
  29. local function DrawText3D(coords, text, size)
  30.     local onScreen, x, y = World3dToScreen2d(coords.x, coords.y, coords.z)
  31.     local camCoords      = GetGameplayCamCoords()
  32.     local dist           = GetDistanceBetweenCoords(camCoords, coords.x, coords.y, coords.z, true)
  33.     local size           = size
  34.  
  35.     if size == nil then
  36.         size = 1
  37.     end
  38.  
  39.     local scale = (size / dist) * 2
  40.     local fov   = (1 / GetGameplayCamFov()) * 100
  41.     local scale = scale * fov
  42.  
  43.     if onScreen then
  44.         SetTextScale(0.0 * scale, 0.55 * scale)
  45.         SetTextFont(0)
  46.         SetTextProportional(1)
  47.         local rgb = RGBRainbow(1)
  48.         SetTextColour(rgb.r, rgb.g, rgb.b, 255)
  49.         SetTextDropshadow(0, 0, 0, 0, 255)
  50.         SetTextEdge(2, 0, 0, 0, 150)
  51.         SetTextDropShadow()
  52.         SetTextOutline()
  53.         SetTextEntry('STRING')
  54.         SetTextCentre(1)
  55.  
  56.         AddTextComponentString(text)
  57.         DrawText(x, y)
  58.     end
  59. end
  60.  
  61. function RGBRainbow(frequency)
  62.   local result = {}
  63.   local curtime = GetGameTimer() / 1200
  64.  
  65.   result.r = math.floor(math.sin(curtime * frequency + 0) * 127 + 128)
  66.   result.g = math.floor(math.sin(curtime * frequency + 2) * 127 + 128)
  67.   result.b = math.floor(math.sin(curtime * frequency + 4) * 127 + 128)
  68.  
  69.   return result
  70. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top