Rulzy老大还得麻烦你了,谢谢。
弄了这么久还是没有搞惦,技术太菜了。麻烦你为你加上那个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")
}
回复: Rulzy老大还得麻烦你了,谢谢。
#include <amxmodx>public plugin_init(){
register_plugin( "restart", "1.0", "yyy")
........
}
public client_disconnect(id)
{
if (task_exists(34343443)) return PLUGIN_CONTINUE;
new count=0;
new maxplayers=get_maxplayers();
for(new i=1;i<=maxplayers;i++)
{
if(is_user_connecting(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", 34343443)
}
return PLUGIN_CONTINUE
}
public rround()
{
server_cmd("sv_restartround 1")
}
回复: Rulzy老大还得麻烦你了,谢谢。
:d: ,万分感谢。
页:
[1]