Files
Elite-Gaming-FiveM/resources/Holograms/holograms.lua
T
Jacob c39103e896 Safe Zone air vehicles whitelist, updated holograms and scripts.
+ Updated Safe-Zones to whitelist air vehicles from being stopped.
+ Latest version of wl_wars2x police radar.
+ Updated weapon restrictions.
+ Fire-Scripts updated to latest version.
2022-01-16 16:06:50 +00:00

90 lines
4.4 KiB
Lua

--[[
Holograms / Floating text Script by Meh
Just put in the coordinates you get when standing on the ground, it's above the ground then
By default, you only see the hologram when you are within 10m of it, to change that, edit the 10.0 infront of the "then"
The Default holograms are at the Observatory.
If you want to add a line to the hologram, just make a new Draw3DText line with the same coordinates, and edit the vertical offset.
Formatting:
Draw3DText( x, y, z vertical offset, "text", font, text size, text size)
To add a new hologram, copy paste this example under the existing ones, and put coordinates and text into it.
if GetDistanceBetweenCoords( X, Y, Z, GetEntityCoords(GetPlayerPed(-1))) < 10.0 then
Draw3DText( X, Y, Z, -1.400, "TEXT", 4, 0.1, 0.1)
Draw3DText( X, Y, Z, -1.600, "TEXT", 4, 0.1, 0.1)
Draw3DText( X, Y, Z, -1.800, "TEXT", 4, 0.1, 0.1)
end
]]--
Citizen.CreateThread(function()
Holograms()
end)
function Holograms()
while true do
Citizen.Wait(0)
-- Spawn - Welcome to EGRP
if GetDistanceBetweenCoords( -868.95, -429.17, 37.14, GetEntityCoords(GetPlayerPed(-1))) < 27.5 then
Draw3DText( -868.95, -429.17, 37.14 -1.400, "Welcome to Elite Gaming RP!", 4, 0.2, 0.2)
Draw3DText( -868.95, -429.17, 37.14 -1.800, "Use F7 to find our rules and info.", 4, 0.15, 0.15)
end
-- Spawn - Links
if GetDistanceBetweenCoords( -857.60, -411.40, 37.64, GetEntityCoords(GetPlayerPed(-1))) < 32.5 then
Draw3DText( -857.60, -411.40, 37.64 -1.400, "Our Socials:", 4, 0.2, 0.2)
Draw3DText( -857.60, -411.40, 37.64 -1.750, "Discord: discord.gg/2XvwvgR", 4, 0.15, 0.15)
Draw3DText( -857.60, -411.40, 37.64 -2.050, "Website: elite-gaming.co.uk", 4, 0.15, 0.15)
Draw3DText( -857.60, -411.40, 37.64 -2.350, "CAD: cad.elite-gaming.co.uk", 4, 0.15, 0.15)
Draw3DText( -857.60, -411.40, 37.64 -2.650, "Forum: forum.elite-gaming.co.uk", 4, 0.15, 0.15)
Draw3DText( -857.60, -411.40, 37.64 -2.950, "Twitter: @EliteGamingUK_", 4, 0.15, 0.15)
Draw3DText( -857.60, -411.40, 37.64 -3.250, "Instagram: @EliteGaming_UK", 4, 0.15, 0.15)
end
-- Spawn - Extra Info
if GetDistanceBetweenCoords( -849.87, -431.62, 38.14, GetEntityCoords(GetPlayerPed(-1))) < 32.5 then
Draw3DText( -849.87, -431.62, 38.14 -1.400, "Community Status Board:", 4, 0.2, 0.2)
Draw3DText( -849.87, -431.62, 38.14 -1.800, "---", 4, 0.15, 0.15)
--Draw3DText( -849.87, -431.62, 38.14 -1.800, "Find The Text Event > Starting @2PM GMT - 17/02/21", 4, 0.15, 0.15)
Draw3DText( -849.87, -431.62, 38.14 -2.100, "Brand new phone in-game now!!", 4, 0.15, 0.15)
Draw3DText( -849.87, -431.62, 38.14 -2.400, "Access the phone using /phone or F1!", 4, 0.15, 0.15)
Draw3DText( -849.87, -431.62, 38.14 -2.800, "---", 4, 0.15, 0.15)
Draw3DText( -849.87, -431.62, 38.14 -3.100, "New voice chat & radio system!", 4, 0.15, 0.15)
Draw3DText( -849.87, -431.62, 38.14 -3.400, "Alter VC range via F11, and access radio via /radio", 4, 0.15, 0.15)
end
-- Event Text - Submarine
--if GetDistanceBetweenCoords( 525.49, -3240.52, 11.88, GetEntityCoords(GetPlayerPed(-1))) < 3.5 then
--Draw3DText( 525.49, -3240.52, 11.88 -1.200, "Find The Text Event", 4, 0.15, 0.15)
--Draw3DText( 525.49, -3240.52, 11.88 -1.500, "GGWP! You've found the text for the event.", 4, 0.10, 0.10)
--Draw3DText( 525.49, -3240.52, 11.88 -1.700, "Ping @Server Developer on the discord with a screenshot!", 4, 0.10, 0.10)
--end
end
end
-------------------------------------------------------------------------------------------------------------------------
function Draw3DText(x,y,z,textInput,fontId,scaleX,scaleY)
local px,py,pz=table.unpack(GetGameplayCamCoords())
local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
local scale = (1/dist)*20
local fov = (1/GetGameplayCamFov())*100
local scale = scale*fov
SetTextScale(scaleX*scale, scaleY*scale)
SetTextFont(fontId)
SetTextProportional(1)
SetTextColour(224, 50, 50, 255) -- You can change the text color here
SetTextDropshadow(1, 1, 1, 1, 255)
SetTextEdge(2, 0, 0, 0, 150)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(textInput)
SetDrawOrigin(x,y,z+2, 0)
DrawText(0.0, 0.0)
ClearDrawOrigin()
end