forked from Simnation/Main
12 lines
474 B
Lua
12 lines
474 B
Lua
function canShow(targetPed)
|
|
local isEntityVisible = IsEntityVisible(targetPed)
|
|
local getEntityAlpha = GetEntityAlpha(targetPed)
|
|
local pedIsVisible = isEntityVisible and getEntityAlpha == 255
|
|
debug("pedIsVisible: " .. tostring(pedIsVisible), "ped:" .. targetPed, "isEntityVisible: " .. tostring(isEntityVisible), "getEntityAlpha: " .. getEntityAlpha)
|
|
return pedIsVisible
|
|
end
|
|
|
|
function debug(...)
|
|
if not config.debug then return end
|
|
print(...)
|
|
end
|