Deathmax

Untitled

Jun 4th, 2011
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1.                 else if (e.MsgID == 0x30)
  2.                 {
  3.                     int x;
  4.                     int y;
  5.                     byte liquid;
  6.                     bool lava;
  7.                     using (var br = new BinaryReader(new MemoryStream(e.Msg.readBuffer, e.Index, e.Length)))
  8.                     {
  9.                         x = br.ReadInt32();
  10.                         y = br.ReadInt32();
  11.                         liquid = br.ReadByte();
  12.                         lava = br.ReadBoolean();
  13.                     }
  14.                     if (ConfigurationManager.spawnProtect)
  15.                         if (!players[e.Msg.whoAmI].IsAdmin())
  16.                         {
  17.                             var flag = CheckSpawn(x, y);
  18.                             if (flag)
  19.                             {
  20.                                 Tools.SendMessage(e.Msg.whoAmI, "The spawn is protected!", new float[] { 255f, 0f, 0f });
  21.                                 e.Handled = true;
  22.                             }
  23.                         }
  24.                 }
Advertisement
Add Comment
Please, Sign In to add comment