WASSIm. Posted September 23, 2013 Posted September 23, 2013 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 )
isa_Khamdan Posted September 23, 2013 Posted September 23, 2013 Can you explain what is the problem exactly?
EstrategiaGTA Posted September 23, 2013 Posted September 23, 2013 What's wrong with it? What's the error?
TAPL Posted September 23, 2013 Posted September 23, 2013 Have you triggered the event name "onLoadBansList"?
WASSIm. Posted September 23, 2013 Author Posted September 23, 2013 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
TAPL Posted September 23, 2013 Posted September 23, 2013 Have you triggered the event name "onLoadBansList"? yes Can you post the code? You can try use outputChatBox to be sure the code is begin execute.
WASSIm. Posted September 23, 2013 Author Posted September 23, 2013 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 )
isa_Khamdan Posted September 23, 2013 Posted September 23, 2013 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?
WASSIm. Posted September 23, 2013 Author Posted September 23, 2013 What was the problem? finish i fixed it. problem fail just i don't remember ban myself for test
.:HyPeX:. Posted September 23, 2013 Posted September 23, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now