In the client.lua line around line 692 you see this line
local distance = #(coordsDist - coordsStore)
if (distance <= 3.0) then -- check distance
Add this between those two lines.
if distance >= 11.0 then -- check distance
Citizen.CreateThread(function()
SetBlockingOfNonTemporaryEvents(Config3.Stores[storeId].NPC, true)
FreezeEntityPosition(Config3.Stores[storeId].NPC, true)
end)
end
if distance <= 10.0 and distance >= 3.0 then -- check distance
Citizen.CreateThread(function()
SetBlockingOfNonTemporaryEvents(Config3.Stores[storeId].NPC, false)
FreezeEntityPosition(Config3.Stores[storeId].NPC, false)
TaskTurnPedToFaceEntity(Config3.Stores[storeId].NPC, player, -1)
--print("NPC face players")
end)
end
That will turn on and off the npc turning to face the player.