Copy Paste for Rust

Copy and paste your buildings to save them or move them

Total Downloads: 11,671 - First Release: Apr 3, 2015 - Last Update: Sep 29, 2017

5/5, 67 likes
  1. miRror
    Configuration File:
    Yes
    Copy and paste your buildings to save them or move them



    Watch changes on GitHub

    Commands
    Code (Text):
    /copy NAME options values - Copy a building
    Syntax - Options:
    • buildings true/false - default: true
      Set to copy buildings
    • deployables true/false - default: true
      Set to copy deployables
    • inventories true/false - default: true
      Set to copy inventories
    • method building/proximity - default: proximity
      Choose the type of mechanics to use to copy a building.
      Building will only copy the current building.
      Proximity will copy by proximity search, current building or not it will copy everything.
    • radius XX - default: 3
      Sets the radius to search for entities around each building parts & deployables
    • share true/false - default: false
      Set to copy data CodeLocks, BuildingPrivileges, SleepingBag
    • tree true/false - default: false
      Set to copy trees and resources
    Code (Text):
    /paste NAME options values - Paste a building
    Syntax - Options:
    • auth true/false - default: false
      Authorize player in all cupboards
    • blockcollision XX - default: 0
      Checks in XX radius if there is something that could collide with the new building, if so, blocks the build. 0 is to deactivate the detection.
    • deployables true/false - default: true
      Set to paste the deployables
    • height XX - default: 0
      Adjust height to paste
    • inventories true/false - default: true
      Set to paste the inventories
    • vending true/false - default: false
      Set to paste sellings, name and broadcasting for Vending Machine
    Code (Text):
    /pasteback NAME options values - Paste on old place a building where it was when it was saved
    Syntax - Options:
    • auth true/false - default: false
      Authorize player in all cupboards
    • deployables true/false - default: true
      Set to paste the deployables
    • inventories true/false - default: true
      Set to paste the inventories
    • height XX - default: 0
      Adjust height to pasteback
    • vending true/false - default: false
      Set to paste sellings, name and broadcasting for Vending Machine
    Code (Text):
    /undo - Removes what you've last pasted
    Permissions
    • copypaste.copy
    • copypaste.paste
    • copypaste.undo
    API
    Code (Text):
    TryCopyFromSteamID(ulong userID, string filename, string[] args)
    TryPasteFromSteamID(ulong userID, string filename, string[] args)
    TryPasteFromVector3(Vector3 pos, float rotationCorrection, string filename, string[] args)
    Return string on failure and true on success

    Example:
    Code (Text):
    bool BuyBuilding(BasePlayer player, string buildingName)
    {
        var options = new List<string>{ "deployables", "true", "blockcollision", "true" };

        var success = CopyPaste.Call("TryPasteFromSteamID", player.userID, buildingName, options.ToArray());

        if(success is string)
        {
            SendReply(player, "Can't place the building here");
            return false;
        }

        SendReply(player, "You've successfully bought this building");

        return true;
    }