Buu's Swords 2.0

(29)
(68)
You can always read the reviews or discuss this product
Stable
1.1.9Fix

Hi everyone,


I was very recently made aware of an exploit regarding my addon "Buu's Swords". To explain it briefly, I did something very silly and I forgot to put a very important check for whether players own a shield clientsided (I already had serversided). This essentially allows people to keep dropping shields indefinitely, despite not owning them, eating up the number of entities on the server and causing a possible crash.


People utilizing these for Sandbox or Sandbox derived gamemodes (such as DarkRP) can go ahead and download the new version and all you really need to replace is lua/autorun/sword_shields.lua and lua/weapons/weapon_bs_tool.lua.


If you are utilizing the Nutscript or Clockwork version of this addon, I can understand sending me a message and having to wait for me to respond in order for you to receive a compatible version can be a pain. The fixed versions are already available, but if you wish to perform the patch yourself, all you need to do is open lua/autorun/sword_shields.lua and edit lines 238 all the way down to 266 to instead have the following block of code:


net.Receive( "ChangeShieldBuu", function( len, ply )
    local ShieldName = net.ReadString()
    if !ply:GetNWString("BuuSwords_Has_"..ShieldName) then return end
    ply:SetNWString("BuuSwords_CurrentShield", ShieldName)
end )

net.Receive( "ShieldMenuBuu", function( len, ply )
    ShowShieldHud()
end )

net.Receive( "RemoveShieldBuu", function( len, ply)
    local ShieldName = net.ReadString()
    if !ply:GetNWString("BuuSwords_Has_"..ShieldName) then return end
    local i = net.ReadInt(32)
    ply:SetNWString("BuuSwords_Has_"..ShieldName, false)
	if ply:IsValid() then
		if SERVER then
			local shield = ents.Create(Shields[i][9])
			local pos = ply:GetShootPos()
				pos = pos + ply:GetForward() * 50
				pos = pos + ply:GetUp() * -20
			shield:SetPos(pos)
			shield:SetAngles(ply:GetAngles())
			shield:Spawn()
			local phys = shield:GetPhysicsObject()
			phys:SetVelocity(ply:GetAimVector() * 100)
			shield.HP = ply:GetNWInt("BuuSwords_"..Shields[i][1].."_HP")
		end
	end
end)


To apply the other patch, just simply replace the file in lua/weapons/weapon_bs_tool.lua with the most recent one. There are no differences between the Sandbox and Nutscript/CW versions that you should worry about.


Thank you, and I apologize for having this exploit here to begin with! I will be keeping a closer eye on this stuff in the future.


Also I have not forgotten this addon (or Garry's Mod development in general). I still have quite a lot planned for this addon, I just haven't had the time to do so with my University work, exams, and a few other personal projects as well. For those curious, these are the features that have been requested and I plan on implementing in the future (though probably not everything in one update):


**Improve comments/documentation
**Network Shield speed properly
**Stamina (make compatible with DarkRP)
**Find way to install animations api easier
**Sword Blocking with high low system
**Rewrite base code so that the Shields table is only looped when shield changed.
**Look for other potential optimizations (especially on bone manipulations)
**Sword durability
**Anvil+hammer to repair sword/shield
**Shield Only Combat
**Sword Two handing
**Spears
**Warhammers


- Buu342

Search products...