GameRules_GetProp Function

Retrieves an integer value from a property of the gamerules entity.

int GameRules_GetProp(const char[] prop, int size, int element)

Parameters

const char[] prop

Property name.

int size

Number of bytes to read (valid values are 1, 2, or 4). This value is auto-detected, and the size parameter is only used as a fallback in case detection fails.

int element

Element # (starting from 0) if property is an array.

Return Value

Value at the given property offset.

Errors

Prop type is not an integer, or lack of mod support.