CUI (2)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

  • Gets called when an UI is about to be sent to a player.

  • Called when the player attempts to use a custom UI.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CuiHelper.AddUi of Carbon.Common.dll.

Example
object CanUseUI(BasePlayer player, string json)
{
    Puts("CanUseUI was called!");
    return (bool) null;
}
  • Gets called when an UI is being destroyed on a client.

  • `name` is the name of the client panel.

  • Called when a custom UI is destroyed for the player.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches CuiHelper.DestroyUi of Carbon.Common.dll.

Example
void OnDestroyUI(BasePlayer player, string name)
{
    Puts("OnDestroyUI was called!");
}

Last updated