Szerző Téma: SawMTA inventory  (Megtekintve 785 alkalommal)

SawMTA inventory
« Dátum: 2019. Február 03. - 19:42:02 »
0
Sziasztok, az lenne a problémám, hogy a sawmta modban, az inventory nem nyílik meg, az actionbar is működik és az azon lévő itemek, de az inv nem jelenik meg. Mi lehet a baj? Előre is köszi a válaszokat!

Nem elérhető Core

SawMTA inventory
« Válasz #1 Dátum: 2019. Február 04. - 15:16:09 »
0
debugscript nem ír semmit?

SawMTA inventory
« Válasz #2 Dátum: 2019. Február 04. - 19:00:31 »
0
attempt to perform arithmetic on a nil value
 
Ehhez a functionhoz: 
 

function getAllItemWeight()
local bagWeight = 0
local keyWeight = 0
local vehWeight = 0
local objectWeight = 0
if isElement(elementSource) then
   if getElementType(elementSource) == \"player\" then
      if inventoryItems[elementSource][\"bag\"] then
         for i = 1, row * column do
            if (inventoryItems[elementSource][\"bag\"]) then
               bagWeight = bagWeight + (getItemWeight(inventoryItems[elementSource][\"bag\"][\"id\"]) * inventoryItems[elementSource][\"bag\"][\"count\"])
            end
         end
      end
      if inventoryItems[elementSource][\"key\"] then
         for i = 1, row * column do
            if (inventoryItems[elementSource][\"key\"]) then
               keyWeight = keyWeight + (getItemWeight(inventoryItems[elementSource][\"key\"][\"id\"]) * inventoryItems[elementSource][\"key\"][\"count\"])
            end
         end
      end
   end
   if getElementType(elementSource) == \"vehicle\" then
      if inventoryItems[elementSource] then
         if inventoryItems[elementSource][\"vehicle\"] then
            for i = 1, row * column do
               if (inventoryItems[elementSource][\"vehicle\"]) then
                  vehWeight = vehWeight + (getItemWeight(inventoryItems[elementSource][\"vehicle\"][\"id\"]) * inventoryItems[elementSource][\"vehicle\"][\"count\"])
               end   
            end
         end
      end
   end
   if getElementType(elementSource) == \"object\" then
      if inventoryItems[elementSource][\"object\"] then
         for i = 1, row * column do
            if (inventoryItems[elementSource][\"object\"]) then
               objectWeight = objectWeight + (getItemWeight(inventoryItems[elementSource][\"object\"][\"id\"]) * inventoryItems[elementSource][\"object\"][\"count\"])
            end   
         end
      end
   end
end
return bagWeight + keyWeight + vehWeight + objectWeight
end

 
 
« Utoljára szerkesztve: 2019. Február 04. - 19:02:22 írta lakat0410 »

Nem elérhető Jason

SawMTA inventory
« Válasz #3 Dátum: 2019. Február 04. - 19:24:45 »
0
Olyan módtól ne is várj csodát, amit úgy tettek fel, hogy elcseszték előtte :D 

SawMTA inventory
« Válasz #4 Dátum: 2019. Február 04. - 19:32:25 »
0
\"W2169xg.png\"

SawMTA inventory
« Válasz #5 Dátum: 2019. Február 04. - 19:38:16 »
0
Csak érdeklődtem, kipróbálni szerettem volna, de köszi :D
 
 
 
:DD

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal