static cell_t sm_LogToGame(IPluginContext *pContext, const cell_t *params) { g_SourceMod.SetGlobalTarget(LANG_SERVER); char buffer[1024]; size_t len = g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 1); if (pContext->GetContext()->n_err != SP_ERROR_NONE) { return 0; } if (len >= sizeof(buffer)-2) { buffer[1022] = '\n'; buffer[1023] = '\0'; } else { buffer[len++] = '\n'; buffer[len] = '\0'; } Engine_LogPrintWrapper(buffer); return 1; }
void CoreProviderImpl::LogToGame(const char *message) { Engine_LogPrintWrapper(message); }
static void log_to_game(const char *message) { Engine_LogPrintWrapper(message); }