Anti-Godmode Killing

Post Reply
greenie
Full Member
Full Member
Posts: 1815
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Nu

Anti-Godmode Killing

Post by greenie »

Description:
This plugin makes it so that whenever a user attains godmode, they will not be able to damage someone else. Shots will still be able to be fired, but no damage will be taken to the player they are shooting at. Knife and grenades will be unable to harm/flash/smoke up the place. When their godmode wears off or is removed, they will get their ability to shoot, knife, and nade people again.

Uses:
Prevent users with godmode from damaging/killing other players
Prevent users under spawn protection from dealing damage while they are protected
Modules:
Fun
Fakemeta
Cvars:
antig_enabled <0/1> (Set to 1 by default)
Future Updates:
Possibly add ability to block killing while they have no-clip (on/off by cvar or something)
Add ability whether or not to block killing when player has X hp or over
Change Log:
Oct. 18
First Release
Oct. 19
Updated code to better (and shorter) way to check if player is attacking
Got rid of fun module
Compatible with all mods now, not just cstrike
Credits:
MeRcyLeZZ for enlightening me on get_pcvar
The common rule on most servers -- "Don't kill with godmode on" (for the idea)
Ending notes:

I made this plugin because I was tired of the people that play on my server coming to me complaining about so and so killing them while they were in godmode. I also made it because I think this would be very helpful to other server owners (and possibly server owners that sell admin) so they can keep control on their admins while they are away. Yes, I know that this plugin isn't the most complex, and yes, I also know that I am not the most experienced Pawn coder, but I know what every part of this code does do and doesn't do.

get plugin
Post Reply

Return to “Server Management”