| 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_msgScreenFade, g_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 i; i < sizeof g_szDeathSound; i++) precache_sound(g_szDeathSound[i]); public Ham_PlayerKilled_Post(iVictim) { message_begin(MSG_ONE_UNRELIABLE, g_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(0, 2); message_begin(MSG_ONE_UNRELIABLE, g_msgSendAudio, _, iVictim); write_byte(0); write_string(g_szDeathSound[iRandomNum]); write_short(100); message_end(); set_pev(iVictim, pev_iuser1, 0); }
|