[lua]
hook.Add("PlayerInitialSpawn", "playerInitialSpawn", function(ply)
util.PrecacheSound("buttons/blip1.wav")
end)
hook.Add("PlayerSpawn", "playerSpawn", function(ply)
EmitSound("buttons/blip1.wav", ply:GetPos(), ply:EntIndex(), 1, 1, 128, 0, 100)
end)
-- console:
SV_StartSound: buttons/blip1.wav not precached (0)
[/lua]
i making new projectiles metatable but Global EmitSound does not working.
any ideas?
Can you try precaching the sound right before you emit it?
Read this:
[url]http://wiki.garrysmod.com/page/Global/EmitSound[/url]
Just use this instead:
[url]http://wiki.garrysmod.com/page/Entity/EmitSound[/url]
[QUOTE=Robotboy655;48295989]Read this:
[url]http://wiki.garrysmod.com/page/Global/EmitSound[/url]
Just use this instead:
[url]http://wiki.garrysmod.com/page/Entity/EmitSound[/url][/QUOTE]
Thanks but sorry... this thread not solved.
"Entity:EmitSound" is only using entity's.
"i made new projectile metatables(this is not entity)". so i need (Updating pos) to sound play
sound.Play method: is static play sound(not dynamic)
Entity:EmitSound method: is dynamic sound(but only using entity!)
EmitSound method: is dynamic(but this broken)
what should i do now...
[editline]26th July 2015[/editline]
[QUOTE=kjh0105;48296216]Thanks but sorry... this thread not solved.
"Entity:EmitSound" is only using entity's.
"i made new projectile metatables(this is not entity)". so i need (Updating pos) to sound play
sound.Play method: is static play sound(not dynamic)
Entity:EmitSound method: is dynamic sound(but only using entity!)
EmitSound method: is dynamic(but this broken)
what should i do now...[/QUOTE]
Oh sorry EmitSound is only clientside...
Thanks!
Sorry, you need to Log In to post a reply to this thread.