Raised This Month: $51 Target: $400
 12% 

How I can block grenade explode, and when you hit take health?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-22-2010 , 14:57   How I can block grenade explode, and when you hit take health?
Reply With Quote #1

Hello guys! I need help... I don't know how block grenade explode like in Snowballwar mod and when you hit taka X health. Thanks!
dark_style is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 03-22-2010 , 15:04   Re: How I can block grenade explode, and when you hit take health?
Reply With Quote #2

You can easly find how to block grenade explode if you just search :s
__________________
I am out of order!
grimvh2 is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-22-2010 , 15:24   Re: How I can block grenade explode, and when you hit take health?
Reply With Quote #3

I need plugin for block the grenade explode. And when grenade hit opponent take X damage (change of cvar).
dark_style is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-23-2010 , 00:09   Re: How I can block grenade explode, and when you hit take health?
Reply With Quote #4

Code:
#include < amxmodx > #include < engine > #include < hamsandwich > const DMG_GRENADE = ( 1 << 24 ); new pCvar_MinSpeed; new pCvar_DamageRatio; public plugin_init( ) {     new const grenade[ ] = "grenade";     register_think( grenade, "FwdGrenadeThink" );     register_touch( grenade, "player", "FwdTouchGrenade" );         pCvar_MinSpeed = register_cvar( "grenadehit_minspeed", "50.0" );     pCvar_DamageRatio = register_cvar( "grenadehit_damageratio", "0.1" ); } public FwdGrenadeThink( iEntity ) {     entity_set_float( iEntity, EV_FL_nextthink, 9999.0 ); } public FwdTouchGrenade( iEntity, iPlayer ) {     if( is_user_alive( iPlayer )     &&  is_valid_ent( iEntity ) )     {         new iOwner = entity_get_edict( iEntity, EV_ENT_owner );         if( iPlayer != iOwner         &&  is_user_connected( iOwner )         &&  cs_get_user_team( iPlayer ) != cs_get_user_team( iOwner ) )         {             new Float:vVelocity[ 3 ];             entity_get_vector( iEntity, EV_VEC_velocity, vVelocity );                         new Float:fSpeed = vector_length( vVelocity );             if( fSpeed >= get_pcvar_float( pCvar_MinSpeed ) )             {                 new Float:fDamage = float( floatround( fSpeed * get_pcvar_float( pCvar_DamageRatio ), floatround_ceil ) );                 if( fDamage > 0.0 )                 {                     ExecuteHamB( Ham_TakeDamage, iPlayer, iEntity, iOwner, fDamage, DMG_GRENADE );                 }             }         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-24-2010 , 12:54   Re: How I can block grenade explode, and when you hit take health?
Reply With Quote #5

Sorry, but this plugin don't work.
dark_style is offline
Old 03-25-2010, 12:37
dark_style
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Old 04-02-2010, 01:15
dark_style
This message has been deleted by YamiKaitou. Reason: bump
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 06:51.


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