View Single Post
  #7  
Old 08-04-2011, 11:34 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Gunderak View Post
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.810;
  
ChatBar.0;
  new 
GuiScrollCtrl("Chat_Text_Scroll") {
    
profile GuiBlueScrollProfile;
    
height 100;
    
hscrollbar "dynamic";
    
vscrollbar "dynamic";
    
width 600;
    
0;
    
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.chatfalse);
    
Chat_Text.scrolltobottom();
    return;
  }
  
Chat_Text.addtext("<br>"@player.nick@": "@player.chatfalse);
  
Chat_Text.scrolltobottom();

That's not ideal, but better than yours.
Reply With Quote