PHP Code:
//#CLIENTSIDE
function onCreated()
{
echo("ll3");
this.counter = 0;
}
public function adminMsg( amsg )
{
echo("ll4");
this.amsg = amsg.tokenize("\b");
this.awindow = _createWindow( this.amsg.size() );
echo("l2: " @ this.awindow.text);
this.awindow.visible = true;
GUIContainer.addControl( this.awindow );
}
function _createWindow( alines )
{
this.windowname = "AdminMsg_Window_" @ this.counter;
this.alines = alines;
( @ this.windowname ) = new GuiWindowCtrl();
with( ( @ this.windowname ) )
{
visible = false;
profile = "GuiBlueWindowProfile";
width = 300;
height = thiso.alines * 16 + 25;
x = screenwidth / 2 - width / 2;
y = screenheight / 2 - height / 2;
canClose = true;
onclosequery=true;
thiso.catchevent( this, "onCloseQuery", "onCloseWindow" );
canMinimize = canResize = canMaximize = false;
text = "Admin Message";
canMove = true;
}
this.counter++;
echo( "l: " @ this.windowname );
echo( "l1" @ ( @ this.windowname ).text );
return ( ( @ this.windowname ) );
}
function onCloseWindow()
{
player.chat = params[0].text;
}
it should return the window object but for some reason it doesnt o.o
output:
Quote:
ll3
ll4
l: AdminMsg_Window_0
l1Admin Message
l2:
|