- Ошибка
-
Players_Logger.sma<76> : error 017: undefinied symbol "geoip_country_ex"
Players_Logger.sma<76> : error 088: number of arguments does not match definition
- Компилятор
- Локальный
- Amx Mod X
- 1.9.0
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#include <reapi>
// Добавлять к статистике информацию о стране?
#define ADD_COUNTRY
const AUTHID_MAX_LEN = 32;
#if !defined MAX_NAME_LENGTH
const MAX_NAME_LENGTH = 32;
#endif
const MAX_IP_LEN = 22;
new g_szLogsFile[128];
#if defined ADD_COUNTRY
#include <geoip>
#endif
new const g_szAuthType[client_auth_type][] =
{
"NONE", "DPROTO",
"STEAM", "STEAMEMU",
"REVEMU", "OLDREVEMU",
"HLTV", "SC2009",
"AVSMP", "SXEI",
"REVEMU2013", "SSE3"
}
public plugin_precache()
{
register_plugin("Players Logger", "0.1с", "wopox1337");
get_basedir(g_szLogsFile, charsmax(g_szLogsFile));
add(g_szLogsFile, charsmax(g_szLogsFile), "/logs");
/*
//Header
#if defined ADD_COUNTRY
Log_to_csv(g_szLogsFile,
"Name, IP, AuthId, Protocol, AuthType, Country"
);
#else
Log_to_csv(g_szLogsFile,
"Name, IP, AuthId, Protocol, AuthType"
);
#endif
*/
}
public client_authorized(pPlayer)
{
if(is_user_bot(pPlayer))
return;
static
szAuthId[AUTHID_MAX_LEN],
iProtocol,
client_auth_type: AuthType,
#if defined ADD_COUNTRY
szCountry[64],
#endif
szIP[MAX_IP_LEN];
get_user_authid(pPlayer, szAuthId, AUTHID_MAX_LEN - 1);
iProtocol = REU_GetProtocol(pPlayer);
AuthType = REU_GetAuthtype(pPlayer);
// get_user_name(pPlayer, szName, MAX_NAME_LENGTH - 1);
get_user_ip(pPlayer, szIP, MAX_IP_LEN - 1, .without_port = true);
#if defined ADD_COUNTRY
geoip_country_ex(szIP, szCountry, charsmax(szCountry));
if(!szCountry[0]) formatex(szCountry, charsmax(szCountry), "[ UNKNOWN ]");
Log_to_csv(g_szLogsFile, " ,%s, %s, %i, %s, %s",
szIP, szAuthId, iProtocol, g_szAuthType[AuthType], szCountry
);
#else
Log_to_csv(g_szLogsFile, " ,%s, %s, %i, %s",
szIP, szAuthId, iProtocol, g_szAuthType[AuthType]
);
#endif
}
stock Log_to_csv(const szLogsDir[], const Message[], any:...) {
new szMsg[512], szTime[22], szFile[128], pFile;
vformat(szMsg, charsmax(szMsg), Message, 3);
get_time("pl_%Y%m%d.csv", szTime, charsmax(szTime));
formatex(szFile, charsmax(szFile), "%s/%s", szLogsDir, szTime);
// formatex(szFile, charsmax(szFile), "%s/%s", szLogsDir, "STATS.csv");
pFile = fopen(szFile, "at");
fprintf(pFile, "%s^n", szMsg);
fclose(pFile);
// server_print("saved to: '%s'", szFile);
}
Hello
I'm trying to compile Players Logger https://dev-cs.ru/threads/932/#post-27798 but I am still getting eror
I'm trying to compile Players Logger https://dev-cs.ru/threads/932/#post-27798 but I am still getting eror
I am using compilator for 1.8.2 and 1.8.3.Players_Logger.sma<76> : error 017: undefinied symbol "geoip_country_ex"
Players_Logger.sma<76> : error 088: number of arguments does not match definition
В этой теме было размещено решение! Перейти к решению.
Вложения
-
2.2 KB Просмотры: 597