GameRules_SetProp

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

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

native void GameRules_SetProp(const char[] prop, any value, int size = 4, int element = 0, bool changeState = false)

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.

Return Value

void

Error

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