安装方法:
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>"
Simply copy PanoramaVotes.cs to your project. And Import it into your project:
只需将PanoramaVotes.cs复制到您的项目中即可。并将其导入到您的项目中: