Difference between revisions of "CCommand"
Jump to navigation
Jump to search
Outerbeast (talk | contribs) (Created page with "CCommand is a container class that stores command arguments, typically those from console commands or game chat. Type: Reference type. {| class="wikitable" style="vertical-a...") |
(No difference)
|
Revision as of 20:46, 5 April 2025
CCommand is a container class that stores command arguments, typically those from console commands or game chat.
Type: Reference type.
| Method | Description |
|---|---|
| int ArgC() const | Gets the number of arguments. |
| string GetCommandString() const | Gets the entire command as a string. |
| string GetArgumentsString() const | Gets all arguments as a single string. |
| string Arg(const int iIndex) const | Gets the argument by index. |
| string opIndex(const int iIndex) const | Gets the argument by index. |
| string FindArg(const string& in szArgument) const | Find a value for a given argument. If the argument does not exist or has no value, an empty string is returned. Otherwise, returns the value. |
| int FindIntArg(const string& in szArgument, const int iDefault = 0) const | Find an int value for a given argument. Returns iDefault if no such argument exists, or no value exists for it. Otherwise, returns the value, converted to an int. |