I want to inform the players, that the Patrolheli was killed or the Patrolheli has leaved the island. Sounds easy ... but in this case i always got the information that the Heli was killed although it just leaves the island... pls. help! 😩
void Broadcast(string msg, params object[] args)
{
PrintToChat(msg, args);
}
void OnEntityLeave(TriggerBase trigger, BaseEntity entity)
{
if (entity is BaseHelicopter)
{
Broadcast("Patrolheli leaves.");
}
}
void OnEntityKill(BaseNetworkable entity)
{
if (entity is BaseHelicopter)
{
Broadcast("Patrolheli was killed.");
}
}