Merge pull request #31 from UwUway/main

add bzz terminal support and command disabling
This commit is contained in:
Jim Shield
2023-11-08 21:31:14 +00:00
committed by GitHub
5 changed files with 38 additions and 2 deletions

View File

@@ -35,6 +35,15 @@ ensure [vehicles]
ensure [jim]
```
---
## BZZ Terminal Instructions
Free Package https://bzzz.tebex.io/package/5551076
Stream the prop and add the emote that is provided to rpemotes or dpemotes
```lua
['terminal'] = {['name'] = 'terminal', ['label'] = 'Wireless Terminal', ['weight'] = 5000, ["type"] = "item", ["image"] = 'terminal.png', ['unique'] = true, ['useable'] = true, ["shouldClose"] = true, ["combinable"] = nil, ['description'] = ''},
```
---
## Item installation
- To make use of the ticket reward system for workers you need to add the ticket item to your shared items lua

View File

@@ -95,6 +95,9 @@ RegisterNetEvent('jim-payments:client:Charge', function(data, outside)
if not dialog.citizen or not dialog.price then return end
TriggerServerEvent('jim-payments:server:Charge', dialog.citizen, dialog.price, dialog.billtype, data.img, outside, gang)
end
if config.Usebzzz then
ExecuteCommand("e c")
end
end)
RegisterNetEvent('jim-payments:client:PolCharge', function()
@@ -186,3 +189,7 @@ AddEventHandler('onResourceStop', function(r) if r ~= GetCurrentResourceName() t
for i = 1, #Till do DeleteEntity(Till[i]) end
unloadModel(GetEntityModel(BankPed)) DeletePed(BankPed)
end)
RegisterNetEvent('terminal', function()
TriggerEvent('animations:client:EmoteCommandStart', {'terminal'})
end)

View File

@@ -38,6 +38,9 @@ Config = {
`U_F_M_CasinoShop_01`,
},
usebzzz = false, -- enable if you're using the prop from bzzz
Enablecommand = true, -- Enables the cashregister command
PhoneBank = false, -- Set this to false to use the popup payment system FOR CARD/BANK PAYMENTS instead of using phone invoices
-- This doesn't affect Cash payments as they by default use confirmation now
-- This is helpful for phones that don't support invoices well

View File

@@ -1,6 +1,6 @@
name "Jim-Payments"
author "Jimathy"
version "v2.8.5"
version "v2.8.6"
description "Payment Script By Jimathy"
fx_version "cerulean"
game "gta5"

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)