So i wanna remove a text when someone presses E in the marker here is the part of the code where i want to remove the text :
if IsControlJustPressed(1, 153) then
--something to remove the help text--
and here is my full code:
local table = {
{x = 273.67422485352, y = -344.15573120117, z = 44.919834136963},
{x = -1803.8967285156, y = -341.45928955078, z = 43.986347198486},
{x = 1893.77, y = 3712.21, z = 32.78},
{x = 77.53, y = 6361.71, z = 31.49},
{x = 846.2601, y = -1050.778, z = 27.95996},
{x = 1036.09, y = -763.36, z = 57.99},
{x = -72.69, y = 908.39, z = 235.63},
{x = -3155.68, y = 1125.22, z = 20.86},
{x = 213.8, y = -809.00, z = 31.00},
{x = -52.79, y = -220.93, z = 45.44},
{x = -1414.61, y = -653.81, z = 28.67}
}
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
for k in pairs(table) do
local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, table[k].x, table[k].y, table[k].z)
if dist <= 1.0 then
DisplayHelpText()
break
end
if IsControlJustPressed(1, 153) then
--something to remove the help text--
end
end
end
end)
function DisplayHelpText()
SetTextComponentFormat(“STRING”)
AddTextComponentString("~w~Press ~b~E~w~ to open the menu.")
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end
sorry for my bad english