Using PEFCL (Project Error Financial) you can send the invoice directly to the bank where you will need to pay it or after the time it will attempt to keep paying it until it is settled!
Bank:createInvoice(src, { to = PlayerName, -- {this is PLAYERS name} toIdentifier = target.identifier, -- {the Target Players ID} from = OfficerName, -- {this is YOUR name} fromIdentifier = xPlayer.identifier, -- {YOUR ID} amount = amount, -- {Amount sent from Client} message = reason, --{ Reason Sent from Client} receiverAccountIdentifier = xPlayer.identifier {-- if you dont want personal rewards for tickets put this as { Job } and it will send the money to the job not player!}
})
Tickets are sent to Officer and to an Inventory created to store these!
Tickets can be handed over to Player if you choose to do that or kept for records. There is already a Records system built in that will help you keep track of who does what ticket. This helps if you do something like a quota or bonuses for doing more tickets. As long as officer puts their name they will have a good recording.
local info = { amount = amount, PlayerName = PlayerName, OfficerName = OfficerName, date = date}if Inventory:CanCarryItem(src, 'ticket', 1) then-- if officer can carry ticket Inventory:AddItem(src, 'ticket', 1, info ) -- add itemelse-- else if not can carry Inventory:AddItem('police_tickets', 'ticket', 1, info) -- add item to storageendInventory:AddItem('police_tickets', 'ticket', 1, info) -- ALWAYS add a copy to storage
Webhooks are set up for admin to monitor who does what with the tickets. Easier to maintain
On Server sided lua there is a part for your WebHook! Server side is also where you can check the invoice to decide if you want pd or the person sending the ticket to get the money. There are notes in there to make sure you understand what is happening there!
local Discord_url ='' -- server side to protect your webhookslocalfunctionLetEmKnow(message,footer)local embed = { { ["color"] =3085967, ["title"] ="**Sick Ticket System**", ["description"] = message, ["footer"] = { ["text"] ='New Ticket', }, ["author"] = { ["name"] ='Made by | SickJuggalo666', ['icon_url'] ='https://i.imgur.com/arJnggZ.png' } } } PerformHttpRequest(Discord_url, function(err, text, headers) end, 'POST', json.encode({username = "Sick Ticket System", embeds = embed}), { ['Content-Type'] = 'application/json' })
end
This is where the other copy goes AUTOMATICALLY after creation