i have prolem using set_task to call a function and use userid in that
for example,i wrote like this
Code:
set_task(1.0,"abc",906912,"",0,b)
then the function abc will be called every second
then i worte abc like this
Code:
public abc()
{
client_print(0,print_chat,"haha");
}
then all players will see this message "haha"
but it' not enough
now i don't want everyone to see this message
instead,i add an array like this
er...yes,i want to set flag for every player
when g_iShow[userid] is 0
then the player won't see any message
but i just have trouble with this
how could i get the user's id in this function abc()??
like this?
Code:
public abc(id)
{
if (g_iShow(id)==0)
.....
}
but it won't work,"id "here will be set to the task's id,not user's id
or maybe this is impossible and i should try another way?
__________________