📃
Docs
  • 👋Welcome
  • 🌉Bridge
    • 💾Installation
    • 🌐Compatibility
    • 👨Client exports
      • ⏩Framework
        • getName
        • getJob
        • TriggerServerCallback
        • getSex
      • 🎒Inventory
        • getItemCount
      • 👁️Target
    • 🖥️Server exports
      • 🗃️Database
        • getUserData
        • getVehicleData
      • 🎒Inventory
        • openInventory
        • addItem
        • removeItem
        • canCarryItem
        • getItemCount
        • registerStash
        • setDurability
      • ⏩Framework
        • getPlayerFromId
        • getPlayerFromIdentifier
        • getIdentifier
        • RegisterServerCallback
        • getSource
        • getName
        • getJob
        • getAllPlayers
        • setJob
        • doesJobExist
        • getCoords
        • getJobs
  • 🔫Organization Panel
    • 📝Configuration
    • 💾Installation
    • 🗃️Framework integration
      • 💼ESX
        • 🚪ox_doorlock usage
      • 💼QBCore
        • 🚪ox_doorlock usage
      • 💼Other framework
    • 💻Server
      • Server exports
      • Server events
    • 👨Client
      • Client exports
  • ♣️Bossmenu
    • 📝Configuration
    • 💾Installation
    • 📖Framework integration
      • 🖼️ESX
      • 🖼️QBCore & QBOX
      • 🖼️Other Framework
    • 🖥️Server
      • 🔁Events
      • 🔃Exports
    • 👨Client
      • 🔁Events
      • 🔃Exports
  • 🕺Adjust Animation
    • 🗒️Configuration
    • 💾Installation
    • 📚Other scripts integration
      • 💃scully_emotemenu
      • 💃rpemotes
      • 💃other
  • 👮Police MDT
    • 🚀Install & Setup Guide
    • 📝Configuration
    • 📖Framework integration
      • 🖼️ESX
      • 🖼️QBOX/QB-Core
      • 🖼️Other Framework
    • 🚨wk_wars_2x Integration
    • 📚Exports
      • 🔃Server
      • 👨Client
  • 👨‍💼DOJ MDT
    • 🚀Install & Setup Guide
    • 📝Configuration
    • 📚Exports
      • 👨Client
  • 🩺EMS MDT
    • 🚀Install & Setup Guide
    • 📝Configuration
    • 📚Exports
      • 🔃Server
      • 👨Client
Powered by GitBook
On this page

Was this helpful?

  1. Organization Panel
  2. Framework integration

QBCore

For the organization panel to work properly with QBCore, you must follow these steps:

  1. Go to /config/config_s.lua and find Config.Queries

  2. Replace it with this:

Config.Queries = {
    ['identifierbyssn'] = 'SELECT citizenid FROM players WHERE ssn = @ssn',
    ['namebyidentifier'] = 'SELECT charinfo FROM players WHERE citizenid = @identifier',
    ['nameandjoindate'] = [[
        SELECT JSON_UNQUOTE(JSON_EXTRACT(p.charinfo, '$.firstname')) AS firstname,
               JSON_UNQUOTE(JSON_EXTRACT(p.charinfo, '$.lastname')) AS lastname,
               om.join_date 
        FROM organization_members om
        JOIN players p ON om.user_id = p.citizenid
        WHERE om.org_id = @org_id
    ]],
    ['members'] = [[
        SELECT om.user_id, om.permissions, om.join_date,
               JSON_UNQUOTE(JSON_EXTRACT(u.charinfo, '$.firstname')) AS firstname,
               JSON_UNQUOTE(JSON_EXTRACT(u.charinfo, '$.lastname')) AS lastname,
               om.rank,
               CASE WHEN o.owner_id = om.user_id THEN TRUE ELSE FALSE END AS isOwner
        FROM organization_members om
        INNER JOIN players u ON u.citizenid = om.user_id
        LEFT JOIN organizations o ON o.id = om.org_id
        WHERE om.org_id = @org_id
    ]],
    ['transactions'] = [[
        SELECT ot.*, 
               JSON_UNQUOTE(JSON_EXTRACT(u.charinfo, '$.firstname')) AS firstname,
               JSON_UNQUOTE(JSON_EXTRACT(u.charinfo, '$.lastname')) AS lastname
        FROM organization_transactions ot
        LEFT JOIN players u ON u.citizenid = ot.user_id
        WHERE ot.org_id = @org_id ORDER BY ot.date DESC LIMIT 30
    ]]
}
  1. Restart the script via restart pp-orgpanel

  2. Now everything should work properly

Previousox_doorlock usageNextox_doorlock usage

Was this helpful?

🔫
🗃️
💼