AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Weapon Immunity (https://forums.alliedmods.net/showthread.php?t=49582)

XxAvalanchexX 01-07-2007 16:00

Weapon Immunity
 
5 Attachment(s)
Weapon Immunity 0.20
Original plugin requested by The-Jeff

Description
This plugin allows you to set certain players to become immune to specific weapons. Currently, all weapons wieldable by players are supported.

Commands
amx_immune <target> <weapon> [0|1] - Requires ban access to use. See below for a list of targets and weapons. If the third argument isn't specified, it's assumed to be 1 (thus, making the target immune to weapon).

amx_unimmune <target> <weapon> - Requires ban access to use. Exactly the same as using amx_immune with the third argument being 0 (making the target no longer immune to weapon).

amx_weaponlist - Requires ban access to use. Displays a list of all valid weapon names and weapon groups to be used for the second parameter of the immune functions.

Valid Targets
* or @ALL - everyone
@TERRORIST - all players on the terrorist team
@CT - all players on the counter-terrorist team
@BOT - all bots
@HUMAN - all non-bots
@ADMIN - all admins
@USER - all non-admins

If no groups are specified, it attempts a name match with players in the server.

Valid Weapons
@KNIVES - knife
@PISTOLS - glock18, usp, p228, deagle, fiveseven, elite
@SHOTGUNS - m3, xm1014
@SMGS - tmp, mac10, mp5navy, ump45, p90
@RIFLES - galil, famas, ak47, m4a1, sg552, aug, scout, awp, g3sg1, sg550
@SNIPERS - scout, awp, g3sg1, sg550
@MACHINEGUNS - m249
@GRENADES - flashbang, hegrenade, smokegrenade

If no groups are specified, it will assume that it is an exact weapon name.

Notes
All of the groups require only the first letter to use. For example, you can use @T (or @TE, @TER, etcetera) instead of @TERRORIST. The only exceptions are @ALL: it supports no partial matching at all; and the weapon groups starting with "S" (@SHOTGUNS, @SMGS, and @SNIPERS): they require at least two letters to be identifiable.

Requires Fakemeta and AMXX 1.76d or later!

SweatyBanana 01-07-2007 16:04

Re: AWP Immunity
 
I suggest adding a cvar to specify like 50% damage and stuff like that.

Hawk552 01-07-2007 16:43

Re: AWP Immunity
 
You know, I hate to say this, but I think this is pretty damn useless. I can't think of a single purpose for this.

I'm going to hold off on unapproving it though and see what other people think.

Reaper2331 01-07-2007 20:44

Re: AWP Immunity
 
Quote:

Originally Posted by Hawk552 (Post 424771)
You know, I hate to say this, but I think this is pretty damn useless. I can't think of a single purpose for this.

I'm going to hold off on unapproving it though and see what other people think.


Soory to say this Hawk552 but i think its GREAT I use it in my server it works great I was one to mention putting this plugin in the New plugin submissions

pandaking 01-08-2007 10:57

Re: AWP Immunity
 
This would be good if instead of you saying which players should be immune, it detected.
Like if some noob is in the server trying to play, and every round after about 5 seconds he is awped that's no fun. So it detected he was killed the last 7 rounds by awp say, and he has made no kills in those 7 rounds.

I also agree with banana - rather than not killing, it would be bettwer if it did 50% of it's normal damage.

I don't know but you get my drift. I think that would be a far more useful plugin myself - this one is a little pointless imho.

SubStream 01-08-2007 17:07

Re: AWP Immunity
 
My personal opinion is that this idea could be very useful.

In my humble opinion... it should have more added to it... idea:

Name: Weapon Immunity Control

In-game menu to allow server-wide weapon immunity or only admin immunity. Menu would look as such:

Immunity Options
1. Admin Only (ON or OFF shown to the right)
2. Deagle (5%, 10%, etc. up to 100% shown to the right)
3. FN57 (5%, 10%, etc. up to 100% shown to the right)
4. Elites (5%, 10%, etc. up to 100% shown to the right)
5. USP (5%, 10%, etc. up to 100% shown to the right)
6. Glock (5%, 10%, etc. up to 100% shown to the right)
7. AK47 (5%, 10%, etc. up to 100% shown to the right)

9. Next
0. Exit

and on page 2 and so on list the other weapons.

If 7. AK47 was turned to 10% then everybody in the server would only take 90% of the damage done by an ak47. If 1. Admin Only was ON and 7. AK47 was 10%, then only Admin would be protected from 10% of the ak47's damage.

In addition, you could add commands for individual weapon immunity

Commands:

amx_immune <playername or user id> <weapon> <immune%>- immunes a player from <immune%> damage done by <weapon>
amx_unimmune <playername or user id> <weapon> - removies immunity a player has from <immune%> damage done by <weapon>
amx_immuneinfo <playername or user id> - lists in console all weapons a player has immunity from receiving <immune%> damage for each individual weapon
amx_immunemenu or say /immenu - Brings up in-game server-wide immune menu

You could use nVault to store the data and make the bans permanent via steam ID.

These ideas may sound like too much or overkill on a simple idea, but you can look at a plugin I wrote called Restrict Commands [rc] which has all of those features--except in relation to client commands. I use nVault and a menu and all of the above suggested features. You could mimick that code and just redo the arrays and functions to be related to damage done by weapons. It could be easily done using that plugin as an outline if you didn't feel like coding it from scratch.

In addition, the % for the menu is simple to add as well.

I think that would make this a beasty, awesome plugin in many respects. I would, myself, use such a plugin if you used all of those ideas and features in context with the idea of weapon damage immunity.

If Joe gets killed by awps all the time, I could go in console and type

amx_immune joe awp 40

Now Joe will only take on 60% of the damage done by Awp's--giving him a fighting chance.

If everyone is awping and dying by awps, I could go into the menu and turn awp immunity to 95% and only 5% of awp damage would be taken by all players server-wide--or if Admin Only is turned on--only Admin would be protected.

These are just ideas... that's all.

Hawk552 01-08-2007 17:09

Re: AWP Immunity
 
Oh, please.

I'd be surprised if he even looked at that plugin. You're a joke compared to him. Don't try to act superior.

SubStream 01-08-2007 17:16

Re: AWP Immunity
 
Quote:

Originally Posted by Hawk552 (Post 425073)
Oh, please.

I'd be surprised if he even looked at that plugin. You're a joke compared to him. Don't try to act superior.

I was not trying to act anything--I'm just offering ideas and references if he didn't have time to script it all from scratch.

pandaking 01-08-2007 17:18

Re: AWP Immunity
 
Meow Hawk, that was a little unnecessary :P

Substream - Nice idea mate, although kind of going into a new plugin of it's own...

XxAvalanchexX 01-08-2007 18:38

Re: AWP Immunity
 
There is no way to say "Okay, only do 37.89% of regular damage!" In this case, it makes the game think that the bullet missed them, thus doing no damage. It doesn't acknowledge that they were hit by an AWP, and then restore HP. This is impossible, because you would already be dead, and your HP couldn't be restored.

The only effective way to do less amount of damage is to change where the bullet hit. For example, AWP Damage Reducer forces the game to think that the AWP hit them in the legs or arms, thus causing less damage. But, it is limited, you only have a few hitzones to choose from; you can't pick a specific amount of damage to have dealt.


All times are GMT -4. The time now is 07:14.

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