[Pomoc] Posao - CP.

Započeo Darko, Januar 06, 2011, 02:55:05 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovako , radio sam po djurino TUTu za posao.. i sve mi radi tj. nema errora , ali mi nezeli proci kroz CP

Evo kodovi

if(PlayerInfo[playerid][pKonobar] > 0)
    {
//--------ruta1
        if(PlayerToPoint(3.0, playerid,-866.5089,1894.9479,60.2603))//cp1
        {
            if(PlayerInfo[playerid][pKonobar] == 1)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)//tu stavite id od vozila za kosenje
      {
                           PlayerInfo[playerid][pKonobar] = 2;// dodajemo vrijednost da se slucajno ne pogodi isti cp, ovo nije potrebno
                           SetPlayerCheckpoint(playerid,-890.8430,1798.1857,60.2778,3.0);//
  }
            }
        }
        if(PlayerToPoint(3.0, playerid,-890.8430,1798.1857,60.2778))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1005.4418,1856.3335,62.8738,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1005.4418,1856.3335,62.8738))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1159.4302,1801.9198,40.0197,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1159.4302,1801.9198,40.0197))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1176.3650,1817.6272,41.1031,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1176.3650,1817.6272,41.1031))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1276.4158,1940.3282,44.7243,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1276.4158,1940.3282,44.7243))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1339.6301,2080.1467,51.0780,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1339.6301,2080.1467,51.0780))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1372.3037,2228.2395,53.8362,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1372.3037,2228.2395,53.8362))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1433.8647,2378.0632,53.7001,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1433.8647,2378.0632,53.7001))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1411.0049,2525.5789,61.7761,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1411.0049,2525.5789,61.7761))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1375.3264,2596.8918,55.2035,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1375.3264,2596.8918,55.2035))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1412.2769,2603.1563,55.6478,3.0);//
  }
            }
}
if(PlayerToPoint(3.0, playerid,-1412.2769,2603.1563,55.6478))//cp2
        {
            if(PlayerInfo[playerid][pKonobar] == 2)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 3;//
                           SetPlayerCheckpoint(playerid,-1445.2556,2602.5176,55.6719,3.0);//
  }
            }
}
        if(PlayerToPoint(3.0, playerid,-1459.4480,2594.0105,55.8207))//cp n-zi
        {
            if(PlayerInfo[playerid][pKonobar] == 3.0)//
            {
                      new Veh = GetPlayerVehicleID(playerid);
                      if(Veh == 154)
      {
                           PlayerInfo[playerid][pKonobar] = 0;//
                           DisablePlayerCheckpoint(playerid);
                           SendClientMessage(playerid, COLOR_GREEN ,"* Uspijesno si raznjeo pakete pica.");
//---------------------------------------------------------------ovo ispod nije potrebno
   GivePlayerMoney(playerid, 350);
                           SendClientMessage(playerid, COLOR_YELLOW ,"Zarada = 350$");
  }
            }
}
}


To je pod

public OnPlayerEnterCheckpoint(playerid)
{


I komanda

if(strcmp(cmd, "/pice", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
            if(PlayerInfo[playerid][pKonobar] > 0)
            {
     SendClientMessage(playerid, COLOR_YELLOW, "*Vec imas aktivirano raznosenje pica.");
     return 1;
            }
if(PlayerInfo[playerid][pJob] == 17)//<---- tu si stavite id koji stavite za taj posao
{

                   SendClientMessage(playerid,COLOR_YELLOW,"*Aktivirao si raznosenje pica.");
       PlayerInfo[playerid][pKonobar] = 1;//---- tu stavite vrijednos 1 za kosenje za toga igraca
             SetPlayerCheckpoint(playerid, -894.9207,2000.1621,60.9141,3.0);// tu stavite koordinate prvog cp-a
}
else
{
        SendClientMessage(playerid, COLOR_YELLOW, "Nemas posao konobara.");
                return 1;
        }
}
return 1;
}


Kada upalim sa /pice , pokaze se CP.. i onda samo prolazim kroz njega a on ko mrtav :D

u komandi si stavio:
PlayerInfo[playerid][pKonobar] = 1;
SetPlayerCheckpoint(playerid, -894.9207,2000.1621,60.9141,3.0);//ovo ovdje


a u callbacku ide ovo:
if(PlayerToPoint(3.0, playerid,-866.5089,1894.9479,60.2603))// mora biti isto kao i ovdje(koordinate)

      if(PlayerInfo[playerid][pKonobar] == 1)
            {  


Citat: Dude poslato Januar 06, 2011, 03:01:47 PRE PODNE
u komandi si stavio:
PlayerInfo[playerid][pKonobar] = 1;
SetPlayerCheckpoint(playerid, -894.9207,2000.1621,60.9141,3.0);//ovo ovdje


a u callbacku ide ovo:
if(PlayerToPoint(3.0, playerid,-866.5089,1894.9479,60.2603))// mora biti isto kao i ovdje(koordinate)

      if(PlayerInfo[playerid][pKonobar] == 1)
            {  




Evo skuzio... XD

Sad me zeza malo 3 CP , pa cu sve tak provjeriti...

Hvalaa