[Release] [Standalone] InteractNPCLocation

InteractNPCLocation

Adds NPCs to various venues such as markets, clothing stores, armories and more. An NPC animation is also added (default arms crossed)

Installation:

  • Enter the script folder of your resource folder
  • Start the InteractNPCLocation resource in .cfg file

Download:

GitHub

Image

Imgur

Imgur

Imgur

Changelog:

  • Fixed start resource bug (04/03/2020)
11 Likes

Very good. Now I have to find a way to stop drug dealers from selling drugs to them. hahahahaha

8 Likes
isShopkeeper  = IsPedModel(ped, 'mp_m_shopkeep_01')

if not isShopkeeper then
     [Your code goes here, probably the drawText3D part]
end

You will have to do this for the weapon and clothing store shopkeepers too, but this should work.

Thanks. I’ll try…

When i try to get on the server it says FiveM-Resources-master isnt working

You downloaded the whole package of my scripts and inside there are the folders to put not the whole package downloadable from GitHub

Uh, can you help me with making NPC speak something? LIke I want to keep a NPC at hospital and when someone interacts, it should say maybe “Hello” ?

theres alot of npc’s not showing on gun stores and clothe … ive seen the code up there but cant find a way to put it working any help ?!

It is not the competence of this script, I would suggest that you go and propose it to me and maybe it will be made.

I probably forgot the shops or clubs but you can easily add them according to the pattern of all the other NPCs in the script

1 Like

Ty ill try just started on this whole new adventure of fivem and scripts will try to add them :slight_smile: ty <3

give me link (url)
on instalacion

1 Like

See Download section

Love this script, but even though it says it starts (and bug is fixed), it doesnt… takes 1-2 restarts to get the npc’s to show up D:

Nice script. Looks a lot better when people are in stores!

I’ve added this script to my server and added one NPC Docter at the hospital.

When restarting the server the extra added NPC is not showing up. When restarting the resource with txadmin it is. When looking at the default inserted NPC’s they spawn instant after a server reboot.

My line added:
– Doctor {306.17,-597.23,43.29,23.63,“s_m_m_doctor_01”,“amb@world_human_hang_out_street@female_arms_crossed@base”,“base”},

There is no differents between starting the script at the beginning or end of the config.cfg. I thought because of loading interiors.

Made a duplicated line and the NPC spawns 1 time now.

? Where… What line… Lol

Thank you for making standalone

You need change


local Hash = GetHashKey(model)
local Ped = CreatePed(1, Hash, x,y,z-0.95, 0.0, false, true)
if not HasModelLoaded(Hash) then
  RequestModel(Hash)
  Citizen.Wait(200)
end

for

local Hash = GetHashKey(model)
repeat 
  Wait(200)
  RequestModel(Hash)
until HasModelLoaded(Hash)
local Ped = CreatePed(1, Hash, x,y,z-0.95, 0.0, false, true)

And change event onClientResourceStart for playerSpawned
And remove:


    if (GetCurrentResourceName() ~= resourceName) then
      return
    end