okokDocs
  • About Us
  • Scripts
    • okokVehicleControl
      • Config file
    • okokMechanicJob
      • Config file
    • okokPoliceJob
      • Config file
      • qb-inventory support
    • okokBossMenu
      • Config file
    • okokMulticharacter
      • Config file
    • okokPhone
    • okokSpawnSelector
      • Config file
      • qb-multicharacter support
    • okokLoadingScreen
      • Config file
    • okokVehicleSales
      • Config file
    • okokShop
      • Config file
    • okokGasStation
      • Config file
    • okokTuning
      • Config file
    • okokGarage
      • Config file
      • RGB vehicle colors
      • Inventories metadata
      • Housing integrations
      • qb-phone support
    • okokVehicleShop
      • Config file
      • Common errors
    • okokBanking
      • Config file
      • Paycheck transactions
      • Registering transactions
    • okokMarketplace
      • Config file
      • Common errors
    • okokChat
      • Config file
      • Export
    • okokBilling
      • Config file
      • Snippets
    • okokCrafting
      • Config file
    • okokContract
      • Config file
    • okokTalkToNPC
      • Config file
    • okokReports
      • Config file
    • okokNotify
      • Config file
      • Snippets
    • okokTextUI
      • Config file
      • Snippets
    • okokRequests
    • okokDeleteVehicles
      • Config file
  • Others
    • Discord Webhook
Powered by GitBook
On this page
  • Installation Guide
  • Important
  • Adding images to the items
  • SetLevel Export
  • Server artifacts
  1. Scripts

okokCrafting

PreviousSnippetsNextConfig file

Last updated 11 months ago

Installation Guide

Execute the following SQL code in your database:

In case you had the previous okokCrafting version (both ESX & QBCore) execute the code below, otherwise ignore it.

ALTER TABLE users DROP COLUMN xp;

ESX

ALTER TABLE users ADD COLUMN xp LONGTEXT NULL;
ALTER TABLE users ADD COLUMN okokcrafts LONGTEXT NULL;

QBCore

ALTER TABLE players ADD COLUMN xp LONGTEXT NULL;
ALTER TABLE players ADD COLUMN okokcrafts LONGTEXT NULL;

Important

The tableID field on the config file is used to create the crafting buttons, so make sure you ALWAYS set a different ID for each table.

Adding images to the items

To add images to the items simply drop them in okokCrafting/web/icons.

  • The images should be in the PNG format;

  • The image name should be the same as the item ID, if the item ID is "bread", then the image should be "bread.png".

SetLevel Export

exports['okokCrafting']:SetLevel(target, level, workbenchID)

If you have Config.SameLevelForAllTables set to true then you don't need to set the workbenchID.

Server artifacts

Make sure your server artifacts version is above the 5181.

Windows:

Linux:

YouTube Video
https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/