Task Sheulder - Problem

Въпроси и проблеми свързани с AMXModX.
Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Task Sheulder - Problem

Мнение от lantimilan » 06 Яну 2018, 11:37

Hello i have one problem with task scheulder i see when i restart server working but in later not working more , not read task for LIVE and not read maps for days and night , Oxicrom can you check or to creat same with ReAPI ?

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

Task Sheulder - Problem

Мнение от OciXCrom » 06 Яну 2018, 14:47

Attach che plugin along with your configuration...

Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Task Sheulder - Problem

Мнение от lantimilan » 07 Яну 2018, 00:15

I not have any special configuration just i use default , but i think if you can make for reapi or to edit to see where is problem

Код за потвърждение: Избери целия код

/* AMX Mod script. (Nov 10th, 2002)
*
* Task Scheduler 0.2
*  by JustinHoMi
*
* amx_task time "task" flags
* flags:
*  m - time is in minutes
*  s - time is in seconds
*  r - repeat task
*  t - specific time
*
*/

#include <amxmodx>

new task_cmds[32][108]
new task_times[32][16]
new numtasks = 0

public load_task()
{
	if (read_argc() < 4) {
		server_print("[AMX] Usage:  amx_task < time > ^"command^" < flags >")
		return PLUGIN_HANDLED
	}

	new args[128]
	read_args(args,128)
	new clock[6], cmd[108], flags[5]

	parse(args,clock,6,cmd,108,flags,5)
	new Float:time_f = floatstr(clock)

	new flag[2] = ""
	if (contain(flags,"r") != -1)
		flag="b"
	if (contain(flags,"m") != -1)
		time_f = time_f * 60

	if (contain(flags,"t") != -1)
	{
		copy(task_cmds[numtasks],108,cmd)
		copy(task_times[numtasks],6,clock)
		numtasks++
		return PLUGIN_HANDLED
	}

	set_task(time_f,"run_task",0,cmd,108,flag)

	return PLUGIN_CONTINUE
}

public run_task(cmd[])
{
	server_cmd(cmd)
	return PLUGIN_HANDLED
}

public check_time()
{
	new curtime[16]
	get_time("%H:%M",curtime,16)

	for(new i=0; i<numtasks; i++)
		if(equal(curtime,task_times[i]))
			server_cmd(task_cmds[i])

	return PLUGIN_CONTINUE
}

public plugin_init()
{
	register_plugin("Task Scheduler","0.2","JustinHoMi")
	register_srvcmd("amx_task","load_task")
	set_task(60.0,"check_time",1,"",0,"b")
	return PLUGIN_CONTINUE
}

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

Task Sheulder - Problem

Мнение от OciXCrom » 07 Яну 2018, 13:48

How can you not have configuration? Where are these "LIVE" and "map/days" settings? There is no ReAPI way to rewrite this as far as I know. The problem is most likely in where and how you wrote the commands.

Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Task Sheulder - Problem

Мнение от lantimilan » 18 Мар 2018, 09:14

Fixed close topic ;)

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Поддръжка / Помощ”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 12 госта