This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 0e770b2b49
commit 94063e4369
7342 changed files with 1718932 additions and 14 deletions

View File

@@ -0,0 +1,426 @@
--[[
| 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 Schema:PopulateCharacterInfo(client, character, tooltip)
if (client:IsRestricted()) then
local panel = tooltip:AddRowAfter("name", "ziptie")
panel:SetBackgroundColor(derma.GetColor("Warning", tooltip))
panel:SetText(L("tiedUp"))
panel:SizeToContents()
elseif (client:GetNetVar("tying")) then
local panel = tooltip:AddRowAfter("name", "ziptie")
panel:SetBackgroundColor(derma.GetColor("Warning", tooltip))
panel:SetText(L("beingTied"))
panel:SizeToContents()
elseif (client:GetNetVar("untying")) then
local panel = tooltip:AddRowAfter("name", "ziptie")
panel:SetBackgroundColor(derma.GetColor("Warning", tooltip))
panel:SetText(L("beingUntied"))
panel:SizeToContents()
end
end
function Schema:ShouldShowPlayerOnScoreboard(client)
local faction = LocalPlayer():Team()
if (faction == FACTION_SERVERADMIN) then return true end
if (client:Team() == FACTION_OTA or client:Team() == FACTION_OVERWATCH) then
return (faction == FACTION_OTA
or (faction == FACTION_CP and client:Team() == FACTION_OVERWATCH)
or faction == FACTION_ADMIN
or faction == FACTION_OVERWATCH)
end
end
function Schema:CanPlayerJoinClass(client, class, info)
return false
end
function Schema:PlayerFootstep(client, position, foot, soundName, volume)
return true
end
function Schema:RenderScreenspaceEffects()
if (ix.option.Get("ColorModify", true)) then
local colorModify = {}
colorModify["$pp_colour_colour"] = 0.77 + ix.option.Get("ColorSaturation", 0)
if (system.IsWindows()) then
colorModify["$pp_colour_brightness"] = -0.02
colorModify["$pp_colour_contrast"] = 1.2
else
colorModify["$pp_colour_brightness"] = 0
colorModify["$pp_colour_contrast"] = 1
end
DrawColorModify(colorModify)
end
end
-- creates labels in the status screen
function Schema:CreateCharacterInfo(panel)
if (LocalPlayer():Team() == FACTION_CITIZEN or LocalPlayer():Team() == FACTION_WORKERS or LocalPlayer():Team() == FACTION_MEDICAL) then
panel.cid = panel:Add("ixListRow")
panel.cid:SetList(panel.list)
panel.cid:Dock(TOP)
panel.cid:DockMargin(0, 0, 0, 8)
end
end
-- populates labels in the status screen
function Schema:UpdateCharacterInfo(panel)
if (LocalPlayer():Team() == FACTION_CITIZEN or LocalPlayer():Team() == FACTION_WORKERS or LocalPlayer():Team() == FACTION_MEDICAL) then
panel.cid:SetLabelText(L("citizenid"))
panel.cid:SetText(string.format("##%s", LocalPlayer():GetCharacter():GetCid() or "INCONNU"))
panel.cid:SizeToContents()
end
end
function Schema:BuildBusinessMenu(panel)
local bHasItems = false
for k, _ in pairs(ix.item.list) do
if (hook.Run("CanPlayerUseBusiness", LocalPlayer(), k) != false) then
bHasItems = true
break
end
end
return bHasItems
end
function Schema:PopulateHelpMenu(tabs)
tabs["Voix"] = function(container)
local classes = {}
for k, v in pairs(Schema.voices.classes) do
if (v.condition(LocalPlayer())) then
classes[#classes + 1] = k
end
end
if (#classes < 1) then
local info = container:Add("DLabel")
info:SetFont("MenuFontNoClamp")
info:SetText("Vous n'avez accès à aucune ligne vocale !")
info:SetContentAlignment(5)
info:SetTextColor(color_white)
info:SetExpensiveShadow(1, color_black)
info:Dock(TOP)
info:DockMargin(0, 0, 0, SScaleMin(8 / 3))
info:SizeToContents()
info:SetTall(info:GetTall() + SScaleMin(16 / 3))
info.Paint = function(_, width, height)
surface.SetDrawColor(ColorAlpha(derma.GetColor("Error", info), 160))
surface.DrawRect(0, 0, width, height)
end
return
end
table.sort(classes, function(a, b)
return a < b
end)
local function FillList(query)
for _, class in ipairs(classes) do
local category = container:Add("Panel")
category:Dock(TOP)
category:DockMargin(0, 0, 0, SScaleMin(8 / 3))
category:DockPadding(SScaleMin(8 / 3), SScaleMin(8 / 3), SScaleMin(8 / 3), SScaleMin(8 / 3))
category.Paint = function(_, width, height)
surface.SetDrawColor(Color(0, 0, 0, 66))
surface.DrawRect(0, 0, width, height)
end
local categoryLabel = category:Add("DLabel")
categoryLabel:SetFont("MenuFontLargerNoClamp")
categoryLabel:SetText(class:utf8upper())
categoryLabel:Dock(FILL)
categoryLabel:SetTextColor(color_white)
categoryLabel:SetExpensiveShadow(1, color_black)
categoryLabel:SizeToContents()
category:SizeToChildren(true, true)
for command, info in SortedPairs(self.voices.stored[class]) do
if (query and !(command:find(query) or info.text:find(query))) then
continue
end
local title = container:Add("DLabel")
title:SetFont("MenuFontLargerNoClamp")
title:SetText(command:utf8upper())
title:Dock(TOP)
title:SetTextColor(ix.config.Get("color"))
title:SetExpensiveShadow(1, color_black)
title:SetMouseInputEnabled(true)
title:SizeToContents()
title.DoClick = function()
SetClipboardText(command:utf8upper())
LocalPlayer():Notify("Commande vocale copiée dans le presse-papiers.")
end
local description = container:Add("DLabel")
description:SetFont("MenuFontNoClamp")
description:SetText(info.text)
description:Dock(TOP)
description:SetTextColor(color_white)
description:SetExpensiveShadow(1, color_black)
description:SetWrap(true)
description:SetAutoStretchVertical(true)
description:SetMouseInputEnabled(true)
description:SizeToContents()
description:DockMargin(0, 0, 0, SScaleMin(8 / 3))
description.DoClick = function()
SetClipboardText(command:utf8upper())
LocalPlayer():Notify("Commande vocale copiée dans le presse-papiers.")
end
end
end
end
local search = container:GetParent():Add("DTextEntry")
search:Dock(TOP)
search:SetFont("MenuFontNoClamp")
search:SetTall(SScaleMin(30 / 3))
search:DockMargin(SScaleMin(8 / 3), 0, SScaleMin(8 / 3), SScaleMin(8 / 3))
search:SetPlaceholderText("Taper le texte de la ligne vocale...")
search:SetTextColor(Color(200, 200, 200, 255))
search:SetCursorColor(Color(200, 200, 200, 255))
search:SetFont("MenuFontNoClamp")
search:SetText(value or "")
search.Paint = function(panel, w, h)
surface.SetDrawColor(Color(0, 0, 0, 100))
surface.DrawRect(0, 0, w, h)
surface.SetDrawColor(Color(111, 111, 136, (255 / 100 * 30)))
surface.DrawOutlinedRect(0, 0, w, h)
if ( panel.GetPlaceholderText and panel.GetPlaceholderColor and panel:GetPlaceholderText() and
panel:GetPlaceholderText():Trim() != "" and panel:GetPlaceholderColor() and ( !panel:GetText() or panel:GetText() == "" ) ) then
local oldText = panel:GetText()
local str = panel:GetPlaceholderText()
if ( str:StartWith( "#" ) ) then str = str:sub( 2 ) end
str = language.GetPhrase( str )
panel:SetText( str )
panel:DrawTextEntryText( panel:GetPlaceholderColor(), panel:GetHighlightColor(), panel:GetCursorColor() )
panel:SetText( oldText )
return
end
panel:DrawTextEntryText( panel:GetTextColor(), panel:GetHighlightColor(), panel:GetCursorColor() )
end
search.OnChange = function(self)
local text = self:GetValue()
container:Clear()
FillList(text:utf8lower())
end
search.Think = function(pnl)
if (pnl:IsVisible() and !IsValid(container) or !container:IsVisible()) then
pnl:SetVisible(false)
end
end
container.Think = function(pnl)
if (!search:IsVisible()) then
search:SetVisible(true)
end
end
FillList()
end
end
netstream.Hook("PlaySound", function(sound)
surface.PlaySound(sound)
end)
netstream.Hook("ViewObjectives", function(data)
if (IsValid(ix.gui.combine)) then
ix.gui.combine:AddLine("@cViewObjectives")
end
vgui.Create("ixViewObjectives"):Populate(data)
end)
local blocked = {}
netstream.Hook("SearchRequest", function(client)
if (blocked[client]) then
netstream.Start("SearchDecline")
return
end
local name = hook.Run("GetCharacterName", client, "ic") or client:GetName()
local panel = Derma_Query(name.." essaie de vous fouiller. Le laisserez-vous faire ?", "Demande de recherche d'inventaire",
"Autoriser", function()
netstream.Start("SearchAllow")
end,
"Refuser", function()
netstream.Start("SearchDecline")
end,
"Bloquer", function()
netstream.Start("SearchDecline")
blocked[client] = true
end)
timer.Simple(30, function()
if (IsValid(panel)) then
panel:Remove()
netstream.Start("SearchTimeout")
end
end)
end)
function Schema:AllowMessage(panel)
panel.OnKeyCodePressed = function(this, keyCode)
-- Allow to open chat while playing
if (input.LookupKeyBinding(keyCode) == "messagemode") then
hook.Run("PlayerBindPress", LocalPlayer(), "messagemode", true, keyCode)
end
end
end
local sentences = {
["Short"] = {
"hi01",
"hi02",
"ok01",
"ok02",
"no01",
"no02",
"ow01",
"ow02"
},
["Med"] = {
"question20",
"question21",
"question25",
"question27",
"question29",
"question30",
"question01",
"question07",
"question08",
"question12",
"question13",
"question15",
"question18",
"question19"
},
["Long"] = {
"question02",
"question04",
"question06",
"question09",
"question10",
"question11",
"question14",
"gordead_ques15",
"abouttime02"
}
}
local function PlaySentence(client, length)
if (length < 10) then
client:EmitSound("vo/npc/male01/" .. table.Random(sentences["Short"]) .. ".wav", 1, 100)
elseif (length < 30 ) then
client:EmitSound("vo/npc/male01/" .. table.Random(sentences["Med"]) .. ".wav", 1, 100)
else
client:EmitSound("vo/npc/male01/" .. table.Random(sentences["Long"]) .. ".wav", 1, 100)
end
end
local chatTypes = {
["ic"] = true,
["w"] = true,
["wd"] = true,
["y"] = true,
["radio"] = true,
["radio_eavesdrop"] = true,
["radio_eavesdrop_yell"] = true,
["dispatch"] = true,
["dispatch_radio"] = true,
["overwatch_radio"] = true,
["dispatchota_radio"] = true,
["dispatchcp_radio"] = true,
["scanner_radio"] = true,
["request"] = true
}
function Schema:MessageReceived(speaker, info)
if (!speaker or !info or !info.chatType or !info.text) then return end
if (chatTypes[info.chatType]) then
PlaySentence(speaker, #info.text)
end
end
function GAMEMODE:KeyRelease(client, key)
if (!IsFirstTimePredicted()) then
return
end
if (key == IN_USE) then
local weapon = client:GetActiveWeapon()
if (weapon and IsValid(weapon) and weapon:GetClass() == "weapon_physgun") then return false end
if (!ix.menu.IsOpen()) then
local data = {}
data.start = client:GetShootPos()
data.endpos = data.start + client:GetAimVector() * 96
data.filter = client
local entity = util.TraceLine(data).Entity
if (IsValid(entity) and isfunction(entity.GetEntityMenu)) then
hook.Run("ShowEntityMenu", entity)
end
end
timer.Remove("ixItemUse")
client.ixInteractionTarget = nil
client.ixInteractionStartTime = nil
end
end
function Schema:CreateExtraCharacterTabInfo(character, informationSubframe, CreatePart)
if (LocalPlayer():IsCombine()) then
local editBodygroupsButton = informationSubframe:Add("DButton")
editBodygroupsButton:Dock(BOTTOM)
editBodygroupsButton:DockMargin(0, SScaleMin(25 / 3), 0, 0)
editBodygroupsButton:SetText("Modifier les groupes de corps")
editBodygroupsButton:SetFont("MenuFontBoldNoClamp")
editBodygroupsButton:SetTall(SScaleMin(16.666666666667))
editBodygroupsButton.Paint = function(_, w, h)
surface.SetDrawColor(0, 0, 0, 100)
surface.DrawRect(0, 1, w - 2, h - 1)
surface.SetDrawColor(Color(111, 111, 136, 255 / 100 * 30))
surface.DrawOutlinedRect(0, 0, w, h)
end
editBodygroupsButton.DoClick = function()
surface.PlaySound("helix/ui/press.wav")
local panel = vgui.Create("ixBodygroupView")
panel:SetViewModel(LocalPlayer():GetModel())
panel:SetTarget(LocalPlayer(), LocalPlayer():GetCharacter():GetProxyColors())
end
end
end

View File

@@ -0,0 +1,45 @@
--[[
| 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/
--]]
surface.CreateFont("ImportantDisplayMessage", {
font = "BudgetLabel",
extended = false,
size = SScaleMin(16 / 3),
weight = 550,
outline = true,
})
if (ix.item.base["base_weapons"]) then
local ITEM = ix.item.base["base_weapons"]
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawOutlinedRect(1, 1, w - 2, h - 2)
end
end
end
net.Receive("ixInvTypeSearchChoice", function()
local options = {}
options["Voir l'inventaire des équipements"] = function()
net.Start("ixInvTypeSearchChoice")
net.WriteString("eqInv")
net.SendToServer()
end
options["Voir l'inventaire par défaut"] = function()
net.Start("ixInvTypeSearchChoice")
net.WriteString("normInv")
net.SendToServer()
end
ix.menu.Open(options, false)
end)

View File

@@ -0,0 +1,16 @@
--[[
| 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/
--]]
CLASS.name = "BMD Heavy Class"
CLASS.faction = FACTION_BMDFLAGSYSTEM
CLASS.isDefault = false
CLASS.accessFlag = "K"
CLASS_BMDGUNS = CLASS.index

View File

@@ -0,0 +1,16 @@
--[[
| 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/
--]]
CLASS.name = "BMD Regular Class"
CLASS.faction = FACTION_BMDFLAGSYSTEM
CLASS.isDefault = false
CLASS.accessFlag = "B"
CLASS_BMDMEDICAL = CLASS.index

View File

@@ -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/
--]]
CLASS.name = "Citoyen"
CLASS.faction = FACTION_CITIZEN
CLASS.isDefault = true
CLASS_CITIZEN = CLASS.index

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
CLASS.name = "Unité de la Protection Civile"
CLASS.faction = FACTION_CP
function CLASS:CanSwitchTo(client)
return !Schema:IsCombineRank(client:Name(), "RL")
end
--luacheck: globals CLASS_OWS
CLASS_CP = CLASS.index

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
CLASS.name = "Commandant de la Protection Civile"
CLASS.faction = FACTION_CP
function CLASS:CanSwitchTo(client)
return Schema:IsCombineRank(client:Name(), "CmD")
end
--luacheck: globals CLASS_OWS
CLASS_CP_CMD = CLASS.index

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
CLASS.name = "Officier de la Protection Civile"
CLASS.faction = FACTION_CP
function CLASS:CanSwitchTo(client)
return Schema:IsCombineRank(client:Name(), "OfC")
end
--luacheck: globals CLASS_OWS
CLASS_CP_CPT = CLASS.index

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
CLASS.name = "Overseer"
CLASS.faction = FACTION_OTA
function CLASS:CanSwitchTo(client)
return string.find(client:Name(), "^Overseer ")
end
--luacheck: globals CLASS_OWS
CLASS_OVERSEER = CLASS.index

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
CLASS.name = "Civil Protection Rank Leader"
CLASS.faction = FACTION_CP
function CLASS:CanSwitchTo(client)
return Schema:IsCombineRank(client:Name(), "RL")
end
--luacheck: globals CLASS_OWS
CLASS_CP_RL = CLASS.index

View File

@@ -0,0 +1,23 @@
--[[
| 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/
--]]
CLASS.name = "Ordinal"
CLASS.faction = FACTION_OTA
CLASS.isDefault = false
function CLASS:OnSet(client)
local character = client:GetCharacter()
if (character) then
character:SetModel("models/combine_super_soldier.mdl") -- Placeholder
end
end
CLASS_ORD = CLASS.index

View File

@@ -0,0 +1,19 @@
--[[
| 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/
--]]
CLASS.name = "Overwatch"
CLASS.description = "An Overwatch AI, it utilises Combine technology."
CLASS.faction = FACTION_OVERWATCH
function CLASS:CanSwitchTo(client)
return !Schema:IsCombineRank(client:Name(), "SCN") or !Schema:IsCombineRank(client:Name(), "Disp:AI")
end
CLASS_OW = CLASS.index

View File

@@ -0,0 +1,29 @@
--[[
| 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/
--]]
CLASS.name = "Overwatch Scanner"
CLASS.description = "An Overwatch scanner, it utilises Combine technology."
CLASS.faction = FACTION_OVERWATCH
function CLASS:CanSwitchTo(client)
return Schema:IsCombineRank(client:Name(), "SCN") or Schema:IsCombineRank(client:Name(), "Disp:AI")
end
function CLASS:OnSpawn(client)
local scanners = ix.plugin.list["scannerplugin"]
if (scanners) then
timer.Simple(0.1, function()
scanners:CreateScanner(client, nil)
end)
end
end
CLASS_OW_SCANNER = CLASS.index

View File

@@ -0,0 +1,23 @@
--[[
| 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/
--]]
CLASS.name = "Charger Overwatch Soldier"
CLASS.faction = FACTION_OTA
CLASS.isDefault = false
function CLASS:OnSet(client)
local character = client:GetCharacter()
if (character) then
character:SetModel("models/combine_super_soldier.mdl") -- Placeholder
end
end
CLASS_CHA = CLASS.index

View File

@@ -0,0 +1,23 @@
--[[
| 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/
--]]
CLASS.name = "Elite Overwatch Soldier"
CLASS.faction = FACTION_OTA
CLASS.isDefault = false
function CLASS:OnSet(client)
local character = client:GetCharacter()
if (character) then
character:SetModel("models/combine_super_soldier.mdl")
end
end
CLASS_EOW = CLASS.index

View 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/
--]]
CLASS.name = "Overwatch Containment Soldier"
CLASS.faction = FACTION_OTA
CLASS.isDefault = true
function CLASS:OnSet(client)
local character = client:GetCharacter()
if (character) then
character:SetModel("models/combine_soldier.mdl")
end
end
--luacheck: globals CLASS_OWS
CLASS_OCS = CLASS.index

View 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/
--]]
CLASS.name = "Overwatch Soldier"
CLASS.faction = FACTION_OTA
CLASS.isDefault = true
function CLASS:OnSet(client)
local character = client:GetCharacter()
if (character) then
character:SetModel("models/combine_soldier.mdl")
end
end
--luacheck: globals CLASS_OWS
CLASS_OWS = CLASS.index

View File

@@ -0,0 +1,23 @@
--[[
| 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/
--]]
CLASS.name = "Suppressor Overwatch Soldier"
CLASS.faction = FACTION_OTA
CLASS.isDefault = false
function CLASS:OnSet(client)
local character = client:GetCharacter()
if (character) then
character:SetModel("models/combine_super_soldier.mdl") -- Placeholder
end
end
CLASS_SUP = CLASS.index

View File

@@ -0,0 +1,113 @@
--[[
| 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/
--]]
--luacheck: ignore global Derma_Select
function Derma_Select(text, title, list, defaultText, confirmText, confirmCallback, cancelText, cancelCallback)
local panel = vgui.Create("DFrame")
panel:SetTitle(title or "Titre de la sélection")
panel:SetDraggable(false)
panel:ShowCloseButton(false)
panel:SetDrawOnTop(true)
DFrameFixer(panel)
local innerPanel = vgui.Create("DPanel", panel)
innerPanel:SetPaintBackground(false)
local textPanel = vgui.Create("DLabel", innerPanel)
textPanel:SetText(text or "Texte de sélection")
textPanel:SetFont("MenuFontNoClamp")
textPanel:SizeToContents()
textPanel:SetContentAlignment(5)
textPanel:SetTextColor(color_white)
local buttonPanel = vgui.Create("DPanel", panel)
buttonPanel:SetTall(SScaleMin(30 / 3))
buttonPanel:SetPaintBackground(false)
local button = vgui.Create("DButton", buttonPanel)
button:SetText(confirmText or "OK")
button:SetFont("MenuFontNoClamp")
button:SizeToContents()
button:SetTall(SScaleMin(25 / 3))
button:SetWide(button:GetWide() + SScaleMin(20 / 3))
button:SetPos(SScaleMin(5 / 3), SScaleMin(5 / 3))
button:SetDisabled(true)
button:SetTextColor(Color(255, 255, 255, 30))
button.DoClick = function()
local text1, value = panel.comboBox:GetSelected()
if (confirmCallback) then
confirmCallback(value, text1)
end
panel:Close()
end
local comboBox = vgui.Create("DComboBox", innerPanel)
comboBox:SetValue(defaultText)
comboBox:SetTall(SScaleMin(25 / 3))
comboBox:SetTextInset( SScaleMin(8 / 3), 0 )
comboBox:SetFont("MenuFontNoClamp")
comboBox.OnSelect = function()
panel.button:SetDisabled(false)
panel.button:SetTextColor(Color(255, 255, 255, 255))
end
comboBox.PerformLayout = function(self)
self.DropButton:SetSize( SScaleMin(15 / 3), SScaleMin(15 / 3))
self.DropButton:AlignRight( 4 )
self.DropButton:CenterVertical()
-- Make sure the text color is updated
DButton.PerformLayout( self, self:GetWide(), self:GetTall() )
end
for _, v in pairs(list) do
comboBox:AddChoice(v.text, v.value)
end
local buttonCancel = vgui.Create("DButton", buttonPanel)
buttonCancel:SetText(cancelText or "Annuler")
buttonCancel:SizeToContents()
buttonCancel:SetTall(SScaleMin(25 / 3))
buttonCancel:SetFont("MenuFontNoClamp")
buttonCancel:SetWide(button:GetWide() + SScaleMin(20 / 3))
buttonCancel:SetPos(SScaleMin(5 / 3), SScaleMin(5 / 3))
buttonCancel.DoClick = function()
local text1, value = panel.comboBox:GetSelected()
if (cancelCallback) then
cancelCallback(text1, value)
end
panel:Close()
end
buttonCancel:MoveRightOf(button, SScaleMin(5 / 3))
buttonPanel:SetWide(button:GetWide() + SScaleMin(5 / 3) + buttonCancel:GetWide() + SScaleMin(10 / 3))
local w, h = textPanel:GetSize()
w = math.max(w, SScaleMin(400 / 3))
panel:SetSize(w + SScaleMin(50 / 3), h + SScaleMin(25 / 3) + SScaleMin(75 / 3) + SScaleMin(10 / 3))
panel:Center()
innerPanel:StretchToParent(SScaleMin(5 / 3), SScaleMin(25 / 3), SScaleMin(5 / 3), SScaleMin(45 / 3))
textPanel:StretchToParent(SScaleMin(5 / 3), SScaleMin(5 / 3), SScaleMin(5 / 3), SScaleMin(35 / 3))
comboBox:StretchToParent(SScaleMin(5 / 3), nil, SScaleMin(5 / 3), nil)
comboBox:AlignBottom(5)
comboBox:RequestFocus()
comboBox:MoveToFront()
buttonPanel:CenterHorizontal()
buttonPanel:AlignBottom(8)
panel.button = button
panel.comboBox = comboBox
end

