Gangwar attack problem
#6

Here is the majority of the codes, one thing I noticed:
If I remove tCheck from that code the bugs are resolved but now at every team it captures turf 1.

Код:
forward SetZone(playerid);
public SetZone(playerid)
{
   new string[128];
   SetPlayerScore(playerid, GetPlayerScore(playerid) + ZoneInfo[tCheck[playerid]][zEXP]);
   PlayerInfo[playerid][pScore] += ZoneInfo[tCheck[playerid]][zEXP];
   GivePlayerMoney(playerid, ZoneInfo[tCheck[playerid]][zMoney]);
    PlayerInfo[playerid][pMoney] += ZoneInfo[tCheck[playerid]][zMoney];
   PlayerInfo[playerid][pTurfs]++;
   format(string, sizeof(string), "INFO:{FFFFFF} Gangzone captured, +%d EXP points and %d$.", ZoneInfo[tCheck[playerid]][zEXP], ZoneInfo[tCheck[playerid]][zMoney]);
   SendClientMessage(playerid, COLOR_GREY, string);
   UnderAttack[tCheck[playerid]] = 0;
   KillTimer(timer[playerid]);
   SetGangZone(playerid);
   return 1;
}



forward SetGangZone(playerid);
public SetGangZone(playerid)
{
   new string[128];
   GangZoneShowForAll(Zone[tCheck[playerid]],GetTeamZoneColor(playerid));
   format(string, sizeof string, "GANGZONE:{FFFFFF} %s has captured the %s for %s.", GetName(playerid), ZoneInfo[tCheck[playerid]][zName], GetTeamName(playerid));
    SendClientMessageToAll(orange, string);
   GangZoneStopFlashForAll(Zone[tCheck[playerid]]);
   ZoneInfo[tCheck[playerid]][zTeam] = gTeam[playerid];
   SaveZone(tCheck[playerid]);
   return 1;
}
Код:
new tCheck[MAX_PLAYERS];
Код:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
   new Float:Pos[3];
   GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
   if(Pos[0] > minx && Pos[0] < maxx && Pos[1] > miny && Pos[1] < maxy) return 1;
   else return 0;
}
Reply


Messages In This Thread
Gangwar attack problem - by Blaconix - 10.04.2015, 23:10
Re : Gangwar attack problem - by KillerDVX - 11.04.2015, 00:47
Re: Re : Gangwar attack problem - by Blaconix - 11.04.2015, 12:22
Re: Gangwar attack problem - by Blaconix - 12.04.2015, 07:57
Re: Gangwar attack problem - by R0 - 12.04.2015, 08:00
Re: Gangwar attack problem - by Blaconix - 12.04.2015, 08:19
Re: Gangwar attack problem - by Blaconix - 12.04.2015, 15:10

Forum Jump:


Users browsing this thread: 2 Guest(s)