AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need a help , and delete my old topic! (https://forums.alliedmods.net/showthread.php?t=278272)

fukki 01-28-2016 13:13

Need a help , and delete my old topic!
 
Hello,
I need to add more sounds to this plugin..here the sounds that I need to add :
godlike
headshot
humiliation
nade_ultimate
prepare

here the sma:
PHP Code:

/* Ultimate Sounds Advanced AMXMODX Plugin
          _____     _______     _ _        _ _                          _______     _
         /  ___|    |_/\__|    | | \      / | | ||      || ||====|      |_/\__|    | |
         \ `--.     //  \ \    | |\ \    / /| | ||      || ||____|      //  \ \    | |
  by      `--. \   / ====  \   | | \ \__/ / | | ||      || ||   \\     / ====  \   | | 
         /\__/ |  / /     \ \  | |  '____'  | | ||      || ||    \\   / /     \ \  | |
         \____/  /_/       \_\ |_|          |_|   \__,_/   ||     || /_/       \_\ |_|

* Description ? ... no needed 
*/


#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] = {34681012,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"mode8);
    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 
0LEVELSi++) {
        if (
kills[killer] == levels[i]) {
            
announce(killeri);
            return 
PLUGIN_CONTINUE;
        }
    }

    return 
PLUGIN_CONTINUE;
}

announce(killerlevel) {
    new 
name[33];

    
get_user_name(killername32);
    
set_hudmessage(01002000.050.6520.026.00.010.12);

    if (
is_mode_set(2)) {
        
show_hudmessage(0messages[level], name);
    } else if (
is_mode_set(8)) {
        
show_hudmessage(killermessages[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(idprint_chat,
                         
"* You are on a killstreak with %d kills.",
                         
kills[id]);
        } else if (
deaths[id] > 1) {
            
client_print(idprint_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_NAMEPLUGIN_VERSIONPLUGIN_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")


Thanks!

redivcram 01-28-2016 13:41

Re: Need a help , and delete my old topic!
 
*quad facepalm*
Don't you know that there is an edit button? Well you would've known if you'd read stickies.

fukki 01-28-2016 13:58

Re: Need a help , and delete my old topic!
 
Hey,please I just want the new sma how it will be! because I'm really "noob" in this!
Thanks!

wickedd 01-28-2016 19:31

Re: Need a help , and delete my old topic!
 
Try to do it yourself or go post in the request forum.

fukki 01-29-2016 09:27

Re: Need a help , and delete my old topic!
 
Please,Any one will give me the new sma with these sounds?
godlike
headshot
humiliation
nade_ultimate
prepare


All times are GMT -4. The time now is 09:33.

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