if not SERVER then return end

function Check_BuyerMarkt_TimerExist()
	if timer.Exists("zrmine_buyermarkt_id") == false then
		timer.Create("zrmine_buyermarkt_id", zrmine.config.BuyerNPC_RateRefresh, 0, zrmine_ChangeMarkt)
	end
end

hook.Add("InitPostEntity", "zrmine_buyermarkt_OnMapLoad", Check_BuyerMarkt_TimerExist)

function zrmine_ChangeMarkt()
	for k, v in pairs(ents.FindByClass("zrms_buyer")) do
		if (IsValid(v)) then
			v:RefreshBuyRate()
		end
	end
end
