廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 1576 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為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.030944 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言