Quote:
|
Originally Posted by excaliber7388
You could put it on clientside, and have it read a serverside flag.
|
I could but the message list get's added to so it would eventually be to big or so.
Quote:
|
Originally Posted by Skyld
GUI controls won't work serverside, full stop. Do what you are trying to do clientside, and use a triggeraction or so.
|
I am and it doeasnt work
PHP Code:
function onActionServerSide() {
if (params[0] == "Message") {
for (p: allplayers) {
p.client.message = params[1] SPC "-" @ params[2];
savelog2("PlayersGuiLog.txt","-" @ player.account @ " / " @ player.nick @ " - Said : " @ params[1] @ "; on the PMG!");
}
}
}
//#CLIENTSIDE
-snip-
new GuiWindowCtrl(Message_Window) {
profile = "GuiBlueTransWindowProfile";
canclose = true;
canmove = true;
canresize = true;
extent = "200 172";
minextent = "150 100";
canminimize = true;
canmaximize = true;
x = screenwidth-200;
y = 0;
title = true;
text = "Messages";
profile.fontSize = 14;
profile.fontColor = "255 255 255";
new GuiTextEditCtrl(Message_Chat) {
profile = "GuiBlueTextEditProfile";
horizSizing = "width";
vertSizing = "top";
x = 10;
y = Message_Window.height-28;
width = Message_Window.width-20;
height = 20;
historySize = 100;
tabComplete = true;
}
new GuiScrollCtrl(Message_Board) {
profile = "GuiBlueScrollProfile";
horizSizing = "width";
vertSizing = "height";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
position = "10 25";
width = Message_Window.width-20;
height = Message_Window.height-55;
scrollpos = "0,2";
new GuiMLTextCtrl(Message_Text) {
profile = "GuiBlueTextProfile";
profile.fontSize = 15;
position = "5 0";
horizSizing = "width";
allowcolorchars = true;
parsetags = true;
width = Message_Board.width-25;
height = Message_Board.height-5;
wordwrap = true;
text = "Welcome to Niromia's Public Message Gui, also known as PMG! Type in the box below and press enter to display your public message. No foul languange please. If caught You will be banned from the PMG as see fit by the adminstrator. All message's are logged too. -Niromia";
};
};
};
}
function Message_Chat.onAction() {
this.msg = Message_Chat.text;
this.sender = player.nick;
triggeraction( 0, 0, "serverside", this.name, "Message", this.msg, this.sender);
}
EDIT: Help?