Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   RC on Player's Client (https://forums.graalonline.com/forums/showthread.php?t=68330)

gamer4lifebitach 08-24-2006 06:20 PM

RC on Player's Client
 
I need help im trying to make an RC for like faq's and et's gp's so they dont really need to get access from normal rcs and i just want to make one for fun too so ya please help.

PHP Code:

// NPC Made By *Devenio
//#CLIENTSIDE
function onCreated(){
  new 
GuiWindowCtrl("RC_Window") {
    
RC_Window.destroy();
  }
  
thiso.rcchat = {"Test","Test","Test","Test","Test","Test","Test","Test","Test","Test"};
}
function 
onWeaponfired(){
  
RC_Window.destroy();
  new 
GuiWindowCtrl("RC_Window") {
    
text "Remote Control 2006/08/24 - By *Devenio";
    
profile "RC_Window";
    
x=0;
    
y=0;
    
width 510;
    
height 385;
    
destroyonhide true;
    
canresize false;
    
canclose true;
    
canminimize true;
    
canmaximize false;
    new 
GuiTextEditCtrl("RC_Chatbar") {
      
profile "RC_Chatbar";
      
x=5;
      
y=360;
      
width 500;
      
height 20;
    }
    new 
GuiScrollCtrl("RC_Scrollbar") {
      
profile "RC_Scrollbar";
      
x=484;
      
y=190;
      
width 20;
      
height 170;
    }
    new 
GuiTextListCtrl("RC_Chat") {
      
profile "RC_Chat";
      
x=15;
      
y=195;
      for (
athiso.rcchat) {
        
RC_Chat.addRow(0,a);
      }
    }
  }



gamer4lifebitach 08-24-2006 10:01 PM

How do i make a red box show up where you cant dont anything to it but its inside a guiwindow already, and it goes behind text like the text box in the RC2???

Skyld 08-24-2006 10:17 PM

Quote:

Originally Posted by gamer4lifebitach
I need help im trying to make an RC for like faq's and et's gp's so they dont really need to get access from normal rcs and i just want to make one for fun too so ya please help.

Well, depending on what you want your Client RC to do, you have two options.
  • Use clientrc stuff, which provides the player with the ability to edit attributes, scripts, server flags etc. However, clientrc requires the player to have a normal RC.
  • Script your own routines for controlling players and such, but you will not be able to access anything RC-like.

Chris 08-24-2006 10:27 PM

RC for fun? Uhh that isn't good. Plus, how did your account name ever get approved?

gamer4lifebitach 08-25-2006 12:12 AM

if you dont like my account well than i dont care, next i want my rc to act like a normal rc (so i go with #1)

ApothiX 08-25-2006 10:18 AM

Few things I see wrong with your code right off the bat.

PHP Code:

new GuiWindowCtrl("RC_Window") {
  
RC_Window.destroy();


This should be:
[php]if(RC_Window != NULL) RC_Window.destroy();

PHP Code:

thiso.rcchat = {"Test","Test","Test","Test","Test","Test","Test","Test","Test","Test"}; 

You are not in the scope of another object, so you do not use thiso. like that. It should be: this.rcchat = ...

PHP Code:

RC_Window.destroy(); 

You'll get console errors like mad (especially if this is your first time firing the weapon since it was updated.) Use the method I said previously to destroy the window.

PHP Code:

new GuiWindowCtrl("RC_Window") {
  
profile "RC_Window"

Read the wiki to understand what profiles are. Setting the profile to the window which you are creating will result in some nasty effects. (This goes for all of the other controls you created aswell.)

PHP Code:

new GuiScrollCtrl("RC_Scrollbar") {
  
// ..
}
new 
GuiTextListCtrl("RC_Chat") {


You need to embed the second control in the first (this applies for the comment after this one, too)
PHP Code:

new GuiScrollCtrl("RC_Scrollbar") {
  
// ..
  
new GuiTextListCtrl("RC_Chat") {
    
// ..
  
}


PHP Code:

new GuiTextListCtrl("RC_Chat") { 

You should be using a GuiMLTextCtrl for the chat box. It will be less hassel, and it will give you that red box behind the text.


And something wrong with your attitude:
Quote:

Originally Posted by gamer4lifebitach
if you dont like my account well than i dont care

Your account name MAY be offensive to other people. In the case that it is, you should not react by telling them you don't care. Act like that and people will request deletion of your account by an admin. (You really should read the account creation rules before you create an account, anyway.)


All times are GMT +2. The time now is 06:46 AM.

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