OnPlayerPingsSend
OxideCarbonPlayerCalled when player pings send occurs.
void OnPlayerPingsSend(BasePlayer basePlayer, object v0)Works — the game method in this build is the one the hook was written for.
Parameters
- basePlayer
- BasePlayer
- v0
- object
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnPlayerPingsSend(BasePlayer basePlayer, object v0)
{
Puts("OnPlayerPingsSend");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void BasePlayer.SendPingsToClient()
Passes: BasePlayer basePlayer, object v0
WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, v0)Assembly-CSharp.dll
Where it is called (this branch's game code)
private void SendPingsToClient()
{
using MapNoteList mapNoteList = Pool.Get<MapNoteList>();
mapNoteList.notes = Pool.Get<List<MapNote>>();
mapNoteList.notes.AddRange(State.pings);
Interface.CallHook("OnPlayerPingsSend", this, v0);
ClientRPC(RpcTarget.Player("Client_ReceivePings", this), mapNoteList);
mapNoteList.notes.Clear();
}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.