Just a little fix:
When you're gonna add a task for a player, add
id+SOMENUMBERS and at your function,
id -= SAMENUMBERS.
Your code didn't work because you hadn't an id in your task while you added
(id) at your function. The compiler readed
Code:
switch(cs_get_user_team(0))
Code:
set_task(Float:time, "function")
Code:
public function()
{
}
This is the right way without an id.
Code:
set_task(Float:time, "function", id+20310)
ID example: 12
12+20310 = 20322
Code:
public function(id)
{
id -= 20310
}
23022 - 20310 = 12
This is the right way with an id.
I recommend you always use a constant or define for set a task, it will be good if you want remove that task whenever you want even without an id. I mean:
Code:
const TASK_1 = 20310
or
Code:
#define TASK_1 20310
Code:
set_task(Float:time, "function", id+TASK_1)
Code:
public function(id)
{
id -= TASK_1
}
__________________