function fillWithItems ( grid, columnName, columnCount )
local value
guiGridListClear ( grid )
-- Medikits --
if vioClientGetElementData ( "medikits" ) >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Medikits", false, false )
if vioClientGetElementData ( "medikits" ) == 1 then value = "" else value = vioClientGetElementData ( "medikits" ) end
guiGridListSetItemText ( grid, row, columnCount, value, false, false )
end
-- Repairkits --
if vioClientGetElementData ( "repairkits" ) >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Repairkits", false, false )
if vioClientGetElementData ( "repairkits" ) == 1 then value = "" else value = vioClientGetElementData ( "repairkits" ) end
guiGridListSetItemText ( grid, row, columnCount, value, false, false )
end
-- placeAbleObjects --
if vioClientGetElementData ( "object" ) > 0 then
local row = guiGridListAddRow ( grid )
local objectName = placeAbleObjectNames[vioClientGetElementData ( "object" )]
if not objectName then
objectName = "Objekt"
end
guiGridListSetItemText ( grid, row, columnName, objectName, false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
-- Handheld --
if vioClientGetElementData ( "gameboy" ) >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Handheld", false, false )
if vioClientGetElementData ( "gameboy" ) == 1 then value = "" else value = vioClientGetElementData ( "gameboy" ) end
guiGridListSetItemText ( grid, row, columnCount, value, false, false )
end
-- Fernglas
if vioClientGetElementData ( "fglass" ) then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Fernglas", false, false )
value = ""
guiGridListSetItemText ( grid, row, columnCount, value, false, false )
end
-- Schach --
if vioClientGetElementData ( "chess" ) then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Schach", false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
-- Geschenk --
if vioClientGetElementData ( "presents" ) then
if vioClientGetElementData ( "presents" ) > 0 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Geschenk", false, false )
guiGridListSetItemText ( grid, row, columnCount, vioClientGetElementData ( "presents" ), false, false )
end
end
-- Notebook --
if vioClientGetElementData ( "fruitNotebook" ) >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Notebook", false, false )
if vioClientGetElementData ( "fruitNotebook" ) == 1 then value = "" else value = vioClientGetElementData ( "fruitNotebook" ) end
guiGridListSetItemText ( grid, row, columnCount, value, false, false )
end
-- Zeitung --
if vioClientGetElementData ( "newspaper" ) then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Zeitung", false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
-- Benzin Kanister --
local Kanister = tonumber ( vioClientGetElementData ( "benzinkannister" ) )
if Kanister >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Kanister", false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( Kanister ), false, false )
end
-- Drogen --
local drogen = vioClientGetElementData ( "drugs" )
if drogen >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Drogen", false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( drogen ).." g", false, false )
end
-- Hanfsamen --
local weed = tonumber ( vioClientGetElementData ( "flowerseeds" ) )
if weed >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Hanfsamen", false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( weed ), false, false )
end
-- Mats --
local mats = vioClientGetElementData("mats")
if mats >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Materialien", false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( mats ), false, false )
end
-- Würfel --
local dice = tonumber ( vioClientGetElementData ( "dice" ) )
if dice >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Wuerfel", false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
-- Zigarretten --
local zigaretten = tonumber ( vioClientGetElementData ( "zigaretten" ) )
if zigaretten >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Zigaretten", false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( zigaretten ), false, false )
end
-- Chips --
local chips = tonumber ( vioClientGetElementData ( "casinoChips" ) )
if chips >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Chips", false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( chips ), false, false )
end
-- Hufeisen --
local horseshoes = tonumber ( vioClientGetElementData ( "totalHorseShoes" ) )
if horseshoes >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Hufeisen", false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( horseshoes ), false, false )
end
-- Orden 1-3 --
local orden_1 = vioClientGetElementData ( "armyperm7" )
local orden_2 = vioClientGetElementData ( "armyperm8" )
local orden_3 = vioClientGetElementData ( "armyperm9" )
if orden_1 >= 1 or orden_2 >= 1 or orden_3 >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Orden", true, false )
if orden_1 >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Ehre", false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
if orden_2 >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Luftwaffe", false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
if orden_3 >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Verdienst", false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
end
-- Überschrift --
for i = 1, 3 do
if vioClientGetElementData ( "food"..i ) >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Heilung", true, false )
break
end
end
-- Foodslot 1 --
local food = tonumber ( vioClientGetElementData ( "food1" ) )
if food >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, foodName[food], false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
-- Foodslot 2 --
local food = tonumber ( vioClientGetElementData ( "food2" ) )
if food >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, foodName[food], false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
-- Foodslot 3 --
local food = tonumber ( vioClientGetElementData ( "food3" ) )
if food >= 1 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, foodName[food], false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
end
-- Angelausrüstung --
if vioClientGetElementData ( "fishingPole" ) then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Angeltasche", true, false )
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Angel", false, false )
guiGridListSetItemText ( grid, row, columnCount, "", false, false )
if vioClientGetElementData ( "fishingHooks" ) > 0 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Haken", false, false )
guiGridListSetItemText ( grid, row, columnCount, vioClientGetElementData ( "fishingHooks" ), false, false )
end
if vioClientGetElementData ( "fishingWorms" ) > 0 then
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, "Koeder", false, false )
guiGridListSetItemText ( grid, row, columnCount, vioClientGetElementData ( "fishingWorms" ), false, false )
end
local typ, name, weight
for i = 65, 67 do
typ = string.char ( i )
name = vioClientGetElementData ( "fishingFish"..typ.."Typ" )
if tonumber ( name ) then
if tonumber ( name )>= 1 then
weight = vioClientGetElementData ( "fishingFish"..typ.."Weight" )
local row = guiGridListAddRow ( grid )
guiGridListSetItemText ( grid, row, columnName, fishNames[name], false, false )
guiGridListSetItemText ( grid, row, columnCount, tostring ( math.floor ( weight / 10 ) / 100 ), false, false )
end
end
end
end
-- Spezialmunnition -- special_ammo.bmp
end
Alles anzeigen