Gang Zone

Započeo SHadow, Maj 25, 2010, 14:58:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovako,imam 2 komande vezane za gang zone.prva je /takeover kojom se prvi put zauzima gang zona a druga je /capture koja preuzima od nekog tu gang zonu koja je vec preuzeta,i htio bih sad kad netko zauzme gang zonu mora je imat u posjedu 15min kako bi dobio drogu,matse itd...evo kako to izgleda

if(strcmp(cmd, "/takeover", true) == 0)
{
        if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859) || PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6||PlayerInfo[playerid][pMember] == 11||PlayerInfo[playerid][pLeader] == 11
            ||PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12||PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13||PlayerInfo[playerid][pMember] == 16||PlayerInfo[playerid][pLeader] == 16)
            {
              SendClientMessageToAll(COLOR_RED, " Gang zona je zauzeta,i borba zavrsava za 10min ! ");
                    if (PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
                    {
                        Materijali = GangZoneCreate(2114.500000, -2357.658935, 2258.500000, -2189.658935);
                      GangZoneShowForPlayer(playerid, Materijali, 0xFFFF00AA);
                      format(string,sizeof(string), " %s je zauzeo Materijal Zonu! ", sendername);
      SendClientMessageToAll(COLOR_RED, string);
      SetTimer("RacketOver", 600000, 0);
                    }
                    if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859))
                    {
                        Droga = GangZoneCreate(2110.686767, -1752.192871, 2214.686767, -1624.192871);
                    GangZoneShowForPlayer(playerid, Droga,0xFFFFFFAA);
                    format(string,sizeof(string), " %s je zauzeo Droga Zonu! ", sendername);
      SendClientMessageToAll(COLOR_RED, string);
      SetTimer("RacketOver", 600000, 0);
                    }
            }
            else
            {
SendClientMessage(playerid, COLOR_RED, " ** Nisi u bandi/mafiji !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, " ** Nisi na mjestu za zauzimanje Gang zone ! **");
}
return 1;
    }
    if(strcmp(cmd, "/capture", true) == 0)
{
    if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859) || PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
        {
        if (RacketsTime == 1)// ako je gang zone vec /takeover -ana
{
    for(new i = 0; i < MAX_PLAYERS; i++)
{
  if (PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
      {
          Materijali = GangZoneCreate(2114.500000, -2357.658935, 2258.500000, -2189.658935);
            GangZoneShowForPlayer(playerid, Materijali, 0xFFFF00AA);
              format(string,sizeof(string), " %s je preuzeo Materijal Zonu i mora je branit iducih 10min! ", sendername);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimer("RacketOver", 600000, 0);
                    }
      if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859))
        {
          Droga = GangZoneCreate(2110.686767, -1752.192871, 2214.686767, -1624.192871);
            GangZoneShowForPlayer(playerid, Droga,0xFFFFFFAA);
              format(string,sizeof(string), " %s je preuzeo Droga Zonu i mora ju branit iducih 10min! ", sendername);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimer("RacketOver", 600000, 0);
      }
            }
        }
        }
    return 1;
}

i na kraju runde ovo se dobije:
public RacketOver()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
RacketsTime = 0;
GivePlayerMoney(i, 50000);
SendClientMessage(i, COLOR_GREEN, " Dobio si $50 000, 3000 materijala, 100 grama droge i nesto oruzja !");
GivePlayerWeapon(i, 23, 80);
GivePlayerWeapon(i, 29, 2000);
PlayerInfo[i][pMats] += 3000;
PlayerInfo[i][pDrugs] += 100;
GangZoneDestroy(Materijali);
GangZoneDestroy(Droga);
}
}


e sad mi se javlja ovaj problem.Kada netko zauzme gang zonu,i ja preuzmem od njega,nakon zavrsetka runde svi koji su imali bar 1 u posjedu gang zonu dobiju nagrade,a ja bi htio da samo dobije onaj ko je u posjedu kad runda zavrsi znaci 1 osoba,a ovako svi koji su jednom zauzeli dobiju nagrade...
PLS Hitno je
Hvala!!!

