Deathmax

Untitled

Sep 16th, 2011
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.16 KB | None | 0 0
  1.         public static bool allowpacket = false;
  2.         public static int invisclient = 0;
  3.         void NetHooks_SendData(SendDataEventArgs e)
  4.         {
  5.             if (e.MsgID == PacketTypes.PlayerUpdate)
  6.             {
  7.                 if (e.number == invisclient && !allowpacket)
  8.                     e.Handled = true;
  9.                 if (allowpacket)
  10.                     allowpacket = false;
  11.             }
  12.             switch (e.MsgID)
  13.             {
  14.                 case PacketTypes.DoorUse:
  15.                 case PacketTypes.EffectHeal:
  16.                 case PacketTypes.EffectMana:
  17.                 case PacketTypes.PlayerDamage:
  18.                 case PacketTypes.Zones:
  19.                 case PacketTypes.PlayerAnimation:
  20.                 case PacketTypes.PlayerTeam:
  21.                     if (e.number == invisclient)
  22.                         e.Handled = true;
  23.                     break;
  24.             }
  25.         }
  26.  
  27.         void command(CommandArgs args)
  28.         {
  29.             args.Player.TPlayer.position = new PointF(0f, 0f);
  30.             TSPlayer.All.SendData(PacketTypes.PlayerUpdate, "", args.Player.Index);
  31.             invisclient = args.Player.Index;
  32.         }
Advertisement
Add Comment
Please, Sign In to add comment