FormatActivitySource Function

Given an originating client and a target client, returns the string that describes the originating client according to the sm_show_activity cvar.

For example, "ADMIN", "PLAYER", or a player's name could be placed in this buffer.

bool FormatActivitySource(int client, int target, const char[] namebuf, int maxlength)


int client

Originating client; may be 0 for server console.

int target

Targeted client.

const char[] namebuf

Name buffer.

int maxlength

Maximum size of the name buffer.

Return Value

True if activity should be shown. False otherwise. In either case, the name buffer is filled. The return value can be used to broadcast a "safe" name to all players regardless of the sm_show_activity filters.


Invalid client index or client not connected.