It is currently January 21st, 2018, 10:19 am


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Command limits
PostPosted: March 31st, 2012, 7:40 pm 

Joined: May 26th, 2011, 2:15 pm
Posts: 279
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


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Command limits
PostPosted: March 31st, 2012, 7:58 pm 

Joined: August 21st, 2011, 6:31 am
Posts: 280
Location: United Kingdom
Easiest way:

1. Press CTRL+F and search the entire source for
Code:
 permissionLimitBoxes[Permission.Kick] = new PermissionLimitBox( "Kick limit", Permission.Kick, DefaultPermissionLimitString );


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




This section is placed under:
Code:
readonly Dictionary<Permission, PermissionLimitBox> permissionLimitBoxes = new Dictionary<Permission, PermissionLimitBox>();

        const string DefaultPermissionLimitString = "(own rank)";
        void FillPermissionLimitBoxes() {

_________________
You cannot use certain BBCodes: [img].


Last edited by Jonty800 on April 1st, 2012, 11:10 am, edited 1 time in total.

Top
Offline Profile  
Reply with quote  
 Post subject: Re: Command limits
PostPosted: March 31st, 2012, 9:11 pm 

Joined: May 26th, 2011, 2:15 pm
Posts: 279
Thanks.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Command limits
PostPosted: April 9th, 2012, 4:24 am 
OP
User avatar

Joined: February 9th, 2012, 2:09 pm
Posts: 151
i was about to ask this lol

_________________
<+FCB>Arvarna: i think your banhammer needs a downgrade


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net