[help] Messed Command
#1

Hello i cant get this cmd to work, and i really need it the code works fine but there is a part bugged, it shuld only be possible to smuggle at night but when i try smuggle at day the message shows up and i still get the stuff can anyone please help me


/cake

pawn Код:
if(!strcmp(cmdtext, "/smugglemats", true)) // By
     {
        if(IsPlayerConnected(playerid))
        {
          if(gPlayerLogged[playerid] == 0)
        {
          SendClientMessage(playerid, COLOR_GREY, "  You need to login first !");
          return 1;
     }
        if(PlayerInfo[playerid][pJob] == 52)
     {
          if(PlayerToPoint(3.0,playerid,337.2316,-4336.5444,15.0383))
       {
            if(GetPlayerMoney(playerid) < 1499)
            {
              SendClientMessage(playerid, COLOR_GREY, "  You don't have enough money (1500 dollars needed)");
           return 1;
            }
            if(MatsHolding[playerid] != 0)
            {
              SendClientMessage(playerid, COLOR_GREY, "  You are smuggling materials already.");
              return 1;
            }/// this part is the messed one, the message popsup and he can still smuggle
                new hour,minuite,second;
                    gettime(hour,minuite,second);
                    FixHour(hour);
                    hour = shifthour+1
                        if(hour >= 21 && hour < 6) { }
                        else
                        {
                          SendClientMessage(playerid, COLOR_GRAD2, "Russian Guy: Privet I have no mats for you now return when the night falls 9PM To 6AM. ");
                          return 1;
                        }/// this part is the messed one, the message popsup and he can still smuggle
            SafeGivePlayerMoney(playerid, - 1500);
            MatsHolding[playerid] = 1000;
            SendClientMessage(playerid, COLOR_WHITE, "You have picked up materials package. Bring it to the Materials bank. (red marker)");
            GameTextForPlayer(playerid, "~w~Materials loaded", 5000, 1);
            SetPlayerCheckpoint(playerid,1985.3751,-1781.3669,13.5520,1.0);
            return 1;
          }
          else
          {
            SendClientMessage(playerid, COLOR_GREY, "  You are not at the Russian materials Boat! ")
            return 1;
          }
        }
        else
        {
          SendClientMessage(playerid, COLOR_GREY, "  You are not a materials smuggler !");
          return 1;
        }
        }
        return 1;
     }
Reply
#2

Wops i double posted by mistake
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)