xboxlive_matchmaking_send_invites

This function brings up the Xbox Live system dialog to allow a user to send invitations to their game. You specify the local user who should control the dialog (and who's friends list will be used by the dialog), the unique session ID value for the session they want to invite people to, and some default text to show in the dialog. You get the session ID from the async_load DS map generated by the function xboxlive_matchmaking_create().

The function will return -1 if the arguments are invalid or the user is not signed into Xbox Live, or a value greater than 0 otherwise.

 

Syntax:

xboxlive_matchmaking_send_invites(from_user, session_to_invite_into, text_to_add_to_invite);

ArgumentTypeDescription
from_userXbox User IDThe local user ID for controlling the dialogue.
session_to_invite_intoRealThe unique session ID for the session to join.
text_to_add_to_inviteStringA short text to add to the invitation.

 

Returns:

Real

 

Example:

if (gamepad_button_check_pressed(0, gp_face1))
{
    var _uid = xboxlive_user_for_pad(0);
    xboxlive_matchmaking_send_invites(_uid, global.session_ID, "Come and join my game!");
}

The above code checks for a gamepad button press and if one is detected then the Xbox Live dialog for session invites will be opened.