Gang Zones Capture Help
#1

Hello,
I've created captureable gang zones with Gang Zones Maker by Jarnu
but when i am captured it the gang zones colours aren't changed
help me pls
Here OnPlayerEnterDynamicCP :
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
     if(checkpointid == CP[CluckinBell])
     {
         if(UnderAttack[CluckinBell] == 1)
         {
             SendClientMessage(playerid, 0xFF0000FF,"[CluckinBell]:This CluckinBell Zones is being captured !");
         }
         else if(gTeam[playerid] == tCP[CluckinBell])
         {
             SendClientMessage(playerid, 0xFF0000FF,"[CluckinBell]:This CluckinBell Zones is being captured !");
         }
         else if(gTeam[playerid] == TEAM_NONE)
         {
             SendClientMessage(playerid, 0xFF0000FF,"[CluckinBell]:You have no team so you cannot capture!");
         }
         else
         {
            UnderAttack[CluckinBell] = 1;
            timer[playerid][CluckinBell] = SetTimerEx("SetCaptureZone", 25000, false,"i",playerid);
            CountTime[playerid] = SetTimerEx("CountDown", 1, false,"i", playerid);
            iCP[playerid] = CluckinBell;
            InCP[playerid][CluckinBell] = 1;
            Captured[CluckinBell] = 0;
            new string[128], name[MAX_PLAYER_NAME+1];
            GetPlayerName(playerid, name, sizeof(name));
            if(gTeam[playerid] == TEAM_GROVE)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_GROVE_COLOR);
                format(string, sizeof(string),"[CluckinBell]:Player %s is trying to capture the CluckinBell Zones ! | Team - Grove |",name);
                SendClientMessageToAll(COLOR_YELLOW, string);
            }
            else if(gTeam[playerid] == TEAM_BALLAS)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_BALLAS_COLOR);
                format(string, sizeof(string),"[CluckinBell]:Player %s is trying to capture the CluckinBell Zones ! | Team - Ballas |",name);
                SendClientMessageToAll(COLOR_YELLOW, string);
            }
            else if(gTeam[playerid] == TEAM_VAGOS)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_VAGOS_COLOR);
                format(string, sizeof(string),"[CluckinBell]:Player %s is trying to capture the CluckinBell Zones ! | Team - Vagos |",name);
                SendClientMessageToAll(COLOR_YELLOW, string);
            }
            else if(gTeam[playerid] == TEAM_AZTECAS)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_AZTECAS_COLOR);
                format(string, sizeof(string),"[CluckinBell]:Player %s is trying to capture the CluckinBell Zones ! | Team - Aztecas |",name);
                SendClientMessageToAll(COLOR_YELLOW, string);
            }
         }
    }
    return 1;
}
OnPlayerLeaveDynamicCP:
pawn Код:
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
    if(checkpointid == CP[CluckinBell])
    {
       if(Captured[CluckinBell] == 1)
       {
            GangZoneStopFlashForAll(Zone[CluckinBell]);
            UnderAttack[CluckinBell] = 0;
            InCP[playerid][CluckinBell] = 0;
            tCP[CluckinBell] = gTeam[playerid];
            if(gTeam[playerid] == TEAM_GROVE)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_GROVE_COLOR);
            }
            else if(gTeam[playerid] == TEAM_BALLAS)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_BALLAS_COLOR);
            }
            else if(gTeam[playerid] == TEAM_VAGOS)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_VAGOS_COLOR);
            }
            else if(gTeam[playerid] == TEAM_AZTECAS)
            {
                GangZoneFlashForAll(Zone[CluckinBell], TEAM_AZTECAS_COLOR);
            }
            KillTimer(timer[playerid][CluckinBell]);
            KillTimer(CountTime[playerid]);
       }
       else if(Captured[CluckinBell] == 0)
       {
           SendClientMessage(playerid, COLOR_RED,"[CluckinBell]:You've leave the Capture Checkpoint ! Capture = Failed !");
           UnderAttack[CluckinBell] = 0;
           InCP[playerid][CluckinBell] = 0;
           GangZoneStopFlashForAll(Zone[CluckinBell]);
           KillTimer(timer[playerid][CluckinBell]);
           KillTimer(CountTime[playerid]);
       }
    }
    return 1;
}
SetCaptureZones :
pawn Код:
forward SetCaptureZone(playerid);
public SetCaptureZone(playerid)
{
     if(iCP[playerid] == CluckinBell)
     {
         SetPlayerScore(playerid, GetPlayerScore(playerid)+5);
         GivePlayerMoney(playerid, 2500);
         SendClientMessage(playerid, COLOR_ORANGE,"[CluckinBell]:You've captured CluckinBell ! Rewards : 5 Scores and 2500 Cashs!");
         tCP[CluckinBell] = gTeam[playerid];
         if(gTeam[playerid] == TEAM_GROVE)
         {
             GangZoneFlashForAll(Zone[CluckinBell], TEAM_GROVE_COLOR);
         }
         else if(gTeam[playerid] == TEAM_BALLAS)
         {
             GangZoneFlashForAll(Zone[CluckinBell], TEAM_BALLAS_COLOR);
         }
         else if(gTeam[playerid] == TEAM_VAGOS)
         {
             GangZoneFlashForAll(Zone[CluckinBell], TEAM_VAGOS_COLOR);
         }
         else if(gTeam[playerid] == TEAM_AZTECAS)
         {
             GangZoneFlashForAll(Zone[CluckinBell], TEAM_AZTECAS_COLOR);
         }
         GangZoneStopFlashForAll(Zone[CluckinBell]);
         Captured[CluckinBell] = 1;
         KillTimer(CountTime[playerid]);
         KillTimer(timer[playerid][CluckinBell]);
     }
     return 1;
}
Reply
#2

Where is Cord of that gang like :

Код:
 Zone[SNAKE] = GangZoneCreate(-62.5000000000005,2318.359375,23.4375,2390.625);
Reply
#3

mine is made my jarnu capture code script

https://sampforum.blast.hk/showthread.php?tid=470598

download my gm and copy
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)