mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
feat: creataiped callback on ped creation
This commit is contained in:
@@ -112,7 +112,7 @@ local function disableCollisionWithModels(ped, models)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function NDCore.createAiPed(info)
|
function NDCore.createAiPed(info, cb)
|
||||||
local ped
|
local ped
|
||||||
local model = type(info.model) == "string" and GetHashKey(info.model) or info.model
|
local model = type(info.model) == "string" and GetHashKey(info.model) or info.model
|
||||||
local blipInfo = info.blip
|
local blipInfo = info.blip
|
||||||
@@ -148,6 +148,10 @@ function NDCore.createAiPed(info)
|
|||||||
Wait(100)
|
Wait(100)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if cb then
|
||||||
|
cb(ped)
|
||||||
|
end
|
||||||
|
|
||||||
disableCollisionWithModels(ped, info.disableCollisionWithModels)
|
disableCollisionWithModels(ped, info.disableCollisionWithModels)
|
||||||
configPed(ped)
|
configPed(ped)
|
||||||
setClothing(ped, clothing)
|
setClothing(ped, clothing)
|
||||||
|
|||||||
Reference in New Issue
Block a user