Thread: How do I disable people dropping items on pi??

Results 1 to 10 of 10
  1. #1 How do I disable people dropping items on pi?? 
    Member How do I disable people dropping items on pi?? Market Banned
    Mr Joopz's Avatar
    Join Date
    Aug 2012
    Age
    26
    Posts
    1,410
    Thanks given
    259
    Thanks received
    96
    Rep Power
    14
    Fixed!
    Reply With Quote  
     

  2. #2  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Code:
    		if (c.playerRights == 0) {
    		c.sendMessage("You cannot drop items anymore. Use ::empty instead.");
    		return;
    		}
    DropItem.Java
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Member How do I disable people dropping items on pi?? Market Banned
    Mr Joopz's Avatar
    Join Date
    Aug 2012
    Age
    26
    Posts
    1,410
    Thanks given
    259
    Thanks received
    96
    Rep Power
    14
    Quote Originally Posted by Zivik View Post
    Code:
    		if (c.playerRights == 0) {
    		c.sendMessage("You cannot drop items anymore. Use ::empty instead.");
    		return;
    		}
    DropItem.Java
    lol, that is just gonna give a message and drop the item as well :/
    Reply With Quote  
     

  5. #4  
    Donator


    Join Date
    Mar 2011
    Posts
    2,350
    Thanks given
    1,193
    Thanks received
    824
    Rep Power
    856
    Code:
    if (c.playerRights >= 0) {
    		c.sendMessage("You cannot drop items anymore. Use ::empty instead.");
    		return;
    		}
    Reply With Quote  
     

  6. #5  
    Donator


    Join Date
    Sep 2011
    Posts
    2,730
    Thanks given
    1,150
    Thanks received
    907
    Rep Power
    668
    Quote Originally Posted by user name.. View Post
    lol, that is just gonna give a message and drop the item as well :/
    No, the return statement makes it so it doesn't complete the method, thus not dropping the item.

    Quote Originally Posted by Jerba View Post
    Code:
    if (c.playerRights >= 0) {
    		c.sendMessage("You cannot drop items anymore. Use ::empty instead.");
    		return;
    		}
    The OP wanted it so players cannot drop items. That makes it so mods+ can't drop items, but players still can.
    Reply With Quote  
     

  7. #6  
    Member How do I disable people dropping items on pi?? Market Banned
    Mr Joopz's Avatar
    Join Date
    Aug 2012
    Age
    26
    Posts
    1,410
    Thanks given
    259
    Thanks received
    96
    Rep Power
    14
    Quote Originally Posted by Lystuya View Post
    No, the return statement makes it so it doesn't complete the method, thus not dropping the item.



    The OP wanted it so players cannot drop items. That makes it so mods+ can't drop items, but players still can.
    Still drops, if I post my dropitem can you edit it in for me pls, I put it in many locations in the file and still not working.
    Reply With Quote  
     

  8. #7  
    Donator


    Join Date
    Sep 2011
    Posts
    2,730
    Thanks given
    1,150
    Thanks received
    907
    Rep Power
    668
    Paste it on Pastebin.com - #1 paste tool since 2002! and post the link here.
    Reply With Quote  
     

  9. #8  
    Member How do I disable people dropping items on pi?? Market Banned
    Mr Joopz's Avatar
    Join Date
    Aug 2012
    Age
    26
    Posts
    1,410
    Thanks given
    259
    Thanks received
    96
    Rep Power
    14
    Reply With Quote  
     

  10. #9  
    Donator


    Join Date
    Sep 2011
    Posts
    2,730
    Thanks given
    1,150
    Thanks received
    907
    Rep Power
    668
    Oh god that is an ugly class.

    Just under
    Code:
     public void processPacket(Client c, int packetType, int packetSize) {
                    int itemId = c.getInStream().readUnsignedWordA();
                    c.getInStream().readUnsignedByte();
                    c.getInStream().readUnsignedByte();
                    int slot = c.getInStream().readUnsignedWordA();
    Add
    Code:
    if (c.playerRights < 3) {
    	c.sendMessage("Dropping items is currently disabled.");
    	return;
    }
    Reply With Quote  
     

  11. Thankful user:


  12. #10  
    Member How do I disable people dropping items on pi?? Market Banned
    Mr Joopz's Avatar
    Join Date
    Aug 2012
    Age
    26
    Posts
    1,410
    Thanks given
    259
    Thanks received
    96
    Rep Power
    14
    Quote Originally Posted by Lystuya View Post
    Oh god that is an ugly class.

    Just under
    Code:
     public void processPacket(Client c, int packetType, int packetSize) {
                    int itemId = c.getInStream().readUnsignedWordA();
                    c.getInStream().readUnsignedByte();
                    c.getInStream().readUnsignedByte();
                    int slot = c.getInStream().readUnsignedWordA();
    Add
    Code:
    if (c.playerRights < 3) {
    	c.sendMessage("Dropping items is currently disabled.");
    	return;
    }
    Thanks, work! REP++
    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] Disable Dropping for 1 Player
    By Xynasty in forum Help
    Replies: 3
    Last Post: 07-11-2011, 11:47 PM
  2. 614 Items lost on death & disable dropping
    By zzzfishstick in forum Requests
    Replies: 0
    Last Post: 06-10-2011, 06:16 PM
  3. [PI] How to disable all dropping on server?
    By Crispytoast in forum Help
    Replies: 8
    Last Post: 12-03-2010, 05:04 PM
  4. [PI] Disable dropping in trade
    By HiImRusty in forum Help
    Replies: 5
    Last Post: 11-20-2010, 10:08 PM
  5. Replies: 17
    Last Post: 07-19-2008, 11:59 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
  •