AMXX-BG.INFO settings_util.inc Raw include

settings_util.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _settings_util_included
2 #endinput
3 #endif
4
5 #define _settings_util_included
6
7 stock UTIL_DebugMessage(const szMsg[], any:...) {
8 // disable warning
9 #pragma unused szMsg
10
11 #if defined PRINT_DEBUG_MESSAGES
12 new szFormatted[256];
13
14 vformat(szFormatted, 255, szMsg, 2);
15 format(szFormatted, 255, "[SETTINGS_DEBUG] %s", szFormatted);
16
17 server_print(szFormatted);
18 #endif
19 }
20
21 #if !defined UTIL_LogToFile
22 stock UTIL_LogToFile(const szPath[], const szLevel[], const szFunction[], const szMessage[], any:...) {
23 new szMsg[512];
24 vformat(szMsg, charsmax(szMsg), szMessage, 5);
25
26 log_to_file(szPath, "[%s][%s] %s", szLevel, szFunction, szMsg);
27 }
28 #endif