Raised This Month: $105 Target: $400
 26% 

Molotov Cocktail v3.30 - Released April 13, 2014


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   Exolent[jNr] (178)
DynamicBits
Senior Member
Join Date: Sep 2007
Location: US
Old 11-20-2008 , 06:04   Molotov Cocktail v3.30 - Released April 13, 2014
Reply With Quote #1

Description

This plugin adds a new type of grenade, the Molotov cocktail. It can be used in addition to the standard grenade (high explosive in CS/CS:CZ, hand grenade/stick grenade/Mills bomb in DOD, hand grenade in TFC), or as a replacement.


YouTube Video Demonstration
Geeky video capture details


This version is based on the last version released by SAMURAI & [ --<[email protected] ] Black Rose. Some CVARs, default values, command arguments, and file paths have been changed. Please read everything here if you are upgrading. I recommend you delete all of the old files related to this plugin as the zip file below has everything required in the proper path.

This plugin supports Counter-Strike 1.6, Counter-Strike: Condition Zero, Day of Defeat 1.2, and Team Fortress Classic 1.5.

I have put countless hours of my time into this plugin and wish for it to work as flawlessly as possible. In return, I only ask that you report any bugs you may find. Either post a reply to this thread, or add a new task to my bug tracker (quick registration required).


Installation

Just unzip the archive into your <modname> directory, (e.g. cstrike, czero, dod, tfc). The location of this directory depends on where your server was installed, but some examples are:
  • Linux: /usr/local/hlds/cstrike/, /opt/hlds/cstrike/
  • Windows: C:\Program Files\Steam\SteamApps\<username>\dedicated server\cstrike\
Unimportant details about every files used and which mods require which files


Once the files are in place, add the following line to plugins.ini:
Code:
molotov_cocktail.amxx
Optionally, add any CVARs you wish to customize to server.cfg (or another config file of your choosing).


Usage

Say Commands
  • molotov Buy a Molotov
  • /molotov Buy a Molotov

Console Commands
  • molotov_give <player|@all|@t|@ct|@al|@ax|@br|@b|@r|@y|@g > Give Molotovs to a player, everyone, or specified team
  • molotov_cocktail [0|1] Enable(1)/Disable(0) the plugin (If no arguments, show the status)
  • molotov_override [0|1] Enable(1)/Disable(0) the standard grenade override (If no arguments, show the status)


Configuration

CVARs
  • molotov_enabled <0|1> (Default: 1) Enable(1)/Disable(0) the plugin
  • molotov_price <N> (Default: 1200) Set the Molotov price (Counter-Strike only)
  • molotov_damage <N> (Default: 50) Set the damage done by initial Molotov explosion
  • molotov_radius <N> (Default: 150) Set the radius of Molotov damage
  • molotov_firetime <N> (Default: 6) Duration (in seconds) of fire effects, sounds, etc.
  • molotov_firedamage <N> (Default: 3) Amount of damage done by fire effects (every 0.2 secs)
  • molotov_ff <0|1|-1|-2> (Default: 1) Set Molotov friendly fire status (Was molotov_tk)
    • 0 - Disable friendly fire for Molotov (regardless of mp_friendlyfire)
    • 1 - Enable friendly fire for Molotov (regardless of mp_friendlyfire)
    • -1 - Use mp_friendlyfire value (v3.21+)
    • -2 - Check bit 5 (decimal: 16) of mp_teamplay (DOD and TFC only) (v3.21+)
  • molotov_override_he <0|1> (Default: 0) Override the mod's standard grenade automatically with Molotov (Was molotov_tempoverride)
  • molotov_max <N> (Default: 1) Limit carried Molotovs to this amount (Does not work with override)
    (Recommended: CSTRIKE: ≤ 10; DOD: ≤ 9; TFC: ≤ 4;)
  • molotov_buyzone <0|1> (Default: 1) Limit Molotov buying to buyzone (Counter-Strike only)
  • molotov_menu <0|1> (Default: 0) Enable menu at beginning of each round (Was amx_molotovmenu) (Counter-Strike only)
  • mp_friendlyfire <0|1> Only checked if molotov_ff = -1
  • mp_teamplay <N> Only checked if molotov_ff = -2 (DOD/TFC only)


Known Issues and (Possible) Future Changes
  • When you "drop weapon" with a molotov equipped ("G" by default), the model shown is of the HE (Counter-Strike)
  • Multilingual support is missing
  • CSTRIKE: Killing hostages doesn't penalize killer
  • DOD: Player grenade count not updated immediately
  • DOD: Wrong throwing animation played
  • DOD/TFC: Molotov doesn't explode after hitting breakable glass
  • TFC: Molotov kills allied team players (e.g. hunted) This is due to a bug in tfc_is_team_ally() in AMX Mod X


