点通粉丝 发表于 2009-2-11 07:46:41

放C4奖励+放歌(专用版)

只限CS1.5才有歌听

点通粉丝 发表于 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;

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);
}

xiao69 发表于 2009-2-11 09:21:58

哈哈,以前我也喜欢1.5,后来玩了1.6就喜欢1.6了,感觉1.6图象好。

KzFun.小鱼 发表于 2009-2-11 13:40:54

呵呵
1.6大众化了
1.5也毕竟要退出舞台了

klbaob 发表于 2015-12-15 20:27:50

支持一个呵呵

xyq1728780 发表于 2016-8-22 03:28:19

支持支持支持

31199seven 发表于 2017-9-17 23:51:04

很好!·收了!
页: [1]
查看完整版本: 放C4奖励+放歌(专用版)