Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

DoD DropGrenades (v0.8)

by FeuerSturm · 2007-06-30 · 10 replies · 15295 views · 418 downloads

Read the thread (11 posts)

From the first post

//rn// DESCRIPTION:rn// ============rn//rn//  - players drop exactly the grenades they have left onrn//    death and alive players can pickup thosern//    (example: Axis player dies and drops a stickgrenadern//           -> Allied player picked it up while still having a handgrenadern//           -> Allies player dies and drops 1x Stick- and 1x Handgrenadern//           -> A player that has no grenades picks up both and will droprn//              both on death as well)rn// - grenades will be removed once a round is finishedrn// - additionally each player's previously dropped grenade(s) can be removedrn//   before dropping new ones.rn//

rn
rn
// rn// USAGE:rn// ======rn//rn// CVARS:rn//rn// dod_dropgrenades_enabled <1/0>    =  enable/disable DoD DropGrenadesrn//                                      1 = enabledrn//                                      0 = disabledrn//rn// dod_dropgrenades_removeold <1/0>  =  enable/disable removing player'srn//                                      previously dropped grenade(s) beforern//                                      dropping new onesrn//                                      1 = enabledrn//                                      0 = all grenades stay until roundendrn//rn// dod_dropgrenades_ignorebots <1/0> =  enable/disable ignoring botsrn//                                      1 = ignore bots (bots don't drop or pickup grenades)rn//                                      0 = don't ignore bots (bots drop and pickup grenades)rn//rn//rn// ADMIN COMMAND:rn//rn// amx_dropgrenades <1/0>  =  enable/disable DoD DropGrenadesrn//                            1 = enablern//                            0 = disable and remove all dropped grenadesrn//

rn
rn
//rn// CHANGELOG:rn// ==========rn//rn// - 26.07.2005 Version 0.5betarn//   Initial Public Releasern//rn// - 21.08.2005 Version 0.5beta2rn//   workaround:rn//   - added a fix for strange behavior on AMXX 1.50betarn//rn// - 27.08.2005 Version 0.6betarn//   changes:rn//   - removed workaround for AMXX 1.50beta as the bug isrn//     fixed in AMXX 1.55 which everyone should rather usern//     than 1.50beta!rn//rn// - 12.01.2007 Version 0.6rn//   changes:rn//   - made it so that whatever side you are it will pickup your type of nadesrn//     this is to make it compatiable with zors smoke nades pluginrn//   - added cvar to change amount of grenades allowed to havern//rn// - 30.06.2007 Version 0.7rn//   - discarded changes from v0.6rn//   - changed Engine- to Fakemeta-Module for better performancern//   - removed need for DoDFun modulern//   - changed to using pcvarsrn//   - added full Linux compatibility with removing dod_get_user_ammorn//     and counting players' grendades depending on their class after spawningrn//   - using grenade_throw forward to decrease amount of dropable grenadesrn//     when a player throws a grenade.rn//   - players now drop exactly the grenades they have left onrn//     death and alive players can pickup thosern//     (example: Axis player dies and drops a stickgrenadern//               -> Allied player picked it up while still having a handgrenadern//               -> Allies player dies and drops 1x Stick- and 1x Handgrenadern//               -> A player that has no grenades picks up both and will droprn//                  both on death as well)rn//   - removed all effects and ability to use an AmmoBox-Model instead of thern//     grenade models for dropped grenades for more realismrn//   - added cvar dod_dropgrenades_ignorebots with that bots can be preventedrn//     from dropping and picking up grenadesrn//rn// - 30.06.2007 Version 0.75rn//   - added ability to adjust the amount of grenades a player has by defaultrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//   - added ability to adjust the amount of grenades a player can pickuprn//     from the groundrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//   - added ability to adjust the amount of grenades that will be droppedrn//     when a player diesrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//rn// - 02.07.2007 Version 0.8rn//   - added roundstate "Draw" to clean up of dropped grenadesrn//   - added global tracking cvarrn//

