This script works for older versions of fiveM.
Sorry if i’m not realy here for the community and if i don’t updates NPCLife to the latest fiveM version.
I do not have much time as before
.
I let the source code for all developpers.
you can edit it as your wishes.
I would try to help you all and update NPCLife as soon as I have a little time to devote to Fivem and server development.
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
end
end)
1 Like
Hello do you know how to prevent the NPC from shooting itself?
1 Like
I am also trying to solve this problem of solutions?
Anyone know how to make them attack you in range? Like gurads excet.
1 Like
Works great on vRP. Testing it on my server now.
Good job my friend, can you pass the stripper?
Look in github there is a striper with a bar and shop setup. Thats what I use for the strip club.
Use google I;m not your personal assistant 
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 can’t get any npc spawn to work. The blips work but no one is there!
Where can I find a list of the ambiance? i want to change the “AMMUCITY”
Thank you, @h0ldhaven, for this great script!
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 
Any advice, please?
hello I noticed a mistake
every player of the newly joined we created 1 new NPC why did we test 10 NPC in the shop XD
and I have not changed
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.
i downloaded the nmpclife v1.0.1 and i did everthing right and i entered an store and the store is empty no nmc pls help
@MoravianLion
Yes, that’s exactly the problem
I think it’s because of the version I do not know have already much tasted
but no chance