Thread: Maloria Updates
View Single Post
  #40  
Old 01-15-2011, 05:27 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by fowlplay4 View Post
I'd guess there's a function destroying then re-creating the GUI in the same call.
Nah, I only create GUI's once per session and show/hide them the rest of the time.


Squirt, which client were you using?


I also fixed all class related errors by adding a new initializer weapon:

PHP Code:
function onActionServerSide(action)
{
  if (
action == "initialized") {
    
// First timer? Needs to create a character!
    
if (player.getStat("level") == NULL || clientr.class == NULL)
      
player.addWeapons({ "charCreation" });
    
// If not...
    
else
      
player.addWeapons({ "loginScreen" });
    
    
player.removeWeapon(name);
  }
}

//#CLIENTSIDE
function onCreated()
{
  
temp.classList = {
    
"functions_buffs",
    
"functions_items",
    
"functions_stats",
    
"functions_misc",
    
"gui_initializer",
    
"gui_basics",
    
"gui_buff",
    
"gui_item",
    
"gui_skill",
    
"gui_spell",
    
"player_system"
  
};
  
  for (
temp.classNametemp.classList) {
    
// Maybe the class is loaded already?
    
if (isClassLoaded(temp.className))
      continue;
    
    
loadClass(temp.className);
    
    while (!
isClassLoaded(temp.className))
      
sleep(0.05);
  }
  
  
triggerServer("gui"name"initialized""");

The player starts with ONLY that weapon, and when the classes are loaded properly, it adds either character creation or login weapons.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote