add support for bzzs terminal and disabling the command in config

This commit is contained in:
Stitch
2023-11-08 13:23:06 -08:00
parent c967159d2b
commit 16515eceea
5 changed files with 38 additions and 7 deletions

View File

@@ -13,7 +13,13 @@ AddEventHandler('onResourceStart', function(resource) if GetCurrentResourceName(
end
end)
QBCore.Commands.Add("cashregister", Loc[Config.Lan].command["cash_reg"], {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, {}, true) end)
CreateThread(function()
if Config.Enablecommand then
QBCore.Commands.Add("cashregister", Loc[Config.Lan].command["cash_reg"], {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, {}, true) end)
end
end)
QBCore.Commands.Add("polcharge", Loc[Config.Lan].command["charge"], {}, false, function(source) TriggerClientEvent("jim-payments:client:PolCharge", source) end)
RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller, gang)
@@ -247,3 +253,14 @@ QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source,
end
cb(onlineList)
end)
CreateThread(function()
if Config.Usebzzz then
QBCore.Functions.CreateUseableItem('terminal', function(source, item)
local src = source
TriggerClientEvent('terminal', src)
TriggerClientEvent("jim-payments:client:Charge", source, {}, true)
end)
end
end)