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

Function sm_GetConVarString

core/smn_console.cpp:441–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441static cell_t sm_GetConVarString(IPluginContext *pContext, const cell_t *params)
442{
443 Handle_t hndl = static_cast<Handle_t>(params[1]);
444 HandleError err;
445 ConVar *pConVar;
446
447 if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar))
448 != HandleError_None)
449 {
450 return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err);
451 }
452
453 pContext->StringToLocalUTF8(params[2], params[3], pConVar->GetString(), NULL);
454
455 return 1;
456}
457
458static cell_t sm_SetConVarString(IPluginContext *pContext, const cell_t *params)
459{

Callers

nothing calls this directly

Calls 2

ReadConVarHandleMethod · 0.80
GetStringMethod · 0.45

Tested by

no test coverage detected