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 Editing a faction's starting health?

Discussion in 'Development' started by Claude, Aug 17, 2016.

  1. Claude

    Claude Clockwork Customer

    Hello,

    I would like to know how can I edit a faction's starting health as it was done for the Overwatch (150 hp instead of 100).

    Thanks in advance.
     
  2. Arbiter329

    Arbiter329 Owner of Arc-Factory Roleplay

    Code:
    function PLUGIN:PostPlayerSpawn(player, lightSpawn, changeClass, firstSpawn)
       if !lightSpawn then
         if player:GetFaction() == FACTION_EXAMPLE then
           player:SetHealth(200);
         end;
       end;
    end;
    
    Just plop that in your plugin's sv_hooks.lua

    Replace FACTION_EXAMPLE with whatever faction you want to set the health to, and replace 200 to what you want their health set to.
     
  3. Claude

    Claude Clockwork Customer

    Thank you, if only I had a dev documentation for Clockwork...
     

Previous Readers (Total: 0)