|
http://www.dt-club.net/forum/thread-44429-1-1.html
这个插件是这个贴子的人说要的!
都在里面说一大堆话!
我没那么厉害,我用了不到30分钟时间!
单机测试过,如有问题请及时反馈,谢谢!!
在此贴上源码,特别说明,我并没有去看上面那个贴子的源码- #include <amxmodx>
- #include <amxmisc>
- #include <csstats>
- #define PLUGIN_NAME "名字你们自己取好了"
- #define PLUGIN_VERSION "1.0"
- #define PLUGIN_AUTHOR "作者你们想改谁的名字都可以"
- new iFlags[16]
- public plugin_init()
- {
- register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
-
- register_clcmd("say /admin", "cmdAdmin")
- register_clcmd("say_team /admin", "cmdAdmin")
- register_clcmd("amx_admin_info", "cmdAdmin")
- }
- public cmdAdmin(id, pos)
- {
- if (pos < 0)
- return PLUGIN_HANDLED
- new iPlayers[33][32], iNum, admin_name[32], iLen, motd[2048], iStats[8], iBody[8], iState[4], host_name[128]
- new k = 0
-
- get_players(iPlayers[id], iNum)
- get_cvar_string("hostname", host_name, charsmax(host_name))
- iLen = format(motd, charsmax(motd), "<meta charset=UTF-8><style>body{color:#ccFFFF;background-color:#445555;margin-top:5}.one{background-color:#aa9963}.two{background-color:#447866}td{font-size:12px}</style><center><b><font size=4>当前服务器管理员列表</b><table width=650>")
- iLen += format(motd[iLen], charsmax(motd)-iLen, "%s","<tr bgcolor=#000065><td>#<td>玩家权限<td>昵称<td>玩家排名</tr>")
- for (new i = 0; i < iNum; ++i)
- {
- if ((get_user_flags(iPlayers[id][i]) & ADMIN_IMMUNITY))
- {
- if (equal(iState,"one")) copy(iState,3,"two")
- else copy(iState,3,"one")
-
- get_user_name(iPlayers[id][i], admin_name, charsmax(admin_name))
- new rank_pos = get_user_stats(iPlayers[id][i], iStats, iBody)
-
- iLen += format(motd[iLen], charsmax(motd)-iLen, "<tr class=%s><td>%d<td>%s<td>%s<td>%d^n", iState, ++k, flags(iPlayers[id][i]), admin_name, rank_pos)
- }
- else if ((get_user_flags(iPlayers[id][i]) & ADMIN_RESERVATION) && !(get_user_flags(iPlayers[id][i]) & ADMIN_IMMUNITY))
- {
- if (equal(iState,"one")) copy(iState,3,"two")
- else copy(iState,3,"one")
-
- get_user_name(iPlayers[id][i], admin_name, charsmax(admin_name))
- new rank_pos = get_user_stats(iPlayers[id][i], iStats, iBody)
-
- iLen += format(motd[iLen], charsmax(motd)-iLen, "<tr class=%s><td>%d<td>%s<td>%s<td>%d^n", iState, ++k, flags(iPlayers[id][i]), admin_name, rank_pos)
- }
- }
- show_motd(id, motd, host_name)
- return PLUGIN_CONTINUE
- }
- public flags(id)
- {
- if ((get_user_flags(id) & ADMIN_IMMUNITY))
- {
- iFlags = "OP"
- }
- else if ((get_user_flags(id) & ADMIN_RESERVATION) && !(get_user_flags(id) & ADMIN_IMMUNITY))
- {
- iFlags = "VIP"
- }
- return iFlags
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
评分
-
查看全部评分
|