try this o_o,
---- Clientsided
function cgui()
local sWidth, sHeight = guiGetScreenSize()
local Width,Height = 629,451
local X = (sWidth/2) - (Width/2)
local Y = (sHeight/2) - (Height/2)
GUIEditor_Button = {}
GUIEditor_Edit = {}
GUIEditor_Grid = {}
showCursor(true,true)
PM_Main_Window = guiCreateWindow(X,Y,Width,Height,"PM System by Pr0RaC3R v0.1 Alpha",false)
guiWindowSetSizable(PM_Main_Window,false)
GUIEditor_Grid[1] = guiCreateGridList(9,20,611,206,false,PM_Main_Window)
GUIEditor_Edit[1] = guiCreateEdit(9,226,611,141,"",false,PM_Main_Window)
guiEditSetMaxLength(GUIEditor_Edit[1],100)
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GUIEditor_Button[1] = guiCreateButton(181,379,240,56,"Send message",false,PM_Main_Window)
local column = guiGridListAddColumn(GUIEditor_Grid[1],"Player Name",0.2)
if (column) then
for id,player in ipairs (getElementsByType("player")) do
local row = guiGridListAddRow(GUIEditor_Grid[1])
guiGridListSetItemText(GUIEditor_Grid[1],row,column,getPlayerName(player),false,false)
end
end
end
function playerPressButton (button,state,AbsoluteX,AbsoluteY)
if (source == GUIEditor_Button[1]) then
local text = guiGetText (GUIEditor_Edit[1])
outputChatBox(tostring(text))
end
end
addCommandHandler("pm",cgui)