AMX Mod X API Documentation

Signature
native HamHook:RegisterHam(Ham:function, const EntityClass[], const Callback[], Post = 0, bool:specialbot = false);
Description

Hooks the virtual table for the specified entity class.

An example would be: RegisterHam(Ham_TakeDamage, "player", "player_hurt");

Look at the Ham enum for parameter lists.

Parameters
  • function The function to hook.
  • EntityClass The entity classname to hook.
  • Callback The forward to call.
  • Post Whether or not to forward this in post.
  • specialbot Whether or not to enable support for bot without "player" classname.
Returns

Returns a handle to the forward. Use EnableHamForward/DisableHamForward to toggle the forward on or off.

Назад
Верх