Hello and welcome to our community! Is this your first visit?
Register
Results 1 to 3 of 3

Threaded View

  1. #1
    Mithril Member Ambient's Avatar
    Join Date
    Jul 2011
    Posts
    332
    Time on
    5 d 2 h 41 m
    Thanked 75 times
    in 16 posts
    Mentioned
    0 times
    RS events
    0

    How to categorise your commands [PI]

    This snippet will show you all how to categorise your commands via the player right integer, sort of like a labelled filling cabinet.

    1) Open your commands class Server>src>server>model>players>packets>commands.java and open
    2) Find public void processPacket(Client c, int packetType, int packetSize) { and under the last bracket } press enter a few times
    3) Copy this onto the line shown above (right were you ended the enters)
    Code:
    Only the registered members can see the link. Register here
    *Replace #### with you player right

    4) Under that statement you need to add the command corresponding to that right you added above

    (When you put your command under: if(c.playerRights >= ####) { //Player Right : Make sure your command doesn't have a player right already in it, if it does delete the line)

    5) When you have added the commands for that specific player right you can re-do it with another right by repeating all the steps above


    This is the finished product:


    Sorry if it hard to follow, I couldn't really explain it into depth as easily as I would had done in other tut's :\

    If it helped just thank the thread, that way it shows that this thread is helpful and saves you having to rep :P
    Last edited by Faab234; October 11th, 2011 at 06:35.


 

Tags for this Thread

Posting Permissions

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