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 :
[CODE]hook.Add("ScalePlayerDamage","LowerCrowbarDmg",function(pl,hit,dmg)
if dmg:GetInflictor():GetClass() == "weapon_crowbar" then
dmg:ScaleDamage(0.3)
end
end)[/CODE]
But it seems "weapon_crowbar" isn't the right class.
Are you getting any sort of error? If so, post it.
[QUOTE=Moose2g;45223598]Are you getting any sort of error? If so, post it.[/QUOTE]
No error
Do this. Go to singleplayer, get out the crowbar, and run this:
[CODE]print( player.GetByID( 1 ):GetActiveWeapon( ) );[/CODE]
What does it give you for the crowbar?
Also, inside your hook, before you check for the inflictor add...
[CODE]print( dmg:GetInflictor( ):GetClass( ) );[/CODE]
weapon_ttt_improvised
He's not using ttt
[QUOTE=zerothefallen;45223989]weapon_ttt_improvised[/QUOTE]
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?
[QUOTE=SaintSin6;45224000]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?[/QUOTE]
Why though? This is possible through hooks.
Sorry, you need to Log In to post a reply to this thread.