Race Arena - Is the length of this going to be a problem?
#1

I'd just like to know if the length of this is going to be a problem. If it is I'll shorten it. If it makes no difference I'll continue. But it's kinda scary because it's already getting to 20k lines...

pawn Код:
if(MonsterCheckpoint[playerid] == 1)
{
    SetPlayerCheckpoint(playerid,-1423.6999500,1043.1999500,1029.5000000);
    MonsterCheckpoint[playerid] = 2;
    EnteredCheckpoint1[playerid] = RacingTime[playerid];
    if(Player1[RaceRoom[playerid]] == playerid)
    {
        if(EnteredCheckpoint1[playerid] < EnteredCheckpoint1[Player2[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos1[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos2[RaceRoom[playerid]] = Player2[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos3[RaceRoom[playerid]] = Player2[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos4[RaceRoom[playerid]] = Player2[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos5[RaceRoom[playerid]] = Player2[RaceRoom[playerid]];
            }
        }
        else if(EnteredCheckpoint1[playerid] == EnteredCheckpoint1[Player2[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player2[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos5[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
        }
        if(EnteredCheckpoint1[playerid] < EnteredCheckpoint1[Player3[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos1[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos2[RaceRoom[playerid]] = Player3[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos3[RaceRoom[playerid]] = Player3[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos4[RaceRoom[playerid]] = Player3[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos5[RaceRoom[playerid]] = Player3[RaceRoom[playerid]];
            }
        }
        else if(EnteredCheckpoint1[playerid] == EnteredCheckpoint1[Player3[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player3[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos5[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
        }
        if(EnteredCheckpoint1[playerid] < EnteredCheckpoint1[Player4[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos1[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos2[RaceRoom[playerid]] = Player4[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos3[RaceRoom[playerid]] = Player4[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos4[RaceRoom[playerid]] = Player4[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos5[RaceRoom[playerid]] = Player4[RaceRoom[playerid]];
            }
        }
        else if(EnteredCheckpoint1[playerid] == EnteredCheckpoint1[Player4[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player4[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos5[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
        }
        if(EnteredCheckpoint1[playerid] < EnteredCheckpoint1[Player5[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos1[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos2[RaceRoom[playerid]] = Player5[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos3[RaceRoom[playerid]] = Player5[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos4[RaceRoom[playerid]] = Player5[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]]; RacePos5[RaceRoom[playerid]] = Player5[RaceRoom[playerid]];
            }
        }
        else if(EnteredCheckpoint1[playerid] == EnteredCheckpoint1[Player5[RaceRoom[playerid]])
        {
            if(RacePos1[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos2[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos2[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos2[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos3[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos3[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos3[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos4[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos4[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
            else if(RacePos4[RaceRoom[playerid]] == Player5[RaceRoom[playerid]] && RacePos5[RaceRoom[playerid]] == Player1[RaceRoom[playerid]])
            {
                RacePos5[RaceRoom[playerid]] = Player1[RaceRoom[playerid]];
            }
        }
    }
It does this for each player where it sais if(Player1[RaceRoom[playerid]] == playerid; - There are 5 players..
Reply
#2

Shouldn't be a problem.
Reply
#3

Quote:
Originally Posted by jakejohnsonusa
Посмотреть сообщение
Shouldn't be a problem.
Sweet!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)