[Pomoc] Checkpoint

Započeo Hitman, Septembar 06, 2011, 10:59:24 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: GF (Edit)
Detaljan opis problema: Napravio sam posao sa checkpointima i aktiviram posao i kroz prva dva CPa proÄ'em a kroz treći neželi proć
Dio skripte:


if(PlayerInfo[playerid][pKosenje] > 0)
    {
        if(PlayerToPoint(2.0, playerid,1304.5387,-2426.5969,9.8728))//cp1
        {
            if(PlayerInfo[playerid][pKosenje] == 1)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])//tu stavite id od vozila za kosenje
      {
                           PlayerInfo[playerid][pKosenje] = 2;// dodajemo vrijednost da se slucajno ne pogodi isti cp
                           SetPlayerCheckpoint(playerid,1286.8820,-2425.5981,10.3643,2.0);//
  }
            }
        }
        if(PlayerToPoint(2.0, playerid,1286.8820,-2425.5981,10.3643))//cp2
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 3;//
                           SetPlayerCheckpoint(playerid,1196.9468,-2400.7808,11.2110,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1196.9468,-2400.7808,11.2110))//cp3
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 4;//
                           SetPlayerCheckpoint(playerid,1246.2391,-2421.1382,10.8368,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1246.2391,-2421.1382,10.8368))//cp4
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 5;//
                           SetPlayerCheckpoint(playerid,1176.2085,-2360.8552,12.5175,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1176.2085,-2360.8552,12.5175))//cp5
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 6;//
                           SetPlayerCheckpoint(playerid,1198.5245,-2354.7522,13.3856,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1198.5245,-2354.7522,13.3856))//cp6
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 7;//
                           SetPlayerCheckpoint(playerid,1217.5978,-2316.6528,14.4010,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1217.5978,-2316.6528,14.4010))//cp7
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 8;//
                           SetPlayerCheckpoint(playerid,1246.1892,-2280.0127,13.5026,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1246.1892,-2280.0127,13.5026))//cp8
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 9;//
                           SetPlayerCheckpoint(playerid,1282.7023,-2282.7271,13.1725,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1282.7023,-2282.7271,13.1725))//cp9
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 10;//
                           SetPlayerCheckpoint(playerid,1306.0740,-2286.9492,13.5203,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1306.0740,-2286.9492,13.5203))//cp10
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 11;//
                           SetPlayerCheckpoint(playerid,1259.3185,-2308.1731,13.0345,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1259.3185,-2308.1731,13.0345))//cp11
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 12;//
                           SetPlayerCheckpoint(playerid,1233.7283,-2339.2085,14.2697,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1233.7283,-2339.2085,14.2697))//cp12
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 13;//
                           SetPlayerCheckpoint(playerid,1198.9869,-2327.8259,14.7051,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1198.9869,-2327.8259,14.7051))//cp13
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 14;//
                           SetPlayerCheckpoint(playerid,1150.6616,-2357.0837,12.3239,2.0);//
  }
            }
}
        if(PlayerToPoint(2.0, playerid,1150.6616,-2357.0837,12.3239))//cp n-zi
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 0;//
                           DisablePlayerCheckpoint(playerid);
                           SendClientMessage(playerid, COLOR_GREEN ,"*kosenje uspjesno zavrseno");
                          GivePlayerMoney(playerid, 250);
                           SendClientMessage(playerid, COLOR_GREEN ,"Pokosili ste travu i zaradili 250$ !");
  }
            }
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //

Pogledaj Code krivo si radio evo sad cu ti oznacit :
prva dva si dobro napravio a dalje si zabrljao..
      CP2 valja
if(PlayerToPoint(2.0, playerid,1286.8820,-2425.5981,10.3643))//cp2
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
                  {
                           PlayerInfo[playerid][pKosenje] = 3;//
                           SetPlayerCheckpoint(playerid,1196.9468,-2400.7808,11.2110,2.0);//
                 }
            }
      }
      if(PlayerToPoint(2.0, playerid,1196.9468,-2400.7808,11.2110))//cp3
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//   Tu ti je greska
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
                  {
                           PlayerInfo[playerid][pKosenje] = 4;//
                           SetPlayerCheckpoint(playerid,1246.2391,-2421.1382,10.8368,2.0);//
                 }
            }
      }
      if(PlayerToPoint(2.0, playerid,1246.2391,-2421.1382,10.8368))//cp4
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//Tu ti je greska
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
                  {
                           PlayerInfo[playerid][pKosenje] = 5;//
                           SetPlayerCheckpoint(playerid,1176.2085,-2360.8552,12.5175,2.0);//
                 }
            }
      }
