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

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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:
31 
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, 7954 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
 


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 04:28.


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