OnPlayerDisconnect stopped working
#4

PHP код:
public OnPlayerDisconnect(playeridreason){
    
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(playeridnamesizeof(name));

      switch(
reason){
        case 
0format(stringasizeof(stringa), "* [CRASH]: %s has left the server. *"name);
        case 
1format(stringasizeof(stringa), "* [EXIT]: %s has left the server. *"name);
        case 
2:{
               if(
Banned[playerid]==false){
                 
format(stringasizeof(stringa), "* [KICK]: %s has been kicked. *"name);}
               if(
Banned[playerid]==true){
                 
format(stringasizeof(stringa), "* [BAN]: %s has been banned!!! *"name);}}}
    if(
Options[ConnectMessages]==1){
      
SendClientMessageToAll(COLOR_GREYstringa);}
    print(
stringa);
    
Banned[playerid]=false;
    
GetPlayerName(playeridpnamesizeof(pname));
    
format(filesizeof(file), UsersFilepname);
    
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: 4 Guest(s)