When using lookEnt() also face players head

This commit is contained in:
Jim Shield
2025-10-20 20:10:02 +01:00
parent dffed24fb3
commit 54f96f7e77

View File

@@ -638,6 +638,8 @@ function lookEnt(entity)
debugPrint("^6Bridge^7: ^2Turning Player to^7: '^6"..formatCoord(entity).."^7'") debugPrint("^6Bridge^7: ^2Turning Player to^7: '^6"..formatCoord(entity).."^7'")
Wait(1500) Wait(1500)
end end
-- Make players head face the coord for 5 seconds
TaskLookAtCoord(ped, entity.x, entity.y, entity.z, 5000, 1, 1)
else else
if DoesEntityExist(entity) then if DoesEntityExist(entity) then
local entCoords = GetEntityCoords(entity) local entCoords = GetEntityCoords(entity)
@@ -646,6 +648,9 @@ function lookEnt(entity)
debugPrint("^6Bridge^7: ^2Turning Player to^7: '^6"..entity.."^7' - '"..formatCoord(entCoords).."^7'") debugPrint("^6Bridge^7: ^2Turning Player to^7: '^6"..entity.."^7' - '"..formatCoord(entCoords).."^7'")
Wait(1500) Wait(1500)
end end
-- Make players head face the coord for 5 seconds
TaskLookAtEntity(ped, entity, 5000, 1, 1)
end end
end end
end end