function guiGridListAddPlayers( GridList, Column, Section, Number )
if( getElementType( GridList ) == "gui-gridlist" ) then
assert( tonumber( Column ), "Bad argument @ 'guiGridListAddPlayers' [Expected number at argument 2, got " .. tostring(Column) .. "]" )
if( Section == false or Section == true ) then
if( Number == false or Number == true ) then
for _, player in ipairs( getElementsByType('player') ) do
guiGridListClear( GridList )
local Row = guiGridListAddRow( GridList )
guiGridListSetItemText( GridList, Row, Column, getPlayerName(player), Section, Number )
end
else
error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 4, got " .. tostring(Number) .. "]")
end
else
error("Bad argument @ 'guiGridListAddPlayers' [Expected boolean at argument 3, got " .. tostring(Section) .. "]")
end
end
end
function guiGridListGetSelectedItemText ( gridList, column )
local item = guiGridListGetSelectedItem ( gridList )
if item then
return guiGridListGetItemText ( gridList, item, column or 1 )
end
return false
end
function gui(plr,cmd)
GUIEditor = {
gridlist = {},
window = {},
button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUI = guiCreateWindow(329, 141, 483, 549, "Panel moderatora by @Endo", false)
guiWindowSetSizable(GUI, false)
gridlista = guiCreateGridList(10, 24, 192, 350, false, GUI)
kolumna = guiGridListAddColumn(gridlista, "Gracze", 0.8)
prz1 = guiCreateButton(262, 47, 203, 65, "Kopnij", false, GUI)
prz2 = guiCreateButton(263, 134, 202, 79, "Mute", false, GUI)
prz3 = guiCreateButton(261, 247, 204, 81, "Ostrze?enie", false, GUI)
end
)
addEventHandler("p_m", gui)