[Pomoc] Radno vreme Biznisa

Započeo Dobrica, Jun 01, 2017, 22:06:52 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim: od 0
Detaljan opis problema: Radio sam working time, radno vreme za biznise i ne zeli da mi radi. I ako je npr radno vreme od 12 - 24h , sada je npr 22h ja probam da udjem u biznis ono nece. Kaze ne moze radno vreme je od 12 - 24 a 22h je, svasta sam pokusavao i nisam mogao da nadjem resenje, pa ako neko ima predlog za ovaj moj problemcic.
Dio skripte: Dole
Neke slike/video za lakse dobivanje pomoci(neobavezno):


        for(new i = 1; i < MAX_BUSINESS; i++)
{
if(strcmp(BUSINES_INFO[i][b_lockmode],"Lock",false))
{
if(IsPlayerInRangeOfPoint(playerid,2.0,BUSINES_INFO[i][b_ext][0],BUSINES_INFO[i][b_ext][1],BUSINES_INFO[i][b_ext][2]))
{
                if((sati_time >= BUSINES_INFO[i][b_work_off]) && (sati_time <= BUSINES_INFO[i][b_work_on]))
                {
SetPlayerPos(playerid,BUSINES_INFO[i][b_int][0],BUSINES_INFO[i][b_int][1],BUSINES_INFO[i][b_int][2]);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,BUSINES_INFO[i][b_interior]);
SetPlayerVirtualWorld(playerid,BUSINES_INFO[i][b_vw]);
p_inside_interiors[playerid] = i;
}
else return SEM(playerid,"Radno vreme ovog biznisa je - %d do %d.",BUSINES_INFO[i][b_work_on],BUSINES_INFO[i][b_work_off]);
}
}

if(strcmp(BUSINES_INFO[i][b_lockmode],"Lock",false))
{
if(IsPlayerInRangeOfPoint(playerid,2.0,BUSINES_INFO[i][b_int][0],BUSINES_INFO[i][b_int][1],BUSINES_INFO[i][b_int][2]))
{
    SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
p_inside_interiors[playerid] = -1;
SetPlayerPos(playerid,BUSINES_INFO[i][b_ext][0],BUSINES_INFO[i][b_ext][1],BUSINES_INFO[i][b_ext][2]);
}
}
}




new hour,minuite,second;
gettime(hour,minuite,second);

if((sati_time >= BUSINES_INFO[i][b_work_off]) && (sati_time <= BUSINES_INFO[i][b_work_on]))
{
SetPlayerPos(playerid,BUSINES_INFO[i][b_int][0],BUSINES_INFO[i][b_int][1],BUSINES_INFO[i][b_int][2]);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,BUSINES_INFO[i][b_interior]);
SetPlayerVirtualWorld(playerid,BUSINES_INFO[i][b_vw]);
p_inside_interiors[playerid] = i;
}
else return SEM(playerid,"Radno vreme ovog biznisa je - %d do %d.",BUSINES_INFO[i][b_work_on],BUSINES_INFO[i][b_work_off]);


@Cadilab
Poslednja Izmena: Jun 01, 2017, 22:11:26 POSLE PODNE od Dobrica

Zasto ne koristis TimeStamp ?
Former Developer | COD: Lords Of War - Modern Warfare 3 | Stunt Planet | Global Warfare |

[pawn]        for(new i = 1; i < MAX_BUSINESS; i++)
   {
       if(strcmp(BUSINES_INFO[b_lockmode],"Lock",false))
      {
          if(IsPlayerInRangeOfPoint(playerid,2.0,BUSINES_INFO[b_ext][0],BUSINES_INFO[b_ext][1],BUSINES_INFO[b_ext][2]))
         {
                new sat, sati_time; sati_time = gettime(sat);
                if((sati_time >= 12) && (sati_time <= 24)
                {
               SetPlayerPos(playerid,BUSINES_INFO[b_int][0],BUSINES_INFO[b_int][1],BUSINES_INFO[b_int][2]);
               SetCameraBehindPlayer(playerid);
               SetPlayerInterior(playerid,BUSINES_INFO[b_interior]);
               SetPlayerVirtualWorld(playerid,BUSINES_INFO[b_vw]);
               p_inside_interiors[playerid] = i;
            }
            else return SEM(playerid,"Radno vreme ovog biznisa je - %d do %d.",BUSINES_INFO[b_work_on],BUSINES_INFO[b_work_off]);
         }
      }
      
      if(strcmp(BUSINES_INFO[b_lockmode],"Lock",false))
      {
         if(IsPlayerInRangeOfPoint(playerid,2.0,BUSINES_INFO[b_int][0],BUSINES_INFO[b_int][1],BUSINES_INFO[b_int][2]))
         {
             SetCameraBehindPlayer(playerid);
            SetPlayerInterior(playerid,0);
            SetPlayerVirtualWorld(playerid,0);
            p_inside_interiors[playerid] = -1;
            SetPlayerPos(playerid,BUSINES_INFO[b_ext][0],BUSINES_INFO[b_ext][1],BUSINES_INFO[b_ext][2]);
         }
      }
   }[/pawn]
Probaj ovako
• G A M E M O D E •
• F I L T E R S C R I P T •
• T U T O R I A L •


Citat
You are what you believe yoursefl to be.

Ne mogu tako, jer je dinamicno stavljanje radnog vremena, zato stoji i varijabla..

BUSINES_INFO[b_work_on] od
BUSINES_INFO[b_work_off] do

Haman da si ih ti zamjenio u ifu.

Napravio si da ako je radno vreme od 12 - 24h onda u biznis moze da se udje samo ako je 12 ili manje i ako je 24 ili vece.

if((sati_time >= BUSINES_INFO[i][b_work_off]) && (sati_time <= BUSINES_INFO[i][b_work_on]))
zameni sa
if((sati_time <= BUSINES_INFO[i][b_work_off]) && (sati_time >= BUSINES_INFO[i][b_work_on]))



Citat: Dobrica poslato Jun 03, 2017, 15:40:24 POSLE PODNE
Dzabe, opet kaze da je greska...

Izbacuje ti error ili je konstantno firma zatvorena?
Ako je error koji je error, koja linija, daj sve