mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user