Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Checkpoint problem rep+

$
0
0
Server got crashed when player enter this first cp

Code:

forward OnPlayerEnterDynamicCP(playerid, checkpointid);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
//////////////////////////////THIS CP///////////////////////////////
          if(checkpointid == PlantbombCP)
        {
            if(gTeam[playerid] == C1 && (BombPlanted == 1))
                {
                    DefuseTimer = SetTimerEx("DefuseBomb", 10000, false, "is", playerid);
                    Defusing = 1;
                    GameTextForAll("~b~Army is trying to defuse the bomb!!~n~~r~Terrorists, Try to stop them!", 3000, 3);
                    return 1;
                }
                else return 0;
        }

//////////////////////////////////////////////////////////////////
    if(checkpointid == CP[CAPZONE])
    {
        if(UnderAttack[CAPZONE] == 0)
        {
            if(tCP[CAPZONE] != gTeam[playerid])
            {
                CountVar[playerid][CAPZONE] = 25;
                ActiveCAPZONE(playerid);

            } else return SendClientMessage(playerid, COLOR_RED,"*This zone is already captured by your team!");
        } else return CaptureZoneMessage(playerid, 2);
    }



    if(checkpointid == CP[SNAKE])
    {
        if(UnderAttack[SNAKE] == 0)
        {
            if(tCP[SNAKE] != gTeam[playerid])
            {
                CountVar[playerid][SNAKE] = 25;
                ActiveSNAKE(playerid);

            } else return SendClientMessage(playerid, COLOR_RED,"*This zone is already captured by your team!");
        } else return CaptureZoneMessage(playerid, 2);
    }

    if(checkpointid == CP[OLD])
    {
        if(UnderAttack[OLD] == 0)
        {
            if(tCP[OLD] != gTeam[playerid])
            {
                CountVar[playerid][OLD] = 25;
                ActiveOLD(playerid);

            } else return SendClientMessage(playerid, COLOR_RED,"*This zone is already captured by your team!");
        } else return CaptureZoneMessage(playerid, 2);
    }

    if(checkpointid == CP[Factory])
    {
        if(UnderAttack[Factory] == 0)
        {
            if(tCP[Factory] != gTeam[playerid])
            {
                CountVar[playerid][Factory] = 25;
                ActiveFactory(playerid);

            } else return SendClientMessage(playerid, COLOR_RED,"*This zone is already captured by your team!");
        } else return CaptureZoneMessage(playerid, 2);
    }

    if(checkpointid == CP[Town])
    {
        if(UnderAttack[Town] == 0)
        {
            if(tCP[Town] != gTeam[playerid])
            {
                CountVar[playerid][Town] = 25;
                ActiveTown(playerid);

            } else return SendClientMessage(playerid, COLOR_RED,"*This zone is already captured by your team!");
        } else return CaptureZoneMessage(playerid, 2);
    }
    return 1;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>