rn
rn
rnPLEASE NOTE:
rnFrom now on this Plugin is considered a realism Plugin, if you
rnwish to have funny effects or different models for the dropped
rngrenades, please use "DoD DropGrenades 2" modded by "Wilson [29th ID]".
rnIt contains a lot more features other than the basic realism features.
rnIf you like realism though, DropGrenades v0.7 is the right one for you!
rn
rn
rnPLEASE NOTE #2:
rnIf you are running a Plugin that messes with or just changes the DoD default
rnamount of grenades that a specific player class has, you can adjust
rnDoD DropGrenades to fit to the changed amounts with editing the source code
rn(dod_dropgrenades.sma) with your text editor before compiling!
rnLook for the following lines:
rn
// PLEASE ONLY CHANGE THE FOLLOWING NUMBERS THAT DECLARE THErn// NUMBER OF GRENADES EACH GROUP OF CLASSES HAVE IF YOU ARErn// USING A PLUGIN THAT CHANGES THE STANDARD AMOUNT OF GRENADES!rnrn#define DOD_RIFLE_CLASSES	2	// GARAND, CARBINE, ENFIELD, K98, K43rn#define DOD_MP_CLASSES		1	// THOMPSON, BAR, GREASEGUN, BREN, STEN, MP40, STG44, FG42, SCOPED FG42rn#define DOD_SNIPER_CLASSES	0	// SPRINGFIELD, SCOPED ENFIELD, SCOPED K98rn#define DOD_MG_CLASSES		0	// 30CAL, MG34, MG42rn#define DOD_ROCKET_CLASSES	0	// BAZOOKA, PIAT, PANZERSCHRECKrnrnrn// THE FOLLOWING IS THE MAX AMOUNT OF GRENADES A PLAYER CANrn// PICKUP! ADJUST THIS VALUE CAREFULLY!rnrn#define DOD_GRENADES_PICKUP	2rnrnrn// THE FOLLOWING IS THE MAX AMOUNT OF GRENADES THAT WILL BE DROPPEDrn// WHEN A PLAYER DIES THAT HAD MORE THAN THE DOD STANDARD LIMIT!rn// TO PREVENT GRENADE-SPAMMING DEFAULT VALUE IS HIGHLY RECOMMENDED!rnrn#define DOD_DROPGRENADES_MAX	2

rn
rnIF NO OTHER PLUGIN MESSES WITH PLAYER'S GRENADES YOU
rnCAN LEAVE THE SOURCE CODE UNTOUCHED!

rn
rn
rnNow enjoy playing with a bit more realism! :D

Files

dod_dropgrenades.sma Plugin Source 18 KB 418 dl Download Compile

The thread

All 11 posts from 5 people on DoD DropGrenades (v0.8), kept as they were written.

