|
好不容易找到的插件,等着急用,但不能编译。不明白那里的问题,还请懂的朋友帮忙看下,谢谢!!
代码如下:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
new const MODEL_t[] = "aaa"
new const MODEL_ct[] = "bbb"
public plugin_precache() {
precache_model("models/player/aaa/aaa.mdl")
precache_model("models/player/bbb/bbb.mdl")
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_plugin("team_Model", "2.0", "jim_yang")
register_forward(FM_SetClientKeyValue, "SetClientKeyValue")
RegisterHam(Ham_Spawn, "player", "Spawn", 1)
}
public Spawn(id)
{
if( is_user_alive(id) )
{
if( cs_get_user_team(id) == CS_TEAM_T)
set_user_info(id, "model", MODEL_t)
else
set_user_info(id, "model", MODEL_ct)
}
}
public SetClientKeyValue(id, infobuffer[], key[], value[])
{
if(equal(key, "model") && (!equal(value, MODEL_t) || !equal(value, MODEL_ct)))
{
if( cs_get_user_team(id) == CS_TEAM_T)
set_user_info(id, "model", MODEL_t)
else
set_user_info(id, "model", MODEL_ct)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|