Motor Sınıfı
MatchmakingService
*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.
Özet
Yöntemler
GetServerAttribute(name: string):Tuple |
InitializeServerAttributesForStudio(serverAttributes: Dictionary):Tuple |
SetServerAttribute(name: string,value: Variant):Tuple |
API Referansı
Yöntemler
GetServerAttribute
InitializeServerAttributesForStudio
Parametreler
Dönüşler
SetServerAttribute
Parametreler
value:Variant |
Dönüşler
Kod Örnekleri
Eşleştirme Servisi örneği
local MatchmakingService = game:GetService("MatchmakingService")
local RunService = game:GetService("RunService")
if RunService:IsStudio() then
-- Test için başlangıç niteliklerini ve şemasını ayarlayın
MatchmakingService:InitializeServerAttributesForStudio({
Level = "İleri Düzey",
Elo = 123.456,
TrainingMode = true
})
end
-- Level niteliğini alır
local currentLevel, errorMessage = MatchmakingService:GetServerAttribute("Level")
if errorMessage then
warn(errorMessage)
else
print("Mevcut seviye: " .. currentLevel)
end
-- Level niteliğinin değerini İleri Düzey olarak günceller
local success, errorMessage = MatchmakingService:SetServerAttribute("Level", "İleri Düzey")
if not success then
warn("[İleri Düzey] değerini [Level] sunucu niteliğine güncelleyemedik, hata: " .. errorMessage)
else
print("[Level] değerini [İleri Düzey] olarak başarıyla ayarlandı")
end