mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-18 22:23:46 +03:00
Upload
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "TFA Weapons"
|
||||
ITEM.base = "base_weapons"
|
||||
ITEM.description = "A Weapon."
|
||||
ITEM.category = "Weapons"
|
||||
ITEM.model = "models/weapons/w_pistol.mdl"
|
||||
ITEM.class = "weapon_pistol"
|
||||
ITEM.width = 2
|
||||
ITEM.height = 2
|
||||
ITEM.isWeapon = true
|
||||
ITEM.isGrenade = false
|
||||
ITEM.weaponCategory = "sidearm"
|
||||
ITEM.useSound = "items/ammo_pickup.wav"
|
||||
|
||||
ITEM.atts = {}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local description = {self.description}
|
||||
return table.concat(description, "")
|
||||
end
|
||||
|
||||
function ITEM:GetBaseInfo()
|
||||
local baseInfo = {}
|
||||
if (self.balanceCat) then
|
||||
baseInfo[#baseInfo + 1] = "Kategoria broni: "
|
||||
baseInfo[#baseInfo + 1] = self.balanceCat
|
||||
if (self.isMelee) then
|
||||
baseInfo[#baseInfo + 1] = " melee"
|
||||
end
|
||||
if (CLIENT) then
|
||||
baseInfo[#baseInfo + 1] = "\nBazowa szansa na trafienie krytyczne: "
|
||||
if (self.isMelee) then
|
||||
baseInfo[#baseInfo + 1] = math.max(math.floor(ix.weapons:GetMeleeWeaponBaseHitChance(LocalPlayer():GetCharacter(), self.class) * ix.weapons:GetWeaponAimPenalty(self.class) * 100), 0)
|
||||
else
|
||||
baseInfo[#baseInfo + 1] = math.floor(ix.weapons:GetWeaponSkillMod(LocalPlayer():GetCharacter(), self.class) * ix.weapons:GetWeaponAimPenalty(self.class) * 100)
|
||||
end
|
||||
baseInfo[#baseInfo + 1] = "%%"
|
||||
end
|
||||
end
|
||||
|
||||
return table.concat(baseInfo, "")
|
||||
end
|
||||
|
||||
function ITEM:GetExtendedInfo()
|
||||
local extendedInfo = {}
|
||||
if (self.balanceCat) then
|
||||
if (self.isMelee) then
|
||||
extendedInfo[#extendedInfo + 1] = "Bazowe obrażenia: "
|
||||
extendedInfo[#extendedInfo + 1] = ix.weapons:GetMeleeWeaponBaseDamage(self.class)
|
||||
else
|
||||
extendedInfo[#extendedInfo + 1] = "Bazowe obrażenia: "
|
||||
extendedInfo[#extendedInfo + 1] = ix.weapons:GetWeaponBaseDamage(self.class)
|
||||
|
||||
local min, max, bFlat = ix.weapons:GetWeaponSkillRequired(self.class)
|
||||
if (!bFlat) then
|
||||
extendedInfo[#extendedInfo + 1] = "\nZasięg umiejętności: "
|
||||
extendedInfo[#extendedInfo + 1] = min.."-"..max
|
||||
else
|
||||
extendedInfo[#extendedInfo + 1] = "\nWymagana umiejętność: "
|
||||
extendedInfo[#extendedInfo + 1] = min
|
||||
end
|
||||
|
||||
local minR, effR = ix.weapons:GetWeaponEffectiveRanges(self.class)
|
||||
extendedInfo[#extendedInfo + 1] = "\nMinimalny skuteczny zasięg: "
|
||||
extendedInfo[#extendedInfo + 1] = minR.."m"
|
||||
extendedInfo[#extendedInfo + 1] = "\nMaksymalny skuteczny zasięg: "
|
||||
extendedInfo[#extendedInfo + 1] = effR.."m"
|
||||
|
||||
extendedInfo[#extendedInfo + 1] = "\nStrzały na punkt akcji: "
|
||||
extendedInfo[#extendedInfo + 1] = ix.weapons:GetWeaponNumShots(self.class)
|
||||
extendedInfo[#extendedInfo + 1] = "\nPrzebicie pancerza: "
|
||||
extendedInfo[#extendedInfo + 1] = math.floor(ix.weapons:GetArmorPen(self.class) * 100).."%%"
|
||||
end
|
||||
end
|
||||
|
||||
return table.concat(extendedInfo, "")
|
||||
end
|
||||
|
||||
function ITEM:GetColorAppendix()
|
||||
if self.balanceCat then
|
||||
return {["blue"] = self:GetBaseInfo(), ["red"] = self:GetExtendedInfo()}
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:OnRegistered()
|
||||
if (self.balanceCat and ix.weapons) then
|
||||
if (self.isMelee) then
|
||||
ix.weapons:RegisterMeleeWeapon(self.class, self.balanceCat)
|
||||
else
|
||||
ix.weapons:RegisterWeapon(self.class, self.balanceCat)
|
||||
end
|
||||
|
||||
ix.weapons:RegisterWeaponExceptions(self.class, self.baseDamage, self.armorPen, self.aimPenalty, self.numShots)
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:OnEquipWeapon(client, weapon)
|
||||
if (self:GetData("BioLocked") or self:GetData("tfa_atts") or !table.IsEmpty(self.atts)) then
|
||||
timer.Simple(0.5, function()
|
||||
weapon:SetNetVar("ixItemAtts", self.atts)
|
||||
|
||||
if (!IsValid(weapon)) then return end
|
||||
weapon:InitAttachments()
|
||||
|
||||
for _, v in pairs(self.atts) do
|
||||
if (self:GetData("tfa_default_atts_uneq", {})[v]) then continue end
|
||||
|
||||
weapon:Attach(v)
|
||||
end
|
||||
|
||||
if (self:GetData("tfa_atts")) then
|
||||
for _, v in pairs(self:GetData("tfa_atts")) do
|
||||
if (istable(v) and v.att) then
|
||||
weapon:Attach(v.att)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (self:GetData("BioLocked")) then
|
||||
weapon:SetNetVar("BioLocked", true)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Kij bejsbolowy"
|
||||
ITEM.description = "Śmiało, wyżyj się na czymś."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_bat_metal.mdl"
|
||||
ITEM.class = "tfa_nmrih_bat"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "medium"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.62, 400.03, 0),
|
||||
fov = 0.58
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Młotek pazurowy"
|
||||
ITEM.description = "Zwyczajny młotek do wbijania gwoździ, ale możesz też wbić nim komuś rozum do głowy."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_tool_barricade.mdl"
|
||||
ITEM.class = "tfa_nmrih_bcd"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "light"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 3
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.69, 400, 0),
|
||||
fov = 0.35
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Tasak"
|
||||
ITEM.description = "Tasak to krojenia mięsa."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_cleaver.mdl"
|
||||
ITEM.class = "tfa_nmrih_cleaver"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "light"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 3
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.73, 400.09, 0),
|
||||
fov = 0.35
|
||||
}
|
||||
|
||||
ITEM.maxDurability = 20
|
||||
ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nWytrzymałość: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,152 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Łom"
|
||||
ITEM.description = "Hm... Łom. Tylko nie próbuj teraz atakować nim oficerów Civil Protection!"
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_crowbar.mdl"
|
||||
ITEM.class = "tfa_nmrih_crowbar"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "medium"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(25.07, 400.05, 0),
|
||||
fov = 0.58
|
||||
}
|
||||
ITEM.maxDurability = 25
|
||||
ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Set durability", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nWytrzymałość: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Siekiera Strażacka"
|
||||
ITEM.description = "Strażacka siekiera do niszczenia drzwi czy ścian kiedy nie ma innej opcji, ewentualnie można użyć jej w samoobronie."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_axe_fire.mdl"
|
||||
ITEM.class = "tfa_nmrih_fireaxe"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "heavy"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.94, 400.02, 0),
|
||||
fov = 0.68
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Fubar"
|
||||
ITEM.description = "Duże narzędzie wielofunkcyjne."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_fubar.mdl"
|
||||
ITEM.class = "tfa_nmrih_fubar"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "heavy"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.82, 400.04, 0),
|
||||
fov = 0.84
|
||||
}
|
||||
ITEM.maxDurability = 40
|
||||
ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nWytrzymałość: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,154 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Toporek"
|
||||
ITEM.description = "Toporek, który idealnie nada się do ścinania drzew... lub ludzi."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_hatchet.mdl"
|
||||
ITEM.class = "tfa_nmrih_hatchet"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "light"
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_hatchet.mdl"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 3
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.97, 400.05, 0),
|
||||
fov = 0.48
|
||||
}
|
||||
|
||||
ITEM.maxDurability = 12
|
||||
ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nWytrzymałość: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,154 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Naostrzony nóż kuchenny"
|
||||
ITEM.description = "Naostrzony nóż kuchenny. W porównaniu do tego co jest publicznie dostępne... ten napewno nie jest legalny."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_kitknife.mdl"
|
||||
ITEM.class = "tfa_nmrih_kknife"
|
||||
ITEM.isMelee = true
|
||||
ITEM.baseDamage = 17
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "light"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 2
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(0.77, -5.3, 199.95),
|
||||
ang = Angle(91.56, 278.2, 0),
|
||||
fov = 1.73
|
||||
}
|
||||
|
||||
ITEM.maxDurability = 9
|
||||
ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nWytrzymałość: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Rura"
|
||||
ITEM.description = "Rura która może posłużyć za broń."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_pipe_lead.mdl"
|
||||
ITEM.class = "tfa_nmrih_lpipe"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "medium"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(25, 400.02, 0),
|
||||
fov = 0.53
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Maczeta"
|
||||
ITEM.description = "Ostra maczeta, tylko po co ci ona?"
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_machete.mdl"
|
||||
ITEM.class = "tfa_nmrih_machete"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "medium"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(0, 200, 0),
|
||||
ang = Angle(-0.01, 270.06, 0),
|
||||
fov = 2.51
|
||||
}
|
||||
|
||||
ITEM.maxDurability = 15
|
||||
ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nWytrzymałość: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,155 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Kilof"
|
||||
ITEM.description = "Chcesz iść pokopać? Z tym kilofem to napewno ci się uda. Uważaj żeby nie obudzić Antlionów!"
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_pickaxe.mdl"
|
||||
ITEM.class = "tfa_nmrih_pickaxe"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "heavy"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.57, 400.01, 0),
|
||||
fov = 0.86
|
||||
}
|
||||
|
||||
ITEM.maxDurability = 20
|
||||
--ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nDurability: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self.player:StripWeapon("tfa_nmrih_pickaxe")
|
||||
self:SetData("equip", false)
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Tarcza Balistyczna"
|
||||
ITEM.description = "Tarcza Balistyczna stworzona na potrzeby Civil Protection."
|
||||
ITEM.model = "models/weapons/tfa_mw2cr/riotshield/w_riotshield.mdl"
|
||||
ITEM.class = "tfa_mw2cr_riotshield"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "heavy"
|
||||
ITEM.width = 2
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.57, 400.01, 0),
|
||||
fov = 0.86
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Młot wyburzeniowy"
|
||||
ITEM.description = "Ciężki i mocarny. Uważaj żeby nikogo nie uderzyć!"
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_sledge.mdl"
|
||||
ITEM.class = "tfa_nmrih_sledge"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "heavy"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.76, 400, 0),
|
||||
fov = 0.77
|
||||
}
|
||||
ITEM.maxDurability = 50
|
||||
ITEM.isTool = true
|
||||
|
||||
local color_green = Color(100, 255, 100)
|
||||
local color_red = Color(200, 25, 25)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PaintOver(item, w, h)
|
||||
if (item:GetData("equip")) then
|
||||
surface.SetDrawColor(110, 255, 110, 100)
|
||||
surface.DrawRect(w - 14, h - 20, 8, 8)
|
||||
end
|
||||
local maxDurability = item:GetMaxDurability()
|
||||
local durability = item:GetDurability()
|
||||
local width = w - 8
|
||||
local cellWidth = math.Round(width / maxDurability)
|
||||
local color = ix.util.ColorLerp(1 - durability / maxDurability, color_green, color_red)
|
||||
surface.SetDrawColor(color)
|
||||
|
||||
for i = 0, durability - 1 do
|
||||
surface.DrawRect(5 + i * cellWidth, h - 8, cellWidth - 1, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ITEM.functions.SetMaxDurability = {
|
||||
name = "Ustaw maks. wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź maks. wartość wytrzymałości", itemTable:GetMaxDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0) then
|
||||
netstream.Start("ixSetToolMaxDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
ITEM.functions.SetDurability = {
|
||||
name = "Ustaw wytrzymałość",
|
||||
icon = "icon16/wrench.png",
|
||||
OnClick = function(itemTable)
|
||||
local client = itemTable.player
|
||||
Derma_StringRequest("Ustaw wytrzymałość", "Wprowadź tutaj wartość wytrzymałości dla tego narzędzia", itemTable:GetDurability(), function(text)
|
||||
local amount = tonumber(text)
|
||||
|
||||
if (amount and amount > 0 and amount <= itemTable:GetMaxDurability()) then
|
||||
netstream.Start("ixSetToolDurability", itemTable:GetID(), math.floor(amount))
|
||||
else
|
||||
client:Notify("Nieprawidłowy numer")
|
||||
end
|
||||
end)
|
||||
end,
|
||||
OnRun = function(itemTable)
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(itemTable)
|
||||
if (IsValid(itemTable.entity)) then
|
||||
return false
|
||||
end
|
||||
|
||||
if (!CAMI.PlayerHasAccess(itemTable.player, "Helix - Basic Admin Commands")) then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
}
|
||||
|
||||
function ITEM:GetDescription()
|
||||
local maxDurability = self:GetMaxDurability()
|
||||
local durability = self:GetDurability()
|
||||
return self.description .. "\n\nWytrzymałość: " .. durability .. "/" .. maxDurability
|
||||
end
|
||||
|
||||
function ITEM:OnInstanced(index, x, y, item)
|
||||
self:SetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:DamageDurability(amount)
|
||||
self:SetData("durability", math.max(0, self:GetDurability() - 1))
|
||||
|
||||
if (self:GetDurability() == 0) then
|
||||
self:OnBreak()
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:GetBreakSound()
|
||||
return "weapons/crowbar/crowbar_impact"..math.random(1, 2)..".wav"
|
||||
end
|
||||
|
||||
function ITEM:OnBreak()
|
||||
local breakSound = self:GetBreakSound()
|
||||
|
||||
if (IsValid(self.player)) then
|
||||
self.player:EmitSound(breakSound, 65)
|
||||
elseif (IsValid(self.entity)) then
|
||||
self.entity:EmitSound(breakSound, 65)
|
||||
end
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ITEM:GetDurability()
|
||||
return self:GetData("durability", self:GetMaxDurability())
|
||||
end
|
||||
|
||||
function ITEM:GetMaxDurability()
|
||||
return self:GetData("maxDurability", self.maxDurability)
|
||||
end
|
||||
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Szpadel"
|
||||
ITEM.description = "Szpadel do kopania w ziemi. Nic specjalnego."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_spade.mdl"
|
||||
ITEM.class = "tfa_nmrih_spade"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "medium"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 4
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(0, -200, 0),
|
||||
ang = Angle(-0.66, 449.91, 0),
|
||||
fov = 3.36
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ITEM.name = "Klucz"
|
||||
ITEM.description = "Klucz do przykręcania śrub, można też nim komuś przywalić."
|
||||
ITEM.model = "models/weapons/tfa_nmrih/w_me_wrench.mdl"
|
||||
ITEM.class = "tfa_nmrih_wrench"
|
||||
ITEM.isMelee = true
|
||||
ITEM.weaponCategory = "melee"
|
||||
ITEM.balanceCat = "light"
|
||||
ITEM.width = 1
|
||||
ITEM.height = 3
|
||||
ITEM.iconCam = {
|
||||
pos = Vector(-509.64, -427.61, 310.24),
|
||||
ang = Angle(24.64, 400.03, 0),
|
||||
fov = 0.38
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Granat błyskowy"
|
||||
ITEM.description = "Granat M84 znany także jako 'Flashbang'. Po wybuchu tymczasowo oślepia i ogłusza."
|
||||
ITEM.model = "models/weapons/w_eq_flashbang_dropped.mdl"
|
||||
ITEM.class = "tfa_csgo_flash"
|
||||
ITEM.grenadeEntityClass = "tfa_csgo_thrownflash"
|
||||
ITEM.weaponCategory = "grenade"
|
||||
ITEM.isGrenade = true
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
@@ -0,0 +1,20 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Granat odłamkowy"
|
||||
ITEM.description = "Granat odłamkowy MK3A2"
|
||||
ITEM.model = "models/items/grenadeammo.mdl"
|
||||
ITEM.class = "tfa_mmod_grenade"
|
||||
ITEM.grenadeEntityClass = "mmod_frag"
|
||||
ITEM.weaponCategory = "grenade"
|
||||
ITEM.isGrenade = true
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
@@ -0,0 +1,20 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Granat zapalający"
|
||||
ITEM.description = "Granat AN-M14, podczas spalania osiąga temperaturę prawię 2500°C."
|
||||
ITEM.model = "models/weapons/arccw_go/w_eq_incendiarygrenade_thrown.mdl"
|
||||
ITEM.class = "tfa_csgo_incen"
|
||||
ITEM.grenadeEntityClass = "tfa_csgo_thrownincen"
|
||||
ITEM.weaponCategory = "grenade"
|
||||
ITEM.isGrenade = true
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
@@ -0,0 +1,20 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
ITEM.name = "Granat dymny"
|
||||
ITEM.description = "Granat dymny 5210JL. Tworzy wielką ścianę dymu."
|
||||
ITEM.model = "models/weapons/w_eq_smokegrenade_dropped.mdl"
|
||||
ITEM.class = "tfa_csgo_smoke"
|
||||
ITEM.grenadeEntityClass = "tfa_csgo_thrownsmoke"
|
||||
ITEM.weaponCategory = "grenade"
|
||||
ITEM.isGrenade = true
|
||||
ITEM.width = 1
|
||||
ITEM.height = 1
|
||||
Reference in New Issue
Block a user