MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / sm_GetCommandLine

Function sm_GetCommandLine

core/smn_commandline.cpp:34–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "HalfLife2.h"
33
34static cell_t sm_GetCommandLine(IPluginContext *pCtx, const cell_t *params)
35{
36 ICommandLine *pCmdLine = g_HL2.GetValveCommandLine();
37
38 if (pCmdLine == NULL)
39 {
40 return pCtx->ThrowNativeError("Unable to get valve command line");
41 }
42
43 const char *commandLine = pCmdLine->GetCmdLine();
44
45 if (commandLine == NULL)
46 {
47 return 0;
48 }
49
50 pCtx->StringToLocal(params[1], params[2], commandLine);
51
52 return 1;
53}
54
55static cell_t sm_GetCommandLineParam(IPluginContext *pCtx, const cell_t *params)
56{

Callers

nothing calls this directly

Calls 1

GetValveCommandLineMethod · 0.80

Tested by

no test coverage detected