Is this the correct way of doing this? This is my first time using the parameters in set_task. Searched for help but none of them has help out. Correct my codes. Thanks in advance.
PHP Code:
#define TASK_ONE 574397
public function1(victim, attacker)
{
new args[1]
args[0] = attacker
set_task(10.0, "function2", player+TASK_ONE, args, 1)
}
public function2(taskid, args[])
{
static player
player = (taskid - TASK_ONE)
new attacker = args[0]
}
or this
PHP Code:
#define TASK_ONE 574397
public function1(victim, attacker)
{
new args[2]
args[0] = victim
args[1] = attacker
set_task(10.0, "function2", TASK_ONE, args, 2)
}
public function2(args[])
{
new victim = args[0]
new attacker = args[1]
}
Most likely the 2nd one works but I want to use remove_task on ONLY ONE player.