{"id":15410222,"url":"https://github.com/hmbsbige/soucemodplugins","last_synced_at":"2025-04-19T07:30:23.174Z","repository":{"id":84339639,"uuid":"79783784","full_name":"HMBSbige/SouceModPlugins","owner":"HMBSbige","description":"My L4D2 SouceMod plugins","archived":false,"fork":false,"pushed_at":"2023-12-15T20:20:54.000Z","size":752,"stargazers_count":49,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-16T03:55:30.125Z","etag":null,"topics":["l4d2","l4d2-linux-server","linux","sourcemod","steam"],"latest_commit_sha":null,"homepage":"","language":"SourcePawn","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HMBSbige.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-23T08:12:43.000Z","updated_at":"2025-01-25T04:30:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"eea9be86-d4fb-4222-923f-f57471cd89c4","html_url":"https://github.com/HMBSbige/SouceModPlugins","commit_stats":{"total_commits":63,"total_committers":2,"mean_commits":31.5,"dds":"0.015873015873015928","last_synced_commit":"2fbba501b6110f0265919f98d357c3350f24c9a7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMBSbige%2FSouceModPlugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMBSbige%2FSouceModPlugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMBSbige%2FSouceModPlugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMBSbige%2FSouceModPlugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HMBSbige","download_url":"https://codeload.github.com/HMBSbige/SouceModPlugins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249638245,"owners_count":21304304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["l4d2","l4d2-linux-server","linux","sourcemod","steam"],"created_at":"2024-10-01T16:43:40.915Z","updated_at":"2025-04-19T07:30:23.144Z","avatar_url":"https://github.com/HMBSbige.png","language":"SourcePawn","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SouceModPlugins For L4D2\n**L4D2 服务器搭建（Linux）**\n\n之前 Windows 的：https://www.jianshu.com/p/52c1635876e7\n\n## 安装 SteamCMD\nhttps://developer.valvesoftware.com/wiki/SteamCMD#Linux\n```\ndpkg --add-architecture i386\napt update\napt install lib32gcc1 -y\napt install steamcmd -y\n```\n\n## 安装/更新服务器\n运行 `steamcmd`\n\n```\nlogin anonymous\nforce_install_dir /data/syncthing/L4D2Server\napp_update 222860 validate\nquit\n```\n\n其中 `/data/syncthing/L4D2Server` 为下载路径\n\n## SourceMod、Metamod、L4DToolZ 插件\n### 下载\n#### SourceMod\nSourceMod 官网：https://www.sourcemod.net/\n\nSourceMod 稳定版下载：https://www.sourcemod.net/downloads.php?branch=stable\n\n当然下载 Linux 版的\n\n#### Metamod\nMetamod官网：https://www.sourcemm.net/\n\n当然不要忘记生成对应游戏的VDF文件：https://www.sourcemm.net/vdf\n\n#### L4DToolZ\nL4DToolZ：https://forums.alliedmods.net/showthread.php?t=93600\n\nL4DToolZ的GitHub：https://github.com/ivailosp/l4dtoolz/\n\nL4D2的是下1.0.0.9h版本\n\n**总共是4份文件**\n\n### 安装\n\n~~安装顺序是无所谓的~~\n\n#### Metamod\n将 `mmsource-1.10.7-git971-linux.tar.gz` 的addons解压出来与 `./left4dead2/addons/` 合并\n\n再将之前生成的 `metamod.vdf` 覆盖addons里的 `metamod.vdf` ~~（这个文件其实就是个路径设置）~~\n\n#### SourceMod\n同理将 `sourcemod-1.10.0-git6497-linux.tar.gz` 里的 `addons` 和 `cfg` 与`./left4dead2/addons/`和 `./left4dead2/cfg/` 合并\n\n#### L4DToolZ\n将 `l4dtoolz(L4D2)-1.0.0.9h.zip` 里的两个文件夹 `l4dtoolz` 和 `metamod` 放到 `./left4dead2/addons/` 里。\n\n### 简单运行\n`./srcds_run -game left4dead2 -insecure +maxplayers 16 +hostport 27015 +map c1m2_streets`\n\n命令行参数详见：https://developer.valvesoftware.com/wiki/Command_Line_Options\n\n在 Console 里输入 `meta list`\n```\nmeta list\nListing 3 plugins:\n  [01] SourceMod (1.10.0.6497) by AlliedModders LLC\n  [02] L4DToolZ (1.0.0.9h-2-g7465d71b-dirty) by Ivailosp\n  [03] SDK Tools (1.10.0.6497) by AlliedModders LLC\n```\n像这样就安装成功了\n\n### 简单更改服务器最大人数\n输入命令：\n\n`sm_cvar sv_maxplayers 16;sm_cvar sv_visiblemaxplayers 16`\n\n当然这些命令可以预先放到 `./left4dead2/cfg/server.cfg` 里。\n\n### 简单设置权限\n* 在 `./left4dead2/addons/sourcemod/configs/admins_simple.ini` 里的增加一行\n\n`\"STEAM_1:1:125637774\"     \"99:z\" \"passwd\"`\n\n第一个引号是 steamID 或者是 Steam 个人资料名(游戏里的名字)；第二个引号是权限大小；第三个引号是密码。具体说明文件里都有。\n\n* 然后到同一目录下的`core.cfg`里修改\n\n`\"PassInfoVar\"\t\t\t\"_password\"`\n\n* 想要成功获得服务器的权限还要在进游戏前在游戏的控制台输入\n\n`setinfo _password passwd`\n\n当然可以放进你游戏目录里的 `./left4dead2/cfg/autoexec.cfg` 里，这样每次运行游戏时就会自动执行这条命令\n\n### 服务器欢迎界面设置\n大图：`./left4dead2/motd.txt`\n\n小图：`./left4dead2/host.txt`\n\n### SourceMod 插件安装\n一般到 http://www.sourcemod.net/plugins.php 搜索下载，按照作者说明来就行了\n\n推荐下载源码自己用 `./left4dead2/addons/sourcemod/scripting/compile.sh` 编译\n\n这里用 `gettickrate` 插件演示\n\n* 找到插件并下载源码 https://forums.alliedmods.net/showthread.php?p=649755\n* 将 `tickrate.sp` 放入 `./left4dead2/addons/sourcemod/scripting/` 里\n* 运行 `./compile.sh tickrate.sp` ，插件编译成功后会在 `compiled` 文件夹里生成 `tickrate.smx`\n* 将 `tickrate.smx` 放到 `./left4dead2/addons/sourcemod/plugins/` 里就算安装成功了\n* 有些插件需要放 `data` 到指定文件夹（往往是放同时兼容 Windows/Linux 服务器的参数），自己认真看作者的插件说明。\n* 一般要服务器运行一次后自动生成该插件所需cfg文件到 `./left4dead2/cfg/sourcemod/`。当然这个插件功能简单就没有生成~\n\n输入 `sm_gettickrate`，得到返回\n```\nThe server tickrate is 29\n```\n\n当然你可以修改 `compile.sh` 直接编译生成到 `plugins` 里\n\n#### 服务器Tickrate修改\n上次搞 Windows 服务器的时候是2017年1月，没想到论坛7月份就有接盘侠搞了个新的：\nhttps://forums.alliedmods.net/showthread.php?t=299669\n\n下载 `tickrate_enabler.zip`\n\n* 将对应文件解压放入 `addons` 文件夹\n* 运行时加上参数 `-tickrate 100`\n\n别忘 `server.cfg` 加上几个参数，比如 `sv_minrate、sv_maxrate、sv_maxupdaterate、sv_maxcmdrate、fps_max` 之类的\n\n输入 `sm_gettickrate`，得到返回\n```\nThe server tickrate is 100\n```\n\n#### 修改服务器名为中文名\nhttps://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/hostname.sp\n\n上面一样的方法下载编译插件,之后直接在 `/left4dead2/addons/sourcemod/configs/hostname/hostname.txt`\n修改，保存为UTF-8，好像无所谓带不带BOM\n\n#### 修复 Steam 组链接错误\n\n组 ID 大于 16777216 的话进入服务器显示封面跳转的链接会跳转到错误的组，熟悉这个数字的朋友一看就知道为什么了\n\nhttps://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/sv_steamgroup_fixer.sp\n\n#### 其他自用插件\n插件名|下载链接|描述\n-|-|-\nMelee In The Saferoom|https://forums.alliedmods.net/showpost.php?p=2719073\u0026postcount=494|安全屋生成近战\nAdvertisements|https://forums.alliedmods.net/showthread.php?p=592536|\nDirector Controller (All4Dead)|https://forums.alliedmods.net/showthread.php?p=751952|自用 https://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/all4dead2.sp\nFriendly-Fire Toolkit Lite|https://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/fftlite.sp|反伤插件\nInfinite-Jumping|https://github.com/chanz/infinite-jumping|连跳、多段跳，编译需要 https://github.com/bcserv/smlib\nL4D2 Friendly-Fire info|https://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/l4d2_friendlyfireinfo.sp|显示友伤信息\nGear Transfer|https://forums.alliedmods.net/showthread.php?p=1294082|R 键给物品、Bot自动给物品\nInfected Health Gauge (Tank \u0026 Witch \u0026 Special)|https://forums.alliedmods.net/showthread.php?p=1167221|显示特感伤害\nNight Vision|https://forums.alliedmods.net/showthread.php?p=1534293|双击F夜视\nRandomize Tank Witch HP and Speed|https://forums.alliedmods.net/showthread.php?p=1076665|更改 Tank、Witch 的血量和移速\nStuck Zombie Melee Fix|https://forums.alliedmods.net/showthread.php?p=932416|Bug 修复\nSurvivor Identity Fix for 5+ Survivors|https://forums.alliedmods.net/showpost.php?p=2718792\u0026postcount=36|Bug 修复，需要 [DHooks extension with detour support](https://forums.alliedmods.net/showpost.php?p=2588686\u0026postcount=589)\n自杀插件|https://forums.alliedmods.net/showthread.php?p=2107510|输入 !kill 或者 !explode 自杀\nRiot Cop (and Fallen Survivor) Head Shot|https://forums.alliedmods.net/showthread.php?p=1626951|城管正面爆头可击杀\nself stand up|https://forums.alliedmods.net/showthread.php?p=1795311|倒地自起，与 l4d_incapcrawl 插件冲突\nSurvivor AI Trigger fix|https://forums.alliedmods.net/showthread.php?p=1004836|全 Bot 队伍\nUpgrade Pack Fixes|https://forums.alliedmods.net/showthread.php?p=2690901|多人配件 Bug 修复\nWeapon Unlock|https://forums.alliedmods.net/showthread.php?p=1041458|武器解锁已经不需要了，但可以修改伤害\nSurvivor_AFK_Fix|https://forums.alliedmods.net/showthread.php?p=2714236|AFK BUG 修复，需要 [DHooks extension with detour support](https://forums.alliedmods.net/showpost.php?p=2588686\u0026postcount=589)\nMultiSlots|https://forums.alliedmods.net/showpost.php?p=2715546\u0026postcount=249|多人 Bot 管理\nCharacter Select Menu|https://forums.alliedmods.net/showthread.php?t=107121|换角色或者外观\n白给插件|https://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/wdnmd.sp|反编译望夜的 rygive.smxs，还需要放置 gamedata\n玩家进入离开提示|https://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/playerinfo.sp|\nl4d2_defibfix|https://github.com/Accelerator74/l4d2_defibfix|修复电击器电错人的 bug\nl4d2_bugfixes|https://github.com/Accelerator74/l4d2_bugfixes|修复生还者分数统计 Bug 和 Witch 攻击错人的bug\nSurvivor Bot AI SHOOT IT FFS Fix|https://forums.alliedmods.net/showthread.php?p=893326|修复求生之路的人工智障\nWeapon Drop|https://forums.alliedmods.net/showthread.php?t=123098|主动丢武器\nkill_counter|https://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/kill_counter.sp|击杀统计\nMapControl|https://github.com/HMBSbige/SouceModPlugins/blob/master/scripting/l4d2_mapcontrol.sp|换图\nSimple Supply|https://forums.alliedmods.net/showthread.php?p=1413057|安全屋正确生成补给\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmbsbige%2Fsoucemodplugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmbsbige%2Fsoucemodplugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmbsbige%2Fsoucemodplugins/lists"}