下面是引用 s8720419 於 2016-03-01 19:17 發表的 :
你把這個插件SMA內容code上來..幫你檢查一下..
已下有些我把他換成了fakemeta的東西了..eng我果然不太習慣
我還有小改一些細節...雖然沒有實際用SMA轉檔測試..不過大致上應該沒問題。
如果有問題 再回覆吧
複製程式
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
new const v_bossclaw[] = { "models/show/v_bossknife.mdl" }
new const p_bossclaw[] = { "models/show/p_bossknife.mdl" }
new const boss_mdl[] = { "models/player/boss_model/boss_model.mdl" }
public plugin_precache()
{
precache_model(v_bossclaw);
precache_model(p_bossclaw);
precache_model(boss_mdl);
}
public plugin_init()
{
register_plugin("BossMod", "1.3", "SHow");
register_event("CurWeapon", "curwep", "be", "1=1");
RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1);
}
public curwep(id)
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
if(read_data(2) != CSW_KNIFE)
{
engclient_cmd(id, "weapon_knife");
//set_user_maxspeed(id, get_cvar_float("boss_speed")); ??? 沒這個boss_speed怎麼會出現..
}
else
{
set_pev(id, pev_viewmodel2, v_bossclaw);
set_pev(id, pev_weaponmodel2, p_bossclaw);
}
}
}
public Player_Spawn_Post(id)
{
if(!is_user_alive(id))
return;
if(cs_get_user_team(id) == CS_TEAM_T)
{
//set_user_maxspeed(id, get_cvar_float("boss_speed")); ??? 沒這個boss_speed怎麼會出現..
cs_set_user_model(id, "boss_model");
}
}
//支援BOT的...
public client_putinserver(id)
{
static classname[32], bool:Debug;
pev(id, pev_classname, classname, charsmax(classname));
if(!equal(classname, "player") && !Debug)
{
Debug = true;
set_task(1.0,"_Debug", id);
}
}
public _Debug(id)
RegisterHamFromEntity(Ham_Spawn, id, "Player_Spawn_Post", 1);