SetEntData Function

Peeks into an entity's object data and sets the integer value at the given offset.

void SetEntData(int entity, int offset, any value, int size, bool changeState)

Parameters

int entity

Edict index.

int offset

Offset to use.

any value

Value to set.

int size

Number of bytes to write (valid values are 1, 2, or 4).

bool changeState

If true, change will be sent over the network.

Errors

Invalid entity or offset out of reasonable bounds.