I am brand new to coding and just trying to learn as much as I can, I am just working on this simple yoga script I dont have the emote part completely in but I cant even get the blip to show up on the map or anything else even the Help Display. The resource starts perfectly and does not give me any error msgs in the console so Im not sure why it’s not doing anything. Any help would be great thank you.
local showblips = true
local yogamats = {
{name="Yogamat", id=197, x=-1491.39, y=830.42, z=181.62},
}
Citizen.CreateThread(function()
while true do
Wait(0)
if nearYoga() then
DisplayHelpText("Press ~INPUT_PICKUP~ to start yoga ~g~")
end
end)
–Blips
Citizen.CreateThread(function()
if showblips then
for k,v in ipairs(yogamats)do
local blip = AddBlipForCoord(v.x, v.y, v.z)
SetBlipSprite(blip, v.id)
SetBlipDisplay(blip, 4)
SetBlipScale (blip, 0.9)
SetBlipColour (blip, 2)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(tostring(v.name))
EndTextCommandSetBlipName(blip)
end
end
end)
–Capture Distance From Yoga Mats
function nearYoga()
local player = GetPlayerPed(-1)
local playerloc = GetEntityCoords(player, 0)
for _, search in pairs(yogamats) do
local distance = GetDistanceBetweenCoords(search.x, search.y, search.z, playerloc['x'], playerloc['y'], playerloc['z'], true)
if distance <= 3 then
return true
end
end
end
function DisplayHelpText(str)
SetTextComponentFormat("STRING")
AddTextComponentString(str)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end