patrikov
Gold Elite
- Joined
- Jul 21, 2021
- Messages
- 87
- Reaction score
- 291
- Points
- 306
RegisterNetEvent('esx_policejob:RemoveCar', function()
if hasVehicle then
local TR92 = PlayerPedId()
local vehicle = GetVehiclePedIsIn(TR92,true)
SetEntityAsMissionEntity(TR92,true)
local plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle))
TriggerServerEvent('many-removekeys', plate)
DeleteVehicle(vehicle)
exports['many-base']:Notify('inform', 'Schowałeś służbowy pojazd!')
hasVehicle = false
else
ESX.ShowNotification('Nie wyjąłeś żadnego pojazdu!')
end
end)
Can someone write to me the function that checks whether a given vehicle is next to the player so that he can return it? If he was outside some radius, he wouldn't be able to hide the vehicle