Add condition for stopping entity fade in

This commit is contained in:
Jim Shield
2025-07-17 12:40:43 +01:00
parent 3cb4005889
commit 9729d2fef1
3 changed files with 18 additions and 13 deletions

View File

@@ -55,7 +55,7 @@ end
-- ```lua
-- local ped = makePed(pedData, pedCoords, true, false, nil, {'animDict', 'animName'}, true)
-- ```
function makePed(data, coords, freeze, collision, scenario, anim, synced)
function makePed(data, coords, freeze, collision, scenario, anim, synced, fade)
local ped = nil
local model = nil
if type(data) == "table" then
@@ -142,10 +142,11 @@ function makePed(data, coords, freeze, collision, scenario, anim, synced)
end
unloadModel(model)
Peds[keyGen()..keyGen()] = ped
CreateThread(function()
fadeInEnt(ped)
end)
if fade ~= false then
CreateThread(function()
fadeInEnt(ped)
end)
end
return ped
end