Changelog/Credit
Code:
- DynamicBits
  * Version 3.30 (2014-04-13)
    - (Beta) Day of Defeat support was added
    - (Beta) Team Fortress Classic support was added
    - (Untested) Stats logging support was added
    - New values for molotov_ff were added
    - Friction/velocity after explosion was adjusted for realism
    - Bottle breaking sound was added
    - Molotov suicides no longer reward extra score points
    - Frag count calculations were fixed
    - Money calculations were fixed
    - Override no longer sets a negative number of Molotovs
    - Default price was changed to match standard grenades
    - Console text now goes to correct console
    - Text (non-VGUI) buy menu support was removed
    - Converted fun functions to fakemeta_util functions (removed fun include)
    - Various optimizations
    - A few typos were fixed
  * Version 3.20 (2008-11-20)
    - My first public release
    - Finally tracked down and fixed the intermittent crashing problem (I hope!)
    - Modified default damage values
    - molotov_cocktail/molotov_override commands now change settings *or* display status
    - Broken Molotov model stays closer to the explosion (looks more realistic)
    - Task IDs are now guaranteed to be unique
    - Modified anti-lag calculations to be more accurate (less likely to lag)
    - Changed amx_molotovmenu CVAR to molotov_menu
    - Changed molotov_tk CVAR to molotov_ff
    - Changed molotov_tempoverride CVAR to molotov_override_he
    - Preparation for support of mods other than Counter-Strike
    - Fixed lots of coding mistakes
    - Optimized several sections of code
    - Corrected grammar/typos
    - Clean up code (Removed unused code/unhelpful comments, fixed formatting, and semicolons!)
- Raffe (CantShoot)
  * (Unversioned release)
    - Originally fixed plugin to run on Linux servers
    - Added optional menu to purchase Molotov cocktails each round
    - Moved models and sounds into proper molotov/ subdirectories
    - Fixed Molotovs not being reset upon player disconnect
    - (Almost) fixed Molotovs not being removed for new round
    - Added @all/@ct/@t arguments to molotov_give command
    - Changed some models/sound
- [ --<[email protected] ] Black Rose
  * Version 3.0-3.1c ?
    - Unknown changes
- SAMURAI
  * Original plugin author

Other Versions

Every version of the files for this plugin will be available via my SVN repository. Please note that there are files for other plugins in there as well.


--
Andy


