Get if another user is a platform friend||doc136877

September 20, 2022

Format

Player:RequestIsFriendWith(userID, callback) 
  • The class of the functionPlayer

Description

Get whether the current player and another user are platform friends

    Callback parameters

    Parameter name Type Description
    isFriend bool Are you a friend

    Code example

    On the server side of the player entity templatemount script, to determine whether the other players in the room are friends.

    for id, player in pairs(Game.GetAllPlayers()) do
        this:GetUserData(player.platformUserId, function(isFriend)
            print("you and " .. player.name .. " is friend:" .. isFriend)
        end)
    end