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

Thank you for the fast reply, yes i just figured that out, still it spawns a random configuration of drawables withing the ped but thats okay for now, also im trying to spawn a custom addon ped but i suppose its hard to do because i dont know where to get the haskey for that model or the hex code as it is an addon.

Thank you for your support and great work!

Hi for your streamed peds you can use

GetHashKey(“name_of_your_models”) :wink:

I have tried that, it kinda works if you replace the Peds, but i its an Addon i havent been able to make it work. Problem probably is in CreatedPed(x, 0x0000000). i dont know how to get that hex code, i tried using openIV, placing the model in it and getting the hex but it didnt fixed it. If i replace the ped for
a_f_y_juggalo_01 for example the custom ped will appear glitched because of differences in height and so

Have you tried with other models ?
This is maybe due to bad models.

Just tried with a different model Mai and it didnt work as an addon, if you have custom addon peds working im probably messing up the addon routine, i dont have a trainer menu on my server to test the peds so im kinda on the dark about if its working correctly or not Y_Y’

Really Nice :stuck_out_tongue: You dont have one with Counterfeit Cash Factory and Document Forgery Office :frowning: ?

this is not excluded for a later update :slight_smile:

https://docs.ragepluginhook.net/ why can’t find here RequestAnimDict(“anim@amb@business@meth@meth_monitoring_cooking@monitoring@”)

This list is complete ?

probably not … can offer you a list I’ve used

Grand Theft Auto V Animations List (as of game patch v1604)

There are 14053 animation dictionaries.
There are 138133 animation clips.

anim@amb@business@meth@meth_monitoring_cooking@monitoring@
        base_idle_guage_clipboard^1
        base_idle_guage_monitor
        base_idle_guage_pencil^1
        button_press_clipboard^1
        button_press_monitor
        button_press_pencil^1
        button_press_v2_clipboard^1
        button_press_v2_monitor
        button_press_v2_pencil^1
        check_guages_clipboard^1
        check_guages_monitor
...

animations.cfg (798.6 KB)

1 Like

Thank you :smiley:

It’s possible to add an item to ped? to complete more the animation :stuck_out_tongue:

Maybe is the same way as weapon ?

so with weapons you can equip the peds arbitrarily … you can determine which weapons are carried how much ammunition as well as the equipped and therefore visible thing

GiveWeaponToPed(npc, GetHashKey("WEAPON_BOTTLE"), 1, false, true)
GiveWeaponToPed(npc, GetHashKey("WEAPON_PISTOL"), math.random(20, 100), true, false)
SetPedAmmo(npc, GetHashKey("WEAPON_PISTOL"), math.random(20, 100))
SetCurrentPedWeapon(npc, GetHashKey("WEAPON_PISTOL"), true)

Yes to give a weapon to ped, my question is if you can give an item :stuck_out_tongue:

Does anyone know if it is possible to make an option that the npcs do not shoot at each other?

1 Like

is it possible to create animal attack player

Is there any way to make the NPCs hostile and shoot when they enter the site?

  • This to the drug places, I think to make it more difficult.

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)
1 Like

How did u make ur lightning work so good?

this works very well for the stripclub

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)
			SetEntityInvincible(npc, true)
			SetBlockingOfNonTemporaryEvents(npc, true)
			RequestAnimDict("mini@strip_club@pole_dance@pole_dance3")
			while not HasAnimDictLoaded("mini@strip_club@pole_dance@pole_dance3") do
				Citizen.Wait(100)
			end
			local netScene3 = CreateSynchronizedScene(item.x, item.y, item.z, vec3(0.0, 0.0, 0.0), 2)
			TaskSynchronizedScene(npc, netScene3, "mini@strip_club@pole_dance@pole_dance3", "pd_dance_03", 1.0, -4.0, 261, 0, 0)
			SetSynchronizedSceneLooped(netScene, 1)
			SetModelAsNoLongerNeeded(model)
		end
	end
end)

add this in config.lua

Config.EnableStripclub = true

Config.Locations23 = { -- Stripclub
	{ x=112.60, y=-1286.76, z=28.45, heading=265.902 }	-- Stripclub
}

for	i=23, #Config.Locations23, 1 do
	Config.Zones['Stripclub_' .. i] = {
		Pos   = Config.Locations23[i]
	}
end

1 Like