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!

HL2RP Creating New Items

Discussion in 'Development' started by Hobo Horse, Feb 9, 2015.

  1. Is there any way to create some new scripts (Items), is it via in-game command or would I have to edit the server files ?
     
  2. duck

    duck Phant0m Legend

    Wrong forum. Belongs in Development. You make items on your outside of the game by scripting them.
     
  3. _HappyGoLucky

    _HappyGoLucky Clockwork Customer

    You need to make a PLUGIN and you need the unique ID of the item that you want. Such as if there is a shared, cl_init, and init in a folder. And say the name of the folders name is cw_item. In the skeleton I will put down below you will need to put it in the unique id.

    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();
    Credits to TheDogFather

    An example,

    Code:
    local ITEM = Clockwork.item:New("");
    ITEM.name = "Item";
    ITEM.cost = 1-[IMG]http://upload.wikimedia.org/math/d/2/4/d245777abca64ece2d5d7ca0d19fddb6.png[/IMG];
    ITEM.model = "models/error.mdl";
    ITEM.weight = 0.1-[IMG]http://upload.wikimedia.org/math/d/2/4/d245777abca64ece2d5d7ca0d19fddb6.png[/IMG](I think?);
    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();
    Attachments
    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);

    Plugin Constructor, Credits to @RJ
    https://forums.cloudsixteen.com/threads/plugin-constructor.2765/
     
    • Like Like x 3
    Last edited: Feb 9, 2015
  4. Thank ye, big boi.
     

Previous Readers (Total: 0)