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

[CS:S, ZRiot & ZReloaded] Grenade Effects v2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Plugin ID:
2387
Plugin Version:
2.0
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
Servers with this Plugin:
32 
Plugin Description:
Changes he grenades to napalm grenades, smoke grenades to freeze grenades and flashbangs to flashlights, and adds trails
Old 06-19-2011 , 04:05   [CS:S, ZRiot & ZReloaded] Grenade Effects v2.0
Reply With Quote #1

Requirements:
  • Zombie:Reloaded r647+
or
  • Zombie:Riot

Decription:
-----------------------------------------------------------------
Changes he grenades to napalm grenades, smoke grenades to freeze grenades and flashbangs to flashlights, and adds trails
-----------------------------------------------------------------

Console Variables:
-----------------------------------------------------------------
ZombieMod:
  • zr_greneffect_enable (zriot_greneffect_enable) - Enables/Disables the plugin
  • zr_greneffect_trails (zriot_greneffect_trails) - Enables/Disables grenade trails
  • zr_greneffect_napalm_he (zriot_greneffect_napalm_he) - Changes a he grenade to a napalm grenade
  • zr_greneffect_napalm_he_duration (zriot_greneffect_napalm_he_duration) - The napalm duration in seconds
  • zr_greneffect_smoke_freeze (zriot_greneffect_smoke_freeze) - Changes a smoke grenade to a freeze grenade
  • zr_greneffect_smoke_freeze_distance (zriot_greneffect_smoke_freeze_distance) - The freeze grenade distance
  • zr_greneffect_smoke_freeze_duration (zriot_greneffect_smoke_freeze_duration) - The freeze duration in seconds
  • zr_greneffect_flash_light (zriot_greneffect_flash_light) - Changes a flashbang to a flashlight
  • zr_greneffect_flash_light_distance (zr_greneffect_flash_light_distance) - The light distance
  • zr_greneffect_flash_light_duration (zr_greneffect_flash_light_duration) - The light duration in seconds

-----------------------------------------------------------------

Public:
  • sm_greneffect_enable - Enables/Disables the plugin
  • sm_greneffect_trails - Enables/Disables grenade trails
  • sm_greneffect_napalm_he - Changes a he grenade to a napalm grenade
  • sm_greneffect_napalm_he_duration - The napalm duration in seconds
  • sm_greneffect_smoke_freeze - Changes a smoke grenade to a freeze grenade
  • sm_greneffect_smoke_freeze_distance - The freeze grenade distance
  • sm_greneffect_smoke_freeze_duration - The freeze duration in seconds
  • sm_greneffect_flash_light - Changes a flashbang to a flashlight
  • sm_greneffect_flash_light_distance - The light distance
  • sm_greneffect_flash_light_duration - The light duration in seconds
Also public plugin obeys console variable mp_friendlyfire
-----------------------------------------------------------------

For developers:
-----------------------------------------------------------------
Public plugin:
PHP Code:
/**
 * Called when a player is about to be freezed by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration, set by reference 
 * @return        Plugin_Changed to apply new values, Plugin_Contninue to allow as is and >= Plugin_Handled to block
 */
forward Action:OnClientFreeze(clientattacker, &Float:duration);

/**
 * Called when a player has been freezed by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration
 * @noreturn
 */
forward OnClientFreezed(clientattackerFloat:duration);

/**
 * Called when a player is about to be ignited by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The ignite duration, set by reference 
 * @return        Plugin_Changed to apply new values, Plugin_Contninue to allow as is and >= Plugin_Handled to block
 */
forward Action:OnClientIgnite(clientattacker, &Float:duration);

/**
 * Called when a player has been ignited by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration
 * @noreturn
 */
forward OnClientIgnited(clientattackerFloat:duration); 
Zombie:Reloaded plugin:
PHP Code:
/**
 * Called when a player is about to be freezed by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration, set by reference 
 * @return        Plugin_Changed to apply new values, Plugin_Contninue to allow as is and >= Plugin_Handled to block
 */
forward Action:ZR_OnClientFreeze(clientattacker, &Float:duration);

/**
 * Called when a player has been freezed by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration
 * @noreturn
 */
forward ZR_OnClientFreezed(clientattackerFloat:duration);

/**
 * Called when a player is about to be ignited by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The ignite duration, set by reference 
 * @return        Plugin_Changed to apply new values, Plugin_Contninue to allow as is and >= Plugin_Handled to block
 */
forward Action:ZR_OnClientIgnite(clientattacker, &Float:duration);

/**
 * Called when a player has been ignited by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration
 * @noreturn
 */
forward ZR_OnClientIgnited(clientattackerFloat:duration); 
Zombie Riot plugin:
PHP Code:
/**
 * Called when a player is about to be freezed by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration, set by reference 
 * @return        Plugin_Changed to apply new values, Plugin_Contninue to allow as is and >= Plugin_Handled to block
 */
forward Action:ZRiot_OnClientFreeze(clientattacker, &Float:duration);

/**
 * Called when a player has been freezed by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration
 * @noreturn
 */
forward ZRiot_OnClientFreezed(clientattackerFloat:duration);

/**
 * Called when a player is about to be ignited by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The ignite duration, set by reference 
 * @return        Plugin_Changed to apply new values, Plugin_Contninue to allow as is and >= Plugin_Handled to block
 */
forward Action:ZRiot_OnClientIgnite(clientattacker, &Float:duration);

/**
 * Called when a player has been ignited by a grenade
 *
 * @param client     The victim index
 * @param attacker     The client index who threw the grenade
 * @param duration    The freeze duration
 * @noreturn
 */
