Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Start Spawn Functions
- function EXPSetVarsOnSpawn(pl)
- if pl:GetNWInt("Skill_HP", 0) >= 1 then
- pl:SetMaxHealth(100 + MaxHpGain*pl:GetNWInt("Skill_HP"))
- pl:SetHealth(pl:GetMaxHealth())
- end
- if pl:GetNWInt("Skill_ARMOR", 0) >= 1 then
- pl:SetArmor(0 + MaxArmorGain*pl:GetNWInt("Skill_ARMOR"))
- pl.MaxArmor = (100 + MaxArmorGain*pl:GetNWInt("Skill_ARMOR"))
- else
- pl.MaxArmor = 100
- end
- if pl:GetNWInt("Skill_REGEN", 0) >= 1 then
- pl.RegTime = (RegTimeVar*pl:GetNWInt("Skill_REGEN"))
- else
- pl.RegTime = 0
- end
- if pl:GetNWInt("Skill_ARMREGEN", 0) >= 1 then
- pl.RegArmTime = (RegArmTimeVar*pl:GetNWInt("Skill_ARMREGEN"))
- else
- pl.RegArmTime = 0
- end
- if pl:GetNWInt("Skill_JUMP", 0) >= 1 then
- pl:SetJumpPower(160 + JumpPowerVar*pl:GetNWInt("Skill_JUMP"))
- end
- if pl:GetNWInt("Skill_RESISTANCE", 0) >= 1 then
- pl.Resistance = (1 - ResistanceVar*pl:GetNWInt("Skill_RESIST"))
- else
- pl.Resistance = 1
- end
- if pl:GetNWInt("Skill_SPEED", 0) >= 1 then
- pl.Resistance = (1 - ResistanceVar*pl:GetNWInt("Skill_SPEED"))
- pl:SetWalkSpeed(150 + pl:GetNWInt("Skill_SPEED") * 5 )
- pl:SetRunSpeed(250 + pl:GetNWInt("Skill_SPEED") * 5 )
- end
- end
- hook.Add( "PlayerLoadout", "Set Vars On Spawn", EXPSetVarsOnSpawn )
- -- End Spawn Functions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement