Sasu Posted April 21, 2013 Share Posted April 21, 2013 Server: function getAllBans() local banlist = getBans() for _, bans in ipairs ( banlist ) do local nicks = getBanNick(bans) triggerClientEvent(source, "refreshBanList", source, nicks) end end addEvent("onRefreshBanList", true) addEventHandler("onRefreshBanList", root, getAllBans) Client: function listabans() if source == refreshButton then listRefresh() end end addEventHandler("onClientGUIClick", root, listabans) function bans(nombres, seriales, banners, razones, fechas) local namerow = guiGridListAddRow(banList) guiGridListSetItemText ( banList, namerow, 0, nombres, false, false ) end addEvent("refreshBanList", true) addEventHandler("refreshBanList", root, bans) function listRefresh () triggerServerEvent("onRefreshBanList", root) end Error on debug: WARNING: adminPanel\panel.lua:495: Bad argument @ 'guiGridListSetItemText' [Expected strig at argument 4, got boolean] Can anybody help me? Thanks in advance! Link to comment
TAPL Posted April 21, 2013 Share Posted April 21, 2013 If i am not wrong, at line 10 the first column id is 1 not 0. And at line 16, you should use localPlayer instead of root. 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