Skip to content

OnVehiclePush

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnVehiclePush( BaseVehicle instance, BasePlayer player )
{
    Puts( "OnVehiclePush works!" );
}

Location

  • BaseVehicle::RPC_WantsPush(BaseEntity/RPCMessage msg)
csharp
//---
	}
	if (this.OnlyOwnerAccessible() && player != this.creatorEntity)
	{
		return;
	}
	if (Interface.CallHook("OnVehiclePush", this, msg.player) != null)
	{
		return;
	}
	player.metabolism.calories.Subtract(3f);
	player.metabolism.SendChangesToClient();
//---

Released under the MIT License.