广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 3841 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
龙心
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[插件] 仿CSO静止回血插件

图 1.



【插件资讯】

插件来源:网路资源转载提供会员参考 http://bbs.mychat.tw/re...id=927921
使用指令:自行修改编译及参考http://bbs.mychat.tw/re...id=927921
安装路径:自行修改编译及参考http://bbs.mychat.tw/re...id=927921

【插件介绍】

复制程式
new cumulative[33];
new g_Time;
new g_Amount;
new Float:get_attack_time[33];
new g_hamczbots;
new cvar_botquota;



public plugin_init()
{
    register_plugin(320, "1.0", 412);
    register_event("Damage", "NeedRecovery", "be", "2>0");
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
    g_Time = register_cvar("mychat_recovery_time", "3", 0, 0.00);
    g_Amount = register_cvar("mychat_recovery_health", "20", 0, 0.00);
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage", 0);
    return 0;
}


public plugin_precache()
{
    precache_sound("mychat/memberid_604597/post_in_mychat.wav");
    return 0;
}


public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
    if (attacker != victim && !is_user_connected(attacker))
    {
        return 1;
    }
    if (zp_get_user_zombie(victim) == zp_get_user_zombie(attacker))
    {
        return 1;
    }
    if (!zp_get_user_zombie(victim))
    {
        return 1;
    }
    if (!damage_type & 2 || !damage_type & 4)
    {
        return 1;
    }
    static id;
    id = victim;
    if (task_exists(id, 0))
    {
        remove_task(id, 0);
    }
    if (task_exists(id + 9988, 0))
    {
        remove_task(id + 9988, 0);
    }
    cumulative[id] = 0;
    return 1;
}


public NeedRecovery(id)
{
    if (!is_user_alive(id) || !zp_get_user_zombie(id))
    {
        return 0;
    }
    if (1 <= cumulative[id][0][0])
    {
        return 0;
    }
    new max_health = 0;
    max_health = zp_get_zombie_maxhealth(id);
    if (max_health > get_user_health(id))
    {
        new var2 = cumulative[id];
        var2 = var2[0][0] + 1;
        new param[2];
        param[0] = id;
        if (cumulative[id][0][0] == 1)
        {
            param[1] = 0;
            set_task(get_pcvar_float(g_Time), "RecoveryRate", id, param, 2, "b", 0);
        }
        else
        {
            param[1] = 1;
            set_task(get_pcvar_float(g_Time), "RecoveryRate", id + 9988, param, 2, "", 0);
        }
    }
    return 0;
}


public RecoveryRate(param[2])
{
    if (!is_user_alive(id) || !zp_get_user_zombie(id))
    {
        return 0;
    }
    new health = get_user_health(id);
    new max_health = 0;
    max_health = zp_get_zombie_maxhealth(id);
    new need_health = max_health - health;
    if (get_pcvar_num(g_Amount) >= need_health)
    {
        engfunc(EngFunc_EmitSound, id, 2, "mychat/memberid_604597/post_in_mychat.wav", 1.00/*1065353216*/, 0.80/*1061997773*/, 0, 100);
        set_user_health(id, max_health);
        remove_task(id, 0);
        remove_task(id + 9988, 0);
        cumulative[id] = 0;
    }
    else
    {
        set_user_health(id, get_pcvar_num(g_Amount) + health);
        if (deduct_times == 1)
        {
            cumulative[id] = max(cumulative[id][0][0] - 1, 0);
        }
    }
    return 0;
}


public client_PreThink(id)
{
    if (!is_user_alive(id) || !zp_get_user_zombie(id))
    {
        return 0;
    }
    if (get_gametime() - get_attack_time[id][0][0] < 0.50/*1056964608*/)
    {
        if (task_exists(id, 0))
        {
            remove_task(id, 0);
        }
        if (task_exists(id + 9988, 0))
        {
            remove_task(id + 9988, 0);
        }
        cumulative[id] = 0;
        return 0;
    }
    new speed = fm_get_speed(id);
    if (floatround(0.10/*1036831949*/ * 240, floatround_round) < speed)
    {
        if (task_exists(id, 0))
        {
            remove_task(id, 0);
        }
        if (task_exists(id + 9988, 0))
        {
            remove_task(id + 9988, 0);
        }
        cumulative[id] = 0;
        return 0;
    }
    if (!task_exists(id, 0))
    {
        cumulative[id] = 0;
    }
    new health = get_user_health(id);
    if (health >= 1)
    {
        if (health < max_health && cumulative[id][0][0])
        {
            NeedRecovery(id);
        }
    }
    return 0;
}


