public ad_notify(const index, const PunishType:pType, const NotifyType:nType, const Kills, const Shots, const Warn)
{
new szBufNotify[190], szName[32];
#if defined ENABLE_LOG_FILE
new szBufLog[190], szAddress[22], szSteam[33], ping, loss;
get_user_ip(index, szAddress, charsmax(szAddress));
get_user_authid(index, szSteam, charsmax(szSteam));
get_user_ping(index, ping, loss);
#endif
get_user_name(index, szName, charsmax(szName));
if(pType == AIMBOT)
{
if(nType == WARNING && Warn > g_iAimNotify)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4Aim Detector^1] ^3Name ^1[^4 %s ^1] ^3Warn ^1[^4 %d ^1] ^3MaxWarn ^1[^4 %d ^1]", szName, Warn, g_iAimMaxWarns);
Send_Notify_Admins(index, szBufNotify);
#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Warn Add: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d], Ping [%d], Loss [%d]", index, szName, szSteam, szAddress, Warn, ping, loss);
SaveLogFile(szBufLog);
#endif
}
else if(nType == DETECT)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4Aim Detector^1] ^3Name ^1[^4 %s ^1] ^3Detected", szName);
Send_Notify_Admins(index, szBufNotify);
#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Detected: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", index, szName, szSteam, szAddress, Warn);
SaveLogFile(szBufLog);
#endif
ad_set_client(index, AimCheck, 0);
PunishPlayer(index, AIMBOT);
}
}
else if(pType == NOSPREAD)
{
if(nType == WARNING && Warn > g_iSpreadNotify)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4NoSpread Detector^1] ^3Name ^1[^4 %s ^1] ^3Warn ^1[^4 %d ^1]", szName, Warn, g_iSpreadMaxWarns);
Send_Notify_Admins(index, szBufNotify);
#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Warn Add: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d], Ping [%d], Loss [%d]", index, szName, szSteam, szAddress, Warn, ping, loss);
SaveLogFile(szBufLog);
#endif
}
else if(nType == DETECT)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4NoSpread Detector^1] ^3Name ^1[^4 %s ^1] ^3Detected", szName);
Send_Notify_Admins(index, szBufNotify);
#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Detected: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", index, szName, szSteam, szAddress, Warn);
SaveLogFile(szBufLog);
#endif
ad_set_client(index, NoSpreadCheck, 0);
PunishPlayer(index, NOSPREAD);
}
}
}