Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Problem z skryptem z wyplatami


Czempion96

Rekomendowane odpowiedzi

Opublikowano

Siema.

Mam problem z wyplatami w skrypcie.

Gdy mamy wiecej niz 100cc skrypt sypie wszystkie ccki z backpacka

Tutaj kod:

      if PlayerTable.JOGO == Games.NULL and table.contains(_Commands_Payout, Message) and 2 <= os.difftime(os.time(), Last_Payout) then
          local posx, posy, posz = 0, 0, 0
          local totalValue = PlayerTable.BALANCE
          if 0 < PlayerTable.BALANCE then
            posx, posy, posz = Positions.Counter_Pos.x, Positions.Counter_Pos.y, Positions.Counter_Pos.z
          end
          if posx ~= 0 and posy ~= 0 and posz ~= 0 then
            while PlayerTable.BALANCE > 100 do
              if 0 < Container_Index.CC_BP:ItemCount() then
                for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
                  local Spot = Container_Index.CC_BP:GetItemData(i)
                  if Spot.id == 3043 then
                    local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
                    Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, 100)
                    wait(Self.Ping() + 450)
                    if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
                      PlayerTable.BALANCE = PlayerTable.BALANCE - 100
                    end
                  else
                  end
                end
              elseif 1 < Container_Index.Extra_CC_BP:ItemCount() then
                for i = Container_Index.Extra_CC_BP:ItemCount() - 1, 0, -1 do
                  local Spot = Container_Index.Extra_CC_BP:GetItemData(i)
                  if Spot.id == 3043 then
                    local beforePay_Count = Container_Index.Extra_CC_BP:ItemCount() - 1
                    Container_Index.Extra_CC_BP:MoveItemToGround(i, posx, posy, posz, 100)
                    wait(Self.Ping() + 450)
                    if beforePay_Count ~= Container_Index.Extra_CC_BP:ItemCount() - 1 then
                      PlayerTable.BALANCE = PlayerTable.BALANCE - 100
                    end
                  else
                  end
                end
              elseif backToCheck() then
                for i = Container_Index.Extra_CC_BP:ItemCount() - 1, 0, -1 do
                  local Spot = Container_Index.Extra_CC_BP:GetItemData(i)
                  if Spot.id == 3043 then
                    local beforePay_Count = Container_Index.Extra_CC_BP:ItemCount() - 1
                    Container_Index.Extra_CC_BP:MoveItemToGround(i, posx, posy, posz, 100)
                    wait(Self.Ping() + 450)
                    if beforePay_Count ~= Container_Index.Extra_CC_BP:ItemCount() - 1 then
                      PlayerTable.BALANCE = PlayerTable.BALANCE - 100
                    end
                    break
                  end
                end
              end
            end
            if PlayerTable.BALANCE <= 100 then
              if 0 < Container_Index.CC_BP:ItemCount() then
                for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
                  local Spot = Container_Index.CC_BP:GetItemData(i)
                  if Spot.id == 3043 then
                    local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
                    Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, PlayerTable.BALANCE)
                    wait(Self.Ping() + 450)
                    if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
                      PlayerTable.BALANCE = PlayerTable.BALANCE - PlayerTable.BALANCE
                    end
                    break
                  end
                end
              elseif 1 < Container_Index.Extra_CC_BP:ItemCount() then
                for i = Container_Index.Extra_CC_BP:ItemCount() - 1, 0, -1 do
                  local Spot = Container_Index.Extra_CC_BP:GetItemData(i)
                  if Spot.id == 3043 then
                    local beforePay_Count = Container_Index.Extra_CC_BP:ItemCount() - 1
                    Container_Index.Extra_CC_BP:MoveItemToGround(i, posx, posy, posz, PlayerTable.BALANCE)
                    wait(Self.Ping() + 1000)
                    if beforePay_Count ~= Container_Index.Extra_CC_BP:ItemCount() - 1 then
                      PlayerTable.BALANCE = PlayerTable.BALANCE - PlayerTable.BALANCE
                    end
                    break
                  end
                end
              end
              Self.Say("Your Money: " .. math.floor(totalValue) .. "cc.")
            end
          end
          PlayerTable.BALANCE = 0
          Last_Payout = os.time()
        end
      end
    end
  end
end)

Dzięki za pomoc z góry

Opublikowano
Dnia 26.12.2019 o 19:50, Czempion96 napisał:

Gdy mamy wiecej niz 100cc skrypt sypie wszystkie ccki z backpacka

W sensie więcej do wypłacenia czy więcej w depo ?

Dodaj sobie printy i zdebuguj wartości zmiennych PlayerTable.BALANCE i Container_Index.CC_BP:ItemCount()/Container_Index.Extra_CC_BP:ItemCount() w różnych miejscach oraz z różną ilością cc. 

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...