搜索
查看: 4089|回复: 6

插件信息坐标显示冲突问题

[复制链接]
发表于 2020-3-30 16:44:24 | 显示全部楼层 |阅读模式 来自 中国
本帖最后由 dongtianbao 于 2020-3-30 16:49 编辑

2个插件显示信息的位置都是左下角同一个位置坐标,一个显示的时候另外一个就被覆盖,不显示了,只能显示一个信息,如何修改其中一个纵坐标向上一点呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
发表于 2020-3-30 21:06:47 | 显示全部楼层 来自 四川成都
这个好像不是 hud_message 吧
回复

使用道具 举报

 楼主| 发表于 2020-3-30 21:10:57 | 显示全部楼层 来自 中国
本帖最后由 dongtianbao 于 2020-3-31 09:02 编辑
k1nader 发表于 2020-3-30 21:06
这个好像不是 hud_message 吧


        // OK Test What Level this Fool is
        testLevel(id)

        if ( gPlayerLevel[id] < gNumLevels ) {
                format(message,255,"LEV:%d/%d XP:(%d/%d)", gPlayerLevel[id], gNumLevels, gPlayerXP[id], gXPLevel[ gPlayerLevel[id]+ 1] )
        }


writeStatusMessage(id, message[])
{
        //Crash Check
        if ( id <= 0 || id > SH_MAXSLOTS ) return
        if (!is_user_connected(id) || is_user_bot(id)) return

        message_begin( MSG_ONE, gmsgStatusText, {0,0,0}, id)
        write_byte(0)
        write_string(message)
        message_end()


左下角的黄色字,不是hud_message,只找到这一句代码,可不知道坐标如何改
回复

使用道具 举报

发表于 2020-3-31 19:15:38 | 显示全部楼层 来自 四川成都
dongtianbao 发表于 2020-3-30 21:10
// OK Test What Level this Fool is
        testLevel(id)
  1. StatusText
复制代码

是没法改坐标的,只能通过客户端参数 hud_centerid 0 或者 1 来调整
回复

使用道具 举报

 楼主| 发表于 2020-3-31 20:06:11 | 显示全部楼层 来自 河北石家庄
本帖最后由 dongtianbao 于 2020-3-31 20:08 编辑
k1nader 发表于 2020-3-31 19:15
是没法改坐标的,只能通过客户端参数 hud_centerid 0 或者 1 来调整


    if ( gPlayerLevel[id] < gNumLevels ) {
                format(message,255,"LEV:%d/%d XP:(%d/%d)", gPlayerLevel[id], gNumLevels, gPlayerXP[id], gXPLevel[ gPlayerLevel[id]+ 1] )

这一句不用format,而是用set_hudmessage的话怎么写呢,试着了几个都不显示

hud_centerid 0 或者 1 来调整,只能显示在中间或者左下角吧,中间影响视线,左下角和其他插件冲突
回复

使用道具 举报

发表于 2020-4-1 14:40:59 | 显示全部楼层 来自 四川成都
dongtianbao 发表于 2020-3-31 20:06
if ( gPlayerLevel < gNumLevels ) {
                format(message,255,"LEV:%d/%d XP:(%d/%d)",  ...

format 只是格式化字符串的


  1. set_hudmessage(255, 0, 0, 0.48, 0.64, 0, 6.0, 0.0, 0.1, 0.2, 2);
  2. show_hudmessage(id,message);
复制代码

Syntax
native set_hudmessage(red = 200, green = 100, blue = 0, Float:x = -1.0, Float:y = 0.35, effects = 0, Float:fxtime = 6.0, Float:holdtime = 12.0, Float:fadeintime = 0.1, Float:fadeouttime = 0.2, channel = -1);
Usage
red       
Red component of hudmessage color
green       
Green component of hudmessage color
blue       
Blue component of hudmessage color
x       
Location of the message on the x axis in percent
y       
Location of the message on the y axis in percent
effects       
Display effect
fxtime       
Duration of the effect
holdtime       
Time the message stays on screen
fadeintime       
Time it takes the message to fully appear (fade-in)
fadeouttime       
Time it takes the message to fully disappear (fade-out)
channel       
Channel to use on the client
回复

使用道具 举报

发表于 2020-4-1 18:41:43 | 显示全部楼层 来自 中国
dongtianbao 发表于 2020-3-31 20:06
if ( gPlayerLevel < gNumLevels ) {
                format(message,255,"LEV:%d/%d XP:(%d/%d)",  ...


  1. set_hudmessage(0, 100, 0, 0.01, 0.13, 1, 0.1,6.0, 0.1, 0.1, -1);
  2. show_hudmessage(id,"LEV:%d/%d XP:(%d/%d)",gPlayerLevel[id], gNumLevels, gPlayerXP[id], gXPLevel[ gPlayerLevel[id]+ 1]);
复制代码
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表