AMX Mod X API Documentation

Signature
native register_touch(const Touched[], const Toucher[], const function[]);
Description

Registers a function to be called on a touch action between entities of

specified classes.

Notes
  • The function will be called in the following manner:

    public touch_handler(touched, toucher)

    touched - Index of entity being touched

    toucher - Index of entity touching

  • The callback should return PLUGIN_CONTINUE to ignore the touch,

    PLUGIN_HANDLED or higher to block it.

  • When returning PLUGIN_HANDLED from the callback, Engine will still fire

    other touch functions like the pfn_touch() forward before actually

    blocking the touch. To immediately block return PLUGIN_HANDLED_MAIN

    instead.

Parameters
  • Touched Entity classname being touched, "*" or "" for any class
  • Toucher Entity classname touching, "*" or "" for any class
  • function Name of callback function
Returns

Touch forward id

Назад
Верх