mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
21
gamemodes/darkrp/plugins/armbands/cl_hooks.lua
Normal file
21
gamemodes/darkrp/plugins/armbands/cl_hooks.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
function PLUGIN:PopulateCharacterInfo(client, character, tooltip)
|
||||
local armbandData = client:GetNetVar("armbands", {})
|
||||
|
||||
for armband, color in pairs(armbandData) do
|
||||
local panel = tooltip:AddRow("armband")
|
||||
panel:SetBackgroundColor(color)
|
||||
panel:SetText("Il porte un " .. armband)
|
||||
panel:SizeToContents()
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Noir"
|
||||
ITEM.description = "Un morceau de tissu noir bon marché, apparemment déchiré autrefois d'un vêtement élégant, ses bords restant bruts et déchirés. Il dégage une atmosphère de mépris ou de désinvolture envers ceux qui choisissent de le porter."
|
||||
ITEM.color = Color(200, 200, 200)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Bleu Foncée"
|
||||
ITEM.description = "Un morceau de tissu bleu porté autour du bras."
|
||||
ITEM.color = Color(50, 50, 255)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Brun"
|
||||
ITEM.description = "Un morceau de tissu brun porté autour du bras."
|
||||
ITEM.color = Color(160, 104, 88)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Vert"
|
||||
ITEM.description = "Un morceau de tissu vert porté autour du bras."
|
||||
ITEM.color = Color(0, 255, 0)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Gris"
|
||||
ITEM.description = "Un morceau de tissu qui s'enroule autour du bras. De couleur gris clair terne, il ne semble rien d'exceptionnel."
|
||||
ITEM.color = Color(145, 145, 145)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brown ICOBT Armband"
|
||||
ITEM.description = "A brown armband wrapped around the arm, representing the values and membership of the ICOBT."
|
||||
ITEM.color = Color(144, 74, 59)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard de Loyaliste"
|
||||
ITEM.description = "Un morceau de tissu orange avec le logo de l'Union cousu, porté autour du bras."
|
||||
ITEM.color = Color(239, 125, 52)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Bleu Clair"
|
||||
ITEM.description = "Un morceau de tissu bleu porté autour du bras."
|
||||
ITEM.color = Color(50, 147, 255)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Orange"
|
||||
ITEM.description = "Un morceau de tissu orange porté autour du bras."
|
||||
ITEM.color = Color(255, 100, 0)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Mauve"
|
||||
ITEM.description = "Un morceau de tissu mauve porté autour du bras."
|
||||
ITEM.color = Color(150, 0, 255)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Rouge"
|
||||
ITEM.description = "Un morceau de tissu rouge porté autour du bras."
|
||||
ITEM.color = Color(255, 0, 0)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Blanc"
|
||||
ITEM.description = "Un morceau de tissu blanc porté autour du bras."
|
||||
ITEM.color = Color(255, 255, 255)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Blanc avec étoiles"
|
||||
ITEM.description = "Un morceau de tissu blanc porté autour du bras. Il semble avoir une médaille étoilée élégante avec un ruban autour, fixée dessus."
|
||||
ITEM.color = Color(255, 255, 255)
|
||||
@@ -0,0 +1,14 @@
|
||||
--[[
|
||||
| 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 = "Brassard - Jaune"
|
||||
ITEM.description = "Un morceau de tissu jaune porté autour du bras."
|
||||
ITEM.color = Color(255, 255, 0)
|
||||
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
|
||||
17
gamemodes/darkrp/plugins/armbands/sh_plugin.lua
Normal file
17
gamemodes/darkrp/plugins/armbands/sh_plugin.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
--[[
|
||||
| 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 = "Armbands"
|
||||
PLUGIN.author = "Aspect™"
|
||||
PLUGIN.description = "Adds wearable armband items."
|
||||
|
||||
ix.util.Include("cl_hooks.lua")
|
||||
ix.util.Include("sv_hooks.lua")
|
||||
24
gamemodes/darkrp/plugins/armbands/sv_hooks.lua
Normal file
24
gamemodes/darkrp/plugins/armbands/sv_hooks.lua
Normal file
@@ -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/
|
||||
--]]
|
||||
|
||||
|
||||
function PLUGIN:CharacterLoaded(character)
|
||||
local client = character:GetPlayer()
|
||||
local items = character:GetInventory():GetItems()
|
||||
local armbands = {}
|
||||
|
||||
for _, item in pairs(items) do
|
||||
if (item.base != "base_armbands" or !item:GetData("equip")) then continue end
|
||||
|
||||
armbands[item.name[1]:lower() .. item.name:Right(#item.name - 1)] = item.color
|
||||
end
|
||||
|
||||
client:SetNetVar("armbands", armbands)
|
||||
end
|
||||
Reference in New Issue
Block a user