Rust Mute autoturrets

Discussion in 'Plugin Requests' started by ScHigGn, Aug 15, 2016.

  1. Hey guys,

    is there a way to mute autoturrets. That all players dont hear the "search" sound of them?
    ideally not global for all turrets. Only some admin chossen turrets.
     
  2. I am currently not at my PC to test this but it should work.

    Code:
    void OnEntitySpawned(BaseNetworkable entity)
    {
        var autoTurret = entity as AutoTurrent;
        var player = autoTurrent.creatorEntity as Player;
        if(player != null && autoTurrent != null && player?.net?.connection != null && player.net.connection.authLevel == 2)
            autoTurrent.turnLoop.audioSource.mute = true;
    }
    
     
  3. Could you make this into a completed addon when you get a chance... I run a modded server and know players who have 50+ on a base
    [DOUBLEPOST=1471289735][/DOUBLEPOST]possibly make a version to mute all for all players.. like a toggle
     
  4. Out of curiosity, has anyone tested this? It's something I would expect to be client side, but it would be cool if it worked.
     
  5. I will be able to test this in the morning.
     
  6. I can also test this soon.