Put all the gui script in one part, but have the timeout somewhere else.
Example
PHP Code:
function onCreated()
{
LoadGui();
onTimeout();
}
function LoadGui()
{
new GuiWindowCtrl("Gui_Window") {
destroyonhide = false;
profile = "GuiRedTransWindowProfile";
profile.transparency = .5;
width = 70;
height = 60;
x = 10;
y = 10;
active = true;
visible = true;
canresize = false;
canmaximize = false;
canminimize = false;
canmove = false;
text = "GUI";
new GuiTextCtrl("GuiText") {
x = 10;
y = 23;
width = 124;
height = 20;
useownprofile = true;
profile.fontcolor = {1,1,1};
}
}
}
function onTimeout()
{
GuiText.setText("MP: "@player.mp);
setTimer(0.1);
}