forked from Simnation/Main
neue sachen
This commit is contained in:
parent
e542e77789
commit
b992cdcfef
119 changed files with 5522 additions and 0 deletions
44
resources/[test]/qs-weed/server/custom/framework/qbx.lua
Normal file
44
resources/[test]/qs-weed/server/custom/framework/qbx.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
if Config.Framework ~= 'qbx' then
|
||||
return
|
||||
end
|
||||
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent('QBCore:Server:OnPlayerLoaded', function()
|
||||
local src = source
|
||||
CreateQuests(src)
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
for k, v in pairs(QBCore.Functions.GetPlayers()) do
|
||||
if v then
|
||||
Debug('Loaded player:', v)
|
||||
CreateQuests(v)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function RegisterServerCallback(name, cb)
|
||||
QBCore.Functions.CreateCallback(name, cb)
|
||||
end
|
||||
|
||||
function RegisterUsableItem(name, cb)
|
||||
exports.qbx_core:CreateUseableItem(name, cb)
|
||||
end
|
||||
|
||||
function GetPlayerFromId(source)
|
||||
return exports.qbx_core:GetPlayer(source)
|
||||
end
|
||||
|
||||
function GetItem(player, item)
|
||||
local data = exports.ox_inventory:GetItem(player.PlayerData.source, item, nil, false)
|
||||
return data
|
||||
end
|
||||
|
||||
function AddItem(source, item, count)
|
||||
exports.ox_inventory:AddItem(source, item, count)
|
||||
end
|
||||
|
||||
function RemoveItem(source, item, count)
|
||||
exports.ox_inventory:RemoveItem(source, item, count)
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue