Discord
Steam
/
Garry's Mod
/
Developers
/
Only half the ..
Login/Join
Event Log
Only half the noices playing
2 replies, posted
Search
In This Thread
Hey i am coding sweps for my gamemode. Atm not all the bullets play. It happens when you run. Just wondering what the problem is. Here is the code for my swep. [code] if ( SERVER ) then AddCSLuaFile( "shared.lua" ) SWEP.HoldType = "pistol" end if ( CLIENT ) then SWEP.PrintName = "Glock" SWEP.Author = "Bithmar" SWEP.Slot = 1 SWEP.SlotPos = 5 SWEP.IconLetter = "c" SWEP.ViewModelFOV = 64 SWEP.ViewModelFlip = true util end SWEP.Base = "weapon_cs_base" SWEP.Spawnable = false SWEP.AdminSpawnable = true SWEP.ViewModel = "models/weapons/v_pist_glock18.mdl" SWEP.WorldModel = "models/weapons/w_pist_glock18.mdl" SWEP.Weight = 0.5 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false SWEP.Primary.Sound = Sound("weapons/glock/glock18-1.wav") SWEP.Primary.Recoil = .25 SWEP.Primary.Damage = 10 SWEP.Primary.NumShots = 1 SWEP.Primary.Cone = 0.1 SWEP.Primary.ClipSize = 13 SWEP.Primary.Delay = 0.025 SWEP.Primary.DefaultClip = 13 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "Pistol" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.IronSightsPos = Vector( 4.4, 5, 3 ) [/code]
What do you mean not all the bullets play? Are you getting error messages, or is it working weird?
you need to use the script names, not the filepath. IE. [lua]Sound("Weapon_USP.Single")[/lua] use "playgamesound" in console to find weapon sounds.
Sorry, you need to
Log In
to post a reply to this thread.