SWEP.Author = ElecroSWEP.Contact = "N/A"SWEP.Purpose = "Throw chairs at people lol"SWEP.Instructions = "Press the left mouse button and fire!!!"SWEP.Category = "Chair Throwing Devices"SWEP.Spawnable = falseSWEP.AdminSpawnable = trueSWEP.ViewModel = "models/weapons/v_RPG.mdl"SWEP.WorldModel = "models/weapons/w_rocket_launcher.mdl"SWEP.Primary.ClipSize = -1SWEP.Primary.DefaultClip = -1SWEP.Primary.Automatic = trueSWE.Primary.Ammo = "none"SWEP.Secondary.ClipSize = -1SWEP.Secondary.DefaultClip = -1SWEP.Secondary.Automatic = trueSWEP.Secondary.Ammo = "none"local ShootSound = Sound(Metal.SawbladeStick)function SWEP:Reload()end function SWEP:Think()endfunction SWEP:throw_attack (model_file) local tr = self.Owner:GetEyeTrack() self:EmitSound(ShootSound) self.BaseClass.ShootEffects(self) //We now exit if this function is not running serverside if (!SERVER) then return end local ent = ents.Create("prop_physics") ent:SetModel(model_file) ent:SetPos(self.Owner:EyePos() + (self.Owner:GetAimVector() * 16)) ent:SetAngles(self.Owner:EyeAngles()) ent:Spawn() local phys = ent:GetPhysicsObject() if !(phys && IsValid(phys)) then ent:Remove() return end phys:ApplyForceCenter)self.Owner:GetAimVector():GetNormalized() * math.pow(tr.HitPos:Length(), 3)) cleanup.Add(self.Owner, "props", ent) undo.Create ("Thrown_SWEP_Entity") undo.AddEntity (ent) undo.SetPlayer (self.Owner) undo.Finish()endfunction SWEP:PrimaryAttack() self:throw_attack("models/props/cs_office/Chair_office.mdl")endfunction SWEP:SecondaryAttack() self:throw_attack("models/props_c17/FurnitureChair001a.mdl")end //Here we begin with the server and client shiif SERVER then //Where the init.lua stuff goes.//Makes sure clientss download the fileAddCSLuaFile("shared.lua")//How heavy the weapon isSWEP.Weight = 5//Allow switching to/from when weapons are picked upSWEP.AutoSwitchTo = falseSWEP.AutoSwitchFrom = falseelseif CLIENT then //Where cl_init.lua stuff goes//Name of SWEP, as appearing in the weapon tab in the spawn menuSWEP.PrintName = "Mr. Chair Thrower"//Sets where the weapon is found in the switching menuSWEP.Slot = 3SWEP.SlotPos = 2//Drawing ammunition for the weaponSWEP.DrawAmmo = false//Sets the crosshair when weapon is deployedSWEP.DrawCrosshair = false//Ensures a clean looking notification when a chair is undone, how it works://When you create an undo, you specify the ID:// undo.Create("Some_Indentity)//By creating an associated language, we can make the undo notification look better:// language.Add("Undone_Some_Identity", "Message") language.Add("Undone_Thrown_SWEP_Entity, "Undone Thrown SWEP Entity")end
that looks like a mess of a script
Do you mean that its not organized or badly done?
idk, it just looks like a mess cuz i dont understand it
If you have a Facepunch account, you can ask there, you're more guaranteed to get rated dumb a bunch of times more help than here
those guys are legit jackasses.
In my 3 years of being on Facepunch, i haven't actually seen as much mean people as i've heard, i guess it's just a matter of who you getThe post ratings don't matter unless you're actually asking for criticism