example of how to get the id of the task and how to kill a task
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Set task"
#define VERSION "1.0"
#define AUTHOR "L//"
#define TASK_TIMER 2000
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say test", "test")
register_clcmd("say block", "block_task")
}
public test(id)
{
new param[1]
param[0] = id
set_task(2.0, "send_say", TASK_TIMER, param, 1)
client_print(id, print_chat, "Say sent")
return PLUGIN_HANDLED
}
public block_task()
{
remove_task(TASK_TIMER)
client_print(0, print_chat, "Say blocked")
return PLUGIN_HANDLED
}
public send_say(param[])
{
new id = param[0]
client_print(id, print_chat, "Say received")
}