X2Friend
Globals
MAX_BLOCK_USER
integer
MAX_FRIENDS
integer
MAX_WAIT_FRIENDS
integer
X2Friend
X2Friend
Classes
Class: X2Friend
Method: BlockUser
(method) X2Friend:BlockUser(charName: any)
Blocks a character. Cooldown 1 second.
Method: IsMyFriend
(method) X2Friend:IsMyFriend(charName: string)
-> isFriend: boolean
Checks whether the specified character is on the player’s friend list.
@param
charName— The name of the character to check.@return
isFriend—trueif the character is a friend,falseotherwise.
Method: MuteUser
(method) X2Friend:MuteUser(charName: string)
Mutes a character. Cooldown 1 second.
@param
charName— The character’s name.
Method: UnblockUser
(method) X2Friend:UnblockUser(charName: string)
Unblocks a character. Cooldown 1 second.
@param
charName— The character’s name.
Method: GetMuteList
(method) X2Friend:GetMuteList()
-> mutedCharacters: MutedCharacter[]
2. totalMuted: number
Retrieves a list of muted characters and the amount muted.
@return
mutedCharacters— A list of muted characters.@return
totalMuted— The total number of muted characters.See: MutedCharacter
Method: GetBlockList
(method) X2Friend:GetBlockList()
-> blockedCharacters: BlockedCharacter[]
2. totalBlocked: number
Retrieves a list of blocked characters and the amount blocked.
@return
blockedCharacters— A list of blocked characters.@return
totalBlocked— The total number of blocked characters.See: BlockedCharacter
Method: GetFriendList
(method) X2Friend:GetFriendList(allMember: boolean)
-> friendList: FriendInfo[]|nil
Retrieves the player’s friend list.
@param
allMember—trueto include offline friends,falseto show only online friends.@return
friendList— The list of friends, ornilif unavailable.See: FriendInfo
Method: UnmuteUser
(method) X2Friend:UnmuteUser(charName: string)
Unmutes a character. Cooldown 1 second.
@param
charName— The character’s name.