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

Function sm_LogToGame

core/logic/smn_filesystem.cpp:909–934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

907}
908
909static cell_t sm_LogToGame(IPluginContext *pContext, const cell_t *params)
910{
911 g_pSM->SetGlobalTarget(SOURCEMOD_SERVER_LANGUAGE);
912
913 size_t len;
914 char buffer[1024];
915 {
916 DetectExceptions eh(pContext);
917 len = g_pSM->FormatString(buffer, sizeof(buffer), pContext, params, 1);
918 if (eh.HasException())
919 return 0;
920 }
921
922 if (len >= sizeof(buffer)-2)
923 {
924 buffer[1022] = '\n';
925 buffer[1023] = '\0';
926 } else {
927 buffer[len++] = '\n';
928 buffer[len] = '\0';
929 }
930
931 bridge->LogToGame(buffer);
932
933 return 1;
934}
935
936static cell_t sm_LogMessage(IPluginContext *pContext, const cell_t *params)
937{

Callers

nothing calls this directly

Calls 3

LogToGameMethod · 0.80
SetGlobalTargetMethod · 0.45
FormatStringMethod · 0.45

Tested by

no test coverage detected