ngd-halloween(QB/ESX/QBOX)

ngd-halloween is an immersive Halloween script for your FiveM server.

Preview Video: Here

Pumpkin Looting:

  • Multiple pumpkins placed around the map. Script is configurable to allow each player to pick them up one a day OR only one single player to pick them up once a day.

  • Server sided syncing so all pumpkins are synced between players. This also means players can't just relog to get all the pumpkins to show again.

  • Custom pumpkin props - this makes it so the script doesn't interfere with any default GTA pumpkins you may have around your city.

Trick or Treating:

  • 400+preconfigured trick or treating doors. Fully configurable loot table with configurable chance rate per item. Each door is synced individually, meaning players can go as a group and each knock a door before putting the door into a configurable cooldown before being able to knock again.

  • Configurable chance of having an angry homeowner come out the front door and attack players.

  • Doors are synced server side, so player's can't logout and log back in and loot the same door.

Pumpkin Trading:

  • A Halloween vendor is spawned that will trade pumpkins for items. This is great if you want to add limited edition items for Halloween for your server.

Noondy's Brew:

  • A custom alcoholic drink prop is included with the script. This item is usable by default for players to drink. The food/drink/stress level is all configurable and it includes a built in drunk system.

Candycorn:

  • A custom candy corn prop that allows players to eat candy corn. This item is usable by default for players to eat.

Logs:

  • Built in logs to track items received from doors and pumpkins looted.

Requirements:

  • QB/OX Progressbar

  • OX/QB(LJ OR PS)/QS Inventory

  • QB/ESX Extended

Click to view config!
```lua
Config = {}
-- ██    ██ ████████ ██ ██      ██ ████████ ██ ███████ ███████ 
-- ██    ██    ██    ██ ██      ██    ██    ██ ██      ██      
-- ██    ██    ██    ██ ██      ██    ██    ██ █████   ███████ 
-- ██    ██    ██    ██ ██      ██    ██    ██ ██           ██ 
--  ██████     ██    ██ ███████ ██    ██    ██ ███████ ███████ 
Config.debug = false          --Prints/BoxZones
Config.BridgeDebug = false    --Serversided prints for bridge.
Config.GlobalDelete = false   --If true, deletes pumpkins for all players.  If false each player can pick up pumpkin once
Config.KnockCD = 60           --Cooldown time between knocking on individual doors
Config.SDAutoVersion = true   --Auto detect menu used
--Config.SDMenuVersion = 'ox' --Uncomment this if above is false. (v1 = nh_contextv1, v2 = nhcontextv2, zf = zf_context, qb = qb_menu, ox = ox_lib)
Config.AutoDetectNotif = true --Detect framework to use default framework notifications.  If false - Set your own notifications.
--Notifications:
Config.Notification = function(title, message, length, type)
  if Config.AutoDetectNotif then
    if Bridge.Framework == 'esx' then
      exports["esx_notify"]:Notify(type, time, message)
    elseif Bridge.Framework == 'qb' then
      TriggerEvent('QBCore:Notify', { caption = message, text = title, length, type })
    end
  else
    --Custom Notification
  end
end
--Animations
Config.Animations = {
  PickUpAnim = 'pickup_low',
  PickUpDict = 'pickup_object',
  PickUpTime = 1000,
  KnockAnim = 'knockdoor_idle',
  KnockDict = 'timetable@jimmy@doorknock@',
}

-- ██ ████████ ███████ ███    ███     ██    ██ ███████ ███    ██ ██████   ██████  ██████  
-- ██    ██    ██      ████  ████     ██    ██ ██      ████   ██ ██   ██ ██    ██ ██   ██ 
-- ██    ██    █████   ██ ████ ██     ██    ██ █████   ██ ██  ██ ██   ██ ██    ██ ██████  
-- ██    ██    ██      ██  ██  ██      ██  ██  ██      ██  ██ ██ ██   ██ ██    ██ ██   ██ 
-- ██    ██    ███████ ██      ██       ████   ███████ ██   ████ ██████   ██████  ██   ██ 

Config.Ped = `u_m_y_zombie_01`
Config.PedLocation = vector4(-1714.42, -199.41, 57.67, 38.0)
Config.VendorItems = {
  ['ngd_bagofcandycorn'] = {
    ['ngd_pumpkin'] = 5,
  },
  ['ngd_noondysbrew'] = {
    ['ngd_pumpkin'] = 15,
  },
  ['lockpick'] = {
    ['ngd_pumpkin'] = 25,
  },
}
--Blip for Vendor above.
Config.Blip = {
  Enabled = true,
  Sprite = 303,
  Scale = 0.75,
  Color = 17,
  ShortRange = true,
  Name = "Halloween Vendor",
}

-- ███    ██  ██████  ██████         ██████  ██████  ███    ██ ███████ ██    ██ ███    ███ ███████
-- ████   ██ ██       ██   ██       ██      ██    ██ ████   ██ ██      ██    ██ ████  ████ ██
-- ██ ██  ██ ██   ███ ██   ██ █████ ██      ██    ██ ██ ██  ██ ███████ ██    ██ ██ ████ ██ █████
-- ██  ██ ██ ██    ██ ██   ██       ██      ██    ██ ██  ██ ██      ██ ██    ██ ██  ██  ██ ██
-- ██   ████  ██████  ██████         ██████  ██████  ██   ████ ███████  ██████  ██      ██ ███████
--Configuration for the built in consumables.  If NGDConsume = true - then it will register all of the food items.

Config.NGDConsume = true                     -- Use built in consumables.
Config.DisableMovement = false               -- Disables moving while eating
Config.DisableCarMovement = false            -- Disables driving while eating
Config.DisableMouse = false                  -- Disables mouse movement while eating
Config.DisableCombat = true                  -- Disables combat while eating

--Food/Drink Configuration
Config.DrinkThirst = math.random(15, 35)
Config.DrinkHunger = 0
Config.DrinkStress = math.random(5, 10)
Config.FoodThirst = 0
Config.FoodHunger = math.random(1, 5)
Config.FoodStress = math.random(1, 5)

Config.CandyCornBagItem = 'ngd_bagofcandycorn' --Item for the bag of candy corn
Config.CandyCornItem = 'ngd_candycorn'         --Item for candycorn
Config.CandyCornBagQTY = 25                    --Quantity of candy corn out of bag

--Config for food/drink
Config.HalloweenDrink = {
  ['ngd_noondysbrew'] = {
    dict = 'amb@world_human_drinking@coffee@male@idle_a',
    anim = 'idle_c',
    prop = 'bottle_01',
    bone = 57005,
    coords = vector3(0.16, 0.03, -0.03),
    rotation = vector3(-72.0, -282.0, 8.0),
    time = 5000
  },
}
Config.HalloweenFood = {
  ['ngd_candycorn'] = {
    dict = 'mp_suicide',
    anim = 'pill',
    prop = 'candy_corn',
    bone = 18905,
    coords = vector3(0.25, 0.31, 0.35),
    rotation = vector3(0.0, 10.0, 10.0),
    time = 1600
  },
}

```

