settings_util.inc
disable warning
VIP Сървъри
Всички сървъри
#if defined _settings_util_included
#endinput
#endif
#define _settings_util_included
stock UTIL_DebugMessage(const szMsg[], any:...) {
// disable warning
#pragma unused szMsg
#if defined PRINT_DEBUG_MESSAGES
new szFormatted[256];
vformat(szFormatted, 255, szMsg, 2);
format(szFormatted, 255, "[SETTINGS_DEBUG] %s", szFormatted);
server_print(szFormatted);
#endif
}
#if !defined UTIL_LogToFile
stock UTIL_LogToFile(const szPath[], const szLevel[], const szFunction[], const szMessage[], any:...) {
new szMsg[512];
vformat(szMsg, charsmax(szMsg), szMessage, 5);
log_to_file(szPath, "[%s][%s] %s", szLevel, szFunction, szMsg);
}
#endif
КАК ДА ИЗПОЛЗВАМ
Добави в началото на .sma файла:
#include <settings_util>
1. Изтегли
Свали файла от бутона по-горе
2. Копирай
Постави в
scripting/include/3. Включи
Добави #include директивата
4. Компилирай
Използвай amxxpc или scripting/compile.exe