Hey,
I was wondering about how to spawn peds, freeze them so they dont move and make them invincible.
I tried some Scripts from other Discussions like this:
local firstspawn = 0
local peds = { { -1317.06, -390.76, 36.44} }
local thisPed
local pedCoords = {}
local storedPeds = {}
AddEventHandler('playerSpawned', function(spawn)
if firstspawn == 0 then
for i=1, 10, 1 do
pedCoords = peds[i]
thisPed = CreatePed(26, 0xF0EC56E2, pedCoords[1], pedCoords[2], pedCoords[3], 0.0, true, true)
table.insert(storedPeds, {ped = thisPed})
SetEntityInvincible(thisPed, true)
end
firstspawn = 1
end
end)
@Kevin_ho
Iâve been looking for something like this to spawn some peds in specific places. Fist of all, thanks for this script. I am quite noob with scripts and managing resources so I have a little doubt. With this script I can spawn a ped in specific âscenariosâ. I have looking for a scenario list but I canât find any for dancing. I have found lots of dancing animations but no scenarios. So, How can I modify the script for npcs making animation instead scenarios?
Thanks in advance.