zxzyman
|
分享:
▲
▼
下面是引用 op47 于 2014-04-12 15:40 发表的 :
这个真的能吗? 这个才可以
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("StatusText"), _, index); write_byte(0); write_string("Some msg"); message_end(); 他好像是要问左下角,显示生命和护甲的字 要怎么做出来..... 但是... 我只知道HUD... 其它的还是要找上面几位大大了 复制程式
//颜色
const HUD_R = 255
const HUD_G = 255
const HUD_B = 255
//座标
const Float:HUD_X = 0.02
const Float:HUD_Y = 0.9
new g_MsgSync
public plugin_init()
{
g_MsgSync = CreateHudSyncObj()
}
public HUD_Show(index)
{
new red, green, blue
red = HUD_R
green = HUD_G
blue = HUD_B
set_hudmessage(red, green, blue, HUD_X, HUD_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(index, g_MsgSync, "生命: %d 护甲: %d",get_user_health(index), get_user_armor(index))
}
set_task(0.1, "HUD_Show")
参考看看...
[ 此文章被zxzyman在2014-04-12 17:49重新编辑 ]
|
UWC3NG 终极魔兽-次世代 (繁体中文版) -按此连结-
|
x0
[3 楼]
From:未知地址 | Posted:2014-04-12 17:25 |
|
|
zxzyman
|
分享:
▲
▼
下面是引用 op47 于 2014-04-12 19:50 发表的 :
我不是答了吗? message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("StatusText"), _, index); write_byte(0); write_string("Some msg"); message_end();
"Some msg" 就是要显示的文字 对不起.. 我无知~ 因为您回答的上面几句.. 有些笼统 我也在学习中 不了解 刚刚作了功课 寻找到了相关的讯息 也明白是怎么一回事了 但您打的应该本身已经有了.... (因为图中 已能显示出讯息...) 所以楼主可能是要知道怎么显示 生命 盔甲 new Msg [255]
format(Msg, 254, "生命: %d 护甲: %d",get_user_health(id), get_user_armor(id) )
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("StatusText"), {0, 0, 0}, id); write_byte(0); write_string("Msg"); message_end();
[ 此文章被zxzyman在2014-04-12 21:27重新编辑 ]
|
UWC3NG 终极魔兽-次世代 (繁体中文版) -按此连结-
|
x1
[5 楼]
From:未知地址 | Posted:2014-04-12 20:30 |
|
|
弑血
|
分享:
▲
▼
打开ZP4.3收寻关键字 ShowHUD 之后 找到: 复制程式
// Spectating someone else?
if (id != ID_SHOWHUD)
{
// Show name, health, class, and ammo packs
set_hudmessage(255, 255, 255, HUD_SPECT_X, HUD_SPECT_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L %s^nHP: %d - %L %s - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id], pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id])
}
else
{
// Show health, class and ammo packs
set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L: %d - %L %s - %L %d", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD])
}
把HUD_SPECT_X and HUD_SPECT_Y and g_MsgSync2 删掉? 格档掉 都可以 接下来 把这段 贴进去 复制程式
if (id != ID_SHOWHUD)
{
// Show name, health, class, and ammo packs
new_client_print(id, "名称:%s 血量: %d 群组: %s 子弹包: %d", g_playername[id], pev(id, pev_health), class, g_ammopacks[id])
/*set_hudmessage(255, 255, 255, HUD_SPECT_X, HUD_SPECT_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L %s^nHP: %d - %L %s - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id], pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id])*/
}
else
{
// Show health, class and ammo packs
new_client_print(id, "血量: %d 群组: %s 子弹包: %d", pev(id, pev_health), class, g_ammopacks[id])
/*set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L: %d - %L %s - %L %d", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD])*/
}
排得有点乱..请见谅..
[ 此文章被s8720419在2014-04-13 02:28重新编辑 ]
|
|
x1
[8 楼]
From:台湾中华电信股份有限公司 | Posted:2014-04-13 01:23 |
|
|
|