Broken Bone Mod

Can someone make a scripts that when you get shot in the leg, your leg is broken the same thing with the arm and if you bleed too much you fall on the floor in first person mode?

It’s for a RP server but if you know the original files can you give me a link?

Ha you mean if you break your leg you fall over and have to crawl.

Like you run away from the cops and you get shot in the leg, you slow down and if you get shot in the arm, you can’t hold weapon.

That seems perfectly possible, like if you are shot in the leg your walk/sprint speed is cut into a third and if you’re shot in the arm you drop your weapon.

I like the sound of this. And it is possable I think. Well people have made things at 15 health all goes weird and you walk slow.

And if you add something like in Ragmorph ( ragdoll leg) It would be perfect

ha nice one.

Cool idea :V

OP or mine ? :slight_smile:

Anyone willing to make it?


(User was banned for this post ("Bumpity bump" - mahalis))

Shoot in face = Instant kill/blurred sight
Shoot in (1) leg = Ragdoll’d leg + slow walking
Shoot both legs = Ragdoll’d legs (crawling) + no walking/REALLY SLOW
Shoot in arm/hand = Ragdoll’d arm + Dropped weapon
Shoot in stomach = Pain sound + randomly loss of health

this is a cool idea that actually sounds possible better get the devs we got a cool addon!

Better call Sakarias. :buddy:

Lord of gmod.org please make a little mod which is requested here (link)
Something like that

I would make it if I had the time to. Oh well. It’s possible though, at the very least.

How much time is worth to make the broken bone mod?

Well, I gave it a try, but since I’m not the best Lua coder it might not be the best.



//Request from http://www.facepunch.com/showthread.php?p=20534493

function BoneBreake( ply, hitgroup, dmginfo )
	
	// More damage if we're shot in the head and blur
	 if ( hitgroup == HITGROUP_HEAD ) then
		dmginfo:ScaleDamage( 2 )
	 end
 
	// Less damage if we're shot in the arms and drop weapon
	if ( hitgroup == HITGROUP_LEFTARM || hitgroup == HITGROUP_RIGHTARM ) then
		
		OldWeapons = {}  
		dmginfo:ScaleDamage( 0.25 )
		
			for k, v in pairs(ply:GetWeapons()) do
				table.insert(OldWeapons, v:GetClass())
			end
			
		ply:StripWeapons()
		hook.Add("PlayerCanPickupWeapon", "CantPickUpWeapons", CantPickUpWeapons)
		
		timer.Create( "WeaponsBack", 30, 0, function()
			for k, v in pairs(OldWeapons) do
				ply:Give(v)
			end
			hook.Remove( "PlayerCanPickupWeapon", "CantPickUpWeapons" )
		end)
	end
 
	// Less damage if we're shot in the legs and slow speed
	if ( hitgroup == HITGROUP_LEFTLEG || hitgroup == HITGROUP_RIGHTLEG ) then
		dmginfo:ScaleDamage( 0.25 )
		SetSpeed(ply, 100 )
	end
	
end
hook.Add("ScalePlayerDamage","BoneBreake",BoneBreake)

//Dont pick up any weapons
function CantPickUpWeapons(ply, wep)
	
	for k, v in pairs(OldWeapons) do
		if wep:GetClass() == v then return false end
		return true
	end

end

function SetSpeed(ply ,speed )

	GAMEMODE:SetPlayerSpeed( ply, speed, speed )
	
end


Right now its very simple, it makes you slow speed if you get hit in the leg, and make you lose all you’re weapons for 30 sec if you get show in the arms, and head shot is 2 times more damage. You’re welcome to request more features and come with feedback. BTW: I only tested this with bots, but it seemed to work! :slight_smile:

Where do I put the code and what’s the file name?
BTW, I love it I’m going to try it soon.

lua/autorun/server/Bonebreake.lua
If the files is not there create them :slight_smile:

Is it possible to add a fonction in the console to disable it?
Can you change the value of an headshot to instant death?