如何用hud文本顯示帶入的值?

Home Home
引用 | 編輯 m8966338
2012-06-22 22:47
樓主
推文 x0
new money = cs_get_user_money(id)
我將美金代入money這代數中
再用

set_hudmessage(255, 0, 0, 0.36, 0.54, 0, 6.0, 12.0)
show_hudmessage(id, money)
顯示帶入的數
但是就偏偏會出現錯誤
整個寫起來是這樣
複製程式

#include <amxmodx>
#include <cstrike>
#include <fun>


public plugin_init()
{
register_plugin("testing", "1.0", "Testing")
register_clcmd("say /test", "test")
}


public test(id)
{
new money = cs_get_user_money(id) //將money代入cs_get_user_money, cs_get_user_money即是玩家在CS的美金
if( money >= 0) //如果玩家的美金不小於0則執行以下動作
{
set_hudmessage(255, 0, 0, 0.36, 0.54, 0, 6.0, 12.0)
show_hudmessage(id, money)




}
else // 如果不符合以上條件
{
client_print(id, print_chat, "您的錢是負的")


}
}






獻花 x0
引用 | 編輯 我愛如花
2012-06-23 00:21
1樓
  
show_hudmessage(id, "%d", money)

獻花 x0