mplay_session_status()

No arguments

 

Very simple function, just returns the status of the session:

 

0 = no session
1 = created (hosting)
2 = joined (connected to host)

 

So, for example, if you want to change the host before leaving you can use this function to determine first if this game is the host, for example:

 

Example

if mplay_session_status() == 1 then

{

//is the host

mplay_session_mode(true);

mplay_session_end();

}

else

{

//isn't the host

mplay_session_end();

}

 

The above example uses what the function returned to determine if the game is the host or not, and take action accordingly. Can’t be easier.

 

gml_josea Revision #1