Anti playerbreaker
This would keep you safe.
is all client side.
this well destroy all Structure / Vehicle / Explosive.
you also can add Animal Zombie Item......any things
Code:
using System.Reflection;
{
SpawnStructures ss = GameObject.FindObjectOfType<SpawnStructures>();
FieldInfo[] fis = typeof(SpawnStructures).GetFields();
foreach (FieldInfo fi in fis)
{
if (fi.FieldType.Equals(typeof(List<GameObject>)))
{
List<GameObject> list = (List<GameObject>)fi.GetValue(ss);
foreach (GameObject o in list)
{
UnityEngine.Object.Destroy(o);
}
}
}
}
{
Type type = typeof(Vehicle);
MonoBehaviour[] objects = UnityEngine.MonoBehaviour.FindObjectsOfType(type) as MonoBehaviour[];
foreach (MonoBehaviour o in objects)
{
UnityEngine.Object.Destroy(o.transform.parent.gameObject);
}
}
{
MonoBehaviour[] objects = UnityEngine.MonoBehaviour.FindObjectsOfType(typeof(Explosive)) as MonoBehaviour[];
foreach (MonoBehaviour o in objects)
{
UnityEngine.Object.Destroy(o.transform.parent.gameObject);
}
}
this well destroy all Structure / Vehicle / Explosive.
you also can add Animal Zombie Item......any things


Also it despawns them.