fix duplicate text entry for charging users

Apparently missed this completely, removed the duplicate text entry when not using the list option

this should fix any issues with this
This commit is contained in:
Jim Shield
2025-05-14 20:23:03 +01:00
parent 49f4d404e3
commit ca625c50e2

View File

@@ -50,9 +50,9 @@ RegisterNetEvent(getScript()..":client:Charge", function(data, outside)
newinputs[#newinputs+1] = { newinputs[#newinputs+1] = {
type = "select", type = "select",
text = locale("menu" ,"cus_id"), text = locale("menu", "cus_id"),
name = "citizen", name = "citizen",
label = locale("menu" ,"cus_id"), label = locale("menu", "cus_id"),
default = 1, default = 1,
options = nearbyList options = nearbyList
} }
@@ -62,14 +62,8 @@ RegisterNetEvent(getScript()..":client:Charge", function(data, outside)
isRequired = true, isRequired = true,
required = true, required = true,
name = 'citizen', name = 'citizen',
label = locale("menu" ,"person_id"), label = locale("menu", "cus_id"),
text = locale("menu" ,"person_id") text = locale("menu", "cus_id")
}
newinputs[#newinputs+1] = {
type = 'text',
isRequired = true,
name = 'citizen',
text = locale("menu" ,"cus_id")
} }
end end
@@ -94,6 +88,10 @@ RegisterNetEvent(getScript()..":client:Charge", function(data, outside)
if dialog then if dialog then
if dialog[1] then -- if ox menu, auto adjust values if dialog[1] then -- if ox menu, auto adjust values
if dialog[1] == "" then
TriggerEvent(getScript()..":client:Charge", data, outside)
return
end
dialog.citizen = dialog[1] dialog.citizen = dialog[1]
dialog.billtype = dialog[2] dialog.billtype = dialog[2]
dialog.price = dialog[3] dialog.price = dialog[3]
@@ -105,7 +103,7 @@ end)
RegisterNetEvent(getScript()..":client:PayPopup", function(amount, biller, billtype, img, billerjob, gang, outside) RegisterNetEvent(getScript()..":client:PayPopup", function(amount, biller, billtype, img, billerjob, gang, outside)
local setimage = "" local setimage = ""
print(billerjob)
if not img then if not img then
setimage = billerjob setimage = billerjob
else else