├── .deprecated
├── sv-hl2rp
│ ├── gamemode
│ │ ├── cl_init.lua
│ │ └── init.lua
│ ├── ixhl2rp.txt
│ ├── plugins
│ │ ├── !!!schema
│ │ │ ├── classes
│ │ │ │ ├── sh_citizen.lua
│ │ │ │ ├── sh_cwu.lua
│ │ │ │ ├── sh_overwatch_soldier.lua
│ │ │ │ └── sh_elite_overwatch_soldier.lua
│ │ │ ├── items
│ │ │ │ ├── bags
│ │ │ │ │ └── sh_suitcase.lua
│ │ │ │ ├── permits
│ │ │ │ │ └── sh_permit_consumables.lua
│ │ │ │ ├── base
│ │ │ │ │ ├── sh_permits.lua
│ │ │ │ │ └── sh_armor_clothes.lua
│ │ │ │ ├── sh_request_device.lua
│ │ │ │ ├── ammo
│ │ │ │ │ ├── sh_crossbowammo.lua
│ │ │ │ │ ├── sh_shotgunammo.lua
│ │ │ │ │ ├── sh_ar2ammo.lua
│ │ │ │ │ ├── sh_smg1ammo.lua
│ │ │ │ │ ├── sh_357ammo.lua
│ │ │ │ │ ├── sh_pistolammo.lua
│ │ │ │ │ └── sh_rocketammo.lua
│ │ │ │ ├── sh_cid.lua
│ │ │ │ ├── outfit
│ │ │ │ │ └── sh_rmedic_uniform.lua
│ │ │ │ ├── weapons
│ │ │ │ │ ├── sh_grenade.lua
│ │ │ │ │ ├── sh_shotgun.lua
│ │ │ │ │ ├── sh_crowbar.lua
│ │ │ │ │ ├── sh_ar2.lua
│ │ │ │ │ ├── sh_smg1.lua
│ │ │ │ │ ├── sh_pistol.lua
│ │ │ │ │ └── sh_357.lua
│ │ │ │ ├── armor_clothes
│ │ │ │ │ └── sh_resistance_uniform.lua
│ │ │ │ ├── sh_health_kit.lua
│ │ │ │ ├── sh_health_vial.lua
│ │ │ │ ├── sh_ration.lua
│ │ │ │ ├── sh_combinelock.lua
│ │ │ │ ├── sh_zip_tie.lua
│ │ │ │ └── sh_handheld_radio.lua
│ │ │ ├── attributes
│ │ │ │ └── sh_medical.lua
│ │ │ ├── meta
│ │ │ │ ├── sv_player.lua
│ │ │ │ ├── sh_character.lua
│ │ │ │ └── sh_player.lua
│ │ │ ├── sh_configs.lua
│ │ │ ├── sh_plugin.lua
│ │ │ ├── cl_schema.lua
│ │ │ ├── factions
│ │ │ │ ├── sh_citizen.lua
│ │ │ │ ├── sh_metropolice.lua
│ │ │ │ └── sh_administrator.lua
│ │ │ ├── derma
│ │ │ │ └── cl_combinedisplay.lua
│ │ │ └── sh_hooks.lua
│ │ ├── cp_jail
│ │ │ ├── sv_plugin.lua
│ │ │ └── sh_plugin.lua
│ │ ├── cp_arsenal
│ │ │ ├── sh_plugin.lua
│ │ │ └── libs
│ │ │ │ └── sh_arsenal.lua
│ │ ├── cp_ranks
│ │ │ ├── classes
│ │ │ │ └── sh_mpf.lua
│ │ │ ├── ranks
│ │ │ │ ├── sh_rct.lua
│ │ │ │ ├── sh_05.lua
│ │ │ │ ├── sh_04.lua
│ │ │ │ ├── sh_02.lua
│ │ │ │ ├── sh_03.lua
│ │ │ │ ├── sh_01.lua
│ │ │ │ └── sh_ofc.lua
│ │ │ ├── sh_config.lua
│ │ │ ├── sh_plugin.lua
│ │ │ └── sv_plugin.lua
│ │ ├── cp_squad
│ │ │ ├── squads
│ │ │ │ ├── sh_gu.lua
│ │ │ │ ├── sh_helix.lua
│ │ │ │ └── sh_tech.lua
│ │ │ ├── sh_plugin.lua
│ │ │ ├── sv_meta.lua
│ │ │ └── libs
│ │ │ │ └── sh_squads.lua
│ │ ├── cp_pda
│ │ │ ├── sv_plugin.lua
│ │ │ ├── derma
│ │ │ │ ├── cl_pda_frame.lua
│ │ │ │ ├── cl_pda_database.lua
│ │ │ │ ├── cl_viewobjectives.lua
│ │ │ │ └── cl_pda_pt.lua
│ │ │ └── sh_plugin.lua
│ │ ├── thirdpersonbind.lua
│ │ ├── cp_citizens
│ │ │ ├── sh_plugin.lua
│ │ │ └── sv_plugin.lua
│ │ ├── screenclicker.lua
│ │ ├── item_collide.lua
│ │ ├── cp_system
│ │ │ ├── sh_plugin.lua
│ │ │ └── sh_cmds.lua
│ │ ├── cp_specialdoors
│ │ │ └── sh_plugin.lua
│ │ ├── specialradios
│ │ │ ├── sv_hooks.lua
│ │ │ └── sh_plugin.lua
│ │ ├── thirdpersonblocker.lua
│ │ ├── relations.lua
│ │ ├── cp_pts
│ │ │ ├── sh_cmds.lua
│ │ │ └── sh_plugin.lua
│ │ ├── permaclass.lua
│ │ ├── needs
│ │ │ └── sh_commands.lua
│ │ ├── combineoverlay.lua
│ │ ├── metropolice_api
│ │ │ └── sh_meta.lua
│ │ └── permaremove.lua
│ └── schema
│ │ ├── sh_schema.lua
│ │ └── languages
│ │ └── sh_english.lua
├── README.md
├── diseases
│ ├── items
│ │ ├── medicine
│ │ │ ├── sh_adminpills.lua
│ │ │ ├── sh_paracetamol.lua
│ │ │ └── sh_blindnessfixer.lua
│ │ └── base
│ │ │ └── sh_medicine.lua
│ ├── sh_meta.lua
│ ├── sh_lang.lua
│ ├── diseases
│ │ ├── blindness.lua
│ │ └── cough.lua
│ ├── libs
│ │ └── sh_timer.lua
│ ├── docs
│ │ └── plugin_hooks.lua
│ └── sh_plugin.lua
├── fog.lua
├── garbagecleaner.lua
└── scrolltext.lua
├── cameras
├── sh_plugin.lua
└── sv_hooks.lua
├── trashpiles
├── entities
│ └── entities
│ │ └── ix_trashpile
│ │ ├── cl_init.lua
│ │ ├── shared.lua
│ │ └── init.lua
└── sh_plugin.lua
├── extended_outfits
├── sh_plugin.lua
├── items
│ ├── sh_tool_repair.lua
│ └── .examples
│ │ ├── sh_jacketred.lua
│ │ ├── sh_security.lua
│ │ ├── sh_coatgreen.lua
│ │ ├── sh_glovesfingerless.lua
│ │ ├── sh_jacketlightblue.lua
│ │ ├── sh_jacketdarkblue.lua
│ │ ├── sh_longsleeveblue.lua
│ │ ├── sh_longsleevegrey.lua
│ │ ├── sh_suitblacktop.lua
│ │ ├── sh_buttonupblue.lua
│ │ ├── sh_buttonupwhite.lua
│ │ ├── sh_longsleevecream.lua
│ │ ├── sh_longsleevegreen.lua
│ │ ├── sh_gloves.lua
│ │ ├── sh_jacketblack.lua
│ │ ├── sh_jeansblack.lua
│ │ ├── sh_shirtmechanic.lua
│ │ ├── sh_jeansbluefaded.lua
│ │ ├── sh_jumpsuitgreen.lua
│ │ ├── sh_glasses.lua
│ │ ├── sh_goggles.lua
│ │ ├── sh_shirtblueciu.lua
│ │ ├── sh_shirtindustrial.lua
│ │ ├── sh_suitmalecatop.lua
│ │ ├── sh_labcoat.lua
│ │ ├── sh_shirtgreenciu.lua
│ │ ├── sh_suitfemalecatop.lua
│ │ ├── sh_denimblack.lua
│ │ ├── sh_denimgreen.lua
│ │ ├── sh_jeansblackstriped.lua
│ │ ├── sh_jeansgreenstriped.lua
│ │ ├── sh_satchel.lua
│ │ ├── sh_cwushirt.lua
│ │ ├── sh_pouch.lua
│ │ ├── sh_shirtcmu.lua
│ │ ├── sh_jeansgrey.lua
│ │ ├── sh_pantsgreytracksuit.lua
│ │ ├── sh_badge.lua
│ │ ├── sh_jeansblackripped.lua
│ │ ├── sh_suitblackbottom.lua
│ │ ├── sh_suitmalecabottom.lua
│ │ ├── sh_jeansrebelblue.lua
│ │ ├── sh_pantsblackwork.lua
│ │ ├── sh_jeansrebelblack.lua
│ │ ├── sh_jeansrebelgreen.lua
│ │ ├── sh_pantsarmy.lua
│ │ ├── sh_pantsota.lua
│ │ ├── sh_jeansrebeltactical.lua
│ │ ├── sh_shirtpoliticalconscript.lua
│ │ ├── sh_pantspoliticalconscript.lua
│ │ └── sh_pantsmetropolice.lua
└── sv_hooks.lua
├── simfphysbase.lua
├── .editorconfig
├── antibhop.lua
├── ambients
├── sv_plugin.lua
└── sh_plugin.lua
├── voicebox_hide.lua
├── radios
├── entities
│ └── entities
│ │ └── ix_radio
│ │ ├── shared.lua
│ │ ├── cl_init.lua
│ │ └── init.lua
├── sh_plugin.lua
├── sv_hooks.lua
└── cl_hooks.lua
├── stoppk.lua
├── anticrash.lua
├── ams
├── wounds
│ └── sh_example.lua
├── diseases
│ └── sh_example.lua
├── sh_plugin.lua
└── sv_plugin.lua
├── contentloader.lua
├── muteping.lua
├── apartments
├── sh_plugin.lua
├── items
│ └── sh_aptlock.lua
└── sv_hooks.lua
├── thirdpersonbind.lua
├── wounds
├── sh_plugin.lua
├── items
│ ├── sh_wound_bandage.lua
│ └── sh_wound_splint.lua
└── sv_hooks.lua
├── screenclicker.lua
├── fixstep.lua
├── stacks
├── sh_plugin.lua
└── items
│ └── base
│ └── sh_stackable.lua
├── gaszones
├── sh_commands.lua
├── items
│ └── sh_antidote.lua
└── sh_meta.lua
├── specialradios
├── sv_hooks.lua
└── sh_plugin.lua
├── fixshadows.lua
├── apply.lua
├── equipdrop.lua
├── info_nodes.lua
├── nodes
└── sh_plugin.lua
├── needs
├── sh_plugin.lua
├── sh_config.lua
├── sh_meta.lua
└── items
│ └── base
│ └── sh_foods.lua
├── LICENSE
├── README.md
├── detaileddescriptions
├── sh_plugin.lua
└── sv_plugin.lua
├── thirdpersonblocker.lua
├── xp
└── sh_plugin.lua
├── stormfox.lua
├── xmas
└── entities
│ └── effects
│ └── xmas_snow.lua
├── autowalk.lua
├── languages
├── sh_meta.lua
└── sh_plugin.lua
└── metropolice_api
└── sh_meta.lua
/.deprecated/sv-hl2rp/gamemode/cl_init.lua:
--------------------------------------------------------------------------------
1 |
2 | DeriveGamemode("helix")
3 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/gamemode/init.lua:
--------------------------------------------------------------------------------
1 |
2 | AddCSLuaFile("cl_init.lua")
3 | DeriveGamemode("helix")
4 |
--------------------------------------------------------------------------------
/cameras/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "CCA Cameras"
3 | PLUGIN.schema = "HL2 RP"
4 |
5 | ix.util.Include("sv_hooks.lua")
6 |
--------------------------------------------------------------------------------
/trashpiles/entities/entities/ix_trashpile/cl_init.lua:
--------------------------------------------------------------------------------
1 |
2 | include("shared.lua")
3 |
4 | function ENT:Draw()
5 | self:DrawModel()
6 | end
--------------------------------------------------------------------------------
/extended_outfits/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = 'Extended Outfits'
4 | PLUGIN.author = 'Bilwin'
5 | ix.util.Include('sv_hooks.lua')
--------------------------------------------------------------------------------
/extended_outfits/items/sh_tool_repair.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = 'Armor repair'
3 | ITEM.description = 'The outfit repair kit'
4 | ITEM.model = Model('models/props_lab/box01a.mdl')
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/ixhl2rp.txt:
--------------------------------------------------------------------------------
1 | "ixhl2rp"
2 | {
3 | "base" "helix"
4 | "title" "HL2 RP"
5 | "author" "nebulous.cloud"
6 | "category" "rp"
7 | "menusystem" "1"
8 | }
9 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/classes/sh_citizen.lua:
--------------------------------------------------------------------------------
1 | CLASS.name = "Citizen"
2 | CLASS.faction = FACTION_CITIZEN
3 | CLASS.isDefault = true
4 | CLASS_CITIZEN = CLASS.index
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_jail/sv_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | function PLUGIN:CanPlayerUseCharacter(client, character)
3 | if client:IsRestricted() then return false end
4 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_arsenal/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Arsenal"
3 | PLUGIN.description = "Civil Protection arsenal, using fabricator"
4 | PLUGIN.author = "Bilwin"
5 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_jail/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "CP Jail"
4 | PLUGIN.description = "Civil Protection Jail"
5 | PLUGIN.author = "Bilwin"
6 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/classes/sh_mpf.lua:
--------------------------------------------------------------------------------
1 |
2 | CLASS.name = "Юнит Гражданской Обороны"
3 | CLASS.faction = FACTION_MPF
4 | CLASS.isDefault = true
5 | CLASS_MPU = CLASS.index
--------------------------------------------------------------------------------
/simfphysbase.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Simfphys Useless Things'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | -- stop sparkling
5 | function PLUGIN:simfphysPhysicsCollide()
6 | return true
7 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/bags/sh_suitcase.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Suitcase"
2 | ITEM.description = "A small suitcase."
3 | ITEM.model = Model("models/weapons/w_suitcase_passenger.mdl")
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_squad/squads/sh_gu.lua:
--------------------------------------------------------------------------------
1 |
2 | SQUAD.name = "Подразделение GU"
3 | SQUAD.description = "<Описание подразделения>"
4 | SQUAD.xp = 0
5 | SQUAD.uniform = "0_0_0_0_0"
6 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/attributes/sh_medical.lua:
--------------------------------------------------------------------------------
1 |
2 | ATTRIBUTE.name = "Medical Knowledge"
3 | ATTRIBUTE.description = "Your affinity for medical items."
4 | ATTRIBUTE.noStartBonus = true
5 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/permits/sh_permit_consumables.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Consumables Permit"
2 | ITEM.description = "A permit allowing you to sell consumable goods."
3 | ITEM.permit = "consumables"
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_squad/squads/sh_helix.lua:
--------------------------------------------------------------------------------
1 |
2 | SQUAD.name = "Подразделение HELIX"
3 | SQUAD.description = "<Описание подразделения>"
4 | SQUAD.xp = 45
5 | SQUAD.uniform = "1_0_0_0_0"
6 | SQUAD.max = 8
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_squad/squads/sh_tech.lua:
--------------------------------------------------------------------------------
1 |
2 | SQUAD.name = "Подразделение TECH"
3 | SQUAD.description = "<Описание подразделения>"
4 | SQUAD.xp = 50
5 | SQUAD.uniform = "17_0_1_1_1"
6 | SQUAD.max = 5
--------------------------------------------------------------------------------
/.deprecated/README.md:
--------------------------------------------------------------------------------
1 | # DEPRECATED AND NO LONGER MAINTAINED PLUGINS
2 | I advise you not to use these plugins, otherwise you may get big or small script errors. There is no support for these plugins, use them at your own risk!
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/schema/sh_schema.lua:
--------------------------------------------------------------------------------
1 |
2 | Schema.name = 'Half-Life 2 Roleplay'
3 | Schema.author = 'SV HL2 RP'
4 | Schema.description = 'A schema based on Half-Life 2.'
5 |
6 | ix.plugin.SetUnloaded('spawnsaver', true)
7 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*.lua]
4 | indent_style = space
5 | indent_size = 4
6 | tab_width = 4
7 | charset = utf-8
8 | end_of_line = crlf
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/classes/sh_cwu.lua:
--------------------------------------------------------------------------------
1 | CLASS.name = "Civil Worker's Union"
2 | CLASS.faction = FACTION_CITIZEN
3 |
4 | function CLASS:CanSwitchTo(client)
5 | return false
6 | end
7 |
8 | CLASS_CWU = CLASS.index
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pda/sv_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local whitelisted_codes = {['ЖК']=true, ['КК']=true}
3 | netstream.Hook("ToggleCityCode", function(client, code)
4 | if whitelisted_codes[code] then
5 | --
6 | end
7 | end)
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/base/sh_permits.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Permit Base"
2 | ITEM.model = "models/props_lab/clipboard.mdl"
3 | ITEM.description = "A permit for purchasing goods."
4 | ITEM.category = "Permits"
5 | ITEM.permit = "none"
--------------------------------------------------------------------------------
/antibhop.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Anti-Bhop'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | function PLUGIN:OnPlayerHitGround(client)
5 | local vel = client:GetVelocity()
6 | client:SetVelocity( Vector( - ( vel.x * 0.45 ), - ( vel.y * 0.45 ), 0) )
7 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_request_device.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Request Device"
3 | ITEM.model = Model("models/gibs/shield_scanner_gib1.mdl")
4 | ITEM.description = "A box with rounded corners, housing two buttons."
5 | ITEM.price = 20
6 |
--------------------------------------------------------------------------------
/ambients/sv_plugin.lua:
--------------------------------------------------------------------------------
1 | util.AddNetworkString('ixEnableAmbients')
2 |
3 | function PLUGIN:PlayerLoadedCharacter(client, _, _)
4 | net.Start('ixEnableAmbients', true)
5 | net.WriteBool( ix.config.Get('enableAmbients', false) )
6 | net.Send(client)
7 | end
--------------------------------------------------------------------------------
/voicebox_hide.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'VoiceBox Remover'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | if CLIENT then
5 | function PLUGIN:PlayerStartVoice()
6 | if IsValid(g_VoicePanelList) then
7 | g_VoicePanelList:Remove()
8 | end
9 | end
10 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/ammo/sh_crossbowammo.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Crossbow Bolts"
2 | ITEM.model = "models/Items/BoxBuckshot.mdl"
3 | ITEM.ammo = "XBowBolt" -- type of the ammo
4 | ITEM.ammoAmount = 5 -- amount of the ammo
5 | ITEM.description = "A Bundle of %s Crossbow Bolts"
6 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/ammo/sh_shotgunammo.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Shotgun Shells"
2 | ITEM.model = "models/Items/BoxBuckshot.mdl"
3 | ITEM.ammo = "buckshot" -- type of the ammo
4 | ITEM.ammoAmount = 15 -- amount of the ammo
5 | ITEM.description = "A Box of %s Shotgun Shells"
6 |
--------------------------------------------------------------------------------
/.deprecated/diseases/items/medicine/sh_adminpills.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Admin pills"
2 | ITEM.model = "models/props_junk/garbage_metalcan001a.mdl"
3 | ITEM.description = "What is it?"
4 | ITEM.width = 1
5 | ITEM.height = 1
6 | ITEM.adminPills = true
7 | ITEM.category = "Medicine"
8 | ITEM.useSound = "items/medshot4.wav"
--------------------------------------------------------------------------------
/.deprecated/diseases/sh_meta.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local CHAR = ix.meta.character
4 |
5 | function CHAR:IsDiseased()
6 | return self:GetData("diseaseInfo", "") ~= "" or false
7 | end
8 |
9 | function CHAR:GetDisease()
10 | return self:GetData("diseaseInfo", "") or false
11 | end
12 |
--------------------------------------------------------------------------------
/.deprecated/diseases/items/medicine/sh_paracetamol.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Paracetamol"
2 | ITEM.model = "models/props_junk/garbage_metalcan001a.mdl"
3 | ITEM.description = "Jar of pills"
4 | ITEM.width = 1
5 | ITEM.height = 1
6 | ITEM.category = "Medicine"
7 | ITEM.useSound = "items/medshot4.wav"
8 | ITEM.healing = "cough"
9 |
--------------------------------------------------------------------------------
/radios/entities/entities/ix_radio/shared.lua:
--------------------------------------------------------------------------------
1 |
2 | ENT.Base = "base_gmodentity"
3 | ENT.Type = "anim"
4 | ENT.PrintName = "Radio"
5 | ENT.Author = "Bilwin"
6 | ENT.Instructions = "Press E"
7 | ENT.Category = "HL2 RP"
8 |
9 | ENT.Spawnable = true
10 | ENT.AdminOnly = true
11 | ENT.PhysgunDisable = true
--------------------------------------------------------------------------------
/trashpiles/entities/entities/ix_trashpile/shared.lua:
--------------------------------------------------------------------------------
1 |
2 | DEFINE_BASECLASS("base_gmodentity")
3 |
4 | ENT.Type = "anim"
5 | ENT.PrintName = "Trash Pile"
6 | ENT.Category = "Helix"
7 | ENT.Author = "Bilwin"
8 | ENT.Spawnable = true
9 | ENT.AdminOnly = true
10 | ENT.PhysgunDisable = true
11 | ENT.bNoPersist = true
12 |
--------------------------------------------------------------------------------
/.deprecated/diseases/items/medicine/sh_blindnessfixer.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Anti-Blindness Pills"
2 | ITEM.model = "models/props_junk/garbage_metalcan001a.mdl"
3 | ITEM.description = "Jar of pills"
4 | ITEM.width = 1
5 | ITEM.height = 1
6 | ITEM.category = "Medicine"
7 | ITEM.useSound = "items/medshot4.wav"
8 | ITEM.healing = "blindness"
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jacketred.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Red Jacket"
3 | ITEM.description = "A puffy, red jacket that contains a black accent."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 17
9 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/ammo/sh_ar2ammo.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Pulse-Rifle Energy"
2 | ITEM.model = "models/items/combine_rifle_cartridge01.mdl"
3 | ITEM.ammo = "ar2" -- type of the ammo
4 | ITEM.ammoAmount = 30 -- amount of the ammo
5 | ITEM.description = "A Cartridge that contains %s of AR2 Ammo"
6 | ITEM.classes = {CLASS_EOW}
7 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/ammo/sh_smg1ammo.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "SMG Bullets"
2 | ITEM.model = "models/Items/BoxSRounds.mdl"
3 | ITEM.ammo = "smg1" -- type of the ammo
4 | ITEM.ammoAmount = 45 -- amount of the ammo
5 | ITEM.description = "A Box that contains %s of SMG Ammo"
6 | ITEM.classes = {CLASS_EMP, CLASS_EOW}
7 | ITEM.flag = "V"
8 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/meta/sv_player.lua:
--------------------------------------------------------------------------------
1 |
2 | function PLAYER:AddCombineDisplayMessage(text, color, ...)
3 | if (self:IsCombine()) then
4 | netstream.Start(self, "CombineDisplayMessage", text, color or false, {...})
5 | end
6 | end
7 |
8 | function PLAYER:PlaySound(sound)
9 | netstream.Start(self, "PlaySound", sound)
10 | end
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_security.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Security Jacket"
3 | ITEM.description = "A blue security jacket worn by employees of Black Mesa."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 23
9 | }
--------------------------------------------------------------------------------
/stoppk.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Prop-Kill blocker'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | if SERVER then
5 | function PLUGIN:EntityTakeDamage(client, dmg)
6 | if IsValid(client) && client:IsPlayer() && dmg:IsDamageType(DMG_CRUSH) && not IsValid(client.ixRagdoll) then
7 | return true
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_coatgreen.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Green Coat"
3 | ITEM.description = "A thick green coat, provided to Citizens in case of cold weather."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 14
9 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/ammo/sh_357ammo.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = ".357 Magnum Bullets"
2 | ITEM.model = "models/items/357ammo.mdl"
3 | ITEM.ammo = "357" -- type of the ammo
4 | ITEM.ammoAmount = 12 -- amount of the ammo
5 | ITEM.description = "A Box that contains %s of .357 Ammo"
6 | ITEM.classes = {CLASS_EOW}
7 | ITEM.price = 10
8 | ITEM.flag = "V"
9 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/ammo/sh_pistolammo.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "9mm Pistol Bullets"
2 | ITEM.model = "models/items/357ammo.mdl"
3 | ITEM.ammo = "pistol" -- type of the ammo
4 | ITEM.ammoAmount = 30 -- amount of the ammo
5 | ITEM.description = "A Box that contains %s of Pistol Ammo"
6 | ITEM.classes = {CLASS_EMP, CLASS_EOW}
7 | ITEM.flag = "V"
8 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_cid.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "CID"
3 | ITEM.model = Model("models/gibs/metal_gib4.mdl")
4 | ITEM.description = "Идентификационная карта гражданина #%s, выдан для %s."
5 |
6 | function ITEM:GetDescription()
7 | return string.format(self.description, self:GetData("id", "00000"), self:GetData("name", "nobody"))
8 | end
9 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_glovesfingerless.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Fingerless Gloves"
3 | ITEM.description = "A dark black pair of fingerless gloves, worn and dirty."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'hands'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Hands"] = 1
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jacketlightblue.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Light Blue Jacket"
3 | ITEM.description = "A puffy, light blue jacket that contains a black accent."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 16
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jacketdarkblue.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Dark Blue Jacket"
3 | ITEM.description = "A puffy, dark blue jacket that contains a light grey accent."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 15
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_longsleeveblue.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Blue Long Sleeved Shirt"
3 | ITEM.description = "A cream coloured long sleeve shirt, insulated against the cold."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 7
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_longsleevegrey.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Grey Long Sleeved Shirt"
3 | ITEM.description = "A grey coloured long sleeve shirt, insulated against the cold."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 6
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_suitblacktop.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Black Suit Jacket"
3 | ITEM.description = "A black suit jacket that sports a black tie and light green button-up."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 38
9 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/outfit/sh_rmedic_uniform.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Medic Uniform"
3 | ITEM.description = "A resistance uniform with medical insignia on the sleeve."
4 | ITEM.category = "Clothing"
5 | ITEM.flag = "v"
6 |
7 | ITEM.replacements = {
8 | {"group01", "group03m"},
9 | {"group02", "group03m"},
10 | {"group03", "group03m"},
11 | }
12 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_buttonupblue.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "White Button-Up Shirt"
3 | ITEM.description = "A blue button-upped shirt, provided to those of a high loyalist tier."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 12
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_buttonupwhite.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "White Button-Up Shirt"
3 | ITEM.description = "A white button-upped shirt, provided to those of a high loyalist tier."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 11
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_longsleevecream.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Cream Long Sleeved Shirt"
3 | ITEM.description = "A cream coloured long sleeve shirt, insulated against the cold."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 4
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_longsleevegreen.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Green Long Sleeved Shirt"
3 | ITEM.description = "A green coloured long sleeve shirt, insulated against the cold."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 5
9 | }
--------------------------------------------------------------------------------
/anticrash.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Collide disabler'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | function PLUGIN:ShouldCollide(a, b)
5 | if a:GetClass() == 'ix_item' && b:GetClass() == 'ix_item' then
6 | return false
7 | end
8 | end
9 |
10 | if SERVER then
11 | function PLUGIN:OnItemSpawned(ent)
12 | ent:SetCustomCollisionCheck(true)
13 | end
14 | end
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_gloves.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Gloves"
3 | ITEM.description = "A leather pair of gloves that are commonly provided to loyalists and the Civil Administration."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'hands'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ['Hands'] = 2
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jacketblack.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Black Jacket"
3 | ITEM.description = "A black, zip-up jacket. It seems quite worn and creased, as if its been worn before."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 8
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansblack.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Faded Black Jeans"
2 | ITEM.description = "A seemingly old pair of faded black jeans."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 6 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_shirtmechanic.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Mechanic's Shirt"
3 | ITEM.description = "A relic of the pre-war, commonly utilised for Union mechanics."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 3
9 | }
10 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansbluefaded.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Faded Blue Jeans"
2 | ITEM.description = "A seemingly old pair of faded blue jeans."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 1 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jumpsuitgreen.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Green Citizen Jumpsuit"
3 | ITEM.description = "A standard green Citizen jumpsuit, embedded with the City logo."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
6 | ITEM.outfitCategory = 'torso'
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 2
9 | }
10 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_glasses.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Glasses"
3 | ITEM.description = "A pair of black glasses, with one lens slightly cracked. These are commonly provided by the Union."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'glasses'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Glasses"] = 1
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_goggles.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Goggles"
3 | ITEM.description = "A black pair of goggles commonly worn by engineers or those requiring personal protective equipment."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'glasses'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Glasses"] = 2
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_shirtblueciu.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Blue CIU Shirt"
3 | ITEM.description = "A button-up blue CIU shirt that is provided to senior members of the Civil Industrial Union."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 19
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_shirtindustrial.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Blue Industrial Shirt"
3 | ITEM.description = "A blue shirt commonly utilised by the Civil Industrial Union for permanent workers."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 10
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_suitmalecatop.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Male CA Jacket"
3 | ITEM.description = "A beige suit jacket that is commonly utilised by male members of the Civil Administration."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 40
9 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/classes/sh_overwatch_soldier.lua:
--------------------------------------------------------------------------------
1 | CLASS.name = "Overwatch Soldier"
2 | CLASS.faction = FACTION_OTA
3 | CLASS.isDefault = true
4 |
5 | function CLASS:OnSet(client)
6 | local character = client:GetCharacter()
7 |
8 | if (character) then
9 | character:SetModel("models/combine_soldier.mdl")
10 | end
11 | end
12 |
13 | CLASS_OWS = CLASS.index
14 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/weapons/sh_grenade.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Grenade"
2 | ITEM.description = "A small, green colored MK3A2 grenade that explodes a few seconds after it is thrown."
3 | ITEM.model = "models/weapons/w_grenade.mdl"
4 | ITEM.class = "weapon_frag"
5 | ITEM.weaponCategory = "grenade"
6 | ITEM.classes = {CLASS_EOW}
7 | ITEM.flag = "V"
8 | ITEM.width = 1
9 | ITEM.height = 1
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_labcoat.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Lab Coat"
3 | ITEM.description = "A pristine, pre-war lab coat that was worn by the Black Mesa scientists. It was long-thought to be extinct..."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 22
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_shirtgreenciu.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Green CIU Shirt"
3 | ITEM.description = "A button-up green CIU shirt that is provided to senior members of the Civil Industrial Union."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 18
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_suitfemalecatop.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Female CA Jacket"
3 | ITEM.description = "A beige suit jacket that is commonly utilised by female members of the Civil Administration."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 39
9 | }
--------------------------------------------------------------------------------
/radios/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Radios"
3 | PLUGIN.author = "Bilwin"
4 | PLUGIN.description = "Adds radio"
5 | PLUGIN.schema = "Any"
6 | PLUGIN.version = 1.0
7 | PLUGIN.songs = {
8 | [''] = "Stop",
9 | ["example/radio/song1.mp3"] = "Song #1",
10 | ["example/radio/song2.mp3"] = "Song #2"
11 | }
12 |
13 | ix.util.Include("cl_hooks.lua")
14 | ix.util.Include("sv_hooks.lua")
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/ranks/sh_rct.lua:
--------------------------------------------------------------------------------
1 |
2 | RANK.name = 'RCT'
3 | RANK.description = "Рекрут - поступивший на службу в Гражданскую Оборону. Неопытный сотрудник, прошедший основную базовую подготовку. Не имеет подавителей характера, и испытывает полную боль."
4 | RANK.weapons = {'ix_stunstick'}
5 | RANK.xp = 0
6 | RANK.armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_18"
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_denimblack.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Black Denim Jacket"
3 | ITEM.description = "A black denim jacket complete with a dark grey button-up shirt. The zipper appears to be broken..."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 9
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_denimgreen.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Green Denim Jacket"
3 | ITEM.description = "A green denim jacket complete with a dark grey button-up shirt. The zipper appears to be broken..."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 24
9 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/armor_clothes/sh_resistance_uniform.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Resistance Uniform"
3 | ITEM.description = "A resistance uniform with a symbol on the sleeve."
4 | ITEM.category = "Clothing"
5 | ITEM.flag = "v"
6 | ITEM.maxArmor = 50
7 |
8 | ITEM.replacements = {
9 | {"group01", "group03"},
10 | {"group02", "group03"},
11 | {"group03m", "group03"},
12 | }
13 |
--------------------------------------------------------------------------------
/ams/wounds/sh_example.lua:
--------------------------------------------------------------------------------
1 |
2 | local WOUND = ix.AMS.Wounds:New()
3 | WOUND.uniqueID = 'example'
4 | WOUND.name = 'Example'
5 | WOUND.Wounded = function(client, character)
6 | client:SetNetVar("ExampleWound", true)
7 | end
8 | WOUND.Diswound = function(client, character)
9 | client:SetNetVar("ExampleWound", false)
10 | end
11 | ix.AMS.Wounds:Register(WOUND)
12 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansblackstriped.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Black Striped Jeans"
2 | ITEM.description = "A pair of black jeans with a yellow strip down the side."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 3 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansgreenstriped.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Green Striped Jeans"
2 | ITEM.description = "A pair of green jeans with a yellow strip down the side."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 2 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/classes/sh_elite_overwatch_soldier.lua:
--------------------------------------------------------------------------------
1 | CLASS.name = "Elite Overwatch Soldier"
2 | CLASS.faction = FACTION_OTA
3 | CLASS.isDefault = false
4 |
5 | function CLASS:OnSet(client)
6 | local character = client:GetCharacter()
7 |
8 | if (character) then
9 | character:SetModel("models/combine_super_soldier.mdl")
10 | end
11 | end
12 |
13 | CLASS_EOW = CLASS.index
14 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_satchel.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Satchel"
3 | ITEM.description = "A black satchel that is usually provided to loyalists or those of a higher Civil status. It appears to be very well-made."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'satchel'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Satchel"] = 1
9 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_cwushirt.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "CWU Associate Shirt"
3 | ITEM.description = "A shirt that is typically worn by members of the Civil Worker's Union. It sports an orange Union label."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 1
9 | }
10 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_pouch.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Pouch"
3 | ITEM.description = "A black pouch that is stiched on to a flexible elastic shoulder band. While small, it can provide extra storage space for the wearer."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'pouch'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Pouch"] = 1
9 | }
--------------------------------------------------------------------------------
/contentloader.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Content Loader'
2 | PLUGIN.description = 'Automatically mount installed server content (host_workshop_collection)'
3 | PLUGIN.author = 'Bilwin'
4 |
5 | if SERVER then
6 | function PLUGIN:Initialize()
7 | local ws = engine.GetAddons()
8 | for _, v in ipairs(ws) do
9 | resource.AddWorkshop(v.wsid)
10 | end
11 | end
12 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/meta/sh_character.lua:
--------------------------------------------------------------------------------
1 |
2 | local CHAR = ix.meta.character
3 |
4 | function CHAR:IsCombine()
5 | local faction = self:GetFaction()
6 | return faction == FACTION_MPF or faction == FACTION_OTA
7 | end
8 |
9 | function CHAR:GetCID()
10 | self:GetData("cid")
11 | end
12 |
13 | if (SERVER) then
14 | function CHAR:SetCID(value)
15 | self:SetData("cid", value)
16 | end
17 | end
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_shirtcmu.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "CMU Shirt"
3 | ITEM.description = "A light-blue shirt commonly utilised by the Civil Medical Union. Two armbands are stiched on to its sleeve, each with a red medical cross."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'torso'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.bodyGroups = {
8 | ["Torso"] = 13
9 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/ranks/sh_05.lua:
--------------------------------------------------------------------------------
1 |
2 | RANK.name = '05'
3 | RANK.description = "Рядовой сотрудник Гражданской Обороны 5-го ранга. Прошел базовую тренировку, но еще не достаточно опытен. Основной целью является патрулирование города. Не имеет подавителей характера, и испытывает полную боль."
4 | RANK.weapons = {'ix_stunstick'}
5 | RANK.xp = 1000
6 | RANK.armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_12"
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansgrey.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Old Grey Jeans"
2 | ITEM.description = "A pair of old ripped grey jeans. They are stained and clearly well-used, but hold up dispite all this."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 11 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_pantsgreytracksuit.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Grey Striped Tracksuit Pants"
2 | ITEM.description = "A pair of grey striped tracksuit pants. They're comfortable, but easily ripped."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 4 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_badge.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Badge"
3 | ITEM.description = "A white keycard embedded wiih the wearer's Civil Identification. It is commonly issued to members of the Civil Administration,"
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.outfitCategory = 'badge'
6 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
7 | ITEM.newSkin = 1
8 | ITEM.bodyGroups = {
9 | ["Badge"] = 1
10 | }
11 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/weapons/sh_shotgun.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Shotgun"
2 | ITEM.description = "A powerful pump-action shotgun."
3 | ITEM.model = "models/weapons/w_shotgun.mdl"
4 | ITEM.class = "weapon_shotgun"
5 | ITEM.weaponCategory = "primary"
6 | ITEM.classes = {CLASS_EOW}
7 | ITEM.width = 3
8 | ITEM.height = 1
9 | ITEM.iconCam = {
10 | pos = Vector(0, 200, 1),
11 | ang = Angle(0, 270, 0),
12 | fov = 10
13 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansblackripped.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Old Black Jeans"
2 | ITEM.description = "A pair of old ripped black jeans. They are stained and clearly well-used, but hold up dispite all this."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 10 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_suitblackbottom.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Black Suit Trousers"
2 | ITEM.description = "A smart pair of black suit trousers, fitted well and packed with a pair of smarter black citizen boots."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 16 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/ammo/sh_rocketammo.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "RPG Missile"
2 | ITEM.model = "models/weapons/w_missile_closed.mdl"
3 | ITEM.ammo = "rpg_round" -- type of the ammo
4 | ITEM.ammoAmount = 1 -- amount of the ammo
5 | ITEM.width = 2
6 | ITEM.description = "A Package of %s Rockets"
7 | ITEM.iconCam = {
8 | ang = Angle(-0.70499622821808, 268.25439453125, 0),
9 | fov = 12.085652091515,
10 | pos = Vector(7, 200, -2)
11 | }
12 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_suitmalecabottom.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Tan CA Suit Trousers"
2 | ITEM.description = "An even smarter pair of tan suit trousers, fitted well and packed with a pair of the smartest brown dress shoes."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 18 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansrebelblue.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Blue Padded Rebel Jeans"
2 | ITEM.description = "A pair of well-used blue jeans, fitted with thigh-strapped armour plating. The plating is equivalent to IIA protection."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 14 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_pantsblackwork.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Black Work Pants"
2 | ITEM.description = "An old pair of patched work pants. They have reinforcement at the knee and seams to help reduce ripping and ware whilst working."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 5 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/weapons/sh_crowbar.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Crowbar"
2 | ITEM.description = "A slightly rusty looking crowbar."
3 | ITEM.model = "models/weapons/w_crowbar.mdl"
4 | ITEM.class = "weapon_crowbar"
5 | ITEM.weaponCategory = "melee"
6 | ITEM.flag = "v"
7 | ITEM.width = 2
8 | ITEM.height = 1
9 | ITEM.iconCam = {
10 | ang = Angle(-0.23955784738064, 270.44906616211, 0),
11 | fov = 10.780103254469,
12 | pos = Vector(0, 200, 0)
13 | }
14 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansrebelblack.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Black Padded Rebel Jeans"
2 | ITEM.description = "A pair of well-used black jeans, fitted with thigh-strapped armour plating. The plating is equivalent to IIA protection."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 13 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansrebelgreen.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Green Padded Rebel Jeans"
2 | ITEM.description = "A pair of well-used green jeans, fitted with thigh-strapped armour plating. The plating is equivalent to IIA protection."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 12 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_pantsarmy.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Surplus Combat Trousers"
2 | ITEM.description = "A pair of well-made surplus army combat trousers. They have some staining, but fit well and are comfortable - not to mention warm."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 8 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/weapons/sh_ar2.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Pulse-Rifle"
2 | ITEM.description = "A dark energy powered assault rifle."
3 | ITEM.model = "models/weapons/w_irifle.mdl"
4 | ITEM.class = "weapon_ar2"
5 | ITEM.weaponCategory = "primary"
6 | ITEM.classes = {CLASS_EOW}
7 | ITEM.width = 4
8 | ITEM.height = 2
9 | ITEM.iconCam = {
10 | ang = Angle(-0.70499622821808, 268.25439453125, 0),
11 | fov = 12.085652091515,
12 | pos = Vector(0, 200, 0)
13 | }
--------------------------------------------------------------------------------
/ams/diseases/sh_example.lua:
--------------------------------------------------------------------------------
1 |
2 | local DISEASE = ix.AMS.Diseases:New()
3 | DISEASE.uniqueID = 'example'
4 | DISEASE.name = 'Example'
5 | DISEASE.immuneFactions = {FACTION_OTA}
6 | DISEASE.Infect = function(client, character)
7 | client:SetLocalVar("ExampleDisease", true)
8 | end
9 | DISEASE.Disinfect = function(client, character)
10 | client:SetLocalVar("ExampleDisease", false)
11 | end
12 | ix.AMS.Diseases:Register(DISEASE)
13 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_pantsota.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "OTA Trousers"
2 | ITEM.description = "A well-plated and comfortable pair of OTA trousers, fit with combat boots. The plating is covering the thighs, and is equivalent to II level protection."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 19 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_health_kit.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Health Kit"
3 | ITEM.model = Model("models/items/healthkit.mdl")
4 | ITEM.description = "A white packet filled with medication."
5 | ITEM.category = "Medical"
6 | ITEM.price = 65
7 |
8 | ITEM.functions.Apply = {
9 | sound = "items/medshot4.wav",
10 | OnRun = function(itemTable)
11 | local client = itemTable.player
12 |
13 | client:SetHealth(math.min(client:Health() + 50, 100))
14 | end
15 | }
16 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_jeansrebeltactical.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Tactical Black Padded Rebel Jeans"
2 | ITEM.description = "A pair of well-used tactical black jeans, fitted with thigh-strapped armour plating. The plating is equivalent to IIA protection."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 15 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_health_vial.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Health Vial"
3 | ITEM.model = Model("models/healthvial.mdl")
4 | ITEM.description = "A small vial with green liquid."
5 | ITEM.category = "Medical"
6 | ITEM.price = 40
7 |
8 | ITEM.functions.Apply = {
9 | sound = "items/medshot4.wav",
10 | OnRun = function(itemTable)
11 | local client = itemTable.player
12 |
13 | client:SetHealth(math.min(client:Health() + 20, client:GetMaxHealth()))
14 | end
15 | }
16 |
--------------------------------------------------------------------------------
/muteping.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Mute Camera Pings'
2 | PLUGIN.description = 'Mute Combine Camera "beep" pings'
3 | PLUGIN.author = 'Bilwin'
4 |
5 | function PLUGIN:EntityEmitSound(soundData)
6 | if soundData.Entity && IsValid(soundData.Entity) then
7 | if soundData.Entity:GetClass() == 'npc_combine_camera' then
8 | if soundData.SoundName == 'npc/turret_floor/ping.wav' then
9 | return false
10 | end
11 | end
12 | end
13 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/weapons/sh_smg1.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "MP7"
2 | ITEM.description = "A compact, fully automatic sub-machine gun."
3 | ITEM.model = "models/weapons/w_smg1.mdl"
4 | ITEM.class = "weapon_smg1"
5 | ITEM.weaponCategory = "primary"
6 | ITEM.classes = {CLASS_EMP, CLASS_EOW}
7 | ITEM.flag = "V"
8 | ITEM.width = 3
9 | ITEM.height = 2
10 | ITEM.iconCam = {
11 | ang = Angle(-0.020070368424058, 270.40155029297, 0),
12 | fov = 7.2253324508038,
13 | pos = Vector(0, 200, -1)
14 | }
--------------------------------------------------------------------------------
/apartments/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = 'Apartments'
4 | PLUGIN.description = 'Adds apartments lockers and features'
5 | PLUGIN.author = 'Bilwin'
6 | PLUGIN.schema = 'HL2 RP'
7 |
8 | local PL = FindMetaTable("Player")
9 | function PL:CalculateTrace(size)
10 | local data = {}
11 | data.start = self:GetShootPos()
12 | data.endpos = data.start + self:GetAimVector() * size
13 | data.filter = self
14 | return util.TraceLine(data)
15 | end
16 |
17 | ix.util.Include('sv_hooks.lua')
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_shirtpoliticalconscript.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Political Conscript Top"
3 | ITEM.description = "A dirty and depressing thin top, with a combine logo and serial number sewn on the back, front and arm - this seems to be the prisoner I-D. It's covered in all sorts of stains, clearly reused. There's a UU stamp on the itchy label."
4 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
5 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
6 | ITEM.bodyGroups = {
7 | ["Torso"] = 21
8 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/weapons/sh_pistol.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = ".9mm Pistol"
2 | ITEM.description = "A sidearm utilising 9mm Ammunition."
3 | ITEM.model = "models/weapons/w_pistol.mdl"
4 | ITEM.class = "weapon_pistol"
5 | ITEM.weaponCategory = "sidearm"
6 | ITEM.classes = {CLASS_EMP, CLASS_EOW}
7 | ITEM.flag = "V"
8 | ITEM.width = 2
9 | ITEM.height = 1
10 | ITEM.iconCam = {
11 | ang = Angle(0.33879372477531, 270.15808105469, 0),
12 | fov = 5.0470897275697,
13 | pos = Vector(0, 200, -1)
14 | }
15 |
--------------------------------------------------------------------------------
/thirdpersonbind.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Third-person view bind'
2 | PLUGIN.description = 'Allows you toggle third-person view using bind'
3 | PLUGIN.author = 'Bilwin'
4 | PLUGIN.button = KEY_P
5 |
6 | if CLIENT then
7 | local Cooldown
8 | function PLUGIN:PlayerButtonDown(_, button)
9 | if button == self.button && (Cooldown || 0) < CurTime() then
10 | RunConsoleCommand('ix_togglethirdperson')
11 | Cooldown = CurTime() + 0.1
12 | end
13 | end
14 | end
--------------------------------------------------------------------------------
/.deprecated/diseases/sh_lang.lua:
--------------------------------------------------------------------------------
1 |
2 | ix.lang.AddTable("english", {
3 | diseasesInfected = "Player %s was infected with %s disease",
4 | diseasesDisinfected = "Player %s has been cured of %s",
5 | diseasesFullyDisinfected = "Player %s has been fully cured"
6 | })
7 |
8 | ix.lang.AddTable("russian", {
9 | diseasesInfected = "Игрок %s был инфицирован болезню %s",
10 | diseasesDisinfected = "Игрок %s был вылечен от болезни %s",
11 | diseasesFullyDisinfected = "Игрок %s был полностью вылечен от болезней"
12 | })
13 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/weapons/sh_357.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "357"
2 | ITEM.description = "A sidearm utilising .357 Caliber ammunition."
3 | ITEM.model = "models/weapons/w_357.mdl"
4 | ITEM.class = "weapon_357"
5 | ITEM.weaponCategory = "sidearm"
6 | ITEM.classes = {CLASS_EOW}
7 | ITEM.flag = "V"
8 | ITEM.width = 2
9 | ITEM.height = 1
10 | ITEM.iconCam = {
11 | ang = Angle(-17.581502914429, 250.7974395752, 0),
12 | fov = 5.412494001838,
13 | pos = Vector(57.109928131104, 181.7945098877, -60.738327026367)
14 | }
15 |
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_pantspoliticalconscript.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Political Conscript Trousers"
2 | ITEM.description = "A dirty and depressing pair of thin black trousers with a white stripe down the side. They're covered in all sorts of stains, clearly reused. There's a UU stamp on the itchy label."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 7 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/wounds/sh_plugin.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Simple Wounds'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | ix.util.Include('sv_hooks.lua')
5 |
6 | ix.char.RegisterVar('bleeding', {
7 | field = 'bleeding',
8 | fieldType = ix.type.bool,
9 | default = false,
10 | isLocal = true,
11 | bNoDisplay = true
12 | })
13 |
14 | ix.char.RegisterVar('fractured', {
15 | field = 'fractured',
16 | fieldType = ix.type.bool,
17 | default = false,
18 | isLocal = true,
19 | bNoDisplay = true
20 | })
--------------------------------------------------------------------------------
/screenclicker.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Screen clicker'
2 | PLUGIN.author = 'Bilwin'
3 | PLUGIN.description = 'Allows using screen clicker'
4 | PLUGIN.button = KEY_F2
5 |
6 | if CLIENT then
7 | local Enabled = false
8 | local Cooldown
9 | function PLUGIN:PlayerButtonDown(_, button)
10 | if button == self.button && (Cooldown || 0) < CurTime() then
11 | gui.EnableScreenClicker(not Enabled)
12 | Cooldown = CurTime() + 0.1
13 | Enabled = not Enabled
14 | end
15 | end
16 | end
--------------------------------------------------------------------------------
/fixstep.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Third-person double step fix'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | if CLIENT then
5 | local steps = {'.stepleft', '.stepright'}
6 | function PLUGIN:EntityEmitSound(data)
7 | if not ix.option.Get('thirdpersonEnabled', false) then return end
8 | if not IsValid(data.Entity) && not data.Entity:IsPlayer() then return end
9 |
10 | local sName = data.OriginalSoundName
11 | if sName:find(steps[1]) || sName:find(steps[2]) then
12 | return false
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/sh_config.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | ix.config.Add("cpMaxPlayersPercent", 25, "Сколько % игроков может быть за Г.О.", nil, {
5 | data = {min = 1, max = 75},
6 | category = PLUGIN.name
7 | })
8 |
9 | ix.config.Add("cpMaxOfficer", 1, "Сколько максимум Офицеров может быть на сервере", nil, {
10 | data = {min = 1, max = 100},
11 | category = PLUGIN.name
12 | })
13 |
14 | ix.config.Add("cpCityNumber", 17, "Номер города, для выдачи кода Г.О.", nil, {
15 | data = {min = 1, max = 100},
16 | category = PLUGIN.name
17 | })
18 |
--------------------------------------------------------------------------------
/radios/entities/entities/ix_radio/cl_init.lua:
--------------------------------------------------------------------------------
1 |
2 | include("shared.lua")
3 |
4 | function ENT:Draw()
5 | self:DrawModel()
6 | end
7 |
8 | ENT.PopulateEntityInfo = true
9 | function ENT:OnPopulateEntityInfo(container)
10 | local text = container:AddRow("name")
11 | text:SetImportant()
12 | text:SetText( "Radio" )
13 | text:SizeToContents()
14 |
15 | local description = container:AddRow("description")
16 | description:SetBackgroundColor( Color(0, 0, 0, 155) )
17 | description:SetText( "An old radio with some kind of device inside" )
18 | description:SizeToContents()
19 | end
20 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/ranks/sh_04.lua:
--------------------------------------------------------------------------------
1 |
2 | RANK.name = '04'
3 | RANK.description = "Сотрудник Гражданской Обороны 4-го ранга. Прошёл продвинутую тренировку, имеет опыт в работе с гражданами. Во время патрулирования, уже сам может вынести вердикт нарушителям. 04 подвергается курсу пропаганды и потреблению специальных препаратов в рационах, поэтому боль немного притупляется, а чувство страха начинает соперничать с чувством Долга."
4 | RANK.weapons = {'ix_stunstick'}
5 | RANK.xp = 3000
6 | RANK.IsConnectGroup = true
7 | RANK.armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_13"
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/ranks/sh_02.lua:
--------------------------------------------------------------------------------
1 |
2 | RANK.name = '02'
3 | RANK.description = "Сотрудник Гражданской Обороны 2-го ранга. Опытный сотрудник Гражданской Обороны. Прошёл продвинутую тренировку в обращении со спец. вооружением. 02 подвергается усиленному курсу пропаганды и увеличенному потреблению специальных препаратов в рационах, поэтому боль немного притупляется и страх становится на равне с подсознательным долгом перед альянсом."
4 | RANK.weapons = {'ix_stunstick'}
5 | RANK.xp = 7000
6 | RANK.IsConnectGroup = true
7 | RANK.armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_15"
--------------------------------------------------------------------------------
/extended_outfits/items/.examples/sh_pantsmetropolice.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Metropolice Trousers"
2 | ITEM.description = "A pair of rugged and somewhat comfortable metropolice trousers, addorning the typical sickly green colour and white stripe down the sides. These are clearly UU property, as shown on the label's UU stamp and serial numbers. It comes with comfortable rubber combat boots."
3 | ITEM.model = "models/props_c17/BriefCase001a.mdl"
4 | ITEM.factionList = {FACTION_CITIZEN, FACTION_ADMIN}
5 | ITEM.bodyGroups = {
6 | ["Legs"] = 9 -- or the other bodygroups e.g Torso or Hands or Kevlar etc. Get number from
7 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/ranks/sh_03.lua:
--------------------------------------------------------------------------------
1 |
2 | RANK.name = '03'
3 | RANK.description = "Сотрудник Гражданской Обороны 3-го ранга. Прошёл продвинутую тренировку по работе с личным составом. Во время патрулирования или каких-либо операций, принимает ответственность за выполнение задачи на себя. 03 подвергается усиленному курсу пропаганды и увеличенному потреблению специальных препаратов в рационах, поэтому боль немного притупляется, а чувство страха уже начинает исчезать."
4 | RANK.weapons = {'ix_stunstick'}
5 | RANK.xp = 5000
6 | RANK.IsConnectGroup = true
7 | RANK.armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_14"
--------------------------------------------------------------------------------
/stacks/sh_plugin.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Stackable Items'
2 | PLUGIN.description = 'Adds the ability to stack items into one'
3 | PLUGIN.author = 'Bilwin'
4 |
5 | function ix.meta.inventory:GetItemCount(uniqueID, onlyMain)
6 | local i = 0
7 | local stacks
8 |
9 | for _, v in pairs(self:GetItems(onlyMain)) do
10 | if v.uniqueID == uniqueID then
11 | stacks = v.data.stacks
12 |
13 | if stacks && stacks >= 2 then
14 | i = i + stacks
15 | else
16 | i = i + 1
17 | end
18 | end
19 | end
20 |
21 | return i
22 | end
--------------------------------------------------------------------------------
/gaszones/sh_commands.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | do
5 | ix.command.Add("CharSetToxicity", {
6 | description = "Set the toxicity value to the player",
7 | adminOnly = true,
8 | arguments = {
9 | ix.type.character,
10 | bit.bor(ix.type.number, ix.type.optional)
11 | },
12 | OnRun = function(self, client, target, value)
13 | if !value then value = 0 end
14 | target:SetToxicity(value)
15 | client:Notify(Format('You set %s toxicity to %s', target:GetName(), value))
16 | end,
17 | bNoIndicator = true
18 | })
19 | end
--------------------------------------------------------------------------------
/cameras/sv_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | -- optimizate
3 | function PLUGIN:Think()
4 | local cameras_ents = ents.FindByClass("npc_combine_camera")
5 |
6 | for _, camera in ipairs(cameras_ents) do
7 | local near_ents = ents.FindInSphere( camera:GetPos(), 335 )
8 | for _, target in ipairs(near_ents) do
9 | if not ( target:IsPlayer() and camera:IsLineOfSightClear( target:GetPos() ) ) then continue end
10 | --...
11 | end
12 | end
13 | end
14 |
15 | function PLUGIN:EntityTakeDamage(target, dmginfo)
16 | if target:GetClass() == "npc_combine_camera" then
17 | dmginfo:SetDamage(0)
18 | end
19 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/thirdpersonbind.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = 'Third-person view bind'
3 | PLUGIN.description = 'Allows you toggle third-person view using bind'
4 | PLUGIN.author = 'Bilwin'
5 | PLUGIN.bind = KEY_P
6 |
7 | if CLIENT then
8 | local Cooldown
9 | function PLUGIN:PlayerButtonDown(me, button)
10 | if button == self.bind then
11 | if IsFirstTimePredicted() then
12 | if (Cooldown || 0) < CurTime() then
13 | RunConsoleCommand("ix_togglethirdperson")
14 | Cooldown = CurTime() + 0.1
15 | end
16 | end
17 | end
18 | end
19 | end
--------------------------------------------------------------------------------
/.deprecated/diseases/diseases/blindness.lua:
--------------------------------------------------------------------------------
1 |
2 | return {
3 | name = "Blindness",
4 | description = "A complete loss of one of your five senses",
5 | canGetRandomly = true,
6 | immuneFactions = { FACTION_MPF, FACTION_OTA },
7 |
8 | functionsIsClientside = true,
9 | OnCall = [[
10 | local function blind()
11 | alpha = math.abs(math.cos(RealTime() * .5) * 255)
12 | draw.RoundedBox(0, 0, 0, ScrW(), ScrH(), ColorAlpha(Color(0,0,0), alpha))
13 | end
14 | hook.Add("HUDPaint", "Diseases_blindness", blind)
15 | ]],
16 | OnEnd = [[
17 | hook.Remove("HUDPaint", "Diseases_blindness")
18 | ]]
19 | }
20 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_citizens/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Civil Protection, Citizens Database"
4 | PLUGIN.author = "Bilwin"
5 |
6 | ix.char.RegisterVar("loyalPoints", {
7 | field = "loyalPoints",
8 | fieldType = ix.type.number,
9 | default = 0,
10 | bNoDisplay = true
11 | })
12 |
13 | ix.char.RegisterVar("wanted", {
14 | field = "wanted",
15 | fieldType = ix.type.bool,
16 | default = false,
17 | bNoDisplay = true
18 | })
19 |
20 | ix.char.RegisterVar("CID", {
21 | field = "CID",
22 | fieldType = ix.type.bool,
23 | default = false,
24 | bNoDisplay = true
25 | })
26 |
27 | ix.util.Include("sv_plugin.lua")
28 | ix.util.Include("sh_cmds.lua")
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/screenclicker.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = 'Screen clicker'
3 | PLUGIN.author = 'Bilwin'
4 | PLUGIN.description = 'Allows using screen clicker'
5 | PLUGIN.bind = KEY_F2
6 |
7 | if CLIENT then
8 | local Enabled = false
9 | local Cooldown
10 | function PLUGIN:PlayerButtonDown(me, button)
11 | if button == self.bind then
12 | if IsFirstTimePredicted() then
13 | if (Cooldown || 0) < CurTime() then
14 | gui.EnableScreenClicker(!Enabled)
15 | Cooldown = CurTime() + 0.1
16 | Enabled = !Enabled
17 | end
18 | end
19 | end
20 | end
21 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/ranks/sh_01.lua:
--------------------------------------------------------------------------------
1 |
2 | RANK.name = '01'
3 | RANK.description = "Капитан Гражданской Обороны 1-го ранга. Данный сотрудник является наглядным образцом добросовестной службы. В некоторых ситуациях исполняет роль заместителя офицера. Без сострадания относится к простым гражданам. Подвергается более усиленному курсу пропаганды и увеличенному потреблению специальных препаратов в рационах, поэтому боль притупляется и страх становится значительно меньше, чем подсознательный долг перед альянсом."
4 | RANK.weapons = {'ix_stunstick'}
5 | RANK.xp = 10000
6 | RANK.IsCanTake = true
7 | RANK.IsConnectGroup = true
8 | RANK.armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_16"
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_ration.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Ration"
3 | ITEM.model = Model("models/weapons/w_package.mdl")
4 | ITEM.description = "A shrink-wrapped packet containing some food and money."
5 | ITEM.items = {}
6 |
7 | ITEM.functions.Open = {
8 | OnRun = function(itemTable)
9 | local client = itemTable.player
10 | local character = client:GetCharacter()
11 |
12 | for k, v in ipairs(itemTable.items) do
13 | if (!character:GetInventory():Add(v)) then
14 | ix.item.Spawn(v, client)
15 | end
16 | end
17 |
18 | character:GiveMoney(ix.config.Get("rationTokens", 20))
19 | client:EmitSound("ambient/fire/mtov_flame2.wav", 75, math.random(160, 180), 0.35)
20 | end
21 | }
22 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/ranks/sh_ofc.lua:
--------------------------------------------------------------------------------
1 |
2 | RANK.name = 'OFC'
3 | RANK.description = "Офицер Гражданской Обороны. Прошёл дополнительную тренировку по работе с личным составом. Данный сотрудник следит за работой отрядов и направляет нужных юнитов в требуемые сектора. Без сострадания относится к простым гражданам. Получает новую униформу и бронежилет нового класса. Из-за принимаемых препаратов боль сильно притупляется, а чувство страха заменяет подсознательный долг перед альянсом."
4 | RANK.weapons = {'ix_stunstick'}
5 | RANK.xp = 16000
6 | RANK.IsCanTake = true
7 | RANK.IsCMD = true
8 | RANK.IsCanCreateGroup = true
9 | RANK.armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_17"
10 | RANK.is_limited = true
--------------------------------------------------------------------------------
/.deprecated/diseases/items/base/sh_medicine.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Medicine"
2 | ITEM.model = "models/props_junk/garbage_metalcan001a.mdl"
3 | ITEM.description = "..."
4 | ITEM.width = 1
5 | ITEM.height = 1
6 | ITEM.adminPills = false
7 | ITEM.category = "Medicine"
8 | ITEM.useSound = "items/medshot4.wav"
9 | ITEM.healing = {}
10 |
11 | ITEM.functions.Apply = {
12 | name = "Apply",
13 | tip = "useTip",
14 | icon = "icon16/arrow_right.png",
15 | OnRun = function(item)
16 | item.player:EmitSound(item.useSound, 70)
17 |
18 | if item.adminPills then
19 | ix.Diseases:RemoveAllDiseases(item.player)
20 |
21 | return true
22 | end
23 |
24 | ix.Diseases:DisinfectPlayer(item.player, item.healing)
25 |
26 | return true
27 | end,
28 | }
--------------------------------------------------------------------------------
/specialradios/sv_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | function ix.specialRadios:RegisterChannel(channelName)
3 | if self[channelName] then return end
4 | self[channelName] = true
5 | end
6 |
7 | function ix.specialRadios:RegisterFaction(faction, channels)
8 | if !faction then return end
9 | if !istable(channels) then return end
10 | self.factionsData[faction] = channels
11 | end
12 |
13 | function ix.meta.character:HasAccessToChannel(channelName)
14 | if ix.specialRadios[channelName] then
15 | if !istable(ix.specialRadios.factionsData[self:GetFaction()]) then return false end
16 | return table.HasValue(ix.specialRadios.factionsData[self:GetFaction()], channelName)
17 | else
18 | return false, nil
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/fixshadows.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Disable door & player shadows'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | if SERVER then
5 | function PLUGIN:InitPostEntity()
6 | for _, v in ipairs( ents.FindByClass('prop_door_rotating') ) do
7 | v:DrawShadow(false)
8 | end
9 | end
10 | end
11 |
12 | if CLIENT then
13 | timer.Create(PLUGIN.name, 10, 0, function() -- same
14 | for _, client in ipairs(player.GetAll()) do
15 | client:DrawShadow(false)
16 | end
17 | end)
18 |
19 | function PLUGIN:InitPostEntity()
20 | for _, v in ipairs( ents.FindByClass('prop_door_rotating') ) do
21 | if not IsValid(v) then continue end
22 | v:DrawShadow(false)
23 | end
24 | end
25 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_arsenal/libs/sh_arsenal.lua:
--------------------------------------------------------------------------------
1 |
2 | ix.cpArsenal = ix.cpArsenal || {}
3 | ix.cpArsenal.list = ix.cpArsenal.list || {}
4 |
5 | function ix.cpArsenal:RegisterCraft(uniqueID, data)
6 | if !data || !uniqueID then
7 | ErrorNoHalt("ix.cpArsenal:RegisterCraft invalid data or uniqueID")
8 | end
9 |
10 | data.cost = data.cost || 0
11 | data.cooldown = data.cooldown || 0
12 | data.items = data.items || {}
13 | data.tokens = data.tokens || 0
14 | data.rank = data.rank
15 |
16 | ix.cpArsenal.list[uniqueID] = data
17 | end
18 |
19 | function ix.cpArsenal:Get(uniqueID)
20 | if !uniqueID then return end
21 | if ix.cpArsenal.list[uniqueID] then
22 | return ix.cpArsenal.list[uniqueID]
23 | end
24 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pda/derma/cl_pda_frame.lua:
--------------------------------------------------------------------------------
1 |
2 | local PANEL = {}
3 |
4 | surface.CreateFont("ixPDAButton", {
5 | font = "Open Sans",
6 | extended = true,
7 | size = SScaleMin(19/2),
8 | weight = 500,
9 | antialias = true,
10 | shadow = true
11 | })
12 |
13 | local pda_frame = Material("svhl2rp/combinepda.png")
14 | function PANEL:Paint(w, h)
15 | surface.SetDrawColor(255, 255, 255)
16 | surface.SetMaterial(pda_frame)
17 | surface.DrawTexturedRect(0, 0, w, h)
18 |
19 | surface.SetFont("ixPDAButton")
20 | surface.SetTextColor(255, 255, 255, 200)
21 | surface.SetTextPos(SScaleMin(240), VScale(11.5))
22 | surface.DrawText(ix.date.Construct(ix.date.GetSerialized(ix.date.Get())):format("%Y/%m/%d - %H:%M:%S"))
23 | end
24 |
25 | vgui.Register("PDAFrame", PANEL, "Panel")
26 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/meta/sh_player.lua:
--------------------------------------------------------------------------------
1 |
2 | function PLAYER:IsCombine()
3 | local faction = self:Team()
4 | return faction == FACTION_MPF or faction == FACTION_OTA
5 | end
6 |
7 | function PLAYER:IsDispatch()
8 | local name = self:Name()
9 | local faction = self:Team()
10 | local bStatus = faction == FACTION_OTA
11 |
12 | if (!bStatus) then
13 | for k, v in ipairs({ "SCN", "DvL", "SeC" }) do
14 | if (Schema:IsCombineRank(name, v)) then
15 | bStatus = true
16 |
17 | break
18 | end
19 | end
20 | end
21 |
22 | return bStatus
23 | end
24 |
25 | function PLAYER:CalculateTrace(size)
26 | local data = {}
27 | data.start = self:GetShootPos()
28 | data.endpos = data.start + self:GetAimVector() * size
29 | data.filter = self
30 | return util.TraceLine(data)
31 | end
32 |
--------------------------------------------------------------------------------
/apartments/items/sh_aptlock.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = "Apartment Lock"
2 | ITEM.description = "A metal apparatus applied to doors, utilised by the Combine Civil Authority for Apartments." --A metal apparatus applied to doors.
3 | ITEM.price = 250
4 | ITEM.model = "models/props_combine/combine_lock01.mdl"
5 | ITEM.category = "Miscellaneous"
6 | ITEM.factions = {FACTION_CP}
7 | ITEM.functions.Place = {
8 | OnRun = function(item)
9 | local data = {}
10 | data.start = item.player:GetShootPos()
11 | data.endpos = data.start + item.player:GetAimVector()*128
12 | data.filter = item.player
13 |
14 | if (IsValid(scripted_ents.Get("ix_apartlock"):SpawnFunction(item.player, util.TraceLine(data)))) then
15 | item.player:EmitSound("npc/roller/mine/rmine_blades_out3.wav", 100, 90)
16 | else
17 | return false
18 | end
19 | end
20 | }
--------------------------------------------------------------------------------
/.deprecated/diseases/libs/sh_timer.lua:
--------------------------------------------------------------------------------
1 | --source: https://github.com/cresterienvogel/gmod-misc/blob/master/ent_timer.lua
2 |
3 | local ent = FindMetaTable("Entity")
4 |
5 | function ent:_SetSimpleTimer(delay, func)
6 | timer.Simple(delay, function()
7 | if IsValid(self) then
8 | func()
9 | end
10 | end)
11 | end
12 |
13 | function ent:_SetTimer(identifier, delay, repetitions, func)
14 | timer.Create(self:EntIndex() .. "[" .. identifier .. "]", delay, repetitions, function()
15 | if IsValid(self) then
16 | func()
17 | end
18 | end)
19 | end
20 |
21 | function ent:_RemoveTimer(identifier)
22 | timer.Remove(self:EntIndex() .. "[" .. identifier .. "]")
23 | end
24 |
25 | function ent:_TimerExists(identifier)
26 | local _identifier = self:EntIndex() .. "[" .. identifier .. "]"
27 | return timer.Exists(_identifier), _identifier
28 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/sh_configs.lua:
--------------------------------------------------------------------------------
1 |
2 | ix.currency.symbol = ""
3 | ix.currency.singular = "token"
4 | ix.currency.plural = "tokens"
5 |
6 | ix.config.SetDefault("scoreboardRecognition", true)
7 | ix.config.SetDefault("music", "music/hl2_song19.mp3")
8 | ix.config.SetDefault("maxAttributes", 60)
9 |
10 | ix.config.Add("rationTokens", 20, "The amount of tokens that a person will get from a ration", nil, {
11 | data = {min = 0, max = 1000},
12 | category = "economy"
13 | })
14 |
15 | ix.config.Add("rationInterval", 300, "How long a person needs to wait in seconds to get their next ration", nil, {
16 | data = {min = 0, max = 86400},
17 | category = "economy"
18 | })
19 |
20 | ix.config.Add("deleteNpcWeaponOnDeath", true, "Should NPCs be not allowed to drop their weapons after death?", nil, {
21 | category = "general"
22 | })
23 |
--------------------------------------------------------------------------------
/apply.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = '/Apply chat command'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | local netName = ('%s - Recognize'):format(PLUGIN.name)
5 | function PLUGIN:InitializedChatClasses()
6 | ix.command.Add('Apply', {
7 | description = 'Introduce yourself',
8 | OnRun = function(_, client)
9 | local char = client:GetCharacter()
10 | if not char then return end
11 | local cid = char:GetInventory():HasItem('cid')
12 |
13 | if cid then
14 | ix.chat.Send(client, 'ic', cid:GetData('name', 'N/A') .. ', #' .. cid:GetData('id', 'N/A'))
15 | else
16 | ix.chat.Send(client, 'ic', char:GetName())
17 | end
18 |
19 | net.Start(netName, true)
20 | net.Send(client)
21 | end
22 | })
23 | end
24 |
25 | if CLIENT then
26 | net.Receive(netName, function()
27 | net.Start('ixRecognize', true)
28 | net.WriteUInt(2, 2)
29 | net.SendToServer()
30 | end)
31 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/item_collide.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Item collide fixer"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.description = "Stop killing server through item collisions bounds"
6 | PLUGIN.BlockedCollideEntities = {}
7 | PLUGIN.BlockedCollideEntities['ix_item'] = true
8 | PLUGIN.BlockedCollideEntities['ix_money'] = true
9 | PLUGIN.BlockedCollideEntities['ix_shipment'] = true
10 |
11 | function PLUGIN:OnItemSpawned(ent)
12 | ent:SetCustomCollisionCheck(true)
13 | end
14 |
15 | function PLUGIN:OnMoneySpawned(ent)
16 | ent:SetCustomCollisionCheck(true)
17 | end
18 |
19 | function PLUGIN:OnShipmentSpawned(ent)
20 | ent:SetCustomCollisionCheck(true)
21 | end
22 |
23 | function PLUGIN:ShouldCollide(ent1, ent2)
24 | if self.BlockedCollideEntities[ent1:GetClass()] && self.BlockedCollideEntities[ent2:GetClass()] then return false end
25 | end
--------------------------------------------------------------------------------
/equipdrop.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Equipped Items Drop'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | if SERVER then
5 | function PLUGIN:PostPlayerDeath(client)
6 | local char = client:GetCharacter()
7 | if not char then return end
8 |
9 | local items = char:GetInventory():GetItems()
10 | if not items then return end
11 |
12 | for _, v in pairs(items) do
13 | if hook.Run('ShouldItemBeingDropped', client, char, v) == false then continue end
14 |
15 | if v:GetData('equip') then
16 | v:SetData('equip', false)
17 | end
18 |
19 | ix.item.Spawn(v.uniqueID, client:GetPos() + Vector(0, 0, 2), function()
20 | v:Remove()
21 | end, Angle(), v.data)
22 | end
23 | end
24 |
25 | function PLUGIN:ShouldItemBeingDropped(client, character, item)
26 | end
27 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_combinelock.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Combine Lock"
3 | ITEM.description = "A metal apparatus applied to doors."
4 | ITEM.model = Model("models/props_combine/combine_lock01.mdl")
5 | ITEM.width = 1
6 | ITEM.height = 2
7 | ITEM.iconCam = {
8 | pos = Vector(-0.5, 50, 2),
9 | ang = Angle(0, 270, 0),
10 | fov = 25.29
11 | }
12 |
13 | ITEM.functions.Place = {
14 | OnRun = function(itemTable)
15 | local client = itemTable.player
16 | local data = {}
17 | data.start = client:GetShootPos()
18 | data.endpos = data.start + client:GetAimVector() * 96
19 | data.filter = client
20 |
21 | local lock = scripted_ents.Get("ix_combinelock"):SpawnFunction(client, util.TraceLine(data))
22 |
23 | if (IsValid(lock)) then
24 | client:EmitSound("physics/metal/weapon_impact_soft2.wav", 75, 80)
25 | else
26 | return false
27 | end
28 | end
29 | }
30 |
--------------------------------------------------------------------------------
/ams/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Advanced Medical System"
4 | PLUGIN.description = "Introduction of heavy medicine and new features"
5 | PLUGIN.author = "Bilwin"
6 | PLUGIN.schema = "Any"
7 |
8 | ix.AMS = ix.AMS or {}
9 | ix.util.Include("sv_meta.lua")
10 | ix.util.Include("sv_plugin.lua")
11 | ix.util.IncludeDir(PLUGIN.folder..'/diseases', true)
12 | ix.util.IncludeDir(PLUGIN.folder..'/wounds', true)
13 |
14 | -- Limbs
15 | ix.util.Include("sh_limbs.lua")
16 | ix.util.Include("sv_limbs.lua")
17 | ix.util.Include("sv_limbsmeta.lua")
18 |
19 | do
20 | ix.char.RegisterVar("diseases", {
21 | field = "diseases",
22 | fieldType = ix.type.string,
23 | default = '',
24 | bNoDisplay = true
25 | })
26 |
27 | ix.char.RegisterVar("wounds", {
28 | field = "wounds",
29 | fieldType = ix.type.string,
30 | default = '',
31 | bNoDisplay = true
32 | })
33 | end
34 |
--------------------------------------------------------------------------------
/info_nodes.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Nodes'
2 | PLUGIN.description = 'Comment areas'
3 | PLUGIN.author = 'Bilwin'
4 |
5 | function PLUGIN:SetupAreaProperties()
6 | ix.area.AddType('comment')
7 | ix.area.AddProperty('comment', ix.type.string, '')
8 | end
9 |
10 | if (CLIENT) then
11 | function PLUGIN:OnAreaChanged(oldID, newID)
12 | if LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP then return; end
13 | local storedData = ix.area.stored[newID]
14 | for id, data in pairs(ix.area.stored) do
15 | if id == newID && data.type == 'comment' then
16 | hook.Run('EnteredCommentArea', data)
17 | end
18 | end
19 | end
20 |
21 | function PLUGIN:EnteredCommentArea(data)
22 | local text = data.properties.comment
23 | if text && text ~= '' then
24 | chat.AddText(color_white, text)
25 | end
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/radios/sv_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | util.AddNetworkString('ixRadio')
3 |
4 | net.Receive("ixRadio", function(_, pl)
5 | local radio = net.ReadEntity()
6 | local songPath = net.ReadString()
7 | if !IsValid(radio) and !IsEntity(radio) then return end
8 | if radio:GetClass() ~= "ix_radio" then return end
9 |
10 | if radio:GetPos():DistToSqr( pl:GetPos() ) > 50000 then return end
11 | radio:SelectSong( songPath )
12 | end)
13 |
14 | function PLUGIN:SaveData()
15 | local data = {}
16 |
17 | for _, v in ipairs( ents.FindByClass("ix_radio") ) do
18 | data[#data + 1] = {v:GetPos(), v:GetAngles()}
19 | end
20 |
21 | ix.data.Set("ixRadios", data)
22 | end
23 |
24 | function PLUGIN:LoadData()
25 | for _, v in ipairs( ix.data.Get("ixRadios") or {} ) do
26 | local dispenser = ents.Create("ix_radio")
27 |
28 | dispenser:SetPos(v[1])
29 | dispenser:SetAngles(v[2])
30 | dispenser:Spawn()
31 | end
32 | end
33 |
--------------------------------------------------------------------------------
/nodes/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Nodes"
3 | PLUGIN.description = "Comment areas"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.schema = "Any"
6 |
7 | function PLUGIN:SetupAreaProperties()
8 | ix.area.AddType("comment")
9 | ix.area.AddProperty("comment", ix.type.string, '')
10 | end
11 |
12 | if (CLIENT) then
13 | function PLUGIN:OnAreaChanged(oldID, newID)
14 | if LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP then return; end
15 | local storedData = ix.area.stored[newID]
16 | for id, data in pairs( ix.area.stored ) do
17 | if (id == newID and data.type == 'comment') then
18 | hook.Run('EnteredCommentArea', data)
19 | end
20 | end
21 | end
22 |
23 | function PLUGIN:EnteredCommentArea(data)
24 | local text = data['properties'].comment
25 | if (text and text ~= '') then
26 | chat.AddText(Color(255, 150, 0), text)
27 | end
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_squad/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Отряды для Гражданской Обороны"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.blacklisted_ranks = {'rct', 'cdt'}
6 |
7 | local CHAR = ix.meta.character
8 | function CHAR:GetSquad()
9 | return self:GetData("cmbSquad", 'gu')
10 | end
11 |
12 | if CLIENT then
13 | function PLUGIN:CreateCharacterInfo(panel)
14 | if (LocalPlayer():IsCombine()) then
15 | panel.squad = panel:Add("ixListRow")
16 | panel.squad:SetList(panel.list)
17 | panel.squad:Dock(TOP)
18 | panel.squad:DockMargin(0, 0, 0, 8)
19 | end
20 | end
21 |
22 | function PLUGIN:UpdateCharacterInfo(panel)
23 | if (LocalPlayer():IsCombine()) then
24 | panel.squad:SetLabelText("Отряд")
25 | panel.squad:SetText(ix.squads.stored[LocalPlayer():GetCharacter():GetSquad()].name)
26 | panel.squad:SizeToContents()
27 | end
28 | end
29 | end
30 |
31 | ix.util.Include("sv_meta.lua")
32 | ix.util.Include("sv_plugin.lua")
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_system/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "CP Jobs"
3 | PLUGIN.author = "Bilwin"
4 | PLUGIN.description = "Даёт возможность брать работу ГэО без вайтЛиста, с помощью NPC"
5 |
6 | ix.util.Include("sh_cmds.lua")
7 | ix.util.Include("sv_plugin.lua")
8 |
9 | ix.ranks.Create('cdt', {
10 | name = 'Кадет',
11 | description = "Кадет гражданский обороны, только что вступил в ряды Гражданской Обороны и не имеет никаких привилегий",
12 | xp = 0,
13 | armband_code = "(255,255,255)_2_(255,0,0,255)_1_(255,255,255,255)_0",
14 | hide = true,
15 | CanTransfer = false
16 | })
17 |
18 | if CLIENT then
19 | netstream.Hook("ixCPRecruitOpen", function()
20 | vgui.Create("ixCP_Recruit")
21 | end)
22 |
23 | net.Receive("ixCombineDisplayUpdate", function(len)
24 | local boolean = net.ReadBool()
25 | if boolean then
26 | vgui.Create("ixCombineDisplay")
27 | else
28 | if IsValid(ix.gui.combine) then
29 | ix.gui.combine:Remove()
30 | end
31 | end
32 | end)
33 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_citizens/sv_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local Schema = Schema
4 |
5 | ix.log.AddType("loyalEvent", function(client, name, loyal)
6 | return string.format("%s поменял лояльность '%s' на '%s'", client:Name(), name, loyal)
7 | end)
8 |
9 | local meta = ix.meta.character
10 | function meta:AddLoyalPoints(amount)
11 | if !isnumber(amount) then return end
12 | self:SetLoyalPoints(self:GetLoyalPoints() + amount)
13 | hook.Run("OnLPChanged", self, self:GetLoyalPoints(), 'add', amount)
14 | end
15 |
16 | function meta:TakeLoyalPoints(amount)
17 | if !isnumber(amount) then return end
18 | amount = math.abs(amount)
19 | local calculated = self:GetLoyalPoints() - amount
20 | calculated = math.Clamp(calculated, -1000, 5500)
21 | self:SetLoyalPoints(calculated)
22 | hook.Run("OnLPChanged", self, self:GetLoyalPoints(), 'take', calculated)
23 | end
24 |
25 | function PLUGIN:OnCPChangedCitizenLP(client, target, amount, reason, stripped)
26 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_specialdoors/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Специальные двери для сил Альянса"
4 | PLUGIN.description = "Запрещаем открывать кадетам важные пункты"
5 | PLUGIN.author = "Bilwin"
6 |
7 | function PLUGIN:InitializedChatClasses()
8 | ix.command.Add("MadePrivateDoor", {
9 | description = "Поставить защиту для двери.",
10 | arguments = {ix.type.string},
11 | superAdminOnly = true,
12 | OnRun = function(self, client, rank)
13 | local targetDoor = client:GetEyeTrace().Entity
14 | if !IsValid(targetDoor) || !targetDoor:IsDoor() || targetDoor:GetClass() != "func_door" then client:Notify("Вы смотрите не на валидную дверь!") return end
15 | if string.Trim(rank) != '' then
16 | local exploded = string.Explode(';', rank)
17 | for _, v in ipairs(exploded) do
18 | print( ix.ranks.stored[v] )
19 | end
20 | end
21 | end
22 | })
23 | end
24 |
--------------------------------------------------------------------------------
/needs/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Primary Needs"
3 | PLUGIN.author = "Bilwin"
4 | PLUGIN.schema = "Any"
5 | PLUGIN.version = 'Need to rework'
6 |
7 | ix.char.RegisterVar("saturation", {
8 | field = "saturation",
9 | fieldType = ix.type.number,
10 | isLocal = true,
11 | bNoDisplay = true,
12 | default = 60
13 | })
14 |
15 | ix.char.RegisterVar("satiety", {
16 | field = "satiety",
17 | fieldType = ix.type.number,
18 | isLocal = true,
19 | bNoDisplay = true,
20 | default = 60
21 | })
22 |
23 | ix.util.Include("sv_hooks.lua")
24 | ix.util.Include("sh_meta.lua")
25 | ix.util.Include("sh_config.lua")
26 | ix.util.Include("sh_commands.lua")
27 |
28 | if CLIENT then
29 | ix.bar.Add( function()
30 | return math.max( LocalPlayer():GetLocalVar("saturation") / 100, 0 )
31 | end, Color( 68, 106, 205 ), nil, "saturation", "hudSaturation" )
32 |
33 | ix.bar.Add( function()
34 | return math.max( LocalPlayer():GetLocalVar("satiety") / 100, 0 )
35 | end, Color( 203, 151, 0 ), nil, "satiety", "hudSatiety" )
36 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_system/sh_cmds.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | function PLUGIN:InitializedChatClasses()
5 | ix.command.Add("ToggleRecruitment", {
6 | description = "Переключить набор в силы Гражданской Обороны.",
7 | OnCheckAccess = function(self, client)
8 | return client:IsCombine() and client:GetCharacter() and client:GetCharacter():GetCPRank().name == "OFC"
9 | end,
10 | OnRun = function(self, client)
11 | if GetNetVar("recruitmentCooldown", 0) > CurTime() then client:Notify(Format("Подождите перед тем как переключить набор! (%i с.)", GetNetVar("recruitmentCooldown", 0) - CurTime())) return end
12 | SetNetVar("recruitmentCooldown", CurTime() + 30)
13 |
14 | local boolean = !GetNetVar("recruitmentToggled", false)
15 | SetNetVar("recruitmentToggled", boolean)
16 | local prefix = boolean == true and "открыт!" or "закрыт!"
17 | client:Notify("Набор в Гражданскую оборону "..prefix)
18 | end
19 | })
20 | end
--------------------------------------------------------------------------------
/wounds/items/sh_wound_bandage.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | ITEM.name = "Bandage"
4 | ITEM.model = Model("models/props_wasteland/prison_toiletchunk01l.mdl")
5 | ITEM.description = "Small roll of gauze cloth."
6 | ITEM.category = "Medical"
7 | ITEM.price = 18
8 |
9 | ITEM.functions.Apply = {
10 | name = "Heal yourself",
11 | icon = "icon16/heart.png",
12 | sound = "items/medshot4.wav",
13 | OnRun = function(itemTable)
14 | PLUGIN:SetBleeding(itemTable.player, false)
15 | end
16 | }
17 |
18 | ITEM.functions.ApplyTarget = {
19 | name = "Heal the person opposite",
20 | icon = "icon16/heart_add.png",
21 | sound = "items/medshot4.wav",
22 | OnRun = function(itemTable)
23 | local pl = itemTable.player
24 | local data = {}
25 | data.start = pl:GetShootPos()
26 | data.endpos = data.start + pl:GetAimVector() * 96
27 | data.filter = pl
28 | local target = util.TraceLine(data).Entity
29 |
30 | if target:IsValid() and target:IsPlayer() then
31 | PLUGIN:SetBleeding(target, false)
32 | return true
33 | end
34 |
35 | return false
36 | end
37 | }
--------------------------------------------------------------------------------
/needs/sh_config.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | ix.config.Add("primaryNeedsDelay", 120, "How long does it take to calculate the character's primary needs? (In seconds)", function(oldValue, newValue)
5 | if (SERVER) then
6 | for _, pl in ipairs(player.GetAll()) do
7 | if IsValid(pl) and pl:GetCharacter() then
8 | if timer.Exists("ixPrimaryNeeds." .. pl:AccountID()) then timer.Remove("ixPrimaryNeeds." .. pl:AccountID()) end
9 | PLUGIN:CreateNeedsTimer(pl, pl:GetCharacter())
10 | end
11 | end
12 | end
13 | end, {data = {min = 1, max = 1000}, category = PLUGIN.name})
14 |
15 | ix.config.Add("deathCountdown", 300, "How long will it take for a character to die if starving", nil, {
16 | data = {min = 0, max = 1000},
17 | category = PLUGIN.name
18 | })
19 |
20 | ix.config.Add("saturationConsume", 3, "How much saturation will be taken from the character", nil, {
21 | data = {min = 0, max = 100},
22 | category = PLUGIN.name
23 | })
24 |
25 | ix.config.Add("satietyConsume", 2, "How much satiety will be taken from the character", nil, {
26 | data = {min = 0, max = 100},
27 | category = PLUGIN.name
28 | })
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 me@bilw.in at https://github.com/bilwin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.deprecated/diseases/docs/plugin_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | -- @Hook: CanPlayerGetDisease
3 | -- @Realm: Server
4 | -- @Description: Can a player get sick with the resulting disease?
5 | -- @Arguments: Player player, String disease
6 | -- @Return: true if player can't get disease, false if player can get disease
7 |
8 | function PLUGIN:CanPlayerGetDisease(player, disease)
9 | end
10 |
11 | -- @Hook: CanPlayerDisinfect
12 | -- @Realm: Server
13 | -- @Description: Can a player cure disease?
14 | -- @Arguments: Player player, String disease
15 | -- @Return: true if player can't cure disease, false if player can cure disease
16 |
17 | function PLUGIN:CanPlayerDisinfect(player, disease)
18 | end
19 |
20 | -- @Hook: PlayerInfected
21 | -- @Realm: Server
22 | -- @Description: Calling when player get disease
23 | -- @Arguments: Player player, String disease
24 | -- @Return: nothing
25 |
26 | function PLUGIN:PlayerInfected(player, disease)
27 | end
28 |
29 | -- @Hook: PlayerDisinfected
30 | -- @Realm: Server
31 | -- @Description: Calling when player cure disease
32 | -- @Arguments: Player player, String disease
33 | -- @Return: nothing
34 |
35 | function PLUGIN:PlayerDisinfected(player, disease)
36 | end
37 |
--------------------------------------------------------------------------------
/trashpiles/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Trashpiles"
3 | PLUGIN.author = "Bilwin"
4 | PLUGIN.schema = "Any"
5 | PLUGIN.version = 1.0
6 |
7 | ix.config.Add("trashPileItemDropChance", 40, "Item drop chance", nil, {
8 | data = {min = 1, max = 100},
9 | category = PLUGIN.name
10 | })
11 |
12 | ix.config.Add("trashPileItemsStacks", 3, "How many items drop when trashpile looted (Random)", nil, {
13 | data = {min = 1, max = 15},
14 | category = PLUGIN.name
15 | })
16 |
17 | ix.config.Add("trashPileLootTime", 20, "Use time", nil, {
18 | data = {min = 1, max = 60},
19 | category = PLUGIN.name
20 | })
21 |
22 | ix.config.Add("trashPilesReload", 600, "Trashpiles reload (In seconds)", function(_, newValue)
23 | if (SERVER) then
24 | for _, ent in ipairs(ents.FindByClass('ix_trashpile')) do
25 | local uniqueID = 'trashpileReload.'..ent:EntIndex()
26 | if timer.Exists(uniqueID) and (ent:GetNetVar('looted', false) == true) then
27 | timer.Adjust(uniqueID, newValue)
28 | end
29 | end
30 | end
31 | end, {
32 | data = {min = 1, max = 20000},
33 | category = PLUGIN.name
34 | })
35 |
36 | ix.util.Include('sv_hooks.lua')
--------------------------------------------------------------------------------
/.deprecated/diseases/diseases/cough.lua:
--------------------------------------------------------------------------------
1 |
2 | return {
3 | name = "Cough",
4 | description = "A regular cough, generally not dangerous at all",
5 | canGetRandomly = true,
6 | immuneFactions = { FACTION_MPF, FACTION_OTA },
7 |
8 | OnCall = function( pl )
9 | pl:_SetTimer( "diseaseCough::" .. pl:SteamID64(), 30, 0, function()
10 | pl:EmitSound( "ambient/voices/cough" .. math.random(1, 4) .. ".wav" )
11 | pl:ScreenFade( SCREENFADE.IN, Color(0, 0, 0, 200), 0.3, 0 )
12 | ix.chat.Send( pl, "me", "coughs" )
13 |
14 | for k, v in pairs( ents.FindInSphere(pl:GetPos(), 500) ) do
15 | if ( IsValid(v) and v:IsPlayer() and v:GetCharacter() and math.random(1,20) > 17 ) then
16 | ix.Diseases:InfectPlayer( v, "cough" )
17 | end
18 | end
19 | end )
20 | pl:_SetSimpleTimer( 60 * 15, function()
21 | ix.Diseases.Loaded["cough"].OnEnd(pl)
22 | end )
23 | end,
24 |
25 | OnEnd = function( pl )
26 | if pl:_TimerExists( "diseaseCough::" .. pl:SteamID64() ) then
27 | pl:_RemoveTimer( "diseaseCough::" .. pl:SteamID64() )
28 | end
29 | end
30 | }
31 |
--------------------------------------------------------------------------------
/wounds/items/sh_wound_splint.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | ITEM.name = "Splint"
4 | ITEM.model = Model("models/props_c17/furnituredrawer001a_shard01.mdl")
5 | ITEM.description = "A splint is a rigid or flexible device that maintains in position a displaced or movable part, also used to keep in place and protect an injured part to support healing and to prevent further damage."
6 | ITEM.category = "Medical"
7 | ITEM.price = 25
8 |
9 | ITEM.functions.Apply = {
10 | name = "Heal yourself",
11 | icon = "icon16/heart.png",
12 | sound = "items/medshot4.wav",
13 | OnRun = function(itemTable)
14 | PLUGIN:SetFracture(itemTable.player, false)
15 | end
16 | }
17 |
18 | ITEM.functions.ApplyTarget = {
19 | name = "Heal the person opposite",
20 | icon = "icon16/heart_add.png",
21 | sound = "items/medshot4.wav",
22 | OnRun = function(itemTable)
23 | local pl = itemTable.player
24 | local data = {}
25 | data.start = pl:GetShootPos()
26 | data.endpos = data.start + pl:GetAimVector() * 96
27 | data.filter = pl
28 | local target = util.TraceLine(data).Entity
29 |
30 | if target:IsValid() and target:IsPlayer() then
31 | PLUGIN:SetFracture(target, false)
32 | return true
33 | end
34 |
35 | return false
36 | end
37 | }
--------------------------------------------------------------------------------
/needs/sh_meta.lua:
--------------------------------------------------------------------------------
1 |
2 | local playerMeta = FindMetaTable("Player")
3 |
4 | function playerMeta:GetSaturation()
5 | local char = self:GetCharacter()
6 | return self:GetLocalVar("saturation"), (char and char:GetSaturation())
7 | end
8 |
9 | function playerMeta:GetSatiety()
10 | local char = self:GetCharacter()
11 | return self:GetLocalVar("satiety"), (char and char:GetSatiety())
12 | end
13 |
14 | if (SERVER) then
15 | local CHAR = ix.meta.character
16 |
17 | function CHAR:DowngradeSatiety(value)
18 | local calculated = math.Round(math.Clamp(self:GetSatiety() - value, 0, 100))
19 | self:SetSatiety(calculated)
20 | end
21 |
22 | function CHAR:DowngradeSaturation(value)
23 | local calculated = math.Round(math.Clamp(self:GetSaturation() - value, 0, 100))
24 | self:SetSaturation(calculated)
25 | end
26 |
27 | function CHAR:RestoreSatiety(value)
28 | local calculated = math.Round(math.Clamp(self:GetSatiety() + value, 0, 100))
29 | self:SetSatiety(calculated)
30 | end
31 |
32 | function CHAR:RestoreSaturation(value)
33 | local calculated = math.Round(math.Clamp(self:GetSaturation() + value, 0, 100))
34 | self:SetSaturation(calculated)
35 | end
36 | end
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## MIT License
2 | Copyright (c) 2025 me@bilw.in at [github/bilwin](https://github.com/bilwin)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | SOFTWARE.
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local Schema = Schema
3 | local PLUGIN = PLUGIN
4 | PLUGIN.name = 'Basic Schema Things'
5 | PLUGIN.author = 'SV HL2 RP'
6 |
7 | ix.util.Include 'sh_configs.lua'
8 | ix.util.Include 'sh_commands.lua'
9 | ix.util.Include 'sh_chatclasses.lua'
10 |
11 | ix.util.Include 'cl_schema.lua'
12 | ix.util.Include 'cl_hooks.lua'
13 | ix.util.Include 'sh_hooks.lua'
14 | ix.util.Include 'sh_voices.lua'
15 | ix.util.Include 'sv_schema.lua'
16 | ix.util.Include 'sv_hooks.lua'
17 |
18 | ix.util.Include 'meta/sh_player.lua'
19 | ix.util.Include 'meta/sv_player.lua'
20 | ix.util.Include 'meta/sh_character.lua'
21 |
22 | function Schema:ZeroNumber(number, length)
23 | local amount = math.max(0, length - string.len(number))
24 | return string.rep('0', amount)..tostring(number)
25 | end
26 |
27 | function Schema:IsCombineRank(text, rank)
28 | return string.find(text, '[%D+]'..rank..'[%D+]')
29 | end
30 |
31 | function Schema:ShuffleString(str)
32 | local letters = {}
33 | for letter in str:gmatch'.[\128-\191]*' do
34 | table.insert(letters, {letter = letter, rnd = math.random()})
35 | end
36 | table.sort(letters, function(a, b) return a.rnd < b.rnd end)
37 | for i, v in ipairs(letters) do letters[i] = v.letter end
38 | return table.concat(letters)
39 | end
40 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/specialradios/sv_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | function ix.specialRadios:RegisterChannel(channelName)
3 | if (self[channelName]) then return end
4 | self[channelName] = true
5 | end
6 |
7 | function ix.specialRadios:RegisterFaction(faction, channels)
8 | if !faction then return end
9 | if !istable(channels) then return end
10 | self.factionsData[faction] = channels
11 | end
12 |
13 | local factionIndices = ix.faction.indices
14 | function PLUGIN:InitFactions()
15 | for index, data in ipairs( factionIndices ) do
16 | if data.radioChannels and istable(data.radioChannels) then
17 | ix.specialRadios:RegisterFaction(index, data.radioChannels)
18 | end
19 | end
20 | end
21 |
22 | local CHAR = ix.meta.character
23 | function CHAR:HasAccessToChannel(channelName)
24 | if (ix.specialRadios[channelName]) then
25 | if !istable(ix.specialRadios.factionsData[self:GetFaction()]) then return false end
26 | if table.HasValue(ix.specialRadios.factionsData[self:GetFaction()], channelName) then
27 | return true
28 | else
29 | return false
30 | end
31 | else
32 | return false, nil
33 | end
34 | end
35 |
36 | do
37 | ix.specialRadios:RegisterChannel("cmb")
38 | ix.specialRadios:RegisterChannel("ota")
39 | end
40 |
--------------------------------------------------------------------------------
/gaszones/items/sh_antidote.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Antidote"
3 | ITEM.description = "Helps to cure any disease and poisoning"
4 | ITEM.model = Model("models/props_lab/jar01b.mdl")
5 | ITEM.category = "Medicines"
6 |
7 | ITEM.functions.Use = {
8 | name = "Use",
9 | tip = "use",
10 | OnRun = function(itemTable)
11 | local client = itemTable.player
12 | local character = client:GetCharacter()
13 |
14 | if (character) then
15 | local toxicity = character:GetToxicity()
16 | if (toxicity > 85) then
17 | client:Notify("It won't help you")
18 | return false
19 | end
20 |
21 | if timer.Exists('GasAntidote.'..client:AccountID()) then
22 | ix.util.NotifyLocalized('notNow', client)
23 | return false
24 | end
25 |
26 | timer.Create('GasAntidote.'..client:AccountID(), 5, 5, function()
27 | if !IsValid(client) then return end
28 | if !character then return end
29 | character:SubtractToxicity(5)
30 | if toxicity <= 0 then timer.Remove('GasAntidote.'..client:AccountID()) end
31 | end)
32 |
33 | client:EmitSound("items/smallmedkit1.wav")
34 | else
35 | return false
36 | end
37 |
38 | return true
39 | end
40 | }
41 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/thirdpersonblocker.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Third-person blocker"
3 | PLUGIN.author = "Bilwin"
4 |
5 | if CLIENT then
6 | gameevent.Listen('player_hurt')
7 | hook.Add('player_hurt', PLUGIN.name, function(data)
8 | if data.userid == LocalPlayer():UserID() then
9 | LocalPlayer().tpBlocked = true
10 | if timer.Exists('tpBlocker') then timer.Remove('tpBlocker') end
11 | timer.Create('tpBlocker', 30, 1, function()
12 | LocalPlayer().tpBlocked = false
13 | end)
14 | end
15 | end)
16 |
17 | local function isAllowed()
18 | return ix.config.Get 'thirdperson'
19 | end
20 |
21 | function PLAYER:CanOverrideView()
22 | local entity = Entity(self:GetLocalVar('ragdoll', 0))
23 |
24 | if IsValid(ix.gui.characterMenu) && !ix.gui.characterMenu:IsClosing() && ix.gui.characterMenu:IsVisible() then
25 | return false
26 | end
27 |
28 | if IsValid(ix.gui.menu) && ix.gui.menu:GetCharacterOverview() then
29 | return false
30 | end
31 |
32 | if (ix.option.Get('thirdpersonEnabled', false) &&
33 | !IsValid(self:GetVehicle()) &&
34 | isAllowed() &&
35 | IsValid(self) &&
36 | self:GetCharacter() &&
37 | !self:GetNetVar 'actEnterAngle' &&
38 | !IsValid(entity) &&
39 | LocalPlayer():Alive() &&
40 | !LocalPlayer().tpBlocked
41 | ) then
42 | return true
43 | end
44 | end
45 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/relations.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "NPC Relations"
4 | PLUGIN.author = "Gr4ss"
5 | PLUGIN.description = "Allows easy setting of NPC relations."
6 |
7 | if (SERVER) then
8 | function PLUGIN:OnEntityCreated(entity)
9 | if (entity:IsNPC()) then
10 | for _, client in ipairs(player.GetAll()) do
11 | local charplayer = client:GetCharacter()
12 |
13 | if (charplayer) then
14 | local faction = ix.faction.indices[charplayer:GetFaction()]
15 |
16 | if (faction and faction.npcRelations) then
17 | entity:AddEntityRelationship(client, faction.npcRelations[entity:GetClass()] or D_HT, 0)
18 | end
19 | end
20 | end
21 | end
22 | end
23 |
24 | function PLUGIN:PlayerSpawn(client)
25 | local charplayer = client:GetCharacter()
26 |
27 | if (charplayer) then
28 | local faction = ix.faction.indices[charplayer:GetFaction()]
29 | local relations = faction.npcRelations
30 |
31 | if (relations) then
32 | for _, entity in ipairs(ents.GetAll()) do
33 | if (entity:IsNPC() and relations[entity:GetClass()]) then
34 | entity:AddEntityRelationship(client, relations[entity:GetClass()], 0)
35 | end
36 | end
37 | else
38 | for _, entity in ipairs(ents.GetAll()) do
39 | if (entity:IsNPC()) then
40 | entity:AddEntityRelationship(client, D_HT, 0)
41 | end
42 | end
43 | end
44 | end
45 | end
46 | end
47 |
--------------------------------------------------------------------------------
/extended_outfits/sv_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | function PLUGIN:DoPlayerDeath(client, attacker, damageinfo)
5 | local character = client:GetCharacter() if !character then return end
6 | for _, v in next, character:GetInventory():GetItems() do
7 | if v:GetData('equip', false) && ((isfunction(v.bKeepOnDeath) && v:KeepOnDeath(client) || v.bKeepOnDeath) == true) then return end
8 |
9 | if v.base == 'base_extendedoutfits' && v:GetData('equip', false) == true then
10 | v.player = client
11 | v.functions.EquipUn.OnRun(v)
12 | v.player = nil
13 | end
14 | end
15 | end
16 |
17 | function PLUGIN:PostPlayerDeath(client)
18 | local character = client:GetCharacter() if !character then return end
19 | local inventory = character:GetInventory() if !inventory then return end
20 | local groups = {}
21 |
22 | for _, v in next, inventory:GetItems() do
23 | if v:GetData('equip', false) && ((isfunction(v.bKeepOnDeath) && v:bKeepOnDeath(client) || v.bKeepOnDeath) == true) then return end
24 |
25 | if v.base == "base_extendedoutfits" && v:GetData("equip") == true then
26 | if v.bodyGroups then
27 | if v.bodyGroups[1] then
28 | local bodygroupID = client:FindBodygroupByName(v.bodyGroups[1])
29 | client:SetBodygroup(bodygroupID, 0)
30 | if bodygroupID then
31 | groups[bodygroupID] = 0
32 | end
33 | end
34 | end
35 | end
36 | end
37 |
38 | character:SetData('groups', groups)
39 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/base/sh_armor_clothes.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.base = "base_outfit"
3 | ITEM.name = "Armored Clothes"
4 | ITEM.description = "A suitcase full of clothes."
5 | ITEM.model = Model("models/props_c17/suitcase_passenger_physics.mdl")
6 | ITEM.category = "Armored Clothing"
7 | ITEM.width = 2
8 | ITEM.height = 2
9 | ITEM.maxArmor = 0
10 |
11 | if (CLIENT) then
12 | function ITEM:PopulateTooltip(tooltip)
13 | local panel = tooltip:AddRowAfter("name", "armor")
14 | panel:SetBackgroundColor(derma.GetColor("Warning", tooltip))
15 | panel:SetText("Armor: " .. (self:GetData("equip") and LocalPlayer():Armor() or self:GetData("armor", self.maxArmor)))
16 | panel:SizeToContents()
17 | end
18 | end
19 |
20 | function ITEM:OnEquipped()
21 | self.player:SetArmor(self:GetData("armor", self.maxArmor))
22 | end
23 |
24 | function ITEM:OnUnequipped()
25 | self:SetData("armor", math.Clamp(self.player:Armor(), 0, self.maxArmor))
26 | self.player:SetArmor(0)
27 | end
28 |
29 | function ITEM:Repair(amount)
30 | self:SetData("armor", math.Clamp(self:GetData("armor") + amount, 0, self.maxArmor))
31 | end
32 |
33 | function ITEM:OnLoadout()
34 | if (self:GetData("equip")) then
35 | self.player:SetArmor(self:GetData("armor", self.maxArmor))
36 | end
37 | end
38 |
39 | function ITEM:OnSave()
40 | if (self:GetData("equip")) then
41 | self:SetData("armor", math.Clamp(self.player:Armor(), 0, self.maxArmor))
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/specialradios/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Special Radios"
3 | PLUGIN.description = "Allows Combine Units to communicate not through a radio"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.schema = "HL2 RP"
6 | SCHANNEL_NONE = "none"
7 |
8 | ix.specialRadios = ix.specialRadios or {factionsData = {}}
9 |
10 | ix.util.Include("sh_commands.lua")
11 | ix.util.Include("sv_hooks.lua")
12 |
13 | local PLAYER = FindMetaTable("Player")
14 | function PLAYER:GetSpecialChannel()
15 | return self:GetCharacter():GetSpecialChannel() or SCHANNEL_NONE
16 | end
17 |
18 | ix.char.RegisterVar("specialChannel", {
19 | field = "specialChannel",
20 | fieldType = ix.type.number,
21 | default = SCHANNEL_NONE,
22 | bNoDisplay = true
23 | })
24 |
25 | ix.config.Add("enableSpecialRadios", true, "Whether or no we need to enable special radio channels", nil, {
26 | category = PLUGIN.name
27 | })
28 |
29 | function PLUGIN:InitializedPlugins()
30 | if SERVER then
31 | for index, data in ipairs(ix.faction.indices) do
32 | if data.radioChannels and istable(data.radioChannels) then
33 | ix.specialRadios:RegisterFaction(index, data.radioChannels)
34 | end
35 | end
36 |
37 | ix.specialRadios:RegisterChannel("cmb")
38 | ix.specialRadios:RegisterChannel("tac3")
39 | ix.specialRadios:RegisterChannel("tac5")
40 | ix.specialRadios:RegisterChannel("ota")
41 | end
42 | end
43 |
--------------------------------------------------------------------------------
/detaileddescriptions/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Detailed Descriptions"
4 | PLUGIN.author = "Bilwin & Zoephix"
5 | PLUGIN.description = "Adds the ability for players to create detailed descriptions, which can be examined."
6 | PLUGIN.license = [[
7 | This script is part of the "Detailed Descriptions" plugin by Zoephix.
8 | © Copyright 2020: Zoephix.
9 | You are allowed to use, modify and redistribute this script.
10 | However, you are not allowed to sell this script nor profit from this script in any way.
11 | You are not allowed to claim this script as being your own work, do not remove the credits. ]]
12 |
13 | ix.util.Include("cl_plugin.lua")
14 | ix.util.Include("sv_plugin.lua")
15 |
16 | function PLUGIN:InitializedChatClasses()
17 | ix.command.Add("SelfExamine", {
18 | description = "Examines your description.",
19 | OnRun = function(self, client)
20 | local textEntryData = PLUGIN:GetDetailedDescription(client)['text'] or 'No detailed description found.'
21 | local textEntryDataURL = PLUGIN:GetDetailedDescription(client)['textEntryURL'] or 'No detailed description found.'
22 |
23 | netstream.Start(client, "ixOpenDetailedDescriptions", client, textEntryData, textEntryDataURL)
24 | end
25 | })
26 |
27 | ix.command.Add("CharDetDesc", {
28 | description = "Sets your description",
29 | OnRun = function(self, client)
30 | netstream.Start(client, "ixSetDetailedDescriptions")
31 | end
32 | })
33 | end
34 |
--------------------------------------------------------------------------------
/thirdpersonblocker.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Third-person blocker'
2 | PLUGIN.description = 'Block a third-person view when taking damage'
3 | PLUGIN.author = 'Bilwin'
4 |
5 | if CLIENT then
6 | gameevent.Listen('player_hurt')
7 | hook.Add('player_hurt', PLUGIN.name, function(data)
8 | if data.userid == LocalPlayer():UserID() then
9 | LocalPlayer().m_bThirdPersonBlocked = true
10 | if timer.Exists('tpBlocker') then timer.Remove('tpBlocker') end
11 | timer.Create('tpBlocker', 30, 1, function()
12 | LocalPlayer().m_bThirdPersonBlocked = false
13 | end)
14 | end
15 | end)
16 |
17 | local function isAllowed()
18 | return ix.config.Get('thirdperson')
19 | end
20 |
21 | function PLAYER:CanOverrideView()
22 | local entity = Entity(self:GetLocalVar('ragdoll', 0))
23 |
24 | if IsValid(ix.gui.characterMenu) && !ix.gui.characterMenu:IsClosing() && ix.gui.characterMenu:IsVisible() then
25 | return false
26 | end
27 |
28 | if IsValid(ix.gui.menu) && ix.gui.menu:GetCharacterOverview() then
29 | return false
30 | end
31 |
32 | if (ix.option.Get('thirdpersonEnabled', false) &&
33 | !IsValid(self:GetVehicle()) &&
34 | isAllowed() &&
35 | IsValid(self) &&
36 | self:GetCharacter() &&
37 | !self:GetNetVar 'actEnterAngle' &&
38 | !IsValid(entity) &&
39 | LocalPlayer():Alive() &&
40 | !LocalPlayer().m_bThirdPersonBlocked
41 | ) then
42 | return true
43 | end
44 | end
45 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pda/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Combine PDA"
3 | PLUGIN.author = "Bilwin"
4 | PLUGIN.description = "PDA for combine factions"
5 | PLUGIN.version = "1.0"
6 |
7 | ix.util.Include("sv_plugin.lua")
8 |
9 | function PLUGIN:InitializedChatClasses()
10 | ix.command.Add("PDA", {
11 | description = "Включить отображение КПК.",
12 | OnCheckAccess = function(self, client)
13 | return client:IsCombine()
14 | end,
15 | OnRun = function(self, client)
16 | netstream.Start(client, "ixOpenPDA")
17 | end
18 | })
19 |
20 | ix.command.Add("ViewObjectives", {
21 | description = '',
22 | OnCheckAccess = function(self, client)
23 | return false
24 | end,
25 | OnRun = function(self, client)
26 | end
27 | })
28 | end
29 |
30 | if CLIENT then
31 | netstream.Hook("ixOpenPDA", function(objectives)
32 | PDAObjectives = objectives
33 | if IsValid(ix.gui.pdamainmenu) then
34 | ix.gui.pdamainmenu:Remove()
35 | else
36 | local frame = vgui.Create('PDAMainMenu')
37 | frame:SetPos(-ScrW(), ScrH() / 2 - frame:GetTall() / 2)
38 | frame:MoveTo(5, (ScrH()*.5) - frame:GetTall()/2, 0.5, 0, -1)
39 | end
40 | end)
41 | end
42 |
43 | if SERVER then
44 | function PLUGIN:ShowHelp(client)
45 | if client:IsCombine() then
46 | netstream.Start(client, "ixOpenPDA", Schema.CombineObjectives)
47 | end
48 | end
49 | end
--------------------------------------------------------------------------------
/radios/entities/entities/ix_radio/init.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | AddCSLuaFile( "cl_init.lua" )
4 | AddCSLuaFile( "shared.lua" )
5 |
6 | include( "shared.lua" )
7 |
8 | function ENT:Initialize()
9 | self:SetModel("models/props_lab/citizenradio.mdl")
10 | self:PhysicsInit(SOLID_VPHYSICS)
11 | self:SetMoveType(MOVETYPE_VPHYSICS)
12 | self:SetSolid(SOLID_VPHYSICS)
13 | self:SetUseType(SIMPLE_USE)
14 | self:DrawShadow(false)
15 |
16 | local phys = self:GetPhysicsObject()
17 | if IsValid(phys) then
18 | phys:Wake()
19 | end
20 | end
21 |
22 | function ENT:Use(activator, caller)
23 | if ((activator.ixNextRadioUse or 0) > RealTime()) then return end
24 |
25 | net.Start('ixRadio')
26 | net.WriteEntity(self)
27 | net.Send(activator)
28 |
29 | activator.ixNextRadioUse = RealTime() + 1
30 | end
31 |
32 | function ENT:StopSoundAll()
33 | for song in pairs(PLUGIN.songs) do
34 | self:StopSound(song)
35 | end
36 | end
37 |
38 | function ENT:OnRemove()
39 | self:StopSoundAll()
40 | end
41 |
42 | local function song_whitelisted(song)
43 | local bStatus = false
44 |
45 | for _song in pairs(PLUGIN.songs) do
46 | if _song == song then
47 | bStatus = true
48 | break
49 | end
50 | end
51 |
52 | return bStatus
53 | end
54 |
55 | function ENT:SelectSong(soundPath)
56 | if IsValid(self) then
57 | if !song_whitelisted(soundPath) then return end
58 |
59 | self:StopSoundAll()
60 | timer.Simple(0.1, function()
61 | if IsValid(self) then
62 | self:EmitSound(soundPath, 70, 100)
63 | end
64 | end)
65 | end
66 | end
--------------------------------------------------------------------------------
/xp/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "XP System"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.description = "Adds XP whitelisted system"
6 | PLUGIN.schema = "Any"
7 | PLUGIN.version = 1.03
8 | PLUGIN.whitelists = {
9 | --[FACTION_CITIZEN] = {
10 | -- [CLASS_CITIZEN] = 0,
11 | -- [CLASS_CWU] = 5
12 | --},
13 | --[FACTION_MPF] = {
14 | -- [CLASS_MPR] = 50,
15 | -- [CLASS_MPU] = 75,
16 | -- [CLASS_EMP] = 100
17 | --},
18 | --[FACTION_OTA] = {
19 | -- [CLASS_OWS] = 200,
20 | -- [CLASS_EOW] = 300
21 | --},
22 | --[FACTION_ADMIN] = {
23 | -- [CLASS_ADMIN] = 600
24 | --}
25 | }
26 |
27 | ix.util.Include("sv_hooks.lua")
28 |
29 | ix.char.RegisterVar("XP", {
30 | field = "XP",
31 | fieldType = ix.type.number,
32 | isLocal = true,
33 | bNoDisplay = true,
34 | default = 0
35 | })
36 |
37 | ix.lang.AddTable("english", {
38 | xpGainTime = "You got %s XP!",
39 | xpAborted = "Your XP has been reset!",
40 | xpSet = "Your XP was set on %s"
41 | })
42 |
43 | ix.lang.AddTable("russian", {
44 | xpGainTime = "Вы получили %s XP!",
45 | xpAborted = "Ваши XP были обнулены!",
46 | xpSet = "Ваш XP был установлен на %s"
47 | })
48 |
49 | ix.config.Add("maxXPgain", 5, "Points awarded when playing on the server", nil, {
50 | data = {min = 0, max = 50},
51 | category = PLUGIN.name
52 | })
53 |
54 | ix.config.Add("XPgainEnabled", true, "Will the XP auto-give system be enabled?.", nil, {
55 | category = PLUGIN.name
56 | })
57 |
--------------------------------------------------------------------------------
/.deprecated/fog.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Seasons"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.description = "Adjusts fog options"
6 | PLUGIN.schema = "Any"
7 | PLUGIN.version = 1.01
8 | PLUGIN.Active = "winter"
9 | PLUGIN.Seasons = {
10 | ["winter"] = {
11 | fogColor = Vector(135, 206, 235),
12 | fogStart = 500,
13 | fogEnd = 1300,
14 | fogDensity = 0.15,
15 | fogFade = 0
16 | },
17 | ["summer"] = {
18 | fogColor = Vector(170, 100, 31),
19 | fogStart = 500,
20 | fogEnd = 1300,
21 | fogDensity = 0.15,
22 | fogFade = 0
23 | }
24 | }
25 |
26 | if (CLIENT) then
27 | local activeSeasonData = PLUGIN.Seasons[PLUGIN.Active]
28 | local newFogData = {
29 | ["fog_start"] = activeSeasonData.fogStart,
30 | ["fog_end"] = activeSeasonData.fogEnd,
31 | ["fog_color"] = activeSeasonData.fogColor,
32 | ["fog_max_density"] = activeSeasonData.fogDensity,
33 | ["fog_fade"] = activeSeasonData.fogFade
34 | }
35 |
36 | local function SetupFog()
37 | render.FogMode(MATERIAL_FOG_LINEAR)
38 | render.FogStart(newFogData.fog_start)
39 | render.FogEnd(newFogData.fog_end)
40 | render.FogColor(newFogData.fog_color.r, newFogData.fog_color.g, newFogData.fog_color.b)
41 | render.FogMaxDensity(math.Clamp(newFogData.fog_max_density * ( newFogData.fog_fade or 0 ), 0.19, 1))
42 |
43 | return true
44 | end
45 |
46 | PLUGIN.SetupWorldFog = SetupFog
47 | PLUGIN.SetupSkyboxFog = SetupFog
48 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pts/sh_cmds.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | do
5 | local CLASS = {}
6 | CLASS.color = Color(99, 166, 228)
7 | CLASS.format = "[ПГ #%s] %s: \"%s\""
8 |
9 | function CLASS:CanHear(speaker, listener)
10 | local ptData = listener:InPT() and listener:GetPT()
11 | if !ptData then return false end
12 | local ptData2 = speaker:InPT() and speaker:GetPT()
13 | if !ptData2 then return false end
14 | local bStatus = false
15 |
16 | if (ptData.owner == ptData2.owner and speaker:InPT() and listener:InPT()) then
17 | bStatus = true
18 | end
19 |
20 | return bStatus
21 | end
22 |
23 | function CLASS:OnChatAdd(speaker, text)
24 | text = speaker:IsCombine() and string.format("<:: %s ::>", text) or text
25 | local channel = speaker:InPT() and select(2, speaker:GetPT())
26 | chat.AddText(self.color, string.format(self.format, channel, speaker:Name(), text))
27 | end
28 |
29 | ix.chat.Register("pt_chat", CLASS)
30 | end
31 |
32 | do
33 | ix.command.Add("PTChat", {
34 | alias = "PT",
35 | description = "Написать в чат патрульной группы",
36 | arguments = {ix.type.text},
37 | OnCheckAccess = function(self, client)
38 | return client:InPT()
39 | end,
40 | OnRun = function(self, client, text)
41 | if (!client:IsRestricted()) then
42 | ix.chat.Send(client, "pt_chat", text)
43 | else
44 | return "@notNow"
45 | end
46 | end,
47 | bNoIndicator = true
48 | })
49 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/cl_schema.lua:
--------------------------------------------------------------------------------
1 |
2 | local Schema = Schema
3 | function Schema:AddCombineDisplayMessage(text, color, ...)
4 | if (LocalPlayer():IsCombine() and IsValid(ix.gui.combine)) then
5 | ix.gui.combine:AddLine(text, color, nil, ...)
6 | end
7 | end
8 |
9 | netstream.Hook("CombineDisplayMessage", function(text, color, arguments)
10 | if (IsValid(ix.gui.combine)) then
11 | ix.gui.combine:AddLine(text, color, nil, unpack(arguments))
12 | end
13 | end)
14 |
15 | netstream.Hook("PlaySound", function(sound)
16 | surface.PlaySound(sound)
17 | end)
18 |
19 | netstream.Hook("HeavyPlaySound", function(ent, sounds, delay, spacing, volume, pitch)
20 | ix.util.EmitQueuedSounds(ent, sounds, delay, spacing, volume, pitch)
21 | end)
22 |
23 | netstream.Hook("ChatNotify", function(text, color, icon)
24 | if !color then color = color_white end
25 | if !icon then
26 | chat.AddText(color, text)
27 | else
28 | local icon = ix.util.GetMaterial(icon)
29 | chat.AddText(icon, color, text)
30 | end
31 | end)
32 |
33 | netstream.Hook("HeavyChatNotify", function(data, color, icon)
34 | if !color then color = color_white end
35 | if !icon then
36 | for _, message in ipairs(data) do
37 | chat.AddText(color, message)
38 | end
39 | else
40 | local icon = ix.util.GetMaterial(icon)
41 | for _, message in ipairs(data) do
42 | chat.AddText(icon, color, message)
43 | end
44 | end
45 | end)
46 |
47 | netstream.Hook("Frequency", function(oldFrequency)
48 | Derma_StringRequest("Частота", "Какую частоту вы хотите установить?", oldFrequency, function(text)
49 | ix.command.Send("SetFreq", text)
50 | end)
51 | end)
52 |
--------------------------------------------------------------------------------
/stormfox.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'StormFox 2 support'
2 | PLUGIN.author = 'Bilwin'
3 |
4 | if not StormFox2 then return end
5 |
6 | PLUGIN.maps = { -- Custom SF2 options
7 | ['rp_city34_v1a'] = {
8 | ['sf_extra_lightsupport'] = -1,
9 | ['sf_random_round_weather'] = 0,
10 | ['sf_maplight_max'] = 55,
11 | ['sf_maplight_updaterate'] = 3,
12 | ['sf_extra_darkness'] = 1,
13 | ['sf_extra_darkness_amount'] = 0.9,
14 | ['sf_enable_ice'] = 0,
15 | ['sf_footprint_enablelogic'] = 0,
16 | ['sf_min_temp'] = 10
17 | }
18 | }
19 |
20 | if SERVER then
21 | function PLUGIN:InitPostEntity()
22 | RunConsoleCommand('sf_time_speed', 1)
23 | RunConsoleCommand('sf_addnight_temp', 4)
24 | RunConsoleCommand('sf_windmove_props', 0)
25 | RunConsoleCommand('sf_windmove_props_break', 0)
26 | RunConsoleCommand('sf_windmove_props_unfreeze', 0)
27 | RunConsoleCommand('sf_windmove_props_unweld', 0)
28 | RunConsoleCommand('sf_windmove_props_makedebris', 0)
29 |
30 | if self.maps[game.GetMap()] then
31 | for command, value in pairs( self.maps[game.GetMap()] ) do
32 | RunConsoleCommand(command, value)
33 | end
34 | end
35 | end
36 |
37 | hook.Add('StormFox2.InitPostEntity', 'stormfox:StormFox2.InitPostEntity', function()
38 | local localTime = ix.date.GetFormatted('%H:%M')
39 | local validTime = StormFox2.Time.StringToTime(localTime)
40 | StormFox2.Time.Set(validTime)
41 | end)
42 | end
43 |
--------------------------------------------------------------------------------
/xmas/entities/effects/xmas_snow.lua:
--------------------------------------------------------------------------------
1 | local function fm_snowcollide(particle, hitpos, normal)
2 | particle:SetEndAlpha(200)
3 | particle:SetStartSize(1)
4 | particle:SetEndSize(1)
5 | end
6 |
7 | function EFFECT:Init(data)
8 | self.Magnitude = data:GetMagnitude()
9 | self.Lifetime = data:GetScale()
10 | self.Spawnheight = data:GetRadius()
11 |
12 | local emitter = ParticleEmitter(LocalPlayer():GetPos())
13 | for i = 0, math.Round(self.Magnitude) do
14 | local a = math.random(9999)
15 | local b = math.random(1,180)
16 | local distance = 2048
17 | local x = math.sin(b)*math.sin(a)*distance
18 | local y = math.sin(b)*math.cos(a)*distance
19 | local z = math.cos(b)*distance
20 | local offset = Vector(x,y,self.Spawnheight)
21 | local spawnpos = LocalPlayer():GetPos() + offset
22 |
23 | local particle = emitter:Add('particle/snow', spawnpos)
24 | if particle then
25 | particle:SetVelocity(Vector(math.random(-400,400),math.random(-400,400),-300))
26 | particle:SetRoll(math.random(-360,360))
27 | particle:SetLifeTime(0)
28 | particle:SetDieTime(self.Lifetime + math.Rand(-1,1))
29 | particle:SetStartAlpha(5)
30 | particle:SetEndAlpha(254)
31 | particle:SetStartSize(1)
32 | particle:SetEndSize(1)
33 | particle:SetAirResistance(50)
34 | particle:SetGravity(Vector(0,0,math.random(-100,-50)))
35 | particle:SetCollide(true)
36 | particle:SetCollideCallback(fm_snowcollide)
37 | particle:SetBounce(.01)
38 | particle:SetColor(255,255,255,255)
39 | end
40 | end
41 |
42 | emitter:Finish()
43 | end
44 |
45 | function EFFECT:Think()
46 | return false
47 | end
48 |
49 | function EFFECT:Render()
50 | end
--------------------------------------------------------------------------------
/.deprecated/garbagecleaner.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Garbage Cleaner"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.description = "Just garbage (ix_item) cleaner"
6 | PLUGIN.schema = "Any"
7 | PLUGIN.garbage = {'ix_item'}
8 |
9 | ix.config.Add("garbageCleanerEnabled", true, "Enable garbage (ix_item) cleaner?", function(_, newValue)
10 | if SERVER then
11 | if timer.Exists('GarbageCleaner') then
12 | if newValue then
13 | timer.Start('GarbageCleaner')
14 | else
15 | timer.Stop('GarbageCleaner')
16 | end
17 | end
18 | end
19 | end, {
20 | category = PLUGIN.name
21 | })
22 |
23 | ix.config.Add("garbageCleanerDelay", 300, "How many seconds does a timer tick?", function(_, newValue)
24 | if SERVER then
25 | if timer.Exists('GarbageCleaner') then
26 | timer.Adjust('GarbageCleaner', newValue)
27 | end
28 | end
29 | end, {
30 | data = {min = 1, max = 1200},
31 | category = PLUGIN.name
32 | })
33 |
34 | if (SERVER) then
35 | function PLUGIN:CreateGarbageCleaner(delay)
36 | if (timer.Exists('GarbageCleaner')) then timer.Remove('GarbageCleaner') end
37 |
38 | local delay = ix.config.Get('garbageCleanerDelay', 300)
39 | timer.Create('GarbageCleaner', delay, 0, function()
40 | for _, ent in ipairs( ents.GetAll() ) do
41 | if !table.HasValue(self.garbage, ent:GetClass()) then continue end
42 | SafeRemoveEntity(ent)
43 | end
44 | end)
45 | end
46 |
47 | function PLUGIN:InitPostEntity()
48 | self:CreateGarbageCleaner()
49 | end
50 | end
--------------------------------------------------------------------------------
/apartments/sv_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | function PLUGIN:LoadData()
5 | local apart_locks = ix.data.Get('apart_locks') or {}
6 | if !table.IsEmpty(apart_locks) then
7 | for _, v in ipairs(apart_locks) do
8 | local door = ents.GetMapCreatedEntity(v[1])
9 | if (IsValid(door) and door:IsDoor()) then
10 | local lock = ents.Create("ix_apartlock")
11 | lock:SetPos(door:GetPos())
12 | lock:Spawn()
13 | lock:SetDoor(door, door:LocalToWorld(v[2]), door:LocalToWorldAngles(v[3]))
14 | lock:SetLocked(v[4])
15 | local owners = tostring(v[5])
16 | if owners then
17 | lock:SetOwners(owners)
18 | end
19 | end
20 | end
21 | end
22 | end
23 |
24 | function PLUGIN:SaveData()
25 | local data = {}
26 |
27 | for _, v in ipairs(ents.FindByClass("ix_apartlock")) do
28 | if (IsValid(v.door)) then
29 | data[#data + 1] = {
30 | v.door:MapCreationID(),
31 | v.door:WorldToLocal(v:GetPos()),
32 | v.door:WorldToLocalAngles(v:GetAngles()),
33 | v:GetLocked(),
34 | v:GetOwners()
35 | }
36 | end
37 | end
38 |
39 | ix.data.Set("apart_locks", data)
40 | end
41 |
42 | function PLUGIN:PlayerSpawnedSENT(client, ent)
43 | if ent:GetClass() == "ix_apartlock" then
44 | self:SaveData()
45 | end
46 | end
47 |
48 | function PLUGIN:ApartmentOwned(locker, cid)
49 | self:SaveData()
50 | end
51 |
52 | function PLUGIN:ApartmentUnowned(locker, cid)
53 | self:SaveData()
54 | end
55 |
56 | function PLUGIN:ApartmentRemoved(locker)
57 | self:SaveData()
58 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/permaclass.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Perma Class"
4 | PLUGIN.author = "Taxin2012"
5 | PLUGIN.description = "Makes classes permanent."
6 | PLUGIN.license = [[Copyright 2019 Taxin2012
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 | http://www.apache.org/licenses/LICENSE-2.0
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.]]
16 |
17 | ix.config.Add( "runClassHook", true, "Should plugin run PlayerJoinedClass hook?", nil, {
18 | category = "Perma Class"
19 | } )
20 |
21 | if SERVER then
22 | function PLUGIN:PlayerJoinedClass( ply, classInd, prevClass )
23 | local char = ply:GetCharacter()
24 | if char then
25 | char:SetData( "pclass", classInd )
26 | end
27 | end
28 |
29 | function PLUGIN:PlayerLoadedCharacter( ply, curChar, prevChar )
30 | local data = curChar:GetData( "pclass" )
31 | if data then
32 | local class = ix.class.list[ data ]
33 | if class then
34 | local oldClass = curChar:GetClass()
35 |
36 | if ply:Team() == class.faction then
37 | timer.Simple( .3, function()
38 | curChar:SetClass( class.index )
39 |
40 | if ix.config.Get( "runClassHook", false ) then
41 | hook.Run( "PlayerJoinedClass", ply, class.index, oldClass )
42 | end
43 | end )
44 | end
45 | end
46 | end
47 | end
48 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_squad/sv_meta.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local CHAR = ix.meta.character
4 | local prime_visors = "0_0_0"
5 | function CHAR:CalculateUniformSkin(bCheckOutfit)
6 | local squad = self:GetSquad()
7 | local client = self:GetPlayer()
8 | local uniform = ix.squads.stored[squad].uniform
9 | local visors = ix.squads.stored[squad].visor
10 |
11 | if uniform then
12 | if bCheckOutfit then
13 | if !cpoutfit.IsSupported(client:GetModel()) then return false end
14 | end
15 |
16 | cpoutfit.SetCPOutfit(client, uniform)
17 | end
18 |
19 | if visors then
20 | if bCheckOutfit then
21 | if !cpoutfit.IsSupported(client:GetModel()) then return false end
22 | end
23 |
24 | cpoutfit.SetCPVisors(client, visors['p'], visors['s'])
25 | else
26 | cpoutfit.SetCPVisors(client, prime_visors, prime_visors)
27 | end
28 | end
29 |
30 | function CHAR:SetSquad(newSquad)
31 | local squad_data = ix.squads.stored[newSquad]
32 | if !squad_data then return false end
33 | local oldSquad = self:GetSquad()
34 | local oldSquad_data = ix.squads.stored[oldSquad]
35 | local oldCallback = oldSquad_data.onDemoted
36 | if oldCallback then
37 | oldCallback(self, newSquad)
38 | end
39 | hook.Run("OnCPSquadDemoted", self, oldSquad, newSquad)
40 |
41 | self:SetData("cmbSquad", newSquad)
42 | local callback = squad_data.onInstanced
43 | if callback then
44 | callback(self, oldSquad)
45 | end
46 | local uniform = squad_data.uniform
47 | if uniform then
48 | self:CalculateUniformSkin(true)
49 | end
50 | hook.Run("OnCPSquadInstanced", self, oldSquad, newSquad)
51 | end
--------------------------------------------------------------------------------
/autowalk.lua:
--------------------------------------------------------------------------------
1 | PLUGIN.name = 'Auto Walk'
2 | PLUGIN.author = 'NightAngel (Ported from Flux)'
3 | PLUGIN.description = 'Allows users to press a button to automatically walk forward.'
4 | PLUGIN.button = KEY_N
5 |
6 | if SERVER then
7 | PLUGIN.check = {
8 | [IN_FORWARD] = true,
9 | [IN_BACK] = true,
10 | [IN_MOVELEFT] = true,
11 | [IN_MOVERIGHT] = true,
12 | [IN_JUMP] = true
13 | }
14 |
15 | function PLUGIN:SetupMove(client, move_data, cmd_data)
16 | if not client:GetNetVar('auto_walk', false) then return end
17 | move_data:SetForwardSpeed(move_data:GetMaxSpeed())
18 |
19 | for k in pairs(self.check) do
20 | if cmd_data:KeyDown(k) then
21 | client:SetNetVar('auto_walk', false)
22 | break
23 | end
24 | end
25 | end
26 |
27 | concommand.Add('ix_toggleautowalk', function(client)
28 | if hook.Run('CanPlayerAutoWalk', client) ~= false then
29 | client:SetNetVar('auto_walk', not client:GetNetVar('auto_walk', false))
30 | end
31 | end)
32 |
33 | function PLUGIN:CanPlayerAutoWalk(client)
34 | return true
35 | end
36 | else
37 | function PLUGIN:SetupMove(client, move_data, cmd_data)
38 | if not client:GetNetVar('auto_walk', false) then return end
39 | move_data:SetForwardSpeed(move_data:GetMaxSpeed())
40 | end
41 |
42 | function PLUGIN:PlayerButtonDown(client, button)
43 | if button == self.button then
44 | if (client.ixNextAWToggle || 0) > CurTime() then return end
45 | RunConsoleCommand('ix_toggleautowalk')
46 | client.ixNextAWToggle = CurTime() + 1
47 | end
48 | end
49 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_zip_tie.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Zip Tie"
3 | ITEM.description = "An orange zip-tie used to restrict people."
4 | ITEM.price = 8
5 | ITEM.model = "models/items/crossbowrounds.mdl"
6 | ITEM.factions = {FACTION_MPF, FACTION_OTA}
7 | ITEM.functions.Use = {
8 | OnRun = function(itemTable)
9 | local client = itemTable.player
10 | local data = {}
11 | data.start = client:GetShootPos()
12 | data.endpos = data.start + client:GetAimVector() * 96
13 | data.filter = client
14 | local target = util.TraceLine(data).Entity
15 |
16 | if (IsValid(target) and target:IsPlayer() and target:GetCharacter()
17 | and !target:GetNetVar("tying") and !target:IsRestricted()) then
18 | itemTable.bBeingUsed = true
19 |
20 | client:SetAction("@tying", 5)
21 |
22 | client:DoStaredAction(target, function()
23 | target:SetRestricted(true)
24 | target:SetNetVar("tying")
25 | target:NotifyLocalized("fTiedUp")
26 |
27 | if (target:IsCombine()) then
28 | Schema:AddCombineDisplayMessage("@cLosingContact", Color(255, 255, 255, 255))
29 | Schema:AddCombineDisplayMessage("@cLostContact", Color(255, 0, 0, 255))
30 | end
31 |
32 | itemTable:Remove()
33 | end, 5, function()
34 | client:SetAction()
35 |
36 | target:SetAction()
37 | target:SetNetVar("tying")
38 |
39 | itemTable.bBeingUsed = false
40 | end)
41 |
42 | target:SetNetVar("tying", true)
43 | target:SetAction("@fBeingTied", 5)
44 | else
45 | itemTable.player:NotifyLocalized("plyNotValid")
46 | end
47 |
48 | return false
49 | end,
50 | OnCanRun = function(itemTable)
51 | return !IsValid(itemTable.entity) or itemTable.bBeingUsed
52 | end
53 | }
54 |
55 | function ITEM:CanTransfer(inventory, newInventory)
56 | return !self.bBeingUsed
57 | end
58 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/needs/sh_commands.lua:
--------------------------------------------------------------------------------
1 |
2 | local Format = Format
3 |
4 | do
5 | ix.command.Add("CharSetHunger", {
6 | description = "Установить голод персонажу",
7 | adminOnly = true,
8 | arguments = {
9 | ix.type.character,
10 | bit.bor(ix.type.number, ix.type.optional)
11 | },
12 | OnRun = function(self, client, target, value)
13 | if !value then value = 0 end
14 | target:SetHunger(value)
15 | client:Notify(Format('Вы успешно установили голод для %s на %s', target:GetName(), value))
16 | end,
17 | bNoIndicator = true
18 | })
19 | end
20 |
21 | do
22 | ix.command.Add("CharSetThirst", {
23 | description = "Установить жажду персонажу",
24 | adminOnly = true,
25 | arguments = {
26 | ix.type.character,
27 | bit.bor(ix.type.number, ix.type.optional)
28 | },
29 | OnRun = function(self, client, target, value)
30 | if !value then value = 0 end
31 | target:SetThirst(value)
32 | client:Notify(Format('Вы успешно установили жажду для %s на %s', target:GetName(), value))
33 | end,
34 | bNoIndicator = true
35 | })
36 | end
37 |
38 | do
39 | ix.command.Add("CharSetNeeds", {
40 | description = "Установить голод и жажду игроку",
41 | adminOnly = true,
42 | arguments = {
43 | ix.type.character,
44 | bit.bor(ix.type.number, ix.type.optional)
45 | },
46 | OnRun = function(self, client, target, value)
47 | if !value then value = 0 end
48 | target:SetThirst(value)
49 | target:SetHunger(value)
50 | client:Notify(Format('Вы успешно установили потребности для %s на %s', target:GetName(), value))
51 | end,
52 | bNoIndicator = true
53 | })
54 | end
--------------------------------------------------------------------------------
/languages/sh_meta.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local CHAR = ix.meta.character
4 | local tostring = tostring
5 |
6 | function CHAR:CanSpeakLanguage(language)
7 | local charLanguages = string.Split( tostring(self:GetAdditionalLanguages()), ';' )
8 | local bStatus = false
9 |
10 | if (charLanguages and !table.IsEmpty(charLanguages)) then
11 | if (table.HasValue(charLanguages, language)) then
12 | bStatus = true
13 | end
14 | end
15 |
16 | return bStatus
17 | end
18 |
19 | if (SERVER) then
20 | function CHAR:AddLanguage(language)
21 | local langTable = ix.languages:GetAll()[language]
22 | if (langTable) then
23 | if self:CanSpeakLanguage(language) then return end
24 | self:SetAdditionalLanguages( tostring( self:GetAdditionalLanguages() ) .. ';' .. tostring( language ) )
25 | hook.Run('CharacterLearnedLanguage', self, language, langTable)
26 | else
27 | return false, 'unknown table'
28 | end
29 | end
30 |
31 | function CHAR:RemoveLanguage(language)
32 | local langTable = ix.languages:GetAll()[language]
33 | if (langTable) then
34 | if self:GetAdditionalLanguages():find(tostring(language)) then
35 | local charLanguages = string.Split( tostring(self:GetAdditionalLanguages()), ';' )
36 | for _, charLanguage in pairs(charLanguages) do
37 | if (charLanguage == language) then
38 | table.RemoveByValue(charLanguages, language)
39 | end
40 | end
41 | charLanguages = table.concat(charLanguages, ';')
42 | self:SetAdditionalLanguages( tostring(charLanguages) )
43 | hook.Run('CharacterUnLearnedLanguage', self, language, langTable)
44 | end
45 | else
46 | return false, 'unknown table'
47 | end
48 | end
49 | end
--------------------------------------------------------------------------------
/needs/items/base/sh_foods.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Foods"
3 | ITEM.model = "models/props_junk/garbage_metalcan001a.mdl"
4 | ITEM.category = "Consumables"
5 |
6 | ITEM.useSound = "items/medshot4.wav"
7 | ITEM.restoreSaturation = 0
8 | ITEM.restoreSatiety = 0
9 | ITEM.returnItems = {}
10 |
11 | function ITEM:OnInstanced(invID, x, y, item)
12 | if item then
13 | item:SetData("remaining", item.RemainingDefault)
14 | end
15 | end
16 |
17 | if (CLIENT) then
18 | function ITEM:PopulateTooltip(tooltip)
19 | local panel = tooltip:AddRowAfter( "name", "remaining" )
20 | panel:SetText( "Remaining: " .. self:GetData("remaining", 4) )
21 | panel:SizeToContents()
22 | end
23 | end
24 |
25 | ITEM.functions.Consume = {
26 | name = "Consume",
27 | tip = "useTip",
28 | icon = "icon16/arrow_right.png",
29 | OnRun = function( item )
30 | local client = item.player
31 | local char = client:GetCharacter()
32 |
33 | if istable( item.useSound ) then
34 | ix.util.EmitQueuedSounds( client, item.useSound, 0, 0.1, 70, 100)
35 | else
36 | client:EmitSound( item.useSound, 70 )
37 | end
38 |
39 | if istable( item.returnItems ) then
40 | for _, v in ipairs( item.returnItems ) do
41 | char:GetInventory():Add( v )
42 | end
43 | else
44 | char:GetInventory():Add( item.returnItems )
45 | end
46 |
47 | if (item.restoreSaturation) then
48 | char:RestoreSaturation( item.restoreSaturation/item:GetData("remaining", 4) )
49 | end
50 |
51 | if (item.restoreSatiety) then
52 | char:RestoreSatiety( item.restoreSatiety/item:GetData("remaining", 4) )
53 | end
54 |
55 | item:SetData("remaining", item:GetData("remaining", 4) - 1)
56 |
57 | if item:GetData("remaining", 4) <= 0 then
58 | return true
59 | end
60 |
61 | return false
62 | end,
63 | OnCanRun = function(item)
64 | local factionTable = ix.faction.indices[item.player:Team()] or {}
65 | return (factionTable.includeNeeds or false)
66 | end
67 | }
68 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pts/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Патрульные Группы"
4 | PLUGIN.author = "Bilwin"
5 | ix.patrolgroups = ix.patrolgroups or {}
6 | ix.patrolgroups.stored = ix.patrolgroups.stored or {}
7 | ix.util.Include("sv_plugin.lua")
8 | ix.util.Include("sh_cmds.lua")
9 |
10 | local meta = PLAYER
11 | function meta:InPT()
12 | local bStatus = false
13 |
14 | for _, data in ipairs(ix.patrolgroups.stored) do
15 | if data.members and !table.IsEmpty(data.members) then
16 | for _, client in ipairs(data.members) do
17 | if client == self then
18 | bStatus = true
19 | break
20 | end
21 | end
22 | end
23 | end
24 |
25 | return bStatus
26 | end
27 |
28 | function meta:GetPT()
29 | local stored, _id
30 |
31 | for id, data in ipairs(ix.patrolgroups.stored) do
32 | if data.members and !table.IsEmpty(data.members) then
33 | for _, client in ipairs(data.members) do
34 | if client == self then
35 | stored = ix.patrolgroups.stored[id]
36 | _id = id
37 | break
38 | end
39 | end
40 | end
41 | end
42 |
43 | return stored, _id
44 | end
45 |
46 | if CLIENT then
47 | net.Receive("ixPTSync", function(len)
48 | local normal_table = net.ReadCompressedTable()
49 | for _, data in ipairs(normal_table) do
50 | if data.members and !table.IsEmpty(data.members) then
51 | for clientID, client in ipairs(data.members) do
52 | data.members[clientID] = ix.util.FindPlayer(client)
53 | end
54 | end
55 |
56 | if data.owner then
57 | data.owner = ix.util.FindPlayer(data.owner)
58 | end
59 | end
60 |
61 | ix.patrolgroups.stored = normal_table
62 | end)
63 | end
--------------------------------------------------------------------------------
/gaszones/sh_meta.lua:
--------------------------------------------------------------------------------
1 |
2 | local CHAR = ix.meta.character
3 | local META = FindMetaTable("Player")
4 |
5 | function CHAR:InGasArea()
6 | local player = self:GetPlayer()
7 | local currentArea = player:GetArea() or nil
8 | if (currentArea) then
9 | local stored = ix.area.stored[player:GetArea()] or nil
10 | if (stored and player:GetMoveType() ~= MOVETYPE_NOCLIP) then
11 | local clientPos = player:GetPos() + player:OBBCenter()
12 | return stored.type == 'gas' and clientPos:WithinAABox(stored.startPosition, stored.endPosition), stored
13 | end
14 | else
15 | return false
16 | end
17 | end
18 |
19 | function META:InGasArea()
20 | local character = self:GetCharacter()
21 | if (character) then
22 | return character:InGasArea()
23 | else
24 | return false
25 | end
26 | end
27 |
28 | function CHAR:GetRoundedToxicity()
29 | local toxicity = self:GetToxicity()
30 | local rounded = math.Clamp(toxicity, 0, 100)
31 | return rounded
32 | end
33 |
34 | function CHAR:WearingGasmask()
35 | local inventory = self:GetInventory()
36 | local bStatus = false
37 | local isImmuneFaction = ix.faction.indices[self:GetFaction()].immuneGas or false
38 |
39 | if (isImmuneFaction) then
40 | bStatus = true
41 | else
42 | for _, item in pairs( inventory:GetItems() ) do
43 | if (item:GetData("equip") == true and item.gasMask) then
44 | bStatus = true
45 | end
46 | end
47 | end
48 |
49 | return bStatus
50 | end
51 |
52 | if (SERVER) then
53 | function CHAR:AddToxicity(value)
54 | local toxicity = self:GetToxicity()
55 | local rounded = math.Clamp(toxicity + value, 0, 100)
56 | self:SetToxicity(rounded)
57 | end
58 |
59 | function CHAR:SubtractToxicity(value)
60 | local toxicity = self:GetToxicity()
61 | local rounded = math.Clamp(toxicity - value, 0, 100)
62 | self:SetToxicity(rounded)
63 | end
64 | end
--------------------------------------------------------------------------------
/languages/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Languages"
3 | PLUGIN.author = "Bilwin"
4 | PLUGIN.version = 1.01
5 | PLUGIN.schema = "Any"
6 |
7 | ix.util.Include("sh_languages.lua")
8 | ix.util.Include("sh_meta.lua")
9 |
10 | ix.char.RegisterVar("additionalLanguages", {
11 | field = "additionalLanguages",
12 | fieldType = ix.type.string,
13 | bNetworked = true,
14 | bNoDisplay = true
15 | })
16 |
17 | function PLUGIN:InitializedChatClasses()
18 | ix.command.Add("CharAddLanguage", {
19 | description = "Let the specified player speak the specified language",
20 | adminOnly = true,
21 | arguments = {ix.type.character, ix.type.string},
22 | OnRun = function(self, client, character, language)
23 | if character and IsValid(character:GetPlayer()) then
24 | if ix.languages:GetAll()[language] then
25 | character:AddLanguage(language)
26 | client:Notify('Character '..character:GetName()..' ('..character:GetPlayer():SteamID()..') successfully issued knowledge of the language: '..ix.languages:GetAll()[language].name)
27 | else
28 | client:Notify('The specified language was not found.')
29 | end
30 | else
31 | client:Notify('There is no such player')
32 | end
33 | end
34 | })
35 |
36 | ix.command.Add("CharRemoveLanguage", {
37 | description = "Take away from the specified character the ability to speak the specified language",
38 | adminOnly = true,
39 | arguments = {ix.type.character, ix.type.string},
40 | OnRun = function(self, client, character, language)
41 | if character and IsValid(character:GetPlayer()) then
42 | if ix.languages:GetAll()[language] then
43 | character:RemoveLanguage(language)
44 | client:Notify('You have successfully removed the ability to speak in '..ix.languages:GetAll()[language].name..' language to the character '..character:GetName()..' ('..character:GetPlayer():SteamID()..')')
45 | else
46 | client:Notify('The specified language was not found.')
47 | end
48 | else
49 | client:Notify('There is no such player')
50 | end
51 | end
52 | })
53 | end
54 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/items/sh_handheld_radio.lua:
--------------------------------------------------------------------------------
1 |
2 | ITEM.name = "Рация"
3 | ITEM.model = Model("models/deadbodies/dead_male_civilian_radio.mdl")
4 | ITEM.description = "A shiny handheld radio with a frequency tuner.\nIt is currently turned %s%s."
5 | ITEM.cost = 50
6 | ITEM.classes = {CLASS_EMP, CLASS_EOW}
7 | ITEM.flag = "v"
8 |
9 | -- Inventory drawing
10 | if (CLIENT) then
11 | function ITEM:PaintOver(item, w, h)
12 | if (item:GetData("enabled")) then
13 | surface.SetDrawColor(110, 255, 110, 100)
14 | surface.DrawRect(w - 14, h - 14, 8, 8)
15 | end
16 | end
17 | end
18 |
19 | function ITEM:GetDescription()
20 | local enabled = self:GetData("enabled")
21 | return string.format(self.description, enabled and "включен" or "выключен", enabled and (" и на частоте " .. self:GetData("frequency", "100.0")) or "")
22 | end
23 |
24 | function ITEM.postHooks.drop(item, status)
25 | item:SetData("enabled", false)
26 | end
27 |
28 | ITEM.functions.Frequency = {
29 | name = "Сменить частоту",
30 | OnRun = function(itemTable)
31 | netstream.Start(itemTable.player, "Frequency", itemTable:GetData("frequency", "000.0"))
32 |
33 | return false
34 | end
35 | }
36 |
37 | ITEM.functions.Toggle = {
38 | name = "Переключить",
39 | OnRun = function(itemTable)
40 | local character = itemTable.player:GetCharacter()
41 | local radios = character:GetInventory():GetItemsByUniqueID("handheld_radio", true)
42 | local bCanToggle = true
43 |
44 | -- don't allow someone to turn on another radio when they have one on already
45 | if (#radios > 1) then
46 | for k, v in ipairs(radios) do
47 | if (v != itemTable and v:GetData("enabled", false)) then
48 | bCanToggle = false
49 | break
50 | end
51 | end
52 | end
53 |
54 | if (bCanToggle) then
55 | itemTable:SetData("enabled", !itemTable:GetData("enabled", false))
56 | itemTable.player:EmitSound("buttons/lever7.wav", 50, math.random(170, 180), 0.25)
57 | else
58 | itemTable.player:NotifyLocalized("radioAlreadyOn")
59 | end
60 |
61 | return false
62 | end
63 | }
64 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/combineoverlay.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = 'Combine Overlay'
4 | PLUGIN.description = 'New Combine Overlay'
5 | PLUGIN.author = 'Bilwin'
6 | PLUGIN.schema = 'HL2 RP'
7 | PLUGIN.cca_overlay = ix.util.GetMaterial 'effects/combine_binocoverlay'
8 | PLUGIN.ota_overlay = ix.util.GetMaterial 'effects/combine_binocoverlay'
9 |
10 | ix.lang.AddTable("english", {
11 | optShowCombineOverlay = "Show combine overlay",
12 | optCombineOverlayAlpha = "Combine overlay alpha"
13 | })
14 |
15 | ix.lang.AddTable("russian", {
16 | optShowCombineOverlay = "Отображать оверлей",
17 | optCombineOverlayAlpha = "Прозрачность оверлея"
18 | })
19 |
20 | ix.option.Add("showCombineOverlay", ix.type.bool, true, {
21 | category = PLUGIN.name,
22 | hidden = function()
23 | return !LocalPlayer():IsCombine()
24 | end
25 | })
26 |
27 | ix.option.Add("combineOverlayAlpha", ix.type.number, 0.5, {
28 | category = PLUGIN.name,
29 | min = 0.1,
30 | max = 1,
31 | decimals = 1,
32 | hidden = function()
33 | return !LocalPlayer():IsCombine()
34 | end
35 | })
36 |
37 | local overlay_alpha = 0.5
38 | function PLUGIN:RenderScreenspaceEffects()
39 | if ix.option.Get('showCombineOverlay', false) then
40 | if LocalPlayer():IsCombine() then
41 | overlay_alpha = ix.option.Get('combineOverlayAlpha', 0.5)
42 | if LocalPlayer():Team() == FACTION_MPF then
43 | render.UpdateScreenEffectTexture()
44 |
45 | self.cca_overlay:SetFloat("$alpha", overlay_alpha)
46 | self.cca_overlay:SetInt("$ignorez", 1)
47 |
48 | render.SetMaterial(self.cca_overlay)
49 | render.DrawScreenQuad()
50 | elseif LocalPlayer():Team() == FACTION_OTA then
51 | render.UpdateScreenEffectTexture()
52 |
53 | self.ota_overlay:SetFloat("$alpha", overlay_alpha)
54 | self.ota_overlay:SetInt("$ignorez", 1)
55 |
56 | render.SetMaterial(self.ota_overlay)
57 | render.DrawScreenQuad()
58 | end
59 | end
60 | end
61 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_squad/libs/sh_squads.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | ix.squads = ix.squads or {}
4 | ix.squads.stored = ix.squads.stored or {}
5 |
6 | function ix.squads.Create(uniqueID, data)
7 | data.name = data.name or "Undefined"
8 | data.description = data.description or "Undefined"
9 | data.onInstanced = data.onInstanced
10 | data.onDemoted = data.onDemoted
11 | data.weapons = data.weapons or {}
12 | data.xp = data.xp or 0
13 | data.uniform = data.uniform
14 | data.isPrivate = data.isPrivate or false
15 | data.uniqueID = uniqueID
16 | ix.squads.stored[uniqueID] = data
17 | end
18 |
19 | function ix.squads.LoadFromDir(dir)
20 | for _, v in ipairs( file.Find(dir.."/*.lua", "LUA") ) do
21 | local niceName = v:sub(4, -5)
22 |
23 | SQUAD = {}
24 | ix.util.Include(dir.."/"..v)
25 |
26 | SQUAD.name = SQUAD.name or "Undefined"
27 | SQUAD.description = SQUAD.description or "Undefined"
28 | SQUAD.onInstanced = SQUAD.onInstanced
29 | SQUAD.onDemoted = SQUAD.onDemoted
30 | SQUAD.weapons = SQUAD.weapons or {}
31 | SQUAD.xp = SQUAD.xp or 0
32 | SQUAD.uniform = SQUAD.uniform
33 | SQUAD.isPrivate = SQUAD.isPrivate or false
34 | SQUAD.uniqueID = SQUAD.uniqueID or niceName
35 | SQUAD.max = SQUAD.max
36 |
37 | ix.squads.stored[SQUAD.uniqueID] = SQUAD
38 | SQUAD = nil
39 | end
40 | end
41 |
42 | function ix.squads.IsLimited(squad)
43 | if ix.squads.stored[squad] && ix.squads.stored[squad].max then
44 | local players = player.GetAll()
45 | local max = ix.squads.stored[squad].max
46 | local count = 0
47 |
48 | for i = 1, #players do
49 | local cl = players[i]
50 | if !cl:GetCharacter() then continue end
51 | if !cl:IsCombine() then continue end
52 | if cl:GetCharacter():GetSquad() == squad then
53 | count = count + 1
54 | end
55 | end
56 |
57 | if count >= max then
58 | return true
59 | end
60 | end
61 |
62 | return false
63 | end
64 |
65 | function PLUGIN:InitializedPlugins()
66 | ix.squads.LoadFromDir(self.folder..'/squads')
67 | end
--------------------------------------------------------------------------------
/metropolice_api/sh_meta.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local entityMeta = ENTITY
4 | local playerMeta = PLAYER
5 |
6 | function entityMeta:GetPrimaryVisorColor()
7 | return self:GetNWVector("PrimaryVisorColor")
8 | end
9 |
10 | function entityMeta:GetSecondaryVisorColor()
11 | return self:GetNWVector("SecondaryVisorColor")
12 | end
13 |
14 | function entityMeta:SetPrimaryVisorColor( vector )
15 | if isvector(vector) then
16 | self:SetNWVector("PrimaryVisorColor", vector)
17 | end
18 | end
19 |
20 | function entityMeta:SetSecondaryVisorColor( vector )
21 | if isvector(vector) then
22 | self:SetNWVector("SecondaryVisorColor", vector)
23 | end
24 | end
25 |
26 | function entityMeta:GetArmbandCode()
27 | local code = self:GetNWString("ArmbandCode")
28 | if code and code != "" then
29 | local codeTable = string.Explode("_", code)
30 | if codeTable then
31 | local bg_color = Color(255,255,255)
32 | local icon_color = Color(255,255,255)
33 | local text_color = Color(255,255,255)
34 |
35 | if codeTable[1] then
36 | local r, g, b = codeTable[1]:match("%((%d+),(%d+),(%d+)%)")
37 | bg_color = Color( r, g, b )
38 | end
39 |
40 | if codeTable[3] then
41 | local r, g, b, a = codeTable[3]:match("%((%d+),(%d+),(%d+),(%d+)%)")
42 | icon_color = Color( r, g, b, a )
43 | end
44 |
45 | if codeTable[5] then
46 | local r, g, b, a = codeTable[5]:match("%((%d+),(%d+),(%d+),(%d+)%)")
47 | text_color = Color( r, g, b, a )
48 | end
49 |
50 | local backgroundID = tonumber(codeTable[2])
51 | local iconID = tonumber(codeTable[4])
52 | local textID = tonumber(codeTable[6])
53 |
54 | return bg_color, backgroundID, icon_color, iconID, text_color, textID
55 | end
56 | end
57 | end
58 |
59 | function entityMeta:SetArmbandCode(clrBG, numBG, clrIcon, numIcon, clrText, numText)
60 | local code = "(%s,%s,%s)_%s_(%s,%s,%s,%s)_%s_(%s,%s,%s,%s)_%s"
61 | local str = string.format(code, tostring(clrBG.r), tostring(clrBG.g), tostring(clrBG.b), tostring(numBG), tostring(clrIcon.r), tostring(clrIcon.g), tostring(clrIcon.b), tostring(clrIcon.a), tostring(numIcon), tostring(clrText.r), tostring(clrText.g), tostring(clrText.b), tostring(clrText.a), tostring(numText))
62 | self:SetNWString("ArmbandCode", str)
63 | end
64 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/metropolice_api/sh_meta.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local entityMeta = ENTITY
4 | local playerMeta = PLAYER
5 |
6 | function entityMeta:GetPrimaryVisorColor()
7 | return self:GetNWVector("PrimaryVisorColor")
8 | end
9 |
10 | function entityMeta:GetSecondaryVisorColor()
11 | return self:GetNWVector("SecondaryVisorColor")
12 | end
13 |
14 | function entityMeta:SetPrimaryVisorColor( vector )
15 | if isvector(vector) then
16 | self:SetNWVector("PrimaryVisorColor", vector)
17 | end
18 | end
19 |
20 | function entityMeta:SetSecondaryVisorColor( vector )
21 | if isvector(vector) then
22 | self:SetNWVector("SecondaryVisorColor", vector)
23 | end
24 | end
25 |
26 | function entityMeta:GetArmbandCode()
27 | local code = self:GetNWString("ArmbandCode")
28 | if code and code != "" then
29 | local codeTable = string.Explode("_", code)
30 | if codeTable then
31 | local bg_color = Color(255,255,255)
32 | local icon_color = Color(255,255,255)
33 | local text_color = Color(255,255,255)
34 |
35 | if codeTable[1] then
36 | local r, g, b = codeTable[1]:match("%((%d+),(%d+),(%d+)%)")
37 | bg_color = Color( r, g, b )
38 | end
39 |
40 | if codeTable[3] then
41 | local r, g, b, a = codeTable[3]:match("%((%d+),(%d+),(%d+),(%d+)%)")
42 | icon_color = Color( r, g, b, a )
43 | end
44 |
45 | if codeTable[5] then
46 | local r, g, b, a = codeTable[5]:match("%((%d+),(%d+),(%d+),(%d+)%)")
47 | text_color = Color( r, g, b, a )
48 | end
49 |
50 | local backgroundID = tonumber(codeTable[2])
51 | local iconID = tonumber(codeTable[4])
52 | local textID = tonumber(codeTable[6])
53 |
54 | return bg_color, backgroundID, icon_color, iconID, text_color, textID
55 | end
56 | end
57 | end
58 |
59 | function entityMeta:SetArmbandCode(clrBG, numBG, clrIcon, numIcon, clrText, numText)
60 | local code = "(%s,%s,%s)_%s_(%s,%s,%s,%s)_%s_(%s,%s,%s,%s)_%s"
61 | local str = string.format(code, tostring(clrBG.r), tostring(clrBG.g), tostring(clrBG.b), tostring(numBG), tostring(clrIcon.r), tostring(clrIcon.g), tostring(clrIcon.b), tostring(clrIcon.a), tostring(numIcon), tostring(clrText.r), tostring(clrText.g), tostring(clrText.b), tostring(clrText.a), tostring(numText))
62 | self:SetNWString("ArmbandCode", str)
63 | end
64 |
--------------------------------------------------------------------------------
/.deprecated/scrolltext.lua:
--------------------------------------------------------------------------------
1 |
2 | local ix = ix
3 | local PLUGIN = PLUGIN
4 | PLUGIN.name = "Scroll Text"
5 | PLUGIN.description = "Provides an interface for drawing and sending 'scrolling text.'"
6 | PLUGIN.author = "Chessnut"
7 | PLUGIN.schema = "Any"
8 | PLUGIN.version = 1.0
9 |
10 | PLUGIN.scroll = PLUGIN.scroll or {}
11 | PLUGIN.scroll.buffer = PLUGIN.scroll.buffer or {}
12 |
13 | local CHAR_DELAY = 0.1
14 | if CLIENT then
15 | function PLUGIN:AddText(text, callback)
16 | local info = {text = "", callback = callback, nextChar = 0, char = ""}
17 | local index = table.insert(self.scroll.buffer, info)
18 | local i = 1
19 |
20 | timer.Create("ScrollText."..tostring(info), CHAR_DELAY, #text, function()
21 | if (info) then
22 | info.text = string.sub(text, 1, i)
23 | i = i + 1
24 |
25 | LocalPlayer():EmitSound("common/talk.wav", 40, math.random(120, 140))
26 |
27 | if (i >= #text) then
28 | info.char = ""
29 | info.start = RealTime() + 3
30 | info.finish = RealTime() + 5
31 | end
32 | end
33 | end)
34 | end
35 |
36 | local SCROLL_X = ScrW() * 0.9
37 | local SCROLL_Y = ScrH() * 0.7
38 |
39 | function PLUGIN:HUDPaint()
40 | local curTime = RealTime()
41 | for k, v in ipairs(self.scroll.buffer) do -- TO DO: check table key/index
42 | local alpha = 255
43 |
44 | if (v.start and v.finish) then
45 | alpha = 255 - math.Clamp(math.TimeFraction(v.start, v.finish, curTime) * 255, 0, 255)
46 | elseif (v.nextChar < curTime) then
47 | v.nextChar = RealTime() + 0.01
48 | v.char = string.char(math.random(47, 90))
49 | end
50 |
51 | ix.util.DrawText(v.text..v.char, SCROLL_X, SCROLL_Y - (k * 24), Color(255, 255, 255, alpha), 2, 1)
52 |
53 | if (alpha == 0) then
54 | if (v.callback) then
55 | v.callback()
56 | end
57 |
58 | table.remove(self.scroll.buffer, k)
59 | end
60 | end
61 | end
62 |
63 | net.Receive('ixScrollData', function(len)
64 | PLUGIN:AddText(net.ReadString())
65 | end)
66 | else
67 | util.AddNetworkString("ixScrollData")
68 | function PLUGIN:Send(text, receiver, callback)
69 | net.Start("ixScrollData")
70 | net.WriteString(text)
71 | net.Send(receiver)
72 |
73 | timer.Simple(CHAR_DELAY * #text + 4, function()
74 | if callback then
75 | callback()
76 | end
77 | end)
78 | end
79 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/factions/sh_citizen.lua:
--------------------------------------------------------------------------------
1 |
2 | FACTION.name = "Гражданин"
3 | FACTION.description = "A regular human citizen enslaved by the Universal Union."
4 | FACTION.color = Color(150, 125, 100, 255)
5 | FACTION.isDefault = true
6 | FACTION.npcRelations = {
7 | ["npc_alyx"] = D_NU,
8 | ["npc_barney"] = D_NU,
9 | ["npc_citizen"] = D_NU,
10 | ["npc_dog"] = D_NU,
11 | ["npc_magnusson"] = D_NU,
12 | ["npc_kleiner"] = D_NU,
13 | ["npc_mossman"] = D_NU,
14 | ["npc_eli"] = D_NU,
15 | ["npc_fisherman"] = D_NU,
16 | ["npc_gman"] = D_NU,
17 | ["Medic"] = D_NU,
18 | ["npc_odessa"] = D_NU,
19 | ["Rebel"] = D_NU,
20 | ["Refugee"] = D_NU,
21 | ["VortigauntUriah"] = D_NU,
22 | ["npc_vortigaunt"] = D_NU,
23 | ["VortigauntSlave"] = D_NU,
24 |
25 | ["npc_zombie"] = D_HT,
26 | ["npc_poisonzombie"] = D_HT,
27 | ["npc_zombie_torso"] = D_HT,
28 | ["npc_headcrab_black"] = D_HT,
29 | ["npc_headcrab"] = D_HT,
30 | ["npc_fastzombie_torso"] = D_HT,
31 | ["npc_fastzombie"] = D_HT,
32 | ["npc_headcrab_fast"] = D_HT,
33 | ["npc_barnacle"] = D_HT,
34 | ["npc_antlion_worker"] = D_HT,
35 | ["npc_antlionguardian"] = D_HT,
36 | ["npc_antlionguard"] = D_HT,
37 | ["npc_antlion"] = D_HT,
38 | ["npc_zombine"] = D_HT,
39 |
40 | ["npc_resturret02"] = D_FR,
41 | ["npc_resturret03"] = D_FR,
42 | ["npc_resturret01"] = D_FR,
43 |
44 | ["npc_breen"] = D_NU,
45 | ["npc_cscanner"] = D_FR,
46 | ["npc_combine_camera"] = D_FR,
47 | ["npc_turret_ceiling"] = D_HT,
48 | ["npc_combinegunship"] = D_FR,
49 | ["CombineElite"] = D_HT,
50 | ["npc_combine_s"] = D_HT,
51 | ["npc_hunter"] = D_FR,
52 | ["npc_helicopter"] = D_FR,
53 | ["npc_manhack"] = D_FR,
54 | ["npc_metropolice"] = D_NU,
55 | ["CombinePrison"] = D_HT,
56 | ["PrisonShotgunner"] = D_HT,
57 | ["npc_rollermine"] = D_HT,
58 | ["npc_clawscanner"] = D_HT,
59 | ["ShotgunSoldier"] = D_HT,
60 | ["npc_strider"] = D_HT,
61 | ["npc_turret_floor"] = D_HT,
62 | ["npc_turret_ground"] = D_HT,
63 | ["npc_sniper"] = D_HT
64 | }
65 |
66 | function FACTION:OnCharacterCreated(client, character)
67 | local id = Schema:ZeroNumber(math.random(1, 99999), 5)
68 | local inventory = character:GetInventory()
69 |
70 | character:SetCID(id)
71 | inventory:Add("suitcase", 1)
72 | inventory:Add("cid", 1, {
73 | name = character:GetName(),
74 | id = id
75 | })
76 | end
77 |
78 | FACTION_CITIZEN = FACTION.index
79 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/derma/cl_combinedisplay.lua:
--------------------------------------------------------------------------------
1 |
2 | local PANEL = {}
3 |
4 | AccessorFunc(PANEL, "font", "Font", FORCE_STRING)
5 | AccessorFunc(PANEL, "maxLines", "MaxLines", FORCE_NUMBER)
6 |
7 | function PANEL:Init()
8 | if (IsValid(ix.gui.combine)) then
9 | ix.gui.combine:Remove()
10 | end
11 |
12 | self.lines = {}
13 |
14 | self:SetMaxLines(6)
15 | self:SetFont("BudgetLabel")
16 |
17 | self:SetPos(6, 6)
18 | self:SetSize(ScrW(), self.maxLines * 20)
19 | self:ParentToHUD()
20 |
21 | ix.gui.combine = self
22 | end
23 |
24 | -- Adds a line to the combine display. Set expireTime to 0 if it should never be removed.
25 | function PANEL:AddLine(text, color, expireTime, ...)
26 | if (#self.lines >= self.maxLines) then
27 | for k, info in ipairs(self.lines) do
28 | if (info.expireTime != 0) then
29 | table.remove(self.lines, k)
30 | end
31 | end
32 | end
33 |
34 | -- check for any phrases and replace the text
35 | if (text:sub(1, 1) == "@") then
36 | text = L(text:sub(2), ...)
37 | end
38 |
39 | local index = #self.lines + 1
40 |
41 | self.lines[index] = {
42 | text = "<:: " .. text,
43 | color = color or color_white,
44 | expireTime = (expireTime != 0 and (CurTime() + (expireTime or 8)) or 0),
45 | character = 1
46 | }
47 |
48 | return index
49 | end
50 |
51 | function PANEL:RemoveLine(id)
52 | if (self.lines[id]) then
53 | table.remove(self.lines, id)
54 | end
55 | end
56 |
57 | function PANEL:Think()
58 | local x, _ = self:GetPos()
59 | local y = 4 + ix.gui.bars:GetTall()
60 |
61 | self:SetPos(x, y)
62 | end
63 |
64 | function PANEL:Paint(width, height)
65 | local textHeight = draw.GetFontHeight(self.font)
66 | local y = 0
67 |
68 | surface.SetFont(self.font)
69 |
70 | for k, info in ipairs(self.lines) do
71 | if (info.expireTime != 0 and CurTime() >= info.expireTime) then
72 | table.remove(self.lines, k)
73 | continue
74 | end
75 |
76 | if (info.character < info.text:len()) then
77 | info.character = info.character + 1
78 | end
79 |
80 | surface.SetTextColor(info.color)
81 | surface.SetTextPos(4, y)
82 | surface.DrawText(info.text:sub(1, info.character))
83 |
84 | y = y + textHeight
85 | end
86 |
87 | surface.SetDrawColor(Color(0, 0, 0, 255))
88 | end
89 |
90 | vgui.Register("ixCombineDisplay", PANEL, "Panel")
91 |
92 | if (IsValid(ix.gui.combine)) then
93 | vgui.Create("ixCombineDisplay")
94 | end
95 |
--------------------------------------------------------------------------------
/ambients/sh_plugin.lua:
--------------------------------------------------------------------------------
1 | local PLUGIN = PLUGIN
2 | PLUGIN.name = 'Ambients'
3 | PLUGIN.author = 'Bilwin'
4 |
5 | PLUGIN.defaultAmbientList = 'Half-Life 2' -- @comment from .ambientsList
6 | PLUGIN.defaultSpawnAmbient = 'Combine Citizenship' -- @comment from .spawnLists
7 |
8 | PLUGIN.ambientsList = {
9 | {
10 | name = 'Half-Life', -- @comment playlist name
11 | ost = {
12 | {'music/half-life03.mp3', 55}, -- @comment path, duration
13 | {'music/half-life04.mp3', 57},
14 | {'music/half-life05.mp3', 38},
15 | {'music/half-life07.mp3', 43},
16 | {'music/half-life11.mp3', 36}
17 | }
18 | },
19 | {
20 | name = 'Half-Life 2',
21 | ost = {
22 | {'music/hl2_song1.mp3', 44},
23 | {'music/hl2_song13.mp3', 56},
24 | {'music/hl2_song19.mp3', 115},
25 | {'music/hl2_song2.mp3', 172},
26 | {'music/hl2_song27_trainstation2.mp3', 72}
27 | }
28 | }
29 | }
30 |
31 | PLUGIN.spawnLists = { --- @comment start ambient when character loads
32 | {
33 | name = 'Combine Citizenship', --- @comment spawn playlist name
34 | ost = {
35 | [FACTION_CITIZEN] = {'music/hl2_song26_trainstation1.mp3', 90}, --- @comment [faction id] = {path, duration}
36 | [FACTION_METROPOLICE] = {'music/vlvx_song26.mp3', 110},
37 | [FACTION_OTA] = {'music/hl1_song14.mp3', 92}
38 | }
39 | },
40 | {
41 | name = 'Raising the Bar',
42 | ost = {
43 | [FACTION_CITIZEN] = {'music/hl2_song17.mp3', 63},
44 | [FACTION_METROPOLICE] = {'music/hl1_song5.mp3', 98},
45 | [FACTION_OTA] = {'music/vlvx_song28.mp3', 193}
46 | }
47 | },
48 | {
49 | name = 'Nothing',
50 | ost = {
51 | [FACTION_CITIZEN] = {'', 0},
52 | [FACTION_METROPOLICE] = {'', 0},
53 | [FACTION_OTA] = {'', 0}
54 | }
55 | }
56 | }
57 |
58 | ix.config.Add('enableAmbients', true, 'Should we enable a background music system', function(_, newValue)
59 | if not SERVER then return end
60 |
61 | net.Start('ixEnableAmbients', true)
62 | net.WriteBool(newValue)
63 | net.Broadcast()
64 | end, {
65 | category = PLUGIN.name
66 | })
67 |
68 | ix.util.Include('sv_plugin.lua')
69 | ix.util.Include('cl_plugin.lua')
--------------------------------------------------------------------------------
/trashpiles/entities/entities/ix_trashpile/init.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | AddCSLuaFile("cl_init.lua")
4 | AddCSLuaFile("shared.lua")
5 | include("shared.lua")
6 |
7 | function ENT:Initialize()
8 | self:SetModel( table.Random(PLUGIN.trashModels) )
9 | self:PhysicsInit(SOLID_VPHYSICS)
10 | self:SetUseType(SIMPLE_USE)
11 | self:SetSolid(SOLID_VPHYSICS)
12 | self:SetCollisionGroup(COLLISION_GROUP_WORLD)
13 | self:SetMoveType(MOVETYPE_NONE)
14 |
15 | local phys = self:GetPhysicsObject()
16 | if IsValid(phys) then
17 | phys:SetMass(120)
18 | phys:Sleep()
19 | end
20 | end
21 |
22 | function ENT:UpdateTransmitState()
23 | return TRANSMIT_PVS
24 | end
25 |
26 | function ENT:Use(client, caller)
27 | if (self:GetNetVar('looting') == true) then return end
28 | if (self:GetNetVar('looted') == true) then return end
29 |
30 | if (self.nextUse and CurTime() < self.nextUse) then
31 | return
32 | end
33 |
34 | self.nextUse = CurTime() + 0.5
35 |
36 | if (client:IsRestricted()) then
37 | return
38 | end
39 |
40 | if (!client:Crouching()) then
41 | client:Notify('You must be crouching')
42 | return
43 | end
44 |
45 | local cleantime = ix.config.Get("trashPileLootTime", 30)
46 | client:SetAction("Searching something...", cleantime)
47 | self:SetNetVar('looting', true)
48 |
49 | local uniqueID = "ixTrashSearch."..client:UniqueID()
50 | local data = {}
51 | data.filter = client
52 | timer.Create(uniqueID, 0.1, cleantime / 0.1, function()
53 | if (IsValid(client) and IsValid(self)) then
54 | data.start = client:GetShootPos()
55 | data.endpos = data.start + client:GetAimVector() * 96
56 |
57 | if (util.TraceLine(data).Entity != self or client:IsRestricted() or client:GetVelocity():LengthSqr() > 0) then
58 | timer.Remove(uniqueID)
59 | client:SetAction()
60 | self:SetNetVar('looting', false)
61 | elseif !client:Crouching() then
62 | timer.Remove(uniqueID)
63 | client:SetAction()
64 | self:SetNetVar('looting', false)
65 | elseif (timer.RepsLeft(uniqueID) == 0) then
66 | PLUGIN:Calculate(client, self)
67 | self:SetNetVar('looting', false)
68 | end
69 | else
70 | timer.Remove(uniqueID)
71 | if IsValid(client) then
72 | client:SetAction()
73 | end
74 |
75 | if IsValid(self) then
76 | self:SetNetVar('looting', false)
77 | end
78 | end
79 | end)
80 | end
81 |
82 | function ENT:CanTool(player, trace, tool)
83 | return false
84 | end
--------------------------------------------------------------------------------
/radios/cl_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | -- TODO: Screen scaling
3 | local PLUGIN = PLUGIN
4 | function PLUGIN:LoadFonts(font, genericFont)
5 | surface.CreateFont('ixRadio', {
6 | font = font,
7 | extended = true,
8 | size = 30,
9 | weight = 100,
10 | shadow = true,
11 | antialias = true
12 | })
13 | end
14 |
15 | net.Receive('ixRadio', function(_)
16 | local radio = net.ReadEntity()
17 |
18 | local frame = vgui.Create('DFrame')
19 | frame:SetSize( ScrW()*.25, ScrH()*.45 )
20 | frame:Center()
21 | frame:SetTitle( "" )
22 | frame:SetDraggable( false )
23 | frame:ShowCloseButton( true )
24 | frame:MakePopup()
25 | frame:SetAlpha(0)
26 | frame:AlphaTo(255, 0.4, 0)
27 | frame.Paint = function( self, w, h )
28 | ix.util.DrawBlur(self, 4)
29 | surface.SetDrawColor(ix.config.Get('color').r, ix.config.Get('color').g, ix.config.Get('color').b, 155)
30 | surface.DrawOutlinedRect(0, 0, w, h)
31 | end
32 |
33 | local scrollPanel = vgui.Create( "DScrollPanel", frame )
34 | scrollPanel:Dock( FILL )
35 |
36 | for key, value in pairs(PLUGIN.songs) do -- will be reworked soon
37 | local songpath = key
38 | key = vgui.Create('DButton', scrollPanel)
39 | key:SetSize(ScrW()*.225, ScrH()*.05)
40 | key:SetPos(ScrW()*.007, ScrH()*.04)
41 | key:SetFont('ixRadio')
42 | key:SetText(value)
43 | key:Dock(TOP)
44 | key.Color = Color(155, 155, 155, 25)
45 | key.DoClick = function()
46 | surface.PlaySound('helix/ui/press.wav')
47 | net.Start('ixRadio')
48 | net.WriteEntity(radio)
49 | net.WriteString(songpath)
50 | net.SendToServer()
51 | end
52 | key.OnCursorEntered = function()
53 | surface.PlaySound('helix/ui/rollover.wav')
54 | end
55 | key.Paint = function(self, w, h)
56 | if self:IsHovered() then
57 | self.Color.a = Lerp(0.075, self.Color.a , 35)
58 | else
59 | self.Color.a = Lerp(0.075, self.Color.a , 25)
60 | end
61 |
62 | if self:IsDown() then
63 | self.Color.a = Lerp(0.075, self.Color.a , 75)
64 | end
65 |
66 | draw.RoundedBox(0, 0, 0, w, h, self.Color)
67 | surface.SetDrawColor(5, 5, 5, 155)
68 | surface.DrawOutlinedRect(0, 0, w, h)
69 | end
70 | end
71 | end)
72 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/schema/languages/sh_english.lua:
--------------------------------------------------------------------------------
1 | LANGUAGE = {
2 | schemaName = "Half-Life 2 Roleplay",
3 | tying = "Tying...",
4 | unTying = "Untying...",
5 | isTied = "Tied",
6 | fTiedUp = "You have been tied up.",
7 | fBeingTied = "You are being tied up.",
8 | tiedUp = "They have been tied up.",
9 | beingTied = "They are being tied up.",
10 | beingUntied = "They are being untied.",
11 | needRequestDevice = "You need a request device to do this.",
12 | vendingNeedMoney = "You need %s tokens to purchase this.",
13 | vendingPurchased = "You purchased a drink for %s.",
14 | vendingRestocked = "You have restocked some drinks.",
15 | cantViewData = "You cannot view this person's data.",
16 | cid = "CID",
17 | citizenid = "Citizen ID",
18 | lastEdit = "Last revision by",
19 | lastEditDate = "Last revised on",
20 | objectivesTitle = "Current Objectives",
21 | searchingCorpse = "Searching corpse...",
22 | radioNotOn = "Your radio isn't on!",
23 | radioRequired = "You need a radio to do this.",
24 | radioAlreadyOn = "You already have a radio that is turned on!",
25 | economy = "Economy",
26 |
27 | -- combine display messages
28 | cViewData = "Downloading citizen profile data...",
29 | cViewDataExpired = "ERROR! Failed to upload revised citizen profile data...",
30 | cViewDataUpdate = "Uploading revised citizen profile data...",
31 | cViewDataFiller = "Caching revised citizen profile database...",
32 | cViewObjectives = "Downloading overwatch objective manifest...",
33 | cViewObjectivesUpdate = "Uploading revised overwatch objective manifest...",
34 | cViewObjectivesFiller = "Retrieving incoming overwatch objective manifest (REVISION %d)...",
35 | cCivilJudgement = "Preparing civil judgement administration protocols...",
36 | cRequest = "Downloading request packet...",
37 | cCitizenLoaded = "Rebuilding citizen manifest...",
38 | cCombineLoaded = "Updating biosignal co-ordinates...",
39 | cLostBiosignal = "Downloading lost biosignal...",
40 | cLostBiosignalLocation = "WARNING! Biosignal lost for protection team unit at %s...",
41 | cTrauma = "WARNING! %s trauma detected...",
42 | cDroppingVitals = "WARNING! VITAL SIGNS DROPPING, SEEK IMMEDIATE MEDICAL ATTENTION",
43 | cStaminaLost = "ATTENTION: Excessive user exertion, administering stimulant...",
44 | cStaminaGained = "STIMULANT ADMINISTERED",
45 | cLosingContact = "Downloading lost radio contact information...",
46 | cLostContact = "WARNING! Radio contact lost for unit at unknown location...",
47 |
48 | voices = "Voices"
49 | }
50 |
--------------------------------------------------------------------------------
/detaileddescriptions/sv_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local endsWith = string.EndsWith
4 | local tostring = tostring
5 |
6 | if !file.Exists('helix/detailedescription', 'DATA') then
7 | file.CreateDir('helix/detailedescription')
8 | end
9 |
10 | netstream.Hook("ixEditDetailedDescriptions", function(client, text, textEntryURL)
11 | local character = client:GetCharacter()
12 | if (character) then
13 | if (utf8.len(text) > 3000) or (utf8.len(textEntryURL) > 50) then return end
14 |
15 | local characterData = {
16 | ['text'] = text or 'No detailed description found.',
17 | ['textEntryURL'] = textEntryURL or 'No detailed description found.'
18 | }
19 |
20 | PLUGIN:CreateDetailedDescription(client, characterData)
21 | end
22 | end)
23 |
24 | netstream.Hook('RequestDetailedDescription', function(client)
25 | if IsValid(client) and client:GetCharacter() then
26 | local data = PLUGIN:GetDetailedDescription(client)
27 | netstream.Start(client, 'ReturnDetailedDescription', data)
28 | end
29 | end)
30 |
31 | function PLUGIN:OnPlayerOptionSelected(client, callingClient, option)
32 | if (option == "Examine") then
33 | local text = self:GetDetailedDescription(client)['text'] or 'No detailed description found.'
34 | local textURL = self:GetDetailedDescription(client)['textEntryURL'] or 'No detailed description found.'
35 | netstream.Start(callingClient, "ixOpenDetailedDescriptions", client, text, textURL)
36 | end
37 | end
38 |
39 | function PLUGIN:CreateDetailedDescription(client, data)
40 | if (file.Exists('helix/detailedescription/'..client:GetCharacter():GetID()..'.json', 'DATA')) then
41 | file.Delete('helix/detailedescription/'..client:GetCharacter():GetID()..'.json')
42 | local compressed = util.TableToJSON(data)
43 | file.Write('helix/detailedescription/'..client:GetCharacter():GetID()..'.json', compressed)
44 | else
45 | local compressed = util.TableToJSON(data)
46 | file.Write('helix/detailedescription/'..client:GetCharacter():GetID()..'.json', compressed)
47 | end
48 | end
49 |
50 | function PLUGIN:GetDetailedDescription(client)
51 | if (file.Exists('helix/detailedescription/'..client:GetCharacter():GetID()..'.json', 'DATA')) then
52 | local compressed = file.Read('helix/detailedescription/'..client:GetCharacter():GetID()..'.json', 'DATA')
53 | local uncompressed = util.JSONToTable(compressed)
54 | return uncompressed
55 | else
56 | return {
57 | ['text'] = 'No detailed description found.',
58 | ['textEntryURL'] = 'No detailed description found.'
59 | }
60 | end
61 | end
--------------------------------------------------------------------------------
/ams/sv_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | function PLUGIN:ClearDiseases(client, character)
5 | local diseaseTable = ix.AMS.Diseases:GetAll()
6 |
7 | for uniqueID in pairs( diseaseTable ) do
8 | local table = ix.AMS.Diseases:FindByID(uniqueID)
9 | local callback = table.Disinfect
10 |
11 | if (callback) then
12 | callback(client, character)
13 | end
14 | end
15 | end
16 |
17 | function PLUGIN:RestoreDiseases(client, character)
18 | local storedDiseases = character:GetDiseases()
19 |
20 | if (storedDiseases and storedDiseases ~= '') then
21 | local splittedDiseases = string.Split(storedDiseases, ';')
22 |
23 | for _, uniqueID in ipairs( splittedDiseases ) do
24 | local table = ix.AMS.Diseases:FindByID(uniqueID)
25 | local callback = table.Infect
26 |
27 | if (callback) then
28 | callback(client, character)
29 | end
30 | end
31 | end
32 | end
33 |
34 | function PLUGIN:ClearWounds(client, character)
35 | local wounds = ix.AMS.Wounds:GetAll()
36 |
37 | for uniqueID, table in pairs( wounds ) do
38 | local callback = table.Diswound
39 |
40 | if (callback) then
41 | callback(client, character)
42 | end
43 | end
44 | end
45 |
46 | function PLUGIN:RestoreWounds(client, character)
47 | local storedWounds = character:GetWounds()
48 |
49 | if (storedWounds and storedWounds ~= '') then
50 | local splittedWounds = string.Split(storedWounds, ';')
51 |
52 | for _, uniqueID in ipairs( splittedWounds ) do
53 | local table = ix.AMS.Wounds:FindByID(uniqueID)
54 | local callback = table.Wounded
55 |
56 | if (callback) then
57 | callback(client, character)
58 | end
59 | end
60 | end
61 | end
62 |
63 | function PLUGIN:PostPlayerLoadout(client)
64 | local character = client:GetCharacter()
65 |
66 | if (character) then
67 | self:ClearDiseases(client, character)
68 | self:ClearWounds(client, character)
69 | self:RestoreDiseases(client, character)
70 | self:RestoreWounds(client, character)
71 | end
72 | end
73 |
74 | function PLUGIN:DoPlayerDeath(client)
75 | local character = client:GetCharacter()
76 | if (character) then
77 | character:RemoveAllDiseases()
78 | character:RemoveAllWounds()
79 | self:ClearDiseases(client, character)
80 | self:ClearWounds(client, character)
81 | end
82 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pda/derma/cl_pda_database.lua:
--------------------------------------------------------------------------------
1 |
2 | local PANEL = {}
3 |
4 | DEFINE_BASECLASS("EditablePanel")
5 |
6 | function PANEL:Init()
7 | if IsValid(ix.gui.pdamainmenu) then
8 | ix.gui.pdamainmenu:Remove()
9 | end
10 | ix.gui.pdamainmenu = self
11 |
12 | self:SetSize(SScale(250), VScale(250))
13 | self:SetPos(5, (ScrH()*.5) - self:GetTall()/2)
14 | self:MakePopup()
15 |
16 | self.frame = self:Add("PDAFrame")
17 | self.frame:SetSize(self:GetWide(), self:GetTall())
18 | self.frame:SetPos(select(self:GetPos(), 1), select(self:GetPos(), 2))
19 |
20 | self.exit = self.frame:Add("DButton")
21 | self.exit:SetSize(self.frame:GetWide()/12, self.frame:GetTall()/16)
22 | self.exit:SetPos(SScaleMin(530/2), 0)
23 | self.exit:SetText('')
24 | self.exit.Paint = nil
25 | self.exit.DoClick = function()
26 | surface.PlaySound("buttons/lightswitch2.wav")
27 | self:Remove()
28 | end
29 |
30 | self.scroller = self.frame:Add("DHorizontalScroller")
31 | self.scroller:SetSize(self.frame:GetWide(), self.frame:GetTall()/18)
32 | self.scroller:SetPos(SScaleMin(45/2), SScaleMin(42/2))
33 |
34 | self.backtomenu = self.scroller:Add("DButton")
35 | self.backtomenu:SetSize(self.frame:GetWide()/8)
36 | self.backtomenu:SetPos(SScaleMin(45/2), SScaleMin(42/2))
37 | self.backtomenu:SetText('НАЗАД')
38 | self.backtomenu:SetFont("ixPDAButton")
39 | self.backtomenu.DoClick = function()
40 | surface.PlaySound("ui/buttonclick.wav")
41 | if IsValid(ix.gui.pdamainmenu) then
42 | ix.gui.pdamainmenu:Remove(true)
43 | end
44 | vgui.Create("PDAMainMenu")
45 | end
46 | self.scroller:AddPanel(self.backtomenu)
47 |
48 | self.delta = self.frame:Add("Panel")
49 | self.delta:SetSize(self.frame:GetWide()*.875, self.frame:GetTall()*.78)
50 | self.delta:SetPos(SScaleMin(45/2), SScaleMin(69/2))
51 | end
52 |
53 | function PANEL:OnKeyCodePressed(button)
54 | if button == KEY_F1 then
55 | self:Remove()
56 | end
57 | end
58 |
59 | function PANEL:Remove(a)
60 | if !a then
61 | CloseDermaMenus()
62 | self:SetMouseInputEnabled(false)
63 | self:SetKeyboardInputEnabled(false)
64 | gui.EnableScreenClicker(false)
65 | self:MoveTo(-ScrW(), ScrH() / 2 - self:GetTall() / 2, 0.5, 0, -1, function()
66 | BaseClass.Remove(self)
67 | end)
68 | else
69 | BaseClass.Remove(self)
70 | end
71 | end
72 |
73 | vgui.Register("PDADatabase", PANEL, "Panel")
74 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | PLUGIN.name = "Ранги, ОР для Гражданской Обороны"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.blacklisted_ranks = {'rct', 'cdt'}
6 |
7 | ix.util.Include("sh_config.lua")
8 | ix.util.Include("sv_meta.lua")
9 | ix.util.Include("sv_plugin.lua")
10 |
11 | local meta = ix.meta.character
12 | function meta:GetCPRank()
13 | return ix.ranks.stored[self:GetData("cmbRank", 1)]
14 | end
15 |
16 | function meta:GetCPPoint()
17 | return self:GetData("cmbSP", 0)
18 | end
19 |
20 | function PLUGIN:InitializedChatClasses()
21 | ix.command.Add("EditSP", {
22 | description = "Добавить очки ранга для сотрудника Г.О. или отнять.",
23 | arguments = {
24 | ix.type.character,
25 | ix.type.number,
26 | },
27 | OnCheckAccess = function(self, client)
28 | return client:IsCombine() and (client:GetCharacter():GetCPRank().IsCMD or false)
29 | end,
30 | OnRun = function(self, client, target, amount)
31 | if target:IsCombine() then
32 | if target:GetCPRank().IsCMD then return false, "Вы не можете изменить ОР для CmD!" end
33 | if target:GetFaction() == FACTION_ADMIN then return false, "Вы не можете изменить ОР для ГА!" end
34 | local stripped_amount = tostring(amount):find('-')
35 | local formatted_text
36 |
37 | if stripped_amount then
38 | amount = math.abs(amount)
39 | target:TakeCPPoint(amount)
40 |
41 | formatted_text = ix.util.FormatStringNamed("Вы успешно отняли {_amount} ОР для сотрудника {target}.", {
42 | _amount = amount,
43 | target = target:GetName()
44 | })
45 | client:Notify(formatted_text)
46 | else
47 | target:AddCPPoint(amount)
48 |
49 | formatted_text = ix.util.FormatStringNamed("Вы успешно выдали {_amount} ОР для сотрудника {target}.", {
50 | _amount = amount,
51 | target = target:GetName()
52 | })
53 | client:Notify(formatted_text)
54 | end
55 | else
56 | return false, "Ваша цель не состоит в Г.О."
57 | end
58 | end
59 | })
60 | end
61 |
62 | if CLIENT then
63 | function PLUGIN:CreateCharacterInfo(panel)
64 | if LocalPlayer():IsCombine() then
65 | panel.rank = panel:Add("ixListRow")
66 | panel.rank:SetList(panel.list)
67 | panel.rank:Dock(TOP)
68 | panel.rank:DockMargin(0, 0, 0, 8)
69 | end
70 | end
71 |
72 | function PLUGIN:UpdateCharacterInfo(panel)
73 | if LocalPlayer():IsCombine() then
74 | panel.rank:SetLabelText("Ранг")
75 | panel.rank:SetText(LocalPlayer():GetCharacter():GetCPRank().name)
76 | panel.rank:SizeToContents()
77 | end
78 | end
79 | end
--------------------------------------------------------------------------------
/wounds/sv_hooks.lua:
--------------------------------------------------------------------------------
1 | local PLUGIN = PLUGIN
2 |
3 | function PLUGIN:EntityTakeDamage(target, info)
4 | if target:IsPlayer() then
5 | if info:IsBulletDamage() then
6 | if math.random(10) > 7 then -- 30% chance
7 | self:SetBleeding(target, true)
8 | end
9 | elseif info:GetDamageType() == DMG_FALL then
10 | self:SetFractured(target, true)
11 | end
12 | end
13 | end
14 |
15 | function PLUGIN:PlayerLoadedCharacter(client, character)
16 | if not character:GetFractured() then
17 | self:SetFractured(client, false)
18 | else
19 | self:SetFractured(client, true)
20 | end
21 |
22 | if not character:GetBleeding() then
23 | self:SetBleeding(client, false)
24 | else
25 | self:SetBleeding(client, true)
26 | end
27 | end
28 |
29 | function PLUGIN:SetBleeding(client, status)
30 | local character = client:GetCharacter()
31 | local bStatus = hook.Run("CanCharacterGetBleeding", client, character)
32 | if (bStatus) then return end
33 |
34 | character:SetBleeding(status)
35 | if (status) then
36 | timer.Create("bleeding."..client:AccountID(), 7, 0, function()
37 | if IsValid(client) and character then
38 | client:SetHealth( client:Health() - math.random(3) )
39 | client:ScreenFade( SCREENFADE.IN, Color(255, 0, 0, 128), 0.3, 0 )
40 |
41 | if (client:Health() <= 0) then
42 | client:Kill()
43 | end
44 | end
45 | end)
46 | else
47 | if timer.Exists("bleeding."..client:AccountID()) then
48 | timer.Remove("bleeding."..client:AccountID())
49 | end
50 | end
51 | end
52 |
53 | function PLUGIN:SetFractured(client, status)
54 | local character = client:GetCharacter()
55 | local bStatus = hook.Run("CanCharacterGetFracture", client, character)
56 | if (bStatus) then return end
57 | if !character then return end
58 |
59 | character:SetFractured(status)
60 | if (status) then
61 | client:SetWalkSpeed(ix.config.Get("walkSpeed", 100) / 1.4)
62 | client:SetRunSpeed(ix.config.Get("walkSpeed", 100) / 1.4)
63 | else
64 | client:SetWalkSpeed(ix.config.Get("walkSpeed"))
65 | client:SetRunSpeed(ix.config.Get("runSpeed"))
66 | end
67 | end
68 |
69 | function PLUGIN:ClearWounds(client)
70 | self:SetFractured(client, false)
71 | self:SetBleeding(client, false)
72 | end
73 |
74 | function PLUGIN:DoPlayerDeath(client)
75 | self:ClearWounds(client)
76 | end
77 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pda/derma/cl_viewobjectives.lua:
--------------------------------------------------------------------------------
1 |
2 | hook.Add("LoadFonts", "ixCombineViewObjectives", function()
3 | surface.CreateFont("ixCombineViewObjectives", {
4 | font = "Courier New",
5 | size = 16,
6 | antialias = true,
7 | weight = 400
8 | })
9 | end)
10 |
11 | DEFINE_BASECLASS("EditablePanel")
12 |
13 | local PANEL = {}
14 |
15 | local animationTime = 1
16 | AccessorFunc(PANEL, "bCommitOnClose", "CommitOnClose", FORCE_BOOL)
17 |
18 | function PANEL:Init()
19 | if IsValid(ix.gui.objectivesMenu) then
20 | ix.gui.objectivesMenu:Remove()
21 | end
22 | ix.gui.objectivesMenu = self
23 | self:SetCommitOnClose(true)
24 | self.nameLabel = vgui.Create("DLabel", self)
25 | self.nameLabel:SetFont("BudgetLabel")
26 | self.nameLabel:SizeToContents()
27 | self.nameLabel:Dock(TOP)
28 |
29 | self.dateLabel = vgui.Create("DLabel", self)
30 | self.dateLabel:SetFont("BudgetLabel")
31 | self.dateLabel:SizeToContents()
32 | self.dateLabel:Dock(TOP)
33 |
34 | self.textEntry = vgui.Create("DTextEntry", self)
35 | self.textEntry:SetMultiline(true)
36 | self.textEntry:Dock(FILL)
37 | self.textEntry:SetFont("ixCombineViewObjectives")
38 | end
39 |
40 | function PANEL:Populate(data, bDontShow)
41 | data = data or {}
42 |
43 | self.oldText = data.text or ""
44 |
45 | local date = data.lastEditDate and ix.date.Construct(data.lastEditDate):format("%Y/%m/%d - %H:%M:%S") or L("unknown")
46 |
47 | self.nameLabel:SetText(string.format("%s: %s", "РЕДАКТИРОВАЛ", data.lastEditPlayer or L("unknown")):upper())
48 | self.dateLabel:SetText(string.format("%s: %s", "ДАТА ПОСЛЕДНЕГО РЕДАКТИРОВАНИЯ", date):upper())
49 | self.textEntry:SetText(data.text or "")
50 |
51 | if (!hook.Run("CanPlayerEditObjectives", LocalPlayer())) then
52 | self.textEntry:SetEnabled(false)
53 | end
54 |
55 | self:SetMouseInputEnabled(true)
56 | self:SetKeyBoardInputEnabled(true)
57 | end
58 |
59 | function PANEL:CommitChanges()
60 | local text = string.Trim(self.textEntry:GetValue():sub(1, 2000))
61 |
62 | -- only update if there's something different so we can preserve the last editor if nothing changed
63 | if (self.oldText != text) then
64 | netstream.Start("ViewObjectivesUpdate", text)
65 |
66 | local date = ix.date.Get()
67 | local data = {
68 | text = text:sub(1, 1000),
69 | lastEditPlayer = LocalPlayer():GetCharacter():GetName(),
70 | lastEditDate = ix.date.GetSerialized(date)
71 | }
72 |
73 | PDAObjectives = data
74 |
75 | Schema:AddCombineDisplayMessage("@cViewObjectivesUpdate")
76 | end
77 | end
78 |
79 | vgui.Register("ixViewObjectives", PANEL, "EditablePanel")
80 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/factions/sh_metropolice.lua:
--------------------------------------------------------------------------------
1 |
2 | FACTION.name = "Гражданская Оборона"
3 | FACTION.description = "A metropolice unit working as Civil Protection."
4 | FACTION.color = Color(50, 100, 150)
5 | FACTION.pay = 10
6 | FACTION.models = {"models/metropolice/c08.mdl", "models/metropolice/c08_female_2.mdl"}
7 | FACTION.isDefault = false
8 | FACTION.isGloballyRecognized = true
9 | FACTION.runSounds = {[0] = "NPC_MetroPolice.RunFootstepLeft", [1] = "NPC_MetroPolice.RunFootstepRight"}
10 | FACTION.radioChannels = {"cmb"}
11 | FACTION.npcRelations = {
12 | ["npc_alyx"] = D_HT,
13 | ["npc_barney"] = D_HT,
14 | ["npc_citizen"] = D_HT,
15 | ["npc_dog"] = D_HT,
16 | ["npc_magnusson"] = D_HT,
17 | ["npc_kleiner"] = D_HT,
18 | ["npc_mossman"] = D_HT,
19 | ["npc_eli"] = D_HT,
20 | ["npc_fisherman"] = D_HT,
21 | ["npc_gman"] = D_NU,
22 | ["Medic"] = D_HT,
23 | ["npc_odessa"] = D_HT,
24 | ["Rebel"] = D_HT,
25 | ["Refugee"] = D_HT,
26 | ["VortigauntUriah"] = D_HT,
27 | ["npc_vortigaunt"] = D_HT,
28 | ["VortigauntSlave"] = D_HT,
29 |
30 | ["npc_zombie"] = D_HT,
31 | ["npc_poisonzombie"] = D_HT,
32 | ["npc_zombie_torso"] = D_HT,
33 | ["npc_headcrab_black"] = D_HT,
34 | ["npc_headcrab"] = D_HT,
35 | ["npc_fastzombie_torso"] = D_HT,
36 | ["npc_fastzombie"] = D_HT,
37 | ["npc_headcrab_fast"] = D_HT,
38 | ["npc_barnacle"] = D_HT,
39 | ["npc_antlion_worker"] = D_HT,
40 | ["npc_antlionguardian"] = D_HT,
41 | ["npc_antlionguard"] = D_HT,
42 | ["npc_antlion"] = D_HT,
43 | ["npc_zombine"] = D_HT,
44 | ["npc_resturret02"] = D_HT,
45 | ["npc_resturret03"] = D_HT,
46 | ["npc_resturret01"] = D_HT,
47 |
48 | ["npc_breen"] = D_LI,
49 | ["npc_stalker"] = D_LI,
50 | ["npc_cscanner"] = D_LI,
51 | ["npc_combine_camera"] = D_LI,
52 | ["npc_turret_ceiling"] = D_LI,
53 | ["npc_combinegunship"] = D_LI,
54 | ["CombineElite"] = D_LI,
55 | ["npc_combine_s"] = D_LI,
56 | ["npc_hunter"] = D_LI,
57 | ["npc_helicopter"] = D_LI,
58 | ["npc_manhack"] = D_LI,
59 | ["npc_metropolice"] = D_LI,
60 | ["CombinePrison"] = D_LI,
61 | ["PrisonShotgunner"] = D_LI,
62 | ["npc_rollermine"] = D_LI,
63 | ["npc_clawscanner"] = D_LI,
64 | ["ShotgunSoldier"] = D_LI,
65 | ["npc_strider"] = D_LI,
66 | ["npc_turret_floor"] = D_LI,
67 | ["npc_turret_ground"] = D_LI,
68 | ["npc_sniper"] = D_LI
69 | }
70 |
71 | function FACTION:OnCharacterCreated(client, character)
72 | if ix.plugin.Get("cp_ranks") then
73 | character:BeCP('rct', 'gu')
74 | end
75 | end
76 |
77 | function FACTION:GetDefaultName(client)
78 | return 'C' .. ix.config.Get("cpCityNumber", 17) .. ".MPF.GU.RCT", true
79 | end
80 |
81 | FACTION_MPF = FACTION.index
82 |
--------------------------------------------------------------------------------
/stacks/items/base/sh_stackable.lua:
--------------------------------------------------------------------------------
1 | ITEM.name = 'Stackable Items Base'
2 | ITEM.description = 'Stackable Item'
3 | ITEM.category = 'Stackable'
4 | ITEM.model = 'models/props_c17/TrapPropeller_Lever.mdl'
5 | ITEM.maxStacks = 16
6 |
7 | if CLIENT then
8 | function ITEM:PaintOver(item, w, h)
9 | draw.SimpleText(
10 | item:GetData('stacks', 1), 'DermaDefault', w - 5, h - 5,
11 | color_white, TEXT_ALIGN_RIGHT, TEXT_ALIGN_BOTTOM, 1, color_black
12 | )
13 | end
14 | end
15 |
16 | ITEM.functions.combine = {
17 | OnRun = function(firstItem, data)
18 | local firstItemStacks = firstItem:GetData('stacks', 1)
19 | local secondItem = ix.item.instances[data[1]]
20 | local secondItemStacks = secondItem:GetData('stacks', 1)
21 | local totalStacks = secondItemStacks + firstItemStacks
22 |
23 | firstItem:SetData('stacks', totalStacks, ix.inventory.Get(firstItem.invID):GetReceivers())
24 | secondItem:Remove()
25 |
26 | return false
27 | end,
28 | OnCanRun = function(firstItem, data)
29 | local firstItemStacks = firstItem:GetData('stacks', 1)
30 | local secondItem = ix.item.instances[data[1]]
31 | local secondItemStacks = secondItem:GetData('stacks', 1)
32 | local totalStacks = secondItemStacks + firstItemStacks
33 |
34 | if firstItem.uniqueID ~= secondItem.uniqueID then return false end
35 | if totalStacks > firstItem.maxStacks then return false end
36 |
37 | return true
38 | end
39 | }
40 |
41 | ITEM.functions.split = {
42 | name = 'Split',
43 | icon = 'icon16/arrow_divide.png',
44 | OnRun = function(item)
45 | local client = item.player
46 | local character = client:GetCharacter()
47 | local itemUniqueID = item.uniqueID
48 | local stacks = item:GetData('stacks', 1)
49 |
50 | client:RequestString('Split', 'Please enter how many items you want to split', function(splitStack)
51 | splitStack = tonumber(splitStack)
52 | if not isnumber(splitStack) then
53 | client:Notify('Please enter a number')
54 | return false
55 | end
56 |
57 | local cleanSplitStack = math.Round(math.abs(splitStack))
58 | if cleanSplitStack >= stacks then return false end
59 |
60 | local stackedCount = stacks - cleanSplitStack
61 |
62 | if not character:GetInventory():Add(itemUniqueID, 1, {stacks = cleanSplitStack}) then
63 | ix.item.Spawn(itemUniqueID, client, nil, angle_zero, {stacks = cleanSplitStack})
64 | end
65 |
66 | item:SetData('stacks', stackedCount, ix.inventory.Get(item.invID):GetReceivers())
67 | end, '1')
68 | return false
69 | end,
70 | OnCanRun = function(item)
71 | return item:GetData('stacks', 1) ~= 1
72 | end
73 | }
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_pda/derma/cl_pda_pt.lua:
--------------------------------------------------------------------------------
1 |
2 | local PANEL = {}
3 |
4 | DEFINE_BASECLASS("EditablePanel")
5 |
6 | function PANEL:Init()
7 | if IsValid(ix.gui.pdamainmenu) then
8 | ix.gui.pdamainmenu:Remove()
9 | end
10 | ix.gui.pdamainmenu = self
11 |
12 | self:SetSize(SScale(250), VScale(250))
13 | self:SetPos(5, (ScrH()*.5) - self:GetTall()/2)
14 | self:MakePopup()
15 |
16 | self.frame = self:Add("PDAFrame")
17 | self.frame:SetSize(self:GetWide(), self:GetTall())
18 | self.frame:SetPos(select(self:GetPos(), 1), select(self:GetPos(), 2))
19 |
20 | self.exit = self.frame:Add("DButton")
21 | self.exit:SetSize(self.frame:GetWide()/12, self.frame:GetTall()/16)
22 | self.exit:SetPos(SScaleMin(530/2), 0)
23 | self.exit:SetText('')
24 | self.exit.Paint = nil
25 | self.exit.DoClick = function()
26 | surface.PlaySound("buttons/lightswitch2.wav")
27 | self:Remove()
28 | end
29 |
30 | self.scroller = self.frame:Add("DHorizontalScroller")
31 | self.scroller:SetSize(self.frame:GetWide(), self.frame:GetTall()/18)
32 | self.scroller:SetPos(SScaleMin(45/2), SScaleMin(42/2))
33 |
34 | self.backtomenu = self.scroller:Add("DButton")
35 | self.backtomenu:SetSize(self.frame:GetWide()/8)
36 | self.backtomenu:SetPos(SScaleMin(45/2), SScaleMin(42/2))
37 | self.backtomenu:SetText('НАЗАД')
38 | self.backtomenu:SetFont("ixPDAButton")
39 | self.backtomenu.DoClick = function()
40 | surface.PlaySound("ui/buttonclick.wav")
41 | if IsValid(ix.gui.pdamainmenu) then
42 | ix.gui.pdamainmenu:Remove(true)
43 | end
44 | vgui.Create("PDAMainMenu")
45 | end
46 | self.scroller:AddPanel(self.backtomenu)
47 |
48 | self.delta = self.frame:Add("Panel")
49 | self.delta:SetSize(self.frame:GetWide()*.875, self.frame:GetTall()*.78)
50 | self.delta:SetPos(SScaleMin(45/2), SScaleMin(69/2))
51 |
52 | self.ptmenu = self.delta:Add("ixPTMenu")
53 | self.ptmenu:Dock(FILL)
54 | end
55 |
56 | function PANEL:OnKeyCodePressed(button)
57 | if button == KEY_F1 then
58 | self:Remove()
59 | end
60 | end
61 |
62 | function PANEL:Remove(a)
63 | if !a then
64 | CloseDermaMenus()
65 | self:SetMouseInputEnabled(false)
66 | self:SetKeyboardInputEnabled(false)
67 | gui.EnableScreenClicker(false)
68 | self:MoveTo(-ScrW(), ScrH() / 2 - self:GetTall() / 2, 0.5, 0, -1, function()
69 | BaseClass.Remove(self)
70 | end)
71 | else
72 | BaseClass.Remove(self)
73 | end
74 | end
75 |
76 | vgui.Register("PDAPatrolGroups", PANEL, "Panel")
77 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/permaremove.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 |
4 | PLUGIN.name = "Perma Remove"
5 | PLUGIN.author = "alexgrist"
6 | PLUGIN.desc = "Allows staff to permanently remove map entities."
7 | PLUGIN.license = [[
8 | This is free and unencumbered software released into the public domain.
9 | Anyone is free to copy, modify, publish, use, compile, sell, or
10 | distribute this software, either in source code form or as a compiled
11 | binary, for any purpose, commercial or non-commercial, and by any
12 | means.
13 | In jurisdictions that recognize copyright laws, the author or authors
14 | of this software dedicate any and all copyright interest in the
15 | software to the public domain. We make this dedication for the benefit
16 | of the public at large and to the detriment of our heirs and
17 | successors. We intend this dedication to be an overt act of
18 | relinquishment in perpetuity of all present and future rights to this
19 | software under copyright law.
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 | OTHER DEALINGS IN THE SOFTWARE.
27 | For more information, please refer to
28 | ]]
29 |
30 | do
31 | local COMMAND = {
32 | description = "Remove a map entity permanently.",
33 | superAdminOnly = true
34 | }
35 |
36 | function COMMAND:OnRun(client)
37 | local entity = client:GetEyeTraceNoCursor().Entity
38 |
39 | if (IsValid(entity) and entity:CreatedByMap()) then
40 | local entities = PLUGIN:GetData({})
41 | entities[#entities + 1] = entity:MapCreationID()
42 | entity:Remove()
43 | PLUGIN:SetData(entities)
44 |
45 | client:Notify("Map entity removed.")
46 |
47 | ix.log.Add(client, "mapEntRemoved", entity:MapCreationID(), entity:GetModel())
48 | else
49 | client:Notify("That is not a valid map entity!")
50 | end
51 | end
52 |
53 | ix.command.Add("MapEntRemove", COMMAND)
54 | end
55 |
56 | if (SERVER) then
57 | function PLUGIN:LoadData()
58 | for _, v in ipairs(self:GetData({})) do
59 | local entity = ents.GetMapCreatedEntity(v)
60 |
61 | if (IsValid(entity)) then
62 | entity:Remove()
63 | end
64 | end
65 | end
66 |
67 | ix.log.AddType("mapEntRemoved", function(client, index, model)
68 | return string.format("%s has removed map entity #%d (%s).", client:Name(), index, model)
69 | end)
70 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/cp_ranks/sv_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | local PLUGIN = PLUGIN
3 | local Schema = Schema
4 |
5 | util.AddNetworkString("ixAcceptRank")
6 | net.Receive("ixAcceptRank", function(len, client)
7 | local id = net.ReadString()
8 | local ent = net.ReadEntity() if !ent then return end
9 | if ent:GetClass() != "ix_cp_rank_manager" || !IsValid(ent) then return end
10 | if client:GetPos():DistToSqr(ent:GetPos()) > 5000 then return end
11 | if !client:IsCombine() then return end
12 | if !client:GetCharacter() then return end
13 | if !ix.ranks.stored[id] then return end
14 | if !ix.ranks.stored[id].CanTransfer then return end
15 | if table.HasValue(PLUGIN.blacklisted_ranks, ix.ranks.stored[id].uniqueID) and client:GetCharacter():GetSquad() ~= "gu" then return end
16 | if (ix.ranks.stored[id].xp or 0) > client:GetCharacter():GetCPPoint() then return end
17 | if ix.ranks.stored[id].is_limited && ix.ranks.IsLimitied(id, client:GetCharacter():GetSquad()) then
18 | client:Notify("У данного ранга превышен лимит!")
19 | return
20 | end
21 |
22 | client:GetCharacter():InitializeCP(id, client:GetCharacter():GetData("cmbSquad", "gu"), true)
23 | client:Notify("Вы заступили на службу в качестве "..ix.ranks.stored[id].name)
24 | end)
25 |
26 | function PLUGIN:PlayerLoadedCharacter(client, character)
27 | if character:IsCombine() then
28 | local current_rank = character:GetData("cmbRank")
29 | local current_squad = character:GetData("cmbSquad")
30 | if !current_rank then current_rank = 'rct' end
31 | if !current_squad then current_squad = 'gu' end
32 | if current_rank == 'ofc' then current_rank = '01' end
33 | character:InitializeCP(current_rank, current_squad)
34 | end
35 | end
36 |
37 | function PLUGIN:OnCPSet(character)
38 | Schema:AddCombineDisplayMessage(Format("%s заступил на службу в качестве %s", character:GetName(), ix.ranks.stored[character:GetData("cmbRank", "gu")].name), color_white)
39 | character:SetSpecialChannel("cmb")
40 | end
41 |
42 | function PLUGIN:OnCPDemoted(character)
43 | Schema:AddCombineDisplayMessage(Format("%s снялся с службы", character:GetName()), Color(255, 0, 0))
44 | character:SetSpecialChannel(SCHANNEL_NONE)
45 | end
46 |
47 | function PLUGIN:SaveData()
48 | local data = {}
49 |
50 | for _, v in ipairs(ents.FindByClass("ix_cp_rank_manager")) do
51 | data[#data + 1] = {v:GetPos(), v:GetAngles()}
52 | end
53 |
54 | ix.data.Set("cpRanks", data)
55 | end
56 |
57 | function PLUGIN:LoadData()
58 | for _, v in ipairs(ix.data.Get("cpRanks") or {}) do
59 | local ranks = ents.Create("ix_cp_rank_manager")
60 |
61 | ranks:SetPos(v[1])
62 | ranks:SetAngles(v[2])
63 | ranks:Spawn()
64 | end
65 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/sh_hooks.lua:
--------------------------------------------------------------------------------
1 |
2 | local Schema = Schema
3 | function Schema:CanPlayerUseBusiness(client, uniqueID)
4 | return false
5 | end
6 |
7 | -- called when the client wants to edit the combine data for the given target
8 | function Schema:CanPlayerEditData(client, target)
9 | return client:IsCombine() and (!target:IsCombine() and target:Team() != FACTION_ADMIN)
10 | end
11 |
12 | function Schema:CanPlayerViewObjectives(client)
13 | return client:IsCombine()
14 | end
15 |
16 | function Schema:CanPlayerEditObjectives(client)
17 | if (!client:IsCombine() or !client:GetCharacter()) then
18 | return false
19 | end
20 |
21 | local bCanEdit = false
22 | local name = client:GetCharacter():GetName():lower()
23 |
24 | for _, v in ipairs({"ofc", "dvl", "sec"}) do
25 | if self:IsCombineRank(name, v) then
26 | bCanEdit = true
27 | break
28 | end
29 | end
30 |
31 | return bCanEdit
32 | end
33 |
34 | function Schema:CanDrive()
35 | return false
36 | end
37 |
38 | function Schema:EntityEmitSound(soundData)
39 | if (CLIENT) then
40 | if ix.option.Get("thirdpersonEnabled") then
41 | if !soundData.Entity:IsPlayer() then
42 | return
43 | end
44 |
45 | local soundName = soundData.OriginalSoundName
46 | local blockedSuffixes = { ".stepleft", ".stepright" }
47 |
48 | for i = 1, #blockedSuffixes do
49 | local v = blockedSuffixes[i]
50 |
51 | if (soundName:sub(-#v) == v) then
52 | return false
53 | end
54 | end
55 | end
56 | end
57 |
58 | if (soundData.Entity and IsValid(soundData.Entity)) then
59 | if (soundData.Entity:GetClass() == "npc_combine_camera") then
60 | local soundName = soundData.SoundName
61 | if soundName == 'npc/turret_floor/ping.wav' then
62 | return false
63 | end
64 | end
65 | end
66 | end
67 |
68 | function Schema:InitializedPlugins()
69 | local stored = weapons.GetStored("ix_hands")
70 | if stored then
71 | stored.Instructions = [[
72 | ЛКМ: Ударить/Кинуть
73 | ПКМ: Стучаться/Поднять
74 | ПКМ + Мышь: Поворачивать объект
75 | R: Положить]]
76 | stored.PrintName = "Руки"
77 | end
78 |
79 | stored = weapons.GetStored("ix_keys")
80 | if stored then
81 | stored.Instructions = [[
82 | ЛКМ: Запереть
83 | ПКМ: Разблокировать]]
84 | stored.PrintName = "Ключи"
85 | end
86 |
87 | stored = weapons.GetStored("ix_stunstick")
88 | if stored then
89 | stored.Instructions = [[
90 | ЛКМ: Бить/Парализовать
91 | ALT + ЛКМ: Переключить парализатор
92 | ПКМ: Толкать/Стучать]]
93 | stored.PrintName = "Парализатор"
94 | end
95 | end
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/!!!schema/factions/sh_administrator.lua:
--------------------------------------------------------------------------------
1 |
2 | FACTION.name = "Городской Администратор"
3 | FACTION.description = "A human Administrator advised by the Universal Union."
4 | FACTION.color = Color(255, 200, 100, 255)
5 | FACTION.pay = 50
6 | FACTION.models = {
7 | "models/humans/group17/female_01.mdl",
8 | "models/humans/group17/female_02.mdl",
9 | "models/humans/group17/female_03.mdl",
10 | "models/humans/group17/female_04.mdl",
11 | "models/humans/group17/female_06.mdl",
12 | "models/humans/group17/female_07.mdl",
13 | "models/humans/group17/male_01.mdl",
14 | "models/humans/group17/male_02.mdl",
15 | "models/humans/group17/male_03.mdl",
16 | "models/humans/group17/male_04.mdl",
17 | "models/humans/group17/male_05.mdl",
18 | "models/humans/group17/male_06.mdl",
19 | "models/humans/group17/male_07.mdl",
20 | "models/humans/group17/male_08.mdl",
21 | "models/humans/group17/male_09.mdl"
22 | }
23 | FACTION.isDefault = false
24 | FACTION.isGloballyRecognized = true
25 | FACTION.npcRelations = {
26 | ["npc_alyx"] = D_HT,
27 | ["npc_barney"] = D_HT,
28 | ["npc_citizen"] = D_HT,
29 | ["npc_dog"] = D_HT,
30 | ["npc_magnusson"] = D_HT,
31 | ["npc_kleiner"] = D_HT,
32 | ["npc_mossman"] = D_HT,
33 | ["npc_eli"] = D_HT,
34 | ["npc_fisherman"] = D_HT,
35 | ["npc_gman"] = D_NU,
36 | ["Medic"] = D_HT,
37 | ["npc_odessa"] = D_HT,
38 | ["Rebel"] = D_HT,
39 | ["Refugee"] = D_HT,
40 | ["VortigauntUriah"] = D_HT,
41 | ["npc_vortigaunt"] = D_HT,
42 | ["VortigauntSlave"] = D_HT,
43 |
44 | ["npc_zombie"] = D_HT,
45 | ["npc_poisonzombie"] = D_HT,
46 | ["npc_zombie_torso"] = D_HT,
47 | ["npc_headcrab_black"] = D_HT,
48 | ["npc_headcrab"] = D_HT,
49 | ["npc_fastzombie_torso"] = D_HT,
50 | ["npc_fastzombie"] = D_HT,
51 | ["npc_headcrab_fast"] = D_HT,
52 | ["npc_barnacle"] = D_HT,
53 | ["npc_antlion_worker"] = D_HT,
54 | ["npc_antlionguardian"] = D_HT,
55 | ["npc_antlionguard"] = D_HT,
56 | ["npc_antlion"] = D_HT,
57 | ["npc_zombine"] = D_HT,
58 | ["npc_resturret02"] = D_HT,
59 | ["npc_resturret03"] = D_HT,
60 | ["npc_resturret01"] = D_HT,
61 |
62 | ["npc_breen"] = D_LI,
63 | ["npc_stalker"] = D_LI,
64 | ["npc_cscanner"] = D_LI,
65 | ["npc_combine_camera"] = D_LI,
66 | ["npc_turret_ceiling"] = D_LI,
67 | ["npc_combinegunship"] = D_LI,
68 | ["CombineElite"] = D_LI,
69 | ["npc_combine_s"] = D_LI,
70 | ["npc_hunter"] = D_LI,
71 | ["npc_helicopter"] = D_LI,
72 | ["npc_manhack"] = D_LI,
73 | ["npc_metropolice"] = D_LI,
74 | ["CombinePrison"] = D_LI,
75 | ["PrisonShotgunner"] = D_LI,
76 | ["npc_rollermine"] = D_LI,
77 | ["npc_clawscanner"] = D_LI,
78 | ["ShotgunSoldier"] = D_LI,
79 | ["npc_strider"] = D_LI,
80 | ["npc_turret_floor"] = D_LI,
81 | ["npc_turret_ground"] = D_LI,
82 | ["npc_sniper"] = D_LI
83 | }
84 |
85 | FACTION_ADMIN = FACTION.index
86 |
--------------------------------------------------------------------------------
/.deprecated/diseases/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Diseases"
3 | PLUGIN.author = "Bilwin"
4 | PLUGIN.description = "Adding diseases"
5 | PLUGIN.schema = "Any"
6 | PLUGIN.version = 'deprecated'
7 | PLUGIN.license = [[
8 | This is free and unencumbered software released into the public domain.
9 | Anyone is free to copy, modify, publish, use, compile, sell, or
10 | distribute this software, either in source code form or as a compiled
11 | binary, for any purpose, commercial or non-commercial, and by any
12 | means.
13 | In jurisdictions that recognize copyright laws, the author or authors
14 | of this software dedicate any and all copyright interest in the
15 | software to the public domain. We make this dedication for the benefit
16 | of the public at large and to the detriment of our heirs and
17 | successors. We intend this dedication to be an overt act of
18 | relinquishment in perpetuity of all present and future rights to this
19 | software under copyright law.
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 | OTHER DEALINGS IN THE SOFTWARE.
27 | For more information, please refer to
28 | ]]
29 | PLUGIN.readme = [[
30 | Sorry for not making a disease system running on meta tables.
31 | I think I will do it soon.
32 |
33 | If you want to add your own disease,
34 | please add the file to the `diseases` folder and name it without the prefix sh_, sv_, cl_ and others.
35 | And also add the disease (Filename) to the `ix.Diseases.Registered` table.
36 | After import, please restart the server to initialize.
37 |
38 | This plugin supports Lua Refresh, so you don't have to worry that this particular plugin is causing errors.
39 | Client-side diseases functions look bad because they couldn't get the function as a string value.
40 | Also, if you want your disease to work on the client side, add the field `functionsIsClientside = true`.
41 |
42 | Diseases can be stackable like that
43 | `cough;blindness` in GetCharacter():GetDisease()
44 | And can be removable by stack like
45 | `ix.Diseases:DisinfectPlayer(pl, "cough")
46 | And GetDisease() be like that
47 | `blindness`
48 | ]]
49 |
50 | local ix = ix or {}
51 | ix.Diseases = ix.Diseases or {}
52 |
53 | ix.util.Include("sv_hooks.lua", "server")
54 | ix.util.Include("sh_meta.lua", "shared")
55 | ix.util.Include("sh_lang.lua", "shared")
56 |
--------------------------------------------------------------------------------
/.deprecated/sv-hl2rp/plugins/specialradios/sh_plugin.lua:
--------------------------------------------------------------------------------
1 |
2 | PLUGIN.name = "Special Radios"
3 | PLUGIN.description = "Allows Combine Units to communicate not through a radio"
4 | PLUGIN.author = "Bilwin"
5 | PLUGIN.schema = "HL2 RP"
6 |
7 | ix.specialRadios = ix.specialRadios || {factionsData = {}}
8 | ix.util.Include("sh_commands.lua")
9 | ix.util.Include("sv_hooks.lua")
10 |
11 | SCHANNEL_NONE = "none"
12 |
13 | function PLAYER:GetSpecialChannel()
14 | local character = self:GetCharacter()
15 | if (character) then
16 | return character:GetSpecialChannel()
17 | else
18 | return SCHANNEL_NONE
19 | end
20 | end
21 |
22 | ix.char.RegisterVar("specialChannel", {
23 | field = "specialChannel",
24 | fieldType = ix.type.string,
25 | default = SCHANNEL_NONE,
26 | bNoDisplay = true
27 | })
28 |
29 | ix.config.Add("enableSpecialRadios", true, "Whether or no we need to enable special radio channels", nil, {
30 | category = PLUGIN.name
31 | })
32 |
33 | if (CLIENT) then
34 | function PLUGIN:LoadFonts()
35 | surface.CreateFont("DebugFixedRadio", {
36 | font = "Open Sans",
37 | extended = true,
38 | size = SScale(8),
39 | weight = 550,
40 | antialias = true
41 | })
42 | end
43 |
44 | local LocalPlayer = LocalPlayer
45 | local IsValid = IsValid
46 | local draw = draw
47 | local factionIndices = ix.faction.indices
48 | function PLUGIN:HUDPaint()
49 | if (!IsValid(LocalPlayer())) then
50 | return
51 | end
52 |
53 | local character = LocalPlayer():GetCharacter()
54 | if (character) then
55 | local radioChannels = {}
56 |
57 | if istable(factionIndices[character:GetFaction()].radioChannels) and #factionIndices[character:GetFaction()].radioChannels > 1 then
58 | for _, v in ipairs(factionIndices[character:GetFaction()].radioChannels) do
59 | radioChannels[#radioChannels + 1] = v
60 | end
61 |
62 | local channelsText = "Каналы: " .. ((#radioChannels > 0) and table.concat(radioChannels, ", ") or "нет")
63 |
64 | local currChannel = character:GetSpecialChannel()
65 | local currentText = "Текущий канал: " .. (currChannel and currChannel or SCHANNEL_NONE)
66 |
67 | draw.SimpleTextOutlined(currentText, "DebugFixedRadio",
68 | ScrW()-5, ScrH()*.5, Color(255, 255, 255), TEXT_ALIGN_RIGHT, TEXT_ALIGN_RIGHT, 1, Color(0, 0, 0))
69 |
70 | draw.SimpleTextOutlined(channelsText, "DebugFixedRadio",
71 | ScrW()-5, ScrH()*.52, Color(255, 255, 255), TEXT_ALIGN_RIGHT, TEXT_ALIGN_RIGHT, 1, Color(0, 0, 0))
72 | end
73 | end
74 | end
75 | end
76 |
77 | function PLUGIN:InitializedPlugins()
78 | if (SERVER) then
79 | self:InitFactions()
80 | end
81 | end
--------------------------------------------------------------------------------