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

Function sm_GetConVarBool

core/smn_console.cpp:330–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330static cell_t sm_GetConVarBool(IPluginContext *pContext, const cell_t *params)
331{
332 Handle_t hndl = static_cast<Handle_t>(params[1]);
333 HandleError err;
334 ConVar *pConVar;
335
336 if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar))
337 != HandleError_None)
338 {
339 return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err);
340 }
341
342 return pConVar->GetBool();
343}
344
345static cell_t sm_GetConVarInt(IPluginContext *pContext, const cell_t *params)
346{

Callers

nothing calls this directly

Calls 2

ReadConVarHandleMethod · 0.80
GetBoolMethod · 0.80

Tested by

no test coverage detected