I'm trying to get sounds to play when specific chat is used. So if a player says a specific word it will play a assigned sound when that word is said in chat. I know to use something like [code]if ( text == "hello" ) then[/code] to check for the text, but what would I use to play the sound file in a small area around that player? Entity.EmitSound? What would be the best way of going about this? Thanks.
Well, there are few ways to do such a thing.
One of them is Entity:EmitSound(), the other one is to send a net msg and play it via surface.PlaySound or sound.Play().
So pick your favourite.
Sorry, you need to Log In to post a reply to this thread.