function SpawnVehicle(vehicle, plate)
ESX.Game.SpawnVehicle(vehicle.model, {
x = this_Garage.SpawnPoint.x,
y = this_Garage.SpawnPoint.y,
z = this_Garage.SpawnPoint.z + 1
}, this_Garage.SpawnPoint.h, function(callback_vehicle)
ESX.Game.SetVehicleProperties(callback_vehicle, vehicle)
SetVehRadioStation(callback_vehicle, "OFF")
TaskWarpPedIntoVehicle(GetPlayerPed(-1), callback_vehicle, -1)
local plate = GetVehicleNumberPlateText(callback_vehicle)--sizi ilgilendiren kısım
TriggerServerEvent('garage:addKeys', plate)--sizi ilgilendiren kısım
end)
TriggerServerEvent('esx_advancedgarage:setVehicleState', plate, false)
end