Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x, y, z = 1744.1080322266,-1623.0484619141,112.63006591797
- Citizen.CreateThread(function()
- hooker = 1283141381
- hooker = GetHashKey( "csb_oscar" )
- RequestModel( hooker )
- while ( not HasModelLoaded( hooker ) ) do
- Citizen.Wait( 1 )
- end
- theHooker = CreatePed(4, hooker, x, y, z, 90, false, false)
- SetModelAsNoLongerNeeded(hooker)
- SetEntityHeading(theHooker, 110.0)
- FreezeEntityPosition(theHooker, false)
- SetEntityInvincible(theHooker, true)
- SetBlockingOfNonTemporaryEvents(theHooker, true)
- TaskStartScenarioAtPosition(theHooker, "mp_player_int_uppersalute",x, y, z-0.35, GetEntityHeading(theHooker), 0, 0, true)
- end)
- Citizen.CreateThread(function()
- while true do
- local pos = GetEntityCoords(GetPlayerPed(-1), true)
- if(GetDistanceBetweenCoords(pos.x, pos.y, pos.z, x, y, z) < 4.5)then
- DrawText3D({x = x, y = y, z = z+0.9}, "Gunoier", 0.8)
- end
- Citizen.Wait(0)
- end
- end)
- local function DrawText3D(coords, text, size)
- local onScreen, x, y = World3dToScreen2d(coords.x, coords.y, coords.z)
- local camCoords = GetGameplayCamCoords()
- local dist = GetDistanceBetweenCoords(camCoords, coords.x, coords.y, coords.z, true)
- local size = size
- if size == nil then
- size = 1
- end
- local scale = (size / dist) * 2
- local fov = (1 / GetGameplayCamFov()) * 100
- local scale = scale * fov
- if onScreen then
- SetTextScale(0.0 * scale, 0.55 * scale)
- SetTextFont(0)
- SetTextProportional(1)
- local rgb = RGBRainbow(1)
- SetTextColour(rgb.r, rgb.g, rgb.b, 255)
- SetTextDropshadow(0, 0, 0, 0, 255)
- SetTextEdge(2, 0, 0, 0, 150)
- SetTextDropShadow()
- SetTextOutline()
- SetTextEntry('STRING')
- SetTextCentre(1)
- AddTextComponentString(text)
- DrawText(x, y)
- end
- end
- function RGBRainbow(frequency)
- local result = {}
- local curtime = GetGameTimer() / 1200
- result.r = math.floor(math.sin(curtime * frequency + 0) * 127 + 128)
- result.g = math.floor(math.sin(curtime * frequency + 2) * 127 + 128)
- result.b = math.floor(math.sin(curtime * frequency + 4) * 127 + 128)
- return result
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement