Server lag...?
#8

The script is 2995 Lines (Not much i know,i started working on 12/12...)

This is a small part of the ZoneUpdate (The function to take over turfs).

pawn Код:
public ZoneUpdate()
{
    for(new z=0; z < MAX_ZONES; z++)
    {
        if(ZoneTakeOverTeam[z] == -1)
        {
            for(new t=0; t < MAX_TEAMS; t++)
            {
                if(t == ZoneInfo[z][z_team]) continue;
                if(GetMembersInZone(z, t) >= 4)
                {
                    ZoneTakeOverTeam[z] = t;
                    GangZoneFlashForAll(ZoneInfo[z][z_id], GetTeamColor(t));
                    ZoneTakeOverTime[z] = 0;
                }
            }
        }
        else
        {
            if(GetMembersInZone(z, ZoneTakeOverTeam[z]) > 0)
            {
                ZoneTakeOverTime[z]++;
                if(ZoneTakeOverTime[z] >= 120)
                {
                    GangZoneStopFlashForAll(ZoneInfo[z][z_id]);
                    GangZoneShowForAll(ZoneInfo[z][z_id], GetTeamColor(ZoneTakeOverTeam[z]));
                    ZoneInfo[z][z_team] = ZoneTakeOverTeam[z];
                    for(new i=0; i<MAX_PLAYERS; i++)
                    {
                        if(IsPlayerConnected(i))
                        {
                            if(GetPlayerZone(i) == z && gTeam[i] == ZoneTakeOverTeam[z])
                            {
                                SetPlayerScore(i, GetPlayerScore(i) + 2);
                                GameTextForPlayer(i, "~g~Turf ~r~taken over~n~~b~~h~", 6000, 3);
                            }
                        }
                    }
                    ZoneTakeOverTeam[z] = -1;
                    ZoneTakeOverTime[z] = 0;
                }
            }
            else
            {
                ZoneTakeOverTeam[z] = -1;
                GangZoneStopFlashForAll(ZoneInfo[z][z_id]);
                ZoneTakeOverTime[z] = 0;
            }
        }
    }
}
This are the timers for the IRC ECHO BOTS:

pawn Код:
SetTimerEx("IRC_ConnectDelay", 20000, 0, "d", 1);
SetTimerEx("IRC_ConnectDelay", 25000, 0, "d", 2);
This is the loop for AntiCheat:

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
Reply


Messages In This Thread
Server lag...? - by Face9000 - 22.12.2010, 18:51
Re: Server lag...? - by Sinner - 22.12.2010, 19:33
Re: Server lag...? - by Hal - 22.12.2010, 19:52
Re: Server lag...? - by Face9000 - 22.12.2010, 20:11
Re: Server lag...? - by Mauzen - 22.12.2010, 20:14
Re: Server lag...? - by Face9000 - 22.12.2010, 20:17
Re: Server lag...? - by Mauzen - 22.12.2010, 20:27
Re: Server lag...? - by Face9000 - 22.12.2010, 20:39
Re: Server lag...? - by Mauzen - 23.12.2010, 11:39
Re: Server lag...? - by Face9000 - 23.12.2010, 11:42

Forum Jump:


Users browsing this thread: 4 Guest(s)