๐Ÿ”ฌ
byK3 Docs
  • SCRIPT DOCS
    • ๐ŸŽƒnkn_halloween
      • โคต๏ธInstallation
      • ๐Ÿ› ๏ธConfig
      • ๐Ÿ“Coords
      • ๐ŸŽจUI (HTML/JS)
  • ๐ŸŽ€nkn_dailyRewards
    • โคต๏ธInstallation
    • ๐Ÿ› ๏ธConfig
    • ๐Ÿ‘€See the Config
  • ๐ŸŽ„nkn_advent
    • โคต๏ธInstallation
    • ๐Ÿ› ๏ธScript Configuration
    • ๐Ÿ‘€See the Config
  • โš’๏ธnkn_craftingTable
    • โคต๏ธInstallation
    • ๐Ÿ› ๏ธScript Configuration
    • ๐Ÿ‘€See the Config
Powered by GitBook
On this page
  • Config.ShopList
  • Config.ShopListHighlight
  • Config.Shop
  • Config.PumpkinHunt
  • spawning
  • general
  • animation
  • Custom Notify Triggers
  1. SCRIPT DOCS
  2. nkn_halloween

Config

Config Settings & Explanations

Config.ShopList

{type = "item", name = "water", count = 100, price = 2, label = "100x Water"},
  • type determines the type of the 'product'. Here you can enter either 'item' or 'weapon'.

  • name is the name of the item or weapon (example for weapon: WEAPON_PISTOL50)

  • count is the quantity of the items; for weapons (i.e., when type = 'weapon'), it refers to the ammunition.

  • price determines the price for the product, with pumpkins being the currency.

  • label is the shop label; in our case, it's called "100x Water" - this is how it will appear in the shop!

Config.ShopListHighlight

Config.ShopListHighlight = {
    type = "item",   -- item or weapon
    name = "bread", -- item or weapon name ('WEAPON_PISTOL50')
    count = 1,     -- count or ammo for the weapon
    price = 50,
    label = "1x Bread",
}

Same system as with Config.ShopList.

Config.Shop

    ["Square Park Shop"] = {
        coords = vec3(225.42399597168, -440.84436035156, 45.746906280518),

        marker = {
            enable = true,
            type = 1,
            size = vector3(1.0, 1.0, 1.0),
            color = {r = 255, g = 0, b = 0, a = 100},
            rotate = true,
        },

        blip = {
            enable = true,
            sprite = 1,
            color = 1,
            scale = 1.0,
            name = "Wรผfelpark",
        },
        
        npc = {
            enable = true,
            hash = "a_f_m_bevhills_02",
            heading = 0.0,
            coords = vec3(225.42399597168, -440.84436035156, 45.746906280518),
        },

    },

Config.PumpkinHunt

Here are the main settings for the resource. Please read through all the categories related to it.

spawning

spawnAmount = 500

The value for 'spawnAmount' determines how many coordinates should be created for the pumpkins that are to be spawned.

spawnCommand = "generateCoords"

The string for 'spawnCommand' is the in-game command with which you can generate the coordinates where the pumpkins should spawn. In this case, it will generate 500 coordinates (value from spawnAmount).

manualCommand = "addCoords"

This command is used to manually enter coordinates into the coords.json (Coords Config). The coordinate of your Ped is automatically taken and entered.

removeCommand = "removeCoords"

With this command, you can remove coordinates from coords.json in-game. Simply stand within a distance of 30 from the spawn point to remove it.

general

object = "prop_veg_crop_03_pump",
maxPumpkins = 300

This is the maximum number of pumpkins a player can have/possess.

pumpkinCollectReward = math.random(1,3)

This is the amount a player should receive when they pick up a pumpkin. If you want an exact number, you need to replace 'math.random'. Example: pumpkinCollectReward = 3. That would be 3 "points" per collected pumpkin.

jumpscare = false

If this value is set to true, then jump scares are active. Jump scares can occur when picking up a pumpkin.

jumpscareChance = 10

This determines the percentage (%) chance that a jump scare will occur when picking up a pumpkin.

jumpscareDuration = 2

The duration in seconds for how long a jump scare should last.

eventOnStart = false

This value determines whether pumpkins should spawn at the start of the resource. Set to true to activate it.

startEventCommand = "startHalloween"

If 'eventOnStart' should be deactivated, you can manually start the event with a command.

allowedAdminGroups = {
            "superadmin",
            "admin",
            "mod",
},

This table determines which groups have permission to execute commands. These groups can also execute other commands such as: 'spawnCommand', 'manualCommand', and 'removeCommand'.

shopCommand = true

If you want the Halloween Shop to also be opened with a command, keep this value on true - if not, set to false. Especially useful if you don't want to have shops (Config.Shop).

shopCommandName = "halloweenshop"

Command string to open the UI (Halloween Shop).

addPumpkinCommand = "addPumpkin"

Command to add pumpkins to a player.

setPumpkinCommand = "setPumpkin"

Command to set a specific number of pumpkins for a player.

removePumpkinCommand = "removePumpkin"

Command to remove a number of pumpkins from a player.

debugCommand = "debugtpm"

This is a debug command! Executing this will teleport you to the first coordinates from 'coords.json', and when executed again, it will take you to the next one, from the first to the last!

animation

playAnim = "PROP_HUMAN_PARKING_METER",
duration = 5000

Determine here in the value how long the animation should last/play. You need to enter the value in milliseconds (1000 = 1 second).

Custom Notify Triggers

At the bottom of the config, you can enter your own triggers for your notifications.

function clientNotify(message)
    TriggerEvent("esx:showNotification", message)
end

function serverNotify(source, message)
    TriggerClientEvent("esx:showNotification", source, message)
end

Simply replace the events with your notification event.

PreviousInstallationNextCoords

Last updated 1 year ago

The key for this table is the shop's name - in our example, it's "Square Park Shop". The exact name you choose doesn't really matter! It won't affect the script, but the shop name might appear in the Discord logs. Therefore, a clear designation would be better for an overview! For marker, you can disable it with enable = false. type is the marker type; you can find a list here: . size is for the marker's size; please only change the values inside the brackets of vector3. color uses the RGB system. The a in color stands for transparency, with 100 being full strength. blip, you can also enable/disable it. sprite is the type of blip; you can find a list here: . color is the color, and for this, FiveM uses its own color codes; here's a list: . scale is for the size of the blip on the map. name is the name of the blip.

npc, is also enable/disable through config. hash is the NPC-ID; you can find a list here: . heading is the direction the NPC is facing (the h value in /coords). coords is the spawn point for the NPC. You can copy and paste the code as is, but make sure to edit the values. This way, you can create as many shops as you want.

Hash ID for the object (in this case, a pumpkin). You can find IDs here:

The value of 'playAnim' is the name of the animation that the player should play when collecting. You can find a list here:

๐ŸŽƒ
๐Ÿ› ๏ธ
MARKER TYPE LIST
BLIP SPRITE LIST
BLIP COLOR LIST
NPC HASH LIST
ID LISTE
ANIMATION/SCENARIOS LISTE