Skip to content

Commit

Permalink
update main.lua
Browse files Browse the repository at this point in the history
1. try to fix not spawning peds
  • Loading branch information
justSalkin authored Dec 30, 2022
1 parent 9d6fb22 commit d858b73
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ function StartPED() -- Loading Peds
end
-- Spawn Ped
local ped = CreatePed(hashModel, x, y, z, v.heading, false, true, true, true)
Citizen.InvokeNative(0x283978A15512B2FE, ped, true) -- SetRandomOutfitVariation
SetEntityNoCollisionEntity(PlayerPedId(), ped, false)
SetEntityCanBeDamaged(npc, true)
SetEntityInvincible(npc, false)
SetEntityCanBeDamaged(ped, true) --kill animal? (default: true)
SetEntityInvincible(ped, false)
Wait(1000)
FreezeEntityPosition(npc, false) -- Ped can escape?
SetBlockingOfNonTemporaryEvents(npc, true) -- Ped can't be scared
FreezeEntityPosition(ped, false) -- Ped can escape?
SetBlockingOfNonTemporaryEvents(ped, true) -- Ped can't be scared
end
end

0 comments on commit d858b73

Please sign in to comment.