Requirements:or
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(client, attacker, &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(client, attacker, Float: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(client, attacker, &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(client, attacker, Float: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(client, attacker, &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(client, attacker, Float: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(client, attacker, &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(client, attacker, Float: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(client, attacker, &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(client, attacker, Float: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(client, attacker, &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(client, attacker, Float: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
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
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