forward ZRiot_OnClientIgnited(clientattackerFloat:duration); 
-----------------------------------------------------------------


Installation:
Download the archive from the attachments with the mod prefix you are intending to play and extract it to the addons/sourcemod folder
If you want to allow players to carry more grenades just add those cvars to your server.cfg and set their amount
  • ammo_hegrenade_max
  • ammo_flashbang_max
  • ammo_smokegrenade_max

Zombie:Reloaded:
  • Unrestrict smoke grenades and flashbangs which are resticted by default (do it here sourcemod/configs/zr/weapons.txt. Find "Flashbang" and "Smokegrenade" and set their "restrictdefault" to "no")
-----------------------------------------------------------------

Changelog:
Code:
v1.1
  • Script optimize
  • Fixed few mistakes
v1.2
  • Returned lost sound of freeze grenade
v1.3
  • Fixed mistake
v1.4
  • Changed all cvars' prefix to zr_
  • Fixed bug freezing through walls
v1.5
  • Fixed few mistakes
  • Fixed firing smokedetonate event twice
v1.6
  • Fixed bug, freezing player at any distance
v1.7
  • Some fix
v2.0
  • Recoded
  • Added forwards
  • Added two new cvars for napalm grenades
v2.0 (29.12.2011)
  • Fixed error logging happened when client is not in game
Attached Files
File Type: zip grenade_effects.zip (17.3 KB, 6016 views)
File Type: zip zr_grenade_effects.zip (17.1 KB, 7947 views)
File Type: zip zriot_grenade_effects.zip (17.1 KB, 2897 views)

Last edited by Despirator; 12-29-2011 at 01:57. Reason: Update
Despirator is offline
GoD-Tony
Veteran Member
Join Date: Jul 2005
Old 06-22-2011 , 06:30   Re: [ZR] Grenade Effects v1.4
Reply With Quote #2

The flashbang / flare effect is nice!

Errors:
Code:
L 06/20/2011 - 09:07:01: [SM] Native "IsPlayerAlive" reported: Client 2 is not in game
L 06/20/2011 - 09:07:01: [SM] Displaying call stack trace for plugin "zr_GrenadeEffects.smx":
L 06/20/2011 - 09:07:01: [SM]   [0]  Line 131, D:\Games\Servers\CSS-Test_Server\orangebox\cstrike\addons\sourcemod\scripting\zr_GrenadeEffects.sp::SmokeDetonate()
L 06/20/2011 - 09:07:02: [SM] Native "IsPlayerAlive" reported: Client 2 is not in game
L 06/20/2011 - 09:07:02: [SM] Displaying call stack trace for plugin "zr_GrenadeEffects.smx":
L 06/20/2011 - 09:07:02: [SM]   [0]  Line 131, D:\Games\Servers\CSS-Test_Server\orangebox\cstrike\addons\sourcemod\scripting\zr_GrenadeEffects.sp::SmokeDetonate()
GoD-Tony is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 06-22-2011 , 07:08   Re: [ZR] Grenade Effects v1.4
Reply With Quote #3

heh.. I noticed that. I just intended to upload the fixed version right now
Despirator is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 06-22-2011 , 07:17   Re: [ZR] Grenade Effects v1.5
Reply With Quote #4

Code:
L 06/22/2011 - 02:22:27: [SM] Native "GetEntPropEnt" reported: Property "m_hThrower" not found (entity 266/func_breakable)
L 06/22/2011 - 02:22:27: [SM] Displaying call stack trace for plugin "zr_GrenadeEffects.smx":
L 06/22/2011 - 02:22:27: [SM]   [0]  Line 221, D:\Games\Servers\CSS-Test_Server\orangebox\cstrike\addons\sourcemod\scripting\zr_GrenadeEffects.sp::SmokeCreateEvent()

I also noticed it doesn't seem to work 100%.. like it won't freeze someone standing on top of it or it'll freeze someone else accross the map. Might happen when multiple smoke grenades are live at once? Maybe fixing the errors will do the trick.

Nice plugin too!
__________________
Greyscale is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 06-22-2011 , 07:28   Re: [ZR] Grenade Effects v1.5
Reply With Quote #5

v1.6
Now everything is finally fixed

Last edited by Despirator; 06-22-2011 at 07:42.
Despirator is offline
godhex
New Member
Join Date: Jun 2011
Old 06-22-2011 , 10:55   Re: [ZR] Grenade Effects v1.6
Reply With Quote #6

i cant download the plugin.
godhex is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 06-22-2011 , 11:46   Re: [ZR] Grenade Effects v1.6
Reply With Quote #7

Quote:
Originally Posted by godhex View Post
i cant download the plugin.
don't link on "Get Plugin", because web compiler doesn't support 3rd party includes

Last edited by Despirator; 12-20-2011 at 09:25.
Despirator is offline
kaju666
Junior Member
Join Date: Feb 2010
Old 06-25-2011 , 10:30   Re: [ZR] Grenade Effects v1.6
Reply With Quote #8

this working with zombie riot?
kaju666 is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 06-26-2011 , 04:15   Re: [ZR] Grenade Effects v1.6
Reply With Quote #9

Quote:
Originally Posted by kaju666 View Post
this working with zombie riot?
no
Despirator is offline
murpher
Member
Join Date: Jul 2006
Location: California
Old 06-28-2011 , 20:22   Re: [ZR] Grenade Effects v1.6
Reply With Quote #10

I have to disable flash grenades on my server because with them on once thrown they lag everyone's FPS down to less than 60... even people with good computers get hit with the lag. It seemed to be more of a problem after the most recent update to the plugin, did you change anything that would cause this?
murpher 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 13:45.


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