AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Molotov Cocktail v3.30 - Released April 13, 2014 (https://forums.alliedmods.net/showthread.php?t=80745)

DynamicBits 11-20-2008 05:04

Molotov Cocktail v3.30 - Released April 13, 2014
 
5 Attachment(s)
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.

https://i.ytimg.com/vi/jhOUyv8V5tI/hqdefault.jpg
YouTube Video Demonstration
Geeky video capture details


This version is based on the last version released by SAMURAI & [ --<-@ ] 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
- [ --<-@ ] 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).

DynamicBits 11-20-2008 05:05

Molotov Cocktail v3.30
 
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.

Fry! 11-20-2008 07:03

Re: Molotov Cocktail v3.20
 
Thanks... :)

YamiKaitou 11-21-2008 10:59

Re: Molotov Cocktail v3.20
 
I have also removed the .amxx files from the zip. You are not allowed to upload compiled copies of plugins

DynamicBits 11-22-2008 05:44

Re: Molotov Cocktail v3.20
 
Quote:

Originally Posted by YamiKaitou (Post 716502)
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?

anakin_cstrike 11-22-2008 09:16

Re: Molotov Cocktail v3.20
 
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

YamiKaitou 11-22-2008 09:22

Re: Molotov Cocktail v3.20
 
Quote:

Originally Posted by DynamicBits (Post 716788)
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

DynamicBits 11-23-2008 14:57

Re: Molotov Cocktail v3.20
 
Quote:

Originally Posted by anakin_cstrike (Post 716857)
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 (Post 716862)
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. :wink:

Contrenature 11-25-2008 05:13

Re: Molotov Cocktail v3.20
 
OMG :shock::twisted:

So i cannot extract resources, reason:

Unknow method, WHY???

DynamicBits HELP!!!

DynamicBits 11-25-2008 13:10

Re: Molotov Cocktail v3.20
 
Quote:

Originally Posted by Contrenature (Post 718075)
So i cannot extract resources, reason:

Unknow method, WHY???

What program and version are you using to extract? Windows or Linux?


All times are GMT -4. The time now is 11:31.

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