mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-19 07:16:03 +01:00
fix script finding no tickets to trade
This commit is contained in:
@@ -98,7 +98,7 @@ end)
|
|||||||
|
|
||||||
RegisterServerEvent('jim-payments:Tickets:Sell', function()
|
RegisterServerEvent('jim-payments:Tickets:Sell', function()
|
||||||
local Player = QBCore.Functions.GetPlayer(source)
|
local Player = QBCore.Functions.GetPlayer(source)
|
||||||
if Player.Functions.GetItemByName("payticket") then triggerNotify(nil, "No tickets to trade", 'error', source) return
|
if not Player.Functions.GetItemByName("payticket") then triggerNotify(nil, "No tickets to trade", 'error', source) return
|
||||||
else
|
else
|
||||||
tickets = Player.Functions.GetItemByName("payticket").amount
|
tickets = Player.Functions.GetItemByName("payticket").amount
|
||||||
Player.Functions.RemoveItem('payticket', tickets)
|
Player.Functions.RemoveItem('payticket', tickets)
|
||||||
@@ -224,4 +224,4 @@ QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source,
|
|||||||
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
|
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
|
||||||
end
|
end
|
||||||
cb(onlineList)
|
cb(onlineList)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user