Thread: Donator only command

Results 1 to 4 of 4
  1. #1 Donator only command 
    Registered Member
    Join Date
    Jan 2014
    Posts
    142
    Thanks given
    9
    Thanks received
    0
    Rep Power
    11
    So i made a ::bank command it it only work as donator just as i want it to. But when regular players type ::bank it doesnt say anything

    I want it to say this as a regular player.

    Only donators can use this command!

    Here is my bank command,

    f (playerCommand.startsWith("bank") && c.playerRights == 4) {
    c.getPA().openUpBank();
    }
    Reply With Quote  
     

  2. #2  
    Retired From RSPS

    iGarrett's Avatar
    Join Date
    Dec 2013
    Posts
    461
    Thanks given
    144
    Thanks received
    110
    Rep Power
    187
    This is mine, you could build from it.

    Code:
    if (playerCommand.startsWith("bank") && Rights.DONOR) {
    ActionManager().openBankInterface();
    } else if(!Rights.DONOR) {
    ActionManager().sendPlayerMessage("You are not permitted to use this command");
    }
    Quote Originally Posted by i am here View Post
    I have never messed with Eclipse. Is it a whole new revision or type of code?
    Quote Originally Posted by bibl View Post
    hahaha, good one m9. "deob" is short for "deobfuscated" which is not the same as decompiled.
    I'm GEEGIN' OUT
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2014
    Posts
    142
    Thanks given
    9
    Thanks received
    0
    Rep Power
    11
    Thank's for the command bro just changed the !Rights.DONOR to Playerrights and it worked fine bro!

    Thanks man!

    +REP +THANKS
    Reply With Quote  
     

  4. #4  
    Retired From RSPS

    iGarrett's Avatar
    Join Date
    Dec 2013
    Posts
    461
    Thanks given
    144
    Thanks received
    110
    Rep Power
    187
    Or you could add this in your open bank method
    Either works

    Code:
    if(c.playerRights == 0)
    			c.sendMessage("You are not permitted to use this command.");
    			return;
    Then you could just do this and players shouldn't be able to use it.

    Code:
    if (playerCommand.startsWith("bank")) {
    c.getPA().openUpBank();
    }
    Quote Originally Posted by i am here View Post
    I have never messed with Eclipse. Is it a whole new revision or type of code?
    Quote Originally Posted by bibl View Post
    hahaha, good one m9. "deob" is short for "deobfuscated" which is not the same as decompiled.
    I'm GEEGIN' OUT
    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. [667/728] Making commands donator only
    By PvMLegacyTyler in forum Help
    Replies: 2
    Last Post: 08-21-2012, 04:59 AM
  2. [637] Adding Donator only command's!
    By erica in forum Snippets
    Replies: 4
    Last Post: 03-21-2012, 09:41 AM
  3. Replies: 25
    Last Post: 08-14-2011, 10:19 PM
  4. Command for donators only
    By Sir Tom in forum Snippets
    Replies: 18
    Last Post: 05-31-2010, 08:21 PM
  5. Replies: 4
    Last Post: 12-14-2009, 07:03 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •