广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 3089 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
m8966338
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x6 鲜花 x10
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[1.6][插件] 如何用hud文本显示带入的值?
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 回到顶端 [楼 主] From:台湾中华电信股份有限公司 | Posted:2012-06-22 22:47 |
我爱如花
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x18 鲜花 x42
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

show_hudmessage(id, "%d", money)


献花 x0 回到顶端 [1 楼] From:未知地址 | Posted:2012-06-23 00:21 |

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