[HELP] preserve the room variable even if the owner leave
Posted: 31 Jul 2011, 01:24
HI there,
Is there a way to preserve a room variable even if the owner leaves it?
here is my scenario.
Player1 sets a roomvariable isStarted=true
if the roomvariable isStarted==true;
it should not display on the roomlist.
it works fine if Player1 is still on the room.
the problem is if player1 quits the game the isStarted variable becomes undefined or sometimes null.
i hope someone can hell me on this.
note:
the use of this code is to prevent other player on the zone not to join on the game if it is started.
it is something like in dota that if the game is started, it will br remove on to the list of the roomdisplay,
is there a better way to do this stuff?
Is there a way to preserve a room variable even if the owner leaves it?
here is my scenario.
Player1 sets a roomvariable isStarted=true
if the roomvariable isStarted==true;
it should not display on the roomlist.
it works fine if Player1 is still on the room.
the problem is if player1 quits the game the isStarted variable becomes undefined or sometimes null.
i hope someone can hell me on this.
note:
the use of this code is to prevent other player on the zone not to join on the game if it is started.
it is something like in dota that if the game is started, it will br remove on to the list of the roomdisplay,
is there a better way to do this stuff?