argument number to retrieve.
for example we need to make a command like sm_cvar <cvar> <value>
so need to do like this
PHP Code:
char cvar[64], cvarValue[32], buffer[96];
GetCmdArg(1, cvar, sizeof(cvar)); //get the first argument (cvar)
GetCmdArg(2, cvarValue, sizeof(cvarValue)); //get the second argument (value)
Format(buffer, sizeof(buffer), "%s %s", cvar, cvarValue); //format 2 chars to one
ServerCommand(buffer); //then execute the command and value from buffer char
return Plugin_Handled;