in itself, a lot of things are possible … at the moment I have unfortunately too little time but who wants to can just try for yourself … will not break anything;)
now it looks (Guards)
-- Biker Guards2 (Druglabors & Points, Biker DLC)
Citizen.CreateThread(function()
RequestModel(GetHashKey("s_m_m_chemsec_01"))
while not HasModelLoaded(GetHashKey("s_m_m_chemsec_01")) do
Wait(1)
end
if Config.EnableDrugs then
for _, item in pairs(Config.Locations14) do
local npc = CreatePed(4, 0x2EFEAFD5, item.x, item.y, item.z, item.heading, false, true)
FreezeEntityPosition(npc, true)
SetEntityHeading(npc, item.heading)
SetEntityInvincible(npc, true)
SetBlockingOfNonTemporaryEvents(npc, true)
RequestAnimDict("anim@amb@nightclub@peds@")
while not HasAnimDictLoaded("anim@amb@nightclub@peds@") do
Citizen.Wait(1000)
end
Citizen.Wait(200)
TaskPlayAnim(npc,"anim@amb@nightclub@peds@","amb_world_human_stand_guard_male_base",1.0, 1.0, -1, 9, 1.0, 0, 0, 0)
end
end
end)
it might only look like that in theory … (needs to be adjusted)
-- Biker Guards2 (Druglabors & Points, Biker DLC)
Citizen.CreateThread(function()
RequestModel(GetHashKey("s_m_m_chemsec_01"))
while not HasModelLoaded(GetHashKey("s_m_m_chemsec_01")) do
Wait(1)
end
if Config.EnableDrugs then
for _, item in pairs(Config.Locations14) do
local npc = CreatePed(4, 0x2EFEAFD5, item.x, item.y, item.z, item.heading, false, true)
FreezeEntityPosition(npc, true)
SetEntityHeading(npc, item.heading)
SetEntityInvincible(npc, true)
SetBlockingOfNonTemporaryEvents(npc, true)
RequestAnimDict("anim@amb@nightclub@peds@")
while not HasAnimDictLoaded("anim@amb@nightclub@peds@") do
Citizen.Wait(1000)
end
Citizen.Wait(200)
TaskPlayAnim(npc,"anim@amb@nightclub@peds@","amb_world_human_stand_guard_male_base",1.0, 1.0, -1, 9, 1.0, 0, 0, 0)
AddRelationshipGroup(npc)
SetRelationshipBetweenGroups(5, GetHashKey('PLAYER'), GetHashKey(testped))
SetRelationshipBetweenGroups(5, GetHashKey(npc), GetHashKey('PLAYER'))
SetPedCanSwitchWeapon(npc, true)
SetPedArmour(npc, 100)
TaskCombatPed(npc, GetPlayerPed(-1), 0, 16)
SetPedAccuracy(npc, 50)
SetEntityMaxHealth(npc, 500)
SetEntityHealth(npc, 500)
SetPedSeeingRange(testped, 100.0)
end
end
end)