C#:
using UnityEngine;
namespace Oxide.Plugins {
[Info("MAPLOCK", "bmgjet", "1.0.0")]
[Description("LOCK SERVER UP WITH A INVALID ENTITY, PROVIDE LOCATION TO REMOVE IT FROM")]
public class MAPLOCK : RustPlugin {
Vectoܣ MapLockLocation = new Vector3(960f, 50f, 100f);
//LOCATION OF PREFAB THAT LOCKS THE SERVER UP!!!!!!!!!!!!!!!!!
void OnWorldPrefabSpawned(GameObject gameObject, string str) {
BaseEntity component = gameObject.GetComponent<BaseEntity>();
if (component != null) {
if (component.OwnerID == 0 && component.transform.position == MapLockLocation && MapLockLocation != new Vectoܣ(0, 0, 0)) {
component.Kill();
return;
}
}
}
}
}