OnPlayerDisconnect stopped working
#1

I don't know why, but this callback doesn't work anymore, but it used to all time ago. Mayby you know the reason?

Код HTML:
public OnPlayerDisconnect(playerid, reason){
    specby[specto[playerid]]=-1;
    specto[playerid]=-1;
    specby[playerid]=-1;
    PlayersCount--;
	Account[playerid][pVotesForKick]=0;
	Account[playerid][pVotesForBan]=0;
    PlayerInVotekick[playerid]=false;
    PlayerInVoteban[playerid]=false;
    KillTimer(VoteKickTimer[player]);
    KillTimer(VoteBanTimer[player]);
 	DestroyObject(myobject[playerid]);
	DestroyObject(myobject2[playerid]);
	DestroyObject(myobject3[playerid]);
	DestroyObject(myobject4[playerid]);
	DestroyObject(myobject5[playerid]);
    for(new i=0;i<MAX_SERVER_PLAYERS;i++){
      MyVoteK[i][playerid]=false;
	  MyVoteB[i][playerid]=false;}
    MyVoteC[playerid]=false;
    new stringa[128],file[256];
    GetPlayerName(playerid, name, sizeof(name));

      switch(reason){
        case 0: format(stringa, sizeof(stringa), "* [CRASH]: %s has left the server. *", name);
        case 1: format(stringa, sizeof(stringa), "* [EXIT]: %s has left the server. *", name);
        case 2:{
	           if(Banned[playerid]==false){
		         format(stringa, sizeof(stringa), "* [KICK]: %s has been kicked. *", name);}
			   if(Banned[playerid]==true){
		         format(stringa, sizeof(stringa), "* [BAN]: %s has been banned!!! *", name);}}}
    if(Options[ConnectMessages]==1){
      SendClientMessageToAll(COLOR_GREY, stringa);}
	print(stringa);
    Banned[playerid]=false;
    GetPlayerName(playerid, pname, sizeof(pname));
    format(file, sizeof(file), UsersFile, pname);
    OnPlayerLogout(playerid);
    Account[playerid][pMuteWarnings]=0;
    Account[playerid][pSpamWarnings]=0;
    Account[playerid][pPingWarnings]=0;
    Account[playerid][pFloodding]=0;
    Account[playerid][pJailed]=false;
    Account[playerid][pFreezed]=false;
    Account[playerid][pMuted]=false;
    Account[playerid][pFlood]=false;
    Account[playerid][pVehicleLocked]=false;
    Account[playerid][pWarning]=0;
    Account[playerid][pBanWarning]=0;
    Account[playerid][pSkin]=0;
    if(Account[playerid][pLoggedin]==1){
	  dini_IntSet(file,"muted",0);
	  dini_IntSet(file,"jailed",0);
	  dini_IntSet(file,"freezed",0);}
    Spawned[playerid]=false;
    GodActive[playerid]=false;
    ResetPlayerWeapons(playerid);
    KillTimer(MuteTimer[playerid]);
    KillTimer(JailTimer[playerid]);
	return 1;}
Reply


Messages In This Thread
OnPlayerDisconnect stopped working - by pasha97 - 25.10.2012, 14:25
Re: OnPlayerDisconnect stopped working - by ViniBorn - 25.10.2012, 15:32
Re: OnPlayerDisconnect stopped working - by pasha97 - 25.10.2012, 17:37
Re: OnPlayerDisconnect stopped working - by HyDrAtIc - 25.10.2012, 17:41
Re: OnPlayerDisconnect stopped working - by Kirollos - 25.10.2012, 18:11
Re: OnPlayerDisconnect stopped working - by HyDrAtIc - 25.10.2012, 18:14
Re: OnPlayerDisconnect stopped working - by pasha97 - 26.10.2012, 10:05
Re: OnPlayerDisconnect stopped working - by JaKe Elite - 26.10.2012, 10:21
Re: OnPlayerDisconnect stopped working - by pasha97 - 26.10.2012, 13:16
Re: OnPlayerDisconnect stopped working - by gtakillerIV - 26.10.2012, 14:07

Forum Jump:


Users browsing this thread: 1 Guest(s)