Workshop and Server (Client-side Issues)

Am Am Developing a Custom Weapons Pack, But when i attempt to Add it to the server (and Force Download the content (lua, Mat, Mdl, sounds) Via Workshop) Some Things Don’t Work ’

The Sound Dosent Work
And A Lua Effect Dosent want To work.

But In Single Player, They Both Work
Is There Any Thing Im Doing Wrong? I used the Current Updater From Garry and It well, is Slightly annoying

Any Help Will Be Appreciated

Does it work in singleplayer?

In fastdl do don’t put the lua in as faster only sounds, models an materials

Yes

He’s talking about workshop

[editline]2nd December 2013[/editline]

How are you adding it to the server?

Is the effect AddCSLuaFile’d?

[editline]3rd December 2013[/editline]

And show us your sound play functions.

The SWEP shared


-- Variables that are used on both client and server
SWEP.Gun = ("m9k_RPKAIM") -- must be the name of your swep but NO CAPITALS!
SWEP.Category				= "SSWEPS RPK"
SWEP.Author				= ""
SWEP.Contact				= ""
SWEP.Purpose				= ""
SWEP.Instructions				= ""
SWEP.MuzzleAttachment			= "1" 	-- Should be "1" for CSS models or "muzzle" for hl2 models
SWEP.ShellEjectAttachment			= "2" 	-- Should be "2" for CSS models or "1" for hl2 models
SWEP.PrintName				= "RPK  Holographic Triangle"		-- Weapon name (Shown on HUD)	
SWEP.Slot				= 2				-- Slot in the weapon selection menu
SWEP.SlotPos				= 3			-- Position in the slot
SWEP.DrawAmmo				= true		-- Should draw the default HL2 ammo counter
SWEP.DrawWeaponInfoBox		= false		-- Should draw the weapon info box
SWEP.BounceWeaponIcon   	= false	-- Should the weapon icon bounce?
SWEP.DrawCrosshair			= false		-- Set false if you want no crosshair from hip
SWEP.XHair					= false		-- Used for returning crosshair after scope. Must be the same as DrawCrosshair
SWEP.Weight				= 50			-- Rank relative ot other weapons. bigger is better
SWEP.AutoSwitchTo			= true		-- Auto switch to if we pick it up
SWEP.AutoSwitchFrom			= true		-- Auto switch from if you pick up a better weapon
SWEP.HoldType 				= "rpg"		-- how others view you carrying the weapon
-- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive 
-- you're mostly going to use ar2, smg, shotgun or pistol. rpg and crossbow make for good sniper rifles

SWEP.ViewModelFOV			= 70
SWEP.ViewModelFlip			= false
SWEP.ViewModel				= "models/weapons/RPK/v_rpk.mdl"	-- Weapon view model
SWEP.WorldModel				= "models/weapons/w_rif_ak47.mdl"	-- Weapon world model
SWEP.Base 				= "bobs_gun_base"
SWEP.Spawnable				= true
SWEP.AdminSpawnable			= true

SWEP.Primary.Sound			= Sound("RPK74")		-- script that calls the primary fire sound
SWEP.Primary.RPM				= 470		-- This is in Rounds Per Minute
SWEP.Primary.ClipSize			= 45		-- Size of a clip
SWEP.Primary.DefaultClip			= 60	-- Bullets you start with
SWEP.Primary.KickUp				= 0				-- Maximum up recoil (rise)
SWEP.Primary.KickDown			= 1			-- Maximum down recoil (skeet)
SWEP.Primary.KickHorizontal		= 0		-- Maximum up recoil (stock)
SWEP.Primary.Automatic			= true		-- Automatic/Semi Auto
SWEP.Primary.Ammo			= "ar2"	-- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
-- Pistol, buckshot, and slam always ricochet. Use AirboatGun for a light metal peircing shotgun pellets

SWEP.data 				= {}
SWEP.data.ironsights		= 1
SWEP.ScopeScale 			= 0.7
SWEP.ReticleScale 			= 0.6

SWEP.Primary.NumShots	= 1		--how many bullets to shoot per trigger pull
SWEP.Primary.Damage		= 27	--base damage per bullet
SWEP.Primary.Spread		= .0001	--define from-the-hip accuracy 1 is terrible, .0001 is exact)
SWEP.Primary.IronAccuracy = .00001 -- ironsight accuracy, should be the same for shotguns

-- enter iron sight info and bone mod info below

SWEP.VElements = {
	["Sight"] = { type = "Model", model = "models/wystan/attachments/2otech557sight.mdl", bone = "rpk", rel = "", pos = Vector(0.6, -8.636, -8.5), angle = Angle(4, -90, 0), size = Vector(0.899, 0.899, 0.899), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
	["Rail"] = { type = "Model", model = "models/wystan/attachments/akrailmount.mdl", bone = "rpk", rel = "", pos = Vector(0.202, 1.442, 2.134), angle = Angle(0, 0, 0), size = Vector(0.8, 0.699, 0.699), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
	["Dot"] = { type = "Sprite", sprite = "sprites/player_red_dead_offscreen", bone = "rpk", rel = "", pos = Vector(0.4, 1, 2.9), size = { x = 0.265, y = 0.265 }, color = Color(255, 255, 255, 255), nocull = true, additive = true, vertexalpha = true, vertexcolor = true, ignorez = false}
}

SWEP.IronSightsPos = Vector(-1.65, -1.5, -0.08)
SWEP.IronSightsAng = Vector(0, 0, 0)
SWEP.SightsPos = Vector (-1.65, -1.5, -0.08)
SWEP.SightsAng = Vector (0, 0, 0)
SWEP.RunSightsPos = Vector (2.3095, 3.0514, -2.3965)
SWEP.RunSightsAng = Vector (-1.8471, 33.9181, 1)

I put the Original Addon in the addons folder and Have Clients Download The Workshop version
(they are Identical)

You can’t just add the workshop version; you have to send the shared.lua to the client with addcslua.

How Would I do That? Im New To Workshop and I am use to Legacy ways of doing things

http://wiki.garrysmod.com/page/Global/AddCSLuaFile It’s not workshop, but basic lua :v:

Also, shouldn’t you follow instructions?


SWEP.Gun = ("m9k_RPKAIM") -- must be the name of your swep but NO CAPITALS!

Oh so that’s what that line was for
I guess Bob has an autorun somewhere that puts all M9K weapons in a for loop to be automatically AddCSLua’d (If I interpret correctly) and the script was unable to do it for yours because you put caps in your classname, which will fuck up linux dedi’s.

See, all you had to do was just read his guide.

And I add This To This, to the same addworkshop Doc?

No… Just listen to the guy who posted above you.