• Constitution/HP Attrribute for Nutscript 1.1
    1 replies, posted
Hey, I have been trying for the last 6 hours to make an attribute that would increase your MaxHP when your Attribute "con" goes up. Notice: I'm a beginner who barely knows what hes doing if you could explain parts for me I would love that CODE [QUOTE]PLUGIN.name = "Constitution" PLUGIN.author = "Cheesypeesy" PLUGIN.desc = "Adds on to your base health." if (IsValid(self) and IsValid(self.Owner)) then local health = self:GetMaxHealth() local context2 = {health = health} local result = hook.Run("PlayerGetMaxHealth", self:Entity, health, context) if (result != nil) then health = result else health = context.health end end if (SERVER) then function PLUGIN:PlayerGetMaxHealth(client, health, context2) if (client:getChar()) then -- Add to the base health. context.health = context.health + (client:getChar():getAttrib("con", 0) * nut.config.get("conMultiplier")) end end[/QUOTE]
this is old, but you might wanna look for help in the nutscript foruns, they might know more about it than people here.
Sorry, you need to Log In to post a reply to this thread.