Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onPlayerPart( player, reason )
- {
- if ( ( GetLevel( player ) > 0 ) && ( status[ player.ID ].Logged == true ) )
- {
- //====saves players stats.=========
- SaveStatus( player );
- //===saves the last join T.========
- lastjoin( player );
- }
- //==Part Reason? ==================
- local Text = "Unknown"
- switch ( reason )
- {
- case PARTREASON_DISCONNECTED:
- Text = "Disconnected";
- break;
- case PARTREASON_TIMEOUT:
- Text = "Timeout";
- break;
- case PARTREASON_QUIT:
- Text = "Quit";
- break;
- case PARTREASON_KICKED:
- Text = "Kicked";
- break;
- case PARTREASON_CRASHED:
- Text = "Crashed";
- break;
- }
- // =========== wstats and bstats functions ==========
- QuerySQL( db,"UPDATE Wstats SET Fist='" + warray[player.ID].w0 + "', BrassKnuckle = '" + warray[player.ID].w1 + "', ScrewDriver = '" + warray[player.ID].w2 + "', GolfClub = '" + warray[player.ID].w3 + "', NightStick = '" + warray[player.ID].w4 + "', Knife = '" + warray[player.ID].w5 + "', BaseballBat = '" + warray[player.ID].w6 + "', Hammer = '" + warray[player.ID].w7 + "', Cleaver = '" + warray[player.ID].w8 + "', Machete = '" + warray[player.ID].w9 + "', Katana = '" + warray[player.ID].w10 + "', Chainsaw = '" + warray[player.ID].w11 + "', Grenade = '" + warray[player.ID].w12 + "', RemoteGrenade = '" + warray[player.ID].w13 + "', TearGas = '" + warray[player.ID].w14 + "', Molotov = '" + warray[player.ID].w15 + "', Missile = '" + warray[player.ID].w16 + "', Colt45 = '" + warray[player.ID].w17 + "', Python = '" + warray[player.ID].w18 + "', Shotgun = '" + warray[player.ID].w19 + "', Spas = '" + warray[player.ID].w20 + "', Stubby = '" + warray[player.ID].w21 + "', Tec9 = '" + warray[player.ID].w22 + "', Uzi = '" + warray[player.ID].w23 + "', Ingrams = '" + warray[player.ID].w24 + "', MP5 = '" + warray[player.ID].w25 + "', M4 = '" + warray[player.ID].w26 + "', Ruger = '" + warray[player.ID].w27 + "', SniperRifle = '" + warray[player.ID].w28 + "', LaserScope = '" + warray[player.ID].w29 + "', RocketLauncher = '" + warray[player.ID].w30 + "', FlameThrower = '" + warray[player.ID].w31 + "', M60 = '" + warray[player.ID].w32 + "', Minigun = '" + warray[player.ID].w33 + "', WHERE Name='" + player.Name + "'" );
- QuerySQL( db,"UPDATE Bstats SET Body='" + barray[player.ID].b0 + "', Torso = '" + barray[player.ID].b1 + "', LeftArm = '" + barray[player.ID].b2 + "', RightArm = '" + barray[player.ID].b3 + "', LeftLeg= '" + barray[player.ID].b4 + "', RightLeg = '" + barray[player.ID].b5 + "', Head = '" + barray[player.ID].b6 + "', WHERE Name='" + player.Name + "'" );
- //======== Duel Zone functions =========
- if ( status[ player.ID ].Duel == true )
- {
- status[ player.ID ].Duel = false;
- status[ player.ID ].LastPos = null;
- DuelCount--;
- ServerMessage( "[DUEL] - "+RED+""+player.Name+" "+WHITE+"has been removed from Duel arena "+RED+"(Quit)." );
- }
- //======= LMS functions ==========
- DeathLMS( player );
- LMSS[ player.ID ] = LMSI();
- //==========Spree Functions======
- EndKillingSpree(player,255);
- SetPlayerSpree(player);
- //==========Team System==========
- if ( pinfo[ player.ID ].Team == true )
- {
- local plr = FindPlayer( pinfo[ player.ID ].Partner );
- if ( plr )
- SendMessage( plr, "[!] " + player.Name + " left the team." );
- pinfo[ plr.ID ].Partner = null;
- pinfo[ plr.ID ].Team = true;
- pinfo[ player.ID ] = null;
- }
- print("** " + player + " has left the game. ( " + Text + " ) at " + GetFullTime() + ".");
- ServerMessage("[PART] - [#FFFFFF][ "+player.Name+" ] left the server ( "+ Text +" )" );
- EchoMessage( ICOL_GREY+" [PART] "+ICOL_GREEN+" [" + player.ID + "] "+ICOL_LBLUE+" "+player.Name+" left the server "+ICOL_BROWN+"( "+ Text +" )" );
- }
Add Comment
Please, Sign In to add comment