插件信息坐标显示冲突问题
本帖最后由 dongtianbao 于 2020-3-30 16:49 编辑2个插件显示信息的位置都是左下角同一个位置坐标,一个显示的时候另外一个就被覆盖,不显示了,只能显示一个信息,如何修改其中一个纵坐标向上一点呢? 这个好像不是 hud_message 吧 本帖最后由 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 < gNumLevels ) {
format(message,255,"LEV:%d/%d XP:(%d/%d)", gPlayerLevel, gNumLevels, gPlayerXP, gXPLevel[ gPlayerLevel+ 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,只找到这一句代码,可不知道坐标如何改 dongtianbao 发表于 2020-3-30 21:10
// OK Test What Level this Fool is
testLevel(id)
StatusText
是没法改坐标的,只能通过客户端参数 hud_centerid 0 或者 1 来调整 本帖最后由 dongtianbao 于 2020-3-31 20:08 编辑
k1nader 发表于 2020-3-31 19:15
是没法改坐标的,只能通过客户端参数 hud_centerid 0 或者 1 来调整
if ( gPlayerLevel < gNumLevels ) {
format(message,255,"LEV:%d/%d XP:(%d/%d)", gPlayerLevel, gNumLevels, gPlayerXP, gXPLevel[ gPlayerLevel+ 1] )
这一句不用format,而是用set_hudmessage的话怎么写呢,试着了几个都不显示
hud_centerid 0 或者 1 来调整,只能显示在中间或者左下角吧,中间影响视线,左下角和其他插件冲突 dongtianbao 发表于 2020-3-31 20:06
if ( gPlayerLevel < gNumLevels ) {
format(message,255,"LEV:%d/%d XP:(%d/%d)",...
format 只是格式化字符串的
set_hudmessage(255, 0, 0, 0.48, 0.64, 0, 6.0, 0.0, 0.1, 0.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 dongtianbao 发表于 2020-3-31 20:06
if ( gPlayerLevel < gNumLevels ) {
format(message,255,"LEV:%d/%d XP:(%d/%d)",...
set_hudmessage(0, 100, 0, 0.01, 0.13, 1, 0.1,6.0, 0.1, 0.1, -1);
show_hudmessage(id,"LEV:%d/%d XP:(%d/%d)",gPlayerLevel, gNumLevels, gPlayerXP, gXPLevel[ gPlayerLevel+ 1]);
页:
[1]