Fix :
if(PlayerInfo[playerid][pKosenje] > 0)
    {
        if(PlayerToPoint(2.0, playerid,1304.5387,-2426.5969,9.8728))//cp1
        {
            if(PlayerInfo[playerid][pKosenje] == 1)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])//tu stavite id od vozila za kosenje
      {
                           PlayerInfo[playerid][pKosenje] = 2;// dodajemo vrijednost da se slucajno ne pogodi isti cp
                           SetPlayerCheckpoint(playerid,1286.8820,-2425.5981,10.3643,2.0);//
  }
            }
        }
        if(PlayerToPoint(2.0, playerid,1286.8820,-2425.5981,10.3643))//cp2
        {
            if(PlayerInfo[playerid][pKosenje] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 3;//
                           SetPlayerCheckpoint(playerid,1196.9468,-2400.7808,11.2110,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1196.9468,-2400.7808,11.2110))//cp3
        {
            if(PlayerInfo[playerid][pKosenje] == 3)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 4;//
                           SetPlayerCheckpoint(playerid,1246.2391,-2421.1382,10.8368,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1246.2391,-2421.1382,10.8368))//cp4
        {
            if(PlayerInfo[playerid][pKosenje] == 4)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 5;//
                           SetPlayerCheckpoint(playerid,1176.2085,-2360.8552,12.5175,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1176.2085,-2360.8552,12.5175))//cp5
        {
            if(PlayerInfo[playerid][pKosenje] == 5)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 6;//
                           SetPlayerCheckpoint(playerid,1198.5245,-2354.7522,13.3856,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1198.5245,-2354.7522,13.3856))//cp6
        {
            if(PlayerInfo[playerid][pKosenje] == 6)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 7;//
                           SetPlayerCheckpoint(playerid,1217.5978,-2316.6528,14.4010,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1217.5978,-2316.6528,14.4010))//cp7
        {
            if(PlayerInfo[playerid][pKosenje] == 7)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 8;//
                           SetPlayerCheckpoint(playerid,1246.1892,-2280.0127,13.5026,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1246.1892,-2280.0127,13.5026))//cp8
        {
            if(PlayerInfo[playerid][pKosenje] == 8)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 9;//
                           SetPlayerCheckpoint(playerid,1282.7023,-2282.7271,13.1725,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1282.7023,-2282.7271,13.1725))//cp9
        {
            if(PlayerInfo[playerid][pKosenje] == 9)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 10;//
                           SetPlayerCheckpoint(playerid,1306.0740,-2286.9492,13.5203,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1306.0740,-2286.9492,13.5203))//cp10
        {
            if(PlayerInfo[playerid][pKosenje] == 10)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 11;//
                           SetPlayerCheckpoint(playerid,1259.3185,-2308.1731,13.0345,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1259.3185,-2308.1731,13.0345))//cp11
        {
            if(PlayerInfo[playerid][pKosenje] == 11)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 12;//
                           SetPlayerCheckpoint(playerid,1233.7283,-2339.2085,14.2697,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1233.7283,-2339.2085,14.2697))//cp12
        {
            if(PlayerInfo[playerid][pKosenje] == 12)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 13;//
                           SetPlayerCheckpoint(playerid,1198.9869,-2327.8259,14.7051,2.0);//
  }
            }
}
if(PlayerToPoint(2.0, playerid,1198.9869,-2327.8259,14.7051))//cp13
        {
            if(PlayerInfo[playerid][pKosenje] == 13)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 14;//
                           SetPlayerCheckpoint(playerid,1150.6616,-2357.0837,12.3239,2.0);//
  }
            }
}
        if(PlayerToPoint(2.0, playerid,1150.6616,-2357.0837,12.3239))//cp n-zi
        {
            if(PlayerInfo[playerid][pKosenje] == 14)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == Kosenje[0] || Veh == Kosenje[1] ||  Veh == Kosenje[2] || Veh == Kosenje[3])
      {
                           PlayerInfo[playerid][pKosenje] = 0;//
                           DisablePlayerCheckpoint(playerid);
                           SendClientMessage(playerid, COLOR_GREEN ,"*kosenje uspjesno zavrseno");
                          GivePlayerMoney(playerid, 250);
                           SendClientMessage(playerid, COLOR_GREEN ,"Pokosili ste travu i zaradili 250$ !");
  }
            }
}
}