Timer Problem
#5

Quote:
Originally Posted by yusei
Посмотреть сообщение
PHP код:
forward OneSecondTimer(playerid);
SetTimerEx("OneSecondTimer"1000false"i"playerid);
public 
OneSecondTimerplayerid)//
{
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
                    if(
Variable[i]>0)
                        {
                            
Variable[i]--;
                        }
                }
         }

i think the right one is this as will skip multiple players in one player:

PHP код:
forward OneSecondTimer(playerid);
SetTimerEx("OneSecondTimer"1000false"i"playerid);
public 
OneSecondTimerplayerid)//
{
if(
IsPlayerConnected(playerid))
{
if(
Variable[playerid]>0)
{
Variable[playerid]--;
}
}

Reply


Messages In This Thread
Timer Stops Working After Player Join. - by Admigo - 31.01.2013, 14:58
Re: Timer Problem - by Amora187 - 31.01.2013, 17:10
Re : Timer Problem - by yusei - 31.01.2013, 17:24
Re: Re : Timer Problem - by Amora187 - 31.01.2013, 17:31
Re: Re : Timer Problem - by Amora187 - 31.01.2013, 17:33
Re: Timer Problem - by Admigo - 31.01.2013, 18:02

Forum Jump:


Users browsing this thread: 2 Guest(s)