PDA

View Full Version : clientside on serverside


Angel_Light
08-23-2006, 11:41 PM
Does anyone know how I can use this on serverside?

with (Message_Text) {
addText("\n" @ client.message, true);
scrollToBottom();
}

I'm creating a somewhat message sys and I need it to update for all players.

I've tried many things but nothing I've tried has work. :/ Help if ya can. Please.

excaliber7388
08-23-2006, 11:46 PM
You could put it on clientside, and have it read a serverside flag.

Skyld
08-23-2006, 11:52 PM
GUI controls won't work serverside, full stop. Do what you are trying to do clientside, and use a triggeraction or so.

Angel_Light
08-23-2006, 11:58 PM
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.

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


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?

Angel_Light
08-26-2006, 07:09 AM
Help?

Angel_Light
08-27-2006, 07:27 PM
Someone Please help? O_o

excaliber7388
08-27-2006, 07:44 PM
Your formatting is terrible, which is one way of saying I have no idea wtf is going on in that script. I wish I could help, I hate to see someone with a problem for this long.
Here's how most people format their script here:
http://forums.graalonline.com/forums/showthread.php?t=61805
It could help us or you find the problem. :)

xXziroXx
08-27-2006, 07:46 PM
Your formatting is terrible, which is one way of saying I have no idea wtf is going on in that script. I wish I could help, I hate to see someone with a problem for this long.
Here's how most people format their script here:
http://forums.graalonline.com/forums/showthread.php?t=61805
It could help us or you find the problem. :)

Was about to say the same. You could always use the /style command on RC if you are lazy.

Angel_Light
08-27-2006, 08:15 PM
I understand my formatting easier than the one you guys use. :/

Skyld
09-01-2006, 01:12 AM
I understand my formatting easier than the one you guys use. :/
Then don't expect help. If we can't easily read and understand it, how are we going to help you?