Jump to content

Problem show in guiGridList


WASSIm.

Recommended Posts

hi guys i have problem. its not working and nothing in debug

Server

local banlist = xmlLoadFile ( "banlist.xml" ) 
  
function onLoadBansList ( ) 
    local names = { } 
    local ips = { } 
    local serials = { } 
    local banners = { } 
    local reasons = { } 
    local times = { } 
    local untimes = { } 
    for _, theNode in ipairs ( xmlNodeGetChildren( banlist ) ) do 
        table.insert ( names, xmlNodeGetAttribute( theNode, "Name" ) ) 
        table.insert ( ips, xmlNodeGetAttribute( theNode, "IP" ) ) 
        table.insert ( serials, xmlNodeGetAttribute( theNode, "Serial" ) ) 
        table.insert ( banners, xmlNodeGetAttribute( theNode, "Banner" ) ) 
        table.insert ( reasons, xmlNodeGetAttribute( theNode, "Reason" ) ) 
        table.insert ( times, xmlNodeGetAttribute( theNode, "Bantime" ) ) 
        table.insert ( untimes, xmlNodeGetAttribute( theNode, "Unbantime" ) ) 
    end 
    triggerClientEvent ( "onClientLoadBansList", root, names, ips, serials, banners, reasons, times, untimes) 
end 
addEvent ( "onLoadBansList", true ) 
addEventHandler ( "onLoadBansList", getRootElement(), onLoadBansList ) 

Client

addEvent ( "onClientLoadBansList", true ) 
addEventHandler ( "onClientLoadBansList", root, 
function ( names, ips, serials, banners, reasons, times, untimes ) 
    guiGridListClear ( tabbanslist ) 
    for _, name in ipairs ( names ) do 
        local row = guiGridListAddRow ( tabbanslist ) 
        guiGridListSetItemText ( tabbanslist, row, tabbanslistcolumnP, name, false, false ) 
    end 
    for _, ip in ipairs ( ips ) do 
        local row = guiGridListAddRow ( tabbanslist ) 
        guiGridListSetItemText ( tabbanslist, row, tabbanslistcolumnI, ip, false, false ) 
    end 
    for _, serial in ipairs ( serials ) do 
        local row = guiGridListAddRow ( tabbanslist ) 
        guiGridListSetItemText ( tabbanslist, row, tabbanslistcolumnS, serial, false, false ) 
    end 
    for _, banner in ipairs ( banners ) do 
        local row = guiGridListAddRow ( tabbanslist ) 
        guiGridListSetItemText ( tabbanslist, row, tabbanslistcolumnB, banner, false, false ) 
    end 
    for _, reason in ipairs ( reasons ) do 
        local row = guiGridListAddRow ( tabbanslist ) 
        guiGridListSetItemText ( tabbanslist, row, tabbanslistcolumnR, reason, false, false ) 
    end 
    for _, time in ipairs ( times ) do 
        local row = guiGridListAddRow ( tabbanslist ) 
        guiGridListSetItemText ( tabbanslist, row, tabbanslistcolumnT, time, false, false ) 
    end 
    for _, untime in ipairs ( untimes ) do 
        local row = guiGridListAddRow ( tabbanslist ) 
        guiGridListSetItemText ( tabbanslist, row, tabbanslistcolumnU, untime, false, false ) 
    end 
end 
) 

Link to comment

i use outputChatBox but nothing : /

bindKey( "0", "down",  
function ( )     
    --if (getPlayerTeam ( localPlayer ) and getTeamName ( getPlayerTeam ( localPlayer ) ) == "STAFF") then 
        local window = guiGetVisible ( windows )     
        if ( window == true ) then     
            guiSetVisible ( windows, false ) 
            showCursor ( false) 
        else               
            guiSetVisible ( windows, true ) 
            showCursor ( true) 
            triggerServerEvent("onLoadPlayerList", getRootElement()) 
            triggerServerEvent("onLoadResourcesList", getRootElement()) 
            triggerServerEvent("onLoadAccountsList", getRootElement()) 
            triggerServerEvent("onLoadBansList", getRootElement()) 
        end 
    --end 
end 
) 

Link to comment
i use outputChatBox but nothing : /
bindKey( "0", "down",  
function ( )     
    --if (getPlayerTeam ( localPlayer ) and getTeamName ( getPlayerTeam ( localPlayer ) ) == "STAFF") then 
        local window = guiGetVisible ( windows )     
        if ( window == true ) then     
            guiSetVisible ( windows, false ) 
            showCursor ( false) 
        else               
            guiSetVisible ( windows, true ) 
            showCursor ( true) 
            triggerServerEvent("onLoadPlayerList", getRootElement()) 
            triggerServerEvent("onLoadResourcesList", getRootElement()) 
            triggerServerEvent("onLoadAccountsList", getRootElement()) 
            triggerServerEvent("onLoadBansList", getRootElement()) 
        end 
    --end 
end 
) 

Do these event exists on the server side?

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