mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
12
gamemodes/helix/plugins/strength/attributes/sh_str.lua
Normal file
12
gamemodes/helix/plugins/strength/attributes/sh_str.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
ATTRIBUTE.name = "Force"
|
||||
ATTRIBUTE.description = "Une mesure de votre force."
|
||||
34
gamemodes/helix/plugins/strength/sh_plugin.lua
Normal file
34
gamemodes/helix/plugins/strength/sh_plugin.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
PLUGIN.name = "Strength"
|
||||
PLUGIN.author = "Chessnut"
|
||||
PLUGIN.description = "Ajoute un attribut de force."
|
||||
|
||||
if (SERVER) then
|
||||
function PLUGIN:GetPlayerPunchDamage(client, damage, context)
|
||||
if (client:GetCharacter()) then
|
||||
-- Add to the total fist damage.
|
||||
context.damage = context.damage + (client:GetCharacter():GetAttribute("str", 0) * ix.config.Get("strengthMultiplier"))
|
||||
end
|
||||
end
|
||||
|
||||
function PLUGIN:PlayerThrowPunch(client, trace)
|
||||
if (client:GetCharacter() and IsValid(trace.Entity) and trace.Entity:IsPlayer()) then
|
||||
client:GetCharacter():UpdateAttrib("str", 0.001)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Configuration for the plugin
|
||||
ix.config.Add("strengthMultiplier", 0.3, "L'échelle du multiplicateur de force", nil, {
|
||||
data = {min = 0, max = 1.0, decimals = 1},
|
||||
category = "Force"
|
||||
})
|
||||
Reference in New Issue
Block a user