OnCuiDraggableDrag
OxideCarbonCommunityUICalled when cui draggable drag occurs.
void OnCuiDraggableDrag(BasePlayer player, string name, Vector3 position, CommunityEntity.DraggablePositionSendType type)Works — the game method in this build is the one the hook was written for.
Parameters
- player
- BasePlayer
- name
- string
- position
- Vector3
- type
- CommunityEntity.DraggablePositionSendType
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnCuiDraggableDrag(BasePlayer player, string name, Vector3 position, CommunityEntity.DraggablePositionSendType type)
{
Puts("OnCuiDraggableDrag");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void CommunityEntity.Hook_DragRPC(BasePlayer, string, Vector3, CommunityEntity.DraggablePositionSendType)
Passes: BasePlayer player, string name, Vector3 position, CommunityEntity.DraggablePositionSendType type
WorksReturnBehavior: ContinueArgumentBehavior: JustParamsAssembly-CSharp.dll
Where it is called (this branch's game code)
private void Hook_DragRPC(BasePlayer player, string name, Vector3 position, DraggablePositionSendType type)
{
Interface.CallHook("OnCuiDraggableDrag", player, name, position, type);
}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.