Справочник функций
GameMaker Studio · GML · Players
gmda_getInvitability
Reads whether other players are currently allowed to send this player friend invites.
Asynchronous (result via event)
Signature
gmda_getInvitability() -> realWhat it does
Reads THIS player's own is_invitable flag (POST /players/invitability, session-auth). The queued invitability_loaded event carries response, the server payload that reports the current invitability state.
Parameters
This function takes no parameters.
How to call it
Returns 1 once the request is queued, or 0 immediately if there is no active session. Read the result from the event queue.
Result event: invitability_loaded { success, response }
Example
gmda_getInvitability();
var e = gmda_pollEvent();
while (!is_undefined(e)) {
if (e.event == "invitability_loaded" && e.success) {
invite_toggle = e.response.is_invitable;
}
e = gmda_pollEvent();
}Use cases
- Initialize a privacy toggle showing whether the player accepts friend invites.
- Check the current invitability state before opening a settings menu.