This interface handles friends on Steam.
Other related reference items
in_category ( id, category ) : booleanIndicates 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 ) : stringRetrieves 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 ) : integerRetrieves 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 ) : integerRetrieves 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 : integerInvite to lobby.
|
Other related reference items
INVITE_SERVER : integerInvite to server.
|
Other related reference items
NO_INVITE : integerNo invite.
|
Other related reference items
BLOCKED : integerBlocked friend.
|
FRIEND : integerFriend.
|
IGNORED : integerIgnored player.
|
IGNORED_FRIEND : integerIgnored friend.
|
NONE : integerNon-friend.
|
REQUEST_INITIATOR : integerPlayer requesting friendship.
|
REQUEST_RECIPIENT : integerFriend requested.
|
SUGGESTED : integerSuggested friend.
|
BLOCKED_FLAG = 1 : integerBlocked friends.
|
CLAN_MEMBER_FLAG = 8 : integerClan members.
|
FRIENDSHIP_REQUESTED_FLAG = 2 : integerFriends requested.
|
FRIEND_FLAG = 4 : integerFriends.
|
Other related reference items
IGNORED_FLAG = 256 : integerIgnored players.
|
IGNORED_FRIEND_FLAG = 512 : integerIgnored friends.
|
ON_GAME_SERVER_FLAG = 16 : integerPlayers on a game server.
|
REQUESTING_FRIENDSHIP_FLAG = 32 : integerPlayers requesting friendship.
|
REQUESTING_INFO_FLAG = 128 : integerRequesting info.
|
SUGGESTED_FLAG = 1024 : integerSuggested friends.
|
AWAY : integerAway.
|
BUSY : integerBusy.
|
LOOKING_TO_PLAY : integerLooking to play.
|
OFFLINE : integerOffline.
|
ONLINE : integerOnline.
|
SNOOZE : integerSnoozing.
|
TRADING : integerTrading.
|
boot_invite ( ) : integer, stringChecks 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, stringChecks 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 ) : stringRetrieves 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 ) : integerReturns 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