Hi,
I need help with this plugin. I would, if find bad files that it write to amxbans.
And this my problem:
Code:
[AMXBANS] ===============================================
[AMXBANS] You are Banned from this server by admin HITMIK s world
[AMXBANS] You are permanently banned.
[AMXBANS] Banned nick : unknown_STEAM_0 : 0 : 1471007611
[AMXBANS] Reason : ' [Files Check] Bad file player/headshot3.wav '
[AMXBANS] You can complain regarding your ban @ www.gaming.sk
[AMXBANS] Your SteamID : ' STEAM_0 : 0 : 1471007611 '
[AMXBANS] Your IP : ' unknown_STEAM_0 : 0 : 1471007611 '
[AMXBANS] ===============================================
Kicked by Console: You are BANNED. Check your console.
Kicked : You are BANNED. Check yo
It is wrote bad
[AMXBANS] Banned nick : unknown_STEAM_0 : 0 : 1471007611
[AMXBANS] Your IP : ' unknown_STEAM_0 : 0 : 1471007611 '
My filescheck.sma:
Code:
/* AMX Mod X Plugin
*
* (c) Copyright 2008, ConnorMcLeod
* This file is provided as is (no warranties).
*
*/
#include <amxmodx>
new g_pcvarExactModel, g_pcvarSeparateLogFile
public plugin_init()
{
static const VERSION[] = "1.0"
register_plugin("Files Check", VERSION, "ConnorMcLeod")
register_cvar("fc_version", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
g_pcvarSeparateLogFile = register_cvar("fc_separatelog", "0")
}
public plugin_precache()
{
g_pcvarExactModel = register_cvar("fc_exactweapons", "0")
static szConfigFile[64]
get_localinfo("amxx_configsdir", szConfigFile, 63)
format(szConfigFile, 63, "%s/filescheck.ini", szConfigFile)
new File = fopen(szConfigFile, "rt")
if(!File)
return
static szFile[64]
while(!feof(File))
{
fgets(File, szFile, 63)
trim( szFile )
if(!szFile[0] || szFile[0] == ';' || (szFile[0] == '/' && szFile[1] == '/'))
continue
if(equali(szFile[strlen(szFile)-4], ".mdl"))
{
force_unmodified(get_pcvar_float(g_pcvarExactModel) ? force_exactfile : force_model_samebounds, {0,0,0}, {0,0,0}, szFile)
}
else
{
force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, szFile)
}
}
fclose(File)
}
public inconsistent_file(id, const filename[], reason[64])
{
static szMessage[192], szName[32], szAuthid[32]
get_user_name(id, szName, 31)
get_user_authid(id, szAuthid, 31)
formatex(szMessage, 191, "^"%s<%s>^" has inconsistent file ^"%s^"", szName, szAuthid, filename)
switch( get_pcvar_num(g_pcvarSeparateLogFile) )
{
case 1:
{
log_amx(szMessage)
}
case 2:
{
static const szLogFile[] = "filecheck.log"
log_to_file(szLogFile, szMessage)
}
default:
{
log_message(szMessage)
}
}
server_cmd("say ^"%s^"", szMessage)
server_cmd("amx_ban 0 %s [Files Check] Bad file %s", szAuthid, filename)
}
Can You help me? Sorry for me English.
Thanks