public void Dm(IAltPlayer player) { player.SendChatMessage(player.DmMode ? "{00FF00} Respawning in Death Match Zone disabled!" : "{00FF00}Respawning in Death Match Zone enabled!"); player.DmMode = !player.DmMode; if (player.DmMode) { var weapons = Misc.WhitelistedWeapons; foreach (var weapon in weapons) { player.GiveWeapon(weapon, 1000, false); } var randomSpawnPoint = Misc.AirportSpawnPositions.ElementAt(_random.Next(0, Misc.AirportSpawnPositions.Length)); player.Spawn(randomSpawnPoint + new Position(_random.Next(0, 10), _random.Next(0, 10), 0)); } player.Emit("set_last_command"); }
public void Respawn(IAltPlayer player) { player.Spawn(player.Position); }