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