Thread: [PI] Need help !

Results 1 to 6 of 6
  1. #1 [PI] Need help ! 
    Registered Member
    Join Date
    Dec 2010
    Posts
    3
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Alright i need help! , how do i make it on a 317 server so admins are able to spawn items? (how do i make it so admins are able to spawn items)???

    PLEASE EXPLAIN THIS OR GIVE ME A LINK TO A GUIDE OR TUTORIAL!

    Who Helps Gets A Cookie And Rep++
    Reply With Quote  
     

  2. #2  
    Registered Member Kenaboy's Avatar
    Join Date
    Dec 2009
    Age
    29
    Posts
    903
    Thanks given
    71
    Thanks received
    10
    Rep Power
    28
    Code:
    	    if (command.startsWith("pickup") && playerRights > 1) {
    		        String[] args = command.split(" ");
    	         if(args.length == 3) {
    			int newItemID = Integer.parseInt(args[1]);
    			int newItemAmount = Integer.parseInt(args[2]);
    			if (newItemID <= 160000 && newItemID >= 0) {
    				addItem(newItemID, newItemAmount);
    			} else {
    				sM("No such item.");
    			}
    		} else {
    			sM("0Oops Use ::pickup 0994 9999");
    		}
    	    }
    This make the moderator also can pickup or spawn item, if you don't want just change the playerRight > 1 to playerRight > 2.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2010
    Posts
    3
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Project Shilo Village View Post
    Code:
    	    if (command.startsWith("pickup") && playerRights > 1) {
    		        String[] args = command.split(" ");
    	         if(args.length == 3) {
    			int newItemID = Integer.parseInt(args[1]);
    			int newItemAmount = Integer.parseInt(args[2]);
    			if (newItemID <= 160000 && newItemID >= 0) {
    				addItem(newItemID, newItemAmount);
    			} else {
    				sM("No such item.");
    			}
    		} else {
    			sM("0Oops Use ::pickup 0994 9999");
    		}
    	    }
    Wait uhm where to put this in??? And also my server is a PI server,,
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2010
    Posts
    536
    Thanks given
    61
    Thanks received
    25
    Rep Power
    4
    Quote Originally Posted by Ovdkiller View Post
    Wait uhm where to put this in??? And also my server is a PI server,,
    Commands class located at;

    Source\Models\Players\Packets\
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Dec 2010
    Posts
    3
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Say Wut? View Post
    Commands class located at;

    Source\Models\Players\Packets\
    I Cant Find "Packets" , u Mean Commands?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Dec 2010
    Posts
    536
    Thanks given
    61
    Thanks received
    25
    Rep Power
    4
    Packets is a subfolder, a map.
    Click on Packets and you'll go into a map where there are more classes. (java files)
    Then yes, add them in commands.java
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •