|
发表于 2008-5-19 09:26:21
|
显示全部楼层
来自 中国–上海–上海–徐汇区
回复: 请求一个OP做T变人质皮肤,做CT变VIP皮肤插件
看如下源码,自行编译,是在原AMX Admin Model插件的基础上修改。#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
register_plugin("Admin Model", "1.0", "DT")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}
public plugin_precache() {
precache_model("models/player/vip/vip.mdl")
precache_model("models/hostage.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, "hostage")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "vip")
}
else {
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
} |
|