From 2e7980f650704e7e24f977491964ecfcafe93605 Mon Sep 17 00:00:00 2001 From: Shank Date: Wed, 1 Jun 2011 21:10:06 -0600 Subject: [PATCH] Added /maxspawns Added /spawnrate --- TShockAPI/TShock.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 381795b2..aeda4ffb 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -426,7 +426,17 @@ namespace TShockAPI } if (msg.Length > 10 && msg.Substring(0, 10) == "/maxspawns") { - + int amount = Convert.ToInt32(msg.Remove(0, 10)); + NPC.maxSpawns = amount; + Tools.Broadcast(Tools.FindPlayer(ply) + " changed the maximum spawns to: " + amount); + handler.Handled = true; + } + if (msg.Length > 10 && msg.Substring(0, 10) == "/spawnrate") + { + int amount = Convert.ToInt32(msg.Remove(0, 10)); + NPC.spawnRate = amount; + Tools.Broadcast(Tools.FindPlayer(ply) + " changed the spawn rate to: " + amount); + handler.Handled = true; } } if (msg == "/help")