Author Topic: Miniexecs...  (Read 877 times)

A quick question, is it possible to do something like this:
Code: [Select]
$Scriptpackage_scriptone=0;
$Scriptpackage_scripttwo=1;
if($Scriptpackage_scriptone){
function servercmdscriptone(%client){
echo("one");
}
}
if($Scriptpackage_scripttwo){
function servercmdscripttwo(%client){
echo("two");
}
}
To enable and disable parts of the script without using other files and execs?
No, I do not mean update the file ingame by just saying $script=0;
I mean to pick and choose which parts load at start-- erm, when it execs-- without commenting them out ect.


Code: [Select]
$script1 = true;
$script2 = false;

package script1
{
     function serverCmdscript1(%client)
     {
          echo(script1);
     }
};

if($script1)
{
     activatePackage(script1);
}

package script2
{
     function serverCmdscript1(%client)
     {
          echo(script22);
     }
};

if($script2)
{
     activatePackage(script2);
}

Code: [Select]
$script1=true;
$script2=false;

function script1(){
  if(!$script1)
   return;
  //code here
}

function script2(){
  if(!$script2)
   return;
  //code here
}