How to reduce crowbar damage ?

Hello,
I have a darkrp server, for some reasons i decided to give some jobs the crowbar weapon but i notice that it deal big damage (-25 per hit) and i want to reduce it.

  • I searched on the gmod files but i can’t find it
  • I also Tried this :

hook.Add("ScalePlayerDamage","LowerCrowbarDmg",function(pl,hit,dmg)
   if dmg:GetInflictor():GetClass() == "weapon_crowbar" then 
          dmg:ScaleDamage(0.3) 
   end 
end)

But it seems “weapon_crowbar” isn’t the right class.

Are you getting any sort of error? If so, post it.

No error

Do this. Go to singleplayer, get out the crowbar, and run this:


print( player.GetByID( 1 ):GetActiveWeapon( ) );

What does it give you for the crowbar?

Also, inside your hook, before you check for the inflictor add…


print( dmg:GetInflictor( ):GetClass( ) );

weapon_ttt_improvised

He’s not using ttt

it is weapon_zm_improvised for ttt

Couldn’t you create an entity with the crowbar as a base and just change the primary dmg?

Why though? This is possible through hooks.