Unify cashregister and terminal commands

This makes `/cashregister` and `/terminal` the same, since they were already.

(I kept both as not to confuse people if one went missing)

`/terminal` originally was added to make use of the `bzzz_terminal` prop and anim, but now it works with both commands if enabled in the config
This commit is contained in:
Jim Shield
2025-05-19 15:04:28 +01:00
parent 9eb2e987d4
commit 6ab839e2a3
3 changed files with 21 additions and 14 deletions

View File

@@ -10,12 +10,14 @@ onResourceStart(function()
debugPrint("^1Error^7: ^2Unable to find ^7'^3payticket^7' ^2item it in the Shared^7")
end
registerCommand("cashregister", {
locale("command", "cash_reg"), {}, false,
function(source)
TriggerClientEvent(getScript()..":client:Charge", source, {}, true)
end
})
for _, v in pairs({"cashregister", "terminal"}) do
registerCommand(v, {
locale("command", "cash_reg"), {}, false,
function(source)
TriggerClientEvent(getScript()..":client:Charge", source, {}, true)
end
})
end
createCallback(getScript()..":MakePlayerList", function(source)
local onlineList = {}
@@ -29,12 +31,6 @@ onResourceStart(function()
return onlineList
end)
if Config.General.Usebzzz then
createUseableItem('terminal', function(source, item)
TriggerClientEvent(getScript()..":client:Charge", source, {}, true)
end)
end
end, true)
RegisterServerEvent(getScript()..":server:Charge", function(citizen, price, billtype, img, outside, gang)