Results 1 to 6 of 6
  1. #1
    The 7th Hokage's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Location
    Konoha
    Posts
    2,424
    Reputation
    264
    Thanks
    1,324
    My Mood
    Chatty

    /GiftGold and /GiftFame Commands {FSOD} ~2

     
    Code:
        internal class GGoldCommand : Command
        {
            public GGoldCommand() : base("giftgold", 85) { }
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                if (string.IsNullOrEmpty(args[0]))
                {
                    player.SendHelp("Usage: /giftgold <accId> <gold>");
                    return false;
                }
                player.Manager.Database.DoActionAsync(db =>
                {
                    var cmd = db.CreateQuery();
                    cmd.CommandText = "UPDATE `stats` SET `credits`=@cre WHERE accId=@accId";
                    cmd.Parameters.AddWithValue("@cre", args[1]);
                    cmd.Parameters.AddWithValue("@accId", args[0]);
                    if (cmd.ExecuteNonQuery() == 0)
                    {
                        player.SendError("Error sending gold!");
                    }
                    else
                    {
                        player.SendInfo(args[0] + " 's Gold Was Replaced Successfully");
                    }
                });
                return true;
            }
        }


     
    Code:
        internal class GFameCommand : Command
        {
            public GFameCommand() : base("giftfame", 85) { }
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                if (string.IsNullOrEmpty(args[0]))
                {
                    player.SendHelp("Usage: /giftfame <accId> <fame>");
                    return false;
                }
                player.Manager.Database.DoActionAsync(db =>
                {
                    var cmd = db.CreateQuery();
                    cmd.CommandText = "UPDATE `stats` SET `fame`=@cre WHERE accId=@accId";
                    cmd.Parameters.AddWithValue("@cre", args[1]);
                    cmd.Parameters.AddWithValue("@accId", args[0]);
                    if (cmd.ExecuteNonQuery() == 0)
                    {
                        player.SendError("Error sending gold!");
                    }
                    else
                    {
                        player.SendInfo(args[0] + " 's Fame Was Replaced Successfully");
                    }
                });
                return true;
            }
        }


    What this does is that it replicases someone's fame/gold with the amount selected. I made this myself (im really proud, but this is barely anything).

    Note! You'll need the /accid command that i've released here;
    https://www.mpgh.net/forum/showthread...760&p=11996443

    Also. This was made for a specific rank at rank 85. So change this line: public GFameCommand() : base("giftfame", "*85*") { }
    (The number) To the rank you want it to be at. Same on both. Remove the "**" i did.

    Press a thanks if you like this command.
    Last edited by The 7th Hokage; 08-28-2016 at 05:35 AM.

  2. #2
    kgcgods's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    13
    My Mood
    Bored
    dosent work only say no permission

  3. #3
    AzzyG's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Location
    I Think The Worst Thing You Can Do About a Situation Is Nothing
    Posts
    1,732
    Reputation
    261
    Thanks
    476
    Quote Originally Posted by kgcgods View Post
    dosent work only say no permission
    Did you change your rank in heidi?

  4. #4
    lkdjnfoskjednfblksjdfn's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,340
    Reputation
    198
    Thanks
    841
    My Mood
    Inspired
    Quote Originally Posted by kgcgods View Post
    dosent work only say no permission
    wtf?.... //100kchars

  5. #5
    Orbit's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    In-Orbit
    Posts
    672
    Reputation
    55
    Thanks
    484
    My Mood
    Aggressive
    Quote Originally Posted by Yunus View Post
    Also. This was made for a specific rank at rank 85. So change this line: public GFameCommand() : base("giftfame", "*85*") { }
    (The number) To the rank you want it to be at. Same on both. Remove the "**" i did.
    Quote Originally Posted by kgcgods View Post
    dosent work only say no permission

    ..........

    “If things go wrong, don’t go with them.”

  6. The Following User Says Thank You to Orbit For This Useful Post:

    The 7th Hokage (10-09-2016)

  7. #6
    kgcgods's Avatar
    Join Date
    Nov 2015
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    13
    My Mood
    Bored
    guys i fixed the no permission thing times ago just saying

Similar Threads

  1. [Help Request] Will pay anyone 25$ for helping me with making my mod Have Server and Console command
    By lordxchris in forum Call of Duty Black Ops 2 Help
    Replies: 0
    Last Post: 03-23-2014, 10:55 PM
  2. [WTS] Origin Account With BBC2, BF3, Crysis 2, And All Command And Conquers
    By JKyleWallace in forum Selling Accounts/Keys/Items
    Replies: 1
    Last Post: 02-10-2014, 04:48 PM
  3. [WTS] Patriot EU2 Oca Nano and Colby Commander
    By Peeter24 in forum All Points Bulletin Reloaded Sell Selling / Trading / Buying
    Replies: 6
    Last Post: 11-07-2013, 01:40 PM
  4. Replies: 1
    Last Post: 05-08-2012, 02:43 AM
  5. [Request] LTClient And PTC Commands Please
    By ken53406 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 4
    Last Post: 10-10-2010, 12:42 AM