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

Function sm_GetCommandLineParamFloat

core/smn_commandline.cpp:91–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91static cell_t sm_GetCommandLineParamFloat(IPluginContext *pCtx, const cell_t *params)
92{
93 ICommandLine *pCmdLine = g_HL2.GetValveCommandLine();
94
95 if (pCmdLine == NULL)
96 {
97 return pCtx->ThrowNativeError("Unable to get valve command line");
98 }
99
100 char *param = NULL;
101 pCtx->LocalToString(params[1], &param);
102
103 float value = pCmdLine->ParmValue(param, sp_ctof(params[2]));
104
105 return sp_ftoc(value);
106}
107
108static cell_t sm_FindCommandLineParam(IPluginContext *pCtx, const cell_t *params)
109{

Callers

nothing calls this directly

Calls 1

GetValveCommandLineMethod · 0.80

Tested by

no test coverage detected