Page 1 of 1
Command limits
Posted: March 31st, 2012, 7:40 pm
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
Re: Command limits
Posted: March 31st, 2012, 7:58 pm
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() {
Re: Command limits
Posted: March 31st, 2012, 9:11 pm
by BobKare
Thanks.
Re: Command limits
Posted: April 9th, 2012, 4:24 am
by LiamRayStanley
i was about to ask this lol