Jump to content

Refresh the gridlist.


Chaz-CR

Recommended Posts

Posted

So how the title says, i want to refresh the gridlist of the players when i open the panel, how can i do that? this is what i did with a loop.

    for id, playeritem in ipairs(getElementsByType("player")) do  
        local row = guiGridListAddRow ( gridlist ) 
           guiGridListSetItemText ( gridlist, row, playcol, string.gsub ( getPlayerName (playeritem), '#%x%x%x%x%x%x','' ), false, false ) 
    end 

Posted

watup Chaz, how you been? What you could also do to update the panel playerlist on events such as onClientPlayerJoin, onClientPlayerQuit, and onClientPlayerChangeNick. That way when you have the panel opened it just updates it automatically instead of opening and closing just so it refreshes.

Posted

Hey T-Bom I've been fine thanks. And i didn't know that. Those functions might be helpful in other resource I'm making, thanks for the help!

Posted

It all depends on how often that panel is used. If the panel is often used then you should constantly update it on these events, but if the panel is rarely used then there's no need for constant updating.

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