JPResources Documentation
  • 👋Welcome to JPResources
  • Installation
    • 📲Phone System
      • Installation Page
        • QBCore
        • QBox
        • ESX
        • VRPex
      • Config File
      • Events & Commands
      • Custom APPs
      • Translations
      • Common Problems
      • Installation Video
    • 🏡Housing System
      • Installation Page
        • QBCore
        • QBox
        • ESX
      • Events & Commands
      • How to add MLO House
      • How to add SHELL Tier
      • Translations
      • Common Problems
    • 🎰Casino System
      • How to install
        • ESX
        • QBCore
        • QBox
      • Translations
      • Common Issues
    • 🚨MDT System
      • How to install
      • Events & Commands
      • Translations
    • 🏥EMS MDT System
      • How to install
      • Events & Commands
      • Translations
    • 🎒Inventory
      • How to install
      • Events & Commands
      • Translations
      • Common Issues
    • 🚘Vehicle Shops
      • Installation Page
        • QBCore
        • Qbox
        • ESX
      • Translations
    • 💰Business System
      • Installation Page
        • QBCore
        • Qbox
        • ESX
      • Translations
    • 💼Job System
      • Installation Page
        • QBCore
        • QBox
        • ESX
      • Translations
    • 📱Budget Phone
      • QBCore
    • ⚙️Crew System
      • QBCore
    • 👚Clothing System
      • QBCore
    • 🏢Garage System
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 👪Multichar
      • Installation Page
        • QBCore
        • ESX
    • 🔪Territories
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 🎒Backpack
      • QBCore
    • 💴Moneywash
      • Installation Page
        • QBCore
        • QBox
        • ESX
    • 🌊Poolcleaner Job
      • Installation Page
    • 🚗TDi Smoke
      • Installation Page
  • Support / Store
    • 🛠️Where i can find support and buy new scripts
    • 🛠️FiveM asset escrow errors
Powered by GitBook
On this page
  • Download Resource
  • Dependencies Part
  • Stash Logs Part:
  • Stash Images
  • Level system triggers
  • Sync with garage script
  • To be compatible with IlleniumAppearance
  • SQL
  • Config.lua
  1. Installation
  2. Crew System

QBCore

Installation guide

PreviousCrew SystemNextClothing System

Last updated 9 months ago

Download Resource

You will receive the script in profile, after this click in blue "download" button.

After download, put the script in your server files.

Remeber:

You need to be logged with the same cfx.re account you used to buy in my tebex store.

Dependencies Part

  • or or

  • Any garage script who uses (player_vehicles)

Download all the scripts by clicking on their respective names, put them in the server files and start server.cfg

Stash Logs Part:

Open your inventory - server - main.lua Line 598 and add this under:

local src = source
local Player = QBCore.Functions.GetPlayer(src)
local nomejogador = Player.PlayerData.charinfo.firstname.." "..Player.PlayerData.charinfo.lastname
TriggerEvent("jpr-crewsystem:server:adicionarlog", "The item: <b>"..ItemData.label.."</b> has add by: <b>"..nomejogador.."</b> count: <b>"..amount.."x</b>","1", src)

Line 667 and add this under:


local src = source
local Player = QBCore.Functions.GetPlayer(src)
local ItemData = QBCore.Shared.Items[itemName]

local nomejogador = Player.PlayerData.charinfo.firstname.." "..Player.PlayerData.charinfo.lastname
TriggerEvent("jpr-crewsystem:server:adicionarlog", "The item: <b>"..ItemData.label.."</b> has taken by: <b>"..nomejogador.."</b> count: <b>"..amount.."x</b>","0", src)

If you skip this you will not have stash logs working

If you have jpr-inventory you can skip this

Stash Images

To add stash images open: jpr-crewsystem - html - img - items

Here you can add your own images to your items

Level system triggers

To incorporate level system with your custom scripts follow this steps: To remove level: TriggerServerEvent("jpr-crewsystem:server:tirarnivel", here put crew name, here amount of xp to remove) To add level: TriggerServerEvent("jpr-crewsystem:server:darnivel", here put crew name, here amount of xp to add)

Sync with garage script

This step serves to synchronize the vehicles taken from the garage with the vehicles taken from the crew system garage, i will do a example with qb-garages:

Qb-Garages / server / main.lua Find: qb-garage:server:spawnvehicle

Add this inside the callback: TriggerEvent("jpr-crewsystem:server:atualizargaragemcrew", plate, veh) In the end of file, add this little code: RegisterServerEvent('jpr-crewsystem:server:atualizargaragem') AddEventHandler('jpr-crewsystem:server:atualizargaragem', function(plate, veh) if (plate ~= nil and veh ~= nil) then local netId = NetworkGetNetworkIdFromEntity(veh) OutsideVehicles[plate] = {netID = netId, entity = veh} end end)

JPR - Garages buyers can skip this.

This is optional for those who want only one same vehicle running on the server, otherwise you can skip it.

To be compatible with IlleniumAppearance

Open config.lua and set Config.UseIlleniumAppearance = true

Open IlleniumAppearance resource / server / database / playeroutfits and find:

function Database.PlayerOutfits.Add(citizenID, outfitName, model, components, props)
   return MySQL.insert.await("INSERT INTO player_outfits (citizenid, outfitname, model, components, props) VALUES (?, ?, ?, ?, ?)", {
        citizenID,
        outfitName,
        model,
        components,
        props
    })
end

Replace to:

local QBCore                  = exports[----- HERE PUT YOUR CORE NAME ----]:GetCoreObject()
function Database.PlayerOutfits.Add(citizenID, outfitName, model, components, props)
   return MySQL.insert.await("INSERT INTO player_outfits (citizenid, outfitname, model, components, props, outfitId) VALUES (?, ?, ?, ?, ?, ?)", {
        citizenID,
        outfitName,
        model,
        components,
        props,
	"outfit-"..QBCore.Shared.RandomInt(1).."-"..QBCore.Shared.RandomInt(6),
    })
end

SQL

Only need to execute SQL file attached to crewsystem folder.

This is mandatory to avoid errors

Config.lua

Setup all config.lua to your needs, read all comments in green color to be more easier.

You are good to go! Any question open a ticket in my discord server.

⚙️
keymaster.fivem.net
qb-clothing
jpr-clothestore
illenium-appearance
qb-core