|
楼主 |
发表于 2009-2-11 07:48:21
|
显示全部楼层
来自 中国–广东–广州–白云区
本帖最后由 点通粉丝 于 2009-2-13 05:51 编辑
不用顶我了必镜CS1.5己没多少人完了........
雷声手雷弹
/*
**
** Grenade Enhancer Lite with sound
**
** by HiSS
**
*/
#include <amxmodx>
#include <csx>
#define SOUND "de_torn/torn_thndrstrike.wav"
#define VERSION "1.2"
new toggle_plugin,toggle_flash,toggle_shake,toggle_sound;
new sound_beep[129];
public plugin_init()
{
register_plugin("Grenade Enhancer Lite",VERSION,"HiSS");
toggle_plugin = register_cvar("grenade_enhancer","1");
toggle_flash = register_cvar("grenade_enhancer_screenflash","1");
toggle_shake = register_cvar("grenade_enhancer_shake","1");
toggle_sound = register_cvar("grenade_enhancer_sound","1");
}
public plugin_precache()
{
precache_sound(SOUND);
}
public client_damage(attacker,victim,damage,wpnindex,hitplace,TA)
{
if(get_pcvar_num(toggle_plugin) != 1)
return PLUGIN_CONTINUE;
if(!attacker || !victim)
return PLUGIN_CONTINUE;
if(wpnindex != CSW_HEGRENADE)
return PLUGIN_CONTINUE;
if(is_user_connected(victim) && !is_user_bot(victim))
{
if(get_pcvar_num(toggle_flash) == 1)
Fade(victim,48,0,0,211);
if(get_pcvar_num(toggle_shake) == 1)
Shake(victim);
if(get_pcvar_num(toggle_sound) == 1)
Deafen(victim);
}
return PLUGIN_CONTINUE;
}
Fade(index,red,green,blue,alpha)
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},index);
write_short(6<<10);
write_short(5<<10);
write_short(1<<12);
write_byte(red);
write_byte(green);
write_byte(blue);
write_byte(alpha);
message_end();
}
Shake(index)
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenShake"),{0,0,0},index);
write_short(1<<10);
write_short(1<<10);
write_short(1<<10);
message_end();
}
Deafen(victim)
{
client_cmd(victim,"speak de_torn/torn_thndrstrike.wav",sound_beep);
} |
|