【CS2】SLAYER_PanoramaVote CS2全景UI投票 游戏性拓展 通用内容 开发者相关

我不当学长 管理员组 19天前 228

Panorama Vote (默认 CS2 Vote) 支持 CounterStrikeSharp

插件介绍:

此插件基于这一篇帖子内容:(【代码分享】CS2 全景投票 Panorama vote代码片段-编程开发-CSGO插件分享-CSGO资料库),完整实现了投票逻辑 。


安装方法:

1. 将文件platform_english.txt上传到您的服务器和游戏 \game\csgo\resource

注意:对于 Custom Vote 文本,此文件应同时安装在服务器和客户端游戏中。(我猜是通过 Workshop 向玩家下载的)。

如何在 Vote 中添加自定义文本:

当您像这样向玩家发送全景投票时

voteHandler.SendYesNoVoteToAll(30.0f, VoteConstants.VOTE_CALLER_SERVER, "#SFUI_vote_panorama_vote_default", $"Hold on, Let me Cook", VoteResultCallback, VoteHandlerCallback);
将 $“Hold on, Let me Cook” 替换为您的文本。

要更改文本颜色,请替换为 "#SFUI_vote_panorama_vote_default" me 在 platform_english.txt 中的以下预定义颜色:

"SFUI_vote_panorama_vote_default"			      "{s:s1}"
"SFUI_vote_panorama_vote_darkred"           "<font color='#8B0000'>{s:s1}</font>"
"SFUI_vote_panorama_vote_green"             "<font color='#00FF00'>{s:s1}</font>"
"SFUI_vote_panorama_vote_lightyellow"       "<font color='#FFFF00'>{s:s1}</font>"
"SFUI_vote_panorama_vote_lightblue"         "<font color='#ADD8E6'>{s:s1}</font>"
"SFUI_vote_panorama_vote_olive"             "<font color='#808000'>{s:s1}</font>"
"SFUI_vote_panorama_vote_lime"              "<font color='#00FF00'>{s:s1}</font>"
"SFUI_vote_panorama_vote_red"               "<font color='#FF0000'>{s:s1}</font>"
"SFUI_vote_panorama_vote_lightpurple"       "<font color='#DDA0DD'>{s:s1}</font>"
"SFUI_vote_panorama_vote_purple"            "<font color='#800080'>{s:s1}</font>"
"SFUI_vote_panorama_vote_grey"              "<font color='#808080'>{s:s1}</font>"
"SFUI_vote_panorama_vote_yellow"            "<font color='#FFFF00'>{s:s1}</font>"
"SFUI_vote_panorama_vote_gold"              "<font color='#FFD700'>{s:s1}</font>"
"SFUI_vote_panorama_vote_silver"            "<font color='#C0C0C0'>{s:s1}</font>"
"SFUI_vote_panorama_vote_blue"              "<font color='#0000FF'>{s:s1}</font>"
"SFUI_vote_panorama_vote_darkblue"          "<font color='#00008B'>{s:s1}</font>"
"SFUI_vote_panorama_vote_bluegrey"          "<font color='#B0C4DE'>{s:s1}</font>"
"SFUI_vote_panorama_vote_magenta"           "<font color='#FF00FF'>{s:s1}</font>"
"SFUI_vote_panorama_vote_lightrred"         "<font color='#FF6347'>{s:s1}</font>"
"SFUI_vote_panorama_vote_orange"            "<font color='#FFA500'>{s:s1}</font>"
"SFUI_vote_panorama_vote_black"             "<font color='#000000'>{s:s1}</font>"
"SFUI_vote_panorama_vote_white"             "<font color='#FFFFFF'>{s:s1}</font>"
"SFUI_vote_panorama_vote_cyan"              "<font color='#00FFFF'>{s:s1}</font>"
"SFUI_vote_panorama_vote_pink"              "<font color='#FFC0CB'>{s:s1}</font>"
"SFUI_vote_panorama_vote_brown"             "<font color='#A52A2A'>{s:s1}</font>"
"SFUI_vote_panorama_vote_turquoise"         "<font color='#40E0D0'>{s:s1}</font>"
"SFUI_vote_panorama_vote_teal"              "<font color='#008080'>{s:s1}</font>"
"SFUI_vote_panorama_vote_indigo"            "<font color='#4B0082'>{s:s1}</font>"
"SFUI_vote_panorama_vote_violet"            "<font color='#EE82EE'>{s:s1}</font>"
"SFUI_vote_panorama_vote_skyblue"           "<font color='#87CEEB'>{s:s1}</font>"
"SFUI_vote_panorama_vote_beige"             "<font color='#F5F5DC'>{s:s1}</font>"
"SFUI_vote_panorama_vote_maroon"            "<font color='#800000'>{s:s1}</font>"
"SFUI_vote_panorama_vote_chocolate"         "<font color='#D2691E'>{s:s1}</font>"
"SFUI_vote_panorama_vote_salmon"            "<font color='#FA8072'>{s:s1}</font>"
"SFUI_vote_panorama_vote_periwinkle"        "<font color='#CCCCFF'>{s:s1}</font>"
"SFUI_vote_panorama_vote_silver"            "<font color='#C0C0C0'>{s:s1}</font>"
"SFUI_vote_panorama_vote_lavender"          "<font color='#E6E6FA'>{s:s1}</font>"
"SFUI_vote_panorama_vote_aquamarine"        "<font color='#7FFFD4'>{s:s1}</font>"
"SFUI_vote_panorama_vote_charcoal"          "<font color='#36454F'>{s:s1}</font>"
要将图像发送到播放器,请替换为 "#SFUI_vote_panorama_vote_default" $"SFUI_vote_panorama_vote_image" 我在 platform_english.txt 中预定义的 it:
"SFUI_vote_panorama_vote_image"				"<img src='{s:s1}'>"

如何在 platform_english.txt 中添加自定义 HTML:

 

首先,无论何时 EDIT platform_english.txt都必须重新启动服务器和玩家游戏才能生效。

投票标题必须以 SFUI_vote_ 开头:

"SFUI_vote_chinese" "是否投降?<br> (<font color='#00FF00'>需要全队玩家同意</font>)"
要添加/更改 Vote Passed 和 Vote Failed 文本,您必须在标题的开头添加 SFUI_vote_passed_ 或 SFUI_vote_failed_,就像我的platform_english.txt一样:
"SFUI_vote_passed_panorama_vote"			"<font color='#00ff12'>{s:s1}</font>"
"SFUI_vote_failed_panorama_vote"			"<font color='#ff0000'>{s:s1}</font>"
 

如何在插件中使用 Panorama Votes:

Simply copy PanoramaVotes.cs to your project. And Import it into your project:
只需将PanoramaVotes.cs复制到您的项目中即可。并将其导入到您的项目中:

 
上传的附件:

CSGO插件分享-申明 1、本网站名称:CSGO插件分享-中文站  网址:https://bbs.csgocn.net
2、本站的宗旨在于为CSGO玩家提供一个插件分享的中文资源平台,多数插件来源于SourceMod论坛,并配以中文介绍和安装教程。
3、欢迎有能力的朋友共享有趣的CSGO插件资源。
4、本站资源大多为百度网盘,如发现链接失效,可以点: 这里进行反馈,我们会第一时间更新。
最新回复 (1)
返回