RAHE Development
  • Welcome
  • General information
  • Common questions
  • OUR SCRIPTS
    • đŸŽī¸Racing
      • đŸ–Ĩī¸Installation
      • âš™ī¸Integration
      • â‰ī¸Common issues
      • ❔Common questions
      • â„šī¸Race types explained
    • 🚙Drifting
      • đŸ–Ĩī¸Installation
      • âš™ī¸Integration
    • 🚔Boosting
      • đŸ’ģInstallation
      • âš™ī¸Integration
      • ❔Common questions
      • â‰ī¸Common issues
    • đŸ“ģSpeakers
      • đŸ–Ĩī¸Installation
      • âš™ī¸Integration
      • ❔Common questions
    • đŸ’ģTablet
      • đŸ–Ĩī¸Installation
      • âš™ī¸Integration
Powered by GitBook
On this page
  1. OUR SCRIPTS
  2. Drifting

Integration

Information about how to integrate our drifting system with your server's resources.

PreviousInstallationNextBoosting

Last updated 2 years ago

Item creation

If you wish to use an item (instead of the default command that comes with the resource).

Add the following line to qb-core/shared/items.lua

['driftingtablet'] = { ['name'] = 'driftingtablet', ['label'] = 'Dritfting tablet', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'driftingtablet.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Seems like something to do with cars.' },

Add the following image file as qb-inventory/html/images/driftingtablet.png

Add this section to the end of rahe-drifting/api/server.lua

QBCore.Functions.CreateUseableItem('driftingtablet', function(source, item)
    TriggerClientEvent('rahe-drifting:client:openTablet', source)
end)

Add this section to ox_inventory/data/items.lua

['driftingtablet'] = {
    label = 'Drifting tablet',
    weight = 500,
    description = 'Seems like something to do with cars.',
    stack = false,
    client = {
        export = 'rahe-drifting.driftingtablet',
    }
},

Add the following image file as ox_inventory/web/images/driftingtablet.png

Add this section to the end of rahe-drifting/api/client.lua

exports('driftingtablet', function(data, slot)
    openTablet()
end)

Create the item in your inventory system. Trigger the following client-side events:

  • Event rahe-drifting:client:openTablet on tablet item use.

🚙
âš™ī¸
racingtablet.png