This interface handles friends on Steam.
Other related reference items
in_category ( id, category ) : boolean
Indicates whether or not the specified player is in the specified category of friends.
|
id : | string |
The Steam ID of the player. |
category : | integer |
A value from the friend relations group. |
boolean |
True if the specified player is in the category, or false otherwise. |
name ( id ) : string
Retrieves the name of a friend using a specified Steam ID.
|
id : | string |
A Steam ID. |
string |
The name of the friend. |
playing_game ( id ) : steam_friend_game_info?
Retrieves information about the game the specified player is currently playing.
|
id : | string |
The Steam ID of the player. |
Returns a table that describes the game the player is currently playing, or nil if the friend is not playing a game. The ? notation indicates that this type is optional: there may be zero or one instances of it. |
Other related reference items
relationship ( id ) : integer
Retrieves the relationship to the player with the specified ID.
|
id : | string |
The Steam ID of the player. |
integer |
A value from the friend relations group. |
status ( id ) : integer
Retrieves the online status of the specified player.
|
id : | string |
The Steam ID of the player. |
integer |
A value from the friend status group. |
INVITE_LOBBY : integer
Invite to lobby.
|
Other related reference items
INVITE_SERVER : integer
Invite to server.
|
Other related reference items
NO_INVITE : integer
No invite.
|
Other related reference items
BLOCKED : integer
Blocked friend.
|
FRIEND : integer
Friend.
|
IGNORED : integer
Ignored player.
|
IGNORED_FRIEND : integer
Ignored friend.
|
NONE : integer
Non-friend.
|
REQUEST_INITIATOR : integer
Player requesting friendship.
|
REQUEST_RECIPIENT : integer
Friend requested.
|
SUGGESTED : integer
Suggested friend.
|
BLOCKED_FLAG = 1 : integer
Blocked friends.
|
CLAN_MEMBER_FLAG = 8 : integer
Clan members.
|
FRIENDSHIP_REQUESTED_FLAG = 2 : integer
Friends requested.
|
FRIEND_FLAG = 4 : integer
Friends.
|
Other related reference items
IGNORED_FLAG = 256 : integer
Ignored players.
|
IGNORED_FRIEND_FLAG = 512 : integer
Ignored friends.
|
ON_GAME_SERVER_FLAG = 16 : integer
Players on a game server.
|
REQUESTING_FRIENDSHIP_FLAG = 32 : integer
Players requesting friendship.
|
REQUESTING_INFO_FLAG = 128 : integer
Requesting info.
|
SUGGESTED_FLAG = 1024 : integer
Suggested friends.
|
AWAY : integer
Away.
|
BUSY : integer
Busy.
|
LOOKING_TO_PLAY : integer
Looking to play.
|
OFFLINE : integer
Offline.
|
ONLINE : integer
Online.
|
SNOOZE : integer
Snoozing.
|
TRADING : integer
Trading.
|
boot_invite ( ) : integer, string
Checks whether or not this game was booted from an invite.
|
This function does not accept any parameters. |
integer |
The invitation type. Will match one of the invite type constants. If this is NO_INVITE, you have not received an invitation. |
string |
The address of the game to connect to.
|
If so, your game must immediately join the specified server or lobby.
invite ( id, game, extra_params, password )
Sends an invitation to the user with the specified ID to join a lobby or game server.
|
id : | string |
The Steam ID of the player. |
game : | any(stingray.SteamLobby, string) |
The game the player should connect to. May be either a SteamLobby object, a lobby ID, or an IPv4 game server address in the form "a.b.c.d:port", where the port is the connection port. The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses. |
extra_params : | string? |
Optional. A string parameter that adds extra information to the invite. Steam uses this as parameters on the command line, so do not use spaces or quotations in the string. This can be 31 characters wide. Keep it simple. The ? notation indicates that this type is optional: there may be zero or one instances of it. |
password : | string? |
Optional. Password string is only for game server invites. The ? notation indicates that this type is optional: there may be zero or one instances of it. |
This function does not return any values. |
next_invite ( ) : integer, string, string, string
Checks whether this player has received an invitation to join a game from a friend.
|
This function does not accept any parameters. |
integer |
The invitation type. Will match one of the invite type constants. If this is NO_INVITE, you have not received an invitation. |
string |
The address of the game to connect to.
|
string |
A string with any extra parameters specified in the invite. |
string |
The invitee: the ID of the friend who made the invite. |
If so, your game should ask the player if he or she wants to join the specified server or lobby. For this to work, the invitee must also have called Presence.advertise_playing() to indicate the lobby or server to invite to. Otherwise, invites from the Steam client do not work properly.
id ( index ) : string
Retrieves the Steam ID of a specified friend from the list of friends in the categories specified for the
last call to Friends.num_friends().
|
index : | integer |
A one-based index in the list fetched by the last call to Friends.num_friends(). |
string |
The Steam ID of the friend at the specified index. |
Other related reference items
num_friends ( category_mask ) : integer
Returns the number of friends in the specified categories.
|
category_mask : | integer? |
Optional. A value that represents one or more categories. Add together any number of the constants in the friend relation flags group to form a mask. If no mask is specified, FRIEND_FLAG is used. The ? notation indicates that this type is optional: there may be zero or one instances of it. |
integer |
Returns the number of friends in the categories. |
After calling this function, you can call id() to fetch the IDs of friends in the specified categories.
Other related reference items