Помогите удалить строки c плагина где отвечает SOUND .
Буду очень благодарен!
Буду очень благодарен!
/*
* Обновление 07.05.2015
* v1.2 -
Исправлен баг с подсветкой экрана во время ослепления. Спасибо: admir, [WPMG]PRoSToTeM@
Добавлен квар bs_play_sound:
0 - без звука при убийстве
1 - со звуком при убийстве
*/
#include <amxmodx>
#include <hamsandwich>
#define PLUGIN "Blue Screen"
#define VERSION "1.2"
#define AUTHOR "Stimul"
#define is_valid_player(%1) (1 <= %1 <= g_iMaxPlayers)
#define play_sound(%1,%2) emit_sound(%1, CHAN_ITEM, %2, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
#define MAX_CLIENTS 32
#define RED 0
#define GREEN 0
#define BLUE 255
#define ALFA 75
#define SOUND "buttons/bell1.wav"
new Float:g_fTimeGlare[MAX_CLIENTS+1];
new g_iMsgScreenFade;
new g_iMaxPlayers;
new g_pPlaySound;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
g_pPlaySound = register_cvar("bs_play_sound", "1");
register_event("ScreenFade", "EventScreenFade", "b", "4=255", "5=255", "6=255");
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", true);
g_iMsgScreenFade = get_user_msgid("ScreenFade");
g_iMaxPlayers = get_maxplayers();
}
public plugin_precache()
precache_sound(SOUND);
public EventScreenFade(id)
g_fTimeGlare[id] = read_data(1) / 4096.0 + get_gametime();
public fw_PlayerKilled_Post(victim, attacker, corpse)
{
if(is_valid_player(attacker) && victim != attacker)
{
if(get_gametime() >= g_fTimeGlare[attacker])
{
message_begin(MSG_ONE_UNRELIABLE, g_iMsgScreenFade, _, attacker);
write_short(1<<10);
write_short(1<<10);
write_short(0x0000);
write_byte(RED);
write_byte(GREEN);
write_byte(BLUE);
write_byte(ALFA);
message_end();
if(get_pcvar_num(g_pPlaySound))
play_sound(attacker, SOUND);
}
}
}
* Обновление 07.05.2015
* v1.2 -
Исправлен баг с подсветкой экрана во время ослепления. Спасибо: admir, [WPMG]PRoSToTeM@
Добавлен квар bs_play_sound:
0 - без звука при убийстве
1 - со звуком при убийстве
*/
#include <amxmodx>
#include <hamsandwich>
#define PLUGIN "Blue Screen"
#define VERSION "1.2"
#define AUTHOR "Stimul"
#define is_valid_player(%1) (1 <= %1 <= g_iMaxPlayers)
#define play_sound(%1,%2) emit_sound(%1, CHAN_ITEM, %2, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
#define MAX_CLIENTS 32
#define RED 0
#define GREEN 0
#define BLUE 255
#define ALFA 75
#define SOUND "buttons/bell1.wav"
new Float:g_fTimeGlare[MAX_CLIENTS+1];
new g_iMsgScreenFade;
new g_iMaxPlayers;
new g_pPlaySound;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
g_pPlaySound = register_cvar("bs_play_sound", "1");
register_event("ScreenFade", "EventScreenFade", "b", "4=255", "5=255", "6=255");
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", true);
g_iMsgScreenFade = get_user_msgid("ScreenFade");
g_iMaxPlayers = get_maxplayers();
}
public plugin_precache()
precache_sound(SOUND);
public EventScreenFade(id)
g_fTimeGlare[id] = read_data(1) / 4096.0 + get_gametime();
public fw_PlayerKilled_Post(victim, attacker, corpse)
{
if(is_valid_player(attacker) && victim != attacker)
{
if(get_gametime() >= g_fTimeGlare[attacker])
{
message_begin(MSG_ONE_UNRELIABLE, g_iMsgScreenFade, _, attacker);
write_short(1<<10);
write_short(1<<10);
write_short(0x0000);
write_byte(RED);
write_byte(GREEN);
write_byte(BLUE);
write_byte(ALFA);
message_end();
if(get_pcvar_num(g_pPlaySound))
play_sound(attacker, SOUND);
}
}
}
Вложения
-
1,8 KB Просмотры: 3