Connect Logs Fixed days

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Connect Logs Fixed days

Мнение от lantimilan » 03 Юни 2020, 11:33

Hello im using ocixcrom plugin for logs , but plugin save all days in one file i need everyday to have file and if possible somebody if connect one time dont show everytime nick who connect in day

Код за потвърждение: Избери целия код

#include <amxmodx>

#define LOG_CONNECTING
//#define LOG_DISCONNECTING

#define LOG_FILE "addons/amxmodx/logs/Connect.log"

public plugin_init()
	register_plugin("Connect Logs", "1.0", "OciXCrom")


#if defined LOG_CONNECTING
public client_putinserver(id)
	log_connection(id, true)
#endif

#if defined LOG_DISCONNECTING
public client_disconnect(id)
	log_connection(id, false)
#endif

log_connection(const id, const bool:bConnect)
{
	new szName[32], szAuthId[35], szIP[22]
	get_user_name(id, szName, charsmax(szName))
	get_user_authid(id, szAuthId, charsmax(szAuthId))
	get_user_ip(id, szIP, charsmax(szIP))	
	log_to_file(LOG_FILE, "%s: %s [%s | %s]", bConnect ? "CONNECT" : "DISCONNECT", szName, szIP, szAuthId)
}

  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 13 госта