guiCreateGridList | Multi Theft Auto: Wiki Skip to content

guiCreateGridList

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function creates a grid list GUI element. These are menu's which are designed in lists and can have multiple columns. A good example of a gridlist element can be found in MTA's settings box, under Controls.

Syntax

guiCreateGridList ( )

Code Examples

client

Example 1:This example creates a player list on the right of the screen with 1 column and fills it

local playerList = guiCreateGridList(0.80, 0.40, 0.15, 0.35, true)
guiGridListAddColumn(playerList, "Player", 0.85)
for _, player in ipairs(getElementsByType("player")) do
guiGridListAddRow(playerList, getPlayerName(player))
end

See Also

GUI Functions