Jump to content

help GridList


WASSIm.

Recommended Posts

hi guys i have fail problem in GridList. plis help

IMAGE

http://i.imgur.com/seXLDdB.png

FILE

[(2013/11/8) | (12:52)]: CMD-WASSIm.[NOOSE] spawned haut parleur 

SERVER

function getLog(logname) 
    if ( logname ) then 
        local post = ""..logname..".log" 
        local file = fileOpen(post) 
        local textlog = {} 
        for i=1, fileGetSize(file) do 
            local text = fileRead(file, i)  
            table.insert(textlog, text) 
        end 
        fileClose(file) 
        return textlog 
    end 
end 
  
function loadLog(logname) 
    local logs = getLog(""..logname.."") 
    triggerClientEvent("onLoadLoginList", root, logs) 
end 
addEvent( "onloadLog", true ) 
addEventHandler( "onloadLog", getRootElement(), loadLog) 

CLIENT

addEvent("onLoadLoginList",true) 
addEventHandler("onLoadLoginList", root, 
function (Table) 
    guiGridListClear(GUIEditor.gridlist[1]) 
    for _, v in ipairs(Table) do 
        local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
        guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, ""..v.."", false, false ) 
    end 
end 
) 

Link to comment

i already use it

addEvent("onLoadLoginList",true) 
addEventHandler("onLoadLoginList", root, 
function (Table) 
    guiGridListClear(GUIEditor.gridlist[1])---HERE 
    for _, v in ipairs(Table) do 
        local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) 
        guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, ""..v.."", false, false ) 
    end 
end 
) 

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...