Thread: [667/***] Better way to handle staff

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 [667/***] Better way to handle staff 
    Donator Market Banned Market Banned



    Join Date
    May 2012
    Posts
    350
    Thanks given
    30
    Thanks received
    28
    Rep Power
    115
    so i didnt like the idea of keep having to add

    Code:
    if (username.equalsIgnoreCase("Your Name Here"))
                    {
    rights = 2;
    }

    too make staff so i developed and easier way to handle the staff and here it is


    go into player

    src/com/rs/game/player/player.java

    find this

    Code:
    	public void init(Session session, String username, int displayMode,
    			int screenWidth, int screenHeight) {
    and in that void got to the bottem and underneath this

    Code:
    		if (Settings.DEBUG)
    			Logger.log(this, "Initiated Player: " + username + ", pass: "
    					+ password);

    add this

    Code:
            for(String s : Settings.ADMINS) {
                final String[] ADMINS = {"james", "jimmy", "roger"}; {
                    setRights(3);
                }
            }
    
            for(String s : Settings.MODS) {
                final String[] MODS = {"beanhead", "ben", "tupac"}; {
                    setRights(2);
                }
            }

    now that parts done

    goto

    src/com/rs/settings.java

    and add this

    Code:
        public static final String[] ADMINS = {"james", "jerry", "roger"};
        public static final String[] MODS = {"ben", "beanhead", "tupac"};
    you can add anywhere but i added under this

    Code:
    public static String[] STAFF_ITEMS = {  };

    well there you go remember to change names



    EDIT:

    this will be demoting NOTE its not the best way but meh it works so there

    Code:
            for(String s : Settings.DEMOTE) {
                final String[] DEMOTE = {""}; {
                    setRights(0);
                }
            }

    Code:
    public static final String[] DEMOTE = {""};

    To make this work remove the player from there staff position add them to the demote list and then compile and then when they login they will be normal player you can then keep or remove them from that list
    Reply With Quote  
     

  2. #2  
    Super Donator
    Kova+'s Avatar
    Join Date
    Jan 2012
    Posts
    938
    Thanks given
    124
    Thanks received
    249
    Rep Power
    13
    I use something like this but I don't handle the names in player.java.
    I created new ranks in settings.java for example
    Code:
     public static final int IS_ADMIN = 1
    And then just created a command which sets peoples rights as admin. I had to do this method to add images to ranks, it works well but has a few down sides.
    Reply With Quote  
     

  3. #3  
    (づ。◕‿‿◕。)づ
    macalroy's Avatar
    Join Date
    Jun 2011
    Posts
    1,123
    Thanks given
    717
    Thanks received
    297
    Rep Power
    12
    I use a completely different system, although it's for forum integration. It involves about 10 ranks, all of which were used on the forums. So, if they were demoted via forums, they stay demoted.
    Reply With Quote  
     

  4. #4  
    Donator Market Banned Market Banned



    Join Date
    May 2012
    Posts
    350
    Thanks given
    30
    Thanks received
    28
    Rep Power
    115
    ohhh ye never thought about being demoted will work on that later
    Reply With Quote  
     

  5. #5  
    Sexy boi <3

    ByteValue's Avatar
    Join Date
    May 2012
    Age
    25
    Posts
    831
    Thanks given
    11
    Thanks received
    80
    Rep Power
    80
    I really gotta change my rights system, I have the 562 rs2hd one and it's shitty lol.
    Reply With Quote  
     

  6. #6  
    « TurmoilFTW »
    Defiled''s Avatar
    Join Date
    Mar 2012
    Age
    27
    Posts
    751
    Thanks given
    181
    Thanks received
    156
    Rep Power
    8
    NOPE NOT A GOOD WAY...

    first make a command called ::admin
    setrights=2... or 3.... depends on your ranks... default = 2


    then do it ingame and then delete the command... then promote originally...

    instead of having the staffs permanent...

    but it's a good way of YOURSELF..
    DestructionPK Project
    Skype: defiledx1

    BYE BYE RSPS!


    SELLING SERVICES ATM ADD MY SKYPE IF INTERESTED!
    Reply With Quote  
     

  7. #7  
    Donator Market Banned Market Banned



    Join Date
    May 2012
    Posts
    350
    Thanks given
    30
    Thanks received
    28
    Rep Power
    115
    i hate using commands its crap when you can use better ways to do it ...

    also im working on demoting aswell
    Reply With Quote  
     

  8. #8  
    Super Donator
    Kova+'s Avatar
    Join Date
    Jan 2012
    Posts
    938
    Thanks given
    124
    Thanks received
    249
    Rep Power
    13
    Using command would be a much better method of promoting and demoting people, instead of having to restart the server everything someone needs promoting/demoting.
    Reply With Quote  
     

  9. #9  
    Registered Member `Basher's Avatar
    Join Date
    May 2011
    Posts
    447
    Thanks given
    136
    Thanks received
    40
    Rep Power
    23
    Not hard at all but good job.
    Cheese
    Reply With Quote  
     

  10. #10  
    Sexy boi <3

    ByteValue's Avatar
    Join Date
    May 2012
    Age
    25
    Posts
    831
    Thanks given
    11
    Thanks received
    80
    Rep Power
    80
    I also prefer commands because I have a better control of promoting/demoting, and it's faster and easier to do.
    Reply With Quote  
     

Page 1 of 3 123 LastLast

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/7xx :fp: R-s staff plz read!
    By Iceyblue112 in forum Suggestions
    Replies: 8
    Last Post: 05-08-2012, 05:25 PM
  2. Replies: 20
    Last Post: 05-06-2012, 08:50 PM
  3. [667/704] Polypore staff Animation
    By erica in forum Configuration
    Replies: 12
    Last Post: 04-18-2012, 03:34 AM
  4. Paradox 667/681 ~ NEED STAFF!
    By redrain995 in forum Advertise
    Replies: 6
    Last Post: 02-23-2012, 04:44 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
  •