Results 1 to 6 of 6
  1. #1
    SecretPlay23's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Currently nesting with the sloths
    Posts
    25
    Reputation
    10
    Thanks
    0
    My Mood
    Angelic

    Question Permissions Help, Rank 1,2 cannot use commands.

    I know someone who has a private server, and I am attempting to help. They have an error where ranks 1,2 cannot use any commands, I am apart of one of these groups. If anyone has a solution, please reply to this thread.

    Code:
     internal class GiveCommand : Command
        {
            public GiveCommand()
                : base("give", 1)
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                if (args.Length == 0)
                {
                    player.SendHelp("Usage: /give <Itemname>");
                    return false;
                }
                string name = string.Join(" ", args.ToArray()).Trim();
                ushort objType;
                //creates a new case insensitive dictionary based on the XmlDatas
                Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(player.Manager.GameData.IdToObjectType,
                    StringComparer.OrdinalIgnoreCase);
                if (!icdatas.TryGetValue(name, out objType))
                {
                    player.SendError("Unknown type!");
                    return false;
                }
                if (!player.Manager.GameData.Items[objType].Secret || player.Client.Account.Rank >= 4)
                {
                    for (int i = 0; i < player.Inventory.Length; i++)
                        if (player.Inventory[i] == null)
                        {
                            player.Inventory[i] = player.Manager.GameData.Items[objType];
                            player.UpdateCount++;
                            player.SaveToCharacter();
                            player.SendInfo("Success!");
                            break;
                        }
                }
                else
                {
                    player.SendError("Item cannot be given!");
                    return false;
                }
                return true;
            }
        }

  2. #2
    Desire's Avatar
    Join Date
    Sep 2013
    Gender
    male
    Location
    Insert Name Here
    Posts
    1,039
    Reputation
    58
    Thanks
    1,394
    My Mood
    Amused
    Quote Originally Posted by SecretPlay23 View Post
    Code:
    Commands.cs which ranks go to which as you can see in this screenshot:



    FSOD has client rank 3 (sql) return as 1 (admincommands.cs)

    If you want to make more ranks, copy what I did in my own commands.cs
    im not really back nor will i ever get back into developing pservers
    though ill check once every month atleast


     

  3. The Following 2 Users Say Thank You to Desire For This Useful Post:

    MikeRaarupBirk (09-26-2016),SecretPlay23 (09-26-2016)

  4. #3
    Ahl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    /modcp
    Posts
    16,599
    Reputation
    3219
    Thanks
    5,383
    My Mood
    Angelic
    I don't know why Fab made rank 3 output rank 1.

    Anyways, I would just suggest changing the input from database of rank 3 to rank 1 for simplicity reasons
    News Force Head Editor from 09/14/2018 - 03/02/2020
    Publicist from 11/23/2017 - 06/07/2019
    Global Moderator since 09/24/2017
    Minion+ from 04/16/2017 - 09/24/2017
    Market Place Minion from 04/16/2017 - 09/24/2017
    Minecraft Minion from 02/23/2017 - 09/24/2017
    Realm of the Mad God Minion from 11/06/2016 - 09/24/2017

    Middleman from 09/14/2016 - 09/24/2017
    News Force Editor from 08/23/2016 - 09/14/2018
    News Force (Section of the Week) from 03/21/2016 - 07/17/2017
    News Force (User News) from 10/18/2015 - 09/14/2018

    Donator since 03/16/2015
    Realm of the Mad God Editor from 05/20/2014 - 07/08/2014
    Member since 12/23/2012


    Rep Power: 82

  5. The Following User Says Thank You to Ahl For This Useful Post:

    SecretPlay23 (09-26-2016)

  6. #4
    Desire's Avatar
    Join Date
    Sep 2013
    Gender
    male
    Location
    Insert Name Here
    Posts
    1,039
    Reputation
    58
    Thanks
    1,394
    My Mood
    Amused
    Quote Originally Posted by Ahlwong View Post
    I don't know why Fab made rank 3 output rank 1.
    Silly silly
    im not really back nor will i ever get back into developing pservers
    though ill check once every month atleast


     

  7. #5
    SecretPlay23's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Currently nesting with the sloths
    Posts
    25
    Reputation
    10
    Thanks
    0
    My Mood
    Angelic
    Thank you :0

    - - - Updated - - -

    Now I can tell him how to make ranks

  8. #6
    MikeRaarupBirk's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1,583
    Reputation
    38
    Thanks
    3,775
    My Mood
    Stressed
    Quote Originally Posted by SecretPlay23 View Post
    Thank you :0

    - - - Updated - - -

    Now I can tell him how to make ranks
    @Joe @Luis @Raple /close i suppose.

Similar Threads

  1. [Help Request] [Fabiano] edit starting gold; rank 1&2 cant use any commands
    By GunOfJustice in forum Realm of the Mad God Private Servers Help
    Replies: 8
    Last Post: 09-24-2016, 04:17 PM
  2. [Solved] help !! all injector cannot using in my pc !!!
    By lauquan098 in forum Blackshot Help
    Replies: 3
    Last Post: 04-26-2016, 05:16 AM
  3. [Solved] HELP! Cannot use market till 11th
    By taylanserman in forum Counter-Strike 2 Help
    Replies: 3
    Last Post: 04-06-2015, 05:35 PM
  4. [Help Request] Help Me Cannot use Rapid fire
    By royalframe99 in forum Blackshot Help
    Replies: 0
    Last Post: 06-23-2014, 01:51 AM
  5. [Help Request] How can i use the useful commands
    By vin1991 in forum Vindictus Help
    Replies: 5
    Last Post: 05-11-2011, 03:05 AM