MuhammadZeeshan

asfas fasf asf

Dec 5th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. function onPlayerPart( player, reason )
  2. {
  3. if ( ( GetLevel( player ) > 0 ) && ( status[ player.ID ].Logged == true ) )
  4. {
  5.  
  6. //====saves players stats.=========
  7.  
  8. SaveStatus( player );
  9.  
  10.  
  11. //===saves the last join T.========
  12.  
  13. lastjoin( player );
  14. }
  15.  
  16.  
  17. //==Part Reason? ==================
  18.  
  19. local Text = "Unknown"
  20. switch ( reason )
  21. {
  22. case PARTREASON_DISCONNECTED:
  23. Text = "Disconnected";
  24. break;
  25. case PARTREASON_TIMEOUT:
  26. Text = "Timeout";
  27. break;
  28. case PARTREASON_QUIT:
  29. Text = "Quit";
  30. break;
  31. case PARTREASON_KICKED:
  32. Text = "Kicked";
  33. break;
  34. case PARTREASON_CRASHED:
  35. Text = "Crashed";
  36. break;
  37. }
  38. // =========== wstats and bstats functions ==========
  39. 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 + "'" );
  40. 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 + "'" );
  41.  
  42. //======== Duel Zone functions =========
  43. if ( status[ player.ID ].Duel == true )
  44. {
  45. status[ player.ID ].Duel = false;
  46. status[ player.ID ].LastPos = null;
  47. DuelCount--;
  48. ServerMessage( "[DUEL] - "+RED+""+player.Name+" "+WHITE+"has been removed from Duel arena "+RED+"(Quit)." );
  49. }
  50.  
  51. //======= LMS functions ==========
  52. DeathLMS( player );
  53. LMSS[ player.ID ] = LMSI();
  54.  
  55. //==========Spree Functions======
  56. EndKillingSpree(player,255);
  57. SetPlayerSpree(player);
  58.  
  59. //==========Team System==========
  60. if ( pinfo[ player.ID ].Team == true )
  61. {
  62. local plr = FindPlayer( pinfo[ player.ID ].Partner );
  63. if ( plr )
  64. SendMessage( plr, "[!] " + player.Name + " left the team." );
  65. pinfo[ plr.ID ].Partner = null;
  66. pinfo[ plr.ID ].Team = true;
  67. pinfo[ player.ID ] = null;
  68. }
  69.  
  70. print("** " + player + " has left the game. ( " + Text + " ) at " + GetFullTime() + ".");
  71. ServerMessage("[PART] - [#FFFFFF][ "+player.Name+" ] left the server ( "+ Text +" )" );
  72. EchoMessage( ICOL_GREY+" [PART] "+ICOL_GREEN+" [" + player.ID + "] "+ICOL_LBLUE+" "+player.Name+" left the server "+ICOL_BROWN+"( "+ Text +" )" );
  73. }
Add Comment
Please, Sign In to add comment