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);
GangZoneFlashForAll(Zone,COLOR_ATTACK);
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;
}
}
else
{
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
Dupa ce am scos tCheck-ul, la fiecare team se captureaza Turful 1, dar bugurile de sus nu mai exista...