1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Oxide for Rust Legacy has been discontinued and is no longer supported. No updates or additions will be made, and Rust Legacy-specific plugin submissions will no longer be accepted. We recommend upgrading to the latest version of Rust as able.
    Dismiss Notice
  1. MajniikJePaN

    MajniikJePaN Naked Wanderer

    Hi, I need help with something.
    I need: Any number Airdrops sends to any player.
    /xair 8 player Josef

    I tried this:
    Code (Text):
    [ChatCommand("xair")]
            void cmdXair(NetUser netuser, string command, string[] args)
            {
                Vector3 cachedPos;
                NetUser targetuser = rust.FindPlayer(args[0]);
                if (targetuser != null)
                {
                    cachedPos = targetuser.playerClient.lastKnownPosition;
                    if(cachedPos != default(Vector3))
                    {
                        if (args.Length > 2 && args[0].ToString() == "player")
                        {
                            int number;
                            if(args.Length == 3 && int.TryParse(args[0], out number))
                            {
                                SendReply(netuser,string.Format(massAirdrop, number.ToString() ));
                                for ( int i = 0; i < number; i ++)
                                {
                                    SupplyDropZone.CallAirDrop();
                                }
                                return;
                            }
                        }
                    }
                    return;
                }
             }
     
    Last edited by a moderator: Dec 4, 2017
  2. tomasekpro

    tomasekpro Scavenger

    removed
     
    Last edited: Dec 7, 2017