AMX Mod X API Documentation

Signature
native read_data(value, any:...);
Description

Retrieves values from a client message.

Notes
  • For use within callbacks registered with register_event_ex()
  • Usage examples:

    value = read_data(1);

    read_data(2, floatvalue);

    written = read_data(3, buffer, buffersize);

Parameters
  • value Argument number to retrieve value from
  • ... Changes the native's behavior depending on how many

    additional parameters are provided:

    0 - Return the argument integer value directly

    1 - Store the argument float value in the variable passed

    as the second parameter

    2 - Copy the argument string value to the buffer provided

    in the second parameter, using the third as the

    maximum buffer size

Returns

Changes depending on how many additional parameters are

provided:

0 - Returns the argument integer value

1 - Returns the argument float value, converted

(truncated) to an integer

2 - Returns the number of cells written to the buffer

Назад
Верх