Jump to content
  • 0

Problema attack turf



Salut, momentan lucrez la un gamemode TDM cu sistem de turfuri.


Am incercat sa fac comanda de attack pentru GM dar are niste buguri naspa:
- Cand incerc sa dau attack nu verifica pe ce turf sunt deci pe fiecare turf merg, in timp ce sunt in Grove, spune ca turful e deja capturat (ala fiind turful 1..), chiar daca sunt pe alte turfuri
- Daca schimb echipa si dau attack pe un turf random, nu stiu cum dar ataca fiecare turf (flash-uiesc) si il capturez pe ultimul de 24 de ori (daca am 24 de turfuri il captureaza pe al 24-lea sau al 23-lea si tot asa)
Turful pe care il capturez se opreste din flash-uit dar celelalte continua

Asta e comanda de attack:

CMD:attack(playerid, params[])
    for(new i = 0; i < MAX_ZONES; i++)
    if (IsPlayerInArea(playerid, ZoneInfo[zMinX], ZoneInfo[zMaxX], ZoneInfo[zMinY], ZoneInfo[zMaxY]))
        new string[128];
            if(ZoneInfo[zTeam] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"ERROR:{FFFFFF} Your team is the current holder of this zone.");
            if(UnderAttack == 1) return SendClientMessage(playerid, COLOR_RED,"ERROR:{FFFFFF} Somebody is already attacking this zone.");
            if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED,"ERROR:{FFFFFF} You can't capture zones while being in a vehicle.");
            UnderAttack = 1;
            timer[playerid] = SetTimerEx("SetZone", 30000, false, "i", playerid);
            format(string, sizeof(string), "INFO:{FFFFFF} You're currently attacking the %s, stay in it the marker for 30 seconds to take it over.", ZoneInfo[zName]);
            SendClientMessage(playerid, COLOR_GREY, string);
            format(string, sizeof(string), "GANGZONE:{FFFFFF} %s is under attack!", ZoneInfo[zName]);
            SendClientMessageToAll(orange, string);
            tCheck[playerid] = i;
    new string[128];
    format(string, sizeof(string), "GANGZONE:{FFFFFF} Nu esti pe vreun turf!");
    SendClientMessageToAll(COLOR_RED, string);
    return 1;

Din cate am vazut daca scot tCheck-ul pare ca se rezolva primul bug dar nu stiu mai departe  :P

Dupa ce am scos tCheck-ul, la fiecare team se captureaza Turful 1, dar bugurile de sus nu mai exista...

Edited by Blaconix
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.