diff --git a/client/vehicle.lua b/client/vehicle.lua index e70ff4b..3422ba9 100644 --- a/client/vehicle.lua +++ b/client/vehicle.lua @@ -391,6 +391,7 @@ AddEventHandler('Erfan:gang:openGarageMenu', function(Vehicles ,canStoredInGarag end end DeleteEntity(vehicle) + TriggerServerEvent('Erfan:gang:setVehicleProperties', vehicleProperties.plate, vehicleProperties ) TriggerServerEvent('Erfan:gang:setVehicleStatus', vehicleProperties.plate, true) canStoredInGarage = false end diff --git a/server/vehicle.lua b/server/vehicle.lua index d8bdf20..a5f1206 100644 --- a/server/vehicle.lua +++ b/server/vehicle.lua @@ -106,6 +106,12 @@ AddEventHandler('Erfan:gang:setVehicleStatus', function(plate , status ) end) +RegisterServerEvent('Erfan:gang:setVehicleProperties') +AddEventHandler('Erfan:gang:setVehicleProperties', function(plate , vehicleProperties ) + executeOnDB('UPDATE `gangs_vehicle` SET `vehicle` = @vehicle WHERE `plate` = @plate', {['@plate'] = plate , ['@vehicle'] = json.encode(vehicleProperties) } , function(e)end) +end) + + RegisterServerEvent('Erfan:gang:payImpound') AddEventHandler('Erfan:gang:payImpound', function(Vehicle ,Vehicles ,canInsertToGarage , vehicleProperties ) local _Source = source