[RELEASE] PED/NPC Addon Shops, Nightclub, Drugs... UPDATE

2 strippers in synced lap dance

Citizen.CreateThread(function()
    local model = GetHashKey("s_f_y_stripperlite")
	
    RequestModel(model)
    while not HasModelLoaded(model) do
        Wait(10)
    end
	
	if Config.EnableStripclub then
		for _, item in pairs(Config.Locations23) do
			local npc = CreatePed(1, "s_f_y_stripperlite", item.x, item.y, item.z, item.heading, false, true)
			local npc2 = CreatePed(1, "s_f_y_stripperlite", item.x, item.y, item.z, item.heading, false, true)
			local ad = "mini@strip_club@lap_dance_2g@ld_2g_p1"
			RequestAnimDict(ad)
			while not HasAnimDictLoaded(ad) do
			Citizen.Wait(1000)
			end
			local netScene = CreateSynchronizedScene(item.x, item.y, item.z, vec3(0.0, 0.0, 0.0), 2)
			TaskSynchronizedScene(npc, netScene, ad, "ld_2g_p1_s1", 1.0, -4.0, 261, 0, 0)
			TaskSynchronizedScene(npc2, netScene, ad, "ld_2g_p1_s2", 1.0, -4.0, 261, 0, 0)
			SetEntityInvincible(npc, true)
			SetEntityInvincible(npc2, true)
			SetBlockingOfNonTemporaryEvents(npc, true)
			SetBlockingOfNonTemporaryEvents(npc2, true)
			SetSynchronizedSceneLooped(netScene, 1)
			SetModelAsNoLongerNeeded(model)
		end
	end
end)
2 Likes

Excelent Job i starting working in my Survival Server and I have a question How to create any Aggressive NPCs for this script?

Thanks

1 Like

I have removed the godemod of the persons, can I set it, that all NPCS spawn after some time?

1 Like

i am having an issue where is spawn multiple peds in one place stcked over each other for every location that is defined in the config.

Plus it is floating in mid-air. Can someone help me?

Is anyone experiencing a frequency of the “Cardinal-Single-Finch” crash code when using this resource? It happens at random, and really only once or twice - but when it does, it seems to happen universally to everyone in the server at the same time.

Hey, is there any way you can make the NPC guards stop shooting at players when they are down/dead? It is quite dramatic seeing a guard keeps on shooting a “dead player” and forces police to shoot the guard before they can actually approach and “save” the guy with RP? :slight_smile:

1 Like

can you post the config also please?

can you make it so they dont shoot at each other? lol i shoot at a guard, other guys shoot that guard and me lol

I was, I turned this off and voilĂĄ, no more cardinal crashes.

Hi! How can I make the peds walking around for example in a strip club?Thank you in advance!

I really like this addon. I have it working, but some of the police are invincible. I’d love for them to be killable, but then also respawn after a while. Is something like that possible? Thanks!

Nice!

hey can make this npc, shoot on zombies in my server? if yes can you help me with that?

Citizen.CreateThread(function()
RequestModel(GetHashKey(“u_m_m_jewelsec_01”))

while not HasModelLoaded(GetHashKey("u_m_m_jewelsec_01")) do
    Wait(1)
end

if Config.EnableCops or Config.EnableWeapons then
	for _, item in pairs(Config.Locations23) do
		local npc = CreatePed(0, 0xacccbdb6, item.x, item.y, item.z, false, false)
		
		FreezeEntityPosition(npc, true)	
		SetEntityHeading(npc, item.heading)
		SetEntityInvincible(npc, true)
		SetBlockingOfNonTemporaryEvents(npc, false)
		SetPedRelationshipGroupHash(npc, "PLAYER")
		GetPedRelationshipGroupHash(npc, "zombie")
		SetCanAttackFriendly(entity, false, false)
		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, 1, 1.0, 0, 0, 0)
		GiveWeaponToPed(npc, GetHashKey("WEAPON_BOTTLE"), 1, false, true)
        GiveWeaponToPed(npc, GetHashKey("WEAPON_SMG"), math.random(20, 100), true, false)
        SetPedAmmo(npc, GetHashKey("WEAPON_SMG"), math.random(20, 100))
        SetCurrentPedWeapon(npc, GetHashKey("WEAPON_SMG"), true)
		SetPedSeeingRange(npc, 100.0)
		SetPedHearingRange(npc, 80.0)
		SetPedCombatAttributes(npc, 85, 1)
		SetPedCombatRange(npc,50)
	end
end

end)

the code is this if anyone knows

how can we set up other clubs to be accessible?

hey pretty cool to see you have done this script. i have done a peds script too.
the only thing is needs to like a sync between all players.
if you ca get this synced simply. that would be amazing.

goodd

The bots can’t move around… they only stay in one position like they’re frozen and shoot… it would be great if the NPC could run around and attack instead of moonwalking in the same position… xD

My NPC is in the air, not on the ground? Any fixes?

having the same, some all new added are floting around ;( any fix?

Anyone have standalone non-esx