-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1051 lines (868 loc) · 35.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="keywords" content="Gridea静态个人博客">
<meta name="description" content="温故而知新">
<meta name="theme-color" content="#000">
<title>ixuner's blog</title>
<link rel="shortcut icon" href="/favicon.ico?v=1635315079925">
<link rel="stylesheet" href="/media/css/gemini.css">
<link rel="stylesheet" href="/media/fonts/font-awesome.css">
<link
href="//fonts.googleapis.com/css?family=Monda:300,300italic,400,400italic,700,700italic|Roboto Slab:300,300italic,400,400italic,700,700italic|Rosario:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext"
rel="stylesheet" type="text/css">
<link href="/media/hljs/styles/default.css"
rel="stylesheet">
<link rel="stylesheet" href="/styles/main.css">
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="/media/js/jquery.js"></script>
<script src="/media/hljs/highlight.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/velocity.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/velocity.ui.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
</head>
<body>
<div class="head-top-line"></div>
<div class="header-box">
<div class="gemini">
<header class="header ">
<div class="blog-header box-shadow-wrapper bg-color " id="header">
<div class="nav-toggle" id="nav_toggle">
<div class="toggle-box">
<div class="line line-top"></div>
<div class="line line-center"></div>
<div class="line line-bottom"></div>
</div>
</div>
<div class="site-meta">
<div class="site-title">
<a href="/" class="brand">
<span>ixuner's blog</span>
</a>
</div>
<p class="subtitle">精于心,简于形</p>
</div>
<nav class="site-nav" id="site_nav">
<ul id="nav_ul">
<li class="nav-item nav-item-active">
<a href="/" target="_self">
<i class="fa fa-home"></i> 首页
</a>
</li>
<li class="nav-item ">
<a href="/archives/" target="_self">
<i class="fa fa-archive"></i> 归档
</a>
</li>
<li class="nav-item ">
<a href="/tags/" target="_self">
<i class="fa fa-tags"></i> 标签
</a>
</li>
<li class="nav-item ">
<a href="/post/about/" target="_self">
<i class="fa fa-user"></i> 关于
</a>
</li>
<li class="nav-item ">
<a href="/friends/" target="_self">
<i class="fa fa-address-book"></i> 友情链接
</a>
</li>
<li id="fa_search" class="nav-item">
<a href="javascript:void(0);">
<i class="fa fa-search"></i> <span class="language" data-lan="search">搜索</span>
</a>
</li>
</ul>
</nav>
</div>
</header>
</div>
<script type="text/javascript">
let showNav = true;
let navToggle = document.querySelector('#nav_toggle'),
siteNav = document.querySelector('#site_nav');
function navClick() {
let sideBar = document.querySelector('.sidebar');
let navUl = document.querySelector('#nav_ul');
navToggle.classList.toggle('nav-toggle-active');
siteNav.classList.toggle('nav-menu-active');
if (siteNav.classList.contains('nav-menu-active')) {
siteNav.style = "height: " + (navUl.children.length * 42) +"px !important";
} else {
siteNav.style = "";
}
}
navToggle.addEventListener('click',navClick);
</script>
</div>
<div class="main-continer">
<div
class="section-layout gemini ">
<div class="section-layout-wrapper">
<div id="sidebarMeta" class="sidebar">
<div class="sidebar-wrapper box-shadow-wrapper bg-color">
<div class="sidebar-item">
<img class="site-author-image right-motion" src="/images/avatar.png"/>
<p class="site-author-name">ixuner</p>
</div>
<div class="sidebar-item side-item-stat right-motion">
<div class="sidebar-item-box">
<a href="/archives/">
<span class="site-item-stat-count">1</span>
<span class="site-item-stat-name language" data-lan="article">文章</span>
</a>
</div>
<div class="sidebar-item-box">
<a href="/tags/">
<span class="site-item-stat-count">2</span>
<span class="site-item-stat-name language" data-lan="tag">标签</span>
</a>
</div>
</div>
<div class="sidebar-item">
<span class="site-item-rss">
<i class="fa fa-rss"></i>
<a href="https://ixuner.github.io/atom.xml" target="_blank">RSS</a>
</span>
</div>
<div style="width: 100%; position: relative;">
<canvas id="canvasDiyBlock" style="width:100%;">当前浏览器不支持canvas,请更换浏览器后再试</canvas>
<script src="/media/js/magic/clock.js"></script>
</div>
</div>
</div>
<script>
let sidebarMeta = document.querySelector('#sidebarMeta');
let scheme = 'gemini';
let sidebarWrapper = document.querySelector('.sidebar-wrapper');
if (sidebarMeta && (scheme === 'pisces' || scheme === 'gemini')) {
document.addEventListener('scroll', function(e) {
if (document.scrollingElement.scrollTop > parseInt(sidebarMeta.style.marginTop) + 10) {
sidebarWrapper.classList.add('home-sidebar-fixed')
} else {
sidebarWrapper.classList.remove('home-sidebar-fixed')
}
});
}
</script>
<div class="section-box gemini">
<section class="section posts-expand slide-down-in">
<article class="post-list-box post box-shadow-wrapper">
<div class="article-wrapper bg-color">
<section class="post-header">
<h1 class="post-title">
<a class="post-title-link" href="https://ixuner.github.io/post/l4d2-sourcemod/"> 求生之路2插件安装教程 </a>
</h1>
<div class="post-meta">
<span class="meta-item pc-show">
<i class="fa fa-calendar-o"></i>
<span class="language" data-lan="publish">发布于</span>
<span class="publish-time" data-t="2021-10-27 00:46:13">2021-10-27</span>
<span class="post-meta-divider pc-show">|</span>
</span>
<span class="meta-item">
<i class="fa fa-folder-o"></i>
<span class="pc-show language" data-lan="category-in">标签:</span>
<a href="https://ixuner.github.io/tag/l4d2/"> <span>l4d2</span> </a>、
<a href="https://ixuner.github.io/tag/sourcemod/">
<span>sourcemod</span>
</a>
</span>
<span class="post-meta-divider">|</span>
<span class="meta-item">
<i class="fa fa-clock-o"></i>
<span
>4<span class="language" data-lan="minute"
>分钟</span
></span
>
</span>
<span class="meta-item">
<span class="post-meta-divider">|</span>
<i class="fa fa-file-word-o"></i>
<span
>958<span class="pc-show language" data-lan="words"
>字数</span
></span
>
</span>
</div>
</section>
<div class="post-body">
<!-- 没有手动摘要切开启了自动摘要,则根据配置筛除摘要内容 -->
<p><p><strong>从 17 年开始接触开服,一直到现在,一些经验和走过的坑,记录一下。</strong></p>
<h2 id="1-安装插件平台">1、安装插件平台</h2>
<p>建议去官网下载,别用什么xxx整合包。当初刚开始接触插件,用的某夜的整合包,走了很多弯路,各种坑,各种 BUG 。</p>
<p>
<div class="post-button text-center">
<a class="btn language" data-lan="read-more" href="https://ixuner.github.io/post/l4d2-sourcemod/" rel="contents">
阅读全文 »
</a>
</div>
</div>
</div>
</article>
<div class="page bg-color">
<ul class="pagination-ul">
<li class="pagination-li pagination-active">
<a href="/page/../">
1
</a>
</li>
</ul>
</div>
</section>
</div>
</div>
</div>
<div class="footer-box">
<footer class="footer">
<center>
已运行:<span id="run_time"></span>
<span class="post-meta-divider">|</span>
已咕咕:<span id="gugu_time"></span>
</center>
总字数:<span id="word_count"></span>
<span class="post-meta-divider">|</span>
<span id="busuanzi_container_site_pv">浏览数:<span id="busuanzi_value_site_pv"></span> 次</span>
<span class="post-meta-divider">|</span>
<span id="busuanzi_container_site_uv">访客数:<span id="busuanzi_value_site_uv"></span> 人</span>
<script>
function runTime() {
str = "";
BirthDay = new Date("October 26,2021");
today = new Date();
timeold = today.getTime() - BirthDay.getTime();
msPerDay = 24 * 60 * 60 * 1000;
e_daysold = timeold / msPerDay;
daysold = Math.floor(e_daysold);
str += daysold + "天";
return str;
}
setInterval(function () {
$("#run_time").html(runTime());
}, 1000);
</script>
<script>
function guguTime() {
str = "";
guguDay = new Date(document.lastModified);
today = new Date();
timeold = today.getTime() - guguDay.getTime();
msPerDay = 24 * 60 * 60 * 1000;
e_daysold = timeold / msPerDay;
daysold = Math.floor(e_daysold);
str += daysold + "天";
return str;
}
setInterval(function () {
$("#gugu_time").html(guguTime());
}, 1000);
</script>
<script>
function site() {
return 275.6 + "k";
};
setInterval(function () {
$("#word_count").html(site());
}, 1000);
</script>
<div class="copyright">
Created by
<a href="https://github.com/YuZhangWang" target="_blank">YuZhangWang</a>
©2019-Present
<span class="post-meta-divider">|</span>
Powered By
<a href="https://github.com/YuZhangWang/YuZhangWang.github.io" target="_blank">Github</a>
<span class="post-meta-divider">|</span>
Theme By
<a href="https://github.com/theme-next/hexo-theme-next" target="_blank">Next</a>
</div>
<div class="poweredby">
</div>
</footer>
<div class="gemini back-to-top" id="back_to_top">
<i class="fa fa-arrow-up"></i>
<span class="scrollpercent"> <span id="back_to_top_text">0</span>% </span>
</div>
</div>
<script>
let sideBarOpen = "sidebar-open";
let body = document.body;
let back2Top = document.querySelector("#back_to_top"),
back2TopText = document.querySelector("#back_to_top_text"),
drawerBox = document.querySelector("#drawer_box"),
rightSideBar = document.querySelector(".sidebar"),
viewport = document.querySelector("body");
function scrollAnimation(currentY, targetY) {
let needScrollTop = targetY - currentY;
let _currentY = currentY;
setTimeout(() => {
const dist = Math.ceil(needScrollTop / 10);
_currentY += dist;
window.scrollTo(_currentY, currentY);
if (needScrollTop > 10 || needScrollTop < -10) {
scrollAnimation(_currentY, targetY);
} else {
window.scrollTo(_currentY, targetY);
}
}, 1);
}
back2Top.addEventListener("click", function (e) {
scrollAnimation(document.scrollingElement.scrollTop, 0);
e.stopPropagation();
return false;
});
window.addEventListener("scroll", function (e) {
let percent =
(document.scrollingElement.scrollTop /
(document.scrollingElement.scrollHeight -
document.scrollingElement.clientHeight)) *
100;
if (percent > 1 && !back2Top.classList.contains("back-top-active")) {
back2Top.classList.add("back-top-active");
}
if (percent == 0) {
back2Top.classList.remove("back-top-active");
}
if (back2TopText) {
back2TopText.textContent = Math.floor(percent);
}
});
let hasCacu = false;
window.addEventListener("resize", function (e) {
calcuHeight();
});
function calcuHeight() {
// 动态调整站点概览高度
if (
(!hasCacu && back2Top.classList.contains("pisces")) ||
back2Top.classList.contains("gemini")
) {
let sideBar = document.querySelector(".sidebar");
let navUl = document.querySelector("#site_nav");
sideBar.style =
"margin-top:" + (navUl.offsetHeight + navUl.offsetTop + 15) + "px;";
hasCacu = true;
}
}
calcuHeight();
let open = false,
MOTION_TIME = 300,
RIGHT_MOVE_DIS = "320px";
if (drawerBox) {
let rightMotions = document.querySelectorAll(".right-motion");
let right = drawerBox.classList.contains("right");
let transitionDir = right
? "transition.slideRightIn"
: "transition.slideLeftIn";
let openProp, closeProp;
if (right) {
openProp = {
paddingRight: RIGHT_MOVE_DIS,
};
closeProp = {
paddingRight: "0px",
};
} else {
openProp = {
paddingLeft: RIGHT_MOVE_DIS,
};
closeProp = {
paddingLeft: "0px",
};
}
drawerBox.onclick = function () {
open = !open;
jQuery.Velocity(rightSideBar, "stop");
jQuery.Velocity(viewport, "stop");
jQuery.Velocity(rightMotions, "stop");
if (open) {
jQuery.Velocity(
rightSideBar,
{
width: RIGHT_MOVE_DIS,
},
{
duration: MOTION_TIME,
begin: function () {
jQuery.Velocity(rightMotions, transitionDir, {});
},
}
);
jQuery.Velocity(viewport, openProp, {
duration: MOTION_TIME,
});
} else {
jQuery.Velocity(
rightSideBar,
{
width: "0px",
},
{
duration: MOTION_TIME,
begin: function () {
jQuery.Velocity(rightMotions, {
opacity: 0,
});
},
}
);
jQuery.Velocity(viewport, closeProp, {
duration: MOTION_TIME,
});
}
for (let i = 0; i < drawerBox.children.length; i++) {
drawerBox.children[i].classList.toggle("muse-line");
}
drawerBox.classList.toggle(sideBarOpen);
};
}
// 链接跳转
let newWindow = "false";
if (newWindow === "true") {
let links = document.querySelectorAll(".post-body a");
links.forEach((item) => {
if (!item.classList.contains("btn")) {
item.setAttribute("target", "_blank");
}
});
}
let faSearch = document.querySelector("#fa_search");
faSearch &&
faSearch.addEventListener("click", function () {
document.querySelector("#search_mask").style = "";
});
// 代码高亮
hljs.initHighlightingOnLoad();
// 离开当前页title变化
var leaveTitle = "";
var normal_title = document.title;
if (leaveTitle) {
document.addEventListener("visibilitychange", function () {
if (document.visibilityState == "hidden") {
normal_title = document.title;
document.title = leaveTitle;
} else {
document.title = normal_title;
}
});
}
</script>
<link rel="stylesheet" href="/media/css/jquery.fancybox.css" />
<script src="/media/js/jquery.fancybox.js"></script>
<script>
let images = document.querySelectorAll(".section img");
images.forEach((image) => {
var parent = image.parentElement;
var next = image.nextElementSibling;
parent.removeChild(image);
var aelem = document.createElement("a");
aelem.href = image.src;
aelem.dataset["fancybox"] = "images";
aelem.dataset["rel"] = "fancybox-button";
aelem.classList.add("fancybox");
aelem.appendChild(image);
parent.insertBefore(aelem, next);
});
</script>
</div>
</body>
<div class="search-mask" id="search_mask" style="display: none;">
<div class="search-box">
<div class="search-title">
<i class="fa fa-search"></i>
<div class="input-box">
<input id="search" type="text" class="language" data-lan="search" placeholder="搜索">
</div>
<i id="close" class="fa fa-times-circle"></i>
</div>
<div class="stat-box">
<span id="stat_count">0</span><span class="language" data-lan="stat">条相关条目,使用了</span><span id="stat_times">0</span><span class="language" data-lan="stat-time">毫秒</span>
<hr>
</div>
<div class="result" id="result">
<div class="item">
<a class="result-title" style="opacity: 0;" href="https://ixuner.github.io/post/l4d2-sourcemod/"" data-c="
<p><strong>从 17 年开始接触开服,一直到现在,一些经验和走过的坑,记录一下。</strong></p>
<h2 id="1-安装插件平台">1、安装插件平台</h2>
<p>建议去官网下载,别用什么xxx整合包。当初刚开始接触插件,用的某夜的整合包,走了很多弯路,各种坑,各种 BUG 。</p>
<h3 id="11-下载-sourcemod">1.1 下载 <a href="https://www.sourcemod.net/downloads.php?branch=stable">SourceMod</a></h3>
<figure data-type="image" tabindex="1"><img src="https://ixuner.github.io/post-images/1635266796954.png" alt="" loading="lazy"></figure>
<h3 id="12-下载-metamod">1.2 下载 <a href="https://www.metamodsource.net/downloads.php?branch=stable">MetaMod</a></h3>
<figure data-type="image" tabindex="2"><img src="https://ixuner.github.io/post-images/1635266803850.png" alt="" loading="lazy"></figure>
<h3 id="13-生成游戏的-vdf">1.3 生成游戏的 <a href="https://www.metamodsource.net/vdf">VDF</a></h3>
<figure data-type="image" tabindex="3"><img src="https://ixuner.github.io/post-images/1635266815124.png" alt="" loading="lazy"></figure>
<h3 id="14-安装">1.4 安装</h3>
<p>先解压 SourceMod 的压缩包,里面有 addons 和 cfg 两个文件夹,分别对应放到 <code>.../left4dead2/addons</code> 和 <code>.../left4dead2/cfg</code>,<br>
接着解压 MetaMod,也是放到 addons 目录,如有提示覆盖覆盖即可;最后放 VDF 文件。</p>
<h2 id="2-检查是否安装成功">2、检查是否安装成功</h2>
<p><code>map xxx</code> 建图,然后控制台输入 <code>sm version</code>,如果出现以下提示,则表示已正确安装了插件平台。(我这里安装的是开发版 1.11,如果你安装的是稳定版那显示的是 1.10)</p>
<pre><code class="language-bash">sm version
SourceMod Version Information:
SourceMod Version: 1.11.0.6742
SourcePawn Engine: 1.11.0.6742, jit-x86 (build 1.11.0.6742)
SourcePawn API: v1 = 5, v2 = 14
Compiled on: Sep 6 2021 18:44:42
Built from: https://github.com/alliedmodders/sourcemod/commit/106f807
Build ID: 6742:106f807
http://www.sourcemod.net/
</code></pre>
<h2 id="3-添加管理员">3、添加管理员</h2>
<ul>
<li>打开 <code>.../left4dead2/addons/sourcemod/configs/admins_simple.ini</code>,在后面添加 <code>&quot;STEAM_1:0:xxx&quot; &quot;99:z&quot;</code>。</li>
<li><code>&quot;STEAM_1:0:xxx&quot;</code>是玩家的 <code>steamid</code>,可以在此 <a href="https://steamid.io">网站</a> 查询,或者你在游戏里(不是主菜单界面,必须得开个图或者在服务器里)控制台输入 status 也可以查看,游戏里查到的 steamid 更准确。</li>
<li><code>&quot;99:z&quot;</code> 是最高权限,98 低一级,以此类推。<code>z</code> 代表什么意思如果感兴趣可以去 SourceMod 官网查看文档。</li>
<li>用命令 <code>sm_reloadadmins</code> 刷新管理员缓存,或者重启服务器。</li>
</ul>
<p><strong>到这里,纯净插件平台已经安装好了。</strong></p>
<h2 id="4-安装常用扩展">4、安装常用扩展</h2>
<h3 id="41-l4dtoolz">4.1 l4dtoolz</h3>
<ul>
<li>l4dtoolz 人数破解,战役突破 4+ 玩家,对抗突破 8+ 玩家。</li>
<li><a href="https://github.com/Accelerator74/l4dtoolz/releases">下载地址</a>,然后解压放到 <code>addons</code> 目录,然后在 <code>cfg/server.cfg</code>(没有就新建一个),添加以下参数:</li>
</ul>
<pre><code class="language-c++">sm_cvar sv_maxplayers 10 //服务器实际支持最大人数
sm_cvar sv_visiblemaxplayers -1 //就是显示能多少人数,可以随便设置任何数字。-1 表示跟着 sv_maxplayers 参数。
sm_cvar sv_force_unreserved 1 //移除大厅匹配,解锁人数的前提。必须得是 1 才能解锁 4+ / 8+ 人数上限。
</code></pre>
<h3 id="42-tickrate-enabler">4.2 Tickrate-Enabler</h3>
<ul>
<li>Tickrate 是什么自行搜索了解,求生默认是 30Tick,此扩展就是可以突破这个上限,现在战役药抗主流是 60Tick 和 100Tick。但是提高 Tick 会要求你要有更高的上行带宽,毕竟国内的上行带宽还是挺贵的。比如云服 1Mbps 的话能开一个 8 人 30TIck 的服,如果升到 100Tick,那可能只能 2 ~ 3 人,再多人的就会有丢包,体验不好。</li>
<li><a href="https://github.com/Accelerator74/Tickrate-Enabler/releases">下载地址</a>,一样解压放到 <code>addons</code> 目录,然后在<code>cfg/server.cfg</code>,添加以下参数:</li>
</ul>
<pre><code class="language-c++">// 100Tick 参数
sm_cvar sv_minrate 100000
sm_cvar sv_maxrate 100000
sm_cvar sv_minupdaterate 100
sm_cvar sv_maxupdaterate 100
sm_cvar sv_mincmdrate 100
sm_cvar sv_maxcmdrate 100
sm_cvar sv_client_min_interp_ratio 0
sm_cvar sv_client_max_interp_ratio 0
sm_cvar nb_update_frequency 0.024
sm_cvar net_splitpacket_maxrate 50000
sm_cvar fps_max 0
sm_cvar net_splitrate 2
sm_cvar net_maxcleartime 0.001
</code></pre>
<pre><code class="language-c++">// 60Tick 参数
sm_cvar sv_minrate 60000
sm_cvar sv_maxrate 60000
sm_cvar sv_minupdaterate 60
sm_cvar sv_maxupdaterate 60
sm_cvar sv_mincmdrate 60
sm_cvar sv_maxcmdrate 60
sm_cvar sv_client_min_interp_ratio 0
sm_cvar sv_client_max_interp_ratio 0
sm_cvar nb_update_frequency 0.024
sm_cvar net_splitpacket_maxrate 30000
sm_cvar fps_max 0
sm_cvar net_splitrate 2
sm_cvar net_maxcleartime 0.001
</code></pre>
<ul>
<li>接着在启动项添加参数 <code>-tickrate xxx</code> ,<code>xxx</code> 是你要设置的 Tick,100 或者 60 你看你的上行带宽决定。</li>
<li>然后怎么查看是否生效了呢?进入你的服务器或者本地建图(如果你安装在本地的话),控制台输入 <code>net_graph 4</code>,右下角会出现网络图,看最右边的四行数字,第二第三行如果都显示的是 100 或者 60,那证明生效了。</li>
</ul>
<figure data-type="image" tabindex="4"><img src="https://ixuner.github.io/post-images/1635266823523.png" alt="" loading="lazy"></figure>
<p>ps: 第一第四行是本地客户端控制的,两个参数:</p>
<pre><code class="language-c++">cl_updaterate 100
cl_cmdrate 100
</code></pre>
">求生之路2插件安装教程</a>
</div>
<div class="item">
<a class="result-title" style="opacity: 0;" href="https://ixuner.github.io/post/about/"" data-c="
<blockquote>
<p>欢迎来到我的小站呀,很高兴遇见你!🤝</p>
</blockquote>
<h2 id="关于本站">🏠 关于本站</h2>
<h2 id="博主是谁">👨💻 博主是谁</h2>
<h2 id="兴趣爱好">⛹ 兴趣爱好</h2>
<h2 id="联系我呀">📬 联系我呀</h2>
">关于</a>
</div>
</div>
<div class="page">
<div id="page_ul"></div>
</div>
</div>
</div>
<script>
!function () {
let searchMask = document.querySelector('#search_mask');
let result = document.querySelector('#result');
let items = document.querySelectorAll('.item');
let searchBox = document.querySelector('#search');
let statCount = document.querySelector('#stat_count');
let statTimes = document.querySelector('#stat_times');
let pageUl = document.querySelector('#page_ul');
let close = document.querySelector('#close');
close.addEventListener('click', function() {
searchMask.style = 'display: none;'
})
let finds = [];
let contents = [];
let pageSize = 10;
items.forEach(item => {
let a = item.querySelector('a');
contents.push({
title: a.innerText,
details: a.dataset.c,
link: a.href
})
item.remove();
})
function insertStr(soure, start, count) {
let newStr = soure.substr(start, count);
return soure.slice(0, start) + '<em>' + newStr + '</em>' + soure.slice(start + count);
}
pageUl.addEventListener('click', function(event) {
let target = event.target;
if (target.__proto__ === HTMLSpanElement.prototype) {
appendResults(parseInt(target.dataset.i));
}
})
function appendResults(index) {
let htmlResult = '';
let start = index || 0;
let end = Math.min(start + pageSize, finds.length);
for (let i = start; i < end; i++) {
const current = finds[i];
let html = current.title;
let sum = 0;
let positions = current.positions;
positions.forEach(position => {
html = insertStr(html, position.start + sum, position.count);
sum += 9;
})
htmlResult += `<div class="item"><a class="result-title" href="${current.link}">${html}</a></div>`;
}
result.innerHTML = htmlResult;
pageUl.innerHTML = '';
let count = finds.length / pageSize;
let lis = '';
if (start !== 0) {
lis += `<span class="fa fa-angle-left" data-i='${start - 1}'></span>`;
}
for (let i = 0; i < count; i++) {
lis += `<span class='${i === start?'current':''}' data-i='${i}'>${i+1}</span>`;
}
if (start+1 < count) {
lis += `<span class="fa fa-angle-right" data-i='${start+1}'></span>`;
}
pageUl.innerHTML = lis;
}
function search(delay) {
let timer = null
return function () {
clearTimeout(timer)
timer = setTimeout(() => {
let start = Date.now();
let segments = searchBox.value.split(' ').filter(c => c != '');
if (segments.length <= 0) {
return;
}
finds = [];
let htmlResult = '';
contents.forEach(content => {
let title = content.title;
let positions = [];
let find = false;
segments.forEach((segment) => {
if (content.title.includes(segment)) {
find = true;
positions.push({
start: content.title.indexOf(segment),
count: segment.length
})
} else if (content.details.includes(segment)) {
find = true;
}
});
if (find) {
finds.push({
title: content.title,
link: content.link,
positions
});
}
})
appendResults(0);
statCount.textContent = finds.length;
statTimes.textContent = Date.now() - start;
}, delay)
}
}
searchBox.addEventListener('input', search(200));
}()
</script>
<input hidden id="copy" />
<script>
!function () {
let times = document.querySelectorAll('.publish-time');
for (let i = 0; i < times.length; i++) {
let date = times[i].dataset.t;
let time = Math.floor((new Date().getTime() - new Date(date).getTime()) / 1000);
if (time < 60) {
str = time + '秒之前';
} else if (time < 3600) {
str = Math.floor(time / 60) + '分钟之前';
} else if (time >= 3600 && time < 86400) {
str = Math.floor(time / 3600) + '小时之前';
} else if (time >= 86400 && time < 259200) {
str = Math.floor(time / 86400) + '天之前';
} else {
str = times[i].textContent;
}
times[i].textContent = str;
}
}();
</script>
<script>
let language = '';
if (language !== '') {
let map = new Map();
if (language === 'en') {
map.set('search', 'Search');
map.set('category', 'Categories');
map.set('article', 'Articles');
map.set('tag', 'Tags');
map.set('top', 'Top');
map.set('publish', 'published');
map.set('minute', ' minutes');
map.set('read-more', 'Read More');
map.set('view', 'View');
map.set('words', ' words');
map.set('category-in', 'category in');
map.set('preview', 'Meta');
map.set('index', 'Toc');
map.set('no-archives', "You haven't created yet");
map.set('archives', " articles in total");
map.set('cloud-tags', " tags in total");
map.set('copyright', "Copyright: ");
map.set('author', "Author: ");
map.set('link', "Link: ");
map.set('leave-message', "Leave a message");
map.set('format', "Links Format");
map.set('site-name', "Name: ");
map.set('site-link', "Link: ");
map.set('site-desc', "Desc: ");
map.set('stat', " related results, taking ");
map.set('stat-time', " ms");
map.set('site-img', "Image: ");
}
if (map.size > 0) {
let lanElems = document.querySelectorAll('.language');
lanElems.forEach(elem => {
let lan = elem.dataset.lan, text = map.get(lan);
if (elem.__proto__ === HTMLInputElement.prototype) {
elem.placeholder = text
} else {
if (elem.dataset.count) {
text = elem.dataset.count + text;
}
elem.textContent = text;
}
})
}
}
window.Clipboard = (function (window, document, navigator) {
var textArea,
copy;
// 判断是不是ios端
function isOS() {
return navigator.userAgent.match(/ipad|iphone/i);
}
//创建文本元素
function createTextArea(text) {
textArea = document.createElement('textArea');
textArea.value = text;
textArea.style.width = 0;
textArea.style.height = 0;
textArea.clientHeight = 0;
textArea.clientWidth = 0;
document.body.appendChild(textArea);
}
//选择内容
function selectText() {
var range,
selection;
if (isOS()) {
range = document.createRange();
range.selectNodeContents(textArea);
selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
textArea.setSelectionRange(0, 999999);
} else {
textArea.select();
}
}
//复制到剪贴板
function copyToClipboard() {
try {
document.execCommand("Copy")
} catch (err) {
alert("复制错误!请手动复制!")
}
document.body.removeChild(textArea);
}
copy = function (text) {
createTextArea(text);
selectText();
copyToClipboard();
};
return {
copy: copy
};