MG_CarDealer = MG_CarDealer or {}
MG_CarDealerConfig = MG_CarDealerConfig or {}

function MG_CarDealerConfig:IsOwner(ply)
	return MG_DeveloperGroups[ply:GetUserGroup()]
end

function MG_CarDealerConfig:IsSuperAdmin(ply)
	return ply:IsSuperAdmin()
end

function MG_CarDealerConfig:IsAdmin(ply)
	return ply:IsAdmin()
end

MG_CarDealerConfig.AutoCam = true
MG_CarDealerConfig.AutoCamSpeed = 3

MG_CarDealerConfig.CarStoreRange = 400
MG_CarDealerConfig.CarSpawnRange = 375

MG_CarDealerConfig.DrivePrice = 0
MG_CarDealerConfig.RepairPrice = 50000
MG_CarDealerConfig.RefillPrice = 40000
MG_CarDealerConfig.SellPrice = 0.5
MG_CarDealerConfig.SellPriceRefundPolicy = 0.9
MG_CarDealerConfig.SellPriceRefundPolicyTime = 600
MG_CarDealerConfig.UntowPrice = 10000
MG_CarDealerConfig.RebuyPrice = 20000
MG_CarDealerConfig.GTA5GarageMaxSize = 4

MG_CarDealerConfig.EnterCarAfterSpawn = true
MG_CarDealerConfig.LockCarAfterSpawn = false

MG_CarDealerConfig.PlayerPickupVehicles = false
MG_CarDealerConfig.AdminPickupVehicles = 2
MG_CarDealerConfig.PlayerAllowToolgun = false
MG_CarDealerConfig.AdminAllowToolgun = 2
MG_CarDealerConfig.AdminAllowVehicleDelete = 1
MG_CarDealerConfig.PlayerAllowPropertyChange = false
MG_CarDealerConfig.AdminAllowPropertyChange = 2

MG_CarDealerConfig.UnlimitedCarSpawn = false
MG_CarDealerConfig.PlayerMaxCarAmount = 1
MG_CarDealerConfig.RemoveJobOnlyCars = true

MG_CarDealerConfig.ArmorUpgradeCost = 0.25
MG_CarDealerConfig.FuelUpgradeCost = 0.15
MG_CarDealerConfig.BulletProofCost = 0.2
MG_CarDealerConfig.AlarmCost = 0.4
MG_CarDealerConfig.LockCost = 0.3
MG_CarDealerConfig.InsuranceCost = 0.6

MG_CarDealerConfig.ArmorUpgradePercentage = 1.5
MG_CarDealerConfig.FuelUpgradePercentage = 1.5
MG_CarDealerConfig.InsurancePercentage = 0.5
MG_CarDealerConfig.UpgradeSellWorth = 0.5

MG_CarDealerConfig.DisableBuyCarNotification = false
MG_CarDealerConfig.DisableSellCarNotification = false
MG_CarDealerConfig.DisableCarUpgradeNotifications = true

MG_CarDealerConfig.EnableVCMod = true
MG_CarDealerConfig.EnableMG_VMod = true

MG_CarDealerConfig.Precache = true
MG_CarDealerConfig.TuneRenderDist = 3000

MG_CarDealerConfig.PositionModifier = {
	["models/tdmcars/dod_ram_3500.mdl"] = 38,
}

timer.Simple(0, function()
	MG_CarDealerConfig.ForbiddenJobs = {
		[TEAM_HOBOKING] = {"Obdachlose dürfen keine Autos fahren!", "Du bist obdachlos!"},
		[TEAM_HOBO] = {"Obdachlose dürfen keine Autos fahren!", "Du bist obdachlos!"},
		[TEAM_POLICEDOG] = {"Hunde fahren keine Autos!", "Du bist nicht mal ein Mensch!"},
		[TEAM_STRAY] = {"Hunde fahren keine Autos!", "Du bist nicht mal ein Mensch!"},
	}
end)