| devilsknite1 |
10-12-2008 02:07 AM |
[Help] Message to all players through GUI
What I'm trying to do here is make a chat system such as Maloria has. The box instead of the chat bar. I know I didn't disable the chat bar, there's a reason for that.
PHP Code:
//#CLIENTSIDE
function onCreated() { new GuiWindowCtrl( "Opening_Window1" ) { profile = GuiBlueWindowProfile; clientrelative = true; clientextent = "909,145"; canmove = false; canresize = false; closequery = false; canclose = false; destroyonhide = false; canmaximize = false; canminimize = false; text = "Chat Box"; y = 535; // Text Stuff new GuiTextEditCtrl( "Opening_TextEdit1" ) { profile = GuiBlueTextEditProfile; height = 20; width = 795; y = 125; text = "Enter your message here then press send"; } // Send Button new GuiButtonCtrl( "Opening_Button1" ) { profile = GuiBlueButtonProfile; text = "Send"; width = 54; x = 795; y = 115; } // Clear Button new GuiButtonCtrl( "Opening_Button2" ) { profile = GuiBlueButtonProfile; text = "Clear"; width = 59; x = 849; y = 115; } // Text Scroll new GuiScrollCtrl( "Opening_MultiLine1_Scroll" ) { profile = GuiBlueScrollProfile; height = 113; hscrollbar = "dynamic"; vscrollbar = "dynamic"; width = 909; // Text new GuiMLTextCtrl( "Opening_MultiLine1" ) { profile = GuiBlueMLTextProfile; height = 16; horizsizing = "width"; text = ""; width = 884; } } } }
// Send Button function Opening_Button1.onAction() { if ( Opening_MultiLine1.text == "" ) { Opening_MultiLine1.text = player.account @ ":" SPC Opening_TextEdit1.text; sleep( 0.05 ); Opening_TextEdit1.text = ""; } else { Opening_MultiLine1.text = Opening_MultiLine1.text NL player.account @ ":" SPC Opening_TextEdit1.text; sleep( 0.05 ); Opening_TextEdit1.text = ""; } }
// Clear Button function Opening_Button2.onAction() { Opening_MultiLine1.text = ""; }
If you can help out with this, thanks in advance.
|