Results 1 to 3 of 3
  1. #1
    WcCrusher's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Location
    127.0.0.1
    Posts
    83
    Reputation
    10
    Thanks
    227
    My Mood
    Twisted

    Need help with the Admincommands file (fabiano source)

    i am having problems with changing the rank for each commands like if i change the rank requirement to use the command is just makes so no1 can use it or it makes so everyone is able to use the command its random

    SOLVED, got it working thx to R1S3
    Last edited by WcCrusher; 01-03-2016 at 06:52 PM.

  2. #2
    R1S3's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Location
    █▄█▄█▄█▄█▄█▄█
    Posts
    123
    Reputation
    10
    Thanks
    58
    My Mood
    Devilish
    Quote Originally Posted by WcCrusher View Post
    i am having problems with changing the rank for each commands like if i change the rank requirement to use the command is just makes so no1 can use it or it makes so everyone is able to use the command its random
    ranks in fabiano are a bool, so it takes true or false, (0 is false, 1 is true,so if its 1, only rank 3 and above can use it, basically)
    this can easily be changed, in database.cs you can just change it to an int,
    but a more simple way is just going to the command.cs file and looking for
    Code:
    private static int GetPermissionLevel(Player player)
    function, and make it something like this
    Code:
            private static int GetPermissionLevel(Player player)
            {
                if (player.Client.Account.Rank == 1)
                    return 1;
                if (player.Client.Account.Rank == 2)
                    return 2;
                if (player.Client.Account.Rank == 3)
                    return 3;
                return 0;
            }
    so when the rank is 1, they can use the command if the permlevel is is made 1, if players rank is 2, they can use the command as long as the permlevel is set to 2, and so on

    should be self explanatory if you want to add more "ranks" or permission levels, if you know what youre doing, and dont feel like having to add one of these whenever you want to add a new rank, you can just go in database.cs and change rank from boolean to an integer.

  3. The Following User Says Thank You to R1S3 For This Useful Post:

    WcCrusher (01-03-2016)

  4. #3
    WcCrusher's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Location
    127.0.0.1
    Posts
    83
    Reputation
    10
    Thanks
    227
    My Mood
    Twisted
    Quote Originally Posted by R1S3 View Post
    ranks in fabiano are a bool, so it takes true or false, (0 is false, 1 is true,so if its 1, only rank 3 and above can use it, basically)
    this can easily be changed, in database.cs you can just change it to an int,
    but a more simple way is just going to the command.cs file and looking for
    Code:
    private static int GetPermissionLevel(Player player)
    function, and make it something like this
    Code:
            private static int GetPermissionLevel(Player player)
            {
                if (player.Client.Account.Rank == 1)
                    return 1;
                if (player.Client.Account.Rank == 2)
                    return 2;
                if (player.Client.Account.Rank == 3)
                    return 3;
                return 0;
            }
    so when the rank is 1, they can use the command if the permlevel is is made 1, if players rank is 2, they can use the command as long as the permlevel is set to 2, and so on

    should be self explanatory if you want to add more "ranks" or permission levels, if you know what youre doing, and dont feel like having to add one of these whenever you want to add a new rank, you can just go in database.cs and change rank from boolean to an integer.
    thx im going to try this now

Similar Threads

  1. I Need Major Help With The Ava Files Missing Please Online 24/7
    By bryanswag12 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 2
    Last Post: 08-31-2012, 06:27 PM
  2. [Solved] I need help, with the files...
    By PasterOfMuppets in forum CrossFire Help
    Replies: 3
    Last Post: 09-19-2011, 06:09 PM
  3. [Help Request] i need help with the hack im using
    By kingster626 in forum Combat Arms Help
    Replies: 12
    Last Post: 06-18-2011, 10:15 PM
  4. Hello! i need help with the source code.
    By LatinHacker in forum Combat Arms Help
    Replies: 3
    Last Post: 05-14-2010, 10:32 PM
  5. I need help with the AK47 LTB files.
    By telsaX in forum Combat Arms Mod Discussion
    Replies: 2
    Last Post: 01-24-2010, 01:52 PM