AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   DoD Deathnades - Drop grenades on death (https://forums.alliedmods.net/showthread.php?t=54441)

Vet 04-25-2007 20:36

DoD Deathnades - Drop grenades on death
 
7 Attachment(s)
DOD DeathNades - Written for Day of Defeat 1.3

RECOMMENDED UPDATE !!!
VERSION UPDATE 10/14/09

Rewritten by Vet(3TT3V)
Rewritten by Wilson [29th ID]
Original Plugin by Firestorm

About this Plugin:
This plugin is another rewrite of Firestorm's dod_dropgrenades plugin. That plugin was also rewritten by Wilson [29th ID] who added some sweet features. However, Firestorm's was written with engine instead of fakemeta, and I never could get Wilson's to work the way I thought it should, so I decided to write my own. So this rewrite is kind of a combination of those 2 plugins, plus I've added many new features. And I omitted a few of the others' features. Feature changes are listed below. Both Firestorm's original plugin and Wilson's rewrite can be obtained at www.dodplugins.net

Description:
This plugin will allow players who die, to drop the grenades they're carrying, and allows other players to pick them up and use them. The number of grenades dropped is dependent upon the plugin's control setting. The plugin's behavior is controllable by admins with level 'h' status via the 'amx_dod_deathnades' console command. The plugin has been fully tested on both Windows and LINUX servers running Amxx 1.76c.

New Features:
- Ability to control, via Admin Command, how many grenades are dropped
- Grenades will not be dropped if player commits suicide or is TKed
- Optionally reports to the killer, via chat, that the victim dropped grenades
- Optionally disallows victims killed by grenades or rockets to spawn grenades
- Grenades will fall at random locations near the victim, and at random angles
- Players may only carry 2 grenades of each type (4 grenades max)
- Ability to drop enemy grenades you've picked up
- Bots won't pickup grenades when 'use' key is not enforced
- Logs changes made by admins to the control value

Features Kept:
- Option to force players to press their 'use' key to pick up nades
- Grenade's lifespan time can be changed via cvar
- Spawns actual enemy's grenades

Features Dropped - why:
- Compatability with Zor's Smoke Grenades plugin - don't know how
- Option to drop ammobox model instead of grenade - didn't like it
- Ability to drop grenades while alive - like I'm gonna give up a nade
(Feel free to modify this plugin to re-add the features if you want them)

Command:
amx_dod_deathnades <#|?> (0 - 4, default = 2)
0 = Disables the plugin
1 = Drop 1 nade of YOUR TEAM'S type
2 = Drops up to 2 nades of ANY type (default)
3 = Drops up to 3 nades of ANY type
4 = Drops ALL nades of ANY type
(Note: Of course, nades are only dropped if you have them)

CVARS:
dod_deathnades_life <##> - Life (in seconds) of the grenade after its dropped (Default 20)
dod_deathnades_say <0|1> - Announce to killer, in chat, that victim dropped grenades (Default 1)
dod_deathnades_wpn <0|1> - Don't drop a grenade if killed by a grenade or rocket (Default 1)
dod_deathnades_use <0|1> - Force players to press the 'use' key to pick up grenades (Default 0)
dod_deathnades_glow <0|1> - Give nades a 'glowing' effect to help recognition.(Default 0)
dod_deathnades_glow_type <-1|0|1> - Glow for dropped (-1), both (0) or live (1) nades (Default 1)
dod_deathnades_glow_team <0|1> - Glow with yellow or use the team colors (Default 1 - team)

CREDIT and THANKS to:
Firestorm - www.dodplugins.net
- Original plugin idea and code

Wilson [29th ID] - www.dodplugins.net
- The main conversion of Firestorm's plugin to fakemeta
- Implemention of the 'use' key to pickup grenades
- Giving grenades a variable lifespan
- Use of #defines instead of fakemeta_util (sweet idea)

teame06 - www.alliedmods.net
- Providing a work-around for 'dod_get_user_ammo' on LINUX machines

Note:
There are now 2 versions offered...
V2.0 (dod_deathnades.sma) is for those who use Amxmodx prior to v1.8.
V2.2H (dod_deathnades_H.sma) utilizes features in the Hamsandwich module.

Revision History:
---------------
2.3H (10-14-09)
Fix/Work-around for bug in 'dodfun' module 1.80+ that causes nades to glow the wrong colors (incorrect thrown nade values returned by grenade_throw function).

2.2H (10-08-09)
Fixed nades being removed when touched but not picked up
Option to Glow dropped nades OR live nades (OR both)
Option to Glow nades with team colors or same color (yellow) for both

2.1H (3-12-09)
Added option to 'glow' dropped grenades
Nades dropped with random velocity
Changed grenade classname for compatibility with other plugins
Discontinued non-HamSandwich version updates
Note: This version introduced a minor bug that removed dropped nades
when they were touched by a player carring the max number of nades.

2.0H (6-3-08)
Utilizes HamSandwich for Touch and Think routines
Requires Amxmodx 1.8+ and Hamsandwich module

2.0 (6-3-08)
Corrrected weapons misreporting in DeathMsg
Fixed switching to picked-up nade if using a knife or spade
Cleanup nades if ctrl changed to 0 in the middle of a round
Many code efficiency improvements (see comments in sma)

1.85 (6-2-07)
Added server-side variable named DOD_Deathnades to track plugin usage via Game-Monitor
Changed CVAR dod_deathnades_life to default to 20 seconds
Changed CVAR dod_deathnades_use to default to 0

1.8 (5-6-07)
Added a routine to clear dropped grenades at the end of a round

1.7 (4-27-07)
Fix for servers running LINUX

1.6 (4-25-07)
Original release

RECOMMENDED UPDATE !!!
VERSION UPDATE 10/14/09

datwinkle 04-25-2007 22:50

Re: [DOD] Deathnades - Drop grenades on death
 
testing. will post bak soon.

Vet 04-25-2007 23:09

Re: [DOD] Deathnades - Drop grenades on death
 
Another poster (see THIS thread) said LINUX wouldn't catch the dod_get_user_ammo on client_death. So I've got another version that uses client_damage instead of client_death.

JUSTSMOKIN 04-27-2007 09:35

Re: [DOD] Deathnades - Drop grenades on death
 
ok axis drop the nades on Linux but the other teams don't and the nades axis drop are British ones i thought i was seeing things LMAO so still a little more tweaking to do

Regards

JS

Vet 04-27-2007 10:21

Re: [DOD] Deathnades - Drop grenades on death
 
When the Axis dropped the British nades, was it a Brit map?

Evidently there IS a difference between Windows and LINUX when it comes to the dod_get_user_ammo function. I've read about a couple of 'work-arounds' and will work on it.

Thanks for testing it for me. If you don't mind, I'll PM you when I've updated it for re-testing.

JUSTSMOKIN 04-27-2007 13:02

Re: [DOD] Deathnades - Drop grenades on death
 
No it wasn't a British map it was just plane avalanche yeah thats cool to pm for retesting m8 i will be delighted to test it for you no problems there at all

Regards

JS

Vet 04-27-2007 22:09

Re: [DOD] Deathnades - Drop grenades on death
 
4/27/06
UPDATED with new code that hopefully fixes it to work on LINUX servers.

Tested and works fine on Windows.

JUSTSMOKIN 04-28-2007 06:47

Re: [DOD] Deathnades - Drop grenades on death
 
I Will test it now and post some feed back here in like 20mins keep your fingers and any other oraphis you have that can be crossed LMAO

JUSTSMOKIN 04-28-2007 10:37

Re: [DOD] Deathnades - Drop grenades on death
 
Right where do i start it works now the nades can be picked up and the right models work for the right teams but the cvars don't seem to be working well only the one where it stops you from having to press e to pick up nades can you change the plugin for me so that you can just walk over them and also the time they stay on the ground the cvar wouldn't work for that neither but this is an amazing piece of work and i think you have done an amazing job but they are the only problems i came across this is on Linux so maby it will help you

regards

JS

datwinkle 04-28-2007 15:59

Re: [DOD] Deathnades - Drop grenades on death
 
Nice plugin


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

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