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

Function sm_GetCmdArgString

core/smn_console.cpp:860–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858}
859
860static cell_t sm_GetCmdArgString(IPluginContext *pContext, const cell_t *params)
861{
862 const ICommandArgs *pCmd = g_HL2.PeekCommandStack();
863
864 if (!pCmd)
865 {
866 return pContext->ThrowNativeError("No command callback available");
867 }
868
869 const char *args = pCmd->ArgS();
870 size_t length;
871
872 if (!args)
873 {
874 args = "";
875 }
876
877 pContext->StringToLocalUTF8(params[1], params[2], args, &length);
878
879 return (cell_t)length;
880}
881
882char *g_ServerCommandBuffer = NULL;
883cell_t g_ServerCommandBufferLength;

Callers

nothing calls this directly

Calls 2

PeekCommandStackMethod · 0.80
ArgSMethod · 0.45

Tested by

no test coverage detected