AddEventHandler('wasabi_ambulance:billPatient', function()https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K
if ESX.PlayerData.job.name == 'ambulance' thenhttps://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
local player, dist = ESX.Game.GetClosestPlayer()https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
if player == -1 or dist > 4.0 thenhttps://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr
TriggerEvent('wasabi_ambulance:notify', Strings.no_nearby, Strings.no_nearby_desc, 'error')https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
elsehttps://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
local targetId = GetPlayerServerId(player)https://pan.baidu.com/s/3V4W5X6Y7Z8A9B0C1D2E
local input = lib.inputDialog('Bill Patient', {'Amount'})https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
if not input then return endhttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
local amount = math.floor(tonumber(input[1]))https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
if amount < 1 thenhttps://pan.baidu.com/s/3N4O5P6Q7R8S9T0U1V2W
TriggerEvent('wasabi_ambulance:notify', Strings.invalid_entry, Strings.invalid_entry_desc, 'error')https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
elseif Config.billingSystem == 'okok' thenhttps://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L
local data = {https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z
target = targetId,https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0
invoice_value = amount,https://pan.baidu.com/s/1R2S3T4U5V6W7X8Y9Z0A?pwd=qrst
invoice_item = Strings.medical_services,https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
society = 'society_ambulance',https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=vwx9
https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=vwx9
society_name = 'Hospital',https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8
invoice_notes = ''https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
}https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
TriggerServerEvent('okokBilling:CreateInvoice', data)https://pan.baidu.com/s/2L3M4N5O7P8Q9R0S1T2U
elsehttps://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
TriggerServerEvent('esx_billing:sendBill', targetId, 'society_ambulance', 'EMS', amount)https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
https://pan.baidu.com/s/1T2U3V4W5X6Y7Z8A9B0C
https://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B
https://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X
https://pan.baidu.com/s/5X6Y7Z8A9B0C1D2E3F4G
https://pan.baidu.com/s/6Q7R8S9T0U1V2W3X4Y5Z
https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G?pwd=hij1
|