View File

@@ -0,0 +1,97 @@
--[[
| 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/
--]]
DEFINE_BASECLASS("Panel")
surface.CreateFont( "ObjectiveUpdateFont", {
font = "Open Sans Bold",
extended = false,
size = math.Clamp(SScaleMin(24), 0, 72),
weight = 550,
antialias = true,
scanlines = 4,
shadow = true
} )
surface.CreateFont( "ObjectiveUpdateFontBackground", {
font = "Open Sans Bold",
extended = false,
size = math.Clamp(SScaleMin(24), 0, 72),
weight = 550,
antialias = true,
scanlines = 4,
blursize = 10
} )
local redClr = Color(205, 11, 11)
local PANEL = {}
function PANEL:DrawCorners(x, y, w, h)
local length = 12
local thickness = 3
surface.DrawRect(x, y, length, thickness) -- Top Left
surface.DrawRect(x, y, thickness, length)
surface.DrawRect(x + (w - length), y, length, thickness) -- Top Right
surface.DrawRect(x + (w - thickness), y, thickness, length)
surface.DrawRect(x, y + (h - length), thickness, length) -- Bottom Left
surface.DrawRect(x, y + (h - thickness), length, thickness)
surface.DrawRect(x + (w - thickness), y + (h - length), thickness, length) -- Bottom Right
surface.DrawRect(x + (w - length), y + (h - thickness), length, thickness)
end
function PANEL:Init()
self:SetSize(SScaleMin(800 / 3), 1)
self:Center()
self:CenterVertical(0.25)
surface.PlaySound("ambience/3d-sounds/ota/otachatter1.mp3")
surface.PlaySound("willardnetworks/datapad/open.wav")
self.objectiveText = self:Add("DLabel")
self.objectiveText:Dock(FILL)
self.objectiveText:SetFont("ObjectiveUpdateFont")
self.objectiveText:SetContentAlignment(5)
self.objectiveText:SetTextColor(redClr)
self.objectiveText:SetText("NEW OBJECTIVE RECEIVED")
self.secondObjectiveText = self:Add("DLabel")
self.secondObjectiveText:Dock(FILL)
self.secondObjectiveText:SetFont("ObjectiveUpdateFontBackground")
self.secondObjectiveText:SetContentAlignment(5)
self.secondObjectiveText:SetTextColor(redClr)
self.secondObjectiveText:SetText("NEW OBJECTIVE RECEIVED")
self:SizeTo(-1, SScaleMin(80 / 3), 0.4, 0, nil, function()
self:SizeTo(1, -1, 0.5, 2, nil, function()
surface.PlaySound("willardnetworks/datapad/close.wav")
self:Remove()
end)
end)
end
function PANEL:Paint(w, h)
if (!LocalPlayer():HasActiveCombineMask() and !LocalPlayer():IsDispatch()) then
return
end
surface.SetDrawColor(31, 30, 30, 75) -- Background
surface.DrawRect(0, 0, w, h)
surface.SetDrawColor(245, 138, 138, 75)
self:DrawCorners(0, 0, w, h)
end
vgui.Register("ixObjectiveUpdate", PANEL, "Panel")

View File

@@ -0,0 +1,137 @@
--[[
| 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/
--]]
hook.Add("LoadFonts", "ixCombineViewObjectives", function()
surface.CreateFont("ixCombineViewObjectives", {
font = "Courier New",
size = SScaleMin(16 / 3),
antialias = true,
weight = 400
})
end)
DEFINE_BASECLASS("DFrame")
local PANEL = {}
local animationTime = 1
AccessorFunc(PANEL, "bCommitOnClose", "CommitOnClose", FORCE_BOOL)
function PANEL:Init()
self:SetCommitOnClose(true)
self:SetSize(ScrW() / 4 > SScaleMin(200 / 3) and ScrW() / 4 or ScrW() / 2, ScrH() / 2 > SScaleMin(300 / 3) and ScrH() / 2 or ScrH())
self:Center()
DFrameFixer(self)
self.nameLabel = vgui.Create("DLabel", self)
self.nameLabel:SetFont("DebugFixedRadio")
self.nameLabel:SizeToContents()
self.nameLabel:Dock(TOP)
self.nameLabel:DockMargin(SScaleMin(5 / 3), SScaleMin(5 / 3), 0, 0)
self.dateLabel = vgui.Create("DLabel", self)
self.dateLabel:SetFont("DebugFixedRadio")
self.dateLabel:SizeToContents()
self.dateLabel:Dock(TOP)
self.dateLabel:DockMargin(SScaleMin(5 / 3), SScaleMin(5 / 3), 0, SScaleMin(5 / 3))
self.textEntry = vgui.Create("DTextEntry", self)
self.textEntry:SetMultiline(true)
self.textEntry:Dock(FILL)
self.textEntry:SetFont("ixCombineViewObjectives")
self.textEntry:SetTextColor(Color(200, 200, 200, 255))
self.textEntry:SetCursorColor(Color(200, 200, 200, 255))
self.textEntry.Paint = function(self, w, h)
surface.SetDrawColor(Color(0, 0, 0, 100))
surface.DrawRect(0, 0, w, h)
surface.SetDrawColor(Color(111, 111, 136, (255 / 100 * 30)))
surface.DrawOutlinedRect(0, 0, w, h)
self:DrawTextEntryText( self:GetTextColor(), self:GetHighlightColor(), self:GetCursorColor() )
end
end
function PANEL:Populate(data, bDontShow)
data = data or {}
self.oldText = data.text or ""
self.alpha = 255
local date = data.lastEditDate and ix.date.Construct(data.lastEditDate):format("%Y/%m/%d - %H:%M:%S") or L("unknown")
self:SetTitle(L("objectivesTitle"))
self.nameLabel:SetText(string.format("%s: %s", L("lastEdit"), data.lastEditPlayer or L("unknown")):utf8upper())
self.dateLabel:SetText(string.format("%s: %s", L("lastEditDate"), date):utf8upper())
self.textEntry:SetText(data.text or "")
if (!hook.Run("CanPlayerEditObjectives", LocalPlayer())) then
self.textEntry:SetEnabled(false)
end
if (!bDontShow) then
self.alpha = 0
self:SetAlpha(0)
self:MakePopup()
self:CreateAnimation(animationTime, {
index = 1,
target = {alpha = 255},
easing = "outQuint",
Think = function(animation, panel)
panel:SetAlpha(panel.alpha)
end
})
end
end
function PANEL:CommitChanges()
local text = string.Trim(self.textEntry:GetValue():utf8sub(1, 2000))
-- only update if there's something different so we can preserve the last editor if nothing changed
if (self.oldText != text) then
netstream.Start("ViewObjectivesUpdate", text)
if (IsValid(ix.gui.combine)) then
ix.gui.combine:AddLine("@cViewObjectivesUpdate")
end
end
end
function PANEL:Close()
if (self.bClosing) then
return
end
self.bClosing = true
if (self:GetCommitOnClose()) then
self:CommitChanges()
end
self:SetMouseInputEnabled(false)
self:SetKeyboardInputEnabled(false)
self:CreateAnimation(animationTime, {
target = {alpha = 0},
easing = "outQuint",
Think = function(animation, panel)
panel:SetAlpha(panel.alpha)
end,
OnComplete = function(animation, panel)
BaseClass.Close(panel)
end
})
end
vgui.Register("ixViewObjectives", PANEL, "DFrame")

View File

@@ -0,0 +1,130 @@
--[[
| 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/
--]]
FACTION.name = "Haute Autorité Administrative"
FACTION.description = "Un membre de la Haute Autorité Administrative"
FACTION.color = Color(144, 65, 233, 255)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cityadmin.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/office.png"
-- Scoreboard stuff
FACTION.isGloballyRecognized = true
-- Gameplay stuff
FACTION.humanVoices = true
FACTION.allowForcefieldPassage = true
FACTION.allowForcefieldControl = true
FACTION.allowCIDCreator = true
FACTION.allowDatafile = true
FACTION.allowComputerLoginOverride = true
FACTION.allowUseGroupLock = true
FACTION.allowEnableRations = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.canHearRequests = true
FACTION.noSmuggler = true
FACTION.idInspectionText = "Administrator"
-- Tables
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
FACTION.radioChannels = {"haa", "pc", "bc", "ota", "ac"}
-- Functions
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
-- Give clothing chosen upon char creation
local inventory = character:GetInventory()
inventory:Add("pda", 1)
inventory:Add("dob_card", 1)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = false
character:SetGenericdata(genericData)
end
FACTION_ADMIN = FACTION.index

View 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/
--]]
FACTION.name = "BMDFlagSystem"
FACTION.description = "This is a shitty solution to quickly add a flag system to vendors. God this is awful but fuck it."
FACTION.color = Color(63, 142, 164, 255)
FACTION.isDefault = false
FACTION.factionImage = "materials/willardnetworks/faction_imgs/citizen.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/street.png"
FACTION.humanVoices = true
FACTION.allowRebelForcefieldPassage = true
FACTION.accessFlag = "B"
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl"
};
};
FACTION_BMDFLAGSYSTEM = FACTION.index

View File

@@ -0,0 +1,102 @@
--[[
| 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/
--]]
FACTION.name = "Citoyen"
FACTION.description = "Un citoyen humain ordinaire asservi par l'Union Universelle."
FACTION.color = Color(128, 128, 128, 255)
FACTION.isDefault = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/citizen.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/street.png"
FACTION.humanVoices = true
FACTION.allowRebelForcefieldPassage = true
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
function FACTION:OnCharacterCreated(client, character)
local inventory = character:GetInventory()
local background = character:GetBackground()
if (background == "Citoyen Relocalisé") then
inventory:Add("suitcase", 1)
inventory:Add("flashlight", 1)
inventory:Add("armband_grey", 1)
elseif (background == "Citoyen Local") then
inventory:Add("flashlight", 1)
inventory:Add("armband_grey", 1)
elseif (background == "Nomade") then
ix.config.Get("defaultOutcastChips")
inventory:Add("flashlight", 1)
inventory:Add("armband_black", 1)
else
inventory:Add("armband_grey", 1)
end
local credits = ix.config.Get("defaultCredits", 10)
if (background == "Nomade") then
credits = math.floor(credits / 2)
end
character:CreateIDCard(credits)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = false
character:SetGenericdata(genericData)
end
FACTION_CITIZEN = FACTION.index

View File

@@ -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/
--]]
FACTION.name = "Protection Civile"
FACTION.description = "Une unité de la Protection Civile."
FACTION.color = Color(50, 100, 150)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noAppearances = true
FACTION.noBackground = true
FACTION.noBeard = true
FACTION.ReadOptionDisabled = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cp.png"
FACTION.selectImage = "materials/willardnetworks/faction_imgs/cp.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/nexus.png"
FACTION.humanVoices = true
-- Scoreboard Stuff
FACTION.isGloballyRecognized = false
FACTION.separateUnknownTab = true
-- Gameplay stuff
FACTION.noGenDesc = false
FACTION.isCombineFaction = true
FACTION.canSeeWaypoints = true
FACTION.canAddWaypoints = true
FACTION.alwaysDatafile = true
FACTION.allowEnableRations = true
FACTION.allowKickDoor = true
FACTION.noNeeds = false
FACTION.noGas = false
FACTION.radioChannels = {"pc", "ota", "ac", "haa"}
-- Tables
FACTION.models = {
female = {
"models/wn7new/metropolice/female_01.mdl",
"models/wn7new/metropolice/female_02.mdl",
"models/wn7new/metropolice/female_03.mdl",
"models/wn7new/metropolice/female_04.mdl",
"models/wn7new/metropolice/female_06.mdl",
"models/wn7new/metropolice/female_05.mdl"
};
male = {
"models/wn7new/metropolice/male_01.mdl",
"models/wn7new/metropolice/male_02.mdl",
"models/wn7new/metropolice/male_03.mdl",
"models/wn7new/metropolice/male_04.mdl",
"models/wn7new/metropolice/male_05.mdl",
"models/wn7new/metropolice/male_06.mdl",
"models/wn7new/metropolice/male_07.mdl",
"models/wn7new/metropolice/male_08.mdl",
"models/wn7new/metropolice/male_09.mdl",
"models/wn7new/metropolice/male_10.mdl"
}
}
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
-- Functions
function FACTION:GetDefaultName(client)
return "C"..ix.config.Get("cityIndex", "13")..":RCT.UNION-"..Schema:ZeroNumber(math.random(1, 999), 3), true
end
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
local inventory = character:GetInventory()
inventory:Add("pda", 1)
inventory:Add("uniform_auxcp")
inventory:Add("mas_aux")
inventory:Add("handheld_radio")
inventory:Add("flashlight")
inventory:Add("smallbag")
inventory:Add("largebag")
character:SetSkill("guns", 5)
character:SetSkill("speed", 10)
character:SetData("equipBgClothes", true)
character:SetRadioChannel("pc")
end
function FACTION:OnNameChanged(client, oldValue, value)
if (oldValue == "") then return end
if (Schema:IsCombineRank(value, "i1") and !Schema:IsCombineRank(oldValue, "i1")) then
client:GetCharacter():SetClass(CLASS_CP_CPT)
// !Schema:IsCombineRank(oldValue, "i1/i2")) was breaking all this shit. I don't know why, but without it - stuff below works fine.
elseif Schema:IsCombineRank(value, "RL") then
client:GetCharacter():SetClass(CLASS_CP_CMD)
elseif Schema:IsCombineRank(value, "CmD") then
client:GetCharacter():SetClass(CLASS_CP_CMD)
// ^^^^^
elseif (Schema:IsCombineRank(oldValue, "RL") or Schema:IsCombineRank(oldValue, "CmD")) then
client:GetCharacter():SetClass(CLASS_CP)
end
end
function FACTION:OnTransferred(character)
character:SetName(self:GetDefaultName())
local genericData = character:GetGenericdata()
if (genericData) then
genericData.combine = true
character:SetGenericdata(genericData)
end
end
function FACTION:OnSpawn(client)
if (Schema:IsCombineRank(client:Name(), "i1")) then
client:GetCharacter():SetClass(CLASS_CP_CPT)
elseif (Schema:IsCombineRank(client:Name(), "RL")) or (Schema:IsCombineRank(client:Name(), "CmD")) then
client:GetCharacter():SetClass(CLASS_CP_CMD)
else
client:GetCharacter():SetClass(CLASS_CP)
end
end
FACTION_CP = FACTION.index

View File

@@ -0,0 +1,128 @@
--[[
| 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/
--]]
FACTION.name = "Ministry of Entertainment"
FACTION.description = "A member of the MOE."
FACTION.color = Color(144, 65, 233, 255)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cityadmin.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/office.png"
-- Scoreboard stuff
FACTION.isGloballyRecognized = true
-- Gameplay stuff
FACTION.humanVoices = true
FACTION.allowForcefieldPassage = true
FACTION.allowCIDCreator = true
FACTION.allowDatafile = true
FACTION.allowComputerLoginOverride = true
FACTION.allowUseGroupLock = true
FACTION.allowEnableRations = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.canHearRequests = true
FACTION.noSmuggler = true
FACTION.idInspectionText = "Entertainment"
-- Tables
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
FACTION.radioChannels = {"cca", "cmb", "cca-cwu"}
-- Functions
local translate = {nil, "torso", "legs", "shoes"}
translate[8] = "glasses"
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
local inventory = character:GetInventory()
inventory:Add("pda", 1)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = false
character:SetGenericdata(genericData)
end
FACTION_MOE = FACTION.index

View File

@@ -0,0 +1,87 @@
--[[
| 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/
--]]
FACTION.name = "Event"
FACTION.description = "Un personnage d'event, sshhhh."
FACTION.color = Color(255, 85, 20, 255)
FACTION.isDefault = false
FACTION.factionImage = "materials/willardnetworks/faction_imgs/event.png"
FACTION.selectImage = "materials/willardnetworks/faction_imgs/event.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/street.png"
FACTION.seeAll = true
FACTION.hidden = true
FACTION.humanVoices = true
FACTION.noNeeds = true
FACTION.noGas = true
FACTION.saveItemsAfterDeath = true
FACTION.noBackground = true
FACTION.isGloballyRecognized = false
FACTION.allowRebelForcefieldPassage = true
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
function FACTION:OnCharacterCreated(client, character)
local inventory = character:GetInventory()
character:CreateIDCard()
inventory:Add("flashlight")
inventory:Add("smallbag")
inventory:Add("largebag")
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
FACTION_EVENT = FACTION.index

View File

@@ -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/
--]]
FACTION.name = "Ministère de la Protection Civile"
FACTION.description = "A representative of the Union's paramilitary.."
FACTION.color = Color(50, 100, 150)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cityadmin.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/office.png"
-- Scoreboard stuff
FACTION.isGloballyRecognized = false
-- Gameplay stuff
FACTION.humanVoices = true
FACTION.allowForcefieldPassage = true
FACTION.allowCIDCreator = true
FACTION.allowDatafile = true
FACTION.allowComputerLoginOverride = true
FACTION.allowUseGroupLock = true
FACTION.allowEnableRations = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.canHearRequests = true
FACTION.noSmuggler = true
FACTION.isCombineFaction = false
FACTION.canSeeWaypoints = true
FACTION.canAddWaypoints = true
FACTION.allowKickDoor = true
FACTION.idInspectionText = "Ministère de la Protection Civile"
-- Tables
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
FACTION.radioChannels = {"haa", "utc", "ucmr", "pc",}
-- Functions
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
-- Give clothing chosen upon char creation
local inventory = character:GetInventory()
inventory:Add("pda", 1)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = true
character:SetGenericdata(genericData)
end
FACTION_MCP = FACTION.index

View File

@@ -0,0 +1,135 @@
--[[
| 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/
--]]
FACTION.name = "Ministère de L'économie"
FACTION.description = "A representative of the Union's paramilitary.."
FACTION.color = Color(207, 182, 42)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cityadmin.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/office.png"
-- Scoreboard stuff
FACTION.isGloballyRecognized = false
FACTION.separateUnknownTab = true
-- Gameplay stuff
FACTION.humanVoices = true
FACTION.allowForcefieldPassage = true
FACTION.allowCIDCreator = true
FACTION.allowDatafile = true
FACTION.allowComputerLoginOverride = true
FACTION.allowUseGroupLock = true
FACTION.allowEnableRations = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.canHearRequests = true
FACTION.noSmuggler = true
FACTION.isCombineFaction = false
FACTION.canSeeWaypoints = true
FACTION.canAddWaypoints = true
FACTION.allowKickDoor = true
FACTION.idInspectionText = "Ministère de L'économie"
-- Tables
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
FACTION.radioChannels = {"haa", "ucmr", "utc",}
-- Functions
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
-- Give clothing chosen upon char creation
local inventory = character:GetInventory()
inventory:Add("pda", 1)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = true
character:SetGenericdata(genericData)
end
FACTION_ME = FACTION.index

View File

@@ -0,0 +1,101 @@
--[[
| 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/
--]]
FACTION.name = "Union Civile de Médecine et de Recherche"
FACTION.description = "A member of the Medical Union"
FACTION.color = Color(63, 142, 164, 255)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cwu.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/factory.png"
-- Gameplay stuff
FACTION.bIsBystanderTBC = true
FACTION.humanVoices = true
FACTION.idInspectionText = "Medic"
-- Tables
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
FACTION.npcRelations = {
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_turret_floor"] = D_LI,
}
FACTION.radioChannels = {"utc", "ucmr",}
-- Functions
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
local inventory = character:GetInventory()
inventory:Add("pda_cmu", 1)
inventory:Add("cmru_card", 1)
inventory:Add("torso_medic_shirt", 1)
inventory:Add("cmru_radio", 1)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = false
character:SetGenericdata(genericData)
end
FACTION_MEDICAL = FACTION.index

View File

@@ -0,0 +1,135 @@
--[[
| 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/
--]]
FACTION.name = "Ministère de lIllumination et de la Vérité"
FACTION.description = "A representative of the Union's paramilitary.."
FACTION.color = Color(255, 85, 51)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cityadmin.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/office.png"
-- Scoreboard stuff
FACTION.isGloballyRecognized = false
FACTION.separateUnknownTab = true
-- Gameplay stuff
FACTION.humanVoices = true
FACTION.allowForcefieldPassage = true
FACTION.allowCIDCreator = true
FACTION.allowDatafile = true
FACTION.allowComputerLoginOverride = true
FACTION.allowUseGroupLock = true
FACTION.allowEnableRations = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.canHearRequests = true
FACTION.noSmuggler = true
FACTION.isCombineFaction = false
FACTION.canSeeWaypoints = true
FACTION.canAddWaypoints = true
FACTION.allowKickDoor = true
FACTION.idInspectionText = "Ministère de lIllumination et de la Vérité"
-- Tables
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
FACTION.radioChannels = {"haa", "ucmr", "utc",}
-- Functions
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
-- Give clothing chosen upon char creation
local inventory = character:GetInventory()
inventory:Add("pda", 1)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = true
character:SetGenericdata(genericData)
end
FACTION_MIV = FACTION.index

View File

@@ -0,0 +1,142 @@
--[[
| 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/
--]]
FACTION.name = "O.T.A"
FACTION.description = "Un soldat transhumain produit par les Combines."
FACTION.color = Color(150, 50, 50, 255)
FACTION.isDefault = false
FACTION.radioChannels = {"ota", "pc", "bc", "haa", "utc"}
-- Char Create stuff
FACTION.noAppearances = true
FACTION.noBackground = true
FACTION.noBeard = true
FACTION.noGender = true
FACTION.noHair = true
FACTION.ReadOptionDisabled = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/ota.png"
FACTION.selectImage = "materials/willardnetworks/charselect/ota.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/nexus.png"
-- Scoreboard Stuff
FACTION.isGloballyRecognized = true
-- Gameplay stuff
FACTION.noNeeds = true
FACTION.noGenDesc = true
FACTION.saveItemsAfterDeath = true
FACTION.isCombineFaction = true
FACTION.canSeeWaypoints = true
FACTION.canAddWaypoints = true
FACTION.canRemoveWaypoints = true
FACTION.canUpdateWaypoints = true
FACTION.allLanguages = true
FACTION.alwaysDatafile = true
FACTION.allowForcefieldPassage = true
FACTION.allowForcefieldInfestationPassage = true
FACTION.allowEnableRations = true
FACTION.allowKickDoor = true
FACTION.noSmuggler = true
FACTION.maxHealth = 125
-- Tables
FACTION.models = {
"models/wn/ota_soldier.mdl"
}
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
-- Functions
function FACTION:GetDefaultName(client)
return "S"
.. (ix.config.Get("sectorIndex", "10"))
.. "/OWS.ECHO-"
.. Schema:ZeroNumber(math.random(1, 99), 2), true
end
function FACTION:OnCharacterCreated(client, character)
local inventory = character:GetInventory()
inventory:Add("smallbag")
inventory:Add("largebag")
inventory:Add("flashlight")
inventory:Add("pda", 1)
inventory:Add("uniform_ota")
inventory:Add("mask_ota")
inventory:Add("rappel_gear")
inventory:Add("mag_pouch")
inventory:Add("bullet_pouch")
character:SetData("equipBgClothes", true)
character:SetSkill("guns", 40)
character:SetSkill("speed", 40)
for _, v in pairs(ix.special.list) do
character:SetSpecial(v.uniqueID, 0)
end
end
function FACTION:OnNameChanged(client, oldValue, value)
local character = client:GetCharacter()
if (!Schema:IsCombineRank(oldValue, "OWS") and Schema:IsCombineRank(value, "OWS")) then
character:SetClass(CLASS_OWS)
elseif (!Schema:IsCombineRank(oldValue, "EOWS") and Schema:IsCombineRank(value, "EOWS")) then
character:SetClass(CLASS_EOW)
elseif (!Schema:IsCombineRank(oldValue, "ORD") and Schema:IsCombineRank(value, "ORD")) then
character:SetClass(CLASS_ORD)
elseif (!Schema:IsCombineRank(oldValue, "OWH") and Schema:IsCombineRank(value, "OWH")) then
character:SetClass(CLASS_CHA)
elseif (!Schema:IsCombineRank(oldValue, "APF") and Schema:IsCombineRank(value, "APF")) then
character:SetClass(CLASS_SUP)
elseif (!Schema:IsCombineRank(oldValue, "EOW") and Schema:IsCombineRank(value, "EOW")) then
character:SetClass(CLASS_EOW)
elseif (!Schema:IsCombineRank(oldValue, "OCS") and Schema:IsCombineRank(value, "OCS")) then
character:SetClass(CLASS_OCS)
elseif (!Schema:IsCombineRank(oldValue, "COMMANDER") and Schema:IsCombineRank(value, "COMMANDER")) then
character:SetClass(CLASS_OCS)
end
end
function FACTION:OnTransferred(character)
character:SetName(self:GetDefaultName())
character:SetModel(self.models[1])
local genericData = character:GetGenericdata()
genericData.combine = true
character:SetGenericdata(genericData)
end
FACTION_OTA = FACTION.index

