SetEntDataString Function

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

int SetEntDataString(int entity, int offset, const char[] buffer, int maxlen, bool changeState)

Parameters

int entity

Edict index.

int offset

Offset to use.

const char[] buffer

String to set.

int maxlen

Maximum length of bytes to write.

bool changeState

If true, change will be sent over the network.

Return Value

Number of non-null bytes written.

Errors

Invalid entity or offset out of reasonable bounds.