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!

Perma-Kill Only for Citizens and the Administrator.

Discussion in 'Programming' started by Cz.robeson, May 1, 2013.

  1. Cz.robeson

    Cz.robeson Guest

    How to make Perma-Kill only work on the Citizens and the Administrator but not the Civil Protection and Overwatch Transhuman Arm?

    Thanks.
     
  2. There's a death hook that checks if PK mode is on, and if it is, it kills the player. Just edit the if statement to also check their faction.

    sv_hooks
     
  3. Cz.robeson

    Cz.robeson Guest

    I can't seem to find it. Probably me being blind again but could you please give me the line where it is? Thanks.
     
  4. CTRL + F
     
  5. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    Hi you're gonna want to go to line 1573 and find:

    Code:
    if (!player:GetCharacterData("permakilled")) then
    
    And change the line to:

    Code:
    if (!player:GetCharacterData("permakilled") and (player:GetFaction() == FACTION_CITIZEN or player:GetFaction() == FACTION_ADMIN)) then
    
     
  6. Martinerrr

    Martinerrr Guest

    *gasp*

    I thought editing the framework was bad :>
     
  7. That's the schema @[email protected]
     
  8. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    sv_hooks.lua of the cwhl2rp schema. Editing the framework is bad :>
     

Previous Readers (Total: 0)