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.
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Skelletonike @ Skelletonike:
    I'll need to check
  • K3N1 @ K3N1:
    Seriously look into Argentina codes and just use a VPN for games
  • Skelletonike @ Skelletonike:
    I'll have a look, my series x is ready to pick up so I'll grab it after work
  • K3N1 @ K3N1:
    What's the order number I'll call and have them switch it to delivery
  • Skelletonike @ Skelletonike:
    doesn't work like that over here
  • Skelletonike @ Skelletonike:
    orders are connected to client's phone number plus tax number
  • Skelletonike @ Skelletonike:
    which needs to be shown (unless they already know you)
  • K3N1 @ K3N1:
    What's your phone and tax number
  • SylverReZ @ SylverReZ:
    K3N1 will send you free pizzas if you do.
  • Skelletonike @ Skelletonike:
    and you need to show the message plus pin code you get
  • K3N1 @ K3N1:
    Yes yes just send me all the details
  • Skelletonike @ Skelletonike:
    btw, feel free to add me on xbox if you want, same name as here.
  • Skelletonike @ Skelletonike:
    and nope, you can have chuck testa
  • SylverReZ @ SylverReZ:
    Its been a while since I've used an Xbox One.
  • K3N1 @ K3N1:
    What would we play besides porn games?
  • SylverReZ @ SylverReZ:
    Ahem... the usual.
  • Skelletonike @ Skelletonike:
    damn, haven't used gamepass since july
  • Skelletonike @ Skelletonike:
    been a while >.>"
  • Skelletonike @ Skelletonike:
    can trials of 60 days be used by people that already subbed?
  • K3N1 @ K3N1:
    New accounts only
  • Skelletonike @ Skelletonike:
    Console picked up welp
  • Skelletonike @ Skelletonike:
    I have 4 games installed and poof went 500gb. Each game is 100 or more damn.
    Skelletonike @ Skelletonike: I have 4 games installed and poof went 500gb. Each game is 100 or more damn.