View Single Post
  #1  
Old 08-04-2011, 09:05 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Customized Chat Script

Basically it will disable the default chat above the players head, and instead it will be placed in a box
if the player has clientr.isStaff added their name will be red.
thanks to mark sir link and cbk1994 for their help with this.
feel free to use it on your server if you want to,
but please do not claim it as your own

Here Is A Screenshot.

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();

__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 08-04-2011 at 10:09 AM..
Reply With Quote