Quote:
Originally Posted by fowlplay4
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.className: temp.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.