Check for job commission info

This commit is contained in:
Jim Shield
2024-01-28 12:29:14 +00:00
committed by GitHub
parent a21ea9f1db
commit 38f360fc26

View File

@@ -42,18 +42,13 @@ RegisterNetEvent('jim-payments:client:Charge', function(data, outside)
end end
--If list is empty(no one nearby) show error and stop --If list is empty(no one nearby) show error and stop
if not nearbyList[1] then triggerNotify(nil, Loc[Config.Lan].error["no_one"], "error") return end if not nearbyList[1] then triggerNotify(nil, Loc[Config.Lan].error["no_one"], "error") return end
end else -- If Config.List is false, create input text box for ID's
newinputs[#newinputs+1] = { type = 'text', isRequired = true, required = true, name = 'citizen', label = Loc[Config.Lan].menu["person_id"], text = Loc[Config.Lan].menu["person_id"] }
end
--Check if image was given when opening the regsiter --Check if image was given when opening the regsiter
local img = "" local img = Config.System.Menu == "qb" and "<center><img src="..(data.img and data.img or "").." width=200px></center>" or ""
if Config.System.Menu == "qb" then
img = "<center><img src="..(data.img and data.img or "").." width=200px></center>"
elseif Config.System.Menu == "ox" then
img = ""
end
--Grab Player Job name or Gang Name if needed --Grab Player Job name or Gang Name if needed
local label = PlayerJob.label local label = data.gang and PlayerGang.label or PlayerJob.label
local gang = false
if data.gang then label = PlayerGang.label gang = true end
if Config.General.List then if Config.General.List then
newinputs[#newinputs+1] = { type = "select", text = Loc[Config.Lan].menu["cus_id"], name = "citizen", label = Loc[Config.Lan].menu["cus_id"], default = 1, options = nearbyList } newinputs[#newinputs+1] = { type = "select", text = Loc[Config.Lan].menu["cus_id"], name = "citizen", label = Loc[Config.Lan].menu["cus_id"], default = 1, options = nearbyList }
else else
@@ -65,8 +60,8 @@ RegisterNetEvent('jim-payments:client:Charge', function(data, outside)
text = Loc[Config.Lan].menu["type"], text = Loc[Config.Lan].menu["type"],
default = billPrev, default = billPrev,
options = { options = {
{ value = "cash", text = Loc[Config.Lan].menu["cash"] }, { value = "cash", text = Loc[Config.Lan].menu["cash"], label = Loc[Config.Lan].menu["cash"] },
{ value = "bank", text = Loc[Config.Lan].menu["card"] } { value = "bank", text = Loc[Config.Lan].menu["card"], label = Loc[Config.Lan].menu["card"] }
} }
} }
newinputs[#newinputs+1] = { type = 'number', isRequired = true, name = 'price', text = Loc[Config.Lan].menu["amount_charge"] } newinputs[#newinputs+1] = { type = 'number', isRequired = true, name = 'price', text = Loc[Config.Lan].menu["amount_charge"] }