转F出错,重启前自动转F插件
#include <amxmodx>#include <amxmisc>
#include <engine>
#define PLUGIN "Auto ChangeServer"
#define VERSION "1.0"
#define AUTHOR "HXH"
new a=0
new last_temp, temp, temp_line
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public server_frame()
{
temp_line = ""
get_time("%H:%M:%S", temp, 63)
if(a == 0)
{
last_temp = temp
a = 1
}
else if(!equal(last_temp, temp))
{
new szFile = fopen("addons/amxmodx/configs/ACS.ini", "rt")
new Buffer, file_time, file_ip
while(!feof(szFile))
{
fgets(szFile, Buffer, 255)
if((strlen(Buffer) < 2) || Buffer == ';')
continue
parse(Buffer, file_time, 63, file_ip, 63)
if(!equal(file_time, temp)) continue
doAction(file_ip)
}
fclose(szFile)
last_temp = temp
}
}
doAction(ip[])
{
for(new i = 0; i < 33 ; i++)
if(is_user_connected(i) || is_user_connecting(i))
client_cmd(i, "connect ^"%s^"", ip)
}是不是代码出现问题了?在增加的时间上,自动转不进指定服务器?
页:
[1]