Jump to content

GUI Gridlist help?


bamby12

Recommended Posts

Theres a wiki page about this function. You should lurk more bro.

  
function clientsideResourceStart () 
  
         x,y = guiGetScreenSize(getLocalPlayer()) -- get your screen size 
  
         local col = guiCreateGridList ( x/2-200/2, y/2-400/2, 200, 400, false ) -- Creates the gridList 
  
         local TeamName = "gaylords" -- Change this to the team name 
  
   
  
       for i,v in ipairs(getElementsByType("player")) do -- Get all the server players 
       if (getPlayerTeam(v) == TeamName) then  -- Check id they are in that team... gaylords  
  
                        local row = guiGridListAddRow (col) -- Create the row 
                        guiGridListSetItemText ( playerList, row, col, getPlayerName (v), false, false ) -- Name the row as the player name 
  
        end  
    end 
end 
addEventHandler ( "onClientResourceStart", getRootElement(), clientsideResourceStart ) -- When the res start he will create the window and add all players 
  

This should work. Else, post /debugscript and TRY TO STUDY THE SCRIPT, not just control C control V

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