請問清身上武器的指令是什麼? [寫amxx的]

Home Home
引用 | 編輯 樂哥x_x
2011-07-20 03:04
樓主
推文 x0
請問清身上武器的指令是什麼?[寫amxx的]


因為我想 清身上武器  之後便give武器

獻花 x0
引用 | 編輯 fouury
2011-07-20 03:35
1樓
  
複製程式
strip_user_weapons(index)//index適用定義玩家參數(id, attacker等....)
#include:fun
史大說fun太渣表情

可是我還是用習慣了.........表情

獻花 x0
引用 | 編輯 HsK
2011-07-20 07:43
2樓
  
下面是引用 fouury 於 2011-07-20 03:35 發表的 : 到引言文
複製程式
strip_user_weapons(index)//index適用定義玩家參數(id, attacker等....)
#include:fun
史大說fun太渣表情  

可是我還是用習慣了.........表情

fun 不是弱
首先..我們不可原創做出類似 fun_amxx.dll 的東西...

只是 fakemeta 太強

因一個 strip_user_weapons 去用 fun 只令game 有更多無謂的讀取....

相反, 如果只是小插件, 插件本身又沒有用 fakemeta
用 fun 便比較好了....

fakemeta 寫法

stock fm_strip_user_weapons(index)
{
    new ent = fm_create_entity("player_weaponstrip");
    if (!pev_valid(ent))
        return 0;
   
    dllfunc(DLLFunc_Spawn, ent);
    dllfunc(DLLFunc_Use, ent, index);
    engfunc(EngFunc_RemoveEntity, ent);
   
    return 1;
}

stock fm_create_entity(const classname[])
{
    return engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, classname))
}

獻花 x1
引用 | 編輯 史來姆
2011-07-20 15:23
3樓
  
fun裡面的
大多也可以從fakemeta或engine做出
所以我沒使用過...
因為我現在都不寫小插件

獻花 x0