22.02.2015, 18:03
heyllo there
is this ok with above 20 players ? make no lag ?
is this ok with above 20 players ? make no lag ?
Код:
new TotalCheck[MAX_PLAYERS]; // on top
TotalCheck[playerid] = SetTimerEx("CheckTime", 1000, 1, "i", playerid); /// this will create onplayerconnect
// this is somewhere
function CheckTime(playerid) the function will loop every 1 second
{
PlayerInfo[playerid][Sec] ++;
if(PlayerInfo[playerid][Sec]>=60)
{
PlayerInfo[playerid][Min]++;
PlayerInfo[playerid][Sec]=0;
}
if(PlayerInfo[playerid][Min]>=60)
{
PlayerInfo[playerid][Min]=0;
PlayerInfo[playerid][Hour]++;
}
// and many other codes
return 1;
}
KillTimer(TotalCheck[playerid]); // this will run onplayerdisconnect

