Thread: Donator Tab

Results 1 to 10 of 10
  1. #1 Donator Tab 
    Aymen
    Guest
    im trying to make a donator tab and need to be donator only to click it i add this to loginhandler.java

    Code:
    				if (c.isDonator > 0 && c.isDonator < 5  && c.playerRights > 1  && c.playerRights < 5 ) {
    		c.setSidebarInterface(15, 12855);//donor
    			} else  {
    		c.sendMessage("You need to be donator to open this tab");
    		
    		}
    and even if you are not donator or rights +1 you can still click it

    can someone help me please?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2012
    Posts
    561
    Thanks given
    43
    Thanks received
    53
    Rep Power
    72
    This would make it so that you either are a player with donator status, or an admin or higher:
    Code:
    if (c.isDonator > 0 && c.isDonator < 5  || c.playerRights > 1  && c.playerRights < 5 ) {
    This would make it so that you need to be a donator, regardless of your rights (Moderator, Admin etc..)
    Code:
    if (c.isDonator > 0 && c.isDonator < 5) {
    Reply With Quote  
     

  3. #3  
    Aymen
    Guest
    Quote Originally Posted by I No Mercy I View Post
    This would make it so that you either are a player with donator status, or an admin or higher:
    Code:
    if (c.isDonator > 0 && c.isDonator < 5  || c.playerRights > 1  && c.playerRights < 5 ) {
    This would make it so that you need to be a donator, regardless of your rights (Moderator, Admin etc..)
    Code:
    if (c.isDonator > 0 && c.isDonator < 5) {
    tried that already still didnt work :/
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2012
    Posts
    561
    Thanks given
    43
    Thanks received
    53
    Rep Power
    72
    Quote Originally Posted by Ace View Post
    tried that already still didnt work :/
    What exactly do you want?
    Staff being able to open them no matter what?
    Reply With Quote  
     

  5. #5  
    Aymen
    Guest
    Quote Originally Posted by I No Mercy I View Post
    What exactly do you want?
    Staff being able to open them no matter what?
    i want that tab to be able to be clicked\opened if you are donator and if you are not when you click on that tab it sends that message
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jan 2012
    Posts
    561
    Thanks given
    43
    Thanks received
    53
    Rep Power
    72
    Code:
    if (c.isDonator > 0) {
    	c.setSidebarInterface(15, 12855);//donor
    } else  {
    	c.sendMessage("You need to be donator to open this tab");
    }
    ?
    Reply With Quote  
     

  7. #7  
    Aymen
    Guest
    Quote Originally Posted by I No Mercy I View Post
    Code:
    if (c.isDonator > 0) {
    	c.setSidebarInterface(15, 12855);//donor
    } else  {
    	c.sendMessage("You need to be donator to open this tab");
    }
    ?
    tried that

    when i add the code i posted




    when i just add the setsidebarinterface:
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jan 2012
    Posts
    561
    Thanks given
    43
    Thanks received
    53
    Rep Power
    72
    Quote Originally Posted by Ace View Post
    tried that

    when i add the code i posted




    when i just add the setsidebarinterface:
    It's as simple as this:

    If you login with isDonator higher then 0, with this code:
    Code:
    if (c.isDonator > 0) {
    	c.setSidebarInterface(15, 12855);//donor
    } else  {
    	c.sendMessage("You need to be donator to open this tab");
    }
    The sidebar will load.

    So if you used that code and it didn't load, then your isDonator must be zero or lower.

    Make sure it reads your isDonator before you load the sidebar.
    Reply With Quote  
     

  9. #9  
    Aymen
    Guest
    Quote Originally Posted by I No Mercy I View Post
    It's as simple as this:

    If you login with isDonator higher then 0, with this code:
    Code:
    if (c.isDonator > 0) {
    	c.setSidebarInterface(15, 12855);//donor
    } else  {
    	c.sendMessage("You need to be donator to open this tab");
    }
    The sidebar will load.

    So if you used that code and it didn't load, then your isDonator must be zero or lower.

    Make sure it reads your isDonator before you load the sidebar.
    even with donator it does not load?
    Reply With Quote  
     

  10. #10  
    oof


    Join Date
    Aug 2012
    Posts
    3,150
    Thanks given
    2,847
    Thanks received
    857
    Rep Power
    2260
    On phone.
    Code:
    if (isDonator != 0)
    setSidebarInterface blablabla
    else
    sendMessage(stuff);
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Pi Donator Tab Edit.
    By iibandosii in forum Help
    Replies: 5
    Last Post: 02-29-2012, 11:42 PM
  2. Buying, Donation tab and page
    By mmm cinnamon in forum Buying
    Replies: 1
    Last Post: 01-17-2012, 07:38 AM
  3. Replies: 5
    Last Post: 05-09-2011, 01:31 AM
  4. Donator Tab!
    By JavaKing in forum Help
    Replies: 1
    Last Post: 02-11-2011, 08:31 AM
  5. Adding buttons to the Donator tab
    By shotme in forum Help
    Replies: 2
    Last Post: 01-16-2011, 07:41 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •