Skip to content

OnRfFrequencyChanged

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnRfFrequencyChanged( Detonator instance, int freq, BasePlayer player )
{
    Puts( "OnRfFrequencyChanged works!" );
}
csharp
private void OnRfFrequencyChanged( PagerEntity instance, int num, BasePlayer player )
{
    Puts( "OnRfFrequencyChanged works!" );
}
csharp
private void OnRfFrequencyChanged( RFBroadcaster instance, int num, BasePlayer player )
{
    Puts( "OnRfFrequencyChanged works!" );
}
csharp
private void OnRfFrequencyChanged( RFReceiver instance, int num, BasePlayer player )
{
    Puts( "OnRfFrequencyChanged works!" );
}

Location

  • Detonator::ServerSetFrequency(BasePlayer player, int freq)
  • PagerEntity::ServerSetFrequency(BaseEntity/RPCMessage msg)
  • RFBroadcaster::ServerSetFrequency(BaseEntity/RPCMessage msg)
  • RFReceiver::ServerSetFrequency(BaseEntity/RPCMessage msg)
csharp
//---
	}
	if (ownerItem != null)
	{
		ownerItem.LoseCondition(ownerItem.maxCondition * 0.01f);
	}
	Interface.CallHook("OnRfFrequencyChanged", this, freq, player);
}
csharp
//---
		return;
	}
	RFManager.ChangeFrequency(this.frequency, num, this, true, true);
	this.frequency = num;
	base.SendNetworkUpdateImmediate(false);
	Interface.CallHook("OnRfFrequencyChanged", this, num, msg.player);
}
csharp
//---
	}
	this.frequency = num;
	this.MarkDirty();
	base.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
	base.Hurt(this.MaxHealth() * 0.01f, Rust.DamageType.Decay, this, true);
	Interface.CallHook("OnRfFrequencyChanged", this, num, msg.player);
}
csharp
//---
	num = RFManager.ClampFrequency(num);
	RFManager.ChangeFrequency(this.frequency, num, this, true, true);
	this.frequency = num;
	this.MarkDirty();
	base.SendNetworkUpdate(BasePlayer.NetworkQueue.Update);
	Interface.CallHook("OnRfFrequencyChanged", this, num, msg.player);
}

Released under the MIT License.