|
发表于 2006-5-26 21:56:52
|
显示全部楼层
来自 中国–广西–河池
回复: [求助]哪位好心人提供管理员及VIP服装插件
给你源码,自己编译一下就行了,我已经测试通过了,只是在判断玩家权限上有点不同,
玩家有M权限就可以用OP服装,有N权限就可以用VIP服装,可以自己更改成自己想要的权限等级,
具体方法参考论坛里相关的帖子,还有服装的mdl文件也需要自己去找,警匪各一套,总共四套,差不多10M大小的模型文件,玩家在下载服务器资源的时候就有点郁闷了……#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/mm_ct/mm_ct.mdl")
precache_model("models/player/mm_te/mm_te.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_B)
{
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T)
{
cs_set_user_model(id, "mm_te")
}
else
{
if (userTeam == CS_TEAM_CT)
{
cs_set_user_model(id, "mm_ct")
}
}
}
else
{
cs_reset_user_model(id)
}
}
return PLUGIN_CONTINUE
} |
|