Trafika

Započeo Xladen, Januar 17, 2018, 20:36:27 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Kada kucam pridjem trafici i kucam /trafika nista mi se ne pojavi,ako uklonim IsPlayerInRangeOfPoint onda se pojavi dialog ali kada pokusam kupiti nista ne dobijam niti mi skida novac.Molim za pomoc.

Komanda:
CitatCMD:trafika(playerid, params[])
{

    if(UlogovanProvera[playerid] == 0) return Ulogovan(playerid);
    if(IsPlayerInAnyVehicle( playerid )) return SCM(playerid,-1,""CRVENA"[GRESKA] "BELA"Moras biti van vozila!");
    if(IsPlayerInRangeOfPoint(playerid, 5.0, -2540.9431, 2292.0476, 4.9844) && IsPlayerInRangeOfPoint(playerid, 5.0, -2278.4382, 2312.0273, 4.9659) && IsPlayerInRangeOfPoint(playerid, 5.0, -2565.6521, 2469.9983, 19.4087) && IsPlayerInRangeOfPoint(playerid, 5.0, -1472.1143, 2642.0332, 55.8359) && IsPlayerInRangeOfPoint(playerid, 5.0, -1525.1388, 2544.7451, 55.8359))
    SPD(playerid, DIALOG_TRAFIKA, DIALOG_STYLE_LIST, ""BELA"Trafika", ""ORANGE"- "BELA"Dopuna (20$)\n"ORANGE"- "BELA"Dopuna (50$)\n"ORANGE"- "BELA"Dopuna (100$)\n"ORANGE"- "BELA"Sok (10$)\n"ORANGE"- "BELA"Cigare (20$)\n"ORANGE"- "BELA"Upaljac (10$)\n", "Odaberi", "Izlaz");
   return 1;
}

Dialog:
Citatif(dialogid == DIALOG_TRAFIKA)
   {
      if(!response) return 1;
      if(FirmaInfo[KioskKupovina[playerid]][fProizvodi] <= 0) return SCM(playerid,-1,""ZPLAVA"[Trafika]: "BELA"Nemamo vise proizvoda!");
      FirmaInfo[KioskKupovina[playerid]][fProizvodi]--;
      switch(listitem)
      {
         case 0:
         {
            if(PlayerInfo[playerid][pMobilni] == 0) return SCM(playerid,-1, ""ORANGE"[BE:RPBE:RP] "SIVA"Nemate mobilni telefon!");
               if(PlayerInfo[playerid][pNovacDzep] < 20) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Nemate dovoljno novca 20$!");
                SCM(playerid,-1,""ZUTA"[INFO] "SIVA"Kupili ste 20 kredita za 20$!");
            PlayerInfo[playerid][pMobKredit] += 20;
            g_NovacMinus(playerid,20);
            FirmaNovac(KioskKupovina[playerid],20);
            SavePlayer(playerid);
         }
         case 1:
         {
            if(PlayerInfo[playerid][pMobilni] == 0) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Nemate mobilni telefon!");
               if(PlayerInfo[playerid][pNovacDzep] < 50) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Nemate dovoljno novca 50$!");
                SCM(playerid,-1,""ZUTA"[INFO] "SIVA"Kupili ste 50 kredita za 50$!");
            PlayerInfo[playerid][pMobKredit] += 50;
            g_NovacMinus(playerid,50);
            FirmaNovac(KioskKupovina[playerid],50);
            SavePlayer(playerid);
         }
         case 2:
         {
             if(PlayerInfo[playerid][pMobilni] == 0) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Nemate mobilni telefon!");
               if(PlayerInfo[playerid][pNovacDzep] < 100) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Nemate dovoljno novca 100$!");
                SCM(playerid,-1,""ZUTA"[INFO] "SIVA"Kupili ste 100 kredita za 100$!");
            PlayerInfo[playerid][pMobKredit] += 100;
            g_NovacMinus(playerid,100);
            FirmaNovac(KioskKupovina[playerid],100);
            SavePlayer(playerid);
         }
         case 3:
         {
               if(PlayerInfo[playerid][pNovacDzep] < 10) return SCM(playerid,-1, ""ORANGE"[ARP]"SIVA"Nemate dovoljno novca 10$!");
                SCM(playerid,-1,""ZUTA"[INFO] "SIVA"Kupili ste sok za 10$!");
                SetPlayerSpecialAction( playerid, SPECIAL_ACTION_DRINK_SPRUNK);
            g_NovacMinus(playerid,10);
            FirmaNovac(KioskKupovina[playerid],10);
         }
         case 4:
         {
            if(PlayerInfo[playerid][pCigare] != 0) return SCMF(playerid,-1,""ORANGE"[ARP] "SIVA"Vec imas %d cigara prvo ih popusi!",PlayerInfo[playerid][pCigare]);
               if(PlayerInfo[playerid][pNovacDzep] < 20) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Nemate dovoljno novca 20$!");
                SCM(playerid,-1,""ZUTA"[INFO] "SIVA"Kupili ste cigare | Sada mozete zapliti cigaru (/zapalicigaru | /ugasicigaru)!");
            PlayerInfo[playerid][pCigare] = 20;
            g_NovacMinus(playerid,20);
            FirmaNovac(KioskKupovina[playerid],20);
            SavePlayer(playerid);
         }
         case 5:
         {
            if(PlayerInfo[playerid][pUpaljac] == 1) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Vec posedujes upaljac!");
               if(PlayerInfo[playerid][pNovacDzep] < 10) return SCM(playerid,-1, ""ORANGE"[ARP] "SIVA"Nemate dovoljno novca 10$!");
                SCM(playerid,-1,""ZUTA"[INFO] "SIVA"Kupili ste upaljac za 10$!");
            PlayerInfo[playerid][pUpaljac] = 10;
            g_NovacMinus(playerid,10);
            FirmaNovac(KioskKupovina[playerid],10);
            SavePlayer(playerid);
         }
      }
}

Da napomenem da mi ne izbacuje nikakav error ili tome slicno,i jos jedna stvar kada u marketu nesto kupim kupi 2 puta sta god kupim.

pravila
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci