Command limits

For all mod-related questions and custom code.
Post Reply
BobKare
Offline
Posts: 279
Joined: May 26th, 2011, 2:15 pm

Command limits

Post by BobKare »

I've modded a simple /Slap command, and I would like to make it so the server owner can set a custom max.rank limit to it, like you do in the Rank tab in ConfigTool.

I can't find where these are specified, and where I do add them.
Could someone help me?

I hope I've explained well enough,

-BobKare

Jonty800
Offline
Posts: 280
Joined: August 21st, 2011, 6:31 am
Location: United Kingdom
Contact:

Re: Command limits

Post by Jonty800 »

Easiest way:

1. Press CTRL+F and search the entire source for

Code: Select all

 permissionLimitBoxes[Permission.Kick] = new PermissionLimitBox( "Kick limit", Permission.Kick, DefaultPermissionLimitString );
2. Go to the end of that section and paste:

Code: Select all

permissionLimitBoxes[Permission.Slap] = new PermissionLimitBox("Slap limit", Permission.Slap, DefaultPermissionLimitString);


This section is placed under:

Code: Select all

readonly Dictionary<Permission, PermissionLimitBox> permissionLimitBoxes = new Dictionary<Permission, PermissionLimitBox>();

        const string DefaultPermissionLimitString = "(own rank)";
        void FillPermissionLimitBoxes() {
Last edited by Jonty800 on April 1st, 2012, 11:10 am, edited 1 time in total.
You cannot use certain BBCodes: [img].

BobKare
Offline
Posts: 279
Joined: May 26th, 2011, 2:15 pm

Re: Command limits

Post by BobKare »

Thanks.

User avatar
LiamRayStanley
OP
Offline
Posts: 151
Joined: February 9th, 2012, 2:09 pm
Contact:

Re: Command limits

Post by LiamRayStanley »

i was about to ask this lol
<+FCB>Arvarna: i think your banhammer needs a downgrade

Post Reply