GameRules_SetProp Function

Sets an integer value for a property of the gamerules entity.

void GameRules_SetProp(const char[] prop, any value, int size, int element, bool changeState)

Parameters

const char[] prop

Property name.

any value

Value to set.

int size

Number of bytes to write (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.

bool changeState

This parameter is ignored.

Errors

Not supported.