summaryrefslogtreecommitdiff
path: root/sourcemod-1.5-dev/scripting/include/smlib/dynarrays.inc
blob: 8a16011eefbb83faddb707460f587d2a380bcb65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
}