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

the character model “csb_dixon” can not be loaded … this is the model of Dj Dixon … what does your config look like? Of course, only 1 DJ in the config should be active

Config.EnableSolomun              = true    -- If true spawn Solomun at Nightclub DJ
Config.EnableDixon                    = false  -- If true spawn Dixon at Nightclub DJ

Did not change any setting of config~ Here is my config look like

Config = {}
Config.EnableShops                = true    -- If true spawn Some Shop & Interior NPCs
--Cops--
Config.EnableCops                 = true    -- If true spawn All Cops at Departments
--Cops--
--Nightclub--
Config.EnableNightclubs           = true    -- If true spawn Nightclub NPCs (Need a IPL Loader https://github.com/Bob74/bob74_ipl or other) (After Hours DLC)
Config.EnableSolomun              = true    -- If true spawn Solomun at Nightclub DJ
Config.EnableDixon                = false   -- If true spawn Dixon at Nightclub DJ
--Nightclub--
--Biker DLC--
Config.EnableDrugs                = true    -- If true spawn NPCs & Guards at Druglabors (Biker DLC)
Config.EnableWeapons              = true    -- If true spawn Guards with Weapons (can change in ped.lua)
--Biker DLC--

I’m sure I started Peds after bob74_ipl has started, that is weird :thinking:.

hm yes … have just tested both djs on the server and both are loaded and displayed without problems … have you ever deleted the server and client cache?

Deleted the server cache and client cache, this happens :joy::joy::joy::joy::joy:

image

Question are they supposed to be animated or just stand there? Mine don’t move.

same here!!

OFFTOPIC:
Is that something you can load in the “Resource Monitor” ?
Looks kinda cool.

resmon 1 in your client console turns on the Resource Monitor resmon 0 turns it off.

1 Like

Thanks it works, kinda small but it there.

You can resize it using your mouse.

Yes found it. Thanks again! :sunglasses:

I have seen a problem that sometimes it can spawn alot of npc in the same place , any fix for that ?

All NPC Freeze bro, how to make them dance or move a little bit ? Help me

1 Like

the script is client side and now and then it happens that the Npcs interrupt their animation just … I try if I have a little more time to fix this … as admin you can chat in the command /restart peds enter so the script restarts and reset all Npcs for all clients and the animations should be run again. Exception are all the Npcs are in the shops … these have no animations!

Hi,really nice release!

An example for fixing non animated peds:

Citizen.CreateThread(function()
    RequestModel(GetHashKey("a_f_y_juggalo_01"))
	
    while not HasModelLoaded(GetHashKey("a_f_y_juggalo_01")) do
        Wait(1)
    end
	
	if Config.EnableNightclubs then
		for _, item in pairs(Config.Locations2) do
			local npc = CreatePed(1, 0xdb134533, item.x, item.y, item.z, item.heading, false, true)
			
			FreezeEntityPosition(npc, true)	
			SetEntityHeading(npc, item.heading)
			SetEntityInvincible(npc, true)
			SetBlockingOfNonTemporaryEvents(npc, true)
			--SetPedCanPlayAmbientAnims(npc, true)
			RequestAnimDict("mini@strip_club@idles@stripper")
			while not HasAnimDictLoaded("mini@strip_club@idles@stripper") do
			Wait(1)
			end
			TaskPlayAnim(npc,"mini@strip_club@idles@stripper","stripper_idle_01",1.0, 0.0, -1, 1, 10.0, false, false, false)
		end
	end
end)

Seems to work for every peds.

1 Like

Thanks for the tip :slight_smile: is sometimes easier than you think … I have now made some changes that should not interrupt the animations … also I have the problem fixed the player by attacking the npcs in some situations could interrupt the animation ( eg grenades, etc.)
I will update the script in the next hour

while (not HasAnimDictLoaded("anim@amb@nightclub@peds@")) do			
Citizen.Wait(1000)
end
				
Citizen.Wait(200)
TaskPlayAnim(npc,"anim@amb@nightclub@peds@","amb_world_human_partying_female_partying_beer_base",1.0, 1.0, -1, 9, 1.0, 0, 0, 0)
2 Likes

Nice. Good work

Awesome work, its there a way to chose an specific drawable for the ped?

for example force a_f_o_salton_01 to use

Component index: 2
Drawable index:1
Texture variation: 1

So it will always spawn with gray short hair?

Also, where can i get the info for this line so i can spawn my own Peds

local npc = CreatePed(1, 0xf6157d8f

1 Like

ouhhh, good question… if we could spawn an npc with specific variation… that would be great.

Hello :sunny:
a large part of the npcs you will find …http://ragepluginhook.net/PedModels.aspx then you have everything you need if I have the days some time I’ll see if I can integrate variations in the script :slight_smile:

for each npc then just replace the hash and model …

Citizen.CreateThread(function()
    RequestModel(GetHashKey("a_f_y_juggalo_01"))
	
    while not HasModelLoaded(GetHashKey("a_f_y_juggalo_01")) do
        Wait(1)
    end
	
	if Config.EnableNightclubs then
		for _, item in pairs(Config.Locations2) do
			local npc = CreatePed(4, 0xdb134533, item.x, item.y, item.z, item.heading, false, true)
1 Like