SA-MP Forums Archive
[Ajuda] GangZone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] GangZone (/showthread.php?tid=509001)



GangZone - D3M0LISH3R - 24.04.2014

estava testando as gzs do meu servidor e achei um bug ex:
se eu entrar com os groves ir no territуrio dos ballas dominar domina certinho,mas se a gang dos ballas estiver dominada,e eu mudar pra gang dos ballas e passar no cp domina sem contagem.


Re: GangZone - PT - 25.04.2014

mostra o code da parte disso.

Sem source e dificil ajudar.


Re: GangZone - D3M0LISH3R - 25.04.2014

Quote:
Originally Posted by PT
Посмотреть сообщение
mostra o code da parte disso.

Sem source e dificil ajudar.
pawn Код:
public ZoneCheckpointChecker()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i))continue;
        if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= 14 &&
            //sгo 11 checkpoints, entгo mude se for colocar mais...
            gzcolor[CPS_GetPlayerCheckpoint(i)-1] != gzcolorteam[gangteam[i]])
        {
            if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
            {
            if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 5)
        {
        for(new j; j < MAX_PLAYERS; j++)
        {
        if(gangteam[j] == CPS_GetPlayerCheckpoint(i)-1)
            GameTextForPlayer(j, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~y~A base do ~g~seu time ~y~esta sendo ~r~dominada~y~!", 4000, 4);
        }
        }
                cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
                new tmp[10];
                format(tmp, sizeof tmp, "~r~%2d/15", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
                GameTextForPlayer(i, tmp, 1001, 4);
                GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, gzcolorteam[gangteam[i]]);
            } else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 15) //passou 30 segundos dentro do checkpoint
            {
                GameTextForPlayer(i, "~w~Area Dominada", 4000, 1);
                gzcolor[CPS_GetPlayerCheckpoint(i)-1] = gzcolorteam[gangteam[i]];
                GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
                GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
                GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, gzcolor[gangteam[i]]);
                new str[256];
                format(str, 256, "[GangZone] - Os '%s' invadiram e dominaram mais um territуrio!", pgangnames[gangteam[i]][0]);
                SendClientMessageToAll(0xFFFFFFFF, str);
            }
        }
}
}
pawn Код:
public OnPlayerLeaveCheckpoint(playerid)
{
    new checkpointid = lastcp[playerid];
    if(checkpointid > 0 && checkpointid <= 2)
    {
        cpzone[playerid][checkpointid] = 0; //saiu do CP...
        GangZoneStopFlashForAll(checkpointid-1);
    }
    return 1;
}



Re: GangZone - araorn - 25.04.2014

mas voce nao definiu uma contagem para isso .-. como quer que domine com contagem entao


Re: GangZone - hard_dalzot - 25.04.2014

quanta desorganizaзгo hein maninho... chaves fora de ordem assim fica dificil de ver algo


Re: GangZone - N3XTMapper - 25.04.2014

What ?

pawn Код:
} else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 15) //passou 30 segundos dentro do checkpoint
Acho que й 15 segundos ;---;