# Playing a sound via configstrings

**URL:** <https://discourse.ioquake.org/t/playing-a-sound-via-configstrings/281>\
**Category:** dev\
**Created:** [June 8, 2014, 3:11am UTC](https://discourse.ioquake.org/t/playing-a-sound-via-configstrings/281 "2014-06-08T03:11:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sentry](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sentry](https://discourse.ioquake.org/u/sentry)\
**Post date:** [June 8, 2014, 3:11am UTC](https://discourse.ioquake.org/t/playing-a-sound-via-configstrings/281/1 "2014-06-08T03:11:56Z")

</div>

Is it possible to play a sound via setting a configstring? Eg:

> SV\_SetConfigstring( CS\_SOUNDS, “sound/world/klaxon1.wav” );

The above code returns the following error in console:

Unknown extension for sound/world/klaxon1.wav  
WARNING: could not find sound/world/klaxon1.wav - using default

---

<div class="post-metadata">

**Author:** ![zturtleman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/zturtleman/32/718_2.png) [@zturtleman](https://discourse.ioquake.org/u/zturtleman)\
**Post date:** [June 8, 2014, 10:14pm UTC](https://discourse.ioquake.org/t/playing-a-sound-via-configstrings/281/2 "2014-06-08T22:14:17Z")

</div>

No. CS\_SOUNDS+0 to CS\_SOUNDS+255 configstrings only tell cgame the name of the sound to play, not when to play it.

FWIW, you would use CS\_SOUNDS+255, not “255: sound/world/klaxon1.wav” like you said on IRC. (Well, you actually said 288, but that is invalid as it’s more than 255.)

There are game event entities that cause cgame to play a sound from CS\_SOUNDS+0 to 255. I don’t know how you’d do it in server right off hand. It would require massive hacks and must know game-only information like the entity\_event\_t enum (which OSP may of changed). This probably isn’t a simple thing that you can get someone to tell you how to do.

---

<div class="post-metadata">

**Author:** ![sentry](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sentry](https://discourse.ioquake.org/u/sentry)\
**Post date:** [June 8, 2014, 10:39pm UTC](https://discourse.ioquake.org/t/playing-a-sound-via-configstrings/281/3 "2014-06-08T22:39:12Z")

</div>

Zturtleman, thanks for your detailed response. I’ll check playing sounds off of my to-do list then!
