Added /maxspawns
Added /spawnrate
This commit is contained in:
parent
0ac875b75b
commit
2e7980f650
1 changed files with 11 additions and 1 deletions
|
|
@ -426,7 +426,17 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
if (msg.Length > 10 && msg.Substring(0, 10) == "/maxspawns")
|
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")
|
if (msg == "/help")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue