mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-19 07:16:03 +01:00
condense
This commit is contained in:
@@ -58,6 +58,9 @@ RegisterNetEvent('jim-payments:client:Charge', function(data, outside)
|
|||||||
--Check if player is using /cashregister command
|
--Check if player is using /cashregister command
|
||||||
if not outside and not onDuty and data.gang == nil then triggerNotify(nil, Loc[Config.Lan].error["not_onduty"], "error") return end
|
if not outside and not onDuty and data.gang == nil then triggerNotify(nil, Loc[Config.Lan].error["not_onduty"], "error") return end
|
||||||
local newinputs = {} -- Begin qb-input creation here.
|
local newinputs = {} -- Begin qb-input creation here.
|
||||||
|
if Config.Usebzzz then
|
||||||
|
TriggerEvent('animations:client:EmoteCommandStart', {'terminal'})
|
||||||
|
end
|
||||||
if Config.List then -- If nearby player list is wanted:
|
if Config.List then -- If nearby player list is wanted:
|
||||||
--Retrieve a list of nearby players from server
|
--Retrieve a list of nearby players from server
|
||||||
local p = promise.new() QBCore.Functions.TriggerCallback('jim-payments:MakePlayerList', function(cb) p:resolve(cb) end)
|
local p = promise.new() QBCore.Functions.TriggerCallback('jim-payments:MakePlayerList', function(cb) p:resolve(cb) end)
|
||||||
@@ -189,7 +192,3 @@ AddEventHandler('onResourceStop', function(r) if r ~= GetCurrentResourceName() t
|
|||||||
for i = 1, #Till do DeleteEntity(Till[i]) end
|
for i = 1, #Till do DeleteEntity(Till[i]) end
|
||||||
unloadModel(GetEntityModel(BankPed)) DeletePed(BankPed)
|
unloadModel(GetEntityModel(BankPed)) DeletePed(BankPed)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
RegisterNetEvent('terminal', function()
|
|
||||||
TriggerEvent('animations:client:EmoteCommandStart', {'terminal'})
|
|
||||||
end)
|
|
||||||
@@ -258,8 +258,6 @@ end)
|
|||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
if Config.Usebzzz then
|
if Config.Usebzzz then
|
||||||
QBCore.Functions.CreateUseableItem('terminal', function(source, item)
|
QBCore.Functions.CreateUseableItem('terminal', function(source, item)
|
||||||
local src = source
|
|
||||||
TriggerClientEvent('terminal', src)
|
|
||||||
TriggerClientEvent("jim-payments:client:Charge", source, {}, true)
|
TriggerClientEvent("jim-payments:client:Charge", source, {}, true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user