I know there is a gmcl_beep released already. I released mine because of requests. He has spent like a week to try to properly thread his, and this one is not only properly threaded, it has more features, and works on both the server and client by default.
This module exposes the motherboard bell or its software emulated counterpart to gmod:
Beep(frequency, duration) - Queues a beep at the specified frequency for the specified duration in milliseconds Beep(duration) - Queues a pause for the specified duration in milliseconds Beep.Beeping - Boolean, whether or not gmod is currently making the bell beep Beep.Queue - Number, The amount of currently queued beeps/pauses Beep.Frequency - Number, the frequency of the current beep, or 0 if it's not currently beeping Beep.Duration - Number, the duration (not the time left!) of the current beep, or 0 if it's not currently beeping
Calls to Beep return immediately. Beeps are beeped sequentially, so you can schedule as many beeps/pauses as you want, and the module will beep them in order.
Example: beep when mentioned in chat (clientside script)
hook.Add(“ChatText”, “beep_chathighlight”, function( index, nick, text, msgtype )
if text:lower():find(LocalPlayer():Nick():lower()) then
Plays a primitive tune whenever your name is mentioned in chat, case insensitive.
Download v1.0.4 (source included)
Extract the zip file to garrysmod/garrysmod/lua/includes/modules. You can delete gm_beep.cpp if you want to.