Any reason why fists dont respond to ScalePlayerDamage?
9 replies, posted
Like the title says, it seems like the fists that come with gmod arent affected by GM:ScalePlayerDamage and hitgroups arent taken into effect either. Is there a reason for this or am I missing something?
Maybe that's because I didn't use bullets for them, but a trace attack?
So no way around that?
[QUOTE=Robotboy655;41423147]Maybe that's because I didn't use bullets for them, but a trace attack?[/QUOTE]
ScalePlayerDamage is called [b]when a player takes damage[/b]
it doesn't matter whether it uses bullets or not
lol
[QUOTE=tyguyer;41428068]ScalePlayerDamage is called [b]when a player takes damage[/b]
it doesn't matter whether it uses bullets or not
lol[/QUOTE]
Thats what i thought which i was i was confused when nothing happened :v:
[code]
hook.Add("ScalePlayerDamage", "porn", function(ply,hit,dmg)
local attacker = dmg:GetAttacker()
if attacker:GetActiveWeapon():GetClass() == "fists" then --Might have to edit this, I have no clue how to check for weapons
dmg:ScaleDamage(5000000000000000000000)
end
end )
[/code]
[QUOTE=tyguyer;41428068]ScalePlayerDamage is called [b]when a player takes damage[/b]
it doesn't matter whether it uses bullets or not
lol[/QUOTE]
Apparently it doesn't.
is there anything to do so it does...
[QUOTE=Robotboy655;41428294]Apparently it doesn't.[/QUOTE]
according to this [url]http://wiki.garrysmod.com/page/GM/ScalePlayerDamage[/url] - it does.
As a last resort, you could always recreate a copy of the fists weapon in your gamemode/addon
Just copy [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/weapons/weapon_fists.lua[/url]
Sorry, you need to Log In to post a reply to this thread.