|
发表于 2006-6-17 18:43:44
|
显示全部楼层
来自 中国–上海–上海–浦东新区
回复: 帮忙看下这个代码,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
- }
复制代码
这样呢 |
|