```lua
-- ██████  ██    ██ ███    ███ ██████  ██   ██ ██ ███    ██     ██████  ██  ██████ ██   ██ ██    ██ ██████
-- ██   ██ ██    ██ ████  ████ ██   ██ ██  ██  ██ ████   ██     ██   ██ ██ ██      ██  ██  ██    ██ ██   ██
-- ██████  ██    ██ ██ ████ ██ ██████  █████   ██ ██ ██  ██     ██████  ██ ██      █████   ██    ██ ██████
-- ██      ██    ██ ██  ██  ██ ██      ██  ██  ██ ██  ██ ██     ██      ██ ██      ██  ██  ██    ██ ██
-- ██       ██████  ██      ██ ██      ██   ██ ██ ██   ████     ██      ██  ██████ ██   ██  ██████  ██

Config.PumpkinItem = 'ngd_pumpkin' --Item received when picking up pumpkins
Config.PumpkinAmount = 1           --Quantity of item received

-- ██████  ██    ██ ███    ███ ██████  ██   ██ ██ ███    ██     ██       ██████   ██████  █████  ████████ ██  ██████  ███    ██ ███████
-- ██   ██ ██    ██ ████  ████ ██   ██ ██  ██  ██ ████   ██     ██      ██    ██ ██      ██   ██    ██    ██ ██    ██ ████   ██ ██
-- ██████  ██    ██ ██ ████ ██ ██████  █████   ██ ██ ██  ██     ██      ██    ██ ██      ███████    ██    ██ ██    ██ ██ ██  ██ ███████
-- ██      ██    ██ ██  ██  ██ ██      ██  ██  ██ ██  ██ ██     ██      ██    ██ ██      ██   ██    ██    ██ ██    ██ ██  ██ ██      ██
-- ██       ██████  ██      ██ ██      ██   ██ ██ ██   ████     ███████  ██████   ██████ ██   ██    ██    ██  ██████  ██   ████ ███████

Config.RandomPumpkin = {
    'jack_o_lantern_01',
    'jack_o_lantern_02',
    'jack_o_lantern_03',
    'pumpkin'
}
```

```lua
-- ████████ ██████  ██  ██████ ██   ██      ██████  ██████      ████████ ██████  ███████  █████  ████████
--    ██    ██   ██ ██ ██      ██  ██      ██    ██ ██   ██        ██    ██   ██ ██      ██   ██    ██
--    ██    ██████  ██ ██      █████       ██    ██ ██████         ██    ██████  █████   ███████    ██
--    ██    ██   ██ ██ ██      ██  ██      ██    ██ ██   ██        ██    ██   ██ ██      ██   ██    ██
--    ██    ██   ██ ██  ██████ ██   ██      ██████  ██   ██        ██    ██   ██ ███████ ██   ██    ██

Config.TrickOrTreat = {
  [1] = {
    item = 'ngd_candycorn',    --Item receieved
    chance = 75,               --Chance item is gotten per door
    amount = math.random(1, 5) --Quantity of item received
  },
  [2] = {
    item = 'lockpick',
    chance = 10,
    amount = math.random(1, 3)
  },
  [3] = {
    item = 'ngd_noondysbrew',
    chance = 25,
    amount = 1
  }
}
--If below is true, there is a configurable chance for an angry homeowner to attack the person knocking on the door.
Config.EnableAngry = true     --Enable/Disable (true/false)
Config.AngryPersonChance = 10 --Chance for PED to spawn
Config.Weapon = `weapon_bat`  --Weapon for PED
Config.AngryPeople = {        --Random selected PED model.  Can add/remove more as needed
  'a_f_m_fatcult_01',
  'a_m_m_farmer_01',
  'a_m_m_salton_01'
}
```

If you have any problems - Join our Discord for support!

Last updated