Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onActionServerSide() {
- if (params[0] == "sendchat") {
- for (pl : allplayers) {
- if (pl.level == findplayer(params[3]).level) {
- triggerclient("gui", this.name, "displaychat", params[1], params[2]);
- }
- }
- }
- }
- //#CLIENTSIDE
- function onCreated() {
- onTimeOut();
- }
- function onPlayerLogin(pl) {
- ChatBar.width = 300;
- ChatBar.alpha = 0.6;
- ChatBar.useownprofile = true;
- ChatBar.profile.bitmap = "Test_textedit.png";
- ChatBar.height = 25;
- ChatBar.y = GraalControl.height - 28;
- ChatBar.x = 5;
- }
- function onTimeOut() {
- if (ChatBar.visible = true) {
- ShowChat();
- if (this.dropdown == true) {
- Chat_WindowScroll.scrollto(100000, 100000);
- this.dropdown = false;
- }
- }
- else {
- this.dropdown = true;
- Chat_Window.hide();
- Chat_WindowScroll.hide();
- }
- setTimer(0.05);
- }
- function ShowChat() {
- Chat_Window.show();
- Chat_WindowScroll.show();
- new GuiScrollCtrl("Chat_WindowScroll") {
- profile = GuiBlueScrollProfile;
- x = 5;
- y = GraalControl.height - 130;
- width = 300;
- height = 100;
- hScrollBar = "dynamic";
- vScrollBar = "alwaysOn";
- new GuiMLTextCtrl("Chat_Window") {
- profile = GuiBlueMLTextProfile;
- horizsizing = "width";
- width = 279;
- }
- }
- }
- function onPlayerChats() {
- Chat_WindowScroll.scrollto(100000, 100000);
- triggerserver("gui", this.name, "sendchat", player.account, player.chat, player.account);
- }
- function ChatBar.onAction(){
- }
- function onActionClientside() {
- if (params[0] == "displaychat") {
- Chat_Window.addtext(params[1] @ ":" SPC params[2] @ "<p></p>", true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement