AdminMod.de https://www.adminmod.de/ |
|
Speedhack https://www.adminmod.de/viewtopic.php?t=9968 |
Seite 1 von 1 |
Autor: | Sir Drink a lot [ 18.08.2007, 01:34 ] |
Betreff des Beitrags: | Speedhack |
Moin! Gerade wieder einen Speedhacker gesehen.... aber irgendwie kam mir der Gedanke: Der legt ja innerhalb 1 Sekunde eine unglaubliche Strecke zurück. Wäre es denn nicht einfach möglich, diese Strecke zu berechnen... und wenn die größer 10 "km" ist, dann sollte es doch wohl ein cheat und sofort erkennbar sein. Hm... was ist an meiner Überlegung falsch? |
Autor: | [WING] Black Knight [ 19.08.2007, 18:17 ] |
Betreff des Beitrags: | |
Die Überlegung ist grundsätzlich nicht verkehrt. Es ist nur sehr resourcenfressend, da Du eigentlich sekündlich alle Spieler und deren Standpunkt überprüfen müsstest. Außerdem muss man auch auch die Z-Achse berücksichtigen und somit Sprünge, bei denen man schneller ist als beim Laufen. Da müsste man dann einen vernünftigen Grenzwert finden. Also, wenn überhaupt scheitert es an den Resourcen. |
Autor: | caramel [ 21.12.2007, 18:05 ] |
Betreff des Beitrags: | |
may this helps Read the comments with care: Code: #define MAXPLAYERS 32 #define SECDIST 230 //Sensitivity, may need to be adjusted #define MAXOFFENCE 700 //Sensitivity, may need to be adjusted new gmaxplayers; new g_OldPos[3][MAXPLAYERS+1]; new g_Detections[MAXPLAYERS+1]; new g_Warning[MAXPLAYERS+1]; public plugin_init() { set_timer("check_speedhack",1.0,99999,""); gmaxplayers = maxplayercount(); } public plugin_connect(. ..) { // we need "id" (index of user) as a 2nd PARAM; g_OldPos[0][id] = 0; g_OldPos[1][id] = 0; g_OldPos[2][id] = 0; // also index is "id" g_Detections[id] = 0; g_Warning[id] = 0; } public check_speedhack() { for(new i=1; <= gmaxplayers; i++) { // num to str i; // not sure if exists, but a check for is user alive ? (pursupose exists) if(is_user_alive(i) ) { new origin[3]; new oldorigin[3]; new dist; //Get origins // I don't know exactly how to get get_userorigin in correct way, but this i used on my AMXX Plugin get_user_origin(i, origin); oldorigin[0] = g_OldPos[0][i]; oldorigin[1] = g_OldPos[1][i]; oldorigin[2] = g_OldPos[2][i]; // another problem i don't know if exists a function to get distance between 2 origins // in amxx exists, is called "get_distance(org1,org2) // pursopose exists dist = get_distance(origin, oldorigin); if (dist > SECDIST) g_Detections[i] = g_Detections[i] + dist - SECDIST; // not really required, but it's a good point to check if user is on buyzone // i know, in adminmod doesen't exists a function like that ( exits ? ) if(is_user_in_buyzone(i) ) { clearSpecificAlertValue(i); } if (g_Detections[i] > SECDIST) { g_Warning[i]++ if (g_Warning[i] > 1) if (g_Detections[i] > MAXOFFENCE) RegisterOffense(i) } g_OldPos[0][i] = origin[0] g_OldPos[1][i] = origin[1] g_OldPos[2][i] = origin[2] } else { clearSpecificAlertValue(i) } } } public clearSpecificAlertValue(id) { g_Detections[id] = 0; g_Warning[id] = 0; } public RegisterOffense(...) { // log the player or something; // a good to punish players; // do a loop, check if no admin on server and ban player // if exits an admin on server, just print a message to chat } |
Autor: | Sir Drink a lot [ 22.12.2007, 13:35 ] |
Betreff des Beitrags: | |
here you can find all descriptions of commands in adminmod with correct syntax: ?q=node/view/267&order=g (get_userorigin) |
Autor: | [WING] Black Knight [ 22.12.2007, 14:32 ] |
Betreff des Beitrags: | |
There is no function in adminmod which detects the buyzone. Only possible with the experimental version which is not developed anymore. You have to track round ends in Counter-Strike. Otherwise most guys will be detected as being speed hackers. Use logd for that. For distance include math.inc and use distance(). See include/math.inc for usage. Btw, as I stated before, this script uses a lot of resources. Use it with care. |
Seite 1 von 1 | Alle Zeiten sind UTC+01:00 |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |