WASSIm. Posted September 23, 2013 Share 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 ) Link to comment
WASSIm. Posted September 23, 2013 Author Share Posted September 23, 2013 only help plis ? Link to comment
isa_Khamdan Posted September 23, 2013 Share Posted September 23, 2013 Can you explain what is the problem exactly? Link to comment
EstrategiaGTA Posted September 23, 2013 Share Posted September 23, 2013 What's wrong with it? What's the error? Link to comment
TAPL Posted September 23, 2013 Share Posted September 23, 2013 Have you triggered the event name "onLoadBansList"? Link to comment
WASSIm. Posted September 23, 2013 Author Share 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 Link to comment
TAPL Posted September 23, 2013 Share 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. Link to comment
WASSIm. Posted September 23, 2013 Author Share 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 ) Link to comment
isa_Khamdan Posted September 23, 2013 Share 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? Link to comment
WASSIm. Posted September 23, 2013 Author Share Posted September 23, 2013 of course thx all i fixed it Link to comment
Castillo Posted September 23, 2013 Share Posted September 23, 2013 What was the problem? Link to comment
WASSIm. Posted September 23, 2013 Author Share Posted September 23, 2013 What was the problem? finish i fixed it. problem fail just i don't remember ban myself for test Link to comment
.:HyPeX:. Posted September 23, 2013 Share 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 Link to comment
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