下面是引用 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);