Author Topic: Real admin only duplicator  (Read 1142 times)

Right now with the current way the duplicator is set up, if you set it to admin only players can still take it out and be annoying with it. With this edit to the mod it would not even let normal players take out the duplicator at all if it's set to admin only.
 

This could probably be done with a simple script edit.

This could probably be done with a simple script edit.
And you are right.

Code: [Select]
package noAdminDupe
{
   function serverCmdDuplicator(%cl)
   {
      if(!%cl.isAdmin && $Pref::Duplorcator::AdminOnly)
      return;

      parent::serverCmdDuplicator(%cl);
   }
};
activatePackage(noAdminDupe);
« Last Edit: January 08, 2014, 09:37:12 AM by swollow »

-snip-

They will still be able to spawn the duplicator and pick it up.

I'm sure the issue is the command here, if you could spawn it on a brick you could annoy people with other tools also

Packaged for convenience

I'm sure the issue is the command here, if you could spawn it on a brick you could annoy people with other tools also

Packaged for convenience
cool, would this replace the duplicator addon or should it run along side it

I'm sure the issue is the command here, if you could spawn it on a brick you could annoy people with other tools also
Yeah but it's not like it's hard to remove it from the spawn list.
You could just throw <itemName>.uiName=""; in there, I don't think I've ever seen anybody actually use it through placing it on a brick.
If you wanted to be fancy you could package the serverCmd for setting wrench properties, and check what is being set as an item

cool, would this replace the duplicator addon or should it run along side it
It runs along with the newer version, the duplorcator

If you wanted to be fancy you could package the serverCmd for setting wrench properties, and check what is being set as an item
Done
https://dl.dropboxusercontent.com/u/50959273/Blockland%20Private/Server_AdminOnlyDupeCmd.zip
Non-admin players can't spawn duplicators on bricks or use the duplicator command when the duplicator is on admin only mode
accompanied by a center print telling them it's admin only

Done
https://dl.dropboxusercontent.com/u/50959273/Blockland%20Private/Server_AdminOnlyDupeCmd.zip
Non-admin players can't spawn duplicators on bricks or use the duplicator command when the duplicator is on admin only mode
accompanied by a center print telling them it's admin only
amazing

You should probably package using the item (servercmdUseTool) instead, since any brick that had the Duplicator set on it before the setting was changed would always have the Duplicator available for non-admins.

I doubt such instances would occur since this mod would probably be used for a server with a minigame running