Server exportları

Sosyal uygulamalar

Sosyal hesapları okuyan ve doğrulama rozetini ayarlayan server export'ları.

app, bir sosyal uygulamanın id'sidir, örneğin 'chirp', 'pixl' ya da 'flame'. Bkz. Sosyal uygulamalar. FXLive uygulamasının kendi export'ları Diğer (server) sayfasındadır.

#GetSocialAccount

Bir sosyal hesabı kullanıcı adına göre döndürür.

lua---@param app string
---@param username string
---@return table|nil account
exports['fx-phone']:GetSocialAccount(app, username)
lualocal account = exports['fx-phone']:GetSocialAccount('chirp', 'renkaya')
  • Hesap: { username, displayName, bio, avatar, banner, verified, followers, following, posts, createdAt, identifier }. identifier, hesabın sahibi olan karakterdir.

#GetActiveSocialAccount

Bir oyuncunun giriş yaptığı hesabı döndürür.

lua---@param src integer
---@param app string
---@return table|nil account nil when the player is not signed in to that app
exports['fx-phone']:GetActiveSocialAccount(src, app)
lualocal account = exports['fx-phone']:GetActiveSocialAccount(source, 'pixl')
  • GetSocialAccount ile aynı biçimdedir, yalnızca identifier yoktur.

#SetSocialVerified

Bir hesaba doğrulama rozeti verir ya da geri alır.

lua---@param app string
---@param username string
---@param verified boolean|number true: permanent. false: removed. A number: verified for that many days
---@return boolean ok false for an unknown account
exports['fx-phone']:SetSocialVerified(app, username, verified)
luaexports['fx-phone']:SetSocialVerified('chirp', 'renkaya', 30)