AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S, ZRiot & ZReloaded] Grenade Effects v2.0 (https://forums.alliedmods.net/showthread.php?t=159579)

Despirator 06-19-2011 04:05

[CS:S, ZRiot & ZReloaded] Grenade Effects v2.0
 
3 Attachment(s)
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



GoD-Tony 06-22-2011 06:30

Re: [ZR] Grenade Effects v1.4
 
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()


Despirator 06-22-2011 07:08

Re: [ZR] Grenade Effects v1.4
 
heh.. I noticed that. I just intended to upload the fixed version right now

Greyscale 06-22-2011 07:17

Re: [ZR] Grenade Effects v1.5
 
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!

Despirator 06-22-2011 07:28

Re: [ZR] Grenade Effects v1.5
 
v1.6
Now everything is finally fixed

godhex 06-22-2011 10:55

Re: [ZR] Grenade Effects v1.6
 
i cant download the plugin.

Despirator 06-22-2011 11:46

Re: [ZR] Grenade Effects v1.6
 
Quote:

Originally Posted by godhex (Post 1493528)
i cant download the plugin.

don't link on "Get Plugin", because web compiler doesn't support 3rd party includes

kaju666 06-25-2011 10:30

Re: [ZR] Grenade Effects v1.6
 
this working with zombie riot?

Despirator 06-26-2011 04:15

Re: [ZR] Grenade Effects v1.6
 
Quote:

Originally Posted by kaju666 (Post 1496112)
this working with zombie riot?

no

murpher 06-28-2011 20:22

Re: [ZR] Grenade Effects v1.6
 
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?


All times are GMT -4. The time now is 06:00.

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