Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-04-2011, 02:25 AM
BboyEatsbacon BboyEatsbacon is offline
The Bacon Man
BboyEatsbacon's Avatar
Join Date: Feb 2011
Location: United States
Posts: 60
BboyEatsbacon will become famous soon enough
Post IRC Tabs Not Functioning Properly

Okay, so we used xAndrewx's IRC tabs and it's not working properly....
Weapon: -System/Report
PHP Code:
function onActionServerSide() {
  if (
params[0] == "SendReport") {
    for (
temp.rcIRC.rcplayers)
    
temp.rc.sendtoirc("privmsg""REPORT""Reports"params[1] @ " reported " params[3] @ " for " params[2]);
    
player.chat "Report Sent Successfully!";
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/report") {
    
John612_ReportGUI_Window1.show();
    new 
GuiWindowCtrl("John612_ReportGUI_Window1") {
      
profile GuiBlueWindowProfile;
      
clientrelative true;
      
clientextent "137,282";

      
canclose false;
      
canmaximize false;
      
canmove true;
      
canresize true;
      
closequery false;
      
destroyonhide false;
      
text "Report";
      
226;
      
3;

      new 
GuiTextEditCtrl("John612_ReportGUI_TextEdit1") {
        
profile GuiBlueTextEditProfile;
        
height 20;
        
width 89;
        
26;
        
22;
      }
      new 
GuiTextCtrl("John612_ReportGUI_Text1") {
        
profile GuiBlueTextProfile;
        
height 20;
        
text "Account";
        
width 48;
        
46;
        
1;
      }
      new 
GuiTextCtrl("John612_ReportGUI_Text2") {
        
profile GuiBlueTextProfile;
        
height 20;
        
text "Reason";
        
width 45;
        
47;
        
49;
      }
      new 
GuiScrollCtrl("John612_ReportGUI_MultiLineEdit1_Scroll") {
        
profile GuiBlueScrollProfile;
        
height 127;
        
hscrollbar "dynamic";
        
vscrollbar "dynamic";
        
width 132;
        
2;
        
74;

        new 
GuiMLTextEditCtrl("John612_ReportGUI_MultiLineEdit1") {
          
profile GuiBlueMLTextEditProfile;
          
height 17;
          
horizsizing "width";
          
width 107;
        }
      }
      new 
GuiButtonCtrl("John612_ReportGUI_Button1") {
        
profile GuiBlueButtonProfile;
        
text "Send Report";
        
width 87;
        
26;
        
209;
      }
      new 
GuiButtonCtrl("John612_ReportGUI_Button2") {
        
profile GuiBlueButtonProfile;
        
text "Cancel";
        
width 87;
        
26;
        
246;
      }
    }
  }
}

function 
John612_ReportGUI_Button1.onAction() {
  if (
John612_ReportGUI_MultiLineEdit1.text == "" || John612_ReportGUI_TextEdit1.text == "") {
    
player.chat "Please Fill Out All Forms Completely!";
  }
  else {
    
triggerserver("gui"name"SendReport"player.accountJohn612_ReportGUI_MultiLineEdit1.textJohn612_ReportGUI_TextEdit1.text);
    
John612_ReportGUI_Window1.hide();
    
John612_ReportGUI_MultiLineEdit1.text "";
    
John612_ReportGUI_TextEdit1.text "";
  }
}

function 
John612_ReportGUI_Button2.onAction() {
  
John612_ReportGUI_Window1.hide();
  
John612_ReportGUI_MultiLineEdit1.text "";
  
John612_ReportGUI_TextEdit1.text "";

Control NPC: IRC
PHP Code:
  temp.oldrcplayers this.rcplayers;
  
this.rcplayers = {"Graal771281""Graal756538"};
  
this.clientrcplayers = {"Graal771281""Graal756538"};
    
  for (
temp.plallplayers) {
    if (
temp.pl.level == NULL) {
      if (
temp.pl.adminlevel >= 1) {
      }
      continue;
    }
      
    if (
temp.pl.adminlevel >= 1)
      
this.clientrcplayers.add(temp.pl);
  } 

Can anyone tell me what I'm missing?
It's not adding any text/chat to the "Reports" tab when it's called to...
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.