|
发表于 2008-3-2 12:44:59
|
显示全部楼层
|阅读模式
来自 中国–广东–珠海–香洲区
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("AMX Admin Model", "1.1.1", "whitemike | C.H.M")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/admin_ct/admin_ct.mdl")
precache_model("models/player/admin_te/admin_te.mdl")
precache_model("models/player/dcoo_liumang_ct/dcoo_liumang_ct.mdl")
precache_model("models/player/dcoo_liumang_t/dcoo_liumang_t.mdl")
precache_model("models/player/dcoo_girl_ct2/dcoo_girl_ct2.mdl")
precache_model("models/player/dcoo_girl_t1/dcoo_girl_t1.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid)
{
if (get_user_flags(id) & ADMIN_LEVEL_A)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "admin_te")
}
else
{ if (userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "admin_ct")
}
}
}
else
{
if (get_user_flags(id) & ADMIN_LEVEL_C)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "dcoo_girl_t1")
}
else
{ if (userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "dcoo_girl_ct2")
}
}
}
else
{
if (get_user_flags(id) & ADMIN_LEVEL_B)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "dcoo_liumang_t")
}
else
{
if (userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "dcoo_liumang_ct")
}
}
}
else
{
cs_reset_user_model(id)
}
}
}
return PLUGIN_CONTINUE
}
这是VIP服装的代码,出错日志如下:
L 03/02/2008 - 12:13:54: Start of error session.
L 03/02/2008 - 12:13:54: Info (map "de_inferno") (logfile "error_030208.log")
L 03/02/2008 - 12:13:54: [CSTRIKE] Invalid player 9
L 03/02/2008 - 12:13:54: [AMXX] Run time error 10 (plugin "admin_vip.amxx") (native "cs_reset_user_model") - debug not enabled!
L 03/02/2008 - 12:13:54: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). |
|