Msypon Posted July 23, 2013 Share Posted July 23, 2013 -- client tick = 0 addEvent ( 'getBansList', true ) function panelTick ( bans ) if ( guiGetVisible ( GUIEditor.window[1] ) ) then if ( getTickCount() >= tick ) then local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) if ( name and ip ) then guiGridListSetItemText ( GUIEditor.gridlist[1], row, name, bans.name, false, false ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, ip, bans.name, false, false ) end tick = getTickCount() + 1000 end end end addEventHandler ( 'onClientRender', root, panelTick ) addEventHandler ( 'getBansList', root, panelTick ) --server function banList ( ) local bans = dbQuery ( banSQL, 'SELECT * FROM banTable' ) local result = dbPoll ( bans, -1 ) for _, bans in pairs ( result ) do triggerClientEvent ( 'getBansList', root, bans ) end end attempt to index local 'bans' (a nil value) Link to comment
Jaysds1 Posted July 24, 2013 Share Posted July 24, 2013 try this: Server function banList ( ) local bans = dbQuery ( banSQL, 'SELECT * FROM banTable' ) local result = dbPoll ( bans, -1 ) for _, ban in pairs ( result ) do triggerClientEvent ( 'getBansList', root, ban ) end end 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