OnCowMilked
OxideCarbonAnimalvoid OnCowMilked(Rust.Ai.Gen2.Cow cow, BasePlayer player, object l1)Works — the game method in this build is the one the hook was written for.
Parameters
- cow
- Rust.Ai.Gen2.Cow
- player
- BasePlayer
- l1
- object
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnCowMilked(Rust.Ai.Gen2.Cow cow, BasePlayer player, object l1)
{
Puts("OnCowMilked");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
bool Rust.Ai.Gen2.Cow.TryMilk(BasePlayer)
Passes: Rust.Ai.Gen2.Cow cow, BasePlayer player, object l1
WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, a0, l1)Assembly-CSharp.dll
Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.