mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
Add toggles for bossmenu/management + nearbylist
This commit is contained in:
@@ -21,6 +21,7 @@ RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller)
|
||||
if Player.PlayerData.citizenid == data.senderCitizenId then biller = Player end
|
||||
end
|
||||
end
|
||||
-- If ticket system enabled, do this
|
||||
if Config.TicketSystem then
|
||||
if data.amount >= Config.Jobs[data.society].MinAmountforTicket then
|
||||
for k, v in pairs(QBCore.Functions.GetPlayers()) do
|
||||
@@ -113,9 +114,9 @@ RegisterServerEvent("jim-payments:server:PayPopup", function(data)
|
||||
local biller = QBCore.Functions.GetPlayer(tonumber(data.biller))
|
||||
local newdata = { senderCitizenId = biller.PlayerData.citizenid, society = biller.PlayerData.job.name, amount = data.amount }
|
||||
if data.accept == true then
|
||||
billed.Functions.RemoveMoney(tostring(data.billtype), data.amount)
|
||||
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount)
|
||||
--TriggerEvent("qb-bossmenu:server:addAccountMoney", tostring(biller.PlayerData.job.name), data.amount)
|
||||
billed.Functions.RemoveMoney(tostring(data.billtype), data.amount)
|
||||
if Config.Manage then exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount)
|
||||
else TriggerEvent("qb-bossmenu:server:addAccountMoney", tostring(biller.PlayerData.job.name), data.amount) end
|
||||
TriggerEvent('jim-payments:Tickets:Give', newdata, biller)
|
||||
TriggerClientEvent("QBCore:Notify", data.biller, billed.PlayerData.charinfo.firstname.." accepted the payment", "success")
|
||||
elseif data.accept == false then
|
||||
@@ -131,4 +132,4 @@ QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source,
|
||||
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
|
||||
end
|
||||
cb(onlineList)
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user