diff --git a/resource/vehicleProperties/client.lua b/resource/vehicleProperties/client.lua index bcaa4b7..ead1ce9 100644 --- a/resource/vehicleProperties/client.lua +++ b/resource/vehicleProperties/client.lua @@ -284,7 +284,7 @@ end ---@param vehicle number ---@param props VehicleProperties ---@param fixVehicle? boolean Fix the vehicle after props have been set. Usually required when adding extras. ----@return boolean? +---@return boolean isEntityOwner True if the entity is networked and the client is the current entity owner. function lib.setVehicleProperties(vehicle, props, fixVehicle) if not DoesEntityExist(vehicle) then error(("Unable to set vehicle properties for '%s' (entity does not exist)"):format(vehicle)) @@ -637,5 +637,5 @@ function lib.setVehicleProperties(vehicle, props, fixVehicle) SetVehicleFixed(vehicle) end - return true + return not NetworkGetEntityIsNetworked(vehicle) or NetworkGetEntityOwner(vehicle) == cache.playerId end