anyone knows how can i add peds to a clothing store? and if i have to add all peds clothes hash’s?
There you go
Citizen.CreateThread(function()
for z, x in pairs(Config.Npc) do
while not HasModelLoaded( GetHashKey(Config.Npc[z]["Model"]) ) do
Wait(500)
modelrequest( GetHashKey(Config.Npc[z]["Model"]) )
end
local npc = CreatePed(GetHashKey(Config.Npc[z]["Model"]), Config.Npc[z]["Pos"].x, Config.Npc[z]["Pos"].y, Config.Npc[z]["Pos"].z, Config.Npc[z]["Heading"], false, false, 0, 0)
while not DoesEntityExist(npc) do
Wait(300)
end
Citizen.InvokeNative(0x283978A15512B2FE, npc, true)
FreezeEntityPosition(npc, true)
SetEntityInvincible(npc, true)
TaskStandStill(npc, -1)
Wait(100)
SET_PED_RELATIONSHIP_GROUP_HASH(npc, GetHashKey(Config.Npc[z]["Model"]))
SetEntityCanBeDamagedByRelationshipGroup(npc, false, `PLAYER`)
SetEntityAsMissionEntity(npc, true, true)
SetModelAsNoLongerNeeded(GetHashKey(Config.Npc[z]["Model"]))
end
end)