FormatActivitySource

Last Updated2016-05-21
Created At2008-09-26

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.

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

Parameters

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

bool 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.

Error

Invalid client index or client not connected.