Is there any better way to do this without using 3 set tasks?
Note each user has 3 personal channels
PHP Code:
new UserChannelUsed[33][3]
public FunctionCalled(id)
{
if(!UserChannelUsed[id][0])
{
send message id, channel 0
UserChannelUsed[id][0] = true
set_task(1.5, "reset-channel0", id)
}
else if(!UserChannelUsed[id][1])
{
send message id, channel 1
UserChannelUsed[id][1] = true
set_task(1.5, "reset-channel1", id)
}
else if(!UserChannelUsed[id][2])
{
UserChannelUsed[id][2] = true
send message id, channel 2
set_task(1.5, "reset-channel2", id)
}
else return
}
public reset-channel0(id)
{
UserChannelUsed[id][0] = false
}
public reset-channel1(id)
{
UserChannelUsed[id][1] = false
}
public reset-channel2(id)
{
UserChannelUsed[id][2] = false
}