AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [HELP] Real Death plugin (https://forums.alliedmods.net/showthread.php?t=262467)

juanjotoronja 05-05-2015 07:19

[HELP] Real Death plugin
 
Hello... can anyone modify this plugin so it should play my custom files and block default death sounds only for CT's. I want the terrorist play default CS death sounds :up:

PHP Code:

        #include <amxmodx>
        #include <fakemeta>
        #include <hamsandwich>
         
        
new const g_szDeathSound[][] = {"hgrunt/gr_die1.wav""hgrunt/gr_die2.wav""hgrunt/gr_die3.wav"};
        new 
g_msgScreenFadeg_msgSendAudio;
         
        public 
plugin_init()
        {
                
register_plugin("Real Death""1.0""Freedo.m");
                
RegisterHam(Ham_Killed"player""Ham_PlayerKilled_Post"1);
                
g_msgScreenFade get_user_msgid("ScreenFade");
                
g_msgSendAudio get_user_msgid("SendAudio");
        }
         
        public 
plugin_precache()
                for(new 
isizeof g_szDeathSoundi++) precache_sound(g_szDeathSound[i]);
         
        public 
Ham_PlayerKilled_Post(iVictim)
        {
                
message_begin(MSG_ONE_UNRELIABLEg_msgScreenFade_iVictim);
                
write_short(8900);
                
write_short(8900);
                
write_short(1);
                
write_byte(0);
                
write_byte(0);
                
write_byte(0);
                
write_byte(255);
                
message_end();
                new 
iRandomNum random_num(02);
                
message_begin(MSG_ONE_UNRELIABLEg_msgSendAudio_iVictim);
                
write_byte(0);
                
write_string(g_szDeathSound[iRandomNum]);
                
write_short(100);
                
message_end();
                
set_pev(iVictimpev_iuser10);
        } 



All times are GMT -4. The time now is 20:10.

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