diff options
| author | navewindre <nw@moneybot.cc> | 2023-11-13 14:28:08 +0100 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2023-11-13 14:28:08 +0100 |
| commit | da518fdc0f32839730ccdee8098b59c6f842d93f (patch) | |
| tree | d6f856a6148c0b4d5819f88f068b7287b8044513 /sourcemod-1.5-dev/scripting/include/smlib/dynarrays.inc | |
| parent | bc678b10830cdaef64bcc592ca2524ebe0fcdc45 (diff) | |
ya
Diffstat (limited to 'sourcemod-1.5-dev/scripting/include/smlib/dynarrays.inc')
| -rw-r--r-- | sourcemod-1.5-dev/scripting/include/smlib/dynarrays.inc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sourcemod-1.5-dev/scripting/include/smlib/dynarrays.inc b/sourcemod-1.5-dev/scripting/include/smlib/dynarrays.inc new file mode 100644 index 0000000..8a16011 --- /dev/null +++ b/sourcemod-1.5-dev/scripting/include/smlib/dynarrays.inc @@ -0,0 +1,24 @@ +#if defined _smlib_dynarray_included + #endinput +#endif +#define _smlib_dynarray_included + +#include <sourcemod> + +/** + * Retrieves a cell value from an array. + * This is a wrapper around the Sourcemod Function GetArrayCell, + * but it casts the result as bool + * + * @param array Array Handle. + * @param index Index in the array. + * @param block Optionally specify which block to read from + * (useful if the blocksize > 0). + * @param asChar Optionally read as a byte instead of a cell. + * @return Value read. + * @error Invalid Handle, invalid index, or invalid block. + */ +stock bool:DynArray_GetBool(Handle:array, index, block=0, bool:asChar=false) +{ + return bool:GetArrayCell(array, index, block, asChar); +} |
