Quote:
Originally Posted by Gunderak
Do you care to explain further please?
|
It's ugly/unreadable. Make sure your scripts look like this or similar so they are easily readable by yourself later and by other coders:
PHP Code:
function onActionServerSide() {
if (params[0] == "AddMessage") {
triggerclient("weapon", this.name, "AddMessage2");
}
}
//#CLIENTSIDE
function onCreated() {
ChatBar.width = 600;
ChatBar.alpha = 0.7;
ChatBar.profile = GuiBlueTextEditProfile;
ChatBar.height = 25;
ChatBar.y = 810;
ChatBar.x = 0;
new GuiScrollCtrl("Chat_Text_Scroll") {
profile = GuiBlueScrollProfile;
height = 100;
hscrollbar = "dynamic";
vscrollbar = "dynamic";
width = 600;
x = 0;
y = 708;
new GuiMLTextCtrl("Chat_Text") {
profile = GuiBlueMLTextProfile;
height = 68;
horizsizing = "width";
text = "Welcome To "@servername@" "@player.nick@"."@"<br>"@"You Can Write /help For Help At Any Time!";
width = 575;
}
}
}
function onPlayerchats() {
if (player.chat == "/help") {
Chat_Text.addtext("<br>"@"<font color=black>"@"If You Get Stuck Anywhere Write ''Unstuck Me''"@"<br>"@"To See The Server News Write /news"@"<font color=white>", false);
return;
}
triggerserver("weapon", this.name, "AddMessage");
}
function onActionClientSide() {
if (params[0] == "AddMessage2") {}
if (player.chat.starts("/")) {
return;
}
if (player.chat.starts("warpto")) {
return;
}
if (player.chat.starts("update")) {
return;
}
if (player.chat.starts("unstuck")) {
return;
}
if (player.chat.starts("set")) {
return;
}
if (clientr.isStaff) {
Chat_Text.addtext("<br>"@"<font color = red>"@player.nick@": "@"<font color=white>"@player.chat, false);
Chat_Text.scrolltobottom();
return;
}
Chat_Text.addtext("<br>"@player.nick@": "@player.chat, false);
Chat_Text.scrolltobottom();
}
That's not ideal, but better than yours.