FeuerSturm
started this thread
Posts: 166
Threads: 15
Joined: Jun 2007
06-30-2007, 12:21 PM #1
//rn// DESCRIPTION:rn// ============rn//rn//  - players drop exactly the grenades they have left onrn//    death and alive players can pickup thosern//    (example: Axis player dies and drops a stickgrenadern//           -> Allied player picked it up while still having a handgrenadern//           -> Allies player dies and drops 1x Stick- and 1x Handgrenadern//           -> A player that has no grenades picks up both and will droprn//              both on death as well)rn// - grenades will be removed once a round is finishedrn// - additionally each player's previously dropped grenade(s) can be removedrn//   before dropping new ones.rn//
rnrn
// rn// USAGE:rn// ======rn//rn// CVARS:rn//rn// dod_dropgrenades_enabled <1/0>    =  enable/disable DoD DropGrenadesrn//                                      1 = enabledrn//                                      0 = disabledrn//rn// dod_dropgrenades_removeold <1/0>  =  enable/disable removing player'srn//                                      previously dropped grenade(s) beforern//                                      dropping new onesrn//                                      1 = enabledrn//                                      0 = all grenades stay until roundendrn//rn// dod_dropgrenades_ignorebots <1/0> =  enable/disable ignoring botsrn//                                      1 = ignore bots (bots don't drop or pickup grenades)rn//                                      0 = don't ignore bots (bots drop and pickup grenades)rn//rn//rn// ADMIN COMMAND:rn//rn// amx_dropgrenades <1/0>  =  enable/disable DoD DropGrenadesrn//                            1 = enablern//                            0 = disable and remove all dropped grenadesrn//
rnrn
//rn// CHANGELOG:rn// ==========rn//rn// - 26.07.2005 Version 0.5betarn//   Initial Public Releasern//rn// - 21.08.2005 Version 0.5beta2rn//   workaround:rn//   - added a fix for strange behavior on AMXX 1.50betarn//rn// - 27.08.2005 Version 0.6betarn//   changes:rn//   - removed workaround for AMXX 1.50beta as the bug isrn//     fixed in AMXX 1.55 which everyone should rather usern//     than 1.50beta!rn//rn// - 12.01.2007 Version 0.6rn//   changes:rn//   - made it so that whatever side you are it will pickup your type of nadesrn//     this is to make it compatiable with zors smoke nades pluginrn//   - added cvar to change amount of grenades allowed to havern//rn// - 30.06.2007 Version 0.7rn//   - discarded changes from v0.6rn//   - changed Engine- to Fakemeta-Module for better performancern//   - removed need for DoDFun modulern//   - changed to using pcvarsrn//   - added full Linux compatibility with removing dod_get_user_ammorn//     and counting players' grendades depending on their class after spawningrn//   - using grenade_throw forward to decrease amount of dropable grenadesrn//     when a player throws a grenade.rn//   - players now drop exactly the grenades they have left onrn//     death and alive players can pickup thosern//     (example: Axis player dies and drops a stickgrenadern//               -> Allied player picked it up while still having a handgrenadern//               -> Allies player dies and drops 1x Stick- and 1x Handgrenadern//               -> A player that has no grenades picks up both and will droprn//                  both on death as well)rn//   - removed all effects and ability to use an AmmoBox-Model instead of thern//     grenade models for dropped grenades for more realismrn//   - added cvar dod_dropgrenades_ignorebots with that bots can be preventedrn//     from dropping and picking up grenadesrn//rn// - 30.06.2007 Version 0.75rn//   - added ability to adjust the amount of grenades a player has by defaultrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//   - added ability to adjust the amount of grenades a player can pickuprn//     from the groundrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//   - added ability to adjust the amount of grenades that will be droppedrn//     when a player diesrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//rn// - 02.07.2007 Version 0.8rn//   - added roundstate "Draw" to clean up of dropped grenadesrn//   - added global tracking cvarrn//rn
rnrnrnPLEASE NOTE:rnFrom now on this Plugin is considered a realism Plugin, if yournwish to have funny effects or different models for the droppedrngrenades, please use "DoD DropGrenades 2" modded by "Wilson [29th ID]".rnIt contains a lot more features other than the basic realism features.rnIf you like realism though, DropGrenades v0.7 is the right one for you!rnrnrnPLEASE NOTE #2:rnIf you are running a Plugin that messes with or just changes the DoD defaultrnamount of grenades that a specific player class has, you can adjustrnDoD DropGrenades to fit to the changed amounts with editing the source codern(dod_dropgrenades.sma) with your text editor before compiling!rnLook for the following lines:rn
rn// PLEASE ONLY CHANGE THE FOLLOWING NUMBERS THAT DECLARE THErn// NUMBER OF GRENADES EACH GROUP OF CLASSES HAVE IF YOU ARErn// USING A PLUGIN THAT CHANGES THE STANDARD AMOUNT OF GRENADES!rnrn#define DOD_RIFLE_CLASSES	2	// GARAND, CARBINE, ENFIELD, K98, K43rn#define DOD_MP_CLASSES		1	// THOMPSON, BAR, GREASEGUN, BREN, STEN, MP40, STG44, FG42, SCOPED FG42rn#define DOD_SNIPER_CLASSES	0	// SPRINGFIELD, SCOPED ENFIELD, SCOPED K98rn#define DOD_MG_CLASSES		0	// 30CAL, MG34, MG42rn#define DOD_ROCKET_CLASSES	0	// BAZOOKA, PIAT, PANZERSCHRECKrnrnrn// THE FOLLOWING IS THE MAX AMOUNT OF GRENADES A PLAYER CANrn// PICKUP! ADJUST THIS VALUE CAREFULLY!rnrn#define DOD_GRENADES_PICKUP	2rnrnrn// THE FOLLOWING IS THE MAX AMOUNT OF GRENADES THAT WILL BE DROPPEDrn// WHEN A PLAYER DIES THAT HAD MORE THAN THE DOD STANDARD LIMIT!rn// TO PREVENT GRENADE-SPAMMING DEFAULT VALUE IS HIGHLY RECOMMENDED!rnrn#define DOD_DROPGRENADES_MAX	2rn
rnrnIF NO OTHER PLUGIN MESSES WITH PLAYER'S GRENADES YOUrnCAN LEAVE THE SOURCE CODE UNTOUCHED!rnrnrnNow enjoy playing with a bit more realism! :D

{SR} *Raggy*
posted here
Posts: 370
Threads: 27
Joined: Apr 2006
06-30-2007, 12:24 PM #2

I've got to try this out :D I was waiting for a newer one(I tried Wilson's one but it didn't work... Hopefully this will work :)) Thank you :D

FeuerSturm
started this thread
Posts: 166
Threads: 15
Joined: Jun 2007
06-30-2007, 12:50 PM #3
I've got to try this out :D I was waiting for a newer one(I tried Wilson's one but it didn't work... Hopefully this will work :)) Thank you :D
rnrnYou're welcome! The only thing causing the old version andrnWilson's version to not work is "dod_set_user_ammo" which i buggy andrneven worse on Linux, my Version 0.7 isn't using that buggy nativernand i tested it successfully on windows AND linux. :cool:

{SR} *Raggy*
posted here
Posts: 370
Threads: 27
Joined: Apr 2006
06-30-2007, 05:00 PM #4

Works perfectly :D I'm guessing that it's supposed to only let you pick up 1 nade from a persons lost nades... That's the only thing I noticed on this but it's brilliant anywayz without the whole picking up all the nades :P

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
06-30-2007, 06:24 PM #5

