Jump to content

Problem show in guiGridList


WASSIm.

Recommended Posts

Posted

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 
) 

Omerta Roleplay

Posted
Can you explain what is the problem exactly?
What's wrong with it? What's the error?

not working and nothing in guiGridList

Have you triggered the event name "onLoadBansList"?

yes

Omerta Roleplay

Posted

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 
) 

Omerta Roleplay

Posted
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?

350x20_FFFFFF_FFFFFF_000000_000000.png
Posted

What was the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
What was the problem?

finish i fixed it. problem fail just i don't remember ban myself for test

Lol, if it would have worked alone, then you would have got to worry xD

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

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