Copy-Paste for Rust

Copy paste buildings

Total Downloads: 8,675 - First Release: Apr 3, 2015 - Last Update: Mar 9, 2017

5/5, 42 likes
  1. Reneb
    Configuration File:
    No
    Share your creations with others @ Welcome
    Made by Mystic419

    Copy and paste your buildings to save them or move them.

    Features:
    - Building paste rotates depending on your eyes' angle
    - Save all Deployables
    - Save all Entities (trees etc)
    - Save all Inventories inside boxes
    - Skin support
    - Lock support
    - Signs support
    - Set how sensitive the copy should be.

    Commands:
    - /copy NAME options values => copy the building, the building part that you will choose will serve as structure 0 for when you paste it (so be careful of which part you look at while you use this command).

    Syntax - Options:
    radius XX - default: 3 - sets the radius to search for entities around each building parts & deployables
    mechanics building/proximity - default building - 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.

    - /paste NAME options values => paste a building

    Syntax - Options:
    autoheight true/false - default false - Auto adjusts height of a building, doesn't work on a too steep ground (depends on the foundations only)
    height XX - default: 0 - Adjust height to paste
    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
    inventories true/false - default true - set to paste the inventories


    - /placeback NAME => placeback a building where it was when it was saved

    Syntax - Options:
    height XX - default: 0 - Adjust height to placeback
    checkplaced true/false - default: false - checks if a part is already placed before placing back the part.
    deployables true/false - default true - set to paste the deployables
    inventories true/false - default true - set to paste the inventories

    - /undo => removes what you've last pasted

    Permissions:
    - Admins have full access
    - Oxide permission to copy: copypaste.copy
    - Oxide permission to paste: copypaste.paste

    External plugins:
    Code (Text):
    TryCopyFromSteamID(string steamid, string filename, string[] args)
    TryCopyFromPlayer(BasePlayer player, string filename, string[] args)
    return string on failure
    return true on success
    args[] are the array with all the options
    exemple: ["inventories","false","mechanics","building"]

    Code (Text):
    TryPasteFromVector3(Vector3 startPos, Vector3 direction, string filename, string[] args)
    TryPasteFromSteamID(string steamid, string filename, string[] args)
    TryPasteFromPlayer(BasePlayer player, string filename, string[] args)
    return string on failure
    return true on success
    args[] are the array with all the options:
    exemple: ["deployables","false","autoheight","true"]
    exemple of a buy plugin:
    Code (Text):
    bool BuyBuilding(BasePlayer player, string buildingname)
    {
    var arglist = new List<string>{ "deployables", "true", "autoheight", "true", "blockcollision", "true" };
    var args = arglist.ToArray();
    var success = CopyPaste.CallHook("TryPasteFromPlayer", player, buildingname, args);
    if(success is null || success is string)
    {
        SendReply(player, "Can't place the building here");
        return false;
    }
    SendReply(player, "You've successfully bought this building");
    return true;
    }
    Known Issues / To Fix:
    - Can't put items inside deployables that aren't boxes (lights, camp fire)
    Some deployables have a default inventory, it's either i keep the default inventory and add the copies items, or either i wipe the inventory and successfully add the items, but then a second later the items are deleted again ... no idea why

    How-To:
    Basic use by TnTGaming: