> > > >

register_event | amxmodx | AMX X Документация

Инклуды

    1. Stocks
    1. Нативы
    2. Форварды
    1. Нативы
    2. Stocks
    1. Нативы
    2. Stocks
    1. Нативы
    1. Нативы
    2. Stocks
    1. Нативы
    1. Нативы
    2. Форварды
    3. Stocks
    1. Нативы
    2. Форварды
    1. Нативы
    1. Нативы
    1. Нативы
    2. Stocks
    1. Нативы
    2. Форварды
    1. Нативы
    1. Нативы
    2. Форварды
    1. Нативы
    2. Форварды
    1. Stocks
    1. Нативы
    1. Нативы
    2. Stocks
    1. Stocks
    1. Stocks
    1. Нативы
    1. Нативы
    2. Форварды
    3. Stocks
    1. Нативы
    1. Нативы
    1. Нативы
    1. Нативы
    2. Stocks
    1. Нативы
    1. Нативы
    1. Stocks
    1. Нативы
    1. Нативы
    1. Нативы
    2. Форварды
    1. Нативы
    1. Нативы
    1. Нативы
    1. Нативы
    1. Нативы
    1. Нативы
    1. Нативы
    2. Форварды
    1. Нативы
    2. Stocks
    1. Нативы
    1. Нативы
    1. Нативы
    2. Stocks
    1. Нативы
    1. Stocks
    1. Нативы
    1. Нативы
    1. Нативы
    1. Нативы
    2. Форварды
    3. Stocks
    1. Stocks
    1. Нативы
    2. Форварды
    3. Stocks
    1. Нативы
    1. Нативы
    2. Форварды
    3. Stocks
    1. Нативы
    1. Нативы
    2. Stocks
    1. Stocks

register_event

Синтаксис
								native register_event(const event[], const function[], const flags[], const cond[] = "", ...);
							
Переменная Описание
event
Name of event that should be hooked
function
Name of callback function
flags
Flags used for filtering events, the valid flags are:
"a" - Global event (sent to every client)
"b" - Event sent to single client
"c" - Call only once when repeated to multiple clients
"d" - Call only if sent to dead client
"e" - Call only if sent to alive client
"f" - Call only if sent to human client ("b" flag required)
"g" - Call only if sent to bot ("b" flag required)
cond
Condition string used for filtering events, built as:
"<argument number><comparison operator><value>"
Argument number is the argument position to be filtered
The comparison operator may be:
  - "=" for equality comparison (all argument types)
  - "!" for inequality comparison (all argument types)
  - "&" for bitwise and (int argument) or substring
    comparison (string argument)
  - "<" for less than comparison (int/float arguments)
  - ">" for greater than comparison (int/float arguments)
The argument is compared to the specified value accordingly
...
Any number of additional conditions

Описание
Registers a function to be called on a given game event.

Примечание
Please consider using register_event_ex() instead which allows you to
use named constants for flags instead of letters.

Примечание
Examples for event conditions:
"2=c4" - Second parameter of message must be the string "c4"
"3>10" - Third parameter of message must be greater than 10
"3!4" - Third parameter of message must not be equal to 4
"2&Buy" - Second parameter of message must contain "Buy" substring
"2!Buy" - Second parameter of message must not equal "Buy"

Примечание
Due to a long-standing bug that would break compatibility with older
plugins, the client id should be checked for alive/dead state if using
flags "d" or "e".

Примечание
If multiple conditions are specified for a single parameter, only one
of them has to hold true for the event function to be called.

Возвращает
Event handle
> > > >