Вопрос про паблик
#8

PHP код:
public Fresh()
{
    foreach(new 
Player)
    {
        if(
PlayerInfo[i][pNarcoLomka] > 0) { new ttt random(2); if(ttt == 1) { ApplyAnimation(i"CRACK""crckdeth1"4.000111); } else { ApplyAnimation(i"CRACK""crckdeth3"4.000111); } }
        
InitLockDoors(i);
        
PlayerInfo[i][pGun51Time] -= 1;
        
PlayerInfo[i][pGunaviaTime] -= 1;
        
PlayerInfo[i][pGunfbiTime] -= 1;
        
PlayerInfo[i][pGunlspdTime] -= 1;
        if(
GetPVarInt(i"AntiBreik") > 0SetPVarInt(i"AntiBreik"GetPVarInt(i"AntiBreik") - 1);
    }
    
AntiCheats();
    new 
string[180];
    new 
hourminutesecond;
    
gettime(hourminutesecond);
    new 
tmphour;
    new 
tmpminute;
    new 
tmpsecond;
    if(
war 0war -=1;
    
gettime(tmphourtmpminutetmpsecond);
    
FixHour(tmphour);
    
tmphour shifthour;
    if ((
tmphour ghour) || (tmphour == && ghour == 23))
    {
        
format(stringsizeof(string), "Сейчас времени %d:00 часов",tmphour);
        
BroadCast(COLOR_WHITE,string);
        
ghour tmphour;
        
PayDay();
        foreach(new 
Player)
        {
            
PlayerInfo[i][pPayDay]+=1;
        }
        if (
realtime)
        {
            
SetWorldTime(tmphour);
        }
    }
    foreach(new 
Player)
    {
        if(
Works[i] == true && JobCP[i] == 2)
        {
            if(
usemesh[i] == 1)
            {
                
mesh[i] +=1;
            }
        }
        if(
Flood[i] > 0Flood[i] -=1;
        if(
clearanim[i] > 0clearanim[i] --;
        if(
hour >= 12 && minute == 10 && second == 0startaddiction[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] > 0PlayerInfo[i][pDrugtime] = PlayerInfo[i][pDrugtime] - 1;
        if(
PlayerInfo[i][pMuteTime] > && 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(i18);
                    
SetPlayerPos(i,-219.7144,1410.6461,27.7734);
                    
SetPlayerFacingAngle(i276.6526);
                    
SetPlayerVirtualWorld(i1);
                }
            }
        }
            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(i0);
                            
SetPlayerPos(i,1553.4962,-1675.2714,16.1953);
                            
SetPlayerFacingAngle(i95.0636);
                        }
                        if(
PlayerInfo[i][pMestoJail] == 2)
                        {
                            
SetPlayerInterior(i0);
                            
SetPlayerPos(i,-1607.1873,721.3649,12.2721);
                            
SetPlayerFacingAngle(i2.3026);
                        }
                        if(
PlayerInfo[i][pMestoJail] == 3)
                        {
                            
SetPlayerInterior(i0);
                            
SetPlayerPos(i,2334.8467,2454.9456,14.9688);
                            
SetPlayerFacingAngle(i115.7874);
                        }
                    }
                    else if(
PlayerInfo[i][pJailed] == 4)
                    {
                        
SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000);
                        
SetPlayerInterior(i0);
                        
SetPlayerPos(i90.2101,1920.4854,17.9422);
                    }
                    
PlayerInfo[i][pJailTime] = 0;
                    
PlayerInfo[i][pJailed] = 0;
                    
SendClientMessage(iCOLOR_ISPOLZUY"Вы заплатили свой долг обществу, теперь вы свободны!");
                    
PlayerInfo[i][pMestoJail] = 0;
                    
WantedLevel[i] = 0;
                    
WantedTime[i] = 0;
                    
PlayerInfo[i][pWantedLevel] = 0;
                    
WantedPoints[i] = 0;
                    
SetPlayerWantedLevel(i0);
                    
SetPlayerVirtualWorld(i0);
                    
GameTextForPlayer(i,"~g~Freedom"50001);
                }
            }
            if(
BusStopTime[i] <= 11 && BusStopTime[i] >= 1)
            {
                
BusStopTime[i]--;
                
format(string,sizeof(string), "~n~~n~~b~%d"BusStopTime[i] - 1);
                
GameTextForPlayer(istring20006);
            }
            if(
JobCarTime[i] <= 16 && JobCarTime[i] >= 1)
            {
                
JobCarTime[i]--;
                
format(string,sizeof(string), "~r~%d",JobCarTime[i] - 1);
                
GameTextForPlayer(istring20006);
            }
            if(
JobCarTime[i] == 1)
            {
                if(
AutoBusJob[i] == 1)
                {
                    
PlayerInfo[i][pCash] += AutoBusCheck[i] *(32 random(2));
                    
format(stringsizeof(string), "Вы закончили свой рабочий день. Заработано %d вирт"AutoBusCheck[i] *(32 random(2)));
                    
SendClientMessage(i0x26BF99AAstring);
                    
SendClientMessage(iCOLOR_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(i1);
                }
                else
                {
                    
TogglePlayerControllable(i1);
                }
            }
            if(
Tazer[i] == 1)
            {
                if(
TazerTime[i] <= 0)
                {
                    
Tazer[i] = 0;
                    
TogglePlayerControllable(i1);
                }
                else
                {
                    
TazerTime[i] -= 1;
                }
            }
            if(
TieTime[i] > 0TieTime[i]--;
            if(
PlayerCuffed[i] == 1)
            {
                if(
PlayerCuffedTime[i] <= 0)
                {
                    
TogglePlayerControllable(i1);
                    
PlayerCuffed[i] = 0;
                    
PlayerCuffedTime[i] = 0;
                    
PlayerTazeTime[i] = 1;
                }
                else
                {
                    
PlayerCuffedTime[i] -= 1;
                }
            }
            if(
PlayerCuffed[i] == 2)
            {
                if(
PlayerCuffedTime[i] <= 0)
                {
                    
TogglePlayerControllable(i1);
                    
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 
Player)
        {
            
PlayerInfo[i][pChas] = 0;
            
PlayerInfo[i][pMin] = 0;
            
strmid(PlayerInfo[i][pOnlineLid],"00:00"0strlen("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(stringsizeof(string), "Внимание! Начало пейнтболла через 5 минут. Место проведения: военный завод K.A.A.C.");
            
OOCOff(0xFFAAFFAA,string);
            
SetTimer("StartPaintball"3000000);
            
PaintballRound 0;
        }
    }
    return 
true;

вот собственно тут несколько циклов,если обьеденить все в 1 цикл,перестают работать некоторые функции
Reply


Messages In This Thread
Вопрос про паблик - by Dragunovje - 24.03.2014, 08:21
Re: Вопрос про паблик - by pozitiv4eg - 24.03.2014, 08:55
Re: Вопрос про паблик - by Jon_De - 24.03.2014, 11:58
Re: Вопрос про паблик - by Dragunovje - 24.03.2014, 13:45
Re: Вопрос про паблик - by OKStyle - 24.03.2014, 15:08
Re: Вопрос про паблик - by Dragunovje - 24.03.2014, 15:35
Re: Вопрос про паблик - by Alexander_Petrov - 24.03.2014, 17:18
Re: Вопрос про паблик - by Dragunovje - 25.03.2014, 15:17
Re: Вопрос про паблик - by Alexander_Petrov - 25.03.2014, 15:40
Re: Вопрос про паблик - by Dragunovje - 25.03.2014, 15:41

Forum Jump:


Users browsing this thread: 1 Guest(s)