View Single Post
  #11  
Old 03-14-2010, 05:34 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Exclamation Attempted to Create A window my self

Tried to learn how to use the GUI Editor.

Can someone tell me where I made an error? Because in RC, it doesn't say any errors.

It worked, but It doesn't come up when I press the key "9"

PHP Code:
function onKeyPressedcodekey )
{
  if ( 
key == "9" )
  {
    
triggerserver"gui"name"getMessage" );
  }

Or When on a chat command.


PHP Code:
function onPlayerChats()
{
  if ( 
player.chat == ":test" )
  {
    
triggerserver"gui"name"getMessage" );
  }

Here's the full code
PHP Code:
//#CLIENTSIDE
function onKeyPressedcodekey )
{
  if ( 
key == "9" )
  {
    
triggerserver"gui"name"getMessage" );
  }

function 
onPlayerChats()
{
  if ( 
player.chat == ":test" )
  {
    
triggerserver"gui"name"getMessage" );
  }
}  

function 
onCreated() {
  new 
GuiWindowCtrl("test_Window1") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "114,94";

    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Poll";
    
585;
    
265;

    new 
GuiCheckBoxCtrl("test_CheckBox1") {
      
profile GuiBlueCheckBoxProfile;
      
height 20;
      
text "Yes";
      
width 100;
      
13;
      
31;
    }
    new 
GuiCheckBoxCtrl("test_CheckBox2") {
      
profile GuiBlueCheckBoxProfile;
      
height 20;
      
text "No";
      
width 100;
      
13;
      
56;
    }
    new 
GuiTextCtrl("test_Text1") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Do you like pie?";
      
width 75;
      
9;
      
7;
    }
  }

Can someone please help!
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?

Last edited by jkldogg; 03-14-2010 at 06:04 PM.. Reason: help
Reply With Quote