mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-16 21:46:03 +01:00
fix: ai ped blips showWhenNear hide on spawn
This commit is contained in:
@@ -111,7 +111,7 @@ function NDCore.createAiPed(info)
|
|||||||
local options = info.options
|
local options = info.options
|
||||||
local blip = createBlip(coords, blipInfo)
|
local blip = createBlip(coords, blipInfo)
|
||||||
local point = lib.points.new({
|
local point = lib.points.new({
|
||||||
coords = vec3(coords.x, coords.y, coords.z),
|
coords = coords.xyz,
|
||||||
distance = info.distance or 25.0
|
distance = info.distance or 25.0
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -123,6 +123,10 @@ function NDCore.createAiPed(info)
|
|||||||
resource = info.resource or GetInvokingResource()
|
resource = info.resource or GetInvokingResource()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if blip and blipInfo and blipInfo.showWhenNear and DoesBlipExist(blip) and #(GetEntityCoords(cache.ped)-coords.xyz) > point.distance then
|
||||||
|
SetBlipAlpha(blip, 0)
|
||||||
|
end
|
||||||
|
|
||||||
function point:onEnter()
|
function point:onEnter()
|
||||||
local found, ground = GetGroundZFor_3dCoord(coords.x, coords.y, coords.z, true)
|
local found, ground = GetGroundZFor_3dCoord(coords.x, coords.y, coords.z, true)
|
||||||
lib.requestModel(model)
|
lib.requestModel(model)
|
||||||
|
|||||||
Reference in New Issue
Block a user