Jump to content

help


Resulcan

Recommended Posts

Spoiler

JzI8D1.png

 

 

I don't understand the error, what's the problem?

 

 

------Disk Seçimi Bölümü---------------
local effect3dd = DGS:dgsCreateEffect3D(25)  --Create the 3D effect plugin
local spp = DGS:dgsCreateScrollPane(5,300,300,170,false)  --Create a scroll pane
local imgg = DGS:dgsCreateImage(0,0,1,1,_,true,spp,tocolor(220,220,220,180))  --Create an image
DGS:dgsEffect3DApplyToScrollPane(effect3dd,spp)  
DGS:dgsSetVisible(spp, false
DiskSec = DGS:dgsCreateWindow(5300300300"Disk Seçimi"false,spp)
GrildLs = DGS:dgsCreateGridList(55290240false, DiskSec)
DGS:dgsGridListAddColumn(GrildLs, "Tekerlekler"0.9)
for i,v in pairs(WhellTable) do
    local row = DGS:dgsGridListAddRow(GrildLs)
    DGS:dgsGridListSetItemText(GrildLs, row, 1"("..i..") "..v[1], falsefalse)
    DGS:dgsGridListSetItemData(GrildLs, row, 1, v[2])
end
wheelsKapat = DGS:dgsCreateButton(527029025"Kapat"false, GrildLs)
 
 
 
local function nextWheels()
    local vehicle = getPedOccupiedVehicle(localPlayer)
    if DGS:dgsGridListGetSelectedItem(wheels.wheel.list) == -1 then
        DGS:dgsGridListSetSelectedItem(wheels.wheel.list01)
    end
    if DGS:dgsGetVisible(wheels.wheel.windowthen
        if wheels.selected < WhellTable - 1 then
            wheels.selected = wheels.selected + 1
        else
            wheels.selected = 0
        end
        DGS:dgsGridListSetVerticalScrollPosition(wheels.wheel.list100/(WhellTable-1)*wheels.selected)
        DGS:dgsGridListSetSelectedItem(wheels.wheel.list, wheels.selected1)
        setElementData(vehicle, "vehicle:wheels", WhellTable[wheels.selected+1][2])
    end
end
 
local function prevWheels()
    local vehicle = getPedOccupiedVehicle(localPlayer)
    if DGS:dgsGridListGetSelectedItem(wheels.wheel.list) == -1 then
        DGS:dgsGridListSetSelectedItem(wheels.wheel.list01)
    end
    if DGS:dgsGetVisible(wheels.wheel.windowthen
        if wheels.selected > 0 then
            wheels.selected = wheels.selected - 1
        else
            wheels.selected = WhellTable - 1
        end
        DGS:dgsGridListSetSelectedItem(wheels.wheel.list, wheels.selected1)
 
        DGS:dgsGridListSetVerticalScrollPosition(wheels.wheel.list100/(WhellTable-1)*wheels.selected)
        setElementData(vehicle, "vehicle:wheels", WhellTable[wheels.selected+1][2])
    end
end
 
 

Edited by Resulcan
Link to comment
for i,v in pairs(WhellTable) do 

WhellTable is not defined and hence a 'nil' value where a table was expected. It appears it's structure should be something like

WhellTable = {
  ["key"] = {"text1", "text2"},
  [1] = {"sampletext1", "sampletext2"},
}

yielding a gridlist rows "(key) text1 | text2" where | denotes a new column for the first item, and "(1) sampletext1 | sampletext2" for the second item.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...