Author Topic: Halloween mod jail.  (Read 1415 times)

racha dont be mean to jetz hes just help you!

racha dont be mean to jetz hes just help you!
He's not being all that helpful though...  But you're right, I could be a bit nicer.

A start would be telling me what happens when you try to jail somebody. I'm under the assumption that you know what you're doing and how this script you're writing works. So far, you seem to know how to correct the problems I present.

A start would be telling me what happens when you try to jail somebody. I'm under the assumption that you know what you're doing and how this script you're writing works. So far, you seem to know how to correct the problems I present.

It still "frees" them, but they join the mini I believe, since they can't pick up weapons from the dedimini.

That would be the problem.  Sorry I haven't been replying, I was on a trip to Stratford.

Quote
function ServerCmdJail(%client,%target)
{   
      if(!BCDB.ExistUser(%target)) //If the key exists (well it's most likley a BL_ID unless your not using BL_ID keys)
   {
      %target = findClientByName(%target);
      if(!isObject(%target))
      {
         messageClient(%client, "", "Player not found!");
         return;
      }
      %targetName = %target.netName;
      %targetID = %target.BL_ID;
   } else {
      %targetName = "BL_ID: "@%target@"";
      %targetID = %target;
         }
   
   if($JMini.isMember(%target))
   {
         %client.recentlyJoined = schedule(30000, 0, "clearrecentlyJoined");

      $JMini.removeMember(%target);
      if(isobject(%target.player)) %target.player.kill();
      $DediMini.addMember(%target);
   
      if(isFile("Add-Ons/Event_Variables/server.cs"))
      {
         %target.blockVCE[%target.BL_ID] = %target.oldblockVCE[%target.BL_ID];
         %target.oldblockVCE[%target.BL_ID] = "";
      }

      messageAll("","\c6" @ %target.netName SPC "\c4" @ "has been freed.");
      return;
   }
}
Count your brackets. This is reguarded as the full function, and everything below it gets forgotten after the script tries it when being executed and becomes confused. Reposition the last bracket in the quote above.

Count your brackets. This is reguarded as the full function, and everything below it gets forgotten after the script tries it when being executed and becomes confused. Reposition the last bracket in the quote above.
Thank you!  It worked perfectly, but now I need to edit simplespawn to allow the jail spawn.  I also need to make it not allow you to join the dm if you are jailed, because when you exit the dm you go back to the dedimini.