回复: 帮忙看下这个代码,40行……
那你怎么判断是mm呢回复: 帮忙看下这个代码,40行……
我的代码里已经有了啊拥有A是 管理员 代码 ADMIN_IMMUNITY
拥有B是 VIP 代码ADMIN_RESERVATION
拥有M是 MM代码ADMIN_LEVEL_A
回复: 帮忙看下这个代码,40行……
#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/mxctadmin/mxctadmin.mdl")
precache_model("models/player/mxtadmin/mxtadmin.mdl")
precache_model("models/player/mxctvip/mxctvip.mdl")
precache_model("models/player/mxtvip/mxtvip.mdl")
precache_model("models/player/mxmmct/mxmmct.mdl")
precache_model("models/player/mxmmt/mxmmt.mdl")
return PLUGIN_CONTINUE
}
public resetModel(id, level, cid)
{
if (get_user_flags(id) & ADMIN_IMMUNITY)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "mxtadmin")
}
else
{
if (userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "mxctadmin")
}
}
}
else 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, "mxmmt")
}
else
{
if (userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "mxmmct")
}
}
}
else{
if (get_user_flags(id) & ADMIN_RESERVATION)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "mxtvip")
}
else
{
if (userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "mxctvip")
}
}
}
else
{
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
}
这样呢
回复: 帮忙看下这个代码,40行……
亲爱的 谢谢了!这么简单偶都不会!
看来要学习了!
记得帮我找一下那个插件!!~
感谢!
页:
1
[2]