| 840 | } |
| 841 | |
| 842 | static cell_t sm_GetCmdArg(IPluginContext *pContext, const cell_t *params) |
| 843 | { |
| 844 | const ICommandArgs *pCmd = g_HL2.PeekCommandStack(); |
| 845 | |
| 846 | if (!pCmd) |
| 847 | { |
| 848 | return pContext->ThrowNativeError("No command callback available"); |
| 849 | } |
| 850 | |
| 851 | size_t length; |
| 852 | |
| 853 | const char *arg = pCmd->Arg(params[1]); |
| 854 | |
| 855 | pContext->StringToLocalUTF8(params[2], params[3], arg ? arg : "", &length); |
| 856 | |
| 857 | return (cell_t)length; |
| 858 | } |
| 859 | |
| 860 | static cell_t sm_GetCmdArgString(IPluginContext *pContext, const cell_t *params) |
| 861 | { |
nothing calls this directly
no test coverage detected