public event_round_start()
{
    new i = 1;
    while (i <= 32)
    {
        cumulative[i] = 0;
        i++;
    }
    client_print(0, print_chat, "仿CSO丧尸自愈插件 By MyChat - 文♂[会员ID:604597],此插件仅发布于MyChat数位男女论坛,若出现于其他论坛均为盗文!");
    return 0;
}


public client_putinserver(id)
{
    if (is_user_bot(id))
    {
        if (!g_hamczbots && cvar_botquota)
        {
            set_task(0.10, "register_ham_czbots", id, "", 0, "", 0);
        }
    }
    return 0;
}


public register_ham_czbots(id)
{
    if (g_hamczbots || !is_user_connected(id) || !get_pcvar_num(cvar_botquota))
    {
        return 0;
    }
    RegisterHamFromEntity(Ham_TakeDamage, id, "fw_TakeDamage", 0);
    g_hamczbots = 1;
    return 0;
}


fm_get_speed(entity)
{
    static Float:velocity[3];
    pev(entity, pev_velocity, velocity);
    return floatround(vector_length(velocity), floatround_round);
}




[ 此文章被龙心在2017-11-03 21:40重新编辑 ]



献花 x0 回到顶端 [楼 主] From:香港特别行政区 | Posted:2017-09-06 23:33 |
qq1677438990
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x0
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

没图吗


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

原文没有提供SMA 他提供的是部分写法,并非复制文章


你发的文章内容根本无法转档,原码内都缺少inc


建议在文内写上一些只供参考的说明,免得其他人无法转档造成误会....


[ 此文章被zxzyman在2017-11-04 19:21重新编辑 ]


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

献花 x0 回到顶端 [2 楼] From:台湾中嘉宽频股份有限公司 | Posted:2017-09-09 21:26 |
86425731
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x3
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

这插件我下载过…… 算重覆发文吧?

购买他人发的SMA档内容 再将其重新发文
虽然不收费 但完全不尊重原发文者

表情


 -世界和平-

就要从尊重开始
献花 x0 回到顶端 [3 楼] From:台湾中嘉宽频股份有限公司 | Posted:2017-09-15 16:50 |
龙心
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 86425731 于 2017-09-15 16:50 发表的 : 到引言文
这插件我下载过…… 算重覆发文吧?

购买他人发的SMA档内容 再将其重新发文
虽然不收费 但完全不尊重原发文者

表情

原文没有提供源码


献花 x0 回到顶端 [4 楼] From:香港特别行政区 | Posted:2017-09-15 17:40 |
龙心
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 zxzyman 于 2017-09-09 21:26 发表的 : 到引言文

原文没有提供SMA 他提供的是部分写法,并非复制文章


你发的文章内容根本无法转档,原码内都缺少inc


建议在文内写上一些只供参考的说明,免得其他人无法转档造成误会....

[ 此文章被zxzyman在2017-11-04 19:21重新编辑 ]

【插件资讯】

插件来源:网路资源转载提供会员参考 http://bbs.mychat.tw/re...id=927921
使用指令:自行修改编译及参考http://bbs.mychat.tw/re...id=927921
安装路径:自行修改编译及参考http://bbs.mychat.tw/re...id=927921
表情


献花 x0 回到顶端 [5 楼] From:香港特别行政区 | Posted:2017-11-04 23:44 |
talon9420
数位造型
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x0
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

好像不错用~~~~~~~~~~~~~


献花 x0 回到顶端 [6 楼] From:欧洲 | Posted:2018-12-02 12:26 |
mnva
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x2
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

多久恢复一次血


献花 x0 回到顶端 [7 楼] From:欧洲 | Posted:2018-12-05 16:41 |
kenzen
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x8
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

反编译的??


献花 x0 回到顶端 [8 楼] From:台湾中华电信股份有限公司 | Posted:2021-05-16 14:00 |

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