AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   SM Godclip (1.1) (https://forums.alliedmods.net/showthread.php?t=101305)

retsam 08-22-2009 18:23

SM Godclip (1.1)
 
4 Attachment(s)
SM_GODCLIP (1.1)


This is a small little plugin I did due to some admins request in our community.

Description: Gives admins(players?) godmode, invisibility, and noclip at the same time. :mrgreen:

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.


COMMAND:
!godclip / sm_godclip <#userid|name> (also auto-added to the admin menu as: Godclip player)
Admin Flag: BAN or ROOT (see bottom of post)


Cvars:
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.");

REQUIREMENTS:


- SDK Hooks:<OPTIONAL>
- SM 1.3.2?


KNOWN ISSUES:


(Non-SDKhooks mode): 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.

CSS:
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.

DODS: (Non-SDKhooks): 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.

TF2:
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.


Changelog:
Code:

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.



CREDITS:
pheadxdll for using his invisibility code. (which I think came from Spazman0 originally?)


Attached Files:
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....

billabonker 08-24-2009 09:36

Re: SM Godclip
 
so...

does this work for l4d?

EDIT :

tested on l4d
works like a charm

hey is there anyway you can seperate the noclip and godmode? i really only want the godmode xD

flud 08-24-2009 10:11

Re: SM Godclip
 
Quote:

Originally Posted by billabonker (Post 911230)
i really only want the godmode xD

sm_cvar god 1

p.s
Possible make weapons and med-kits not see to :|

billabonker 08-24-2009 10:15

Re: SM Godclip
 
Quote:

Originally Posted by flud (Post 911257)
sm_cvar god 1

p.s
Possible make weapons and med-kits not see to :|

i meant only for some people like for example me only then admins and so on..

retsam 08-24-2009 14:21

Re: SM Godclip
 
Update v0.3: I uploaded a new version. Removed the hit detection cvar as its not really needed. Figured if yer gonna use mode 1 for godmode, then you want hit detection. Use mode 2 for true godmode and no hit detection.

Added a cvar for noclip.....

billabonker 08-25-2009 03:18

Re: SM Godclip
 
can u make it tat godmode is enabled everytime?

cuz when the next map loads
godclip disables

retsam 08-25-2009 13:05

Re: SM Godclip
 
No, and I dont really see the point heh. Player death, or next map load, etc everything gets set back to default(by the game actually). Its fairly easy to enable again.

billabonker 08-27-2009 02:30

Re: SM Godclip
 
hey therss a "bug"
when you type sm_godclip_mode 2,
it doesnt disable hit detection

retsam 08-27-2009 03:47

Re: SM Godclip
 
Quote:

Originally Posted by billabonker (Post 914114)
hey therss a "bug"
when you type sm_godclip_mode 2,
it doesnt disable hit detection


Hum. I dont see how thats possible... As theres a cvar check in player_hurt hook. In addition, if its set to true godmode, you cant get hit anyways, so theres no way it could be reporting hits....

Id guess you thought it was set to mode 2 but wasnt. Other than that, I dont know. I looked at it and didnt see anything.


EDIT: Updated v0.4 - Get the updated version. I changed a few of the checks around in the hurt hook, which will run less code if mode 1 is disabled. I also removed the version cvar from appearing in the configs, but youd have to delete the entry from old configs to keep the correct version # updated. Also added check so world damage doesnt trigger hit detector. Just bunch of little fixes I overlooked....

retsam 08-28-2009 15:16

Re: SM Godclip
 
Update v0.5

Was pointed out that it might not be best to show the activity of being enabled/disabled to the public as the idea is to be incognito(duh). Anyways, it now only displays the enabled messages to the client, not the public. :)


All times are GMT -4. The time now is 02:26.

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