ESX TO QBUS!
--------------------------------------------------------------------------------------------------
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(amount)
end
end)
QBCore = nil
Citizen.CreateThread(function()
while QBCore == nil do
TriggerEvent('QBCore:GetObject', function(obj) QBCore = obj end)
Citizen.Wait(amount)
end
end)
--------------------------------------------------------------------------------------------------
RegisterNetEvent('esx
layerLoaded')
AddEventHandler('esx
layerLoaded')
RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
AddEventHandler('QBCore:Client:OnPlayerLoaded')
--------------------------------------------------------------------------------------------------
local xPlayer = ESX.GetPlayerFromId(source)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
--------------------------------------------------------------------------------------------------
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob')
RegisterNetEvent('QBCore:Client:OnJobUpdate')
AddEventHandler('QBCore:Client:OnJobUpdate')
--------------------------------------------------------------------------------------------------
DrawText3D(1, 1, 1, 'something')
QBCore.Functions.DrawText3D(1, 1, 1, 'something')
--------------------------------------------------------------------------------------------------
xPlayer.getInventoryItem
xPlayer.Functions.GetItemByName
--------------------------------------------------------------------------------------------------
xPlayer.removeInventoryItem
xPlayer.Functions.RemoveItem
--------------------------------------------------------------------------------------------------
xPlayer.addInventoryItem
xPlayer.Functions.AddItem
--------------------------------------------------------------------------------------------------
ESX.GetPlayerFromId(src)
QBCore.Functions.GetPlayer(src)
--------------------------------------------------------------------------------------------------
ESX.Game.SpawnVehicle()
ESX.Game.GetVehicleProperties()
ESX.Game.GetClosestVehicle()
QBCore.Functions.SpawnVehicle()
QBCore.Functions.GetVehicleProperties()
QBCore.Functions.GetClosestVehicle()
--------------------------------------------------------------------------------------------------
ESX.GetPlayerData()
QBCore.Functions.GetPlayerData()
--------------------------------------------------------------------------------------------------
ESX.RegisterUsableItem()
QBCore.Functions.CreateUseableItem()