AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hack Detector (https://forums.alliedmods.net/showthread.php?t=28485)

Silent Sniper 05-15-2006 18:18

Hack Detector
 
Code:
#include <cstrike> #define PLUGIN "Hack Detector" #define VERSION "0.1" #define AUTHOR "Silent Sniper" new InDetectorMode[33] new Offenses[33] new g_DetectorMenu public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)           register_clcmd("amx_detector", "ESP_Detector", ADMIN_BAN)           g_DetectorMenu = menu_create("Possible ESP Hackers", "DetectorMenu_Handle") } public DetectorMenu_Handle(id, Menu, Item) {       } public ESP_Detector(id, level, cid) {     if (!cmd_access(id, level, cid, 1))         return PLUGIN_HANDLED           if (InDetectorMode[id])     {         InDetectorMode[id] = 0         set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 16)         set_user_health(id, 100)         set_user_footsteps(id, 0)         client_cmd(0, "cl_shadows 1")     } else     {         InDetectorMode[id] = 1         set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAdd, 0)         set_user_health(id, 9999)         set_user_footsteps(id, 1)         client_cmd(0, "cl_shadows 0")     }           return PLUGIN_HANDLED } public client_damage(Attacker, Victim) {     if (InDetectorMode[Victim])     {         Offenses[Attacker]++         if (Offenses[Attacker] == 3)         {             new szName[32], szSteamID[32], szIP[32]             get_user_name(Attacker, szName, 31)             get_user_authid(Attacker, szSteamID, 31)             get_user_ip(Attacker, szIP, 31, 1)                           new szItem[64]             format(szItem, 63, "%s-%s-%s", szName, szSteamID, szIP)                           menu_additem(g_DetectorMenu, szItem, szItem)                           menu_display(Victim, g_DetectorMenu, 0) //      new name[32] //      client_print(0,print_chat,"%s Is Fucking Cheating",name) //      client_print(0,print_chat,"Glowing Red %s",name) //      console_cmd(0,"amx_glow %s 255 0 0",name)     }                   set_task(5.0, "ClearOffenses", Attacker + 121213)     } } public ClearOffenses(TaskID) {     new id = TaskID - 121213           Offenses[id] = 0 } public client_disconnect(id) {     Offenses[id] = 0     InDetectorMode[id] = 0     client_cmd(id, "cl_shadows 1") }

The lines i have put // before are the ones i need help with i think you understand what im trying to do...

if not

on menu when i press 1.2.3.4 so on when the name comes up it kicks them

and when there name is added so is a speach saying (%s is a hacking cheater, name)

and then it executes a code on them

please help me thnx

SubStream 05-15-2006 19:51

I don't see how you are detecting anything? Is this just a menu that you select a player and it makes him glow then says he's cheating and kicks him??? Explain what the goal of this is.

Silent Sniper 05-20-2006 23:37

there is no goal...

Im trying to learn

DarkSnow 05-21-2006 00:59

Quote:

Originally Posted by Silent Sniper
there is no goal...

Im trying to learn

In my opinion, to learn is a good goal in itself ;)

Peli 05-21-2006 01:45

Well you did the name part wrong.

Code:
new name[32] // You got this right new time = ? // make this equal to a cvar and come up with a function for it set_hudmessage(255, 1, 1, -1.0, -1.0, 0, 6.0, Time, 0.1, 0.2, 4) show_hudmessage(id, "%s Is Cheating, and will glow red for %d second(s)", name, Time) // I switched your message to this type of message because this message is displayed to everyone and not just one player

FatalisDK 05-21-2006 11:06

Peli, your hudmessage is actually sent to only one player, which is id.

This plugin was originally by me.

Here you go.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <csx> #include <cstrike> #define PLUGIN "ESP Detector" #define VERSION "0.1" #define AUTHOR "FatalisDK" new InDetectorMode[33] new Offenses[33] new g_DetectorMenu public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("amx_detector", "ESP_Detector", ADMIN_BAN)         g_DetectorMenu = menu_create("Possible ESP Hackers", "DetectorMenu_Handle") } public DetectorMenu_Handle(id, Menu, Item) {     } public ESP_Detector(id, level, cid) {     if (!cmd_access(id, level, cid, 1))         return PLUGIN_HANDLED         if (InDetectorMode[id])     {         InDetectorMode[id] = 0         cs_set_user_team(id, CsTeams:CS_TEAM_CT, CS_CT_GIGN)         cs_user_spawn(id)         set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 16)         set_user_health(id, 100)         set_user_footsteps(id, 0)         client_cmd(0, "cl_shadows 1")                 remove_task(id + 121214)     } else     {         InDetectorMode[id] = 1         cs_set_user_team(id, CsTeams:CS_TEAM_SPECTATOR)         cs_user_spawn(id)         set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAdd, 0)         set_user_health(id, 9999)         set_user_footsteps(id, 1)         client_cmd(0, "cl_shadows 0")                 if (!task_exists(id + 121214))             set_task(30.0, "ChangeModel", id + 121214, "", 0, "b")     }         return PLUGIN_HANDLED } public client_damage(Attacker, Victim) {     if (InDetectorMode[Victim])     {         Offenses[Attacker]++         if (Offenses[Attacker] == 3)         {             new szName[32], szSteamID[32], szIP[32]             get_user_name(Attacker, szName, 31)             get_user_authid(Attacker, szSteamID, 31)             get_user_ip(Attacker, szIP, 31, 1)                         new szItem[64]             format(szItem, 63, "%s-%s-%s", szName, szSteamID, szIP)                         client_print(0, print_chat, "%s is POSSIBLY hacking!", szName)             client_print(0, print_chat, "Glowing red: %s", szName)                         server_cmd("amx_glow %s 255 0 0", szName)                         menu_additem(g_DetectorMenu, szItem, szItem)                         menu_display(Victim, g_DetectorMenu, 0)         }                 set_task(5.0, "ClearOffenses", Attacker + 121213)     } } public ClearOffenses(TaskID) {     new id = TaskID - 121213         Offenses[id] = 0 } public ChangeModel(TaskID) {     new id = TaskID - 121214         if (random_num(0, 1))         cs_set_user_model(id, "gign")     else         cs_set_user_model(id, "leet") } public client_disconnect(id) {     Offenses[id] = 0     InDetectorMode[id] = 0     client_cmd(id, "cl_shadows 1")     remove_task(id + 121214) }

Peli 05-21-2006 15:20

Whoops sorry, forgot to make it for all players.

Twilight Suzuka 05-21-2006 15:33

Quote:

Originally Posted by DarkSnow
Quote:

Originally Posted by Silent Sniper
there is no goal...

Im trying to learn

In my opinion, to learn is a good goal in itself ;)

IMHO, stfu.

DarkSnow 05-21-2006 16:02

Quote:

Originally Posted by Twilight Suzuka
IMHO, stfu.

Try making me :attack:

Hawk552 05-21-2006 16:06

ban


All times are GMT -4. The time now is 16:24.

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