Raised This Month: $ Target: $400
 0% 

[HELP] Ultimate Sound modification


Post New Thread Reply   
 
Thread Tools Display Modes
Old 08-20-2013, 08:26
LordOfNothing
This message has been deleted by ConnorMcLeod. Reason: troll, or posting random confusing code, or posting for posts count
bidonas
Senior Member
Join Date: Aug 2012
Location: Romania
Old 08-20-2013 , 08:28   Re: [HELP] Ultimate Sound modification
Reply With Quote #2

Quote:
Originally Posted by LordOfNothing View Post
PHP Code:
public command_play
 
{

 } 
PHP Code:
public command_stop
 
{

 } 
what must be in commnand_play and command_stop here i have problem,

podarok, here is source code

Code:
#include <amxmodx>
#include <amxmisc>


#define PLUGIN_NAME "Ultimate Sounds Advanced"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "SAMURAI" 


new kills[33] = {0,...};
new deaths[33] = {0,...};

#define LEVELS 10

new levels[10] = {3, 4, 6, 8, 10, 12,14,15,16,18};
new sounds[10][] = {"ultimate_sounds/triplekill_ultimate", "ultimate_sounds/multikill_ultimate", "ultimate_sounds/ultrakill_ultimate",
                   "ultimate_sounds/killingspree_ultimate", "ultimate_sounds/megakill_ultimate", "ultimate_sounds/holyshit_ultimate",
		 "ultimate_sounds/ludicrouskill_ultimate","ultimate_sounds/rampage_ultimate","ultimate_sounds/unstoppable_ultimate",
		 "ultimate_sounds/monsterkill_ultimate"};
new messages[10][] = {"%s: Triple Kill !", "%s: Multi Kill !",
                     "%s: Ultra Kill !", "%s: Killing Spree !",
                     "%s: Mega Kill !", "%s: Holy Shit !",
		   "%s: Ludicrous Kill !", "%s: Rampage !",
		   "%s: Unstoppable !", "%s: M o n s t e R  K i L L ! ! !"};

is_mode_set(bits) {
    new mode[9];
    get_cvar_string("ultimate_sounds_advanced", mode, 8);
    return read_flags(mode) & bits;
}


public death_event(id) {
    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 name[33];

    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);

    if (is_mode_set(2)) {
        show_hudmessage(0, messages[level], name);
    } else if (is_mode_set(8)) {
        show_hudmessage(killer, messages[level], name);
    }
    if (is_mode_set(1)) {
        client_cmd(0, "spk %s", sounds[level]);
    } else if (is_mode_set(4)) {
        client_cmd(killer, "spk %s", sounds[level]);
    }
}


public reset_hud(id) {
    if (is_mode_set(16)) {
        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) {
    kills[id] = 0;
    deaths[id] = 0;
}


public plugin_init() {
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
    register_cvar("ultimate_sounds_advanced", "ab");
    register_event("ResetHUD", "reset_hud", "b");
    register_event("DeathMsg", "death_event", "a");
	
    return PLUGIN_CONTINUE;
}


public plugin_precache()
{
	precache_sound("ultimate_sounds/triplekill_ultimate.wav")
	precache_sound("ultimate_sounds/holyshit_ultimate.wav")
	precache_sound("ultimate_sounds/ludicrouskill_ultimate.wav")
	precache_sound("ultimate_sounds/megakill_ultimate.wav")
	precache_sound("ultimate_sounds/monsterkill_ultimate.wav")
	precache_sound("ultimate_sounds/multikill_ultimate.wav")
	precache_sound("ultimate_sounds/rampage_ultimate.wav")
	precache_sound("ultimate_sounds/triplekill_ultimate.wav")
	precache_sound("ultimate_sounds/ultrakill_ultimate.wav")
	precache_sound("ultimate_sounds/unstoppable_ultimate.wav")
}
bidonas is offline
Send a message via Yahoo to bidonas
Reply



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 15:44.


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