Thread: Enabling all players to stake an item

Results 1 to 6 of 6
  1. #1 Enabling all players to stake an item 
    Registered Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    so in my tradeandduel.java the staking was disabled because of dupes, you couldnt input a item, so i've added this
    for (int i : Config.ITEM_TRADEABLE) {
    if(i == itemID) {
    c.sendMessage("You can't stake this item.");
    return true;
    }
    if (!c.playerName.equalsIgnoreCase("owner")) {
    c.sendMessage("Do not get scammed! use the report section if you are!");
    return true;

    on this line:
    if (!c.playerName.equalsIgnoreCase("owner")) {
    what do I need to change it to so everyone can stake an item and not just "owner"
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    May 2013
    Posts
    458
    Thanks given
    145
    Thanks received
    59
    Rep Power
    0
    That is saying that everyone EXCEPT the owner can stake. Look at the !
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Abexlry View Post
    That is saying that everyone EXCEPT the owner can stake. Look at the !
    so do i just remove that line?
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    May 2013
    Posts
    458
    Thanks given
    145
    Thanks received
    59
    Rep Power
    0
    I don't exactly know what your whole method is showing so I couldn't tell you. I'd need to know what is being returned true/false.

    Also put any code in tags for easier reads.
    Reply With Quote  
     

  5. #5  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    Code:
    for (int i : Config.ITEM_TRADEABLE) {
    if(i == itemID) {
    c.sendMessage("You can't stake this item.");
    return true;
    }
    if (!c.playerName.equalsIgnoreCase("owner")) {
    c.sendMessage("Do not get scammed! use the report section if you are!");
    return true;
    what this says is:
    if the item id is untradable for the boolean to return true
    if the players name isnt "owner" then the boolean will return true as well.

    by the looks of what you said, just remove the block statement:
    Code:
    if (!c.playerName.equalsIgnoreCase("owner")) {
    c.sendMessage("Do not get scammed! use the report section if you are!");
    return true;
    }
    and you'll get what you're looking for

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by Eclipse View Post
    Code:
    for (int i : Config.ITEM_TRADEABLE) {
    if(i == itemID) {
    c.sendMessage("You can't stake this item.");
    return true;
    }
    if (!c.playerName.equalsIgnoreCase("owner")) {
    c.sendMessage("Do not get scammed! use the report section if you are!");
    return true;
    what this says is:
    if the item id is untradable for the boolean to return true
    if the players name isnt "owner" then the boolean will return true as well.

    by the looks of what you said, just remove the block statement:
    Code:
    if (!c.playerName.equalsIgnoreCase("owner")) {
    c.sendMessage("Do not get scammed! use the report section if you are!");
    return true;
    }
    and you'll get what you're looking for
    fixed thankyou!
    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. Replies: 8
    Last Post: 09-24-2013, 05:34 AM
  2. Replies: 5
    Last Post: 10-31-2012, 10:33 PM
  3. Replies: 27
    Last Post: 03-30-2009, 09:51 PM
  4. how to give an item when you pk someone
    By Vox' in forum Requests
    Replies: 8
    Last Post: 12-30-2008, 11:56 PM
  5. player rights to wear an item "short tut"
    By Icy Whip in forum Tutorials
    Replies: 1
    Last Post: 03-11-2008, 04:38 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
  •