View Single Post
  #1  
Old 07-14-2009, 02:23 AM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
Post event script help! NEW!

hi, im making this event script, called trivia. Basically, the events team actiongrabs a block, Im using block.png, and when he grabs it, a gui pops up and he types any question he can think of in a textedit gui, and he has to put the answer in the textedit gui below that. For some reason, when he hits apply, the question doesnt appear above the block. And when the player says the right answer, it doesnt show that they said the right answer D;.

Heres the script, please help:

PHP Code:
//#CLIENTSIDE
function onCreated() {
function 
onActionGrab()
 {
if (
player.guild == "Events Team")
  {
MyGUI_Window1.visible=true;
 }
} 
  new 
GuiWindowCtrl("MyGUI_Window1") {
    
profile = GuiBlueWindowProfile;
    
clientrelative = true;
    
clientextent = "389,225";

    
canmove = true;
    
canresize = true;
    
closequery = false;
    
destroyonhide = false;
    
text = "                                                     Trivia!";
    
x = 274;
    
y = 224;

    new 
GuiTextCtrl("MyGUI_Text1") {
      
profile = GuiBlueTextProfile;
      
height = 20;
      
text = "What is your question?";
      
width = 111;
      
x = 136;
      
y = 16;
    }
    new 
GuiTextEditCtrl("MyGUI_TextEdit1") {
      
profile = GuiBlueTextEditProfile;
      
height = 20;
      
width = 304;
      
x = 34;
      
y = 53;
    }
    new 
GuiTextCtrl("MyGUI_Text2") {
      
profile = GuiBlueTextProfile;
      
height = 20;
      
text = "What is the answer to your question?";
      
width = 182;
      
x = 100;
      
y = 89;
    }
    new 
GuiTextEditCtrl("MyGUI_TextEdit2") {
      
profile = GuiBlueTextEditProfile;
      
height = 20;
      
width = 302;
      
x = 36;
      
y = 127;
    }
    new 
GuiButtonCtrl("MyGUI_Button1") {
      
profile = GuiBlueButtonProfile;
      
height = 37;
      
text = "Apply";
      
width = 80;
      
x = 151;
      
y = 169;
    }
  }
}

function 
MyGUI_Button1.onAction() {
  
// Button "Apply" has been pressed
MyGUI_Window1.visible=false;
message SPC "MyGUI_TextEdit1" SPC;
 }
function 
onPlayerChats()
{
if (
player.chat == "MyGUI_TextEdit1")
{
player.chat = "I got the answer right!";
 }
else
player.chat = "";
} 
THanks so much [;

-jamerson =]
Reply With Quote