Configuration
This page contains all information you need to configure gfg_drugtables, if you have any questions feel free to reach out to us on our discord
Config
Language
Language sets which Locale to use, you can find available locales in [gfg_drugtables/locale/], we will add more as they become available but feel free to add your own.
Debug
Debug should only used in a development environment
Determines whether to send debug print statements to the client and server when using the script
enhancedDebug
Enhanced Debug should only used in a development environment
Determines whether to send enhanced debug print statements to the client and server when using the script
interactionMethod
Determines the method in which players interact with a table. Currently supported options are: "target", "textui", "3dtext".
interactionDistance
Determines the distance from the table that the interaction is activated.
target
Determines wich target resource to use.
Currently supported options are"
"ox_target"
"qb_target"
inventory
Setting inventory to "custom" will utilize the function in server/sv_customize.lua
Determines wich inventory resource to use.
Currently supported options are:
"ox_inventory"
"qb_inventory"
"custom"
targetWaitTime
1000 is probably fine but if you experience high resource usage you may need to increase this.
Determines the amount of time the client checks for nearby table to create a target for.
In Milliseconds
particleFxWaitTime
30000 is probably fine but if you experience high resource usage you may need to increase this.
Determines the amount of time the client checks for nearby tables that are cooking to make particle effects.
In Milliseconds
placeTableHelpNotification
Determines whether or not to show the help notification when placing a table.
canPlaceTableInWater
Your housing script may place certain shells under the map, in those cases the shell may be registered as "Underwater" if this is the case you may need to set this to false.
Determines if the player can place a table while in or under water.
canPlaceTableOnRoad
May or may not work on all roads.
Determines if the player can place a table on a road
Config.PackTable
This is the configuration section for when the player is placing, and packing the table.
animation
Animation that plays during placing and packing, a list of available animations can be found here (https://alexguirre.github.io/animations-list/).
dict
= Dictionary that is used to determine the animation in the list given above, it would be the bigger text.
anim
= Animation that's is used within the dictionary determined, in the list given above, it would be the smaller text.
skillCheck
Skill Check that is used when the player attempts to place or pack the table.
enable
= Determines whether the skill check will be used or not.
difficulty
= Determines the difficulty of the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
keys
= Determines the keys used during the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
getItemOnFailedPack
If 'true' the player will succeed with the place/pack of the table regardless of the result of the skill check. If 'false' the table will remain if the player fails the skill check.
durabilityLossOnFailedPack
If 'true' the table will experience random durability loss when the player fails the place/pack skill check.
durabilityLossOnFailedPackAmount
Durability Loss can be a float! (00.01 = 100.00)
Determines the amount of durability the table looses when the player fails the place/pack skill check. If you want it to be a static value set the 'min' and 'max' to the same number.
progressBar
Progress Bar that is used when the player is placing or packing the table.
time
= Determines the time it takes for the progress bar to complete (in milliseconds).
cancelable
= Determines if the player can cancel the placing and packing progress bar.
placementKeys
Determines the keys used when placing a table.
place
= This key is used to place the table (Default: Space).
cancel
= This key is used to cancel placement (Default: G).
rotateRight
= This key is used to rotate the table right (Default: Arrow Right).
rotateLeft
= This key is used to rotate the table right (Default: Arrow Left).
rotateSpeed
= This Determines the speed that the table is rotated.
Config.StaticTables
This is the configuration section for static tables, these tables cannot be "packed" and do not have a prop
Static tables are based on "box zones", since you already have ox_lib creating a zone is quite simple, simple type /zone box
and follow the instructions, more information on creating zones can be found here (https://overextended.github.io/docs/ox_lib/Zones/Shared#zone-creation-script).
The 'key' for each static table (in the example sandyMethTable)
needs to be unique.
label
This is the label of the table in menu and for interaction.
type
This is the type of table, needs to match one of the 'type's from Config.DrugTables.
coords
Coordinates of the static table.
size
Size of the static table.
rotation
Rotation of the static table.
Config.DrugTables
This is the configuration section for each type of drug table.
Any values related to durability or temperature can accept floats (number with a decimal place). However more decimal places the float has, the higher the likelihood that issues could arise. We recommend to never go more than 2 decimal places (1.25).
name
Determines the tables "Name" when opening the menu (i.e. "Meth Table 1"), Can be whatever you choose and does not have to be unique.
type
type needs to be unique, two or more tables CANNOT share the same type.
The table type, usually set to a lowercase version of the name.
tableItem
multiple tables CANNOT share the same table item.
The inventory item that represents this table type.
prop
The name of the prop that is used for this table type, more props can be found here (https://forge.plebmasters.de/objects).
animation
Animation that plays during the start of the cook and during collection, a list of available animations can be found here (https://alexguirre.github.io/animations-list/).
dict
= Dictionary that is used to determine the animation in the list given above, it would be the bigger text.
anim
= Animation thats is used within the dictionary determined, in the list given above, it would be the smaller text.
itemsNeeded
Determines the items needed in order for the player to start the cook at this type of table.
These tables need to be 'keyed' meaning they follow the given format:
[number] = {name = 'name', amount = number},
name
= the item name within your inventory system.
amount
= the amount of that item the player needs to have on them.
skillCheck
Skill Check that is used when the player attempts to start the cook.
enable
= Determines whether the skill check will be used or not.
difficulty
= Determines the difficulty of the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
keys
= Determines the keys used during the skill check, information on how to customize this can be found here (https://overextended.github.io/docs/ox_lib/Interface/Client/skillcheck).
loseIngredientsOnFail
= If 'true' the player loses all the ingredients when they fail the skill check. If 'false' they get the items back.
durabilityLossOnFail
= Determines if the table looses durability when the player fails the cooking skillcheck.
durabilityLossOnFail.enable
= Set to 'true' to enable, 'false' to disable.
durabilityLossOnFail.min
= Determines the minimum amount of durability to be lost.
durabilityLossOnFail.max
= Determines the maximum amount of durability to be lost.
progressBar
Progress Bar that is used when the player is starting a cook.
enable
= if 'true' the progress bar will play before the cook is started.
time
= Determines the time it takes for the progress bar to complete (in milliseconds).
collectProgressBar
Progress Bar that is used when the player is collecting the reward after cooking.
enable
= if 'true' the progress bar will play before the cook is started.
time
= Determines the time it takes for the progress bar to complete (in milliseconds).
cookTime
Determines how long it takes for a cook to finish on a table of this type
(in Minutes, minimum is 1).
cookReward
Determines what they player gets when the cook is finished and he collects it from the table. Can be multiple items (can receive byproducts from production).
These tables need to bey 'keyed' meaning they follow the given format:
[number] = {name = 'name', amount = number},
name
= the item name within your inventory system.
amount
= the amount of that item the player receives.
cookingTempRise
Determines the temperature rise while the table is cooking.
enable
= if 'true' the temp will rise while the table is cooking.
min
= Determines the minimum amount to rise the temperature every tick (1 Minute).
max
= Determines the maximum amount to rise the temperature every tick (1 Minute).
tempDurabilityDecay
Durability Decay while the temp is over 82.0
enable
= if 'true' the durability will reduce while the temp is over 82.0.
min
= Determines the minimum amount to reduce the durability every tick (1 Minute).
max
= Determines the maximum amount to reduce the durability every tick (1 Minute).
cooling
Ways to cool the table and reduce temperature.
waterUses a water item for a one time reduction in temp
enable
= If set to 'true' enables the use of water.
item
= The name of the item used to pour water on the table.
amount
= The amount to reduce the temperature when used. (Random betweenmin
andmax
)
progressBar.enable
= If set to 'true' turns the progress bar on.
progressBar.time
= Determines the amount of time the progress bar will take (in Milliseconds).
fanUses a fan item for a steady reduction in temperature every tick (1 Minute).
enable
= If set to 'true' enables the player to install a fan.
prop
= Determines the in-game prop to spawn when a fan is installed.
item
= The name of the item used to install the fan to the table.
amount
= The amount to reduce the temperature every tick (1 Minute). (Random betweenmin
andmax
)
offset
= The prop offset compared to the table. (If using the default props, no need to change this.)
rotation
= The prop rotation compared to the table. (If using the default props, no need to change this.)
progressBar.enable
= If set to 'true' turns the progress bar on.
progressBar.time
= Determines the amount of time the progress bar will take (in Milliseconds).
Both
ambientTempDecay
Reduces temperature while the table is not cooking, until it reaches ambient (22.0)
enable
= if 'true' the temp will reduce while the table is not cooking.
min
= Determines the minimum amount to reduce the temperature every tick (1 Minute).
max
= Determines the maximum amount to reduce the temperature every tick (1 Minute).
durabilityDecay
If enabled this removes the random amount of durability from the table while cooking every 1 minute.
Determines if the table loses durability while cooking.
enable
= Set to 'true' to enable, 'false' to disable.
min
= Determines the minimum amount of durability to be lost.
max
= Determines the maximum amount of durability to be lost.
particleEffects
While this section can take as many particle effects as you like, too many may cause performance issues.
Particle effects the table produces while cooking.
A list of available particle effects can be found here. (https://vespura.com/fivem/particle-list/)
enable
= If set to 'true' enables the particle effect.
dict
= Determines the particle effect dictionary.
effect
= Determines the effect to be played.
scale
= Determines the effect scale.
offset
= Determines the where to play the effect relative to the table.
alpha
= Determines the alpha of the effect (transparency).
durabilityExplosion
This section can take explosion as well as particle effects, refer to the particleEffects
section for help when using effects.
Explosions and particle effects to play when the table is cooking AND durability reaches 0.
Information on explosion types can be found here:
(https://docs.fivem.net/natives/?_0xE3AD2BDBAEE269AC)
type
= Determines the effect type, can be 'explosion' or 'effect'.
enable
= If set to 'true' the explosion will be used.
explosion
= Determines which explosion type will be used. (See link above)
noDamage
= If set to 'true', no damage will result from the explosion (to players or vehicles etc.)
damageScale
= Sets the Damage scale of the explosion.
audible
= If set to 'true' the explosion will be audible (heard).
invisible
= If set to 'true' the explosion will be invisible (But still give damage).
cameraShake
= Determines the amount of camera shake players nearby experience.
Example Config
This is an example config to show you the layout, the values here are not meant for production.
Last updated