View File

@@ -0,0 +1,117 @@
--[[
| 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/
--]]
FACTION.name = "Overwatch AI"
FACTION.description = "The central Overwatch network."
FACTION.color = Color(150, 50, 50, 255)
FACTION.isDefault = false
FACTION.noAppearances = true
FACTION.noAttributes = true
FACTION.noBackground = true
FACTION.noBeard = true
FACTION.noGender = true
FACTION.noHair = true
FACTION.noGenetics = true
FACTION.ReadOptionDisabled = true
FACTION.factionImage = "willardnetworks/faction_imgs/cmb.png"
FACTION.selectImage = "willardnetworks/faction_imgs/cmb.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/nexus.png"
FACTION.isGloballyRecognized = true
FACTION.noNeeds = true
FACTION.noGas = true
FACTION.noTBC = true
FACTION.noGenDesc = true
FACTION.saveItemsAfterDeath = true
FACTION.isCombineFaction = true
FACTION.canSeeWaypoints = true
FACTION.canAddWaypoints = true
FACTION.canRemoveWaypoints = true
FACTION.canUpdateWaypoints = true
FACTION.allLanguages = true
FACTION.allowForcefieldControl = true
FACTION.allowCIDCreator = true
FACTION.allowEnableRations = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.alwaysFlashlight = true
FACTION.alwaysDatafile = true
FACTION.canHearRequests = true
FACTION.noSmuggler = true
FACTION.idInspectionText = "Dispatch"
FACTION.models = {"models/dav0r/hoverball.mdl"}
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
FACTION.radioChannels = {"ota-tac", "tac-3", "tac-4", "tac-5", "cmb", "cca", "mcp"}
function FACTION:GetDefaultName(client)
return "S"..ix.config.Get("sectorIndex", "10")..":SCN-"..Schema:ZeroNumber(math.random(1, 9), 1), true
end
function FACTION:OnNameChanged(client, oldValue, value)
if (oldValue == "") then return end
if (!Schema:IsCombineRank(oldValue, "SCN") and Schema:IsCombineRank(value, "SCN")
or !Schema:IsCombineRank(oldValue, "SHIELD") and Schema:IsCombineRank(value, "SHIELD")) then
client:GetCharacter():SetClass(CLASS_OW_SCANNER)
elseif (!Schema:IsCombineRank(value, "SCN") and !Schema:IsCombineRank(value, "SHIELD")) then
client:GetCharacter():SetClass(CLASS_OVERWATCH)
elseif (!Schema:IsCombineRank(value, "SCN") and !Schema:IsCombineRank(value, "Disp:AI")) then
client:GetCharacter():SetClass(CLASS_OW_SCANNER)
end
end
function FACTION:OnTransferred(character)
character:SetName(self:GetDefaultName())
character:SetModel(self.models[1])
local genericData = character:GetGenericdata()
genericData.combine = "overwatch"
character:SetGenericdata(genericData)
end
function FACTION:OnSpawn(client)
if (Schema:IsCombineRank(client:Name(), "SCN") or Schema:IsCombineRank(client:Name(), "SHIELD") or Schema:IsCombineRank(client:Name(), "Disp:AI")) then
client:GetCharacter():SetClass(CLASS_OW_SCANNER)
else
client:GetCharacter():SetClass(CLASS_OVERWATCH)
end
end
FACTION_OVERWATCH = FACTION.index

View File

@@ -0,0 +1,85 @@
--[[
| 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/
--]]
FACTION.name = "The Resistance"
FACTION.description = "A regular human living amongst Combine Rule- but all is not what it seems."
FACTION.color = Color(63, 142, 164, 255)
FACTION.isDefault = false
FACTION.factionImage = "materials/willardnetworks/faction_imgs/citizen.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/street.png"
FACTION.humanVoices = true
FACTION.allowRebelForcefieldPassage = true
FACTION.idInspectionText = "Citizen"
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
function FACTION:OnCharacterCreated(client, character)
local inventory = character:GetInventory()
local background = character:GetBackground()
character:CreateIDCard(credits)
-- Give clothing chosen upon char creation
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = false
character:SetGenericdata(genericData)
end
FACTION_RESISTANCE = FACTION.index

View File

@@ -0,0 +1,94 @@
--[[
| 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/
--]]
FACTION.name = "Staff"
FACTION.description = "Membre de l'Administration de Willard - Echo One"
FACTION.color = Color(255, 85, 20, 255)
FACTION.isDefault = false
FACTION.factionImage = "materials/willardnetworks/faction_imgs/admin.png"
FACTION.selectImage = "materials/willardnetworks/faction_imgs/admin.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/street.png"
FACTION.noBackground = true
FACTION.noBeard = true
FACTION.noGender = true
FACTION.noGenetics = true
FACTION.noHair = true
FACTION.noAppearances = true
FACTION.isGloballyRecognized = true
FACTION.seeAll = true
FACTION.recogniseAll = true
FACTION.noNeeds = true
FACTION.noGas = true
FACTION.noTBC = true
FACTION.noGenDesc = true
FACTION.saveItemsAfterDeath = true
FACTION.canSeeWaypoints = true
FACTION.allLanguages = true
FACTION.allowForcefieldControl = true
FACTION.allowCIDCreator = true
FACTION.allowEnableRations = true
FACTION.allowComputerLoginOverride = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.alwaysFlashlight = true
FACTION.canHearRequests = true
FACTION.models = {"models/breen.mdl"}
FACTION.lockAllDoors = true
FACTION.npcRelations = {
["npc_combine_camera"] = D_LI,
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_rollermine"] = D_LI,
["npc_clawscanner"] = D_LI,
["npc_turret_floor"] = D_LI,
["npc_metropolice"] = D_LI,
["npc_combinedropship"] = D_LI,
["CombineElite"] = D_LI,
["npc_combinegunship"] = D_LI,
["npc_combine_s"] = D_LI,
["npc_hunter"] = D_LI,
["npc_helicopter"] = D_LI,
["CombinePrison"] = D_LI,
["PrisonShotgunner"] = D_LI,
["ShotgunSoldier"] = D_LI,
["npc_stalker"] = D_LI,
["npc_strider"] = D_LI,
}
function FACTION:GetDefaultName(client)
return client:SteamName(), false
end
function FACTION:OnCharacterCreated(client, character)
local inventory = character:GetInventory()
inventory:Add("smallbag")
inventory:Add("largebag")
character:SetData("equipBgClothes", true)
end
function FACTION:OnWhitelist(client)
local faction = ix.faction.teams["event"]
if (faction) then
client:SetWhitelisted(faction.index, true)
end
end
FACTION_SERVERADMIN = FACTION.index

View File

@@ -0,0 +1,151 @@
--[[
| 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/
--]]
FACTION.name = "Vortigaunt"
FACTION.description = "Un vortiguaunt libre."
FACTION.color = Color(138, 181, 40)
FACTION.isDefault = false
FACTION.noBeard = true
FACTION.noGender = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/vort.png"
FACTION.selectImage = "materials/willardnetworks/charselect/vort.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/xen.png"
FACTION.isGloballyRecognized = false
FACTION.noHair = true
FACTION.noGas = true
FACTION.bDrinkUnfilteredWater = true
FACTION.canEatRaw = true
FACTION.maxHealth = 200
FACTION.models = {
"models/willardnetworks/vortigaunt.mdl"
};
FACTION.weapons = {"ix_vortheal", "ix_vortbeam", "ix_nightvision", "ix_vshield", "ix_vortsweep"}
function FACTION:OnCharacterCreated(client, character)
local inventory = character:GetInventory()
local background = character:GetBackground()
local vortPlugin = ix.plugin.Get("vortigaunts")
client:Give("ix_vortsweep") -- i dont see any reason not to give all the vorts the sweep swep tbh
if (background == "Biotique" or background == "Libéré" or background == "Collaborateur") then
timer.Simple(5, function()
if (background == "Libéré") then
client:Give("ix_vshield")
client:Give("ix_nightvision")
client:Give("ix_vortbeam")
client:Give("ix_vortheal")
client:Give("ix_vortslam")
client:Give("ix_vshield")
if character:GetSkillLevel("vort") >= 50 then
client:Give("ix_vortpyro")
client:Give("ix_vortadvancedbeam")
end
elseif (background == "Collaborator") then
client:Give("ix_vshield")
client:Give("ix_nightvision")
client:Give("ix_vortbeam")
client:Give("ix_vortheal")
end
end)
if background == "Collaborateur" then
character:CreateIDCard(100)
inventory:Add("vortigaunt_trousers_brown", 1)
timer.Simple(3, function()
if IsValid(character) then
local genericdata = character:GetGenericdata()
if (genericdata) then
genericdata.socialCredits = (genericdata.socialCredits or 0) + 60
character:SetGenericdata(genericdata)
character:Save()
end
end
end)
character:SetData("equipBgClothes", true)
end
if (background == "Biotique") then
local uniqueID = tostring(vortPlugin:GenerateCollarID(character.id))
inventory:Add("vortigaunt_slave_hooks", 1)
inventory:Add("vortigaunt_slave_shackles", 1)
inventory:Add("vortigaunt_slave_collar", 1, {
collarID = uniqueID,
sterilizedCredits = 0
})
character:SetData("equipBgClothes", true)
timer.Simple(5, function()
if client then
if client:HasWeapon("ix_nightvision") then
client:StripWeapon("ix_nightvision")
end
if client:HasWeapon("ix_vortbeam") then
client:StripWeapon("ix_vortbeam")
end
if client:HasWeapon("ix_vortheal") then
client:StripWeapon("ix_vortheal")
end
if client:HasWeapon("ix_vshield") then
client:StripWeapon("ix_vshield")
end
if client:HasWeapon("ix_vortslam") then
client:StripWeapon("ix_vortslam")
end
if client:HasWeapon("ix_vortpyro") then
client:StripWeapon("ix_vortpyro")
end
if client:HasWeapon("ix_vortadvancedbeam") then
client:StripWeapon("ix_vortadvancedbeam")
end
end
end)
end
else -- freed
timer.Simple(5, function()
client:Give("ix_vshield")
client:Give("ix_nightvision")
client:Give("ix_vortbeam")
client:Give("ix_vortheal")
client:Give("ix_vshield")
client:Give("ix_vortslam")
if character:GetSkillLevel("vort") >= 50 then
client:Give("ix_vortpyro")
client:Give("ix_vortadvancedbeam")
end
end)
end
end
function FACTION:OnSpawn(client)
client:SetLocalVar("vortalVision", false)
timer.Simple(0.1, function()
client:SetRunSpeed(ix.config.Get("runSpeed") * 1.25)
client:SetJumpPower(ix.config.Get("jumpPower") * 1.25)
end)
end
FACTION_VORT = FACTION.index

View File

@@ -0,0 +1,111 @@
--[[
| 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/
--]]
FACTION.name = "Union des Travailleurs Civils"
FACTION.description = "Un membre de l'UTC."
FACTION.color = Color(63, 142, 164, 255)
FACTION.isDefault = false
-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cwu.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/factory.png"
-- Gameplay stuff
FACTION.bIsBystanderTBC = true
FACTION.humanVoices = true
FACTION.allowForcefieldInfestationPassage = true
FACTION.idInspectionText = "Worker"
-- Tables
FACTION.models = {
female = {
"models/willardnetworks/citizens/female_01.mdl",
"models/willardnetworks/citizens/female_02.mdl",
"models/willardnetworks/citizens/female_03.mdl",
"models/willardnetworks/citizens/female_04.mdl",
"models/willardnetworks/citizens/female_06.mdl",
"models/willardnetworks/citizens/female_05.mdl"
};
male = {
"models/willardnetworks/citizens/male_01.mdl",
"models/willardnetworks/citizens/male_02.mdl",
"models/willardnetworks/citizens/male_03.mdl",
"models/willardnetworks/citizens/male_04.mdl",
"models/willardnetworks/citizens/male_05.mdl",
"models/willardnetworks/citizens/male_06.mdl",
"models/willardnetworks/citizens/male_07.mdl",
"models/willardnetworks/citizens/male_08.mdl",
"models/willardnetworks/citizens/male_09.mdl",
"models/willardnetworks/citizens/male_10.mdl"
};
};
FACTION.npcRelations = {
["npc_turret_ceiling"] = D_LI,
["npc_cscanner"] = D_LI,
["npc_manhack"] = D_LI,
["npc_turret_floor"] = D_LI,
}
FACTION.radioChannels = {"utc", "ucmr",}
-- Functions
function FACTION:OnCharacterCreated(client, character)
character:CreateIDCard()
local background = character:GetBackground()
-- Give clothing chosen upon char creation
local inventory = character:GetInventory()
inventory:Add("pda", 1)
inventory:Add("cwu_card", 1)
inventory:Add("armband_purple", 1)
if (background == "Employé") then
inventory:Add("torso_yellow_worker_jacket", 1)
inventory:Add("cwu_radio", 1)
end
if (background == "Médecin") then
inventory:Add("torso_medic_shirt", 1)
inventory:Add("cmru_radio", 1)
end
local chosenClothes = character:GetData("chosenClothes")
if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
if chosenClothes.torso then
inventory:Add(chosenClothes.torso, 1)
end
if chosenClothes.legs then
inventory:Add(chosenClothes.legs, 1)
end
if chosenClothes.shoes then
inventory:Add(chosenClothes.shoes, 1)
end
if chosenClothes["8"] then
inventory:Add("glasses", 1)
end
character:SetData("equipBgClothes", true)
end
character:SetData("chosenClothes", nil)
end
function FACTION:OnTransferred(character)
local genericData = character:GetGenericdata()
genericData.combine = false
character:SetGenericdata(genericData)
end
FACTION_WORKERS = FACTION.index

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Munitions de .357"
ITEM.model = "models/items/357ammo.mdl"
ITEM.ammo = "357" -- type of the ammo
ITEM.category = "Balles"
ITEM.ammoAmount = 12 -- amount of the ammo
ITEM.description = "Une boîte contenant %s de munitions .357"
ITEM.classes = {CLASS_EOW}

