GetCmdArg

Last Updated2007-09-13
Created At2007-02-17

Retrieves a command argument given its index, from the current console or server command.

Notes

Argument indexes start at 1; 0 retrieves the command name.

native int GetCmdArg(int argnum, char[] buffer, int maxlength)

Parameters

int argnum
Argument number to retrieve.
char[] buffer
Buffer to use for storing the string.
int maxlength
Maximum length of the buffer.

Return Value

int Length of string written to buffer.