Checkpointid
#9

Okay, I have this:
pawn Код:
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == A51CP || checkpointid == AIRCP || checkpointid ==  DESCP || checkpointid ==  FOCCP)
    {
        ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($2500)\nArmor ($3000)\nKnife ($500)\nChainsaw ($1000)\nDeagle ($1500)\nCombat Shotgun ($3500)\nMP5 ($2000)\nM4 ($3500)\nKatana ($1000)", "Buy", "Cancel");
    }
    else if(checkpointid == BigEarCP || checkpointid ==  SnakeCP || checkpointid ==  TeeMotelCP || checkpointid ==  OilCP)
    {
        new string[128], pZone;
        if(GangInfo[checkpointid][gAttacked] == 1) return SendClientMessage(playerid, C_RED, "The zone is being captured!");
        if(GangInfo[checkpointid][gOwner] == gTeam[playerid]) return SendClientMessage(playerid, C_LBLUE, "Your team owns this zone.");
       
        GangInfo[checkpointid][gAttacked] = 1;
       
        if(IsPlayerInDynamicArea(playerid, BigEarArea))
        {
            GangZoneFlashForAll(BigEarZone, GetPlayerGangColor(playerid));
            pZone = BigEarArea;
        }
        else if(IsPlayerInDynamicArea(playerid, SnakeArea))
        {
            GangZoneFlashForAll(SnakeZone, GetPlayerGangColor(playerid));
            pZone = SnakeArea;
        }
        else if(IsPlayerInDynamicArea(playerid, TeeMotelArea))
        {
            GangZoneFlashForAll(TeeMotelZone, GetPlayerGangColor(playerid));
            pZone = TeeMotelArea;
        }
        else if(IsPlayerInDynamicArea(playerid, OilArea))
        {
            GangZoneFlashForAll(OilZone, GetPlayerGangColor(playerid));
            pZone = OilArea;
        }
       
        PlayerCount[playerid] = 30;
        PlayerCountTimer[playerid] = SetTimerEx("GangCount", 1000, true, "iii", playerid,  checkpointid, pZone);
        format(string, sizeof(string), "[ZONE] %s is being taken over!", GetZoneName(checkpointid));
        SendClientMessageToAll(C_LGREEN, string);
    }
    return 1;
}
And:
pawn Код:
forward GangCount(playerid, checkpointid, zonename);
public GangCount(playerid, checkpointid, zonename)
{
    new time[16];
    format(time, sizeof(time), "~g~%i..", PlayerCount[playerid]);
    GameTextForPlayer(playerid, time, 1000, 3);
   
    PlayerCount[playerid] --;
    if(PlayerCount[playerid] == 0)
    {
        SendClientMessageToAll(C_GREY, "debug");// this is being sent ingame
        GangInfo[checkpointid][gAttacked] = 0;
        GangInfo[checkpointid][gOwner] = gTeam[playerid];
       
        GangZoneStopFlashForAll(zonename);
        GangZoneShowForAll(zonename, GetPlayerGangColor(playerid));
   
        KillTimer(PlayerCountTimer[playerid]);
    }
    return 1;
}
But the zone won't stop flashing, what's the problem?
Reply


Messages In This Thread
Checkpointid - by Dan. - 28.07.2012, 17:00
Re: Checkpointid - by ReVo_ - 28.07.2012, 17:25
Re: Checkpointid - by Dan. - 28.07.2012, 19:22
Re: Checkpointid - by SuperViper - 28.07.2012, 19:58
Re: Checkpointid - by Dan. - 28.07.2012, 20:17
Re: Checkpointid - by Arca - 28.07.2012, 20:33
Re: Checkpointid - by Dan. - 29.07.2012, 07:55
Re: Checkpointid - by [MM]RoXoR[FS] - 29.07.2012, 08:42
Re: Checkpointid - by Dan. - 29.07.2012, 08:50
Re: Checkpointid - by [MM]RoXoR[FS] - 29.07.2012, 09:52

Forum Jump:


Users browsing this thread: 3 Guest(s)