Raised This Month: $ Target: $400
 0% 

Changing weapon damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jellric
Member
Join Date: Dec 2007
Old 04-21-2009 , 15:26   Changing weapon damage
Reply With Quote #1

I would like to change the damage done by crossbows on my HLDM server.

Do I need a special plugin to accomplish this or else how can it be done?
Jellric is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-21-2009 , 16:02   Re: Changing weapon damage
Reply With Quote #2

See skill.cfg in valve/
Arkshine is offline
Mazurrio
BANNED
Join Date: Apr 2009
Old 04-21-2009 , 21:15   Re: Changing weapon damage
Reply With Quote #3

isn't it in /hl directory?
or I'm just gay?
Mazurrio is offline
Jellric
Member
Join Date: Dec 2007
Old 04-21-2009 , 22:35   Re: Changing weapon damage
Reply With Quote #4

I see the skill.cfg but don't know how to modify it. I was expecting a straight up damage number beside each weapon, instead I see:

sk_plr_xbow_bolt_client1 "10"
sk_plr_xbow_bolt_client2 "10"
sk_plr_xbow_bolt_client3 "10"

I am not sure what these values mean but I know that a crossbow is supposed to do 100 damage. I think these values may be for the explosive bolt when fired without zooming.
Jellric is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-22-2009 , 03:17   Re: Changing weapon damage
Reply With Quote #5

Actually I'm not sure. :p You have 3 lines because in single player you have 3 levels of difficulties. It's most likely this file is used only for SP.

If you look into the HLSDK, you get :

- Explosive bolt : 10 dmg when the bolt touches you + 40 dmg ( radiusdamage )
- Snipe : 120 dmg.

You want to change what damage ?
Arkshine is offline
Jellric
Member
Join Date: Dec 2007
Old 04-22-2009 , 15:52   Re: Changing weapon damage
Reply With Quote #6

Quote:
You want to change what damage ?
I want to change the damage for the snipe on crossbow.

I think you are right about skill.cfg being for SP because I noticed it also has values for monster attacks in there and MP doesn't usually have monsters.

Last edited by Jellric; 04-22-2009 at 15:53. Reason: why do i need reason to edit my own post?
Jellric is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-22-2009 , 18:14   Re: Changing weapon damage
Reply With Quote #7

Try this plugin, it should work :

Code:
    #include <amxmodx>     #include <fakemeta>     #include <hamsandwich>         const DMG_CROSSBOW  = ( DMG_BULLET | DMG_NEVERGIB );     const m_iFOV = 298;         new pCvarCrossbowDamage;     new gMaxClients;         #define IsPlayer(%1)  ( 1 <= %1 <= gMaxClients )     #define InZoom(%1)    ( get_pdata_int( %1, m_iFOV ) != 0 )         public plugin_init()     {         register_plugin( "Crossbow: Custom Snipe Damage", "1.0.0", "Arkshine" );                 pCvarCrossbowDamage = register_cvar( "crossbow_snipedmg", "60" );         RegisterHam( Ham_TraceAttack, "player", "Forward_TraceAttack" );                 gMaxClients = get_maxplayers();     }         public Forward_TraceAttack ( const Victim, const Attacker, Float:Damage, const Float:Direction[3], const TraceResult, const Damagebits )     {         if ( IsPlayer ( Attacker ) && ( Damagebits & DMG_CROSSBOW ) && get_user_weapon( Attacker ) == HLW_CROSSBOW )         {             if ( InZoom(  Attacker ) )             {                 SetHamParamFloat( 3, get_pcvar_float( pCvarCrossbowDamage ) );                 return HAM_HANDLED;             }         }                 return HAM_IGNORED;     }
Arkshine is offline
Jellric
Member
Join Date: Dec 2007
Old 04-23-2009 , 02:23   Re: Changing weapon damage
Reply With Quote #8

Works beautifully. Thanks, arkshine!
Jellric 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 09:25.


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