Gang zone prevent to capture again
#5

Alright, you have to set the owner of the turf AFTER the player has captured it, so following your code it would be

pawn Код:
public GolfTurfT(playerid)
{
    TurfOwner[GolfZone] = playerid;
    GangZoneStopFlashForAll(GolfZone);
    GivePlayerMoney(playerid, 9000);
}
And then check before the player initiates capturing

pawn Код:
if(checkpointid == GolfCP)
    {
   
    if(TurfOwner[GolfZone] == playerid)
           return 1;

    SetTimerEx("GolfTurfT",9000,0,"i",playerid);
    GangZoneShowForAll(GolfZone,GetPlayerColor(playerid)); //Old color 0xFF71B896
    GangZoneFlashForAll(GolfZone,(playerid));
    }
Consider making protection, if there's more than one person in the turf it will be captured for both.
Reply


Messages In This Thread
Gang zone prevent to capture again - by davve95 - 08.02.2014, 18:53
Re: Gang zone prevent to capture again - by CuervO - 08.02.2014, 18:57
Re: Gang zone prevent to capture again - by ross8839 - 08.02.2014, 19:26
Re: Gang zone prevent to capture again - by davve95 - 08.02.2014, 19:45
Re: Gang zone prevent to capture again - by CuervO - 08.02.2014, 19:56
Re: Gang zone prevent to capture again - by davve95 - 09.02.2014, 13:53
Re: Gang zone prevent to capture again - by CuervO - 10.02.2014, 03:36
Re: Gang zone prevent to capture again - by davve95 - 10.02.2014, 15:37
Re: Gang zone prevent to capture again - by davve95 - 13.02.2014, 14:23
Re: Gang zone prevent to capture again - by Lordzy - 13.02.2014, 15:46

Forum Jump:


Users browsing this thread: 1 Guest(s)