搜索
查看: 3010|回复: 4

赠送护甲插件修改

[复制链接]
发表于 2009-3-18 13:09:23 | 显示全部楼层 |阅读模式 来自 山西晋城
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME        "armor&health150"
#define PLUGIN_VERSION        "1.0"
#define PLUGIN_AUTHOR        "KIN"

public plugin_init()
{
        register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
        register_event("ResetHUD", "eResetHUD", "be")
}

public eResetHUD(id)
{
        //玩家权限
        if(get_user_flags(id)&ADMIN_LEVEL_A){
                //护甲150
            set_user_armor(id,150)
                    //HP 150
            set_user_health(id,150)
        }
}

能不能修改为每回合结束都自动赠送。保持每回合都是150的HP和150的护甲?
发表于 2009-3-18 15:07:55 | 显示全部楼层 来自 广东广州
register_event("ResetHUD", "eResetHUD", "be")
修改为
register_logevent(“eResetHUD",2, "1=Round_Start")
回复

使用道具 举报

 楼主| 发表于 2009-3-18 16:55:41 | 显示全部楼层 来自 山西晋城
试了一下不管用....我想在僵尸服里使用.....每局VIP自动赠送150HP和抗感染护甲
顺便贴出 购买抗感染护甲插件,怎么样修改能使B权限的玩家获得且是每局都送的..

/*================================================================================
       
        -------------------------------------------------
        -*- [zsy314提醒您] 自定义道具:抗感染护甲 1.0 -*-
        -------------------------------------------------
       
        ~~~~~~~~~~~~~~~
        - Description -
        ~~~~~~~~~~~~~~~
       
        This item gives humans some armor that offers protection
        against zombie injuries.
       
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

/*================================================================================
[Plugin Customization]
=================================================================================*/

new const g_item_name[] = { "抗感染护甲" }
const g_item_cost = 6

new const g_sound_buyarmor[] = { "items/tr_kevlar.wav" }
const g_armor_amount = 100
const g_armor_limit = 999

/*============================================================================*/

// Item IDs
new g_itemid_humanarmor

public plugin_precache()
{
        precache_sound(g_sound_buyarmor)
}

public plugin_init()
{
        register_plugin("[提醒您] Extra: Anti-Infection Armor", "1.0", "MeRcyLeZZ")
       
        g_itemid_humanarmor = zp_register_extra_item(g_item_name, g_item_cost, ZP_TEAM_HUMAN)
}

// Human buys our upgrade, give him some armor
public zp_extra_item_selected(player, itemid)
{
        if (itemid == g_itemid_humanarmor)
        {
                set_pev(player, pev_armorvalue, float(min(pev(player, pev_armorvalue)+g_armor_amount, g_armor_limit)))
                engfunc(EngFunc_EmitSound, player, CHAN_BODY, g_sound_buyarmor, 1.0, ATTN_NORM, 0, PITCH_NORM)
        }
}
回复

使用道具 举报

发表于 2009-3-21 22:48:40 | 显示全部楼层 来自 湖北黄石
VIP不无敌了?这好有什么玩头?
回复

使用道具 举报

发表于 2010-3-14 19:58:13 | 显示全部楼层 来自 江苏苏州
回复

使用道具 举报

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

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