internal static void Spawn(Player dst, Player p, byte id, ushort x, ushort y, ushort z, byte rotx, byte roty, string possession = "") { if (!Server.zombie.Running || !p.Game.Infected) { string col = p.color; if (col.Length >= 2 && !Colors.IsStandardColor(col[1]) && !dst.HasCpeExt(CpeExt.TextColors)) { col = "&" + Colors.GetFallback(col[1]); } string group = p.Game.Referee ? "&2Referees" : "&fPlayers"; if (dst.hasExtList) { dst.SendExtAddEntity2(id, p.skinName, col + p.truename + possession, x, y, z, rotx, roty); dst.SendExtAddPlayerName(id, p.skinName, col + p.truename, group, 0); } else { dst.SendSpawn(id, col + p.truename + possession, x, y, z, rotx, roty); } return; } string name = p.truename, skinName = p.skinName; if (ZombieGame.ZombieName != "" && !dst.Game.Aka) { name = ZombieGame.ZombieName; skinName = name; } if (dst.hasExtList) { dst.SendExtAddEntity2(id, skinName, Colors.red + name + possession, x, y, z, rotx, roty); dst.SendExtAddPlayerName(id, skinName, Colors.red + name, "&cZombies", 0); } else { dst.SendSpawn(id, Colors.red + name + possession, x, y, z, rotx, roty); } if (dst.hasChangeModel && id != 0xFF) { dst.SendChangeModel(id, ZombieGame.ZombieModel); } }
/// <summary> Adds the given bot to that player's tab list (if their client support it). </summary> public static void Add(Player dst, PlayerBot b) { if (!dst.hasExtList) { return; } dst.SendExtAddPlayerName(b.id, b.SkinName, b.color + b.name, "Bots", 0); }
internal static void Spawn(Player dst, PlayerBot b) { if (dst.hasExtList) { dst.SendExtAddEntity2(b.id, b.skinName, b.color + b.name, b.pos[0], b.pos[1], b.pos[2], b.rot[0], b.rot[1]); dst.SendExtAddPlayerName(b.id, b.skinName, b.color + b.name, "Bots", 0); } else { dst.SendSpawn(b.id, b.color + b.skinName, b.pos[0], b.pos[1], b.pos[2], b.rot[0], b.rot[1]); } }
/// <summary> Adds the given player to that player's tab list (if their client supports it). </summary> public static void Add(Player dst, Player p, byte id) { if (!dst.hasExtList) { return; } byte grpPerm = (byte)(offset - p.Rank); if (!Server.TablistRankSorted) { grpPerm = 0; } string name, group; GetEntry(p, dst, out name, out group); dst.SendExtAddPlayerName(id, p.truename, name, group, grpPerm); }