Jump to content

Ajuda com GUI


Recommended Posts

Olá amigos! estou tentando criar uma grid para administrar os players, mas ele da um erro..

[2013-02-05 13:05:08] ERROR: [DayZ-MTA]\DayZ\padmin.lua:2: attempt to call global 'guiCreateGridList' (a nil value)

este aqui é o código:

function createPlayerList () 
        playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) 
        local column = guiGridListAddColumn( playerList, "Player", 0.85 ) 
        if ( column ) then 
                for id, playeritem in ipairs(getElementsByType("player")) do 
                        local row = guiGridListAddRow ( playerList ) 
                        guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) 
                end 
                addEventHandler ( "onClientGUIClick", playerList, click ) 
        end 
end 
addEventHandler("onPlayerJoin", getRootElement(), createPlayerList) 
  
function click ()  
       local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) 
       outputChatBox("Selecionei voce!", playerName) 
end 

Agradeço desde já! :)

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