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!

Health

Discussion in 'Fast Threads' started by Savvyge Investments, May 22, 2019.

  1. Savvyge Investments

    Savvyge Investments Clockwork Customer

    Is there a way to increase a players health pool, or armor pool? Or do all damage models have to be around a 100/100 stack?
    If anyone has any code involving increasing health limits or armor limits let me know please.
     
  2. Oliver

    Oliver Some kinda has-been Clockwork Customer Active Member

    You could look into the default code. It's sure to reside somewhere in the schema code.
     
  3. Savvyge Investments

    Savvyge Investments Clockwork Customer

    I have filtered through it many times but I am sure the framework uses a Garry's Mod value for the Health and armor. Nothing actually superficial over it modifying it to anything more or less. I am still searching.
     
  4. Oliver

    Oliver Some kinda has-been Clockwork Customer Active Member

    Code:
    -- Called just after a player spawns.
    function Schema:PostPlayerSpawn(player, lightSpawn, changeClass, firstSpawn)
        local clothes = player:GetCharacterData("clothes");
      
        if (!lightSpawn) then
            player:SetSharedVar("antidepressants", 0);
          
            Clockwork.datastream:Start(player, "ClearEffects", true);
          
            player.beingSearched = nil;
            player.searching = nil;
          
            if (self:PlayerIsCombine(player) or player:GetFaction() == FACTION_ADMIN) then
                if (player:GetFaction() == FACTION_OTA) then
                    player:SetMaxHealth(150);
                    player:SetMaxArmor(150);
                    player:SetHealth(150);
                    player:SetArmor(150);
                elseif (!self:IsPlayerCombineRank(player, "RCT")) then
                    player:SetArmor(100);
                else
                    player:SetArmor(50);
                end;
            end;
    sv_hooks.lua.

    Edit as need be.
     
    • Friendly Friendly x 1