AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   knife dmg (https://forums.alliedmods.net/showthread.php?t=88857)

One 03-29-2009 18:13

knife dmg
 
How can i remove knife dmg? player can not be knifed. but other weapons can be damaged.

Dr.G 03-29-2009 18:20

Re: knife dmg
 
one ffs search just for once

Exolent[jNr] 03-29-2009 18:21

Re: knife dmg
 
Search for weapon damage plugin.

One 03-29-2009 18:27

Re: knife dmg
 
hah? if u mean i have to search:
1. i searched
2. forwhat shoul i search? i searched for knife & saw 2 sites but nothing :((

EDIT: ok, ill do it. maybe i can find there anything:D

EDIT 2 : http://forums.alliedmods.net/search....archid=3697568

omg.:cry:

Arkshine 03-29-2009 18:34

Re: knife dmg
 
Code:
    #include <amxmodx>     #include <fakemeta>     #include <hamsandwich>         new gMaxClients;         #define IsPlayer(%1)  ( 1 <= %1 <= gMaxClients )     #define HasKnife(%1)  ( IsPlayer( %1 ) && get_user_weapon( %1 ) == CSW_KNIFE )         #define DMG_KNIFE     ( DMG_NEVERGIB | DMG_BULLET )         public plugin_init()     {         register_plugin( "No Knife Damage", "1.0.0", "Arkshine" );                 RegisterHam( Ham_TakeDamage, "player", "Event_PlayerTakeDamage" );         gMaxClients = get_maxplayers();     }         public Event_PlayerTakeDamage ( Victim, Inflictor, Attacker, Float:Damage, Damagebits )     {         return HasKnife( Attacker ) && ( Damagebits & DMG_KNIFE ) ? HAM_SUPERCEDE : HAM_IGNORED;     }

Should work.

One 03-29-2009 18:36

Re: knife dmg
 
Quote:

Originally Posted by arkshine (Post 792732)
Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> new gMaxClients;
#define IsPlayer(%1) ( 1 <= %1 <= gMaxClients ) public plugin_init() { register_plugin( "No Knife Damage", "1.0.0", "Arkshine" );

RegisterHam( Ham_TakeDamage, "player", "Event_PlayerTakeDamage" );
gMaxClients = get_maxplayers();
} public Event_PlayerTakeDamage ( Victim, Inflictor, Attacker, Float:Damage, Damagebits ) { return IsPlayer( Attacker ) && get_user_weapon( Attacker ) == CSW_KNIFE
&& Damagebits & ( DMG_NEVERGIB | DMG_BULLET ) ) ? HAM_SUPERCEDE : HAM_IGNORED;
}



Should work.

Wow. this sounds to work. Ty, ill test this tomorrow . TYTY

Arkshine 03-29-2009 18:45

Re: knife dmg
 
It works, I just tested.

One 03-29-2009 18:49

Re: knife dmg
 
Quote:

Originally Posted by arkshine (Post 792743)
It works, I just tested.

Oh. Perfect. i´m with leptop online & not installed CS :( Ty agail. give +k tomorow :P gave 2day to much:mrgreen:

anakin_cstrike 03-30-2009 14:15

Re: knife dmg
 
Nice, nice ...very nice ark :D i was thinking of making something wich will use that =D

One 03-30-2009 14:24

Re: knife dmg
 
I never could write this. not in first 10000 years. TY again.


All times are GMT -4. The time now is 08:55.

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