Payday check
#1

Hi, I was wondering if there is better method than using a 1 sec global timer for paycheck

Код:
task GlobalTimer[1000]()
{
	new H, M, S;
	gettime(H, M, S);
	
    foreach(new i: Player)
    {
        if(!PlayerInfo[i][IsLoggedIn]) continue;
       
		if(M == 0 && S == 0)
		{
		    if(PlayerInfo[i][pConnectedTime] >= 25)
		    {
		    	// If the player have at least 25 minutes played during the entire hour.
		    	PlayerInfo[i][pConnectedTime] = 0;
			}
			else
			{		
				// If not SendErrorMessage
			}
		}
		else if(S == 0)
		{
			// Add +1 each minutes
		    if(PlayerInfo[i][pConnectedTime] < 25)
		    {
		        ++PlayerInfo[i][pConnectedTime];
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
Payday check - by vernz - 06.01.2017, 00:05
Re: Payday check - by BiosMarcel - 06.01.2017, 00:10
Re: Payday check - by vernz - 06.01.2017, 00:11
Re: Payday check - by BiosMarcel - 06.01.2017, 00:15
Re: Payday check - by vernz - 06.01.2017, 00:17
Re: Payday check - by ISmokezU - 06.01.2017, 00:23
Re: Payday check - by BiosMarcel - 06.01.2017, 00:24
Re: Payday check - by vernz - 06.01.2017, 00:30
Re: Payday check - by BiosMarcel - 06.01.2017, 00:37
Re: Payday check - by vernz - 06.01.2017, 00:53

Forum Jump:


Users browsing this thread: 1 Guest(s)