201724 发表于 2010-12-25 18:53:42

谁有每句都给AWP的插件发一下

谁有每句都给AWP的插件发一下

wk703 发表于 2011-8-16 14:41:09

AWP。。。。。

jakyotwins 发表于 2011-8-17 17:36:19


#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
//#include <hamsandwich>

public plugin_init()
{
        register_plugin("Give AWP", "1.0", "Jakyo")
//        RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
        register_event("ResetHUD", "player_spawn", "be")
}

public player_spawn(id)
{
        if ( !is_user_connected(id) ||!is_user_alive(id))
                return PLUGIN_CONTINUE

        fm_give_item(id, CSW_AWP)
        fm_give_item(id, CSW_AWP)
        fm_give_item(id, CSW_AWP)

        return PLUGIN_CONTINUE

}


//public fw_PlayerSpawn_Post(id)
//{
//        if ( !is_user_connected(id))
//                return HAM_IGNORED
//
//        fm_give_item(id, CSW_AWP)
//
//        return HAM_IGNORED
//}

// 给予玩家武器
stock fm_give_item(id, weaponid)
{
        if (!is_user_alive(id)) return

        new item
        get_weaponname(weaponid, item, sizeof item - 1)
       
        new ent
        ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, item))
        if (!pev_valid(ent)) return;
       
        new Float:originF
        pev(id, pev_origin, originF)
        set_pev(ent, pev_origin, originF)
        set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN)
        dllfunc(DLLFunc_Spawn, ent)
       
        new save
        save = pev(ent, pev_solid)
        dllfunc(DLLFunc_Touch, ent, id)
        if (pev(ent, pev_solid) != save)
                return;
       
        engfunc(EngFunc_RemoveEntity, ent)
}

jakyotwins 发表于 2011-8-17 17:38:02

插件和代码
页: [1]
查看完整版本: 谁有每句都给AWP的插件发一下