1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Other Creating new Weapons

Discussion in 'Development' started by EmpressKedavra, Jul 27, 2017.

  1. EmpressKedavra

    EmpressKedavra Clockwork Customer

    Right, so.

    I'm new to scripting in CW, I wanted to create some new weapons from some addons i found on the Workshop, for example a Berreta from the M9K Pistols, how would i do it?

    Any tips, please.
    Kind Regards.
     
  2. _HappyGoLucky

    _HappyGoLucky Clockwork Customer

    follow this and make your plugin thing http://forums.cloudsixteen.com/threads/how-to-make-a-plugin-getting-started.14574/

    Make your items folder and create a new .lua in it named sh_insertitemnamehere and then open it and paste this in there
    Code:
    local ITEM = Clockwork.item:New("");
    ITEM.name = "";
    ITEM.cost = ;
    ITEM.model = "";
    ITEM.weight = ;
    ITEM.access = "";
    ITEM.uniqueID = "";
    ITEM.isMeleeWeapon = ;
    ITEM.description = "";
    ITEM.value = ;
    ITEM.spawncategory = ;
    ITEM.hasFlashlight = true/false;
    ITEM.isAttachment = true;
    ITEM.loweredOrigin = ;
    ITEM.loweredAngles = ;
    ITEM.attachmentBone = "";
    ITEM.attachmentOffsetAngles = ;
    ITEM.attachmentOffsetVector = ;
    ITEM:Register();
    anything posted above that you dont use, delete the lines
    heres an example of it all filled in
    Code:
    local ITEM = Clockwork.item:New("");
    ITEM.name = "Item";
    ITEM.cost = 1;
    ITEM.model = "models/error.mdl";
    ITEM.weight = 0.1;
    ITEM.access = "Flag here";
    ITEM.uniqueID = "cw_item";
    ITEM.isMeleeWeapon = false/true;
    ITEM.description = "A item.";
    ITEM.value = (Honestly don't know what the hell this is...);
    ITEM.spawncategory = (Same as above...);
    ITEM.isAttachment = true/false(Tells you if you can see it on a player);
    (For everything below you just need to find The place on the body you want it to be on.[/SIZE]
    ITEM.loweredOrigin = Vector(3, 0, -4);
    ITEM.loweredAngles = Angle(0, 45, 0);
    ITEM.attachmentBone = "ValveBiped.Bip01_Spine";
    ITEM.attachmentOffsetAngles = Angle(0, 0, 0);
    ITEM.attachmentOffsetVector = Vector(-3.96, 4.95, -2.97);
    [SIZE=4]ITEM:Register();
    Use attachments if it's a weapon. Rest of this stuff should be obvious.
    Attachments below.
    ITEM.loweredOrigin = Vector(3, 0, -4);
    ITEM.loweredAngles = Angle(0, 45, 0);
    ITEM.attachmentBone = "ValveBiped.Bip01_Pelvis";
    ITEM.attachmentOffsetAngles = Angle(90, 0, 0);
    ITEM.attachmentOffsetVector = Vector(0, 6.55, 8.72);

    ITEM.loweredOrigin = Vector(3, 0, -4);
    ITEM.loweredAngles = Angle(0, 45, 0);
    ITEM.attachmentBone = "ValveBiped.Bip01_Spine";
    ITEM.attachmentOffsetAngles = Angle(0, 0, 0);
    ITEM.attachmentOffsetVector = Vector(-3.96, 4.95, -2.97);

    To put a weapon in, you need to go to your game and hold Q to open up the menu and then browse to your weapon and right click on it then copy to clipboard to get its unique ID. Take this unique ID and post it in like this.
    ITEM.uniqueID = "weapon_drilldo";

    If I forgot something theres an entire community here to assist you more than I did.
     
  3. EmpressKedavra

    EmpressKedavra Clockwork Customer

    Right, thanks!
     

Previous Readers (Total: 0)