Scripts/resources/[hp]/hp_vehicleshop/client/events.lua

30 lines
720 B
Lua
Raw Permalink Normal View History

2024-12-29 19:48:41 +00:00
AddEventHandler("onResourceStop", function(resource)
if resource == GetCurrentResourceName() then
closeCurrentGallery()
end
end)
AddEventHandler("onResourceStart", function(resource)
if resource == GetCurrentResourceName() then
Wait(1000)
CheckOverdueRentalCars()
end
end)
RegisterNetEvent("esx:playerLoaded", function(xPlayer)
Wait(1000)
CheckOverdueRentalCars()
end)
RegisterNetEvent("QBCore:Client:OnPlayerLoaded", function()
Wait(1000)
CheckOverdueRentalCars()
end)
RegisterNetEvent("hp_vehicleshop:Client:HandleCallback", function(key, data)
if Koci.Callbacks[key] then
Koci.Callbacks[key](data)
Koci.Callbacks[key] = nil
end
end)