|
发表于 2007-11-14 20:20:22
|
显示全部楼层
来自 中国–广东–佛山–禅城区
回复: 恳求高手帮忙修正2个插件BUG
完整代码- #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","be");
- return PLUGIN_CONTINUE
- }
-
- public plugin_precache() {
- precache_model("models/player/cz_leet_t/cz_leet_t.mdl")
- precache_model("models/player/cz_gsg9_ct/cz_gsg9_ct.mdl")
- precache_model("models/player/CVTMMCT/CVTMMCT.mdl")
- precache_model("models/player/CVTMMT/CVTMMT.mdl")
- return PLUGIN_CONTINUE
- }
-
- public resetModel(id)
- {
- if (!is_user_connected(id)) return PLUGIN_CONTINUE
- new flags = get_user_flags(id)
- new CsTeams:userTeam = cs_get_user_team(id)
- if (flags & ADMIN_LEVEL_B){
- /* MM权限 */
- if (userTeam == CS_TEAM_T)
- cs_set_user_model(id, "CVTMMT")
- else if(userTeam == CS_TEAM_CT)
- cs_set_user_model(id, "CVTMMCT")
- else
- cs_reset_user_model(id)
- }else if (flags & ADMIN_LEVEL_A) {
- /* 此处设置你想设置的权限 */
- if (userTeam == CS_TEAM_T)
- cs_set_user_model(id, "cz_leet_t")
- else if(userTeam == CS_TEAM_CT)
- cs_set_user_model(id, "cz_gsg9_ct")
- else
- cs_reset_user_model(id)
- }
- return PLUGIN_CONTINUE
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|