求大审加权限

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS个性化修改专区求大审加权限
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
1个回复

求大审加权限

楼层直达
迪加超人1241

ZxID:17647531

等级: 上等兵
举报 只看楼主 使用道具 楼主   发表于: 2014-01-17 0
求大审加权限为s    //s custom level G


#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new P_Cvars[31],Max_Players
public plugin_init()
{
    register_plugin("Damage Control", "1.18", "Fxfighter")

    RegisterHam(Ham_TakeDamage, "player", "hook_TakeDamage")

    P_Cvars[0] = register_cvar("amx_dmg_mode","1")
    P_Cvars[1] = register_cvar("amx_dmg_p228","#")
    P_Cvars[2] = register_cvar("amx_dmg_fall","#")
    P_Cvars[3] = register_cvar("amx_dmg_scout","#")
    P_Cvars[4] = register_cvar("amx_dmg_grenade","#")
    P_Cvars[5] = register_cvar("amx_dmg_xm1014","#")
    P_Cvars[7] = register_cvar("amx_dmg_mac10","#")
    P_Cvars[8] = register_cvar("amx_dmg_aug","#")
    P_Cvars[9] = register_cvar("amx_dmg_all","#")
    P_Cvars[10] = register_cvar("amx_dmg_elite","#")
    P_Cvars[11] = register_cvar("amx_dmg_fiveseven","#")
    P_Cvars[12] = register_cvar("amx_dmg_ump45","#")
    P_Cvars[13] = register_cvar("amx_dmg_sg550","#")
    P_Cvars[14] = register_cvar("amx_dmg_galil","#")
    P_Cvars[15] = register_cvar("amx_dmg_famas","#")
    P_Cvars[16] = register_cvar("amx_dmg_usp","#")
    P_Cvars[17] = register_cvar("amx_dmg_glock18","#")
    P_Cvars[18] = register_cvar("amx_dmg_awp","#")
    P_Cvars[19] = register_cvar("amx_dmg_mp5navy","#")
    P_Cvars[20] = register_cvar("amx_dmg_m249","#")
    P_Cvars[21] = register_cvar("amx_dmg_m3","#")
    P_Cvars[22] = register_cvar("amx_dmg_m4a1","#")
    P_Cvars[23] = register_cvar("amx_dmg_tmp","#")
    P_Cvars[24] = register_cvar("amx_dmg_g3sg1","#")
    P_Cvars[26] = register_cvar("amx_dmg_deagle","#")
    P_Cvars[27] = register_cvar("amx_dmg_sg552","#")
    P_Cvars[28] = register_cvar("amx_dmg_ak47","#")
    P_Cvars[29] = register_cvar("amx_dmg_knife","#")
    P_Cvars[30] = register_cvar("amx_dmg_p90","#")

    Max_Players = get_maxplayers()

}
public hook_TakeDamage(Victim, Useless, Attacker, Float:damage, damagebits)
{
    static cvar
    cvar = get_pcvar_num(P_Cvars[0])

    if(!cvar)return HAM_IGNORED

    static Gun
    if(Useless <= Max_Players && Useless != 0)Gun = get_user_weapon(Attacker)
    else
    {
        static classname[32]
        pev(Useless,pev_classname,classname,31)
        if(equal(classname,"grenade"))Gun = 4
        else if(!Useless)Gun = 2
    }
    if(!Gun)return HAM_IGNORED

    static Float:Dmg
    Dmg=get_pcvar_float(P_Cvars[Gun])
    if(Dmg == 1.0)
    {
        Dmg = get_pcvar_float(P_Cvars[9])
        if(Dmg == 1.0)return HAM_IGNORED
    }
    SetHamParamFloat(4,damage*Dmg)
    return HAM_HANDLED
}
new Debug
public client_putinserver(id)
{
    if(Debug)return
    
    if(is_user_bot(id))
    {
        Debug = 1
        new classname[32]
        pev(id,pev_classname,classname,31)

        if(!equal(classname,"player"))set_task(4.0,"_Debug",id)
    }
}
public _Debug(id)
{
    RegisterHamFromEntity(Ham_TakeDamage,id,"hook_TakeDamage")
    client_print(0,print_console,"bot debuged")
}
q2166755120

ZxID:8032265

等级: 准尉
萝卜CS交流群85527193
举报 只看该作者 沙发   发表于: 2014-01-20 0
SetHamParamFloat(4,damage*Dmg)前加if(get_user_flags(Attacker)&权限)
Z
« 返回列表
发帖 回复