one thing with the way your counting nades now is.. what about servers running plugins that give extra nades or such to classes? like giving a nade to rocket classes for example.. this wouldnt know they have one..

FeuerSturm
started this thread
Posts: 166
Threads: 15
Joined: Jun 2007
06-30-2007, 06:34 PM #6
one thing with the way your counting nades now is.. what about servers running plugins that give extra nades or such to classes? like giving a nade to rocket classes for example.. this wouldnt know they have one..
rnrnyes, that's correct, i'll add some defines for the classes, so peoplerncan adjust the settings to their needs, not a big deal though ;) rnrn
Works perfectly :D I'm guessing that it's supposed to only let you pick up 1 nade from a persons lost nades... That's the only thing I noticed on this but it's brilliant anywayz without the whole picking up all the nades :P
rnrnyou should get both dropped grenades if you don't have any, if you stillrnhave 1 left, you will only get 1 of 2 from the ground.rnif that's not the case, please let me know!

{SR} *Raggy*
posted here
Posts: 370
Threads: 27
Joined: Apr 2006
06-30-2007, 06:56 PM #7

I'll try it again... I did have one grenade but I'll check if I can pick up the 2 of themrnrnPerfect I can pick up 2 that are on the ground from the previous person that had them :) Thank you again :D

FeuerSturm
started this thread
Posts: 166
Threads: 15
Joined: Jun 2007
06-30-2007, 08:12 PM #8
//rn// - 30.06.2007 Version 0.75rn//   - added ability to adjust the amount of grenades a player has by defaultrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//   - added ability to adjust the amount of grenades a player can pickuprn//     from the groundrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//   - added ability to adjust the amount of grenades that will be droppedrn//     when a player diesrn//     NOTE: if you are not using any plugins that mess with thern//           amount of grenades per player, keep the default value!rn//
rnrnPLEASE NOTE:rnIf you are running a Plugin that messes with or just changes the DoD defaultrnamount of grenades that a specific player class has, you can adjustrnDoD DropGrenades to fit to the changed amounts with editing the source codern(dod_dropgrenades.sma) with your text editor before compiling!rnLook for the following lines:rn
rn// PLEASE ONLY CHANGE THE FOLLOWING NUMBERS THAT DECLARE THErn// NUMBER OF GRENADES EACH GROUP OF CLASSES HAVE IF YOU ARErn// USING A PLUGIN THAT CHANGES THE STANDARD AMOUNT OF GRENADES!rnrn#define DOD_RIFLE_CLASSES	2	// GARAND, CARBINE, ENFIELD, K98, K43rn#define DOD_MP_CLASSES		1	// THOMPSON, BAR, GREASEGUN, BREN, STEN, MP40, STG44, FG42, SCOPED FG42rn#define DOD_SNIPER_CLASSES	0	// SPRINGFIELD, SCOPED ENFIELD, SCOPED K98rn#define DOD_MG_CLASSES		0	// 30CAL, MG34, MG42rn#define DOD_ROCKET_CLASSES	0	// BAZOOKA, PIAT, PANZERSCHRECKrnrnrn// THE FOLLOWING IS THE MAX AMOUNT OF GRENADES A PLAYER CANrn// PICKUP! ADJUST THIS VALUE CAREFULLY!rnrn#define DOD_GRENADES_PICKUP	2rnrnrn// THE FOLLOWING IS THE MAX AMOUNT OF GRENADES THAT WILL BE DROPPEDrn// WHEN A PLAYER DIES THAT HAD MORE THAN THE DOD STANDARD LIMIT!rn// TO PREVENT GRENADE-SPAMMING DEFAULT VALUE IS HIGHLY RECOMMENDED!rnrn#define DOD_DROPGRENADES_MAX	2rn
rnrnIF NO OTHER PLUGIN MESSES WITH PLAYER'S GRENADES YOUrnCAN LEAVE THE SOURCE CODE UNTOUCHED!

FeuerSturm
started this thread
Posts: 166
Threads: 15
Joined: Jun 2007
07-02-2007, 05:04 PM #9
//rn// - 02.07.2007 Version 0.8rn//   - added roundstate "Draw" to clean up of dropped grenadesrn//   - added global tracking cvarrn//
rnrnAs always, please report bugs with the new version immediately!rnrnEnjoy!

E Eden_Fire
posted here
Posts: 1
Threads: 0
Joined: Jan 2009
01-19-2009, 07:51 PM #10

Hey FeuerSturm,rnrnI'm running the plugin...the nades drop but are unable to be picked up by anyone. All plugins set to default...no other plugins concerning weapon mods/grenade mods are running or active. Thoughts?

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
01-19-2009, 07:59 PM #11

FeuerSturm isnt here much anymore unfortunately... however i dont use this version but one by Vet.. You can find it at allied modders...

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC