Raised This Month: $51 Target: $400
 12% 

Ultimate Sounds (The Original)


Post New Thread Closed Thread   
 
Thread Tools Display Modes
hoboman
Senior Member
Join Date: Jul 2007
Old 09-23-2007 , 23:07   Re: Ultimate Sounds (The Original) (Updated)
#421

this is the line from amx_super that plays the loading music:
client_cmd(id,"mp3 play media/%s",soundlist[i])

it uses "mp3 play *file path*"

this is what i've been trying to edit...kinda....doesn't work at all...

Code:
#include <amxmodx>

#define KNIFFMESSAGES 5
#define LEVELS 10
#define MESSAGESNOHP 5
#define MESSAGESHP 5

new kills[33] = {0,...};
new deaths[33] = {0,...};
new alone_ann = 0
new levels[10] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11};

new stksounds[10][] = {
"misc/multikill",
"misc/megakill",
"misc/ultrakill",
"misc/monsterkill",
"misc/killingspree",
"misc/wickedsick",
"misc/rampage",
"misc/ludacrisskil",
"misc/godlike",
"misc/holyshit"};

new stkmessages[10][] = {
"%s: Multi-Kill!",
"%s: Mega-Kill!",
"%s: Ultra-Kill!",
"%s: Monster-Kill!",
"%s: Killing Spree!",
"%s: Wicked Sick!",
"%s: Rampage!",
"%s: Ludacriss-Kill",
"%s: Godlike!",
"%s: Holy Shit!"}


new kniffmessages[KNIFFMESSAGES][] = {
"%s Sliced And Diced %s!",
"%s Slashed %s!",
"%s Shanked %s!",
"%s Pulled A Knife On %s!",
"%s Knived %s!"};

new messagesnohp[MESSAGESNOHP][] = {
"%i terrorist vs %i CT^n%s: Now All Depends On You!",
"%i terrorist vs %i CT^n%s: I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s: All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s: your Teammates are dead its time to die!",
"%i terrorist vs %i CT^n%s: Now You Are Alone. Have Fun!"};

new messageshp[MESSAGESHP][] = {
"%i terrorist vs %i CT^n%s (%i hp): Now All Depend On You!",
"%i terrorist vs %i CT^n%s (%i hp): I Hope You Still Have A Healthpack.",
"%i terrorist vs %i CT^n%s (%i hp): All Your Teammates Were Killed. Good Luck!",
"%i terrorist vs %i CT^n%s (%i hp) your Teammates are dead its time to die!",
"%i terrorist vs %i CT^n%s (%i hp): Now You Are alone. Have Fun!"};

get_streak()
{
    new streak[3]
    get_cvar_string("streak_mode",streak,2)
    return read_flags(streak)
}

public death_event(id)
{
    new streak = get_streak()

    if ((streak&1) || (streak&2))
    {
            new killer = read_data(1);
            new victim = read_data(2);

            kills[killer] += 1;
            kills[victim] = 0;
            deaths[killer] = 0;
            deaths[victim] += 1;

            for (new i = 0; i < LEVELS; i++)
        {
                if (kills[killer] == levels[i])
            {
                        announce(killer, i);
                        return PLUGIN_CONTINUE;
            }
        }
    }
    return PLUGIN_CONTINUE;
}

announce(killer, level)
{
    new streak = get_streak()

    if (streak&1)
    {
            new name[32];

           get_user_name(killer, name, 32);
        set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
        show_hudmessage(0, stkmessages[level], name);
    }

    if (streak&2){
            client_cmd(0, "mp3 play %s", stksounds[level]);
    }
}

public reset_hud(id)
{
    new streak = get_streak()

    if (streak&1)
    {

        if (kills[id] > levels[0])
        {
                client_print(id, print_chat, 
            "* You are on a killstreak with %d kills.", kills[id]);

        }

        else if (deaths[id] > 1)
        {
            client_print(id, print_chat, 
            "* Take care, you are on a deathstreak with %d deaths in a row.", deaths[id]);
        }
    }
}

public client_connect(id)
{
    new streak = get_streak()

    if ((streak&1) || (streak&2))
    {
        kills[id] = 0;
        deaths[id] = 0;
    }
}

public knife_kill()
{
    new kniffmode[4] 
    get_cvar_string("kniff_mode",kniffmode,4) 
    new kniffmode_bit = read_flags(kniffmode)

    if (kniffmode_bit & 1)
    {
        new killer_id = read_data(1)
        new victim_id = read_data(2)
        new killer_name[33], victim_name[33]

        get_user_name(killer_id,killer_name,33)
        get_user_name(victim_id,victim_name,33)


        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
        show_hudmessage(0,kniffmessages[ random_num(0,KNIFFMESSAGES-1) ],killer_name,victim_name)
    }

    if (kniffmode_bit & 2)
    {
        client_cmd(0,"mp3 play misc/humiliation")
       }
}


public roundend_msg(id)

    alone_ann = 0

public death_msg(id)
{

    new lmmode[8] 
    get_cvar_string("lastman_mode",lmmode,8) 
    new lmmode_bit = read_flags(lmmode)

    new players_ct[32], players_t[32], ict, ite, last
    get_players(players_ct,ict,"ae","CT")   
    get_players(players_t,ite,"ae","TERRORIST")   

    if (ict==1&&ite==1)
    {
        new name1[32], name2[32]
        get_user_name(players_ct[0],name1,32)
        get_user_name(players_t[0],name2,32)
        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

        if (lmmode_bit & 1)
        {
            if (lmmode_bit & 2)
            {
                show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
            }

            else
            {
                show_hudmessage(0,"%s vs. %s",name1,name2)
            }

            if (lmmode_bit & 4)
            {
                client_cmd(0,"mp3 play misc/maytheforce")
            }
        }
    } 
    else
{   
    if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
    {
        last=players_ct[0]
        client_cmd(last,"mp3 play misc/oneandonly")
    }

    else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
    {
        last=players_t[0]
        client_cmd(last,"mp3 play misc/oneandonly")
    }

    else
    {
        return PLUGIN_CONTINUE
    }
    alone_ann = last
    new name[32]   
    get_user_name(last,name,32)

    if (lmmode_bit & 1)
    {
        set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)

        if (lmmode_bit & 2)
        {
            show_hudmessage(0,messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))
        }

        else
        {
            show_hudmessage(0,messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )
        }
    }

    if (lmmode_bit & 4)
    {
        client_cmd(last,"mp3 play misc/maytheforce")
    }
}
    return PLUGIN_CONTINUE   
}


public hs()
{
    new hsmode[4] 
    get_cvar_string("hs_mode",hsmode,4) 
    new hsmode_bit = read_flags(hsmode)

    if (hsmode_bit & 1)
    {
    new killer_id = read_data(1)
    new victim_id = read_data(2)
    new victim_name[33]

    get_user_name(victim_id,victim_name,33)

    set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)
    show_hudmessage(killer_id,"::HEADSHOT::^nYou Owned %s !!",victim_name)
    }

    if (hsmode_bit & 2)
    {
        client_cmd(0,"mp3 play misc/headshot")
    }
}

public plugin_precache()
{
    precache_sound("misc/monsterkill.mp3")
    precache_sound("misc/godlike.mp3")
    precache_sound("misc/headshot.mp3")
    precache_sound("misc/humiliation.mp3")
    precache_sound("misc/killingspree.mp3")
    precache_sound("misc/multikill.mp3")
    precache_sound("misc/ultrakill.mp3")
    precache_sound("misc/maytheforce.mp3")
    precache_sound("misc/oneandonly.mp3")
    precache_sound("misc/prepare.mp3")
    precache_sound("misc/rampage.mp3")
    precache_sound("misc/holyshit.mp3")
    precache_sound("misc/megakill.mp3")
    precache_sound("misc/wickedsick.mp3")
    precache_sound("misc/ludacrisskill.mp3")
        
    return PLUGIN_CONTINUE 
}



public plugin_init()
{
    register_plugin("Ultimate Sound","1.5","Dizzy")
    register_event("DeathMsg","hs","a","3=1")
    register_event("DeathMsg","knife_kill","a","4&kni")
    register_event("ResetHUD", "reset_hud", "b");
    register_event("DeathMsg", "death_event", "a")
    register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
    register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")
    register_event("DeathMsg","death_msg","a")
    register_cvar("lastman_mode","abc")
    register_cvar("streak_mode","ab")
    register_cvar("kniff_mode","ab")
    register_cvar("hs_mode","ab")

    return PLUGIN_CONTINUE
}
mp3s:
Attached Files
File Type: zip misc.zip (401.0 KB, 192 views)
__________________
hoboman is offline
JUSTSMOKIN
Member
Join Date: Feb 2007
Old 09-24-2007 , 13:33   Re: Ultimate Sounds (The Original) (Updated)
#422

The size of the file makes no difference to dl time its how much bandwidth you have got that matters if you have mp3 or wav it will still sound the same also i can put good money on the fact that mp3s struggle and often lock up in cs and dod well all hl1 based mods thats only in game tho and may cause your server to crash :p
__________________

JUSTSMOKIN is offline
JUSTSMOKIN
Member
Join Date: Feb 2007
Old 09-24-2007 , 17:13   Re: Ultimate Sounds (The Original) (Updated)
#423

Ok show me where you have edited other than to add .mp3 to all the wavs ?? maby i can help you out with whatever you crazy idea is :p
__________________


Last edited by JUSTSMOKIN; 09-24-2007 at 17:15.
JUSTSMOKIN is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 09-24-2007 , 18:03   Re: Ultimate Sounds (The Original) (Updated)
#424

emitting the sound in mp3, ill check it out soon when I got some more time. You can only change so much for just the sound, so thats it.
(the files for precache, and emitting them)
__________________
bmann_420 is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 09-24-2007 , 19:06   Re: Ultimate Sounds (The Original) (Updated)
#425

Quote:
Originally Posted by JUSTSMOKIN View Post
Ok show me where you have edited other than to add .mp3 to all the wavs ?? maby i can help you out with whatever you crazy idea is :p
well i didn't do much...i edited all the precached files to be .mp3s
then i changed
client_cmd(0,"spk misc/sound")
to
client_cmd(0,"mp3 play misc/sound")
because spk can only play .wav files and i have seen the loading music plug ins ( such as the one in amx_super ) play .mp3s with "mp3 play *path*"

example of "mp3 play *path*"
search "loading sound" in amx_super http://forums.alliedmods.net/showthread.php?p=166806
__________________
hoboman is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-24-2007 , 19:15   Re: Ultimate Sounds (The Original) (Updated)
#426

have to be : mp3 play sound/misc/ (this only with mp3s)
ConnorMcLeod is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 09-25-2007 , 02:20   Re: Ultimate Sounds (The Original) (Updated)
#427

Quote:
Originally Posted by connorr View Post
have to be : mp3 play sound/misc/ (this only with mp3s)
you win!
__________________
hoboman is offline
unseenghost
Member
Join Date: Dec 2006
Old 09-26-2007 , 22:16   Re: Ultimate Sounds (The Original) (Updated)
#428

after i put the plug-in in server and load sounds to i have to do anything else because i was using the server one for sounds do i have to disable that for it to work? because its giving me bad load when i check in server with amx_plug-ins
unseenghost is offline
JUSTSMOKIN
Member
Join Date: Feb 2007
Old 09-28-2007 , 07:11   Re: Ultimate Sounds (The Original) (Updated)
#429

Ok im struggling to understand what your saying so ill start from scratch

1. place the ultimate_sounds.amxx in the plugins folder
2. Place the ultimate_sounds.sma in the scripting folder
3. Place the sounds in sounds/misc on your server and your fast downlaod if you have one
4. add a line to the following file configs/plugins.ini Add thos line

ultimate_sounds.amxx ; plays sounds when kills are made

Then restart your server or change the map and you should download the sounds and then kill :p

If this dosent work then lemmy know
__________________

JUSTSMOKIN is offline
itsgood
Junior Member
Join Date: Oct 2007
Old 10-06-2007 , 10:13   Re: Ultimate Sounds (The Original) (Updated)
#430

A question, the plugin works fine for me, there are all sounds&messages except the "prepare to fight". is that normal?
itsgood is offline
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode