Raised This Month: $32 Target: $400
 8% 

Ultimate Fire in the Hole [Messages|Grenade Trail|Grenade Glow|Sounds]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-14-2016 , 16:08   Ultimate Fire in the Hole [Messages|Grenade Trail|Grenade Glow|Sounds]
Reply With Quote #1



Ultimate Fire in the Hole

Description
  • This plugin allows you to change the messages which show up when you throw a grenade (fire in the hole), to add custom trail with different colors, as well as different sounds for every grenade there is or completely block them.

Images



http://i.imgur.com/y40w0KW.jpg
http://i.imgur.com/5KQiZfv.jpg
http://i.imgur.com/fSVxmon.jpg
http://i.imgur.com/ZhHTvtf.jpg
http://i.imgur.com/WSwbRZw.jpg
http://i.imgur.com/fKW9zOm.jpg
http://i.imgur.com/X1kzaGd.jpg

Settings
  • The settings can be changed from the file configs/FireInTheHole.ini:

    [Messages = 1] - In this section you can find and modify the grenade messages. Set it to "0" if you want to disable them and use the default ones.
    • MSG_HE: The message when you throw a HE grenade.
    • MSG_FLASH: The message when you throw a Flash grenade.
    • MSG_SMOKE: The message when you throw a Smoke grenade.
    • MSG_SHOW_TYPE: Which players should be able to see the messages?
      • "0" = disable messages completely.
      • "1" = only the player who threw the grenade.
      • "2" = only teammates.
      • "3" = all players.
    • MSG_ADMIN_LISTEN: Whether admins should see other team's messages if MSG_SHOW_TYPE = 2.
    • MSG_ADMIN_FLAG: The admin flag for the setting above.
    • MSG_TEAM_T: Used when %team% is applied.
    • MSG_TEAM_CT: Used when %team% is applied.
    • MSG_TEAM_SPEC: Used when %team% is applied.

    [Sounds = 0] - Change it to "1" if you want to enable custom sounds when you throw a grenade. You can leave a field blank if you want that grenade to be without a sounds. Leave them all blank if you want to completely block the "fire in the hole" sound.
    • SOUND_HE: The sound when you throw a HE grenade.
    • SOUND_FLASH: The sound when you throw a Flash grenade.
    • SOUND_SMOKE: The sound when you throw a Smoke grenade.
    • SOUND_PLAY_TYPE: Who should hear the sound?
      • "0" = nobody, disables sounds completely.
      • "1" = only the player who threw the grenade.
      • "2" = only teammates.
      • "3" = all players.


    [Trail = 1] - Here you can moidfy the grenades' trail. Set it to "0" if you want to disable it. Use "R" if you want the given value of the color to be random (Example: 255 R 150 or R R R).
    • TRAIL_HE: The trail when you throw a HE grenade.
    • TRAIL_FLASH: The trail when you throw a Flash grenade.
    • TRAIL_SMOKE: The trail when you throw a Smoke grenade.
    • TRAIL_SPRITE: The sprite for the trail.
    • TRAIL_LIFE: Trail duration.
    • TRAIL_WIDTH: Trail width.
    • TRAIL_BRIGHTNESS: Trail brightness.
    • TRAIL_SHOW_TYPE: Who can see the trail?
      • "0" = everybody.
      • "1" = only the player who threw the grenade.
      • "2" = only teammates.

    [Glow = 1] - This section allows you to make grenades glow after they are thrown in the air. Use "R" if you want the given value of the color to be random (Example: 255 R 150 or R R R).
    • GLOW_HE: Glow for HE Grenade.
    • GLOW_FLASH: Glow for Flash Grenade.
    • GLOW_SMOKE: Glow for Smoke Grenade.
    • GLOW_BRIGHTNESS: Glow brightness.
    • GLOW_TYPE: Glow type ("0" = don't apply invisibility to the grenade).

    [Explode = 0] - Here you can change the time it takes for a grenade to explode after it has been thrown.
    • EXPLODE_HE: Explosion time for HE Grenade.
    • EXPLODE_FLASH: Explosion time for Flash Grenade.
    • EXPLODE_SMOKE: Explosion time for Smoke Grenade.




Last edited by OciXCrom; 04-14-2020 at 13:54.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
ComedyShotsGamer
Senior Member
Join Date: Mar 2016
Old 05-14-2016 , 17:20   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #2

Nice Plugin good Idea!
ComedyShotsGamer is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-14-2016 , 19:26   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #3

whats the difference between others plugins? .ini file?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-14-2016 , 20:09   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #4

This one also exists: https://forums.alliedmods.net/showthread.php?p=401813

But yours has more configuration\customization.
__________________

Last edited by Bugsy; 05-14-2016 at 20:34.
Bugsy is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-14-2016 , 21:15   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #5

Exactly!
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-15-2016 , 08:17   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #6

Quote:
Originally Posted by EFFx View Post
Exactly!
Exactly as well. It has many things you can customize and it's far more easier to make changes to it in comparison with the other one(s). I know there's already a plugin for grenade messages and another one for grenade trail, but I think that these things should be combined together and made easy to modify. The downside of "Descriptive Fire in the Hole" is that it has got no cvars/cfg file at all and users need to modify the .sma file in order to make changes. In comparison with "Grenade Trail", this one allows you to modify the sprite, width, duration and brightness, as well as set a random color for each grenade/color value, instead of doing it for all of them at once. I also included an option to add a different "fire in the hole" sound for each grenade, which I wasn't able to find in any other plugin. It also enables you to block the sound completely, which is another highly requested modification. I would probably add even more options to this one, since I named it "ultimate", so let me know if you have any suggestions.

Last edited by OciXCrom; 05-15-2016 at 08:19.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
GordonFreeman (RU)
Veteran Member
Join Date: Jan 2010
Location: Uzbekistan
Old 05-15-2016 , 08:50   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #7

gj
__________________
The functional way is the right way
GordonFreeman (RU) is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-15-2016 , 09:28   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #8

This could be approved ,it has sounds, trail colorchat messages to customize. It's very useful for many servers...

Last edited by siriusmd99; 05-15-2016 at 09:29.
siriusmd99 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-15-2016 , 10:26   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #9

I'm glad that you like it. I added more options to it:

  • Added a glow section, from where you can activate grenade glow on thrown grenades.
  • You can customize the glow for every grenade, as well as make it random.
  • You can even make the grenades look like this - http://i.imgur.com/fKW9zOm.jpg
  • Added an option to configure which players can see the grenade messages: nobody, only the player who threw the grenade, only teammates, or all players.
  • You can make admins with a specified flags use "admin listen" to see other team's grenade messages.
  • You can now use %team% in the messages to show the player's team (the team names are also customizable).
  • Added an option to configure which players can hear the sounds: nobody, only the player who threw the grenade, only teammates, or all players.
  • Fixed a small but annoying mistake - all players could see everyones' messages/sounds.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-15-2016 , 12:05   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Sounds]
Reply With Quote #10

Yeah, that's something with more functionalities, so I'm okay with it.

As per usual, firstly what I saw at a quick glance:
  • In fileRead:
    • strlen(szData) should be cached.
    • You should add some checks for data validity inside configuration file. Like, when you get the color for message, it can be from 3 to 6, everything that is outside this is invalid. For this, use clamp:
      PHP Code:
      clamp(str_to_num(szValue), 36
      How this works? Anything lower than 3 is converted to 3, everything bigger than 6 becomes 6, so you don't get invalid input. If between 3 and 6, value does not change. Apply such kind of checks on any kind of value, when it makes sense.
    • You should also check if your szValue contains something and it's not empty:
      PHP Code:
      if(is_blank(szValue))
      {
           continue 

      Should be before if(g_eSettings[stgMsgEnable]).
    • Checking if sound/sprite exists before passing it to precache would be nice. Use file_exists for that.
    • In case of wrong configuration, make some logs to notify the user.
  • When replacing the old sounds/sprites you could unprecache the new ones(just a matter to hook FM_PrecacheModel for sprites and check the sprite name, for sounds hook FM_PrecacheSound). I assume you know default names for sounds & sprites.
  • In fwdSetModel, check if entity is valid before doing anything.
  • In grenade_throw check if user is alive before retrieving team.
__________________

Last edited by HamletEagle; 05-15-2016 at 12:06.
HamletEagle is offline
Reply



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 19:46.


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