Author Topic: Play Gui  (Read 930 times)

I am making a small little gamemode but I have run in to a problem, is there a way to make it so that
Code: [Select]
if($Survivor = 1)
{
use this play gui
}
else if $Survivor = 0
{
use the default gui
}

I'm not sure, I don't think all the blockland server to client stuff would work, it'd probably update all the stuff for the default gui.

I recently wrote a script for an RPG-in-the-making that attaches extra elements (in the form of another GUI) to the existing PlayGUI using PlayGUI.add().

Basically, I made a GUI (called SRPG_HUD) containing the extra elements I wanted to attach to the PlayGUI, then used a script to add it in.

Code: [Select]
package srpgHUD
{
   function playGUI::onWake(%this)
   {
      if($connectedToSRPG)
      {
         PlayGUI.add(SRPG_HUD);
      }
      parent::onWake(%this);
   }
};
activatePackage(srpgHUD);

The client would need an Add-On with client scripts/GUIs to be able to do this, though.
« Last Edit: January 09, 2009, 09:16:15 PM by SolarFlare »