//NoHelicopter, NoCorpse, DestroyTurrets of Corpse Owner
private readonly string heliPrefab = "assets/prefabs/npc/patrol helicopter/patrolhelicopter.prefab";
private readonly string corpsePrefab = "assets/prefabs/player/player_corpse.prefab";
private uint heliPrefabId;
private uint corpsePrefabId;
void OnEntitySpawned(BaseNetworkable entity)
{
heliPrefabId = StringPool.Get(heliPrefab);
corpsePrefabId = StringPool.Get(corpsePrefab);
if (entity == null) return;
if (entity.prefabID == heliPrefabId)
{
entity.Kill();
Puts("NoHeli : Patrol Stopped!");
}
if (entity.prefabID == corpsePrefabId)
{
//var corpseOwner = entity.OwnerID;
//check for turrets in game
// {
// if turretFound.OwnerID == corpseOwner;
// entity.kill();
// }
entity.Kill();
Puts("Corpse Deleted");
}
}