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 Union Locks (Need help)

Discussion in 'Discussion' started by RUASVDV, Feb 20, 2017.

  1. RUASVDV

    RUASVDV Clockwork Customer

    I'm having trouble with the union locks on my server, specifically for the CWU faction.

    The union locks can't be opened by the CWU faction (plugin) but can only be opened by the Combine faction. Anyone have a solution?
     
  2. RJ

    RJ no pay Legend Clockwork Customer

    Which Union Locks are you talking about? The Union Locks I made can be opened if you have the Union Card in your inventory.
     
  3. RUASVDV

    RUASVDV Clockwork Customer

    Yes, I meant those. Is there any way I can modify the Union locks so that CWU for example does not need a union card to operate the locks?
     
  4. I wouldn't really have a clue. I'd suggest using the code MPF use to open combine locks without cards. You'll most likely find the code somewhere in the Civil Protection faction. Or, in the items area labeled Combine Locks. I'm currently on mobile, sorry. I would've exactly found the code for you.
     
  5. RJ

    RJ no pay Legend Clockwork Customer

    You'd edit this line as seen here (line 38): https://github.com/xRJx/unionlock/blob/master/unionlock/plugin/sv_hooks.lua#L38

    For example:
    Code:
    if ((Schema:playerIsCombine(player) or player:GetFaction() == FACTION_ADMIN or player:GetFaction() == FACTION_CWU or player:HasItemByID("union_card")) and IsValid(entity.unionLock)) then
    The important part to note is this (it checks if a player's faction is CWU, FACTION_CWU being the CWU faction's ID):
    player:GetFaction() == FACTION_CWU
     

Previous Readers (Total: 0)