PHP код:
public Fresh()
{
foreach(new i : Player)
{
if(PlayerInfo[i][pNarcoLomka] > 0) { new ttt = random(2); if(ttt == 1) { ApplyAnimation(i, "CRACK", "crckdeth1", 4.0, 0, 0, 1, 1, 1); } else { ApplyAnimation(i, "CRACK", "crckdeth3", 4.0, 0, 0, 1, 1, 1); } }
InitLockDoors(i);
PlayerInfo[i][pGun51Time] -= 1;
PlayerInfo[i][pGunaviaTime] -= 1;
PlayerInfo[i][pGunfbiTime] -= 1;
PlayerInfo[i][pGunlspdTime] -= 1;
if(GetPVarInt(i, "AntiBreik") > 0) SetPVarInt(i, "AntiBreik", GetPVarInt(i, "AntiBreik") - 1);
}
AntiCheats();
new string[180];
new hour, minute, second;
gettime(hour, minute, second);
new tmphour;
new tmpminute;
new tmpsecond;
if(war > 0) war -=1;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
format(string, sizeof(string), "Сейчас времени %d:00 часов",tmphour);
BroadCast(COLOR_WHITE,string);
ghour = tmphour;
PayDay();
foreach(new i : Player)
{
PlayerInfo[i][pPayDay]+=1;
}
if (realtime)
{
SetWorldTime(tmphour);
}
}
foreach(new i : Player)
{
if(Works[i] == true && JobCP[i] == 2)
{
if(usemesh[i] == 1)
{
mesh[i] +=1;
}
}
if(Flood[i] > 0) Flood[i] -=1;
if(clearanim[i] > 0) clearanim[i] --;
if(hour >= 12 && minute == 10 && second == 0) startaddiction[i] = 1;
DeletePVar(i, "NoAB");
if(PlayerEx[i][VarEx] ==0)
{
if(clearanim[i] == 0)
{
ApplyAnimation(i, "CARRY", "crry_prtial",4.0,0,0,0,0,0,1);
}
}
if(PlayerInfo[i][pDrugtime] > 0) PlayerInfo[i][pDrugtime] = PlayerInfo[i][pDrugtime] - 1;
if(PlayerInfo[i][pMuteTime] > 0 && PlayerInfo[i][pMuted] == 1)
{
PlayerInfo[i][pMuteTime] -= 1;
if(PlayerInfo[i][pMuteTime] == 0)
{
PlayerInfo[i][pMuted] = 0;
SendClientMessage(i,COLOR_LIGHTRED, "Вам включили чат. Пожалуйста соблюдайте правила");
}
}
if(PlayerInfo[i][pCheat] == 1)
{
new inters = GetPlayerInterior(i);
new worlds = GetPlayerVirtualWorld(i);
if(inters != 18 && worlds != 10)
{
if(!PlayerToPoint(6.0,i,-219.7144,1410.6461,27.7734))
{
SetPlayerInterior(i, 18);
SetPlayerPos(i,-219.7144,1410.6461,27.7734);
SetPlayerFacingAngle(i, 276.6526);
SetPlayerVirtualWorld(i, 1);
}
}
}
if(PlayerInfo[i][pJailed] > 0)
{
if(PlayerInfo[i][pJailTime] > 0)
{
PlayerInfo[i][pJailTime]--;
}
if(PlayerInfo[i][pJailTime] <= 0)
{
if(PlayerInfo[i][pJailed] == 1)
{
if(PlayerInfo[i][pMestoJail] == 1)
{
SetPlayerInterior(i, 0);
SetPlayerPos(i,1553.4962,-1675.2714,16.1953);
SetPlayerFacingAngle(i, 95.0636);
}
if(PlayerInfo[i][pMestoJail] == 2)
{
SetPlayerInterior(i, 0);
SetPlayerPos(i,-1607.1873,721.3649,12.2721);
SetPlayerFacingAngle(i, 2.3026);
}
if(PlayerInfo[i][pMestoJail] == 3)
{
SetPlayerInterior(i, 0);
SetPlayerPos(i,2334.8467,2454.9456,14.9688);
SetPlayerFacingAngle(i, 115.7874);
}
}
else if(PlayerInfo[i][pJailed] == 4)
{
SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000);
SetPlayerInterior(i, 0);
SetPlayerPos(i, 90.2101,1920.4854,17.9422);
}
PlayerInfo[i][pJailTime] = 0;
PlayerInfo[i][pJailed] = 0;
SendClientMessage(i, COLOR_ISPOLZUY, "Вы заплатили свой долг обществу, теперь вы свободны!");
PlayerInfo[i][pMestoJail] = 0;
WantedLevel[i] = 0;
WantedTime[i] = 0;
PlayerInfo[i][pWantedLevel] = 0;
WantedPoints[i] = 0;
SetPlayerWantedLevel(i, 0);
SetPlayerVirtualWorld(i, 0);
GameTextForPlayer(i,"~g~Freedom", 5000, 1);
}
}
if(BusStopTime[i] <= 11 && BusStopTime[i] >= 1)
{
BusStopTime[i]--;
format(string,sizeof(string), "~n~~n~~b~%d", BusStopTime[i] - 1);
GameTextForPlayer(i, string, 2000, 6);
}
if(JobCarTime[i] <= 16 && JobCarTime[i] >= 1)
{
JobCarTime[i]--;
format(string,sizeof(string), "~r~%d",JobCarTime[i] - 1);
GameTextForPlayer(i, string, 2000, 6);
}
if(JobCarTime[i] == 1)
{
if(AutoBusJob[i] == 1)
{
PlayerInfo[i][pCash] += AutoBusCheck[i] *(32 + random(2));
format(string, sizeof(string), "Вы закончили свой рабочий день. Заработано %d вирт", AutoBusCheck[i] *(32 + random(2)));
SendClientMessage(i, 0x26BF99AA, string);
SendClientMessage(i, COLOR_WHITE, "Деньги будут перечислены на ваш счёт во время зарплаты");
Delete3DTextLabel(fare3dtext[i]);
AutoBusJob[i] = 0;
AutoBusCheck[i] = 0;
AutoBusMoney[i] = 0;
DisablePlayerRaceCheckpoint(i);
}
}
if(PlayerTazeTime[i] >= 1)
{
PlayerTazeTime[i] += 1;
if(PlayerTazeTime[i] == 15)
{
PlayerTazeTime[i] = 0;
TogglePlayerControllable(i, 1);
}
else
{
TogglePlayerControllable(i, 1);
}
}
if(Tazer[i] == 1)
{
if(TazerTime[i] <= 0)
{
Tazer[i] = 0;
TogglePlayerControllable(i, 1);
}
else
{
TazerTime[i] -= 1;
}
}
if(TieTime[i] > 0) TieTime[i]--;
if(PlayerCuffed[i] == 1)
{
if(PlayerCuffedTime[i] <= 0)
{
TogglePlayerControllable(i, 1);
PlayerCuffed[i] = 0;
PlayerCuffedTime[i] = 0;
PlayerTazeTime[i] = 1;
}
else
{
PlayerCuffedTime[i] -= 1;
}
}
if(PlayerCuffed[i] == 2)
{
if(PlayerCuffedTime[i] <= 0)
{
TogglePlayerControllable(i, 1);
PlayerCuffed[i] = 0;
PlayerCuffedTime[i] = 0;
}
else
{
PlayerCuffedTime[i] -= 1;
}
}
}
if(hour == 04 && minute == 48 && second == 00)
{
OOCOff(COLOR_REDD, "Внимание! Рестарт сервера через 2 минуты!");
SaveAccounts();
SaveMaterials();
SaveGZ();
OnPropUpdate();
SaveKvartir();
SavePodeezd();
SaveProperty();
SaveAvto();
SaveBizz();
ABroadCast(COLOR_LIGHTRED, "Всё сохранено",6);
}
if(hour == 00 && minute == 00 && second == 00)
{
mysql_query("UPDATE `accounts` SET pChas = '0',pMin = '0',pOnlineLid = '00:00'");
foreach(new i : Player)
{
PlayerInfo[i][pChas] = 0;
PlayerInfo[i][pMin] = 0;
strmid(PlayerInfo[i][pOnlineLid],"00:00", 0, strlen("00:00"), 255);
}
}
else if(hour == 04 && minute == 50 && second == 00)
{
OOCOff(COLOR_REDD, "Внимание! Происходит Рестарт сервера!");
SendRconCommand("gmx");
}
if(hour == 13 && minute == 10 || hour == 14 && minute == 10 || hour == 16 && minute == 10 || hour == 22 && minute == 10 )
{
if(PaintballRound == 1)
{
format(string, sizeof(string), "Внимание! Начало пейнтболла через 5 минут. Место проведения: военный завод K.A.A.C.");
OOCOff(0xFFAAFFAA,string);
SetTimer("StartPaintball", 300000, 0);
PaintballRound = 0;
}
}
return true;
}
вот собственно тут несколько циклов,если обьеденить все в 1 цикл,перестают работать некоторые функции