搜索
查看: 9991|回复: 35

[AMXX 无源码] 【滚动显示】在线OP、VIP,不想给代码

[复制链接]
发表于 2009-5-17 19:48:44 | 显示全部楼层 |阅读模式 来自 江苏连云港
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2009-5-17 19:55:11 | 显示全部楼层 来自 广东广州
源码........我找一下先..一会帮你补发出来..还不想给代码..还卖5 点通币 ..真刁哦
回复

使用道具 举报

发表于 2009-5-17 19:57:51 | 显示全部楼层 来自 广东广州
找到啦...........    {:3_52:}
  1. */

  2. #include <amxmodx>
  3. #include <amxmisc>

  4. #define MAX_MESSAGES 32
  5. #define X_POS -1.0
  6. #define Y_POS 0.30
  7. #define HOLD_TIME 12.0

  8. new g_Values[MAX_MESSAGES][3]
  9. new g_Messages[MAX_MESSAGES][384]
  10. new g_MessagesNum,g_subMsgNum
  11. new g_Current,g_subCurrent

  12. public plugin_init() {
  13. register_plugin("Info. Messages",AMXX_VERSION_STR,"AMXX Dev Team")
  14. register_dictionary("imessage.txt")
  15. register_dictionary("common.txt")
  16. register_srvcmd("amx_admin","setMessage")
  17. register_cvar("amx_freq_admin","20")
  18. new lastinfo[8]
  19. get_localinfo("lastinfomsg",lastinfo,7)
  20. g_Current = str_to_num(lastinfo)
  21. g_subCurrent = 0
  22. g_subMsgNum=2
  23. set_localinfo("lastinfomsg","")
  24. }

  25. public infoMessage() {
  26. if(g_Current==0) g_subCurrent=0
  27. if (g_Current >= g_MessagesNum)
  28. {
  29. g_subCurrent++;
  30. if(g_subCurrent>=g_subMsgNum){
  31. g_Current = 0
  32. }
  33. //在这里我们增加一个现实在线OP的模块
  34. new opmsg[512],playerslist[32],playerscount,i,pos,opcount
  35. get_players(playerslist,playerscount,"c")//Skip Bot
  36. opcount=0;
  37. if(g_subCurrent==1){
  38. opmsg="[ O P ]^n_____________________________________________^n"
  39. pos=strlen(opmsg)
  40. for(i=0;i<playerscount;i++){
  41. if(access(playerslist[i],ADMIN_IMMUNITY)){
  42. new username[33]
  43. get_user_name(playerslist[i],username,32)
  44. opcount++
  45. pos+=format(opmsg[pos],511-pos,"%s^n",username)
  46. }
  47. }
  48. if(opcount==0) opmsg="[ Mei You Zai Xian OP ]"
  49. }
  50. if(g_subCurrent==2){
  51. opmsg="[ V I P ]^n_____________________________________________^n"
  52. pos=strlen(opmsg)
  53. for(i=0;i<playerscount;i++){
  54. if(access(playerslist[i],ADMIN_RESERVATION)&&(!access(playerslist[i],ADMIN_IMMUNITY))){
  55. new username[33]
  56. get_user_name(playerslist[i],username,32)
  57. opcount++
  58. pos+=format(opmsg[pos],511-pos,"%s^n",username)
  59. }
  60. }
  61. if(opcount==0) {
  62. opmsg="[Mei You Zai Xian VIP]"//We Do not display NO VIP
  63. set_task(0.1,"infoMessage",12345)
  64. return
  65. }

  66. }

  67. set_hudmessage(255,255,100,-1.0,0.10,4,0.5,HOLD_TIME,0.080,2.0,3)
  68. show_hudmessage(0,opmsg)
  69. new Float:freq_im = get_cvar_float("amx_freq_admin")
  70. if ( freq_im > 0.0 ) set_task( freq_im ,"infoMessage",12345)
  71. }
  72. else {
  73. set_hudmessage(g_Values[g_Current][0], g_Values[g_Current][1], g_Values[g_Current][2],
  74. X_POS, Y_POS, 2, 0.5, HOLD_TIME , 0.080, 2.0, 3)
  75. show_hudmessage(0,g_Messages[g_Current])
  76. client_print(0,print_console,g_Messages[g_Current])
  77. ++g_Current
  78. new Float:freq_im = get_cvar_float("amx_freq_admin")
  79. if ( freq_im > 0.0 ) set_task( freq_im ,"infoMessage",12345)
  80. }
  81. }

  82. public setMessage() {
  83. if (g_MessagesNum >= MAX_MESSAGES) {
  84. server_print("%L",LANG_SERVER,"INF_REACH")
  85. return PLUGIN_HANDLED
  86. }
  87. remove_task(12345)
  88. read_argv(1,g_Messages[g_MessagesNum],380)
  89. new hostname[64]
  90. get_cvar_string("hostname",hostname,63)
  91. replace(g_Messages[g_MessagesNum],380,"%hostname%",hostname)
  92. while(replace(g_Messages[g_MessagesNum],380,"\n","^n")){}
  93. new mycol[12]
  94. read_argv(2,mycol,11) // RRRGGGBBB
  95. g_Values[g_MessagesNum][2] = str_to_num(mycol[6])
  96. mycol[6] = 0
  97. g_Values[g_MessagesNum][1] = str_to_num(mycol[3])
  98. mycol[3] = 0
  99. g_Values[g_MessagesNum][0] = str_to_num(mycol[0])
  100. g_MessagesNum++
  101. new Float:freq_im = get_cvar_float("amx_freq_admin")
  102. if ( freq_im > 0.0 ) set_task( freq_im ,"infoMessage",12345)
  103. return PLUGIN_HANDLED
  104. }

  105. public plugin_end() {
  106. new lastinfo[8]
  107. num_to_str(g_Current,lastinfo,7)
  108. set_localinfo("lastinfomsg",lastinfo)
  109. }
复制代码
2# 点通粉丝
回复

使用道具 举报

 楼主| 发表于 2009-5-17 20:19:10 | 显示全部楼层 来自 江苏连云港
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2009-5-18 12:27:49 | 显示全部楼层 来自 吉林长春
前辈也这样 你在研究插件是我还在上初中吧 cs都不玩
回复

使用道具 举报

发表于 2009-5-18 18:06:30 | 显示全部楼层 来自 广东韶关
看看。。。。
回复

使用道具 举报

发表于 2009-5-18 18:09:02 | 显示全部楼层 来自 广西百色
貌似没明白怎么个 【滚动显示】法~
但是也纯支持的路过~
回复

使用道具 举报

发表于 2009-5-18 19:40:25 | 显示全部楼层 来自 湖北武汉
能说明下 什么权限显OP什么权限显VIP吗
回复

使用道具 举报

发表于 2009-5-18 20:48:21 | 显示全部楼层 来自 吉林长春
A权限op
B权限超级VIP
C权限vip
回复

使用道具 举报

发表于 2009-5-18 23:42:31 | 显示全部楼层 来自 广东深圳
呵呵,习惯就好。。。{:2_30:}
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表