搜索
查看: 1697|回复: 2

Rulzy老大还得麻烦你了,谢谢。

[复制链接]
发表于 2007-6-27 08:56:33 | 显示全部楼层 |阅读模式 来自 中国–广西–柳州–城中区
弄了这么久还是没有搞惦,技术太菜了。麻烦你为你加上那个task判断吧,谢谢了。
#include <amxmodx>
public plugin_init(){
register_plugin( "restart", "1.0", "yyy");
}
public client_disconnect(){
new count=0;
new maxplayers=get_maxplayers();
for(new i=1;i<=maxplayers;i++)
{
if(is_user_disconnect(i)) count++;
}
if(count>=8)
{
set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)
show_hudmessage(0,"restart")
set_task(5.0, "rround")
}
}
public rround()
{
server_cmd("sv_restartround 1")
}  
发表于 2007-6-30 03:46:48 | 显示全部楼层 来自 中国–福建–漳州

回复: Rulzy老大还得麻烦你了,谢谢。

  1. #include <amxmodx>
  2. public plugin_init(){
  3.     register_plugin( "restart", "1.0", "yyy")
  4.     ........
  5. }
  6. public client_disconnect(id)
  7. {
  8.     if (task_exists(34343443)) return PLUGIN_CONTINUE;
  9.     new count=0;
  10.     new maxplayers=get_maxplayers();
  11.     for(new i=1;i<=maxplayers;i++)
  12.     {
  13.         if(is_user_connecting(i)) count++;
  14.     }
  15.     if(count>=8)
  16.     {
  17.         set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)
  18.         show_hudmessage(0,"restart")
  19.         set_task(5.0, "rround", 34343443)
  20.     }
  21.     return PLUGIN_CONTINUE
  22. }
  23. public rround()
  24. {
  25.     server_cmd("sv_restartround 1")
  26. }
复制代码
回复

使用道具 举报

 楼主| 发表于 2007-6-30 09:27:16 | 显示全部楼层 来自 中国–广西–柳州–城中区

回复: Rulzy老大还得麻烦你了,谢谢。

:d: ,万分感谢。
回复

使用道具 举报

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

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