广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 1717 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
ss1352tw
个人头像
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x0
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[1.6][插件] zp4.3的BOT倒数前不开枪
zp4.3的BOT倒数前不开枪的插件在zp5.0里不管用

谁能帮我修改一下

谢谢

复制程式
/********************************************
=============================================
*    ZBot Helper For Zombie Plague 4.3+     *
=============================================
Description:
Fix some issues happens when playing with
Bots on CS:CZ

Additional CVAR:
bot_auto_kill <1|0>
bot_show_notification <1|0>

Modules:
- csx (for Countdown HUD Message)
- fakemeta (for flashlight code)

Changelog:
1.0 Initial release

1.1 Fix event_start so it works

1.2 Fix release
+ Added HUD Countdown features
+ Added 2 new cvars
+ Added experimental force flashlight
+ Added show notification
> Fix round end, bots stop attacking
  each others now
 
1.3 Change logic, Fix sync issue

1.4 Fix release
+ Added bot_auto_kill
- Remove countdown code
- Remove force flashlight code
> Bots don't use smg (more survive)
> Bots don't use sniper (more survive)

Credits:
- AMXModx Team (AMXModX 1.8.1)
- Mercylezz (Zombie Plague 4.3)
********************************************/

#include <amxmodx>
#include <csx>
#include <fakemeta>
#include <amxmisc>
#include <zombieplague>

#define PLUGIN "[ZP] ZBot Helper Lite"
#define VERSION "1.4"
#define AUTHOR "Dels"
    
new freeze_time, max_player;
new cvar_zbot_autokill, cvar_zbot_notification;
const TASK_ID = 1603;

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);    
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
    
    //used for "bot_auto_kill"
    register_event("DeathMsg","event_death","a");
    
    //cvars
    cvar_zbot_autokill = register_cvar("bot_auto_kill", "0"); //auto kill when all human die
    cvar_zbot_notification = register_cvar("bot_show_notification", "0"); //not actual debug, just show notification
}

public event_round_start()
{
    //bugfix
    remove_task(TASK_ID);
    
    //initialization each time round start
    set_cvar_num("mp_autoteambalance", 0);        //是否启动自动队伍平衡功能 0=关闭 1=开启 或是人数例如32
    set_cvar_num("mp_friendlyfire", 1);        //玩家是否可以伤害到队友 0=关闭 1=开启
    set_cvar_num("mp_freezetime", 4);        //回合开始前的冻结时间 (单位: 秒, 0 为无冻结时间)
    set_cvar_num("mp_limitteams", 0);        //队伍双方人数最大可相差几人 0=关闭 或是人数例如32
    set_cvar_num("bot_allow_grenades", 1);        //设定BOT是否使用手榴弹 1=使用
    set_cvar_num("bot_allow_shotguns", 1);        //设定BOT是否使用散弹枪 1=使用
    set_cvar_num("bot_allow_pistols", 1);        //设定BOT是否使用手枪 1=使用
    set_cvar_num("bot_allow_snipers", 1);        //设定BOT是否使用狙击枪 1=使用
    set_cvar_num("bot_allow_rogues", 0);        //设定BOT是否跟随队伍 1=使用
    set_cvar_num("bot_allow_machine_guns", 1);    //设定BOT是否使用机枪 1=使用
    set_cvar_num("bot_allow_sub_machine_guns", 1);    //设定BOT是否使用冲锋枪 1=使用
    set_cvar_num("bot_allow_shield", 0);        //设定BOT不使用盾牌 1=不使用
    set_cvar_num("bot_allow_rifles", 1);        //设定BOT是否使用步枪 1=使用
    set_cvar_num("bot_zombie", 1);            //设定BOT丧尸出现前不乱跑及不乱开枪 1=不乱跑及不乱开枪

    //notification stuff
    if (get_pcvar_num(cvar_zbot_notification) == 1)
        client_print(0, print_chat, "DUMB BOTS: ENABLED");
    
    freeze_time = get_cvar_num("zp_delay") - 1;
    set_task(4.0, "freeze_bots", TASK_ID);
}

public freeze_bots()
{    
    --freeze_time;
        
    if(freeze_time >= 1)
    {
        set_task(1.0, "freeze_bots", TASK_ID);
    }
    else
    {
        set_cvar_num("bot_zombie", 0);    
        remove_task(TASK_ID);
        
        //notification stuff
        if (get_pcvar_num(cvar_zbot_notification) == 1)
            client_print(0, print_chat, "DUMB BOTS: DISABLED");
    }
}

public zp_round_ended(winteam)
{
    if (winteam != WIN_NO_ONE)
    {
        set_cvar_num("bot_zombie", 1);
        
        //notification stuff
        if (get_pcvar_num(cvar_zbot_notification) == 1)
            client_print(0, print_chat, "DUMB BOTS: ENABLED");
    }
}

public event_death()
{
    if (get_pcvar_num(cvar_zbot_autokill) == 1)
    {
        new alive_humans;
        max_player = get_maxplayers();
        
        for (new i = 1; i <= max_player; i++)
        {
            if (!is_user_bot(i) && !is_user_hltv(i) && is_user_alive(i))
                alive_humans++;
        }
        
        if (alive_humans == 0)    
        {
            //set_cvar_string("bot_kill", "all"); //the simple way, bot frag decreased
            for (new j = 1; j <= max_player; j++)
            {
                if (is_user_bot(j) && !is_user_hltv(j) && is_user_alive(j))
                    user_kill(j, 1)
            }
        }        
    }
}



献花 x0 回到顶端 [楼 主] From:台湾中华电信股份有限公司 | Posted:2012-07-17 00:45 |
ak47klo
个人头像
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x8 鲜花 x36
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

目前本人也不太懂zp5.0这东西爷((上个礼拜才知道有这东西存在
所以我也爱莫能助((本人现在才开始学编写插件表情

此文章被评分,最近评分记录
财富:-20 (by Hatsuyuki) | 理由: 不清楚答案可提出见解,胡乱回覆则当灌水论


献花 x0 回到顶端 [1 楼] From:台湾凯擘股份有限公司 | Posted:2012-07-18 20:47 |
zxzyman 手机
个人头像
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖
小有名气
级别: 小有名气 该用户目前不上站
推文 x40 鲜花 x144
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

我的ZP5.0 全部都能支持耶....

但据我知道 有注明是ZP4.3的插件 ZP5.0不能用 (僵尸类型除外...)


用用看这个吧:

http://bbs-mychat.com/reads.php?tid=897211&keyword=BOT


记得把射1 枪改成 0








  表情


UWC3NG 终极魔兽-次世代 (繁体中文版)
     -按此连结-   

献花 x0 回到顶端 [2 楼] From:台湾中嘉宽频股份有限公司 | Posted:2012-07-19 15:01 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.022208 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言