View 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/
--]]
/*
ITEM.name = "Munitions d'AR2"
ITEM.model = "models/items/combine_rifle_cartridge01.mdl"
ITEM.ammo = "ar2" -- type of the ammo
ITEM.category = "Balles"
ITEM.ammoAmount = 30 -- amount of the ammo
ITEM.description = "Une cartouche qui contient %s de munitions AR2"

View 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/
--]]
/*
ITEM.name = "Munitions pour fusils d'assaut"
ITEM.model = "models/Items/BoxMRounds.mdl"
ITEM.ammo = "ar2" -- type of the ammo
ITEM.category = "Balles"
ITEM.ammoAmount = 30 -- amount of the ammo
ITEM.description = "Une boîte qui contient %s de munitions de fusil d'assaut."

View 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/
--]]
/*
ITEM.name = "Flèches d'arbalète"
ITEM.model = "models/Items/BoxBuckshot.mdl"
ITEM.ammo = "XBowBolt" -- type of the ammo
ITEM.ammoAmount = 5 -- amount of the ammo
ITEM.category = "Balles"
ITEM.description = "Un paquet de %s carreaux d'arbalète"

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Munitions de .9mm"
ITEM.model = "models/items/boxsrounds.mdl"
ITEM.ammo = "pistol" -- type of the ammo
ITEM.category = "Balles"
ITEM.ammoAmount = 30 -- amount of the ammo
ITEM.description = "Une boîte qui contient %s de munitions .9mm"
ITEM.classes = {CLASS_EMP, CLASS_EOW}

View File

@@ -0,0 +1,23 @@
--[[
| 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 = "Missile RPG"
ITEM.model = "models/weapons/w_missile_closed.mdl"
ITEM.ammo = "rpg_round" -- type of the ammo
ITEM.ammoAmount = 1 -- amount of the ammo
ITEM.category = "Balles"
ITEM.width = 2
ITEM.description = "Un paquet de %s roquettes"
ITEM.iconCam = {
ang = Angle(-0.70499622821808, 268.25439453125, 0),
fov = 12.085652091515,
pos = Vector(7, 200, -2)
}

View 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/
--]]
/*
ITEM.name = "Cartouches de fusil à pompe"
ITEM.model = "models/Items/BoxBuckshot.mdl"
ITEM.ammo = "buckshot" -- type of the ammo
ITEM.ammoAmount = 15 -- amount of the ammo
ITEM.category = "Balles"
ITEM.description = "Une boîte de %s cartouches de fusil à pompe"

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Balles pour SMG"
ITEM.model = "models/Items/BoxSRounds.mdl"
ITEM.ammo = "smg1" -- type of the ammo
ITEM.ammoAmount = 45 -- amount of the ammo
ITEM.description = "Une boîte qui contient %s de munitions pour SMG"
ITEM.category = "Balles"
ITEM.classes = {CLASS_EMP, CLASS_EOW}

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Munitions pour sniper"
ITEM.model = "models/items/sniper_round_box.mdl"
ITEM.category = "Balles"
ITEM.ammo = "sniperpenetratedround" -- type of the ammo
ITEM.ammoAmount = 15 -- amount of the ammo
ITEM.description = "Une boîte qui contient %s de munitions de sniper"
ITEM.classes = {CLASS_EMP, CLASS_EOW}

View File

@@ -0,0 +1,57 @@
--[[
| 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_outfit"
ITEM.name = "Armored Clothes"
ITEM.description = "A suitcase full of clothes."
ITEM.model = Model("models/props_c17/suitcase_passenger_physics.mdl")
ITEM.category = "Armored Clothing"
ITEM.width = 2
ITEM.height = 2
ITEM.maxArmor = 0
if (CLIENT) then
function ITEM:PopulateTooltip(tooltip)
local panel = tooltip:AddRowAfter("name", "armor")
panel:SetBackgroundColor(derma.GetColor("Warning", tooltip))
panel:SetText("Armure : " .. (self:GetData("equip") and LocalPlayer():Armor() or self:GetData("armor", self.maxArmor)))
panel:SizeToContents()
end
end
function ITEM:OnEquipped()
self.player:SetArmor(self:GetData("armor", self.maxArmor))
end
function ITEM:OnUnequipped()
self:SetData("armor", math.Clamp(self.player:Armor(), 0, self.maxArmor))
self.player:SetArmor(0)
end
function ITEM:Repair(amount)
self:SetData("armor", math.Clamp(self:GetData("armor") + amount, 0, self.maxArmor))
end
function ITEM:OnLoadout()
if (self:GetData("equip")) then
self.player:SetArmor(self:GetData("armor", self.maxArmor))
end
end
function ITEM:OnSave()
if (self:GetData("equip")) then
local armor = math.Clamp(self.player:Armor(), 0, self.maxArmor)
self:SetData("armor", armor)
if (armor != self.player:Armor()) then
self.player:SetArmor(armor)
end
end
end

View File

@@ -0,0 +1,128 @@
--[[
| 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 = "Generic Equipable Item"
ITEM.description = "An item that can be equipped."
ITEM.category = "Equipable"
ITEM.model = "models/props_lab/box01a.mdl"
ITEM.width = 1
ITEM.height = 1
-- Inventory drawing
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
if (item:GetData("equip")) then
surface.SetDrawColor(110, 255, 110, 100)
surface.DrawOutlinedRect(1, 1, w - 2, h - 2)
end
end
function ITEM:PopulateTooltip(tooltip)
if (self:GetData("equip")) then
local name = tooltip:GetRow("name")
name:SetBackgroundColor(derma.GetColor("Success", tooltip))
end
end
end
function ITEM:Equip(client)
self:SetData("equip", true)
self:OnEquipped(client)
end
function ITEM:Unequip(client)
self:SetData("equip", false)
self:OnUnequipped(client)
end
ITEM:Hook("drop", function(item)
if (item:GetData("equip")) then
local character = ix.char.loaded[item.owner]
local client = character and character:GetPlayer() or item:GetOwner()
item.player = client
item:Unequip(item:GetOwner())
end
end)
ITEM.functions.EquipUn = { -- sorry, for name order.
name = "Déséquiper",
icon = "icon16/cross.png",
OnRun = function(item)
item:Unequip(item.player)
return false
end,
OnCanRun = function(item)
local client = item.player
return !IsValid(item.entity) and IsValid(client) and item:GetData("equip") == true and hook.Run("CanPlayerUnequipItem", client, item) != false
end
}
ITEM.functions.Equip = {
name = "Équiper",
icon = "icon16/tick.png",
OnRun = function(item)
local client = item.player
local char = client:GetCharacter()
local items = char:GetInventory():GetItems()
if (item.equipableCategory) then
for _, v in pairs(items) do
if (v.id != item.id) then
local itemTable = ix.item.instances[v.id]
if (v.equipableCategory == item.equipableCategory and itemTable:GetData("equip")) then
client:NotifyLocalized(item.equippedNotify or "itemAlreadyEquipped")
return false
end
end
end
end
item:Equip(item.player)
return false
end,
OnCanRun = function(item)
local client = item.player
return !IsValid(item.entity) and IsValid(client) and item:GetData("equip") != true and item:CanEquip(client) and hook.Run("CanPlayerEquipItem", client, item) != false
end
}
function ITEM:CanTransfer(oldInventory, newInventory)
if (newInventory and self:GetData("equip")) then
return false
end
return true
end
function ITEM:OnRemoved()
if (self.invID != 0 and self:GetData("equip")) then
self.player = self:GetOwner()
self:Unequip(self.player)
self.player = nil
end
end
function ITEM:OnEquipped(client) end
function ITEM:OnUnequipped(client) end
function ITEM:CanEquip(client)
return client:GetCharacter():GetInventory():GetID() == self.invID
end

View File

@@ -0,0 +1,15 @@
--[[
| 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 = "Permit Base"
ITEM.model = "models/props_lab/clipboard.mdl"
ITEM.description = "A permit for purchasing goods."
ITEM.category = "Permits"
ITEM.permit = "none"

View File

@@ -0,0 +1,142 @@
--[[
| 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 = "Tools Base"
ITEM.description = "Breakable tools for crafting purposes"
ITEM.category = "Outils"
ITEM.maxDurability = 8
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)
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 = "Définir durabilité MAX",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter new maximum durability value", 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("Invalid number")
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 = "Définir durabilité",
icon = "icon16/wrench.png",
OnClick = function(itemTable)
local client = itemTable.player
Derma_StringRequest("Définir durabilité", "Enter new durability value", 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("Invalid number")
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\nDurabilité : " .. 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
local name = self.name
if IsValid(self:GetOwner()) then
ix.log.Add(self, "itemBreakageDurability", name, self:GetOwner())
end
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

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Uniforme Industriel M1"
ITEM.model = Model("models/props_c17/BriefCase001a.mdl")
ITEM.description = "La combinaison industrielle lourde Mark I est dérivée des anciennes conceptions soviétiques pour le travail en usine. Elle devrait s'avérer utile pour se protéger des fumées nauséabondes."
ITEM.category = "Vêtements - Industriel"
ITEM.replacement = "models/industrial_uniforms/industrial_uniform.mdl"
ITEM.isGasmask = true
ITEM.isPPE = true

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Uniforme industriel MII"
ITEM.model = Model("models/props_c17/BriefCase001a.mdl")
ITEM.description = "Si la tenue reste la même, la Mark II est globalement mieux adaptée grâce à ses couches de protection supplémentaires et à un masque beaucoup moins claustrophobe. Il offre une meilleure protection contre les spores et les poisons."
ITEM.category = "Vêtements - Industriel"
ITEM.replacement = "models/industrial_uniforms/industrial_uniform2.mdl"
ITEM.isGasmask = true
ITEM.isPPE = true

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Uniforme de travailleur"
ITEM.model = Model("models/props_c17/BriefCase001a.mdl")
ITEM.description = "Uniforme de travailleur délivré par l'Union."
ITEM.category = "Vêtements - Industriel"
ITEM.replacement = "models/hlvr/characters/worker/npc/worker_citizen.mdl"
ITEM.isGasmask = true
ITEM.isPPE = true

View 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/
--]]
ITEM.name = "Uniforme de travailleur - Orange"
ITEM.model = Model("models/props_c17/BriefCase001a.mdl")
ITEM.description = "Uniforme de travailleur délivré par l'Union."
ITEM.category = "Vêtements - Industriel"
ITEM.replacement = "models/hlvr/characters/worker/npc/worker_citizen.mdl"
ITEM.bodyGroups = {
["Uniform Variant"] = 1
}
ITEM.isGasmask = true
ITEM.isPPE = true

View 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/
--]]
ITEM.name = "Radio de l'UTC"
ITEM.model = Model("models/willardnetworks/skills/handheld_radio.mdl")
ITEM.description = "Une radio branchée sur le canal radio de l'Administrateur Civile."
ITEM.channel = "UTC"
ITEM.category = "Radios"
ITEM.KeepOnDeath = true
ITEM.colorAppendix = {["red"] = "Vous devez obtenir l'autorisation du groupe C.W.U. pour porter cet objet, ne le laissez pas tomber et ne le donnez pas aux autres joueurs."}

View 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/
--]]
ITEM.name = "CMRU Management Radio"
ITEM.model = Model("models/willardnetworks/skills/handheld_radio.mdl")
ITEM.description = "A radio tuned in to the Civil Medical & Research Union Management frequency."
ITEM.channel = "cmru"
ITEM.category = "Combine"
ITEM.KeepOnDeath = true
ITEM.colorAppendix = {["red"] = "You need permission from the CMRU Management to carry this item, do not drop or hand it to other players."}

View File

@@ -0,0 +1,18 @@
--[[
| 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 = "Radio de Management de l'UTC"
ITEM.model = Model("models/willardnetworks/skills/handheld_radio.mdl")
ITEM.description = "Une radio portable spécialement conçue pour les Managers de l'UTC."
ITEM.channel = "utc-management"
ITEM.category = "Combine"
ITEM.KeepOnDeath = true
ITEM.colorAppendix = {["red"] = "Vous avez besoin d'une autorisation spéciale de l'UTC pour détenir cet objet. Toute utilisation sans autorisation sera sévèrement punie."}

View 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/
--]]
ITEM.name = "Radio du Pôle Propagande"
ITEM.model = Model("models/willardnetworks/skills/handheld_radio.mdl")
ITEM.description = "Une radio réglée sur la fréquence du pôle de la propagande."
ITEM.channel = "ppg"
ITEM.category = "Radios"
ITEM.KeepOnDeath = true
ITEM.colorAppendix = {["red"] = "Vous devez obtenir la permission pour porter cette radio. Ne la laissez pas tomber ou ne le donnez pas aux autres joueurs."}

View 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/
--]]
ITEM.name = "Dispositif de diffusion"
ITEM.model = Model("models/props_lab/reciever01b.mdl")
ITEM.description = "Un dispositif utilisé pour diffuser des messages à la Cité."
ITEM.KeepOnDeath = true
ITEM.category = "Combine"
ITEM.colorAppendix = {["red"] = "Vous devez obtenir l'autorisation du staff pour porter cet objet, ne le laissez pas tomber et ne le remettez pas aux autres joueurs."}
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
surface.SetDrawColor(255, 0, 0, 100)
surface.DrawOutlinedRect(1, 1, w - 2, h - 2)
end
end

View File

@@ -0,0 +1,43 @@
--[[
| 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 = "UCMR Bio-lock"
ITEM.description = "Un dispositif métallique appliqué sur les portes, utilisé par les UCMR."
ITEM.model = Model("models/willardnetworks/props_combine/wn_combine_lock.mdl")
ITEM.category = "Combine"
ITEM.width = 1
ITEM.height = 2
ITEM.iconCam = {
pos = Vector(-0.5, 50, 2),
ang = Angle(0, 270, 0),
fov = 25.29
}
ITEM.functions.Place = {
name = "Placer",
OnRun = function(itemTable)
local client = itemTable.player
local data = {}
data.start = client:GetShootPos()
data.endpos = data.start + client:GetAimVector() * 96
data.filter = client
local lock = scripted_ents.Get("ix_combinelock_cmru"):SpawnFunction(client, util.TraceLine(data))
if (IsValid(lock)) then
client:EmitSound("physics/metal/weapon_impact_soft2.wav", 75, 80)
ix.combineNotify:AddNotification("NTC:// UCMR Restricteur déployé", nil, client)
else
return false
end
end
}

View File

@@ -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 = "Carte d'accès Combine"
ITEM.model = Model("models/sky/combinecard2.mdl")
ITEM.description = "Une carte magnétique qui permet d'ouvrir des serrures du Cartel."
ITEM.category = "Combine"
ITEM.iconCam = {
pos = Vector(-509.64, -427.61, 310.24),
ang = Angle(25, 400, 0),
fov = 0.59
}

View File

@@ -0,0 +1,43 @@
--[[
| 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 = "Combine Bio-lock"
ITEM.description = "Un appareil métallique appliqué aux portes par les unités de la Protection Civile."
ITEM.model = Model("models/willardnetworks/props_combine/wn_combine_lock.mdl")
ITEM.category = "Combine"
ITEM.width = 1
ITEM.height = 2
ITEM.iconCam = {
pos = Vector(-0.5, 50, 2),
ang = Angle(0, 270, 0),
fov = 25.29
}
ITEM.functions.Place = {
name = "Placer",
OnRun = function(itemTable)
local client = itemTable.player
local data = {}
data.start = client:GetShootPos()
data.endpos = data.start + client:GetAimVector() * 96
data.filter = client
local lock = scripted_ents.Get("ix_combinelock"):SpawnFunction(client, util.TraceLine(data))
if (IsValid(lock)) then
client:EmitSound("physics/metal/weapon_impact_soft2.wav", 75, 80)
ix.combineNotify:AddNotification("NTC:// CMB : Restricteur déployé", nil, client)
else
return false
end
end
}

View File

@@ -0,0 +1,43 @@
--[[
| 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 = "UTC Bio-lock"
ITEM.description = "Un appareil métallique appliqué sur les portes, utilisé par l'UTC."
ITEM.model = Model("models/willardnetworks/props_combine/wn_combine_lock.mdl")
ITEM.category = "Combine"
ITEM.width = 1
ITEM.height = 2
ITEM.iconCam = {
pos = Vector(-0.5, 50, 2),
ang = Angle(0, 270, 0),
fov = 25.29
}
ITEM.functions.Place = {
name = "Placer",
OnRun = function(itemTable)
local client = itemTable.player
local data = {}
data.start = client:GetShootPos()
data.endpos = data.start + client:GetAimVector() * 96
data.filter = client
local lock = scripted_ents.Get("ix_combinelock_cwu"):SpawnFunction(client, util.TraceLine(data))
if (IsValid(lock)) then
client:EmitSound("physics/metal/weapon_impact_soft2.wav", 75, 80)
ix.combineNotify:AddNotification("NTC:// A-C : Restricteur déployé", nil, client)
else
return false
end
end
}

View 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/
--]]
ITEM.name = "Bio-lock brisée"
ITEM.description = "Une serrure mais qui semble cassée. Quel dommage."
ITEM.category = "Déchets"
ITEM.model = Model("models/willardnetworks/props_combine/wn_combine_lock.mdl")
ITEM.width = 1
ITEM.height = 2
ITEM.iconCam = {
pos = Vector(-0.5, 50, 2),
ang = Angle(0, 270, 0),
fov = 25.29
}

View 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/
--]]
ITEM.name = "Microphone sans fil"
ITEM.model = Model("models/props_junk/cardboard_box004a.mdl")
ITEM.description = "Un microphone qui est connecté sans fil aux systèmes de diffusion à proximité."
ITEM.KeepOnDeath = true
ITEM.category = "Combine"
ITEM.colorAppendix = {["red"] = "Vous devez obtenir l'autorisation du staff pour porter cet objet, ne le laissez pas tomber et ne le remettez pas aux autres joueurs."}
if (CLIENT) then
function ITEM:PaintOver(item, w, h)
surface.SetDrawColor(255, 0, 0, 100)
surface.DrawOutlinedRect(1, 1, w - 2, h - 2)
end
end

View File

@@ -0,0 +1,78 @@
--[[
| 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 = "Collier de serrage"
ITEM.description = "Un collier de serrage orange utilisé pour restreindre les gens."
ITEM.price = 80
ITEM.model = "models/items/crossbowrounds.mdl"
ITEM.category = "Combine"
ITEM.maxStackSize = 10
ITEM.factions = {FACTION_CP, FACTION_OTA, FACTION_RESISTANCE}
ITEM.functions.Use = {
name = "Utiliser",
OnRun = function(itemTable)
local client = itemTable.player
local data = {}
data.start = client:GetShootPos()
data.endpos = data.start + client:GetAimVector() * 96
data.filter = client
local target = util.TraceLine(data).Entity
local ragdoll = nil
if (target:IsRagdoll() and target.ixPlayer) then
ragdoll = target
target = target.ixPlayer
end
if (IsValid(target) and target:IsPlayer() and target:GetCharacter() and !target:GetNetVar("tying") and !target:IsRestricted()) then
itemTable.bBeingUsed = true
client:SetAction("@tying", 5)
client:DoStaredAction(ragdoll or target, function()
itemTable.bBeingUsed = false
if (!(ix.fights and target:GetFight())) then
target:SetRestricted(true)
target:SetNetVar("tying")
target:NotifyLocalized("fTiedUp")
client:NotifyLocalized("La cible a été attachée avec succès.")
target:SetWalkSpeed(target:GetWalkSpeed()/3)
itemTable:Remove()
else
target:SetAction()
target:SetNetVar("tying")
end
end, 5, function()
client:SetAction()
target:SetAction()
target:SetNetVar("tying")
itemTable.bBeingUsed = false
end)
target:SetNetVar("tying", true)
target:SetAction("@fBeingTied", 5)
else
itemTable.player:NotifyLocalized("plyNotValid")
end
return false
end,
OnCanRun = function(itemTable)
return !IsValid(itemTable.entity) or itemTable.bBeingUsed
end
}
function ITEM:CanTransfer(inventory, newInventory)
return !self.bBeingUsed
end

View 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/
--]]
ITEM.name = "RPG-7"
ITEM.description = "A un-guided rocket launcher capable of blowing up vehicles... as one might guess. Just try to aim better without a laser guide to help your bad aim."
ITEM.model = "models/vj_weapons/w_ins_rpg7.mdl"
ITEM.class = "weapon_rpg"
ITEM.weaponCategory = "primary"
ITEM.exRender = true
ITEM.width = 5
ITEM.height = 2
ITEM.iconCam = {
pos = Vector(5.22, -0.11, 199.93),
ang = Angle(88.2, -183.11, 0),
fov = 2.29
}

View File

@@ -0,0 +1,25 @@
--[[
| 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 = "CV-2000 Matraque électrique"
ITEM.description = "Une matraque revêtue d'une couleur gris foncé, avec plusieurs bobines exposées au sommet"
ITEM.model = "models/weapons/w_stunbaton.mdl"
ITEM.class = "ix_stunstick"
ITEM.category = "Armes"
ITEM.weaponCategory = "melee"
ITEM.exRender = true
ITEM.width = 1
ITEM.height = 3
ITEM.iconCam = {
pos = Vector(5.22, -0.11, 199.93),
ang = Angle(88.2, -183.11, 0),
fov = 2.29
}

View File

@@ -0,0 +1,97 @@
--[[
| 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/
--]]
LANGUAGE = {
schemaName = "Half-Life 2 - Echo One",
tying = "Attache...",
unTying = "Détache...",
isTied = "Attaché",
fTiedUp = "Vous êtes attaché.",
fBeingTied = "Vous êtes en train d'être attaché.",
tiedUp = "Ils sont attachés.",
beingTied = "Ils sont en train d'être attachés.",
beingUntied = "Ils sont en train d'être détachés.",
needRequestDevice = "Vous avez besoin d'un dispositif de demande pour faire cela.",
cantViewData = "Vous ne pouvez pas voir les données de cette personne.",
cid = "CID",
citizenid = "ID de citoyen",
lastEdit = "Dernière révision par",
lastEditDate = "Dernière révision le",
objectivesTitle = "Objectifs actuels",
searchingCorpse = "Recherche du cadavre...",
radioNotOn = "Votre radio n'est pas allumée !",
radioRequired = "Vous avez besoin d'une radio pour faire cela.",
radioAlreadyOn = "Vous avez déjà une radio allumée !",
economy = "Économie",
itemAlreadyEquipped = "Vous avez déjà cet objet équipé !",
-- messages d'affichage pour la combine
cViewData = "Téléchargement des données de profil du citoyen...",
cViewDataExpired = "ERREUR ! Échec du téléchargement des données de profil mises à jour du citoyen...",
cViewDataUpdate = "Téléchargement des données de profil mises à jour du citoyen...",
cViewDataFiller = "Mise en cache de la base de données de profil du citoyen mise à jour...",
cViewObjectives = "Téléchargement du manifeste des objectifs d'Overwatch...",
cViewObjectivesUpdate = "Mise à jour du manifeste des objectifs d'Overwatch...",
cViewObjectivesFiller = "Récupération du manifeste des objectifs d'Overwatch en cours (RÉVISION %d)...",
cCivilJudgement = "Préparation des protocoles d'administration de jugement civil...",
cRequest = "Téléchargement du paquet de demande...",
cCitizenLoaded = "Reconstruction du manifeste de citoyen...",
cCombineLoaded = "Mise à jour des coordonnées de biosignal...",
cLostBiosignal = "Téléchargement du biosignal perdu...",
cLostBiosignalLocation = "AVERTISSEMENT ! BIOSIGNAL PERDU POUR L'UNITÉ %s",
cUnitCriticallyInjured = "AVERTISSEMENT ! L'UNITÉ %s A BESOIN D'UNE ASSITANCE MÉDICALE IMMÉDIATE",
cTrauma = "AVERTISSEMENT ! %s traumatisme détecté.",
cDroppingVitals = "AVERTISSEMENT ! SIGNES VITAUX EN CHUTE, RECHERCHEZ UNE ASSITANCE MÉDICALE IMMÉDIATE",
cStaminaLost = "ATTENTION : Utilisation excessive de l'utilisateur, administration d'un stimulant...",
cStaminaGained = "STIMULANT ADMINISTRÉ",
cLosingContact = "Téléchargement des informations de contact radio perdues...",
cLostContact = "AVERTISSEMENT ! Contact radio perdu pour l'unité à une position inconnue...",
voices = "Voix",
dispatchsound = "Son de dispatch",
optColorModify = "Modifier la couleur du dessin",
optdColorModify = "Active ou désactive la modification de couleur du dessin.",
optColorSaturation = "Saturation des couleurs",
optdColorSaturation = "La saturation des couleurs de l'écran. Ne fait rien si 'Modifier la couleur du dessin' est désactivé.",
administration = "Administration",
notice = "Notifications",
civilprot = "Protection Civile",
optSeeGlobalOOC = "Afficher le tchat OOC global",
optdSeeGlobalOOC = "Afficher le tchat OOC global dans votre boîte de discussion.",
optIconIncognitoMode = "Mode incognito pour l'icône admin OOC/LOOC",
optdIconIncognitoMode = "Afficher/ne pas afficher l'icône admin dans le tchat LOOC et OOC.",
optStandardIconsEnabled = "Activer les icônes standards",
optdStandardIconsEnabled = "Activer/désactiver les icônes standards de discussion devant chaque message.",
dispatchTypoWarning = "Ce que vous êtes sur le point de diffuser n'est pas une commande vocale valide. Envoyez à nouveau dans les 5 secondes pour confirmer.",
textDoubleCommand = "Votre texte avait un texte supplémentaire '%s' au début, mais il a été filtré. Faites attention !",
cmdPunch = "Permet à l'unité OTA de donner un coup de poing à quelqu'un, le mettant instantanément KO.",
cmdListColors = "Affiche toutes les couleurs disponibles dans la console.",
ColorsPrinted = "Toutes les couleurs disponibles ont été imprimées dans la console.",
cmdVisorMessage = "Affiche un message sur le visor à toutes les unités Transhumaines de Surveillance.",
cmdPlyNotify = "Envoyer une notification à un joueur spécifique.",
notificationSent = "Notification envoyée.",
cmdWD = "Chuchoter quelque chose à une personne spécifique à proximité de vous. Utilisez pour cibler la personne devant vous.",
targetTooFar = "Cette personne est trop loin pour entendre votre chuchotement !",
cmdGetCWUFlags = "Donnez-vous temporairement des permissions PET pour les quarts de travail.",
cwuFlagsCooldown = "Vous devez attendre une heure avant d'utiliser cette commande !",
cwuFlagsGivenAdmins = "%s (%s) s'est donné temporairement des permissions PET grâce à la commande /GetCWUFlags !",
cwuFlagsGivenPlayer = "Vous vous êtes donné des permissions PET pour une (1) heure. L'abus ou la mauvaise utilisation de cette commande sera puni.",
cmdUnstuck = "Vous sortir d'un endroit où vous êtes coincé, si vous êtes coincé dans un mur, si vous avez été tué par un objet, etc. L'abus sera puni.",
unstuckCooldown = "Vous devez attendre une heure avant d'utiliser cette commande !",
unstuckAdmins = "%s (%s) a utilisé la commande /UnStuck à %s ! La raison pour laquelle ils ont exécuté la commande /UnStuck est : %s",
unstuckPlayer = "Vous vous êtes débloqué. Les membres du personnel ont été informés.",
unstuckAnswerIncorrect = "Ce n'est pas la bonne réponse !",
unstuckAnswerInvalid = "Ce n'est pas une réponse valide !"
}

View File

@@ -0,0 +1,97 @@
--[[
| 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/
--]]
LANGUAGE = {
schemaName = "Half-Life 2 - Echo One",
tying = "Attache...",
unTying = "Détache...",
isTied = "Attaché",
fTiedUp = "Vous êtes attaché.",
fBeingTied = "Vous êtes en train d'être attaché.",
tiedUp = "Ils sont attachés.",
beingTied = "Ils sont en train d'être attachés.",
beingUntied = "Ils sont en train d'être détachés.",
needRequestDevice = "Vous avez besoin d'un dispositif de demande pour faire cela.",
cantViewData = "Vous ne pouvez pas voir les données de cette personne.",
cid = "CID",
citizenid = "ID de citoyen",
lastEdit = "Dernière révision par",
lastEditDate = "Dernière révision le",
objectivesTitle = "Objectifs actuels",
searchingCorpse = "Recherche du cadavre...",
radioNotOn = "Votre radio n'est pas allumée !",
radioRequired = "Vous avez besoin d'une radio pour faire cela.",
radioAlreadyOn = "Vous avez déjà une radio allumée !",
economy = "Économie",
itemAlreadyEquipped = "Vous avez déjà cet objet équipé !",
-- messages d'affichage pour la combine
cViewData = "Téléchargement des données de profil du citoyen...",
cViewDataExpired = "ERREUR ! Échec du téléchargement des données de profil mises à jour du citoyen...",
cViewDataUpdate = "Téléchargement des données de profil mises à jour du citoyen...",
cViewDataFiller = "Mise en cache de la base de données de profil du citoyen mise à jour...",
cViewObjectives = "Téléchargement du manifeste des objectifs d'Overwatch...",
cViewObjectivesUpdate = "Mise à jour du manifeste des objectifs d'Overwatch...",
cViewObjectivesFiller = "Récupération du manifeste des objectifs d'Overwatch en cours (RÉVISION %d)...",
cCivilJudgement = "Préparation des protocoles d'administration de jugement civil...",
cRequest = "Téléchargement du paquet de demande...",
cCitizenLoaded = "Reconstruction du manifeste de citoyen...",
cCombineLoaded = "Mise à jour des coordonnées de biosignal...",
cLostBiosignal = "Téléchargement du biosignal perdu...",
cLostBiosignalLocation = "AVERTISSEMENT ! BIOSIGNAL PERDU POUR L'UNITÉ %s",
cUnitCriticallyInjured = "AVERTISSEMENT ! L'UNITÉ %s A BESOIN D'UNE ASSITANCE MÉDICALE IMMÉDIATE",
cTrauma = "AVERTISSEMENT ! %s traumatisme détecté.",
cDroppingVitals = "AVERTISSEMENT ! SIGNES VITAUX EN CHUTE, RECHERCHEZ UNE ASSITANCE MÉDICALE IMMÉDIATE",
cStaminaLost = "ATTENTION : Utilisation excessive de l'utilisateur, administration d'un stimulant...",
cStaminaGained = "STIMULANT ADMINISTRÉ",
cLosingContact = "Téléchargement des informations de contact radio perdues...",
cLostContact = "AVERTISSEMENT ! Contact radio perdu pour l'unité à une position inconnue...",
voices = "Voix",
dispatchsound = "Son de dispatch",
optColorModify = "Modifier la couleur du dessin",
optdColorModify = "Active ou désactive la modification de couleur du dessin.",
optColorSaturation = "Saturation des couleurs",
optdColorSaturation = "La saturation des couleurs de l'écran. Ne fait rien si 'Modifier la couleur du dessin' est désactivé.",
administration = "Administration",
notice = "Notifications",
civilprot = "Protection Civile",
optSeeGlobalOOC = "Afficher le tchat OOC global",
optdSeeGlobalOOC = "Afficher le tchat OOC global dans votre boîte de discussion.",
optIconIncognitoMode = "Mode incognito pour l'icône admin OOC/LOOC",
optdIconIncognitoMode = "Afficher/ne pas afficher l'icône admin dans le tchat LOOC et OOC.",
optStandardIconsEnabled = "Activer les icônes standards",
optdStandardIconsEnabled = "Activer/désactiver les icônes standards de discussion devant chaque message.",
dispatchTypoWarning = "Ce que vous êtes sur le point de diffuser n'est pas une commande vocale valide. Envoyez à nouveau dans les 5 secondes pour confirmer.",
textDoubleCommand = "Votre texte avait un texte supplémentaire '%s' au début, mais il a été filtré. Faites attention !",
cmdPunch = "Permet à l'unité OTA de donner un coup de poing à quelqu'un, le mettant instantanément KO.",
cmdListColors = "Affiche toutes les couleurs disponibles dans la console.",
ColorsPrinted = "Toutes les couleurs disponibles ont été imprimées dans la console.",
cmdVisorMessage = "Affiche un message sur le visor à toutes les unités Transhumaines de Surveillance.",
cmdPlyNotify = "Envoyer une notification à un joueur spécifique.",
notificationSent = "Notification envoyée.",
cmdWD = "Chuchoter quelque chose à une personne spécifique à proximité de vous. Utilisez @ pour cibler la personne devant vous.",
targetTooFar = "Cette personne est trop loin pour entendre votre chuchotement !",
cmdGetCWUFlags = "Donnez-vous temporairement des permissions PET pour les quarts de travail.",
cwuFlagsCooldown = "Vous devez attendre une heure avant d'utiliser cette commande !",
cwuFlagsGivenAdmins = "%s (%s) s'est donné temporairement des permissions PET grâce à la commande /GetCWUFlags !",
cwuFlagsGivenPlayer = "Vous vous êtes donné des permissions PET pour une (1) heure. L'abus ou la mauvaise utilisation de cette commande sera puni.",
cmdUnstuck = "Vous sortir d'un endroit où vous êtes coincé, si vous êtes coincé dans un mur, si vous avez été tué par un objet, etc. L'abus sera puni.",
unstuckCooldown = "Vous devez attendre une heure avant d'utiliser cette commande !",
unstuckAdmins = "%s (%s) a utilisé la commande /UnStuck à %s ! La raison pour laquelle ils ont exécuté la commande /UnStuck est : %s",
unstuckPlayer = "Vous vous êtes débloqué. Les membres du personnel ont été informés.",
unstuckAnswerIncorrect = "Ce n'est pas la bonne réponse !",
unstuckAnswerInvalid = "Ce n'est pas une réponse valide !"
}

View File

@@ -0,0 +1,63 @@
--[[
| 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/
--]]
LANGUAGE = {
isTied = "Atado",
fBeingTied = "Estás siendo atado.",
radioRequired = "Necesitas una radio para hacer esto.",
optdStandardIconsEnabled = "Activa o desactiva los iconos estándar delante de cada mensaje del chat.",
lastEdit = "Última revisión hecha en el",
optStandardIconsEnabled = "Activar Iconos Estándar",
tying = "Atando...",
citizenid = "ID de Ciudadano",
cLosingContact = "Descargando información de contacto de radio perdida...",
schemaName = "Half-Life 2 Roleplay",
cDroppingVitals = "¡ALERTA! SEÑALES VITALES EN DESCENSO, BUSQUE ATENCIÓN MEDICA INMEDIATA",
cLostContact = "¡ALERTA! Se ha perdido el contacto de radio con la unidad en localización desconocida...",
cViewDataUpdate = "Subiendo información revisada del ciudadano...",
tiedUp = "Está atado.",
beingUntied = "Está siendo desatado.",
lastEditDate = "Última revisión",
cCitizenLoaded = "Reconstruyendo el manifiesto civil...",
searchingCorpse = "Buscando en el cadáver...",
cStaminaLost = "ATENCIÓN: Se ha detectado un esfuerzo excesivo, administrando estimulante...",
optSeeGlobalOOC = "Mostrar chat global OOC",
optdSeeGlobalOOC = "Muestra el chat global OOC en tu chat.",
cCombineLoaded = "Actualizando las coordenadas de la bioseñal...",
notice = "Notificaciones",
cUnitCriticallyInjured = "¡ALERTA! LA UNIDAD %s REQUIERE ATENCIÓN MÉDICA INMEDIATA",
cantViewData = "No puedes ver los datos de esta persona.",
radioAlreadyOn = "¡Ya tienes una radio encendida!",
objectivesTitle = "Objetivos actuales",
cViewData = "Descargando información del ciudadano...",
cLostBiosignalLocation = "¡ALERTA! BIOSEÑAL DE LA UNIDAD %s PERDIDA",
cViewDataExpired = "¡ERROR! Fallo al subir los datos revisados del ciudadano...",
civilprot = "Protección Civil",
cLostBiosignal = "Descargando bioseñal perdida...",
voices = "Voces",
beingTied = "Está siendo atado.",
cStaminaGained = "ESTIMULANTE ADMINISTRADO",
cCivilJudgement = "Preparando protocolos de administración del juicio civil...",
cRequest = "Descargando el paquete pedido...",
cTrauma = "¡ALERTA! Trauma %s detectado.",
unTying = "Desatando...",
fTiedUp = "Has sido atado.",
economy = "Economía",
administration = "Administración",
cid = "CID",
needRequestDevice = "Necesitas un dispositivo de socorro para hacer esto.",
cViewObjectives = "Descargando el manifiesto de objetivos de Overwatch...",
cViewObjectivesUpdate = "Descargando el manifiesto de objetivos de Overwatch...",
cViewObjectivesFiller = "Recuperando el manifiesto del objetivo de overwatch entrante (REVISIÓN %d)...",
dispatchsound = "Sonido de Dispatch",
cViewDataFiller = "Almacenando en caché la revisión de la base de datos de ciudadanos...",
optdColorModify = "Habilita o deshabilita las modificaciones del color de dibujado.",
optColorModify = "Modificar Color de Dibujado"
}

View File

@@ -0,0 +1,54 @@
--[[
| 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/
--]]
Schema.voices = {}
Schema.voices.stored = {}
Schema.voices.classes = {}
function Schema.voices.Add(class, key, text, sound, global)
class = string.utf8lower(class)
key = string.utf8lower(key)
Schema.voices.stored[class] = Schema.voices.stored[class] or {}
Schema.voices.stored[class][key] = {
text = text,
sound = sound,
global = global
}
end
function Schema.voices.Get(class, key)
class = string.utf8lower(class)
key = string.utf8lower(key)
if (Schema.voices.stored[class]) then
return Schema.voices.stored[class][key]
end
end
function Schema.voices.AddClass(class, condition)
class = string.utf8lower(class)
Schema.voices.classes[class] = {
condition = condition
}
end
function Schema.voices.GetClass(client)
local classes = {}
for k, v in pairs(Schema.voices.classes) do
if (v.condition(client)) then
classes[#classes + 1] = k
end
end
return classes
end

View File

@@ -0,0 +1,283 @@
--[[
| 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/
--]]
--[[
3D2D VGUI Wrapper
Copyright (c) 2015-2017 Alexander Overvoorde, Matt Stevens
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]--
local origin = Vector(0, 0, 0)
local angle = Angle(0, 0, 0)
local normal = Vector(0, 0, 0)
local scale = 0
local maxrange = 0
-- Helper functions
local function getCursorPos()
local p = util.IntersectRayWithPlane(LocalPlayer():EyePos(), LocalPlayer():GetAimVector(), origin, normal)
-- if there wasn't an intersection, don't calculate anything.
if not p then return end
if WorldToLocal(LocalPlayer():GetShootPos(), Angle(0,0,0), origin, angle).z < 0 then return end
if maxrange > 0 then
if p:Distance(LocalPlayer():EyePos()) > maxrange then
return
end
end
local pos = WorldToLocal(p, Angle(0,0,0), origin, angle)
return pos.x, -pos.y
end
local function getParents(pnl)
local parents = {}
local parent = pnl:GetParent()
while parent do
table.insert(parents, parent)
parent = parent:GetParent()
end
return parents
end
local function absolutePanelPos(pnl)
local x, y = pnl:GetPos()
local parents = getParents(pnl)
for _, parent in ipairs(parents) do
local px, py = parent:GetPos()
x = x + px
y = y + py
end
return x, y
end
local function pointInsidePanel(pnl, x, y)
local px, py = absolutePanelPos(pnl)
local sx, sy = pnl:GetSize()
if not x or not y then return end
x = x / scale
y = y / scale
return pnl:IsVisible() and x >= px and y >= py and x <= px + sx and y <= py + sy
end
-- Input
local inputWindows = {}
local usedpanel = {}
local function isMouseOver(pnl)
return pointInsidePanel(pnl, getCursorPos())
end
local function postPanelEvent(pnl, event, ...)
if not IsValid(pnl) or not pnl:IsVisible() or not pointInsidePanel(pnl, getCursorPos()) then return false end
local handled = false
for i, child in pairs(table.Reverse(pnl:GetChildren())) do
if not child:IsMouseInputEnabled() then continue end
if postPanelEvent(child, event, ...) then
handled = true
break
end
end
if not handled and pnl[event] then
pnl[event](pnl, ...)
usedpanel[pnl] = {...}
return true
else
return false
end
end
-- Always have issue, but less
local function checkHover(pnl, x, y, found)
if not (x and y) then
x, y = getCursorPos()
end
local validchild = false
for c, child in pairs(table.Reverse(pnl:GetChildren())) do
if not child:IsMouseInputEnabled() then continue end
local check = checkHover(child, x, y, found or validchild)
if check then
validchild = true
end
end
if found then
if pnl.Hovered then
pnl.Hovered = false
if pnl.OnCursorExited then pnl:OnCursorExited() end
end
else
if not validchild and pointInsidePanel(pnl, x, y) then
pnl.Hovered = true
if pnl.OnCursorEntered then pnl:OnCursorEntered() end
return true
else
pnl.Hovered = false
if pnl.OnCursorExited then pnl:OnCursorExited() end
end
end
return false
end
-- Mouse input
hook.Add("KeyPress", "VGUI3D2DMousePress", function(_, key)
if key ~= IN_USE then return end
if not IsFirstTimePredicted() then return end
for pnl in pairs(inputWindows) do
if IsValid(pnl) then
origin = pnl.Origin
scale = pnl.Scale
angle = pnl.Angle
normal = pnl.Normal
local key = input.IsKeyDown(KEY_LSHIFT) and MOUSE_RIGHT or MOUSE_LEFT
postPanelEvent(pnl, "OnMousePressed", key)
end
end
end)
hook.Add("KeyRelease", "VGUI3D2DMouseRelease", function(_, key)
if key ~= IN_USE then return end
if not IsFirstTimePredicted() then return end
for pnl, key in pairs(usedpanel) do
if IsValid(pnl) then
origin = pnl.Origin
scale = pnl.Scale
angle = pnl.Angle
normal = pnl.Normal
if pnl["OnMouseReleased"] then
pnl["OnMouseReleased"](pnl, key[1])
end
usedpanel[pnl] = nil
end
end
end)
function vgui.Start3D2D(pos, ang, res)
origin = pos
scale = res
angle = ang
normal = ang:Up()
maxrange = 0
cam.Start3D2D(pos, ang, res)
end
function vgui.MaxRange3D2D(range)
maxrange = isnumber(range) and range or 0
end
function vgui.IsPointingPanel(pnl)
origin = pnl.Origin
scale = pnl.Scale
angle = pnl.Angle
normal = pnl.Normal
return pointInsidePanel(pnl, getCursorPos())
end
local Panel = FindMetaTable("Panel")
function Panel:Paint3D2D()
if not self:IsValid() then return end
-- Add it to the list of windows to receive input
inputWindows[self] = true
-- Override gui.MouseX and gui.MouseY for certain stuff
local oldMouseX = gui.MouseX
local oldMouseY = gui.MouseY
local cx, cy = getCursorPos()
function gui.MouseX()
return (cx or 0) / scale
end
function gui.MouseY()
return (cy or 0) / scale
end
-- Override think of DFrame's to correct the mouse pos by changing the active orientation
if self.Think then
if not self.OThink then
self.OThink = self.Think
self.Think = function()
origin = self.Origin
scale = self.Scale
angle = self.Angle
normal = self.Normal
self:OThink()
end
end
end
-- Update the hover state of controls
local _, tab = checkHover(self)
-- Store the orientation of the window to calculate the position outside the render loop
self.Origin = origin
self.Scale = scale
self.Angle = angle
self.Normal = normal
-- Draw it manually
self:SetPaintedManually(false)
self:PaintManual()
self:SetPaintedManually(true)
gui.MouseX = oldMouseX
gui.MouseY = oldMouseY
end
function vgui.End3D2D()
cam.End3D2D()
end

View File

@@ -0,0 +1,488 @@
--[[
| 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/
--]]
imgui = {}
imgui.skin = {
background = Color(0, 0, 0, 0),
backgroundHover = Color(0, 0, 0, 0),
border = Color(255, 255, 255),
borderHover = Color(255, 127, 0),
borderPress = Color(255, 80, 0),
foreground = Color(255, 255, 255),
foregroundHover = Color(255, 127, 0),
foregroundPress = Color(255, 80, 0),
}
local devCvar = GetConVar("developer")
function imgui.IsDeveloperMode()
return not imgui.DisableDeveloperMode and devCvar:GetInt() > 0
end
local _devMode = false -- cached local variable updated once in a while
function imgui.Hook(name, id, callback)
local hookUniqifier = debug.getinfo(4).short_src
hook.Add(name, "IMGUI / " .. id .. " / " .. hookUniqifier, callback)
end
local localPlayer
local gState = {}
local function shouldAcceptInput()
-- don't process input during non-main renderpass
if render.GetRenderTarget() ~= nil then
return false
end
-- don't process input if we're doing VGUI stuff (and not in context menu)
if vgui.CursorVisible() and vgui.GetHoveredPanel() ~= g_ContextMenu then
return false
end
return true
end
imgui.Hook("PreRender", "Input", function()
-- calculate mouse state
if shouldAcceptInput() then
local useBind = input.LookupBinding("+use", true)
local attackBind = input.LookupBinding("+attack", true)
local USE = useBind and input.GetKeyCode(useBind)
local ATTACK = attackBind and input.GetKeyCode(attackBind)
local wasPressing = gState.pressing
gState.pressing = (USE and input.IsButtonDown(USE)) or (ATTACK and input.IsButtonDown(ATTACK))
gState.pressed = not wasPressing and gState.pressing
end
end)
hook.Add("NotifyShouldTransmit", "IMGUI / ClearRenderBounds", function(ent, shouldTransmit)
if shouldTransmit and ent._imguiRBExpansion then
ent._imguiRBExpansion = nil
end
end)
local traceResultTable = {}
local traceQueryTable = { output = traceResultTable, filter = {} }
local function isObstructed(eyePos, hitPos, ignoredEntity)
local q = traceQueryTable
q.start = eyePos
q.endpos = hitPos
q.filter[1] = localPlayer
q.filter[2] = ignoredEntity
local tr = util.TraceLine(q)
if tr.Hit then
return true, tr.Entity
else
return false
end
end
function imgui.Start3D2D(pos, angles, scale, distanceHide, distanceFadeStart)
if not IsValid(localPlayer) then
localPlayer = LocalPlayer()
end
if gState.shutdown == true then
return
end
if gState.rendering == true then
print(
"[IMGUI] Starting a new IMGUI context when previous one is still rendering" ..
"Shutting down rendering pipeline to prevent crashes.."
)
gState.shutdown = true
return false
end
_devMode = imgui.IsDeveloperMode()
local eyePos = localPlayer:EyePos()
local eyePosToPos = pos - eyePos
-- OPTIMIZATION: Test that we are in front of the UI
do
local normal = angles:Up()
local dot = eyePosToPos:Dot(normal)
if _devMode then gState._devDot = dot end
-- since normal is pointing away from surface towards viewer, dot<0 is visible
if dot >= 0 then
return false
end
end
-- OPTIMIZATION: Distance based fade/hide
if distanceHide then
local distance = eyePosToPos:Length()
if distance > distanceHide then
return false
end
if _devMode then
gState._devDist = distance
gState._devHideDist = distanceHide
end
if distanceHide and distanceFadeStart and distance > distanceFadeStart then
local blend = math.min(math.Remap(distance, distanceFadeStart, distanceHide, 1, 0), 1)
render.SetBlend(blend)
surface.SetAlphaMultiplier(blend)
end
end
gState.rendering = true
gState.pos = pos
gState.angles = angles
gState.scale = scale
cam.Start3D2D(pos, angles, scale)
-- calculate mousepos
if not vgui.CursorVisible() or vgui.IsHoveringWorld() then
local tr = localPlayer:GetEyeTrace()
local eyepos = tr.StartPos
local eyenormal
if vgui.CursorVisible() and vgui.IsHoveringWorld() then
eyenormal = gui.ScreenToVector(gui.MousePos())
else
eyenormal = tr.Normal
end
local planeNormal = angles:Up()
local hitPos = util.IntersectRayWithPlane(eyepos, eyenormal, pos, planeNormal)
if hitPos then
local obstructed, obstructer = isObstructed(eyepos, hitPos, gState.entity)
if obstructed then
gState.mx = nil
gState.my = nil
if _devMode then gState._devInputBlocker = "collision " .. obstructer:GetClass() .. "/" .. obstructer:EntIndex() end
else
local diff = pos - hitPos
-- This cool code is from Willox's keypad CalculateCursorPos
local x = diff:Dot(-angles:Forward()) / scale
local y = diff:Dot(-angles:Right()) / scale
gState.mx = x
gState.my = y
end
else
gState.mx = nil
gState.my = nil
if _devMode then gState._devInputBlocker = "not looking at plane" end
end
else
gState.mx = nil
gState.my = nil
if _devMode then gState._devInputBlocker = "not hovering world" end
end
if _devMode then gState._renderStarted = SysTime() end
return true
end
function imgui.Entity3D2D(ent, lpos, lang, scale, ...)
gState.entity = ent
local ret = imgui.Start3D2D(ent:LocalToWorld(lpos), ent:LocalToWorldAngles(lang), scale, ...)
if not ret then
gState.entity = nil
end
return ret
end
local function calculateRenderBounds(x, y, w, h)
local pos = gState.pos
local fwd, right = gState.angles:Forward(), gState.angles:Right()
local scale = gState.scale
local firstCorner, secondCorner =
pos + fwd * x * scale + right * y * scale,
pos + fwd * (x + w) * scale + right * (y + h) * scale
local minrb, maxrb = Vector(math.huge, math.huge, math.huge), Vector(-math.huge, -math.huge, -math.huge)
minrb.x = math.min(minrb.x, firstCorner.x, secondCorner.x)
minrb.y = math.min(minrb.y, firstCorner.y, secondCorner.y)
minrb.z = math.min(minrb.z, firstCorner.z, secondCorner.z)
maxrb.x = math.max(maxrb.x, firstCorner.x, secondCorner.x)
maxrb.y = math.max(maxrb.y, firstCorner.y, secondCorner.y)
maxrb.z = math.max(maxrb.z, firstCorner.z, secondCorner.z)
return minrb, maxrb
end
function imgui.ExpandRenderBoundsFromRect(x, y, w, h)
local ent = gState.entity
if IsValid(ent) then
-- make sure we're not applying same expansion twice
local expansion = ent._imguiRBExpansion
if expansion then
local ex, ey, ew, eh = unpack(expansion)
if ex == x and ey == y and ew == w and eh == h then
return
end
end
local minrb, maxrb = calculateRenderBounds(x, y, w, h)
ent:SetRenderBoundsWS(minrb, maxrb)
if _devMode then
print("[IMGUI] Updated renderbounds of ", ent, " to ", minrb, "x", maxrb)
end
ent._imguiRBExpansion = {x, y, w, h}
else
if _devMode then
print("[IMGUI] Attempted to update renderbounds when entity is not valid!! ", debug.traceback())
end
end
end
local devOffset = Vector(0, 0, 30)
local devColours = {
background = Color(0, 0, 0, 200),
title = Color(78, 205, 196),
mouseHovered = Color(0, 255, 0),
mouseUnhovered = Color(255, 0, 0),
pos = Color(255, 255, 255),
distance = Color(200, 200, 200, 200),
ang = Color(255, 255, 255),
dot = Color(200, 200, 200, 200),
angleToEye = Color(200, 200, 200, 200),
renderTime = Color(255, 255, 255),
renderBounds = Color(0, 0, 255)
}
local function developerText(str, x, y, clr)
draw.SimpleText(
str, "DefaultFixedDropShadow", x, y, clr, TEXT_ALIGN_CENTER, nil
)
end
local function drawDeveloperInfo()
local camAng = localPlayer:EyeAngles()
camAng:RotateAroundAxis(camAng:Right(), 90)
camAng:RotateAroundAxis(camAng:Up(), -90)
cam.IgnoreZ(true)
cam.Start3D2D(gState.pos + devOffset, camAng, 0.15)
local bgCol = devColours["background"]
surface.SetDrawColor(bgCol.r, bgCol.g, bgCol.b, bgCol.a)
surface.DrawRect(-100, 0, 200, 140)
local titleCol = devColours["title"]
developerText("imgui developer", 0, 5, titleCol)
surface.SetDrawColor(titleCol.r, titleCol.g, titleCol.b)
surface.DrawLine(-50, 16, 50, 16)
local mx, my = gState.mx, gState.my
if mx and my then
developerText(
string.format("mouse: hovering %d x %d", mx, my),
0, 20, devColours["mouseHovered"]
)
else
developerText(
string.format("mouse: %s", gState._devInputBlocker or ""),
0, 20, devColours["mouseUnhovered"]
)
end
local pos = gState.pos
developerText(
string.format("pos: %.2f %.2f %.2f", pos.x, pos.y, pos.z),
0, 40, devColours["pos"]
)
developerText(
string.format("distance %.2f / %.2f", gState._devDist or 0, gState._devHideDist or 0),
0, 53, devColours["distance"]
)
local ang = gState.angles
developerText(string.format("ang: %.2f %.2f %.2f", ang.p, ang.y, ang.r), 0, 75, devColours["ang"])
developerText(string.format("dot %d", gState._devDot or 0), 0, 88, devColours["dot"])
local angToEye = (pos - localPlayer:EyePos()):Angle()
angToEye:RotateAroundAxis(ang:Up(), -90)
angToEye:RotateAroundAxis(ang:Right(), 90)
developerText(
string.format("angle to eye (%d,%d,%d)", angToEye.p, angToEye.y, angToEye.r),
0, 100, devColours["angleToEye"]
)
developerText(
string.format("rendertime avg: %.2fms", (gState._devBenchAveraged or 0) * 1000),
0, 120, devColours["renderTime"]
)
cam.End3D2D()
cam.IgnoreZ(false)
local ent = gState.entity
if IsValid(ent) and ent._imguiRBExpansion then
local ex, ey, ew, eh = unpack(ent._imguiRBExpansion)
local minrb, maxrb = calculateRenderBounds(ex, ey, ew, eh)
render.DrawWireframeBox(vector_origin, angle_zero, minrb, maxrb, devColours["renderBounds"])
end
end
function imgui.End3D2D()
if gState then
if _devMode then
local renderTook = SysTime() - gState._renderStarted
gState._devBenchTests = (gState._devBenchTests or 0) + 1
gState._devBenchTaken = (gState._devBenchTaken or 0) + renderTook
if gState._devBenchTests == 100 then
gState._devBenchAveraged = gState._devBenchTaken / 100
gState._devBenchTests = 0
gState._devBenchTaken = 0
end
end
gState.rendering = false
cam.End3D2D()
render.SetBlend(1)
surface.SetAlphaMultiplier(1)
if _devMode then
drawDeveloperInfo()
end
gState.entity = nil
end
end
function imgui.CursorPos()
local mx, my = gState.mx, gState.my
return mx, my
end
function imgui.IsHovering(x, y, w, h)
local mx, my = gState.mx, gState.my
return mx and my and mx >= x and mx <= (x + w) and my >= y and my <= (y + h)
end
function imgui.IsPressing()
return shouldAcceptInput() and gState.pressing
end
function imgui.IsPressed()
return shouldAcceptInput() and gState.pressed
end
-- String->Bool mappings for whether font has been created
local _createdFonts = {}
-- Cached IMGUIFontNamd->GModFontName
local _imguiFontToGmodFont = {}
local EXCLAMATION_BYTE = string.byte("!")
function imgui.xFont(font, defaultSize)
-- special font
if string.byte(font, 1) == EXCLAMATION_BYTE then
local existingGFont = _imguiFontToGmodFont[font]
if existingGFont then
return existingGFont
end
-- Font not cached; parse the font
local name, size = font:match("!([^@]+)@(.+)")
if size then size = tonumber(size) end
if not size and defaultSize then
name = font:match("^!([^@]+)$")
size = defaultSize
end
local fontName = string.format("IMGUI_%s_%d", name, size)
_imguiFontToGmodFont[font] = fontName
if not _createdFonts[fontName] then
surface.CreateFont(fontName, {
font = name,
size = size
})
_createdFonts[fontName] = true
end
return fontName
end
return font
end
function imgui.xButton(x, y, w, h, borderWidth, borderClr, hoverClr, pressColor)
local bw = borderWidth or 1
local bgColor = imgui.IsHovering(x, y, w, h) and imgui.skin.backgroundHover or imgui.skin.background
local borderColor =
((imgui.IsPressing() and imgui.IsHovering(x, y, w, h)) and (pressColor or imgui.skin.borderPress))
or (imgui.IsHovering(x, y, w, h) and (hoverClr or imgui.skin.borderHover))
or (borderClr or imgui.skin.border)
surface.SetDrawColor(bgColor)
surface.DrawRect(x, y, w, h)
if bw > 0 then
surface.SetDrawColor(borderColor)
surface.DrawRect(x, y, w, bw)
surface.DrawRect(x, y + bw, bw, h - bw * 2)
surface.DrawRect(x, y + h-bw, w, bw)
surface.DrawRect(x + w - bw + 1, y, bw, h)
end
return shouldAcceptInput() and imgui.IsHovering(x, y, w, h) and gState.pressed
end
function imgui.xCursor(x, y, w, h)
local fgColor = imgui.IsPressing() and imgui.skin.foregroundPress or imgui.skin.foreground
local mx, my = gState.mx, gState.my
if not mx or not my then return end
if x and w and (mx < x or mx > x + w) then return end
if y and h and (my < y or my > y + h) then return end
local cursorSize = math.ceil(0.3 / gState.scale)
surface.SetDrawColor(fgColor)
surface.DrawLine(mx - cursorSize, my, mx + cursorSize, my)
surface.DrawLine(mx, my - cursorSize, mx, my + cursorSize)
end
function imgui.xTextButton(text, font, x, y, w, h, borderWidth, color, hoverClr, pressColor)
local fgColor =
((imgui.IsPressing() and imgui.IsHovering(x, y, w, h)) and (pressColor or imgui.skin.foregroundPress))
or (imgui.IsHovering(x, y, w, h) and (hoverClr or imgui.skin.foregroundHover))
or (color or imgui.skin.foreground)
local clicked = imgui.xButton(x, y, w, h, borderWidth, color, hoverClr, pressColor)
font = imgui.xFont(font, math.floor(h * 0.618))
draw.SimpleText(text, font, x + w / 2, y + h / 2, fgColor, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
return clicked
end
return imgui

View File

@@ -0,0 +1,483 @@
--[[
| 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/
--]]
do
local COMMAND = {}
COMMAND.arguments = ix.type.text
local lastDispatchCommand = 0
function COMMAND:OnRun(client, message)
if (!client:IsRestricted()) then
local doubleCommand = false
local curTime = CurTime()
local isVoiceCommand = false
-- This could probably be done a bit smarter but I'm sure it'll do.
if (string.Left(string.lower(message), 9) == "/dispatch") then
doubleCommand = true
message = string.Right(message, #message - 10)
elseif (string.Left(string.lower(message), 8) == "dispatch") then
doubleCommand = true
message = string.Right(message, #message - 9)
end
for voiceCommand, _ in pairs(Schema.voices.stored["dispatch"]) do
if (message:lower() == voiceCommand:lower()) then
isVoiceCommand = true
break
end
end
if (!isVoiceCommand) then
if (lastDispatchCommand < curTime) then
lastDispatchCommand = curTime + 5
return "@dispatchTypoWarning"
else
lastDispatchCommand = 0
end
end
if (doubleCommand) then
client:NotifyLocalized("textDoubleCommand", "/dispatch")
end
ix.chat.Send(client, "dispatch", message)
else
return "@notNow"
end
end
ix.command.Add("Dispatch", COMMAND)
end
do
local COMMAND = {}
COMMAND.arguments = ix.type.text
function COMMAND:OnRun(client, message)
if (!client:IsRestricted()) then
local doubleCommand = false
-- This could probably be done a bit smarter but I'm sure it'll do.
if (string.Left(string.lower(message), 10) == "/broadcast") then
doubleCommand = true
message = string.Right(message, #message - 11)
elseif (string.Left(string.lower(message), 9) == "broadcast") then
doubleCommand = true
message = string.Right(message, #message - 10)
end
if (doubleCommand) then
client:NotifyLocalized("textDoubleCommand", "/broadcast")
end
ix.chat.Send(client, "broadcast", message)
else
return "@notNow"
end
end
ix.command.Add("Broadcast", COMMAND)
end
ix.command.Add("Event", {
description = "@cmdEvent",
arguments = ix.type.text,
privilege = "Event",
OnRun = function(self, client, message)
local doubleCommand = false
-- This could probably be done a bit smarter but I'm sure it'll do.
if (string.Left(string.lower(message), 6) == "/event") then
doubleCommand = true
message = string.Right(message, #message - 7)
elseif (string.Left(string.lower(message), 5) == "event") then
doubleCommand = true
message = string.Right(message, #message - 6)
end
if (doubleCommand) then
client:NotifyLocalized("textDoubleCommand", "/Event")
end
ix.chat.Send(client, "event", message)
end
})
do
local COMMAND = {}
function COMMAND:OnRun(client, arguments)
if (!hook.Run("CanPlayerViewObjectives", client)) then
return "@noPerm"
end
netstream.Start(client, "ViewObjectives", Schema.CombineObjectives)
end
ix.command.Add("ViewObjectives", COMMAND)
end
do
ix.command.Add("CharSearch", {
description = "Recherchez le joueur que vous regardez. Cela demandera la permission de le faire s'il n'est pas encore lié.",
OnCheckAccess = function(self, client)
if (client:IsRestricted()) then
return false, "@notNow"
end
return true
end,
OnRun = function(self, client)
local data = {}
data.start = client:GetShootPos()
data.endpos = data.start + client:GetAimVector() * 96
data.filter = client
local target = util.TraceLine(data).Entity
local isRagdoll = false
if (target:IsRagdoll() and target.ixPlayer) then
target = target.ixPlayer
isRagdoll = true
end
if (IsValid(target) and target:IsPlayer()) then
if (target:IsRestricted() or isRagdoll) then
Schema:SearchPlayer(client, target)
elseif (!IsValid(target.ixSearchRequest)) then
-- first search
-- succesful searches or searching other target clears this
if (!client.ixLastSearchRequest or client.ixLastSearchRequest.target != target) then
client.ixLastSearchRequest = {target = target, time = 0, count = 1}
-- second search
elseif (count == 1) then
-- if it was within 15 seconds
if (os.time() < client.ixLastSearchRequest.time) then
client.ixLastSearchRequest.count = 2
end
-- third search
elseif (count == 2) then
-- again within 15 seconds -> deny it
if (os.time() < client.ixLastSearchRequest.time) then
client:NotifyLocalized("Veuillez attendre 15 secondes avant d'envoyer une troisième demande !")
return
end
end
client.ixLastSearchRequest.time = os.time() + 15
client:NotifyLocalized("Demande de recherche envoyée.")
netstream.Start(target, "SearchRequest", client)
target.ixSearchRequest = client
else
return "@notNow"
end
else
return "@plyNotValid"
end
end
})
end
local applyPhrases = {
"%s, CID #%s.",
"Mon nom est %s et mon CID est le #%s.",
"Je suis %s avec le CID #%s.",
"%s. Mon CID est %s."
}
local namePhrases = {
"%s.",
"Je suis %s.",
"My name is %s.",
"Name: %s"
}
ix.command.Add("apply", {
description = "@cmdApply",
OnRun = function(self, client, arguments)
local character = client:GetCharacter()
local cid = character:GetCid()
if (cid) then
ix.chat.Send(client, "ic", string.format(table.Random(applyPhrases), character:GetData("fakeName", client:GetName()), cid))
else
ix.chat.Send(client, "ic", string.format(table.Random(namePhrases), character:GetData("fakeName", client:GetName())))
end
end
})
ix.command.Add("CharFallOver", {
description = "@cmdCharFallOver",
arguments = bit.bor(ix.type.number, ix.type.optional),
OnRun = function(self, client, time)
-- Anti-Exploit measure. Just silently fail if near a door.
for _, entity in ipairs(ents.FindInSphere(client:GetPos(), 50)) do
if (entity:GetClass() == "func_door" or entity:GetClass() == "func_door_rotating" or entity:GetClass() == "prop_door_rotating") then return end
end
if (!client:Alive() or client:GetMoveType() == MOVETYPE_NOCLIP) then
return "@notNow"
end
if (hook.Run("PlayerCanFallOver", client) == false) then
return "@notNow"
end
if (time and time > 0) then
time = math.Clamp(time, 1, 60)
end
if (!IsValid(client.ixRagdoll)) then
client:SetRagdolled(true, time)
end
end
})
ix.command.Add("CharGetUp", {
description = "@cmdCharGetUp",
OnRun = function(self, client, arguments)
-- Anti-Exploit measure. Just silently fail if near a door.
for _, entity in ipairs(ents.FindInSphere(client:GetPos(), 50)) do
if (entity:GetClass() == "func_door" or entity:GetClass() == "func_door_rotating" or entity:GetClass() == "prop_door_rotating") then return end
end
local entity = client.ixRagdoll
if (IsValid(entity) and entity.ixGrace and entity.ixGrace < CurTime() and
entity:GetVelocity():Length2D() < 8 and !entity.ixWakingUp) then
entity.ixWakingUp = true
entity:CallOnRemove("CharGetUp", function()
client:SetAction()
end)
client:SetAction("@gettingUp", 5, function()
if (!IsValid(entity)) then
return
end
-- Anti-Exploit measure. Just silently fail if near a door.
for _, entity in ipairs(ents.FindInSphere(client:GetPos(), 50)) do
if (entity:GetClass() == "func_door" or entity:GetClass() == "func_door_rotating" or entity:GetClass() == "prop_door_rotating") then return end
end
hook.Run("OnCharacterGetup", client, entity)
entity:Remove()
end)
end
end
})
ix.command.Add("ListColors", {
description = "@cmdListColors",
OnRun = function(self, client)
client:SendLua([[for colorName, color in pairs(Schema.colors) do MsgC(color, "██████████ " .. colorName:upper() .. "\n") end]])
return "@ColorsPrinted" -- Bogos Binted
end
})
ix.command.Add("VisorMessage", {
description = "@cmdVisorMessage",
arguments = {
ix.type.string,
bit.bor(ix.type.string, ix.type.optional),
bit.bor(ix.type.bool, ix.type.optional)
},
OnCheckAccess = function(self, client)
local character = client:GetCharacter()
return character and character:GetFaction() == FACTION_OTA and (character:GetClass() == CLASS_ORD or character:GetClass() == CLASS_EOW)
end,
OnRun = function(self, client, visorMessage, messageColor, isImportant)
if (messageColor and Schema.colors[messageColor]) then
messageColor = Schema.colors[messageColor]
else
messageColor = Color(255, 255, 255)
end
local receivers = {}
for _, player in pairs(player.GetAll()) do
if (player:Team() == FACTION_OTA) then
receivers[#receivers + 1] = player
end
end
if (isImportant) then
ix.combineNotify:AddImportantNotification("MSG:// " .. visorMessage, messageColor, nil, nil, receivers)
else
ix.combineNotify:AddNotification("MSG:// " .. visorMessage, messageColor, nil, nil, receivers)
end
end
})
ix.command.Add("PlyNotify", {
description = "@cmdPlyNotify",
adminOnly = true,
arguments = {
ix.type.player,
ix.type.text
},
OnRun = function(self, client, target, notification)
target:Notify(notification)
return "@notificationSent"
end
})
ix.command.Add("WhisperDirect", {
alias = {"WD"},
description = "@cmdWD",
combineBeep = true,
arguments = {
ix.type.string,
ix.type.text
},
OnRun = function(self, client, target, text)
if (target == "@") then
local traceEnt = client:GetEyeTraceNoCursor().Entity
if (traceEnt and traceEnt:IsPlayer()) then
target = traceEnt
end
else
target = ix.util.FindPlayer(target)
end
if (!target or isstring(target)) then
return "@charNoExist"
end
if (target:GetPos():Distance(client:GetPos()) <= ix.config.Get("chatRange", 280) * 0.25) then
ix.chat.Send(client, "wd", text, false, {client, target}, {target = target})
else
return "@targetTooFar"
end
end
})
ix.command.Add("GetCWUFlags", {
description = "@cmdGetCWUFlags",
OnCheckAccess = function(self, client)
return client:Team() == FACTION_WORKERS or client:Team() == FACTION_MEDICAL
end,
OnRun = function(self, client) -- Just going to recycle the tempflags code.
local curTime = CurTime()
local nextCommandUse = client:GetLocalVar("nextCWUFlags", 0)
if (nextCommandUse > curTime) then return "@cwuFlagsCooldown" end
local flags = client:GetLocalVar("tempFlags", {})
local newTime = os.time() + 3600 -- 1 Hour
local character = client:GetCharacter()
local flagsToGive = "pet"
for i = 1, 3 do
local flag = flagsToGive[i]
local info = ix.flag.list[flag]
if (!flags[flag] and character:HasFlags(flag)) then continue end
flags[flag] = newTime
if (info.callback) then
info.callback(client, true)
end
end
client:SetLocalVar("tempFlags", flags)
for _, player in ipairs(player.GetAll()) do
if (player:IsAdmin()) then
player:ChatNotifyLocalized("cwuFlagsGivenAdmins", client:GetName(), client:SteamName())
end
end
client:NotifyLocalized("cwuFlagsGivenPlayer")
client:SetLocalVar("nextCWUFlags", curTime + 3600)
end
})
ix.command.Add("UnStuck", {
description = "@cmdUnstuck",
OnRun = function(self, client)
local curTime = CurTime()
local nextCommandUse = client:GetLocalVar("nextUnstuck", 0)
if (nextCommandUse > curTime) then return "@unstuckCooldown" end
local operators = {"+", "-", "*"}
local unstuckNumberOne = math.random(1, 100)
local unstuckNumberTwo = math.random(1, 100)
local unstuckOperator = operators[math.random(1, 3)]
-- sorry for the spaces
client:RequestString("A utiliser si vous êtes bloqué ou tué par un props. Le TP retourne au spawn et réinitialise les HP. Ne pas abuser.", "Pour continuer, veuillez résoudre le problème mathématique suivant : " .. unstuckNumberOne .. " " .. unstuckOperator .. " " .. unstuckNumberTwo .. " = ? ", function(text)
if (text) then text = tonumber(text) end
if (text and isnumber(text)) then
local answer = 0
if (unstuckOperator == "+") then
answer = unstuckNumberOne + unstuckNumberTwo
elseif (unstuckOperator == "-") then
answer = unstuckNumberOne - unstuckNumberTwo
else
answer = unstuckNumberOne * unstuckNumberTwo
end
if (text == answer) then
client:RequestString("Raison", "Donnez une raison valable. Les staffs la verront.", function(reasontext)
for _, player in ipairs(player.GetAll()) do
if (player:IsAdmin()) then
player:ChatNotifyLocalized("unstuckAdmins", client:GetName(), client:SteamName(), client:GetArea(), reasontext)
ix.log.Add(client, "command"," /UnStuck avec comme raison : "..reasontext)
end
end
client:NotifyLocalized("unstuckPlayer")
client:Spawn()
client:SetLocalVar("nextUnstuck", curTime + 3600)
end, "")
else
client:NotifyLocalized("unstuckAnswerIncorrect")
end
else
client:NotifyLocalized("unstuckAnswerInvalid")
end
end, "")
end
})
ix.command.Add("SetOwnName", {
description = "Set your own character's name, if allowed.",
arguments = ix.type.text,
OnRun = function(self, client, name)
if (client:Team() != FACTION_OTA) then
client:Notify("You are not allowed to set your own name!")
return
end
client:GetCharacter():SetName(name)
client:Notify("You have set your name to " .. name .. ".")
end
})

View File

@@ -0,0 +1,63 @@
--[[
| 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/
--]]
ix.currency.symbol = ""
ix.currency.singular = "jeton"
ix.currency.plural = "jetons"
ix.currency.model = "models/willardnetworks/props/chips3.mdl"
ix.option.Add("ColorModify", ix.type.bool, true, {
category = "Apparence"
})
ix.option.Add("ColorSaturation", ix.type.number, 0, {
category = "Apparence",
min = -3, max = 3, decimals = 2
})
ix.config.SetDefault("scoreboardRecognition", true)
ix.config.SetDefault("music", "willardnetworks/charactercreation/wn_phaneron.mp3")
ix.config.Add("rationInterval", 4, "Combien de temps une personne doit-elle attendre en heures pour obtenir sa prochaine ration", nil, {
data = {min = 1, max = 10, decimals = 1},
category = "Économie"
})
ix.config.Add("defaultCredits", 25, "Montant des crédits dont disposent les citoyens au départ. Les parias ne reçoivent que la moitié de ce montant.", nil, {
data = {min = 1, max = 100},
category = "Économie"
})
ix.config.Add("defaultOutcastChips", 20, "Quantité de crédits avec laquelle les personnages d'Outcast commencent.", nil, {
data = {min = 1, max = 100},
category = "Économie"
})
-- Overwatch Configuration
ix.config.Add("cityIndex", 8, "Les Citoyens de la ville y résident.", nil, {
data = {min = 1, max = 99},
category = "Systèmes Overwatch"
})
ix.config.Add("sectorIndex", 8, "Le secteur dans lequel résident les citoyens.", nil, {
data = {min = 1, max = 30},
category = "Systèmes Overwatch"
})
ix.config.Add("operationIndex", 1, "Indice opérationnel actif.", nil, {
data = {min = 1, max = 5},
category = "Systèmes Overwatch"
})
ix.config.Add("silentConfigs", false, "Si oui ou non, seul le personnel doit être informé des changements de configuration.", nil, {
category = "Serveur"
})

View File

@@ -0,0 +1,150 @@
--[[
| 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/
--]]
local ix = ix
function Schema:RegisterGroups(plugin)
if (SERVER) then
-- Whitelists cannot be given manually, and will be removed upon group update if necessary
ix.xenforo:RegisterRestrictedWhitelist(FACTION_OTA)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_OTAP)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_BIRD)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_SERVERADMIN)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_EVENT)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_VORT)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_ADMIN)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_HEADCRAB)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_CP)
ix.xenforo:RegisterRestrictedWhitelist(FACTION_RESISTANCE)
end
plugin:RegisterForumGroup("OTA", "28", {
whitelists = {[FACTION_OTA] = true},
})
plugin:RegisterForumGroup("OTA", "29", {
whitelists = {[FACTION_OTAP] = true},
})
plugin:RegisterForumGroup("Vortigaunt", "33", {
whitelists = {[FACTION_VORT] = true},
})
plugin:RegisterForumGroup("CCA", "35", {
whitelists = {[FACTION_ADMIN] = true},
})
plugin:RegisterForumGroup("Event", "38", {
whitelists = {[FACTION_EVENT] = true},
})
plugin:RegisterForumGroup("CP", "69", {
whitelists = {[FACTION_CP] = true},
})
plugin:RegisterForumGroup("Rebel", "79", {
whitelists = {[FACTION_RESISTANCE] = true},
})
--[[
NOTE: only the highest priority group gets set as the primary group in SAM.
All other groups still have their permissions applied, but will not show via PLAYER:GetUserGroup()
You can check for all user groups, including inheritence, via PLAYER:CheckGroup()
--]]
local donationFlags = "pet"
local donatorFactions = {[FACTION_BIRD] = true, [FACTION_HEADCRAB] = true, [FACTION_OTAP] = true}
plugin:RegisterForumGroup("Donateur R1", "17", {
camiGroup = "premium1",
flags = donationFlags,
premiumTier = 1,
whitelists = donatorFactions,
})
plugin:RegisterForumGroup("Donateur R2", "23", {
camiGroup = "premium2",
inherits = "premium1",
flags = donationFlags,
premiumTier = 2,
whitelists = donatorFactions,
})
plugin:RegisterForumGroup("Donateur R3", "16", {
camiGroup = "premium3",
inherits = "premium2",
flags = donationFlags,
premiumTier = 3,
whitelists = donatorFactions,
})
plugin:RegisterForumGroup("Developer", "13", {
camiGroup = "developer",
priority = 7,
flags = "petcCrn",
})
local gmFlags = "petrcn"
plugin:RegisterForumGroup("Gamemaster (Inactive)", "41", {
camiGroup = "gamemaster_inactive",
flags = gmFlags,
whitelists = {[FACTION_SERVERADMIN] = true, [FACTION_EVENT] = true},
})
plugin:RegisterForumGroup("Gamemaster (Active)", "gamemaster_active", {
camiGroup = "gamemaster",
priority = 9,
})
plugin:RegisterForumGroup("Mentor (Inactive)", "42", {
camiGroup = "mentor_inactive",
flags = "petcr",
})
plugin:RegisterForumGroup("Mentor (Active)", "mentor_active", {
camiGroup = "mentor",
inherits = "admin",
priority = 15,
})
local adminFactions = {[FACTION_SERVERADMIN] = true, [FACTION_EVENT] = true, [FACTION_HEADCRAB] = true}
local adminFlags = "petcCrna"
plugin:RegisterForumGroup("Trial Admin", "11", {
camiGroup = "trial_admin",
inherits = "admin",
priority = 20,
flags = adminFlags,
whitelists = adminFactions,
})
plugin:RegisterForumGroup("Server Admin", "4", {
camiGroup = "server_admin",
inherits = "trial_admin",
priority = 21,
flags = adminFlags,
whitelists = adminFactions,
})
plugin:RegisterForumGroup("HOSA", "43", {
camiGroup = "head_of_staff",
inherits = "server_admin",
priority = 22,
flags = adminFlags,
whitelists = adminFactions,
})
plugin:RegisterForumGroup("Head Of Staff", "29", {
camiGroup = "head_of_staff",
inherits = "server_admin",
priority = 23,
flags = adminFlags,
whitelists = adminFactions,
})
plugin:RegisterForumGroup("Server Council", "74", {
camiGroup = "server_council",
inherits = "head_of_staff",
priority = 24,
flags = adminFlags,
whitelists = adminFactions,
})
plugin:RegisterForumGroup("Willard Management", "10", {
camiGroup = "willard_management",
inherits = "server_council",
priority = 25,
flags = adminFlags,
whitelists = adminFactions,
})
end

View File

@@ -0,0 +1,126 @@
--[[
| 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 Schema:CanPlayerUseBusiness(client, uniqueID)
if (client:Team() == FACTION_CITIZEN or client:Team() == FACTION_WORKERS) then
local itemTable = ix.item.list[uniqueID]
if (itemTable) then
if (itemTable.permit) then
local character = client:GetCharacter()
local inventory = character:GetInventory()
if (!inventory:HasItem("permit_"..itemTable.permit)) then
return false
end
elseif (itemTable.base ~= "base_permit") then
return false
end
end
end
end
function Schema:CanPlayerViewObjectives(client)
return client:HasActiveCombineSuit() or client:IsDispatch()
end
function Schema:CanPlayerEditObjectives(client)
if (!client:HasActiveCombineSuit() and !client:IsDispatch()) then
return false
end
return client:IsCombineRankAbove("OfC")
end
function Schema:CanDrive()
return false
end
function Schema:SetupAreaProperties()
ix.area.AddProperty("combineText", ix.type.string, "")
ix.area.AddProperty("dispatchsound", ix.type.string, "")
end
function Schema:InitializedChatClasses()
ix.chat.Register("ic", {
format = " \"%s\"",
icon = "willardnetworks/chat/message_icon.png",
indicator = "chatTalking",
GetColor = function(self, speaker, text)
-- If you are looking at the speaker, make it greener to easier identify who is talking.
if (LocalPlayer():GetEyeTrace().Entity == speaker) then
return ix.config.Get("chatListenColor")
end
-- Otherwise, use the normal text color.
return color_white
end,
GetICChatAlpha = function(self, speaker)
-- alpha based on spkr distance
local minAlpha = 55
local maxAlpha = 255
if (!speaker or !speaker.GetPos or !LocalPlayer().GetPos) then
return maxAlpha
end
local maxDistSqr = ix.config.Get("chatRange", 280)
maxDistSqr = maxDistSqr * maxDistSqr
local spkrPos = speaker:GetPos()
if (!spkrPos or !isvector(spkrPos) or !spkrPos.DistToSqr) then
return maxAlpha
end
local distToSpkrSqr = spkrPos:DistToSqr(LocalPlayer():GetPos())
if (!distToSpkrSqr or !isnumber(distToSpkrSqr)) then
return maxAlpha
end
-- normalizing
local normal = (distToSpkrSqr - 1) * (maxAlpha - minAlpha) / (maxDistSqr - 1)
return math.Clamp(math.ceil(maxAlpha - normal), minAlpha, maxAlpha)
end,
OnChatAdd = function(self, speaker, text, anonymous, info)
local chatTextColor = self:GetColor(speaker, text, info)
local chatTextAlpha = 255
local name = anonymous and
L"someone" or hook.Run("GetCharacterName", speaker, "ic") or
(IsValid(speaker) and speaker:Name() or "Console")
local translated = L2("icWNFormat", text)
local bToYou = speaker and IsValid(speaker) and speaker:GetEyeTraceNoCursor().Entity == LocalPlayer()
local oldFont = self.font
local font = hook.Run("GetSpeakerFont", speaker)
self.font = font
if (speaker ~= LocalPlayer()) then
-- no reason to do this on the local player. comes out to 255 anyways (cuz my code is so good. SKILLZ)
chatTextAlpha = self:GetICChatAlpha(speaker) or 255
end
if self.icon and ix.option.Get("standardIconsEnabled") then
chat.AddText(ix.util.GetMaterial(self.icon), Color(255, 254, 153, chatTextAlpha), name, " dit", bToYou and " (à vous)" or "", ColorAlpha(chatTextColor, chatTextAlpha), translated or string.format(self.format, text))
else
chat.AddText(Color(255, 254, 153, chatTextAlpha), name, " dit", bToYou and " (à vous)" or "", ColorAlpha(chatTextColor, chatTextAlpha), translated or string.format(self.format, text), Color(255, 254, 153, 255), "")
end
self.font = oldFont
end,
CanHear = ix.config.Get("chatRange", 280)
})
end
function Schema:InitializedPlugins()
if (ix.plugin.list.inventoryslosts and FACTION_OVERWATCH) then
ix.plugin.list.inventoryslots.noEquipFactions[FACTION_OVERWATCH] = true
end
end

View File

@@ -0,0 +1,456 @@
--[[
| 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/
--]]
Schema.name = "HL2 RP"
Schema.author = "willard.network"
Schema.description = "Experience a next-level Half-Life 2 Roleplay experience. Taking inspiration from games such as Divinity Original Sin and Xcom 2. Featuring a completely overhauled combat system, gameplay and UI."
ix.util.Include("sh_configs.lua")
ix.util.Include("sh_commands.lua")
ix.util.Include("cl_schema.lua")
ix.util.Include("cl_hooks.lua")
ix.util.Include("sh_groups.lua")
ix.util.Include("sh_hooks.lua")
ix.util.Include("sh_voices.lua")
ix.util.Include("sh_voices_ota.lua")
ix.util.Include("sv_schema.lua")
ix.util.Include("sv_hooks.lua")
ix.util.Include("libs/thirdparty/cl_imgui.lua")
ix.util.Include("libs/thirdparty/cl_3d2dvgui.lua")
ix.anim.SetModelClass("models/willardnetworks/combine/ordinal.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/soldier.mdl", "overwatch")
ix.anim.SetModelClass("models/willardnetworks/combine/soldier.mdl", "overwatch")
ix.anim.SetModelClass("models/willardnetworks/combine/suppressor.mdl", "overwatch")
ix.anim.SetModelClass("models/willardnetworks/combine/charger.mdl", "overwatch")
ix.anim.SetModelClass("models/echoone/hla/ordinal/eoordinal.mdl", "overwatch")
ix.anim.SetModelClass("models/nemez/combine_soldiers/combine_soldier_elite_wpu_h.mdl", "overwatch")
ix.anim.SetModelClass("models/nemez/combine_soldiers/combine_soldier_h.mdl", "overwatch")
ix.anim.SetModelClass("models/nemez/combine_soldiers/combine_soldier_recon_h.mdl", "overwatch")
-- CP models
for i = 1, 9 do
ix.anim.SetModelClass("models/wn7new/metropolice/male_0"..i..".mdl", "metrocop")
end
for i = 1, 7 do
ix.anim.SetModelClass("models/wn7new/metropolice/female_0"..i..".mdl", "metrocop_female")
end
-- Combine 2.0 pack
ix.anim.SetModelClass("models/hlvr/characters/hazmat_worker/npc/wneo_hazmat_worker.mdl", "citizen_male")
ix.anim.SetModelClass("models/willardnetworks/combine/antibody.mdl", "citizen_male")
ix.anim.SetModelClass("models/wn/ordinal.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/ota_commander.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/ota_elite.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/ota_elite_summit.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/ota_shotgunner.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/ota_skylegion.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/ota_soldier.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/soldier.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/suppressor.mdl", "overwatch")
ix.anim.SetModelClass("models/wn/wallhammer.mdl", "overwatch")
-- jQueary Half-Life: Alyx Combine Soldiers
ix.anim.SetModelClass("models/jq/hlvr/characters/combine/combine_captain/combine_captain_hlvr_ragdoll.mdl", "overwatch")
ix.anim.SetModelClass("models/jq/hlvr/characters/combine/grunt/combine_grunt_hlvr_ragdoll.mdl", "overwatch")
ix.anim.SetModelClass("models/jq/hlvr/characters/combine/heavy/combine_heavy_hlvr_ragdoll.mdl", "overwatch")
ix.anim.SetModelClass("models/jq/hlvr/characters/combine/suppressor/combine_suppressor_hlvr_ragdoll.mdl", "overwatch")
ix.anim.SetModelClass("models/theparrygod/transition_shotgunner.mdl", "overwatch")
if (SERVER) then
resource.AddWorkshop("2447774443") -- STORMFOX
resource.AddWorkshop("2350858257") -- eProtect
resource.AddWorkshop("2875205147") -- Willard Sound Pack
resource.AddWorkshop("2473879362") -- Willard 2.0 Combine Pack
resource.AddWorkshop("2447979470") -- STORMFOX CONTENT
resource.AddWorkshop("2206993805") -- SLIB
resource.AddWorkshop("2920298301") -- Willard Networks V2 Models
resource.AddWorkshop("2066864990") -- WN CONTENT PACK
resource.AddWorkshop("2131057232") -- ArcCW BASE
resource.AddWorkshop("2847969071") -- ArcCW Junk
resource.AddWorkshop("2844521758") -- ArcCW Overwatch Weapons
resource.AddWorkshop("2849833628") -- ArcCW Unusual
resource.AddWorkshop("2043900984") -- Infestation Control props
resource.AddWorkshop("2230543274") -- Precision Tool
resource.AddWorkshop("264467687") -- Sky's HL2RP
resource.AddWorkshop("1907060869") -- Image Tool
resource.AddWorkshop("104603291") -- Extended Spawnmenu
resource.AddWorkshop("2911725032") -- Enhanced Ammunition
resource.AddWorkshop("3052473609") -- Map & Content I13
resource.AddWorkshop("493751477") -- Advanced Light Entites
resource.AddWorkshop("104619813") -- Half Life 2 Tools
resource.AddWorkshop("105565372") -- Half Life 2 Extra
resource.AddWorkshop("104607712") -- Extended Properties
resource.AddWorkshop("104604709") -- Easy Animation Tool
resource.AddWorkshop("116892991") -- Resizer
resource.AddWorkshop("108024198") -- Food and household
resource.AddWorkshop("2225220690") -- Xen Foam Pack
resource.AddWorkshop("2228994615") -- Xen Pack
resource.AddWorkshop("1551310214") -- Placeable Particle Effects
resource.AddWorkshop("2213193621") -- NPC Tools 2
resource.AddWorkshop("399012711") -- Matrix SFX
resource.AddWorkshop("950845673") -- Pills Pack
resource.AddWorkshop("417428923") -- Episodic Pills Pack
resource.AddWorkshop("225481532") -- Special Effect
resource.AddWorkshop("2052642961") -- SNPC Particles Effect
resource.AddWorkshop("131759821") -- VJ BASE
resource.AddWorkshop("2754008911") -- Glossy Foliage
resource.AddWorkshop("1158858580") -- Fallout
resource.AddWorkshop("3003703539") -- WN Content - French 1 G
resource.AddWorkshop("2870384635") -- The Ultra xen
resource.AddWorkshop("522292706") -- Schnitzel's COMPLETE Office Prop Pack
end
Schema.colors = {
["aliceblue"] = Color(240, 248, 255),
["antiquewhite"] = Color(250, 235, 215),
["aqua"] = Color(0, 255, 255),
["aquamarine"] = Color(127, 255, 212),
["azure"] = Color(240, 255, 255),
["beige"] = Color(245, 245, 220),
["bisque"] = Color(255, 228, 196),
["black"] = Color(0, 0, 0),
["blanchedalmond"] = Color(255, 235, 205),
["blue"] = Color(0, 100, 255),
["blueviolet"] = Color(138, 43, 226),
["brown"] = Color(165, 42, 42),
["burlywood"] = Color(222, 184, 135),
["cadetblue"] = Color(95, 158, 160),
["chartreuse"] = Color(127, 255, 0),
["chocolate"] = Color(210, 105, 30),
["coral"] = Color(255, 127, 80),
["cornflowerblue"] = Color(100, 149, 237),
["cornsilk"] = Color(255, 248, 220),
["crimson"] = Color(220, 20, 60),
["cyan"] = Color(0, 255, 255),
["darkblue"] = Color(0, 0, 139),
["darkcyan"] = Color(0, 139, 139),
["darkgoldenrod"] = Color(184, 134, 11),
["darkgray"] = Color(169, 169, 169),
["darkgreen"] = Color(0, 100, 0),
["darkgrey"] = Color(169, 169, 169),
["darkkhaki"] = Color(189, 183, 107),
["darkmagenta"] = Color(139, 0, 139),
["darkolivegreen"] = Color(85, 107, 47),
["darkorange"] = Color(255, 140, 0),
["darkorchid"] = Color(153, 50, 204),
["darkred"] = Color(139, 0, 0),
["darksalmon"] = Color(233, 150, 122),
["darkseagreen"] = Color(143, 188, 143),
["darkslateblue"] = Color(72, 61, 139),
["darkslategray"] = Color(47, 79, 79),
["darkslategrey"] = Color(47, 79, 79),
["darkturquoise"] = Color(0, 206, 209),
["darkviolet"] = Color(148, 0, 211),
["deeppink"] = Color(255, 20, 147),
["deepskyblue"] = Color(0, 191, 255),
["dimgray"] = Color(105, 105, 105),
["dimgrey"] = Color(105, 105, 105),
["dodgerblue"] = Color(30, 144, 255),
["firebrick"] = Color(178, 34, 34),
["floralwhite"] = Color(255, 250, 240),
["forestgreen"] = Color(34, 139, 34),
["fuchsia"] = Color(255, 0, 255),
["gainsboro"] = Color(220, 220, 220),
["ghostwhite"] = Color(248, 248, 255),
["gold"] = Color(255, 215, 0),
["goldenrod"] = Color(218, 165, 32),
["gray"] = Color(81, 81, 81),
["green"] = Color(38, 106, 46),
["greenyellow"] = Color(173, 255, 47),
["grey"] = Color(81, 81, 81),
["honeydew"] = Color(240, 255, 240),
["hotpink"] = Color(255, 105, 180),
["indianred"] = Color(205, 92, 92),
["indigo"] = Color(75, 0, 130),
["ivory"] = Color(255, 255, 240),
["khaki"] = Color(240, 230, 140),
["lavender"] = Color(230, 230, 250),
["lavenderblush"] = Color(255, 240, 245),
["lawngreen"] = Color(124, 252, 0),
["lemonchiffon"] = Color(255, 250, 205),
["lightblue"] = Color(173, 216, 230),
["lightcoral"] = Color(240, 128, 128),
["lightcyan"] = Color(224, 255, 255),
["lightgoldenrodyellow"] = Color(250, 250, 210),
["lightgray"] = Color(211, 211, 211),
["lightgreen"] = Color(144, 238, 144),
["lightgrey"] = Color(211, 211, 211),
["lightpink"] = Color(255, 182, 193),
["lightsalmon"] = Color(255, 160, 122),
["lightseagreen"] = Color(32, 178, 170),
["lightskyblue"] = Color(135, 206, 250),
["lightslategray"] = Color(119, 136, 153),
["lightslategrey"] = Color(119, 136, 153),
["lightsteelblue"] = Color(176, 196, 222),
["lightyellow"] = Color(255, 255, 224),
["lime"] = Color(0, 255, 0),
["limegreen"] = Color(50, 205, 50),
["linen"] = Color(250, 240, 230),
["magenta"] = Color(255, 0, 255),
["maroon"] = Color(103, 0, 42),
["mediumaquamarine"] = Color(102, 205, 170),
["mediumblue"] = Color(0, 0, 205),
["mediumorchid"] = Color(186, 85, 211),
["mediumpurple"] = Color(147, 112, 219),
["mediumseagreen"] = Color(60, 179, 113),
["mediumslateblue"] = Color(123, 104, 238),
["mediumspringgreen"] = Color(0, 250, 154),
["mediumturquoise"] = Color(72, 209, 204),
["mediumvioletred"] = Color(199, 21, 133),
["midnightblue"] = Color(25, 25, 112),
["mintcream"] = Color(245, 255, 250),
["mistyrose"] = Color(255, 228, 225),
["moccasin"] = Color(255, 228, 181),
["navajowhite"] = Color(255, 222, 173),
["navy"] = Color(0, 0, 128),
["oldlace"] = Color(253, 245, 230),
["olive"] = Color(128, 128, 0),
["olivedrab"] = Color(107, 142, 35),
["orange"] = Color(255, 122, 0),
["orangered"] = Color(255, 69, 0),
["orchid"] = Color(218, 112, 214),
["palegoldenrod"] = Color(238, 232, 170),
["palegreen"] = Color(152, 251, 152),
["paleturquoise"] = Color(175, 238, 238),
["palevioletred"] = Color(219, 112, 147),
["papayawhip"] = Color(255, 239, 213),
["peachpuff"] = Color(255, 218, 185),
["peru"] = Color(205, 133, 63),
["pink"] = Color(255, 192, 203),
["plum"] = Color(221, 160, 221),
["powderblue"] = Color(176, 224, 230),
["purple"] = Color(102, 51, 153),
["rebeccapurple"] = Color(102, 51, 153),
["red"] = Color(255, 0, 0),
["rosybrown"] = Color(188, 143, 143),
["royalblue"] = Color(65, 105, 225),
["saddlebrown"] = Color(139, 69, 19),
["salmon"] = Color(250, 128, 114),
["sandybrown"] = Color(244, 164, 96),
["seagreen"] = Color(46, 139, 87),
["seashell"] = Color(255, 245, 238),
["sienna"] = Color(160, 82, 45),
["silver"] = Color(192, 192, 192),
["skyblue"] = Color(135, 206, 235),
["slateblue"] = Color(106, 90, 205),
["slategray"] = Color(112, 128, 144),
["slategrey"] = Color(112, 128, 144),
["snow"] = Color(255, 250, 250),
["springgreen"] = Color(0, 255, 127),
["steelblue"] = Color(70, 130, 180),
["tan"] = Color(210, 180, 140),
["teal"] = Color(0, 128, 128),
["thistle"] = Color(216, 191, 216),
["tomato"] = Color(255, 99, 71),
["turquoise"] = Color(64, 224, 208),
["violet"] = Color(238, 130, 238),
["wheat"] = Color(245, 222, 179),
["white"] = Color(255, 255, 255),
["whitesmoke"] = Color(245, 245, 245),
["yellow"] = Color(255, 255, 0),
["yellowgreen"] = Color(154, 205, 50),
}
if (CLIENT) then
CHAT_RECOGNIZED = CHAT_RECOGNIZED or {}
CHAT_RECOGNIZED["wd"] = true
end
function Schema:ZeroNumber(number, length)
number = tostring(number)
local amount = math.max(0, length - string.len(number))
return string.rep("0", amount)..number
end
function Schema:IsCombineRank(text, rank)
return string.find(text, "[%D+]"..rank.."[%D+]")
end
do
local CLASS = {}
CLASS.color = Color(254, 39, 39)
CLASS.format = "[Haut-Parleurs] %s"
function CLASS:CanSay(speaker, text)
if (speaker:IsWorld()) then return true end
if (!speaker:IsDispatch() and speaker:Team() != FACTION_SERVERADMIN) then
speaker:NotifyLocalized("notAllowed")
return false
end
end
local dispatchIcon = ix.util.GetMaterial("willardnetworks/chat/dispatch_icon.png")
function CLASS:OnChatAdd(speaker, text)
local oldFont = self.font
local font = hook.Run("GetSpeakerFont", speaker)
self.font = font
if ix.option.Get("standardIconsEnabled") then
chat.AddText(dispatchIcon, self.color, string.format(self.format, text))
else
chat.AddText(self.color, string.format(self.format, text))
end
self.font = oldFont
end
ix.chat.Register("dispatch", CLASS)
ix.chat.Register("worlddispatch", CLASS)
end
do
local CLASS = {}
CLASS.color = Color(175, 125, 100)
CLASS.format = "%s demande \"%s\""
function CLASS:CanHear(speaker, listener)
if (ix.chat.classes.request:CanHear(speaker, listener)) then
return false
end
local chatRange = ix.config.Get("chatRange", 280)
return (speaker:Team() == FACTION_CITIZEN and listener:Team() == FACTION_CITIZEN)
and (speaker:GetPos() - listener:GetPos()):LengthSqr() <= (chatRange * chatRange)
end
function CLASS:OnChatAdd(speaker, text)
chat.AddText(self.color, string.format(self.format, speaker:Name(), text))
end
ix.chat.Register("request_eavesdrop", CLASS)
end
do
local CLASS = {}
CLASS.color = Color(151, 161, 255)
CLASS.format = "%s diffuse \"%s\""
function CLASS:CanSay(speaker, text)
if (speaker and speaker:Team() != FACTION_ADMIN and !speaker:GetCharacter():GetInventory():HasItem("broadcasting_device") and !speaker:GetNetVar("broadcastAuth", false)) then
speaker:NotifyLocalized("notAllowed")
return false
end
end
local broadcastIcon = ix.util.GetMaterial("willardnetworks/chat/broadcast_icon.png")
function CLASS:OnChatAdd(speaker, text, anonymous, data)
if (ix.option.Get("standardIconsEnabled")) then
chat.AddText(broadcastIcon, self.color, string.format(self.format, (speaker and speaker.Name and speaker:Name() or data and data.speakerName and data.speakerName or ""), text))
else
chat.AddText(self.color, string.format(self.format, (speaker and speaker.Name and speaker:Name() or data and data.speakerName and data.speakerName or ""), text))
end
end
ix.chat.Register("broadcast", CLASS)
end
ix.chat.Register("wd", {
format = "%s chuchote à %s \"%s\"",
icon = "willardnetworks/chat/whisper_icon.png",
color = Color(158, 162, 191, 255),
OnChatAdd = function(self, speaker, text, bAnonymous, data)
local name = bAnonymous and L"someone" or hook.Run("GetCharacterName", speaker, chatType) or (IsValid(speaker) and speaker:Name() or "Console")
local targetName = bAnonymous and L"someone" or hook.Run("GetCharacterName", data.target, chatType) or (IsValid(data.target) and data.target:Name() or "Console")
local oldFont = self.font
local font = hook.Run("GetSpeakerFont", speaker)
self.font = font
if (ix.option.Get("standardIconsEnabled")) then
chat.AddText(ix.util.GetMaterial(self.icon), self.color, string.format(self.format, name, targetName, text))
else
chat.AddText(self.color, string.format(self.format, name, targetName, text))
end
self.font = oldFont
end,
prefix = {"/W", "/Whisper"},
description = "@cmdW",
indicator = "chatWhispering"
})
function Schema:IsVowel(letter)
letter = string.utf8lower(letter);
return (letter == "a" or letter == "e" or letter == "i"
or letter == "o" or letter == "u");
end
function Schema:FirstToUpper(str)
return (str:gsub("^%l", string.upper))
end
function Schema:Pluralize(text)
if (string.utf8sub(text, -2) != "fe") then
local lastLetter = string.utf8sub(text, -1)
if (lastLetter == "y") then
if (self:IsVowel(string.utf8sub(text, string.utf8len(text) - 1, 2))) then
return string.utf8sub(text, 1, -2).."ies"
else
return text.."s"
end
elseif (lastLetter == "h") then
return text.."es"
elseif (lastLetter != "s") then
return text.."s"
else
return text
end
else
return string.utf8sub(text, 1, -3).."ves"
end
end
-- A function to shuffle text but still maintain a sort of "readability" xD
function Schema:ShuffleText(shuffleText)
if !isstring(shuffleText) then
return false
end
local shuffleTable = {}
local n = 0
shuffleText:gsub("%a", function(c)
if shuffleTable[c] == nil then
n = n + 1
shuffleTable[n] = c
shuffleTable[c] = n
end
end)
for i = n, 2, -1 do
local j = math.random(i)
shuffleTable[i], shuffleTable[j] = shuffleTable[j] -- , shuffleTable[i] (adding this will cause it to shuffle completely)
end
local shuffledText = shuffleText:gsub("%a", function (c) return shuffleTable[shuffleTable[c]] end)
return shuffledText
end
ix.flag.Add("U", "Accès à certaines commandes Combine.")
ix.flag.Add("M", "Accès à modifié des cartes et des vérous combine")
ix.flag.Add("F", "Accès pour utiliser ou modifier la technologie Combine")
ix.flag.Add("J", "Accès à l'ordinateur.")
ix.flag.Add("B", "Accès au marché noir")
ix.flag.Add("K", "Accès à Blacker Market comprend pas mdrrrr")

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,629 @@
--[[
| 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/
--]]
local locks = {"ix_combinelock", "ix_combinelock_cwu", "ix_combinelock_cmru", "ix_combinelock_dob", "ix_combinelock_moe"}
function Schema:RegisterSaveEnts()
ix.saveEnts:RegisterEntity("ix_rationdispenser", true, true, true, {
OnSave = function(entity, data) --OnSave
data.enabled = entity:GetEnabled()
data.motion = false
end,
OnRestore = function(entity, data) --OnRestore
entity:SetEnabled(data.enabled)
end,
})
for k, v in ipairs(locks) do
ix.saveEnts:RegisterEntity(v, true, true, true, {
OnSave = function(entity, data) --OnSave
data.id = entity.door:MapCreationID()
data.localpos = entity.door:WorldToLocal(entity:GetPos())
data.localangs = entity.door:WorldToLocalAngles(entity:GetAngles())
data.locked = entity:GetLocked()
data.accessLvl = entity.accessLevel
end,
OnRestore = function(entity, data) --OnRestore
local door = ents.GetMapCreatedEntity(data.id)
entity:SetDoor(door, door:LocalToWorld(data.localpos), door:LocalToWorldAngles(data.localangs))
entity:SetLocked(data.locked)
entity.accessLevel = data.accessLvl
end,
ShouldSave = function(entity) --ShouldSave
return IsValid(entity.door)
end,
ShouldRestore = function(data) --ShouldRestore
local door = ents.GetMapCreatedEntity(data.id)
return IsValid(door) and door:IsDoor()
end
})
end
ix.saveEnts:RegisterEntity("ix_forcefield", true, true, true, {
OnSave = function(entity, data) --OnSave
data.mode = entity:GetMode()
end,
OnRestore = function(entity, data) --OnRestore
entity:SetMode(data.mode)
if (data.mode == 1) then
entity:SetSkin(3)
entity.dummy:SetSkin(3)
else
local entTable = scripted_ents.Get("ix_forcefield")
local skin = entTable.MODES
entity:SetSkin(skin[data.mode][4])
entity.dummy:SetSkin(skin[data.mode][4])
end
end,
})
ix.saveEnts:RegisterEntity("ix_rebelfield", true, true, true, {
OnSave = function(entity, data) --OnSave
data.mode = entity:GetMode()
end,
OnRestore = function(entity, data) --OnRestore
entity:SetMode(data.mode)
if (data.mode == 1) then
entity:SetSkin(3)
entity.dummy:SetSkin(3)
else
local entTable = scripted_ents.Get("ix_rebelfield")
local skin = entTable.MODES
entity:SetSkin(skin[data.mode][4])
entity.dummy:SetSkin(skin[data.mode][4])
end
end,
})
end
function Schema:LoadData()
Schema.CombineObjectives = ix.data.Get("combineObjectives", {}, false, true)
if (!ix.config.Get("SaveEntsOldLoadingEnabled")) then return end
self:LoadRationDispensers()
self:LoadCombineLocks()
self:LoadForceFields()
end
function Schema:SaveData()
self:SaveRationDispensers()
self:SaveCombineLocks()
self:SaveForceFields()
self:SaveRebelForceFields()
end
function Schema:PlayerSwitchFlashlight(client, enabled)
return true
end
function Schema:CanPlayerOpenCombineLock(client, entity)
if (client:HasActiveCombineSuit() or ix.faction.Get(client:Team()).allowCombineLock) then
return true
end
if (client:GetCharacter():GetInventory():HasItem("combine_card")) then
return true
end
return false
end
function Schema:PlayerUse(client, entity)
local weapon = client:GetActiveWeapon()
if (weapon and IsValid(weapon) and weapon:GetClass() == "weapon_physgun") then return false end
if (!client:IsRestricted() and entity:IsDoor() and IsValid(entity.ixLock) and client:KeyDown(IN_SPEED)) then
if (self:CanPlayerOpenCombineLock(client, entity)) then
entity.ixLock:Toggle(client)
return false
else
local class = entity.ixLock:GetClass()
if (class == "ix_grouplock" or class == "ix_combinelock_cwu" or class == "ix_combinelock_dob" or class == "ix_combinelock_cmru" or class == "ix_combinelock_moe") then
entity.ixLock:Toggle(client)
return false
end
end
end
local ragdoll = nil
if (entity:IsRagdoll() and entity.ixPlayer) then
ragdoll = entity
entity = entity.ixPlayer
end
end
function Schema:PlayerUseDoor(client, door)
if (!door:HasSpawnFlags(256) and !door:HasSpawnFlags(1024)) then
if (client:HasActiveCombineSuit() or ix.faction.Get(client:Team()).allowCombineDoors) then
door:Fire("open")
end
end
end
function Schema:PostPlayerLoadout(client)
local factionTable = ix.faction.Get(client:Team())
if (factionTable.OnNameChanged) then
factionTable:OnNameChanged(client, "", client:GetCharacter():GetName())
end
if (factionTable.maxHealth) then
client:SetMaxHealth(factionTable.maxHealth)
client:SetHealth(factionTable.maxHealth)
end
local character = client:GetCharacter()
if (character) then
client:SetRestricted(character:GetData("tied", false))
end
end
function Schema:PrePlayerLoadedCharacter(client, character, oldCharacter)
if (oldCharacter) then
oldCharacter:SetData("tied", client:IsRestricted())
end
end
function Schema:PlayerLoadedCharacter(client, character, oldCharacter)
if (client:IsDispatch()) then
ix.combineNotify:AddNotification("LOG:// Décryptage de la connexion du noeud entrant de 144.76.222.66")
timer.Simple(1, function()
ix.combineNotify:AddNotification("NTC:// Envoi en ligne du noeud d'intelligence artificielle", Color(255, 255, 0, 255))
end)
elseif (oldCharacter and oldCharacter:GetFaction() == FACTION_OVERWATCH) then
ix.combineNotify:AddNotification("NTC:// Envoi du noeud d'intelligence artificielle hors ligne", Color(255, 255, 0, 255))
elseif (client:IsCombine() or (oldCharacter and oldCharacter:IsCombine())) then
ix.combineNotify:AddNotification("LOG:// Reconstruction du manifeste Overwatch", Color(50, 100, 175))
end
end
function Schema:PlayerDisconnected(client)
if (client:GetCharacter()) then
client:GetCharacter():SetData("tied", client:IsRestricted())
end
if (client:IsDispatch()) then
ix.combineNotify:AddNotification("NTC:// Envoi du noeud d'intelligence artificielle hors ligne", Color(255, 255, 0, 255))
elseif (client:IsCombine()) then
ix.combineNotify:AddNotification("LOG:// Reconstruction du manifeste Overwatch", Color(50, 100, 175))
end
end
function Schema:CharacterVarChanged(character, key, oldValue, value)
local client = character:GetPlayer()
if (key == "name") then
local factionTable = ix.faction.Get(client:Team())
if (factionTable.OnNameChanged) then
factionTable:OnNameChanged(client, oldValue, value)
end
end
end
function Schema:PlayerFootstep(client, position, foot, soundName, volume)
local factionTable = ix.faction.Get(client:Team())
if (factionTable and factionTable.runSounds and client:IsRunning()) then
client:EmitSound(factionTable.runSounds[foot])
return true
end
client:EmitSound(soundName)
return true
end
local digitToSound = {
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine"
}
function Schema:PlayerDeath(client, inflicter, attacker)
if (client:HasActiveTracker() or client:IsCombineScanner()) then
if (ix.config.Get("suitsNoConnection")) then return end
local suit = ix.item.instances[client:GetCharacter():GetCombineSuit()]
ix.combineNotify:AddNotification("NTC:// Téléchargement du biosignal perdu")
ix.combineNotify:AddImportantNotification("WRN:// Perte du biosignal de l'unité " .. client:GetCombineTag(), nil, client, client:GetPos())
local start = "npc/overwatch/radiovoice/die"..math.random(1, 3)..".wav"
if (suit.isOTA) then
start = "npc/combine_soldier/die"..math.random(1, 3)..".wav"
end
local on = "npc/overwatch/radiovoice/on1.wav"
local onRand = math.random(1, 2)
if (onRand == 2) then
on = "npc/overwatch/radiovoice/on3.wav"
end
local sounds = {start, on}
local tag = client:GetCombineTag()
local name = {}
if (string.find(tag,"^%w+%-%d$")) then
local parts = string.Explode("-", tag, false)
if (Schema.voices.stored["dispatch radio"][string.lower(parts[1])]) then
name[1] = Schema.voices.stored["dispatch radio"][string.lower(parts[1])].sound
end
if (Schema.voices.stored["dispatch radio"][digitToSound[tonumber(parts[2])]]) then
name[2] = Schema.voices.stored["dispatch radio"][digitToSound[tonumber(parts[2])]].sound
end
end
local areaSounds = {}
if (client:IsInArea()) then
local area = client:GetArea()
if (area and ix.area.stored[area].properties.dispatchsound) then
for _, v in pairs(string.Explode(";", ix.area.stored[area].properties.dispatchsound)) do
areaSounds[#areaSounds + 1] = Schema.voices.stored["dispatch radio"][string.lower(v)].sound
end
end
end
local rand = math.random(1, table.Count(areaSounds) > 0 and 3 or 2)
if (rand == 1) then
sounds[#sounds + 1] = "npc/overwatch/radiovoice/lostbiosignalforunit.wav"
if (table.Count(name) == 2) then
table.Add(sounds, name)
end
elseif (rand == 2) then
if (table.Count(name) == 2) then
table.Add(sounds, name)
end
sounds[#sounds + 1] = "npc/overwatch/radiovoice/unitdeserviced.wav"
elseif (rand == 3) then
if (table.Count(name) == 2) then
table.Add(sounds, name)
end
sounds[#sounds + 1] = "npc/overwatch/radiovoice/unitdownat.wav"
end
if (table.Count(areaSounds) > 0) then
table.Add(sounds, areaSounds)
end
local chance = math.random(1, 7)
if (chance == 2) then
sounds[#sounds + 1] = "npc/overwatch/radiovoice/remainingunitscontain.wav"
elseif (chance == 3) then
sounds[#sounds + 1] = "npc/overwatch/radiovoice/reinforcementteamscode3.wav"
end
if (onRand != 2) then
sounds[#sounds + 1] = "npc/overwatch/radiovoice/off4.wav"
else
sounds[#sounds + 1] = "npc/overwatch/radiovoice/off2.wav"
end
for _, v in ipairs(player.GetAll()) do
if (v:HasActiveCombineSuit()) then
ix.util.EmitQueuedSounds(v, sounds, 2, nil, v == client and 100 or 80)
end
end
end
end
function Schema:PlayerHurt(client, attacker, health, damage)
if (health <= 0) then
return
end
if (client:HasActiveTracker() and (client.ixTraumaCooldown or 0) < CurTime()) then
if (health < 25) then
ix.combineNotify:AddNotification("WRN:// Signes vitaux en baisse - consulter une unité Helix.", Color(255, 0, 0, 255), nil, nil, client)
else
local text = damage > 50 and "Severe" or "External"
ix.combineNotify:AddNotification("WRN:// " .. text .. " : Traumatisme Détecté", Color(255, 0, 0, 255), nil, nil, client)
end
client.ixTraumaCooldown = CurTime() + 15
end
end
local chatTypes = {
["ic"] = true,
["w"] = true,
["wd"] = true,
["y"] = true,
["radio"] = true,
["radio_eavesdrop"] = true,
["radio_eavesdrop_yell"] = true,
["dispatch"] = true,
["dispatch_radio"] = true,
["overwatch_radio"] = true,
["dispatchota_radio"] = true,
["dispatchcp_radio"] = true,
["scanner_radio"] = true,
["request"] = true,
["broadcast"] = true,
["localbroadcast"] = true
}
local globalBlacklist = {
["radio_eavesdrop"] = true,
["radio_eavesdrop_yell"] = true,
}
local validEnds = {
["."] = true,
["?"] = true,
["!"] = true
}
local function fixMarkup(a, b)
return a.." "..string.utf8upper(b)
end
function Schema:PlayerMessageSend(speaker, chatType, text, anonymous, receivers, rawText, data)
if (chatTypes[chatType] and speaker) then
local class = self.voices.GetClass(speaker)
local textTable = string.Explode("; ?", rawText, true)
local voiceList = {}
for k, v in ipairs(textTable) do
local bFound = false
local vUpper = string.utf8upper(v)
local info
for _, c in ipairs(class) do
info = self.voices.Get(c, vUpper)
if (info) then break end
end
if (info) then
bFound = true
if (info.sound) then
voiceList[#voiceList + 1] = {
global = info.global,
sound = info.sound
}
end
if (k == 1) then
textTable[k] = info.text
else
textTable[k] = string.utf8lower(info.text)
end
if (k != #textTable) then
local endText = string.utf8sub(info.text, -1)
if (endText == "!" or endText == "?") then
textTable[k] = string.gsub(textTable[k], "[!?]$", ",")
end
end
end
if (bFound == false and k != #textTable) then
textTable[k] = v .. "; "
end
end
local str
str = table.concat(textTable, " ")
str = string.gsub(str, " ?([.?!]) (%l?)", fixMarkup)
if (voiceList[1]) then
local volume = 80
if (chatType == "w" or (data.radioType and data.radioType == ix.radio.types.whisper)) then
volume = 60
elseif (chatType == "y" or (data.radioType and data.radioType == ix.radio.types.yell)) then
volume = 150
end
local delay = 0
for _, v in ipairs(voiceList) do
local sound = v.sound
if (istable(sound)) then
local gender = speaker:GetCharacter():GetGender()
if gender and gender != "" then
if gender == "male" then
sound = v.sound[1]
else
sound = v.sound[2]
end
else
sound = v.sound[1]
end
end
if sound then
if (delay == 0) then
speaker:EmitSound(sound, volume)
else
timer.Simple(delay, function()
speaker:EmitSound(sound, volume)
end)
end
if (v.global and !globalBlacklist[chatType]) then
if (delay == 0) then
for _, v1 in ipairs(receivers) do
if (v1 != speaker) then
netstream.Start(v1, "PlaySound", sound)
end
end
else
timer.Simple(delay, function()
for _, v1 in ipairs(receivers) do
if (v1 != speaker) then
netstream.Start(v1, "PlaySound", sound)
end
end
end)
end
end
delay = delay + SoundDuration(sound) + 0.1
end
end
end
str = string.Trim(str)
str = str:utf8sub(1, 1):utf8upper() .. str:utf8sub(2)
if (!validEnds[str:utf8sub(-1)]) then
str = str .. "."
end
if (speaker:HasActiveCombineMask() and !speaker:IsDispatch()) then
return string.format("<:: %s ::>", str)
else
return str
end
end
end
function Schema:CanPlayerJoinClass(client, class, info)
if (client:IsRestricted()) then
client:Notify("Vous ne pouvez pas changer de classe quand vous êtes attachés !")
return false
end
end
function Schema:PlayerSpawnObject(client)
if (client:IsRestricted()) then
return false
end
end
function Schema:PlayerSpray(client)
return true
end
function Schema:ShouldCalculatePlayerNeeds(client, character)
local factionTable = ix.faction.Get(client:Team())
if (factionTable.noNeeds) then
return false
end
end
netstream.Hook("ViewObjectivesUpdate", function(client, text)
if (client:GetCharacter() and hook.Run("CanPlayerEditObjectives", client)) then
local date = ix.date.Get()
local data = {
text = text:utf8sub(1, 1000),
lastEditPlayer = client:GetCharacter():GetName(),
lastEditDate = date
}
ix.data.Set("combineObjectives", data, false, true)
Schema.CombineObjectives = data
ix.combineNotify:AddNotification("LOG:// Récupération de la mise à jour du manifeste des objectifs d'Overwatch (RÉVISION " .. date:spanseconds() .. ")")
ix.combineNotify:AddObjectiveNotification("OBJECTIF:// " .. data.text)
end
end)
netstream.Hook("SearchDecline", function(client)
if (!IsValid(client.ixSearchRequest)) then return end
client.ixSearchRequest:NotifyLocalized(hook.Run("GetCharacterName", client, "ic") or client:GetName().." refuse la fouille.")
client.ixSearchRequest = nil
end)
netstream.Hook("SearchTimeout", function(client)
if (!IsValid(client.ixSearchRequest)) then return end
client.ixSearchRequest:NotifyLocalized(hook.Run("GetCharacterName", client, "ic") or client:GetName().." n'a pas répondu à la demande.")
client.ixSearchRequest = nil
end)
netstream.Hook("SearchAllow", function(client)
if (!IsValid(client.ixSearchRequest)) then return end
Schema:SearchPlayer(client.ixSearchRequest, client)
client.ixSearchRequest.ixLastSearchRequest = nil
client.ixSearchRequest = nil
end)
netstream.Hook("ixSetToolMaxDurability", function(client, itemID, amount)
amount = math.max(amount, 1)
local item = ix.item.instances[itemID]
item:SetData("maxDurability", amount)
if (item:GetDurability() > amount) then
item:SetData("durability", amount)
end
end)
netstream.Hook("ixSetToolDurability", function(client, itemID, amount)
local item = ix.item.instances[itemID]
amount = math.Clamp(amount, 1, item:GetMaxDurability())
item:SetData("durability", amount)
end)
-- This is a TERRIBLE way of doing this, but it works without editing helix.
-- Adds an option to make certain configs silent.
net.Receive("ixConfigSet", function(length, client)
local key = net.ReadString()
local value = net.ReadType()
if (CAMI.PlayerHasAccess(client, "Helix - Manage Config", nil) and
type(ix.config.stored[key].default) == type(value)) then
ix.config.Set(key, value)
if (ix.util.IsColor(value)) then
value = string.format("[%d, %d, %d]", value.r, value.g, value.b)
elseif (istable(value)) then
local value2 = "["
local count = table.Count(value)
local i = 1
for _, v in SortedPairs(value) do
value2 = value2 .. v .. (i == count and "]" or ", ")
i = i + 1
end
value = value2
elseif (isstring(value)) then
value = string.format("\"%s\"", tostring(value))
elseif (isbool(value)) then
value = string.format("[%s]", tostring(value))
end
if (!ix.config.stored[key].data.silent and !ix.config.Get("silentConfigs")) then -- Don't notify everyone.
ix.util.NotifyLocalized("cfgSet", nil, client:Name(), key, tostring(value))
else
for _, v in ipairs(player.GetAll()) do
if (v:IsAdmin()) then
v:NotifyLocalized("cfgSet", client:Name(), key, tostring(value))
end
end
end
ix.log.Add(client, "cfgSet", key, value)
end
end)
hook.Remove( "InitPostEntity", "CreateVoiceVGUI")

View File

@@ -0,0 +1,245 @@
--[[
| 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/
--]]
Schema.CombineObjectives = Schema.CombineObjectives or {}
-- data saving
function Schema:SaveRationDispensers()
local data = {}
for _, v in ipairs(ents.FindByClass("ix_rationdispenser")) do
data[#data + 1] = {v:GetPos(), v:GetAngles(), v:GetEnabled()}
end
ix.data.Set("rationDispensers", data)
end
function Schema:SaveCombineLocks()
local data = {}
for _, v in ipairs(ents.FindByClass("ix_combinelock")) do
if (IsValid(v.door)) then
data[#data + 1] = {
v.door:MapCreationID(),
v.door:WorldToLocal(v:GetPos()),
v.door:WorldToLocalAngles(v:GetAngles()),
v:GetLocked()
}
end
end
ix.data.Set("combineLocks", data)
data = {}
for _, v2 in ipairs(ents.FindByClass("ix_combinelock_cwu")) do
if (IsValid(v2.door)) then
data[#data + 1] = {
v2.door:MapCreationID(),
v2.door:WorldToLocal(v2:GetPos()),
v2.door:WorldToLocalAngles(v2:GetAngles()),
v2:GetLocked(),
v2.accessLevel
}
end
end
ix.data.Set("combineLocksCwu", data)
data = {}
for _, v2 in ipairs(ents.FindByClass("ix_combinelock_dob")) do
if (IsValid(v2.door)) then
data[#data + 1] = {
v2.door:MapCreationID(),
v2.door:WorldToLocal(v2:GetPos()),
v2.door:WorldToLocalAngles(v2:GetAngles()),
v2:GetLocked(),
v2.accessLevel
}
end
end
ix.data.Set("combineLocksDob", data)
data = {}
for _, v2 in ipairs(ents.FindByClass("ix_combinelock_cmru")) do
if (IsValid(v2.door)) then
data[#data + 1] = {
v2.door:MapCreationID(),
v2.door:WorldToLocal(v2:GetPos()),
v2.door:WorldToLocalAngles(v2:GetAngles()),
v2:GetLocked(),
v2.accessLevel
}
end
end
ix.data.Set("combineLocksCmru", data)
data = {}
for _, v2 in ipairs(ents.FindByClass("ix_combinelock_moe")) do
if (IsValid(v2.door)) then
data[#data + 1] = {
v2.door:MapCreationID(),
v2.door:WorldToLocal(v2:GetPos()),
v2.door:WorldToLocalAngles(v2:GetAngles()),
v2:GetLocked(),
v2.accessLevel
}
end
end
ix.data.Set("combineLocksMoe", data)
end
function Schema:SaveForceFields()
local data = {}
for _, v in ipairs(ents.FindByClass("ix_forcefield")) do
data[#data + 1] = {v:GetPos(), v:GetAngles(), v:GetMode()}
end
ix.data.Set("forceFields", data)
end
function Schema:SaveRebelForceFields()
local data = {}
for _, v in ipairs(ents.FindByClass("ix_rebelfield")) do
data[#data + 1] = {v:GetPos(), v:GetAngles(), v:GetMode()}
end
ix.data.Set("rebelForceFields", data)
end
-- data loading
function Schema:LoadRationDispensers()
for _, v in ipairs(ix.data.Get("rationDispensers") or {}) do
local dispenser = ents.Create("ix_rationdispenser")
dispenser:SetPos(v[1])
dispenser:SetAngles(v[2])
dispenser:Spawn()
dispenser:SetEnabled(v[3])
end
end
function Schema:LoadCombineLocks()
for _, v in ipairs(ix.data.Get("combineLocks") or {}) do
local door = ents.GetMapCreatedEntity(v[1])
if (IsValid(door) and door:IsDoor()) then
local lock = ents.Create("ix_combinelock")
lock:SetPos(door:GetPos())
lock:Spawn()
lock:SetDoor(door, door:LocalToWorld(v[2]), door:LocalToWorldAngles(v[3]))
lock:SetLocked(v[4])
end
end
for _, v in ipairs(ix.data.Get("combineLocksCwu") or {}) do
local door = ents.GetMapCreatedEntity(v[1])
if (IsValid(door) and door:IsDoor()) then
local lock = ents.Create("ix_combinelock_cwu")
lock:SetPos(door:GetPos())
lock:Spawn()
lock:SetDoor(door, door:LocalToWorld(v[2]), door:LocalToWorldAngles(v[3]))
lock:SetLocked(v[4])
lock.accessLevel = v[5]
end
end
for _, v in ipairs(ix.data.Get("combineLocksDob") or {}) do
local door = ents.GetMapCreatedEntity(v[1])
if (IsValid(door) and door:IsDoor()) then
local lock = ents.Create("ix_combinelock_dob")
lock:SetPos(door:GetPos())
lock:Spawn()
lock:SetDoor(door, door:LocalToWorld(v[2]), door:LocalToWorldAngles(v[3]))
lock:SetLocked(v[4])
lock.accessLevel = v[5]
end
end
for _, v in ipairs(ix.data.Get("combineLocksCmru") or {}) do
local door = ents.GetMapCreatedEntity(v[1])
if (IsValid(door) and door:IsDoor()) then
local lock = ents.Create("ix_combinelock_cmru")
lock:SetPos(door:GetPos())
lock:Spawn()
lock:SetDoor(door, door:LocalToWorld(v[2]), door:LocalToWorldAngles(v[3]))
lock:SetLocked(v[4])
lock.accessLevel = v[5]
end
end
for _, v in ipairs(ix.data.Get("combineLocksMoe") or {}) do
local door = ents.GetMapCreatedEntity(v[1])
if (IsValid(door) and door:IsDoor()) then
local lock = ents.Create("ix_combinelock_moe")
lock:SetPos(door:GetPos())
lock:Spawn()
lock:SetDoor(door, door:LocalToWorld(v[2]), door:LocalToWorldAngles(v[3]))
lock:SetLocked(v[4])
lock.accessLevel = v[5]
end
end
end
function Schema:LoadForceFields()
for _, v in ipairs(ix.data.Get("forceFields") or {}) do
local field = ents.Create("ix_forcefield")
field:SetPos(v[1])
field:SetAngles(v[2])
field:Spawn()
field:SetMode(v[3])
local skin = scripted_ents.Get("ix_forcefield")
skin = skin.MODES
if (v[3] == 1) then
field:SetSkin(3)
field.dummy:SetSkin(3)
else
field:SetSkin(skin[v[3]][4])
field.dummy:SetSkin(skin[v[3]][4])
end
end
end
function Schema:SearchPlayer(client, target)
if (!target:GetCharacter() or !target:GetCharacter():GetInventory()) then
return false
end
local name = hook.Run("GetDisplayedName", target) or target:Name()
local inventory = target:GetCharacter():GetInventory()
ix.storage.Open(client, inventory, {
entity = target,
name = name
})
return true
end