Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

DoD Connect Sound MP3

by dimon1052 · 2017-01-07 · 1 replies · 3729 views · 17 downloads

Read the thread (2 posts)

From the first post

#include rnrn#define Maxsounds 1rnrnnew plugin_author[] = "AMXX DoD Team"rnnew plugin_version[] = "1.0"rnrnnew soundlist[Maxsounds][] = {"sound/yourefolder/youresoundname"}rnrnpublic plugin_init( )rn{rn    register_plugin("DoD Connect Sound MP3", plugin_version, plugin_author)rn    register_cvar("dod_connectsound_mp3", plugin_version, FCVAR_SERVER)rn}rnrnpublic plugin_precache( )rn{rn    new temp[128]rn    for ( new a = 0; a < Maxsounds; a++ )rn    {rn             format(temp, 127, "%s.mp3", soundlist[a])rn             if ( file_exists(temp) )rn                 precache_generic(temp)rn    }rn}rnrnpublic client_putinserver( id )rn{rn    set_task(3.0, "consound", 100 + id)rn}rnrnpublic consound( timerid_id )rn{rn    new id = timerid_id - 100rn    new Usertimern    Usertime = get_user_time(id, 0)rn    if ( Usertime <= 0 )rn    {rn        set_task(3.0, "consound", timerid_id)rn    }elsern    {rn        new i = random(Maxsounds)rn        client_cmd(id, "mp3 play ^"%s^"", soundlist[i])rn    }rn    rn    return PLUGIN_CONTINUErn}

Files

dod_consoundmp3.sma Plugin Source 1 KB 17 dl Download Compile

The thread

All 2 posts from 2 people on DoD Connect Sound MP3, kept as they were written.

dimon1052
started this thread
Posts: 65
Threads: 15
Joined: Sep 2012
01-07-2017, 10:19 AM #1
#include <amxmodx>rnrn#define Maxsounds 1rnrnnew plugin_author[] = "AMXX DoD Team"rnnew plugin_version[] = "1.0"rnrnnew soundlist[Maxsounds][] = {"sound/yourefolder/youresoundname"}rnrnpublic plugin_init( )rn{rn    register_plugin("DoD Connect Sound MP3", plugin_version, plugin_author)rn    register_cvar("dod_connectsound_mp3", plugin_version, FCVAR_SERVER)rn}rnrnpublic plugin_precache( )rn{rn    new temp[128]rn    for ( new a = 0; a < Maxsounds; a++ )rn    {rn             format(temp, 127, "%s.mp3", soundlist[a])rn             if ( file_exists(temp) )rn                 precache_generic(temp)rn    }rn}rnrnpublic client_putinserver( id )rn{rn    set_task(3.0, "consound", 100 + id)rn}rnrnpublic consound( timerid_id )rn{rn    new id = timerid_id - 100rn    new Usertimern    Usertime = get_user_time(id, 0)rn    if ( Usertime <= 0 )rn    {rn        set_task(3.0, "consound", timerid_id)rn    }elsern    {rn        new i = random(Maxsounds)rn        client_cmd(id, "mp3 play ^"%s^"", soundlist[i])rn    }rn    rn    return PLUGIN_CONTINUErn}
F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
01-10-2017, 11:13 PM #2

Do you have a question about this plugin or something? There isn't anything in there that is DOD specific so I'm not sure why it would be called "DOD Connect Sound". Also, there are several plugins a AlliedMods that do exactly this.

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC