1st Q. What is the most efficient way of seting the first set_task?
Example 1.
PHP Code:
public plugin_init()
{
set_task ( 20.0, "Taskworker", 50, "", 0);
}
public firsTtask(id)
{
// code here..
}
public Taskworker ()
{
new players[32], numplayers, id;
get_players ( players, numplayers );
for ( new i=0; i<numplayers; i++ ) {
id=players[i];
firsTtask( id );
}
}
or
Example 2.
PHP Code:
public client_putinserver(id)
{
set_task(15.0,"firsTtask",id)
}
public firsTtask(id)
{
// code here..
}
2nd Q. what is an less resource hungry method to flip an switch?
using an bool variable per client or introducing an new client cvar?