View Single Post
  #2  
Old 12-08-2012, 05: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
PHP 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:
PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowCtrl(...) {
    
// etc
  
}

__________________
Reply With Quote