Raised This Month: $ Target: $400
 0% 

Wallhack Detector


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
endeffects
Senior Member
Join Date: Nov 2007
Old 12-17-2008 , 06:26   Wallhack Detector
Reply With Quote #1

i've released my first version of this plugin:
http://forums.alliedmods.net/showthread.php?p=728767

_____________________________________________ __
old posting:

Hallo,

i'm working on a simple wallhack detector.
the plugin watches each player every round for wallkills,
if a player reaches a specific number of wallkills per round
we make a log entry.

i'm not really good in amxx scripting so i have used some
code of Alka, SAMURAI and Bugsy, so all credits going out to them.
however, theoreticly everything should work
but it seems like that there are a few bugs.

in example the logfile don't contains the correct player information.
can somebody please have a look into it?


Code:
#include <amxmodx>
#include <fakemeta_util>
 
#define PLUGIN "Wallhack Detector"
#define VERSION "0.1"
#define AUTHOR ""
#define CharsMax(%1) sizeof %1 - 1
#define WALLHACK_MAX_DETECTS 3
new WallKills[33]
public plugin_init() 
{
 register_plugin(PLUGIN, VERSION, AUTHOR)
 register_event("DeathMsg", "EventDeathMsg", "a")
}
public EventDeathMsg()
{
 static Killer, Victim, Weapon[32]
 read_data(4, Weapon, CharsMax(Weapon))
 
 if(equali(Weapon, "grenade"))
  return 1
 
 Killer = read_data(1)
 Victim = read_data(2)
 
 static bool:IsVisible;
 IsVisible = fm_is_ent_visible(Killer, Victim, 1)
 
 if(!IsVisible)
  WallKills[Killer]++;
 
 if(WallKills[Killer] >= WALLHACK_MAX_DETECTS)
 {
  WallKills[Killer] = 0
 
  new szName[33]
  new szAuthID[35]
  new szIP[22]
  new szMap[21]
  new szLog[143]
  //new userid = get_user_userid(Killer)
 
  get_user_name( Killer , szName , 32)
  get_user_authid( Killer , szAuthID, 34)
  get_user_ip( Killer , szIP , 21 )
  copy( szIP , strfind(szIP , ":") , szIP)
  get_mapname( szMap , 20)
 
  format(szLog, 142, "A wallhack was detected on %s [%s] [%s] [%s]" , szName , szAuthID , szIP  , szMap )
 
  server_print( "[Wallhack Detector] %s" , szLog )
  LogDetection(szLog)
 
 }
 
 return 0;
}
public LogDetection( szLog[] )
{
 new szData[175]
 new szLogFile[64]
 new iHour, iMinute, iSecond
 new iYear, iMonth, iDay
 
 time(iHour, iMinute, iSecond ) 
 date( iYear, iMonth, iDay ) 
 iYear-=2000
 format( szData , 174, "[%02d/%02d/%02d] [%02d:%02d:%02d] %s" , iMonth, iDay , iYear , iHour, iMinute, iSecond, szLog) 
 
 get_localinfo( "amxx_logs" , szLogFile , 63 )
 format( szLogFile , 63 , "%s/wallhackdetections.log" , szLogFile )
 
 write_file(szLogFile ,szData ,-1)
}
public  client_death () 
{
 static Victim
 Victim = read_data(2)
 
 WallKills[Victim] = 0
}
public client_disconnect(id)
{
 WallKills[id] = 0
} 
public client_authorized(id)
{
 WallKills[id] = 0
}
__________________
Get rid of all these fake, spam, redirect servers
on your steam server list!

Last edited by endeffects; 12-17-2008 at 12:01.
endeffects is offline
Old 06-28-2011, 19:14
riste3
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode