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!

Other Help - /DoorKick Command

Discussion in 'Plugins' started by Frost, Nov 20, 2018.

  1. Howdy, I recently found online some code for a /DoorKick command. It works, but the problem is, is that everyone can use it, no matter what faction they are. This came to my attention when minges came on and kicked open combine locked doors, which broke the locks. I said to myself, "okay, I can fix this easy", and I set the faction checker to, "if (faction == FACTION_MPF) then", but then no one could use the command, not even MPF. Can anyone provide some advice/help?

    Code: https://pastebin.com/nf1KCrMU

    Thanks!
     
  2. Aspect

    Aspect Hey Pal, did you just blow in from stupid town? Active Member

    Paste the whole command code here.
     
    • Friendly Friendly x 1
  3. Aspect

    Aspect Hey Pal, did you just blow in from stupid town? Active Member

    Change
    Code:
    faction
    to
    Code:
    player:GetFaction()
     
    • Friendly Friendly x 1
  4. Alrighty, I'll try that out and let you know what happens.
     
    • Informative Informative x 1
  5. Had no luck there, non-MPF can still /DoorKick.
     
  6. Aspect

    Aspect Hey Pal, did you just blow in from stupid town? Active Member

    Hmm, dunno, also kinda tired to look more into it rn. Sorry. Maybe someone else can help you.
     
    • Like Like x 1
  7. vexus

    vexus ej rockwell's worst nightmare Legend Clockwork Customer Active Member

    Try using the PlayerIsCombine function instead. That way we can rule out naming issues with your factions.
     
    • Agree Agree x 1
    • Winner Winner x 1
  8. _HappyGoLucky

    _HappyGoLucky Clockwork Customer Active Member

    Replace
    Code:
    if (faction == FACTION_OTA or faction == FACTION_MPF or faction == FACTION_RESISTANCE) then
    with
    Code:
    if (Schema:PlayerIsCombine(player) or player:GetFaction() == FACTION_RESISTANCE) then
    just giving a bit more detail on what @vexus said
     
    • Good Coder Good Coder x 1
  9. Aye, I did what Vexus said and that worked. Thank you!
     
    • Like Like x 2

Previous Readers (Total: 0)