API
Admin commands, reward entries, and integration points of Halloween
Halloween works on its own: players use it through the world (doors, pumpkins, the candy shop, outbreaks, and zombie areas), and you manage it with the admin commands below. This page lists everything you can use from outside the resource: the commands, the reward entry format, the item that cures the infection, and the database objects the resource uses.
All commands are named in MS.Commands in cl_config.lua and can be renamed there. They can only be used by the admin groups set in MS.Admin in sv_config.lua. A source is the server ID of a player.
/addcandy command
Adds candies to a player. The command name is MS.Commands.add. Usage: /addcandy [source] [candies].
sourcenumberrequiredServer ID of the player.
candiesnumberrequiredAmount of candies.
/removecandy command
Removes candies from a player. The command name is MS.Commands.remove. Usage: /removecandy [source] [candies].
sourcenumberrequiredServer ID of the player.
candiesnumberrequiredAmount of candies.
/setcandy command
Sets the candies of a player to an exact amount. The command name is MS.Commands.set. Usage: /setcandy [source] [candies].
sourcenumberrequiredServer ID of the player.
candiesnumberrequiredAmount of candies.
Reward entries
Rewards are written as entries in the reward lists of cl_config.lua: MS.Shop.rewards, MS.Doors.rewards, MS.Pumpkins.rewards, MS.Outbreak.rewards, and the pools of MS.Areas.rewards. Every entry is a table with the keys below. Weapons have no amount, and only the shop rewards need candies, because it is their price.
typestringrequireditem, weapon, or account.
itemstringrequiredItem name for an item, weapon name such as WEAPON_PISTOL for a weapon, or the account for an account: cash, bank, or black.
labelstringrequiredName shown to the player.
amountnumber or tabledefault 1How many the player gets: a fixed number or a range like { min = 1, max = 5 }. Not used for weapons.
candiesnumberdefault Price in candies. Only used by the entries of MS.Shop.rewards.
/startoutbreak and /stopoutbreak commands
/startoutbreak starts an outbreak as set in MS.Outbreak: players have to kill the configured number of zombies, and once the city is cleared, every player who killed at least one zombie gets the rewards. /stopoutbreak deletes every outbreak zombie, without the clear announcement. The names are MS.Commands.startOutbreak and MS.Commands.stopOutbreak.
/halloweenareas command
Opens the zombie area creator, where admins make and manage the zombie areas in game. A new area starts with the values of MS.Creator.defaults, and the limits of the menu are set in MS.Creator. The rewards an area can pay are the pools of MS.Areas.rewards. The command name is MS.Commands.areas.
Item, pictures, and database
The zombie infection is cured with the usable item set in MS.Settings.item (syringe by default); add it to your inventory as described on the Installation page. Reward pictures load from MS.Images and fall back to frontend/dist/items/<item>.png. The SQL file creates the more_halloween_areas table for the zombie areas, with the Graveyard as the first one, and adds the halloween column to your users (ESX) or players (QBCore) table. Texts come from backend/locale/en.lua and de.lua, selected with MS.Locale.
Last updated