Gaming Help

Status
Not open for further replies.

thiefb0ss

Well-Known Member
OP
Member
Joined
Feb 26, 2012
Messages
158
Trophies
0
Location
Moscow
Website
thiefboss.blogspot.com
XP
29
Country
Serbia, Republic of
So I made a Garry's Mod addon, no new textures or anything, but I ran into one problem. I don't know how to install it. I know how to install mods, but I don't know how to set up the directory or where to put the mod. Can anyone who knows about GMOD modding help me?
Code:

if SERVER then

AddCSLuaFile

SWEP.Weight = 15

SWEP.AutoSwitchTo = true

SWEP.AutoSwitchFrom = true

elseif CLIENT then

SWEP.PrintName = "Sniper Rifle"

SWEP.Slot = 4

SWEP.SlotPos = 1

SWEP.DrawAmmo = false

SWEP.DrawCrosshair = true

language.Add("Undone_Thrown_SWEP_Entity","Undone Thrown SWEP Entity")
end

SWEP.Author = "Vendetta"
SWEP.Contact = "[email protected]"
SWEP.Purpose = "It's a Sniper Rifle"
SWEP.Instructions = "1. Equip 2. Click"

SWEP.Category = "Other"

SWEP.Spawnable = true
SWEP.AdminSpawnable = true

SWEP.ViewModel = "models/weapons/v_crossbow.mdl"
SWEP.WorldModel = "models/weapons/w_crossbow.mdl"

SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"

local ShootSound = Sound("Weapon_357.Spin")

function SWEP:Reload()
end

function SWEP.Think()
end

function SWEP:throw_attack (model_file)
local tr = self.Owner:GetEyeTrace()
self:EmitSound(ShootSound)
self.BaseClass.ShootEffects(self)
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:Spawn()
local phys = ent:GetPhysicsObject()
if(!phys && IsValid(phys)) then ent:Remove() return end
phys:ApplyForceCenter(slef.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
end

function SWEP:PrimaryAttack()
self:throw_attack("models/players/sniper.mdl")
end
function SWEP:SecondaryAttack()
self:throw_attack("models/players/sniper.mdl")
end
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    I'm at the grace gods of my insurance fucking me over
  • K3Nv2 @ K3Nv2:
    I was like is this the way out, oh probably there's a giant exit sign
  • BigOnYa @ BigOnYa:
    We all should have free health, dental, vision care, and make the college kids pay for the schooling, f that college forgiveness plan our govt doing now, its really not fair for all others in the past that had to pay for they're schooling anyways (like me, with 2 kids I paid to send to college in the past)
  • mthrnite @ mthrnite:
    whynotboth.jpg
    +2
  • BigOnYa @ BigOnYa:
    True, very true
  • Sicklyboy @ Sicklyboy:
    I think we should outlaw healthcare entirely because the fact that people can get healthcare today is unfair to those in the past that couldn't
    +2
  • BigOnYa @ BigOnYa:
    Lol
  • mthrnite tempBOT: @ mthrnite
    smacks Sicklyboy around a bit with a large leech
  • Sicklyboy @ Sicklyboy:
    Howdy @mthrnite , great to see you :D
  • mthrnite @ mthrnite:
    hola mi hermano
  • cearp @ cearp:
    @Sicklyboy - the comparison would be forgiving all medical debt, not making healthcare illegal!
  • cearp @ cearp:
    Although I still don't agree, medical debt is rarely a choice, whereas enrolling in university is certainly a choice
  • mthrnite @ mthrnite:
    we need more smart cats tho for reals
  • Sicklyboy @ Sicklyboy:
    College costs, college loans, book prices, the entire thing is predatory, oft touted as essential to a successful life for my generation and the ones since, and completely unaffordable without putting you through an insane financial hardship for literal decades in many situations.
  • Sicklyboy @ Sicklyboy:
    Many of the same issues can be seen for the insanely predatory healthcare and health insurance system in the US
  • mthrnite @ mthrnite:
    ^this
  • Sicklyboy @ Sicklyboy:
    It's important for society to be healthy and educated. If those things can't happen because all of the institutions that prop up those industries make it unattainable for all but a small portion of society, then your society is largely going to be disease ridden, dying, and uneducated in very short order.
  • K3Nv2 @ K3Nv2:
    Issue is it's too rich of a coperation already with bad sugar diets causing diabetes and killing teeth a new set of teeth around 90k
  • cearp @ cearp:
    I agree it's not easy for the average American, let alone the ones below that average. Free / cheaper healthcare is much more important I think than free university education.
    Of course like @mthrnite said, why not both. But I doubt both will get solved at once, and surely healthcare is top priority.
    +1
  • mthrnite @ mthrnite:
    they go hand in hand unless you want a plumber performing your triple bypass
  • K3Nv2 @ K3Nv2:
    Everyone should be Medicaid elegable for implants at the most
  • Sicklyboy @ Sicklyboy:
    If it's needed to keep you healthy it shouldn't cost you $90k. The fact that it does is an enormous problem
  • mthrnite @ mthrnite:
    but yeah, affordable is all i'm asking for
  • mthrnite @ mthrnite:
    i'd be happy with affordable dentures
  • K3Nv2 @ K3Nv2:
    With my old dentist he even encouraged switching insurance every quarter
    K3Nv2 @ K3Nv2: With my old dentist he even encouraged switching insurance every quarter