搜索
查看: 2561|回复: 0

[AMXX 带源码] 道具 抽奖插件

[复制链接]
发表于 2011-6-12 22:47:21 | 显示全部楼层 |阅读模式 来自 中国–云南–临沧
#define PLUGIN "DS抽奖道具"
#define VERSION "1.0"
#define AUTHOR "DSHGFHDS"
new name[64]
new openchoujiang[33]
new bool:hit_key[33] = { false, ... }
new bool:onlucom[33] = { false, ... }

#define BUYMAKE 1 //每局抽奖的次数
new use_time[33] = { 0, ... }
#define ZOMBIE_ADD_HEALTH_4 2000 //抽到3等奖或4等奖时奖励的生命

#define ZOMBIE_ADD_HEALTH_3 500  //僵尸抽到安慰奖时奖励的生命

#define ZOMBIE_ADD_HEALTH_2 100  //僵尸抽到1等奖时持续奖励的生命

new item

const g_armor_amount = 333 //抽到奖励抗感染护甲时的数值
const g_armor_limit = 999  //抗感染甲的最高数量
new opengivehealth[33]
new cvar_make_buy
new cvar_heal_radius
new g_item_name[] = { "抽奖道具" }
new cvar_givemony
new buyonce[33] = { 0, ... }
public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        register_event ( "HLTV" , "event_round_start" , "a" , "1=0" , "2=0" )
        register_forward(FM_PlayerPreThink, "fwd_PlayerPreThink")
        cvar_make_buy = register_cvar("zp_make_buy", "10") //购买抽奖道具花费的金钱
        cvar_givemony = register_cvar("zp_hgive_mony", "50") //抽到四等奖时奖励的弹药袋
        cvar_heal_radius = register_cvar("zp_give_heal_radius","500") //僵尸抽到特等奖时队友受影响的范围
        item = zp_register_extra_item(g_item_name, get_pcvar_num(cvar_make_buy), 0);
}

本帖子中包含更多资源

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

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

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