OnTurretAuthorize
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private object OnTurretAuthorize( AutoTurret instance, BasePlayer player )
{
Puts( "OnTurretAuthorize works!" );
return null;
}Location
- AutoTurret::AddSelfAuthorize(BasePlayer player)
csharp
private void AddSelfAuthorize(BasePlayer player)
{
if (!IsOnline() && player.CanBuild() && !AtMaxAuthCapacity() && Interface.CallHook("OnTurretAuthorize", this, player) == null)
{
authorizedPlayers.Add(player.userID);
Facepunch.Rust.Analytics.Azure.OnEntityAuthChanged(this, player, authorizedPlayers, "added", player.userID);
UpdateMaxAuthCapacity();
SendNetworkUpdate();
//---