广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 1639 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
q26024800
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x5
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[1.6][插件] [求助]关于Show S*nc HudMsg显示闪烁问题
小弟目前是个插件新手 从小逛数位的插件区到现在开始学习自己写表情            

最近写插件有多hud显示的需求 有两个常驻显示 三个不同时段显示(回合中与回合结束) 不同时段的hud会碰到闪烁问题

有去找过教学区但没有找到相关资讯(也可能我找的不够多

查国外的论坛有说到可以使用此方法 但看完了
ShowSyncHudMsg的API解释还是一知半解...

想请问一下关于ShowSyncHudMsg的原理及用法 或是有能类似clear HUD的方法

希望目前版上还有大神能解惑QQ


不知道为啥标题打不了 "y" @@


献花 x0 回到顶端 [楼 主] From:台湾中华电信股份有限公司 | Posted:2022-06-13 06:01 |
弑血
个人头像
个人文章 个人相簿 个人日记 个人地图
社区建设奖 特殊贡献奖 创作大师奖
小有名气
级别: 小有名气 该用户目前不上站
推文 x108 鲜花 x237
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 q26024800 于 2022-06-13 06:01 发表的 [求助]关于Show S*nc HudMsg显示闪烁问题: 到引言文
小弟目前是个插件新手 从小逛数位的插件区到现在开始学习自己写表情              
最近写插件有多hud显示的需求 有两个常驻显示 三个不同时段显示(回合中与回合结束) 不同时段的hud会碰到闪烁问题
有去找过教学区但没有找到相关资讯(也可能我找的不够多
查国外的论坛有说到可以使用此方法 但看完了
ShowSyncHudMsg的API解释还是一知半解...
想请问一下关于ShowSyncHudMsg的原理及用法 或是有能类似clear HUD的方法
.......



amxmodx.inc 内就有了



/**
 * Creates a HUD Synchronization Object.  Create one of these
 *  for each section of the screen that contains overlapping HUD messages.
 * For example, if you use both sides of the screen to display three messages
 *  that can potentially overlap, each side counts as a synchronizable area.
 * You can then use ShowSyncHudMsg() to correctly synchronize displaying the 
 *  HUD message with any other messages potentially in its class.  Note that this
 *  does not yet do anything like reserve screen area, its sole purpose is to be
 *  able to wipe an old message on an auto-channel and ensure that it will not
 *  clear a message from another plugin.
 * The parameters are kept blank for future use.
 */
native CreateHudSyncObj(num=0, ...);


/**
 * Displays a synchronized HUD message.  This will check that your
 *  HUD object has its previous display on the screen cleared before
 *  it proceeds to write another.  It will only do this in the case
 *  of that channel not having been cleared already.
 * Target can be 0 for all players or 1-get_maxplayers().
 * You must use set_hudmessage, although the channel parameter is 
 *  entirely ignored.
 */
native ShowSyncHudMsg(target, syncObj, const fmt[], any:...);


/**
 * Clears the display on a HudSync Object.  This is essentially the same
 *  thing as: ShowSyncHudMsg(x, y, ""), except doing that would send
 *  out two messages and use up another channel.  This re-uses the last
 *  channel and clears it at the same time.
 * Note: for this you do not have to use set_hudmessage().
 * Note: target can be 0 for all players.
 */
native ClearSyncHud(target, syncObj);



目前传授教学&有兴趣者可以问我
BOT瞄准攻击NPC&模仿事件触发计算出场&新增地图重生位置等等
已修复entity的attachment错误问题,开始尝试写出各种npc_boss成品
按这里检视影片,登入论坛可以直接观看
按这里检视影片,登入论坛可以直接观看
按这里检视影片,登入论坛可以直接观看
按这里检视影片,登入论坛可以直接观看
献花 x0 回到顶端 [1 楼] From:台湾中华电信股份有限公司 | Posted:2022-06-23 00:50 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.026655 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言