register_native
- Синтаксис
-
native register_native(const name[], const handler[], style = 0);
Переменная | Описание |
---|---|
name |
Native name |
handler |
Callback function |
style |
Native style |
- Описание
- Registers a native.
- Пометка
-
Style 0 natives call the handler in the following manner: public native_handler(plugin_id, argc) plugin_id - plugin calling the native argc - number of parameters
- Пометка
-
Style 1 natives are deprecated. Plugins should not use them, they might break.
- Пометка
-
Style 1 natives work a little different. Instead of passing plugin id and number of parameters, the handler should be prototyped just like the native would be called. For each by-reference parameter, the plugin then has to use param_convert() to properly use them.
- Пометка
-
A native should *never* recurse. Bad things will happen.
- Возвращает
- Функция ничего не возвращает