This is a small little plugin I did due to some admins request in our community.
Gives admins(players?) godmode, invisibility, and noclip at the same time.
This plugin is more for administration than anything else. The idea behind it was something that will allow admins to spectate/observe without going to spectate. Part of that logic was to help catch and detect players who might have wallhacks, aimbots or other possible cheats.
Any admin who has godclip enabled(mode cvar set to 1) it displays a chat msg(or panel) to the admin showing name/steamid of who is attacking them. Obviously if someone is shooting you while you're completely invisible noclipped in the sky, they may possibly be using something. I have already caught a handful of people using wallhacks/aimbots in TF2 with this plugin.
sm_godclip <#userid|name> (also auto-added to the admin menu as: Godclip player)
BAN or ROOT (see bottom of post)
Config is auto-created -> sm_godclip.cfg
sm_godclip_invis "1" // Invisibility during godclip? (1/0 = yes/no)
sm_godclip_mode "1" // Godmode type for godclip. (0/1/2) 0=no god, 1=return health lost/hit detection, 2=true godmode(take no dmg, no hit detection)
sm_godclip_noclip "1" //Noclip during godclip? (1/0 = yes/no)
sm_godclip_displaymode "0" //Display mode for godclip_mode1. (0/1) 0=simple printtochat text of attacker name/steamid. 1=display panel with name/steamid.");
- SDK Hooks:<OPTIONAL>
If you are not
using SDKhooks and are using sm_godclip_mode 1, this just returns the amount of health you lost back to you. This is not quite as efficient as SDKhooks and you can still be killed by any damage that is over your health amount.(crits, backstabs, headshots, etc) Use mode 2 for true godmode, though the hit detection output wont work if you do.
In CSS, I recently noticed some model items(such as CT's pant leg glock) still showing after invis was applied to them. I am not sure if this can be fixed ATM. Wanted to point that out for any admins that use this in CSS. With certain models, you may not be completely invisible when you think you are, thus making you think someone is cheating when they are not.
In DOD:S I recently noticed the hit detection output doesnt work with noclip enabled. Apparently player_hurt doesnt even fire while noclipped. This is fixed with SDKhooks, so if you want hit detection in DODS and noclip enabled, youll need to load SDKhooks.
Note for admins: Demoman eyelander glowing eyes are still visible! I need to edit the invis code to account for this. Hope to do this soon.
7/12/10 - v1.1 - Updated invisibility code slightly.
- New invis code could possibly fix some errors in tf2 as well as checking some spy stuff.
- Added <tf2_stocks> because of tf2 class check for invis.
- Added game MOD lookup for some additional checks as well.
- Optional SDKhooks: Recoded plugin so it works with or without SDKhooks.
- Few other minor things.
5/20/10 - v1.0 - Fixed some incorrect post hook callbacks.
2/21/10 - v0.9 - Added a spawn hook to fix issue of invisibility/godclip staying enabled after round-ended.
2/14/10 - v0.8 - Added a cvar(sm_godclip_displaymode) for changing the hit detect output. Can change between print text or hud panel. Added steamid info. Changed ADMINFLAG to BAN access instead of SLAY. Put Delaytimer on printtochat output so its less spamtastic.
1/16/10 - v0.7 - Fixed demomans shield not being invis. Recoded the method for getting convar changes.
11/2/09 - v0.6 - Noticed and fixed a few coding mistakes.
8/28/09 - v0.5 - No longer shows activity to public. IE: Does not show enabled/disabled messages.
8/27/09 - v0.4 - Added and changed a few of the checks in hurt hook(ie, world dmg triggering hit detector). Removed the version cvar from the auto-created config(woops).
8/24/09 - v0.3 - Removed cvar for hit detection. Removed checking for admins for hit detection, as its not really needed. Added cvar to toggle noclip as well.
8/23/09 - v0.2 - Removed tf2 related code,so able to merge both versions. Removed a global var for hurt hook, used a client indexd value instead(woops). Used a different method for mode 1 for godmode, which eliminates the issue with the health buff of visual particles in tf2 while invis.
pheadxdll for using his invisibility code. (which I think came from Spazman0 originally?)
I decided to include TWO different ADMIN flag versions. sm_godclip.sp is the BAN flag. sm_godclip_root.sp is ROOT flag. You can decide which you want....