Thanks man I have been doing what I can too. Just got this working network side so we don’t have hundreds of duped npc’s. Here you guys go change what you want!
– Spawn NPC
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if NetworkIsHost() then
if (not generalLoaded) then
for i=1, #Ammunation do
RequestModel(GetHashKey(Ammunation[i].modelHash))
while not HasModelLoaded(GetHashKey(Ammunation[i].modelHash)) do
Wait(1)
end
Ammunation[i].id = CreatePed(2, Ammunation[i].modelHash, Ammunation[i].x, Ammunation[i].y, Ammunation[i].z, Ammunation[i].heading, true, true)
SetPedFleeAttributes(Ammunation[i].id, 0, 0)
SetAmbientVoiceName(Ammunation[i].id, Ammunation[i].Ambiance)
SetPedDropsWeaponsWhenDead(Ammunation[i].id, false)
SetPedDiesWhenInjured(Ammunation[i].id, false)
GiveWeaponToPed(Ammunation[i].id, Ammunation[i].Weapon, 2800, false, true)
end
generalLoaded = true
end
end
I’m using this script and it’s bloody great!
But I’m trying to use gang members in the processing plant whilst using the ‘selldrugstoNPC’ script.
Is there anyway to edit it so it won’t let you sell to the Npcs in this sciprt?
I’ve expanded it for security, but I’ve failed to set them a a group, so they can work together, when attacking the player (when player is killed, they start to kill each other…)
I’ve tried so many natives and combinations, but without effect
Pretty much same problem on our server. Like a week ago (no changes in the script or other resources), the script started to spawn multiple NPCs instead of one and it got to the point where all traffic and pedestrians got gone. Empty streets. I’ve tracked down the problem to this very script on my public server.