mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
38
gamemodes/darkrp/plugins/armbands/items/base/sh_armbands.lua
Normal file
38
gamemodes/darkrp/plugins/armbands/items/base/sh_armbands.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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.base = "base_genericequipable"
|
||||
ITEM.name = "Armband"
|
||||
ITEM.description = "A piece of fabric material worn around the arm."
|
||||
ITEM.model = "models/willardnetworks/armband.mdl"
|
||||
ITEM.category = "Vêtements - Brassards"
|
||||
ITEM.color = Color(255, 255, 255)
|
||||
|
||||
if (CLIENT) then
|
||||
function ITEM:PopulateTooltip(tooltip)
|
||||
local name = tooltip:GetRow("name")
|
||||
name:SetBackgroundColor(self.color)
|
||||
end
|
||||
end
|
||||
|
||||
function ITEM:OnEquipped(client)
|
||||
local armbands = client:GetNetVar("armbands", {})
|
||||
armbands[self.name[1]:lower() .. self.name:Right(#self.name - 1)] = self.color
|
||||
|
||||
client:SetNetVar("armbands", armbands)
|
||||
end
|
||||
|
||||
function ITEM:OnUnequipped(client)
|
||||
local armbands = client:GetNetVar("armbands", {})
|
||||
armbands[self.name[1]:lower() .. self.name:Right(#self.name - 1)] = nil
|
||||
|
||||
client:SetNetVar("armbands", armbands)
|
||||
end
|
||||
Reference in New Issue
Block a user