1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
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!

Default Union Card for CWU

Discussion in 'Requests' started by ag55, Oct 27, 2018.

  1. ag55

    ag55 NOPE.AVI Clockwork Customer

    So I've retrieved the union lock, and I'd like to give the union card to the CWU class by default. I'm unsure what hooks to use, as I'm quite new. If anyone's got any helpful links or resources that's would be great. Any suggestions or pointers in the right direction would help massively, thank you.
  2. _HappyGoLucky

    _HappyGoLucky Clockwork Customer Active Member

    so for some reason kuro (or someone please dont berate me) added a method to give default inventory in the faction file

    in your CWU faction file, do this
    FACTION.startingInv = {
        ["union_card"] = 1
    i've never actually used this but im psure thats how you use it

    heres the function for it
    -- Called when a player's default inventory is needed.
    function Clockwork:GetPlayerDefaultInventory(player, character, inventory)
        local startingInv = cwFaction:FindByID(character.faction).startingInv;
        if (istable(startingInv)) then
            for k, v in pairs(startingInv) do
                    inventory, cwItem:CreateInstance(k), v

Previous Readers (Total: 0)