Skip to content

OnPlayerInput

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnPlayerInput( BasePlayer instance, InputState serverInput )
{
    Puts( "OnPlayerInput works!" );
    return null;
}

Location

  • BasePlayer::OnReceiveTick(PlayerTick msg, bool wasPlayerStalled)
csharp
//---
	}
	if (serverInput.current.buttons != serverInput.previous.buttons)
	{
		ResetInputIdleTime();
	}
	if (Interface.CallHook("OnPlayerInput", this, serverInput) != null || IsReceivingSnapshot)
	{
		return;
	}
	if (IsSpectating())
	{
//---

Released under the MIT License.