SetEntPropEnt Function

Sets an entity index in an entity's property.

This function is considered safer and more robust over SetEntDataEnt*, because it performs strict offset checking and typing rules.

void SetEntPropEnt(int entity, PropType type, const char[] prop, int other, int element)

Parameters

int entity

Entity/edict index.

PropType type

Property type.

const char[] prop

Property name.

int other

Entity index to set, or -1 to unset.

int element

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

Errors

Invalid entity or offset out of reasonable bounds.