搜索
查看: 7350|回复: 33

[AMXX 带源码] 最新收藏的插件

[复制链接]
发表于 2010-4-30 03:25:58 | 显示全部楼层 |阅读模式 来自 中国–江苏–苏州
#include <amxmodx>
#include <engine>

/*

The cvar is controlled like this

sv_grentrail 0 = No Grentrail
sv_grentrail 1 = All Green Trails
sv_grentrail 2 = Random Colors
sv_grentrail 3 = Team Specific (Tested In CS...)

*/

#define TE_BEAMFOLLOW 22

new m_iTrail

public plugin_init()
{
        register_plugin("Grentrail","1.3","AssKicR")
        register_event("SendAudio","FireInTheHole","bc","2=%!MRAD_FIREINHOLE")
        register_cvar("sv_grentrail","0")
}

public plugin_precache() {
        m_iTrail = precache_model("sprites/smoke.spr")
}

public FireInTheHole()
{
        if(get_cvar_num("sv_grentrail") == 0)
                return PLUGIN_HANDLED

        new id = read_data(1)
        set_task(0.3, "grenid", id)
        return PLUGIN_HANDLED
}

public grenid(id){
        new grenadeid = get_grenade(id)
        if (grenadeid) {
                message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
                write_byte( TE_BEAMFOLLOW )
                write_short(grenadeid) // entity
                write_short(m_iTrail)  // model
                write_byte( 10 )       // life
                write_byte( 5 )        // width
                if (get_cvar_num("sv_grentrail")==1) {
                        write_byte( 0 )      // r, g, b
                        write_byte( 255 )    // r, g, b
                        write_byte( 0 )      // r, g, b
                }
                else if (get_cvar_num("sv_grentrail")==2)
                {
                        new red = random_num(0,255)
                        new green = random_num(0,255)
                        new blue = random_num(0,255)
                        write_byte( red )     // r, g, b
                        write_byte( green )   // r, g, b
                        write_byte( blue )    // r, g, b
                }
                else if (get_cvar_num("sv_grentrail")==3)
                {
                        if (get_user_team(id)==1) // Terrorist
                        {
                                write_byte( 255 ) // r, g, b
                                write_byte( 0 )   // r, g, b
                                write_byte( 0 )   // r, g, b
                        }
                        else // Counter-Terrorist
                        {
                                write_byte( 0 )   // r, g, b
                                write_byte( 0 )   // r, g, b
                                write_byte( 255 ) // r, g, b
                        }
                }
                else
                {
                        write_byte( 0 )       // r, g, b
                        write_byte( 0 )       // r, g, b
                        write_byte( 0 )       // r, g, b
                }
                switch (random_num(0,2))
                {
                        case 0:write_byte( 64 )         // brightness
                        case 1:write_byte( 128 ) // brightness
                        case 2:write_byte( 192 ) // brightness
                }
                message_end() // move PHS/PVS data sending into here (SEND_ALL, SEND_PVS, SEND_PHS)
        }
}

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
发表于 2010-4-30 10:30:40 | 显示全部楼层 来自 中国–山东–济南
都是些什么插件
回复

使用道具 举报

发表于 2010-4-30 20:29:11 | 显示全部楼层 来自 中国–广西–南宁
没有说明没有解释
回复

使用道具 举报

发表于 2010-5-2 22:13:43 | 显示全部楼层 来自 中国–北京–北京
介绍的详细点就好了
回复

使用道具 举报

发表于 2010-5-5 11:06:53 | 显示全部楼层 来自 中国–上海–上海–宝山区
出新东东了。。 支持!
回复

使用道具 举报

发表于 2010-5-5 13:44:36 | 显示全部楼层 来自 中国–甘肃–兰州
支持一下!
回复

使用道具 举报

发表于 2010-5-5 14:34:46 | 显示全部楼层 来自 中国–重庆–重庆
O MY GOD 这么多
回复

使用道具 举报

发表于 2010-5-8 17:06:21 | 显示全部楼层 来自 中国–广东–佛山
O MY GOD 这么多
回复

使用道具 举报

发表于 2010-5-8 17:22:05 | 显示全部楼层 来自 中国–湖南–长沙
麻烦介绍下!!!
回复

使用道具 举报

发表于 2010-5-16 23:55:35 | 显示全部楼层 来自 中国–江苏–苏州
没有具体说明?要钱的啊
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表