Multi Colors 多颜色API调用插件(适用于开插件开发者) 游戏性拓展 开发者相关

我不当学长 管理员组 2022-5-9 997

插件介绍:

  • Multi Colors (基于 Stamm-Colors) ,整合了Colors和More Colors所提供的颜色。其中有一些游戏默认会调用More Colors提供的颜色,而有的游戏比如说csgo,会由Colors来提供颜色。

显示效果:

最常见的就是聊天框当中显示颜色,如下图

O8u7Kx.png

O8uXIe.png

使用方法:

在需要插件源码sp需要进行颜色显示的地方,调用相关API即可

O8uzRA.png

客户端在聊天框输入:

  • !multicolors //查看基本颜色效果
  • !addprefix   //为聊天空的玩家添加昵称之前的前缀以及颜色
  • !clearprefix //删掉聊天框前缀以及颜色

支持的函数有

CPrintToChat(int client, const char[] message, any ...)
CPrintToChatAll(const char[] message, any ...)
CPrintToChatEx(int client, int author, const char[] message, any ...)
CPrintToChatAllEx(int author, const char[] message, any ...)
CReplyToCommand(int author, const char[] message, any ...)
CReplyToCommandEx(int client, int author, const char[] message, any ...)
CShowActivity(int author, const char[] message, any ...)
CShowActivityEx(int author, const char[] tag, const char[] message, any ...)
CShowActivity2(int author, const char[] tag, const char[] message, any ...)
CPrintToChatObservers(int target, const char[] message, any ...)
CPrintToChatObserversEx(int target, const char[] message, any ...)
CRemoveTags(char[] message, int maxlen)
CFormatColor(char[] message, int maxlength, int author)

支持的颜色代码

More Colors (doctormckay.com)(这个网站有对应颜色以及对应代码)

{"{default}", "{darkred}", "{green}", "{lightgreen}", "{red}", "{blue}", "{olive}", "{lime}", "{lightred}", "{purple}", "{grey}", "{yellow}", "{orange}", "{bluegrey}", "{lightblue}", "{darkblue}", "{grey2}", "{orchid}", "{lightred2}"};

安装方法:

  • 将multicolor_example.smx放到sourcemod/plugins/目录下
  • 可以通过加载multicolor_example.smx来查看实际的使用效果

下载地址:

链接: https://pan.baidu.com/s/1Tg1lU_UuuN_Im_wU1KorEg?pwd=ghik 提取码: ghik 复制这段内容后打开百度网盘手机App,操作更方便哦 
--来自百度网盘超级会员v4的分享

参考:


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