Jump to content

get All Bans


Sasu

Recommended Posts

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

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