I've searched through all of the scripts (I think) in the garrysmod_dir.vpk and in the base folder and i can not find anything that references the sounds the physgun draws from when you do things such as freezing/unfreezing.
I know rmine_chirp_answer1 or whatever is the sound file that it uses, but I am specifically trying to find the LUA for the physgun.
Does such a thing exist? or is this hardcoded?
You won't be able to find the Lua file for the physgun because it's not a normal SWEP. It's built with the game just like the other HL2 weapons.
Do you mean edit the sound when you double tap reload?
No, just the sound when you unfreeze a single object.
The sound for unfreezing is defined here garrysmod/cl_init.lua at 784cd57576d85712fa13a7cea3a9523b4df966b..
! thank you so much =)
Yeah you can edit it to do anything
Sorry to bump this again, but through looking I was able to find this for SWEPs -
SWEP.Sounds = {
Sound("funniez/catbomb.mp3" ),
Sound("funniez/ravebreak.mp3" ),
Sound("funniez/speach/obeyyourthirst2.wav" ),
Sound("funniez/speach/obeyyourthirstsync.wav" ),
Sound("funniez/cant.wav" ),
Sound("funniez/orly.mp3" ),
Sound("funniez/yarly.mp3" ),,
}
function SWEP:SecondaryAttack()
self.Owner:EmitSound(table.Random(self.Sounds))
end
Is there a place I can find that explains how to do that with the surface.PlaySound? Or is it the same concept?
if you have it use surface.PlaySound every client on the server would hear it, but if that's what you want for whatever reason just change it to
function SWEP:SecondaryAttack()
if CLIENT then
surface.PlaySound(table.Random(self.Sounds))
end
end
so for
function GM:UnfrozeObjects( num )
self:AddNotify( "Unfroze "..num.." Objects", NOTIFY_GENERIC, 3 )
-- Find a better sound :X
surface.PlaySound( "npc/roller/mine/rmine_chirp_answer1.wav" )
end
I need to insert
function SWEP:SecondaryAttack()if CLIENT then
surface.PlaySound(table.Random(self.Sounds))
endend
into it? or before?
Sorry, I'm new to this.
Sorry, you need to Log In to post a reply to this thread.