diff --git a/README.md b/README.md index 5beac14..fe7a56e 100644 --- a/README.md +++ b/README.md @@ -45,14 +45,19 @@ If you enable Config.General.Usebzzz then the script will use `bzzz_terminal` to - `/cashregister` - `/terminal` -This payment terminal is available as a Free Package from https://bzzz.tebex.io/package/5551076 +This is also available as an item users can use by adding this to your shared items +```lua +terminal = { name = 'terminal', label = 'Wireless Terminal', weight = 5000, ["type"] = "item", ["image"] = 'terminal.png', unique = true, useable = true, ["shouldClose"] = true, ["combinable"] = nil, description = '' }, +``` + +This payment terminal prop is available as a Free Package from https://bzzz.tebex.io/package/5551076 --- ## Item installation - To make use of the ticket reward system for workers you need to add the ticket item to your shared items lua - Naviage to `[qb] > qb-core / shared / items.lua` and add this line ```lua - payticket = { name = "payticket", label = "Receipt", weight = 10, type = "item", image = "ticket.png", unique = false, useable = false, shouldClose = false, description = "Cash these in at the bank!" }, +payticket = { name = "payticket", label = "Receipt", weight = 10, type = "item", image = "ticket.png", unique = false, useable = false, shouldClose = false, description = "Cash these in at the bank!" }, ``` - Add the ticket image to your inventory script: diff --git a/images/terminal.png b/images/terminal.png new file mode 100644 index 0000000..51f15ad Binary files /dev/null and b/images/terminal.png differ diff --git a/server/chargerserver.lua b/server/chargerserver.lua index 0a5dade..69cb6d5 100644 --- a/server/chargerserver.lua +++ b/server/chargerserver.lua @@ -19,6 +19,12 @@ onResourceStart(function() }) end + if Items["terminal"] then + createUseableItem("terminal", function(source, item) + TriggerClientEvent(getScript()..":client:Charge", source, {}, true) + end) + end + createCallback(getScript()..":MakePlayerList", function(source) local onlineList = {} for _, v in pairs(GetPlayers()) do