ServerCommandEx Function

Executes a server command as if it were on the server console (or RCON) and stores the printed text into buffer.

Warning: This calls ServerExecute internally and may have issues if certain commands are in the buffer, only use when you really need the response. Also, on L4D2 this will not print the command output to the server console.

void ServerCommandEx(char[] buffer, int maxlen, const char[] format, any... ...)

Parameters

char[] buffer

String to store command result into.

int maxlen

Length of buffer.

const char[] format

Formatting rules.

any... ...

Variable number of format parameters.