local AP_RESOURCE_NAME = "AdvancedParking" if (GetCurrentResourceName() == AP_RESOURCE_NAME) then return end local IS_CLIENT = not IsDuplicityVersion() local AP = exports[AP_RESOURCE_NAME] -- replaces FreezeEntityPosition native on client and server side local original_FreezeEntityPosition = FreezeEntityPosition FreezeEntityPosition = function(entity, freeze) if (not DoesEntityExist(entity)) then return end if (GetEntityType(entity) ~= 2 or (IS_CLIENT and not NetworkGetEntityIsNetworked(entity)) or GetResourceState(AP_RESOURCE_NAME) ~= "started" or not AP.FreezeVehicle) then original_FreezeEntityPosition(entity, freeze) return end AP:FreezeVehicle(entity, freeze) end