SA-MP Forums Archive
Capture Gangzone Little suggestion. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Capture Gangzone Little suggestion. (/showthread.php?tid=406672)



Capture Gangzone Little suggestion. - Sanady - 11.01.2013

Hello everyone.I get one small problem on my capture gangzone script.When player from Team 1 capturing territory.Player with Team 2 enter to his CP and how he enter he fast escape from CP and capturing stopped.I don`t know how to fix it.Can anyone helps me??

Code:
pawn Код:
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
    if(checkpointid == LSDPCP)
    {
        if(UnderAttack[playerid] == 1)
        {
            GangZoneStopFlashForAll(LSDPZone);
            UnderAttack[playerid] = 0;
            KillTimer(Timer1);
            SendClientMessageToAll(0xFFFFFFFF, "{00D5FF}[TURF] "embed_white"Capturing turf {FFD900}Pershing Square "embed_white" has been stopped!");
        }
    }
    //SetCameraBehindPlayer(playerid);
    return 1;
}



Re: Capture Gangzone Little suggestion. - Sanady - 11.01.2013

Anyone can helps me?


Re: Capture Gangzone Little suggestion. - [KHK]Khalid - 11.01.2013

You can create a variable (i.e. new BeingCaptured;) and set it to 1 when a gangzone is being captured, so you can prevent players from capturing a gangzone that is already being captured.


Re: Capture Gangzone Little suggestion. - hydravink - 11.01.2013

Try checking the teams, I don't see you checking them so this means anyone can stop the attack.
I'm not sure how to do it tho :\


Re: Capture Gangzone Little suggestion. - Sanady - 11.01.2013

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
You can create a variable (i.e. new BeingCaptured;) and set it to 1 when a gangzone is being captured, so you can prevent players from capturing a gangzone that is already being captured.
ye ye ye...Thanks for idea.