AddEventHandler('wasabi_ambulance:billPatient', function()https://pan.baidu.com/s/1R2S3T4U5V6W7X8Y9Z0A?pwd=qrst
if ESX.PlayerData.job.name == 'ambulance' thenhttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=vwx9
local player, dist = ESX.Game.GetClosestPlayer()https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I
if player == -1 or dist > 4.0 thenhttps://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z
TriggerEvent('wasabi_ambulance:notify', Strings.no_nearby, Strings.no_nearby_desc, 'error')https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
elsehttps://pan.baidu.com/s/2U3V4W5X6Y7Z8A9B0C1D
local targetId = GetPlayerServerId(player)https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M?pwd=yza7
local input = lib.inputDialog('Bill Patient', {'Amount'})https://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K
if not input then return endhttps://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
local amount = math.floor(tonumber(input[1]))https://pan.baidu.com/s/2L3M4N5O7P8Q9R0S1T2U
if amount < 1 thenhttps://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
TriggerEvent('wasabi_ambulance:notify', Strings.invalid_entry, Strings.invalid_entry_desc, 'error')https://pan.baidu.com/s/4N5O7P8Q9R0S1T2U3V4W
elseif Config.billingSystem == 'okok' thenhttps://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S
local data = {https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V
target = targetId,https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
invoice_value = amount,https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
invoice_item = Strings.medical_services,https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
society = 'society_ambulance',https://pan.baidu.com/s/6P8Q9R0S1T2U3V4W5X6Y
society_name = 'Hospital',https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
invoice_notes = ''https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7
}https://pan.baidu.com/s/1L2M3N4O5P6Q7R8S9T0U
https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z
TriggerServerEvent('okokBilling:CreateInvoice', data)https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=vwx9
elsehttps://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
TriggerServerEvent('esx_billing:sendBill', targetId, 'society_ambulance', 'EMS', amount)https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E?pwd=bcd9
https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
https://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N
https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
|