is there a way i can edit the scale player damage on dark rp 10x on headshots is a little ridiculous for the shitties gun in the game and i dont want a multiplier on the chest but everytime i put this in a lua file it never edits anything
if ( SERVER ) then
AddCSLuaFile("damage.lua")
function ScaleDamage( ply, hitgroup, dmginfo )
// More damage if we're shot in the head
if ( hitgroup == HITGROUP_HEAD ) then
dmginfo:ScaleDamage( 3.2 )
end
// Less damage if we're shot in the arms or legs
if ( hitgroup == HITGROUP_LEFTARM ||
hitgroup == HITGROUP_RIGHTARM ||
hitgroup == HITGROUP_LEFTLEG ||
hitgroup == HITGROUP_RIGHTLEG ||
hitgroup == HITGROUP_GEAR ) then
dmginfo:ScaleDamage( 0.25 )
end
end
hook.Add("ScalePlayerDamage","ScaleDamage",ScaleDamage)
where are you putting the file
hook.Add("ScalePlayerDamage","ScaleDamage",ScaleDa mage)
Has an error in it.
that is just a little error i had when putting it in thats the thing i do not know where to put this i put it in its own lua and it didnt work
can anyone help?
[QUOTE=dpoolas;21195406]can anyone help?[/QUOTE]
Okay, just to make it so I don't have to read over your posts 3 times each to understand them, please use proper grammar/punctuation. Now, seeing your posts, check for spelling mistakes and accidents in the code. Also, what folder are you putting it in.
the lua autorun folder is it possible that it just doesnt work with darkrp
lua/autorun?
Are you sure it belongs as a shared file?
no im not sure thats the thing i have no direction as to where this thing goes
I just need someone that has had a darkrp server to confirm that this is possible
Sorry, you need to Log In to post a reply to this thread.