[HELP] How to change a normal blip to a text one

Hello first of all i am here on the forums to ask how to change from this normal circle bilp to a text one like this

interac2

Its a little more difficult but I’ll walk you threw how you go about it

  1. You need to add the 3dtext which I’ll provide
  2. Specify if the individual is near the location you have specified and the distance is close to it then you can trigger a true or false to display the text which you could probably see in my script The Auto Repair Script which I’ll provide below everything is in there that you could take snippets from.
  3. Then you will need to specify if they are to far away to not display the text which you could do with setting the original trigger to false and it would stop it from displaying
  4. Then you can simply check when they are close to the location and if a button is pressed then action will happen.

Function


function Draw3DText(x, y, z, text)
    local onScreen,_x,_y=World3dToScreen2d(x,y,z)
    local px,py,pz=table.unpack(GetGameplayCamCoords())
    local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
 
    local scale = (1/dist)*1
    local fov = (1/GetGameplayCamFov())*100
    local scale = 0.9
   
    if onScreen then
        SetTextScale(0.0*scale, 0.25*scale)
        SetTextFont(0)
        SetTextProportional(1)
        -- SetTextScale(0.0, 0.55)
        SetTextColour(255, 255, 255, 255)
        SetTextDropshadow(0, 0, 0, 0, 255)
        SetTextEdge(2, 0, 0, 0, 150)
        SetTextDropShadow()
        SetTextOutline()
        SetTextEntry("STRING")
        SetTextCentre(1)
        AddTextComponentString(text)
        DrawText(_x,_y)
    local factor = (string.len(text)) / 370
    DrawRect(_x,_y+0.0125, 0.013+ factor, 0.03, 41, 11, 41, 68)
    end
end

To show the font
Draw3DText2([Put X Here], [Put Y Here], [Put Z Here] tostring("~w~Say something here"))

2 Likes

Thanks a lot bro !

Make sure to set it as a solution my dude for anyone else asking for help with this

i ´ve Tested it out but it dont worked i want to change for example the police blips to enter on the cloacrooms to a text blips

You are going to need checks for example
local displaytext = true

then trigger
displaytext == true
then on

if displaytext == true then 
put 3dtext thing here  
end

but you need to make it update every frame.

Ok Thanks it worked GREAT!

Can you give an example please or tell me where i need to put the code please?

i cant understand :frowning:
Can u give an example or tell me where i need to put that code please?

i dont know how to do it :frowning:
can u give me an example or something pls?