Author Topic: Changing RTB Prefs through code  (Read 972 times)

If I do this:
Code: [Select]
function fxDTSBrick::setRendermenActive(%this,%bool) {
    $Pref::Rendermen::Enabled = %bool;
}
$brick.setRendermenActive($brick,1);
// ignore the fact that a brick is doing this - it's a hook for eventing

The " $Pref::Rendermen::Enabled " value will still be 0 in the server control menu. How do I change that?

Put this code after changing it:

Code: [Select]
   for(%i=0;%i<ClientGroup.getCount();%i++)
   {
      %cl = ClientGroup.getObject(%i);
      if(%cl.isSuperAdmin && %cl.hasRTB && %cl.hasPrefList)
         RTBSC_SendPrefValues(%cl);
   }
   RTBSC_savePrefValues();

Put this code after changing it:

Code: [Select]
   for(%i=0;%i<ClientGroup.getCount();%i++)
   {
      %cl = ClientGroup.getObject(%i);
      if(%cl.isSuperAdmin && %cl.hasRTB && %cl.hasPrefList)
         RTBSC_SendPrefValues(%cl);
   }
   RTBSC_savePrefValues();
Okay, ta.