if(strcmp(cmd, "/takeover", true) == 0)
{
       if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859) || PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
       {
           GetPlayerName(playerid, sendername, sizeof(sendername));
           if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3||PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6||PlayerInfo[playerid][pMember] == 11||PlayerInfo[playerid][pLeader] == 11
           ||PlayerInfo[playerid][pMember] == 12||PlayerInfo[playerid][pLeader] == 12||PlayerInfo[playerid][pMember] == 13||PlayerInfo[playerid][pLeader] == 13||PlayerInfo[playerid][pMember] == 16||PlayerInfo[playerid][pLeader] == 16)
           {
            SendClientMessageToAll(COLOR_RED, " Gang zona je zauzeta,i borba zavrsava za 10min ! ");
                   if (PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
                   {
                       Materijali = GangZoneCreate(2114.500000, -2357.658935, 2258.500000, -2189.658935);
                    GangZoneShowForPlayer(playerid, Materijali, 0xFFFF00AA);
                    format(string,sizeof(string), " %s je zauzeo Materijal Zonu! ", sendername);
      SendClientMessageToAll(COLOR_RED, string);
      SetTimerEx("RacketOver", 600000, false, "i", playerid);
                   }
                   if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859))
                   {
                       Droga = GangZoneCreate(2110.686767, -1752.192871, 2214.686767, -1624.192871);
                    GangZoneShowForPlayer(playerid, Droga,0xFFFFFFAA);
                    format(string,sizeof(string), " %s je zauzeo Droga Zonu! ", sendername);
      SendClientMessageToAll(COLOR_RED, string);
      SetTimerEx("RacketOver", 600000, false, "i", playerid);
                   }
           }
           else
           {
SendClientMessage(playerid, COLOR_RED, " ** Nisi u bandi/mafiji !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, " ** Nisi na mjestu za zauzimanje Gang zone ! **");
}
return 1;
   }
   if(strcmp(cmd, "/capture", true) == 0)
{
   if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859) || PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
       {
        if (RacketsTime == 1)// ako je gang zone vec /takeover -ana
{
   for(new i = 0; i < MAX_PLAYERS; i++)
{
  if (PlayerToPoint(3, playerid, 2173.1785,-2263.6768,13.3423))
      {
        Materijali = GangZoneCreate(2114.500000, -2357.658935, 2258.500000, -2189.658935);
          GangZoneShowForPlayer(playerid, Materijali, 0xFFFF00AA);
            format(string,sizeof(string), " %s je preuzeo Materijal Zonu i mora je branit iducih 10min! ", sendername);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimerEx("RacketOver", 600000, false, "i", playerid);
      }
    if (PlayerToPoint(3, playerid, 2163.5618,-1675.0001,15.0859))
        {
          Droga = GangZoneCreate(2110.686767, -1752.192871, 2214.686767, -1624.192871);
            GangZoneShowForPlayer(playerid, Droga,0xFFFFFFAA);
            format(string,sizeof(string), " %s je preuzeo Droga Zonu i mora ju branit iducih 10min! ", sendername);
SendClientMessageToAll(COLOR_YELLOW, string);
SetTimerEx("RacketOver", 600000, false, "i", playerid);
    }
           }
        }
       }
  return 1;
}
public RacketOver(playerid)
{
RacketsTime = 0;
GivePlayerMoney(playerid, 50000);
SendClientMessage(playerid, COLOR_GREEN, " Dobio si $50 000, 3000 materijala, 100 grama droge i nesto oruzja !");
GivePlayerWeapon(playerid, 23, 80);
GivePlayerWeapon(playerid, 29, 2000);
PlayerInfo[playerid][pMats] += 3000;
PlayerInfo[playerid][pDrugs] += 100;
GangZoneDestroy(Materijali);
GangZoneDestroy(Droga);
}



Tako nekako bi trebalo bit
Poslednja Izmena: Maj 25, 2010, 15:52:17 POSLE PODNE od Misko

meni samo treba da kad zavrsi runda da dobiju one osobe koje su u posjedu gang zone,a ovako ako prvi netko zauzme,pa zatim drugi preuzme od njega tu gang zonu na kraju runde obojica dobiju nagrade jer sad nagradu dobiva svatko ko je bar 1 preuzeo gang zonu,a to necu nego ocu da dobije nagradu samo onaj ko je u posjedu gang  zone 10min...

If(PlayerIsInArea :) To koristi i stavi si koordinate gang zone koja je zauzeta.
Respekt: [H]265, John, [03]Garsino, LordShigi, Dujma, Carlsson, Randy, Jacobs, Hu5o, Toni, Lukas, Curtis, Ivo, Hawks, Jack, Koksildo, gonss

Haha OMG => http://zaslike.com/files/9rd5urq94yqagvdsx3i.png [ovo nema nigdje]