laoklaole 发表于 2011-6-12 22:47:21

道具 抽奖插件

#define PLUGIN "DS抽奖道具"
#define VERSION "1.0"
#define AUTHOR "DSHGFHDS"
new name
new openchoujiang
new bool:hit_key = { false, ... }
new bool:onlucom = { false, ... }

#define BUYMAKE 1 //每局抽奖的次数
new use_time = { 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
new cvar_make_buy
new cvar_heal_radius
new g_item_name[] = { "抽奖道具" }
new cvar_givemony
new buyonce = { 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);
}
页: [1]
查看完整版本: 道具 抽奖插件