|
发表于 2008-10-11 20:31:42
|
显示全部楼层
来自 中国–河南–许昌
回复: ( 特别感谢..JIM_YANG..老师 ) ...谢...谢...!
请问源码哪里不对了?又出现错误了
#include <fakemeta>
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
new const MODEL_t[] = "wa_te"
new const MODEL_ct[] = "hr_ct"
public plugin_precache() {
precache_model("models/player/wa_te/wa_te.mdl")
precache_model("models/player/wa_te/wa_teT.mdl")
precache_model("models/player/hr_ct/hr_ct.mdl")
return PLUGIN_CONTINUE
}
}
{
new szFile[64]
formatex(szFile, charsmax(szFile), "models/player/wa_te/wa_te.md.mdl", MODEL_t, MODEL_t)
if( file_exists(szFile) )
{
precache_model(szFile)
}
formatex(szFile, charsmax(szFile), "models/player/hr_ct/hr_ct.mdl", MODEL_ct, MODEL_ct)
if( file_exists(szFile) )
{
precache_model(szFile)
}
}
public plugin_init()
{
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
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|