Problem calling "OnPlayerDisconnect".
#1

Hello world.

I have few problems with minigames which are on my server. I noticed that once a player get crash sometimes the "OnPlayerDisconnect" callback don't get called, i think, because the last player remains stuck in the minigame and also the minigame is not restarting, untill i do not use a command to unblock the player and restart the minigame.

I'm using the iterators from foreach include. Any suggestions what should i do?

Thanks.
Reply
#2

Not sure about this one. However, OnPlayerDisconnect you can detect the reason, and the reason 0 or 1 detects if a player crashes. So:
Код:
// OnPlayerDisconnect
switch(reason) 
{
     case 0: 
     {

     }
     case 1:
     {

     }
     case 2:
     {
  
     }
}
Reply
#3

I will try to reset variables if the reason will be 0 or 1, if this won't work, i'll look carefully in my script to see where i have mistaken.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)