Author Topic: City RPG Duplicator Issue  (Read 714 times)

There's a City RPG that I'm helping with but there's a problem where the host won't let me use the duplicator because whenever he tries to make it admin only regular players can still use it
 (this lets them duplicate drug bricks)
is there a script that can prevent duplicating drugs?  I'd appreciate the help

There's a City RPG that I'm helping with but there's a problem where the host won't let me use the duplicator because whenever he tries to make it admin only regular players can still use it
 (this lets them duplicate drug bricks)
is there a script that can prevent duplicating drugs?  I'd appreciate the help
Seems like the method used to try to restrict planting the brick just isn't effective. To fix this, we would need the source code of the mod so we can implement a different way to restrict brick planting.

This should prevent spawning drugs with the duplicator:

package Whatever
{
    function FxDtsBrick::plant(%this)
    {
        if(%this.getDatablock().isDrug && isObject(%this.client) && !%this.client.isAdmin)
            return 6;

        return parent::plant(%this);
    }
};
activatePackage(Whatever);


You'll have to change isDrug to whatever variable you use to mark a brick as a drug. Do not make a slow check based on the datablock names!