GameRules_GetProp

Last Updated2021-06-24
Created At2011-07-06

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

native int GameRules_GetProp(const char[] prop, int size = 4, int element = 0)

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

int Value at the given property offset.

Error

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