This commit is contained in:
Nordi98 2025-08-05 16:04:53 +02:00
parent e876d31e05
commit 625f80361b
2 changed files with 6 additions and 54 deletions

View file

@ -430,7 +430,6 @@ function ViewBills()
lib.showContext('billing_menu')
end
-- Helper function to get nearby players
function GetNearbyPlayers()
local playerPed = PlayerPedId()
@ -612,35 +611,8 @@ RegisterNetEvent('billing:client:showPaymentPrompt', function(data)
end
end
end
},
{
title = 'Später bezahlen',
description = 'Rechnung für später speichern',
icon = 'clock',
onSelect = function()
local success = lib.callback.await('billing:server:handleBillResponse', false, {
action = 'later',
billId = data.billId
})
if success then
lib.notify({
title = 'Rechnung gespeichert',
description = 'Die Rechnung wurde für später gespeichert',
type = 'info'
})
-- Notify the sender
TriggerServerEvent('billing:server:notifyBillSender', data.billId, 'later')
else
lib.notify({
title = 'Fehler',
description = 'Fehler beim Speichern der Rechnung',
type = 'error'
})
end
end
}
-- "Pay Later" option removed
}
})
@ -692,22 +664,8 @@ RegisterNetEvent('billing:client:billResponse', function(billId, action, playerN
centered = true,
cancel = false
})
elseif action == 'later' then
lib.notify({
title = 'Rechnung gespeichert',
description = playerName .. ' wird deine Rechnung später bezahlen',
type = 'info',
duration = 7000
})
-- Show a more detailed "pay later" message
lib.alertDialog({
header = 'Zahlung aufgeschoben',
content = playerName .. ' hat deine Rechnung über $' .. bill.amount .. ' für "' .. bill.reason .. '" für später gespeichert.',
centered = true,
cancel = false
})
end
}
-- "later" case removed
-- Remove from pending bills
pendingBills[billId] = nil