Esx_p_npcsellers

Buy weapons, items or get your black money washed by NPC’s!

  • You can add as many npc’s you like.

  • You can choose npc position and model.

  • You can choose npc’s animations.

  • You can add only add one weapon type or item for npc.

  • You can choose how many items are in store.

  • You can choose how often empty stores are filled.

  • Police can shutdown NPC’s.

  • Database integration

  • Not obfuscated

Limitations:

  • Only one weapon type or item for NPC.

Requirements:

  • ESX (version 2 is not supported because its not ready).

  • MySQL (this should be already there if you use ESX without sqlite).

  • Server build must be (FX version cerulean (2020-05)) or newer.

  • Tested with multiple different esx 1 versions.

  • You know how to use database:

    • You need to add all peds there (script comes with few).

    • You need to enable peds that have been disabled by police.
      *You can disable this feature by commenting out line 84-89 from server side
      Thanks @floatingdog

Notes:

  • Each npc must be added to database.

  • If police shutdowns npc you need to re-enable them from database.

  • Script comes with help notes and sql file.

Youtube video: https://youtu.be/6wdzWEJ8j8M
Tebex link: https://pamppa.tebex.io/package/4387012

Config:

Config = {}



Config.HowOftenEmptyStoresAreFilledInMinutes = 10 --How often empty stores are filled

Config.HowManyWeaponsToAddToEmptyStore = math.random(1,10) --How many weapons are added (default=1-10)

Config.HowManyItemsToAddToEmptyStore = math.random(20,100) --How many items area added (default=20-100)

Config.HowMuchBlackMoneyToAddToEmptyStore = 10000 --How much more empty washing npcs can wash

Config.HowManyPercentYouGetFromWashing = 100 --How much cash you get from blackmoney

Config.LoundryTimeSeconds = 10 --How long it takes to wash black money

Config.HowLongToWaitForItemOrWeaponInSeconds = 5 --How long you have to wait to get the weapon or items from npc.

Config.HowManyBulletsAreInWeapons = 0 --Guns come with how many bullets?





Config.Animations = {

{"mp_corona@single_team","single_team_loop_boss"},

{"anim@heists@heist_corona@single_team","single_team_loop_one"},

{"anim@heists@heist_corona@single_team","single_team_loop_two"},

{"anim@heists@heist_safehouse_intro@variations@female@window","window_part_one_loop"},

{"anim@heists@heist_safehouse_intro@variations@male@window","anim@heists@humane_labs@finale@strip_club","ped_b_celebrate_loop"},

{"anim@heists@ornate_bank@hostages@intro","intro_loop_ped_d"},

{"anim@heists@prison_heistig_2_p1_exit_bus","loop_a_guard_a"},

{"anim@narcotics@finale@trevor_car_idle","loop_trevor"},

{"mini@hookers_spcokehead","idle_reject_loop_b"},

{"missarmenian1movieextras","largegroup_loop_f_a"},

{"missarmenian2","standing_idle_loop_drunk"},

{"missbigscore2aig_6","wait_loop"},

}



Config.TextWait = "Wait"

Config.TextTalk = "Talk - ~g~E"

Config.TextSomethingTosell = "I might have something to sell"

Config.TextDollarPerPiece = "$ each"

Config.TextAskSellerToLeave = "Ask seller to leave"

Config.TextHowMany = "How many would you like?"

Config.TextInvalid = "Invalid amount"

Config.TextDontHave = "I can't do that much"

Config.TextYouCanOnlyCarryOne = "You can only carry one of these!"

Config.TextWait2 = "Wait a here for a while"

Config.TextGetBackHere = "Get back here if you want something!"

Config.TextNotPolice = "Go f*ck yourself!"

Config.TextWash = "I can wash some dirty loundry!"

Config.TextMax = "Maxium amount "

Config.TextShutDownL = "Shutdown laundrysite"

Config.TextHowMuch = "How much?"

Config.TextEmpty = "Store is already empty"

Config.TextYouCannotAfford = "You don't have enough money"

Config.TextCantCarry = "You can't carry these that many"

Config.TextCantCarry2 = "You can't carry two of these"

Config.TextLaundryReady = "There you go. Hard cold cash: "

npc

3 Likes

Question, Is it not possible for them to auto re enable once the server restarts instead of manually doing it in the database? Or allowing a command for police to shut down / open NPCs? It seems a little redundant that a developer would have to manually re enable things in the database, unless im understanding it wrong.

Thanks!

1 Like

Yes you are correct. I tried to add as many features here that I could, not all are suitable for everyone.

Is it possible, you just need to comment out mysql query from server side. Lines 84-89 to be exact if someone buys the script and want to do this.

Ok so if i comment out that sql statement what will that do?

It will not write to database that store has been closed. So every script or server restart will have all peds in the world.

Nice script, just picked it up. Wanted to let you know that the included SQL does not include a primary key for the table - as a result, phpMyAdmin will not let you edit or delete any of the included NPCs.

1 Like

My bad. I script should be now updated re-download it. Thanks for the feedback!

1 Like