Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-08-2012, 02:54 PM
InfamousPride InfamousPride is offline
Asst. Manager of GA
InfamousPride's Avatar
Join Date: Feb 2012
Location: Florida
Posts: 59
InfamousPride is an unknown quantity at this point
Send a message via AIM to InfamousPride
Trouble with GUI

I am trying to make this GUI appear on login (like it was before I changed a few things) but it stopped. What's missing/incorrect.

NPC Code:
//#CLIENTSIDE
function onActionPlayerOnline() {
new GuiWindowCtrl("OnLogin") {
profile = GuiBlueWindowProfile;
x = 150;
y = 150;
height = 412;
width = 187;
text = "Graal Apocalypse";

closequery = true;
canminimize = true;
canmaxamize = true;
}
}



I have already put it in NPC Control.
Reply With Quote
  #2  
Old 12-08-2012, 04:50 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Your GUI code should go in a weapon which is added to players on login. onActionPlayerOnline is only called in the Control-NPC, and only serverside.

In Control-NPC
Graal Script Code:
function onActionPlayerOnline() {
  
// eventually you'll want to set up an array or so here of weapons and
  // loop through them rather than adding another addWeapon line per weapon
  // since most servers tend to add a dozen or more weapons on login
  
player.addWeapon("LoginGUI");

In weapon LoginGUI:
Graal Script Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowCtrl(...) {
    
// etc
  
}

__________________
Reply With Quote
  #3  
Old 12-08-2012, 05:01 PM
InfamousPride InfamousPride is offline
Asst. Manager of GA
InfamousPride's Avatar
Join Date: Feb 2012
Location: Florida
Posts: 59
InfamousPride is an unknown quantity at this point
Send a message via AIM to InfamousPride
I originally was using function onCreated() but was told it was incorrect use for this >.<

Thanks for the help

+rep when I get the chance.
Reply With Quote
  #4  
Old 12-08-2012, 10:19 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by InfamousPride View Post
I originally was using function onCreated() but was told it was incorrect use for this >.<
You either misunderstood, or whoever told you did not know what they were talking about.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:50 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.