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

Function GetConVarDefault

core/smn_console.cpp:523–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523static cell_t GetConVarDefault(IPluginContext *pContext, const cell_t *params)
524{
525 Handle_t hndl = static_cast<Handle_t>(params[1]);
526 HandleError err;
527 ConVar *pConVar;
528
529 if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar))
530 != HandleError_None)
531 {
532 return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err);
533 }
534
535 size_t bytes;
536 pContext->StringToLocalUTF8(params[2], params[3], pConVar->GetDefault(), &bytes);
537
538 return bytes;
539}
540
541static cell_t sm_GetConVarFlags(IPluginContext *pContext, const cell_t *params)
542{

Callers

nothing calls this directly

Calls 1

ReadConVarHandleMethod · 0.80

Tested by

no test coverage detected