Presence - stingray.Presence namespace reference - Stingray Lua API Reference

stingray.Presence namespace reference

Description

This interface handles presence on Steam.

Presence makes it possible to see what friends do in a game.

Functions

Parameters

game :

any(stingray.SteamLobby, string)

The address 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.
Returns
This function does not return any values.
Parameters

friend :

string

The Steam ID of the friend.

key :

string

The key to retrieve.

Returns

string?

The string value for the key on a friend, or nil if the key does not exist.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Parameters

key :

string

The key in a key-value pair.

value :

string

The value to set for the key.

Returns
This function does not return any values.

Both key and value are strings. You can use 19 different keys. Setting a key to an empty string removes it.

The status key is a magic key: its value appears in the view game info dialog in the Steam friends list.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.

Call this when a player exits the server or lobby.