搜索
查看: 2857|回复: 8

[AMXX 带源码] 关于amx_maxrounds.sma问题。

[复制链接]
发表于 2011-11-25 16:47:56 | 显示全部楼层 |阅读模式 来自 中国–安徽–宿州
  1. #include <amxmodx>
  2. #include <cstrike>

  3. new round_count
  4. new cvar_maxrounds

  5. public plugin_init()
  6. {
  7.     register_plugin("autorestart", "0.1", "Landyhsu")
  8.     register_logevent("event_round_end", 2, "1=Round_End")

  9.     cvar_maxrounds    =    register_cvar("amx_maxrounds", "50")
  10.       
  11. }

  12. public event_round_end()
  13. {
  14.     round_count++

  15.     if ( round_count >= get_pcvar_num(cvar_maxrounds) )
  16.     {
  17.         round_count = 0
  18.         client_print(0, print_chat, "[末日ㄨ皇朝] 自动刷新服务器...")

  19.                set_task(4.0,"restart1")
  20.                     //set_task(7.0,"restart2")
  21.                     //set_task(10.0,"restart3")
  22.                     set_task(13.0,"restart4")
  23.     }
  24. }  

  25. public restart1()
  26. {
  27.         client_print( 0, print_chat, "[末日ㄨ皇朝] 刷新成功!")
  28.         server_cmd ("sv_restartround 1")
  29. }
  30. public restart2()
  31. {
  32.         //client_print( 0, print_chat, "Server restart 2")
  33.         //server_cmd ("sv_restartround 2")
  34. }
  35. public restart3()
  36. {
  37.         //client_print( 0, print_chat, "Server restart 3")
  38.         //server_cmd ("sv_restartround 3")
  39. }
  40. public restart4()
  41. {
  42.         client_print( 0, print_chat, "末日ㄨ皇朝 中国CS1.6战队!!")
  43.         client_print( 0, print_chat, "[社区论坛] www.fj58.cn")
  44.         client_print( 0, print_chat, "[玩家交流Q群] 49922570")
  45.         client_print( 0, print_chat, "[制作人] 太子")
  46.         remove_task(0)
  47. }
复制代码
 楼主| 发表于 2011-11-25 16:49:38 | 显示全部楼层 来自 中国–安徽–宿州
这我在论坛里找到 服务器刷新插件。但是不能编译。求高手给看看怎么回事。还有这个插件怎么用的。
回复

使用道具 举报

发表于 2011-11-25 23:09:51 | 显示全部楼层 来自 中国–内蒙古–呼和浩特
你把错误发上来让大家看啊,不然怎么能知道你是哪错误的啊
回复

使用道具 举报

 楼主| 发表于 2011-11-25 23:37:42 | 显示全部楼层 来自 中国–安徽–宿州
能看到图么

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2011-11-26 14:19:00 | 显示全部楼层 来自 中国–安徽–宿州
来个人给看看吧- -
回复

使用道具 举报

 楼主| 发表于 2011-11-27 09:59:08 | 显示全部楼层 来自 中国–安徽–宿州
求人来给看看这个代码···
回复

使用道具 举报

 楼主| 发表于 2011-11-28 10:24:02 | 显示全部楼层 来自 中国–安徽–宿州
来人帮帮忙··
回复

使用道具 举报

发表于 2011-11-29 10:00:19 | 显示全部楼层 来自 中国–四川–成都
本帖最后由 homework 于 2011-11-29 10:07 编辑

这并不是没编译成功,是编译成功了的,只是源码里面 25 28行 有格式错误,没关系的,可以使用。

你可以用 AMXX-STUDIO 工具 缩进一下就下。

这是弄好的,编译不会警告了。


源码里面有广告,请自行更换或清楚,请保留原作者信息,养成好习惯,尊重他们人劳动成果。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2011-11-29 12:30:32 | 显示全部楼层 来自 中国–安徽–宿州
8# homework
嗯。。谢谢你了。。
回复

使用道具 举报

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

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