GameRules_GetPropEnt Function

Retrieves a entity index from a property of the gamerules entity.

int GameRules_GetPropEnt(const char[] prop, int element)

Parameters

const char[] prop

Property name.

int element

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

Return Value

Entity index at the given property. If there is no entity, or the entity is not valid, then -1 is returned.

Errors

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