Raised This Month: $ Target: $400
 0% 

blocking func_vehicle damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Speed!
BANNED
Join Date: Jan 2009
Old 02-17-2009 , 18:27   blocking func_vehicle damage
Reply With Quote #1

I searched, and found useless info. Wanna block every possible damage made by an func_vehicle
Speed! is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-17-2009 , 18:48   Re: blocking func_vehicle damage
Reply With Quote #2

Can you try that :

Code:
        #include <amxmodx>     #include <fakemeta>         new g_Fwd;         public plugin_precache ()     {         g_Fwd = register_forward ( FM_KeyValue, "Foward_KeyValue" );     }         public plugin_init ()     {         register_plugin ( "func_vehicle: no damage", "1.0.0", "Arkshine" );         unregister_forward ( g_Fwd, FM_KeyValue );     }         public Foward_KeyValue ( const EntId, const KvdId )     {         if ( pev_valid ( EntId ) )         {             new szKeyName[ 4 ], szKeyClassName[ 16 ];                 get_kvd( KvdId, KV_KeyName, szKeyName, charsmax( szKeyName ) );             get_kvd( KvdId, KV_ClassName, szKeyClassName, charsmax( szKeyClassName ) );                     if ( equal( szKeyClassName, "func_vehicle" ) && equal( szKeyName, "dmg" ) )             {                 set_kvd( 0, KV_KeyName   , szKeyName );                 set_kvd( 0, KV_Value     , "0" );                 set_kvd( 0, KV_fHandled  , 0 )                 dllfunc( DLLFunc_KeyValue, EntId, 0 );                                 return FMRES_SUPERCEDE;             }         }                 return FMRES_IGNORED;     }
Arkshine is offline
Speed!
BANNED
Join Date: Jan 2009
Old 02-17-2009 , 19:13   Re: blocking func_vehicle damage
Reply With Quote #3

will try tomorrow, its late here
thanks for help
Speed! is offline
grankee
Member
Join Date: Jun 2008
Old 02-18-2009 , 04:50   Re: blocking func_vehicle damage
Reply With Quote #4

try that
Attached Files
File Type: sma Get Plugin or Get Source (G_dmgvehicleblock.sma - 766 views - 496 Bytes)

Last edited by Exolent[jNr]; 02-19-2009 at 19:35. Reason: Don't upload .amxx files.
grankee is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-18-2009 , 05:10   Re: blocking func_vehicle damage
Reply With Quote #5

It's better to set 'one' time the keyvalue 'dmg' when the entity spawns so it will not do damage ; instead of using such forward which will be called very often...
Arkshine is offline
grankee
Member
Join Date: Jun 2008
Old 02-18-2009 , 20:20   Re: blocking func_vehicle damage
Reply With Quote #6

I know, but You said block damage, not block possibility take damage.
grankee is offline
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 17:08.


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