Each of the zip files differs by only one line in the source code (#define CSTRIKE vs. #define DOD vs #define TFC).
Attached Files
File Type: sma Get Plugin or Get Source (molotov_cocktail.sma - 4083 views - 59.9 KB)
File Type: zip molotov_cocktail-3.30_cstrike.zip (547.5 KB, 4968 views)
File Type: zip molotov_cocktail-3.30_dod.zip (547.5 KB, 1007 views)
File Type: zip molotov_cocktail-3.30_tfc.zip (547.5 KB, 936 views)

Last edited by DynamicBits; 04-13-2014 at 20:07. Reason: v3.30 Release
DynamicBits is offline
DynamicBits
Senior Member
Join Date: Sep 2007
Location: US
Old 11-20-2008 , 06:05   Molotov Cocktail v3.30
Reply With Quote #2

Common Issues

Why does the molotov cocktail look/explode like a grenade once thrown in Day of Defeat?

There was a bug in the dodfun module that affected the behavior of this plugin. Please update your server to the 1.8.3-dev-hg152 or newer snapshot of AMX Mod X. Be sure to get the dod files and the base files. Your server should have Metamod/Metamod-P 1.21 or newer as well.

Why doesn't this work correctly on a Linux Team Fortress Classic server?

There was a bug in the TFCX module (the Linux offset was wrong). Please update your server to the 1.8.3-dev-hg185 or newer snapshot of AMX Mod X. Be sure to get the tfc files and the base files. Your server should have Metamod/Metamod-P 1.21 or newer as well.

Why does my Windows server instantly close when I enable this plugin?

Most likely, you did not install the extra resources (models, sound, sprites). Extract everything from the zip file into your server directory.

Last edited by DynamicBits; 04-13-2014 at 19:37. Reason: Common Issues
DynamicBits is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 11-20-2008 , 08:03   Re: Molotov Cocktail v3.20
Reply With Quote #3

Thanks...
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-21-2008 , 11:59   Re: Molotov Cocktail v3.20
Reply With Quote #4

I have also removed the .amxx files from the zip. You are not allowed to upload compiled copies of plugins
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (intervening in a thread, asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
DynamicBits
Senior Member
Join Date: Sep 2007
Location: US
Old 11-22-2008 , 06:44   Re: Molotov Cocktail v3.20
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
You are not allowed to upload compiled copies of plugins
I read over the only rules I could find before I posted this and didn't see that mentioned. It does seem like a good idea, especially after the UAIO incident. Where can I find a more complete list of rules?
DynamicBits is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 11-22-2008 , 10:16   Re: Molotov Cocktail v3.20
Reply With Quote #6

1. As i can see, you don't need csx module
2. You can remove the fun module very easy, using fm_give_item and fm_set_user_frags from fm util.
3.
PHP Code:
if (key == 0) {
        
buy_molotov(id);
    } else if (
key == 1) {
        
client_print(idprint_center">You have chosen not to buy a Molotov Coctail<");
    } else {
        
client_print(idprint_center">You have choosen to exit the molotov menu...<");
    } 
->
PHP Code:
switch(key)
    {
        case 
0buy_molotov(id);
        case 
1client_print(idprint_center">You have chosen not to buy a Molotov Coctail<");
        default: 
client_print(idprint_center">You have choosen to exit the molotov menu...<");
    } 
4.
PHP Code:
if(id// something
else 
    
//... 
->
PHP Code:
id /* something */ /* ... */ 
5. Good Job
__________________


Last edited by anakin_cstrike; 11-22-2008 at 10:25.
anakin_cstrike is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-22-2008 , 10:22   Re: Molotov Cocktail v3.20
Reply With Quote #7

Quote:
Originally Posted by DynamicBits View Post
I read over the only rules I could find before I posted this and didn't see that mentioned. It does seem like a good idea, especially after the UAIO incident. Where can I find a more complete list of rules?
The link you posted. Since the forum adds the link to download the compiled copy, there is no need to upload the .amxx. If you want it to be added to the rules, I can arrange that
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (intervening in a thread, asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
DynamicBits
Senior Member
Join Date: Sep 2007
Location: US
Old 11-23-2008 , 15:57   Re: Molotov Cocktail v3.20
Reply With Quote #8

Quote:
Originally Posted by anakin_cstrike View Post
1. As i can see, you don't need csx module
2. You can remove the fun module very easy, using fm_give_item and fm_set_user_frags from fm util.
3.
PHP Code:
if (key == 0) {
        
buy_molotov(id);
    } else if (
key == 1) {
        
client_print(idprint_center">You have chosen not to buy a Molotov Coctail<");
    } else {
        
client_print(idprint_center">You have choosen to exit the molotov menu...<");
    } 
->
PHP Code:
switch(key)
    {
        case 
0buy_molotov(id);
        case 
1client_print(idprint_center">You have chosen not to buy a Molotov Coctail<");
        default: 
client_print(idprint_center">You have choosen to exit the molotov menu...<");
    } 
4.
PHP Code:
if(id// something
else 
    
//... 
->
PHP Code:
id /* something */ /* ... */ 
5. Good Job
  1. Agreed. The funny thing is that no matter how many times I looked through all of the code, I never once thought to check that all of the includes were actually required.
  2. Agreed.
  3. Agreed. That's the way I would have written it from scratch.
  4. On this one, I'll have to respectfully disagree. If the lines of code were much shorter, what you suggested would be practical, but the way I have it allows for much better readability.
  5. Thank-you for your suggestions. I have already updated the code in SVN and you can expect to see the changes in version 3.21.

Quote:
Originally Posted by YamiKaitou View Post
The link you posted. Since the forum adds the link to download the compiled copy, there is no need to upload the .amxx. If you want it to be added to the rules, I can arrange that
I think it would benefit everyone if the only available list of rules actually had all of the rules listed. It would probably save you some trouble in the future as well.
DynamicBits is offline
Contrenature
Member
Join Date: Nov 2008
Location: Latvia, Liepaya, Riga
Old 11-25-2008 , 06:13   Re: Molotov Cocktail v3.20
Reply With Quote #9

OMG

So i cannot extract resources, reason:

Unknow method, WHY???

DynamicBits HELP!!!

Last edited by Contrenature; 11-25-2008 at 06:18.
Contrenature is offline
Send a message via Skype™ to Contrenature
DynamicBits
Senior Member
Join Date: Sep 2007
Location: US
Old 11-25-2008 , 14:10   Re: Molotov Cocktail v3.20
Reply With Quote #10

Quote:
Originally Posted by Contrenature View Post
So i cannot extract resources, reason:

Unknow method, WHY???
What program and version are you using to extract? Windows or Linux?
DynamicBits is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:28.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode