广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 11113 个阅读者
 
<<   1   2  下页 >>(共 2 页)
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
killer200
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x6
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[1.6][插件] 请求写插件高手帮小弟一个忙><"
请问如何做到视窗的右下角,用(set_hudmessage+show_hudmessage),令到在玩的时候能有自已的血量呢




我这样做对吗????







#include <amxmodx>
#include <fakemeta>
#include <fun>


public plugin_init()
{
register_plugin("Health","1.0","godkiller")
register_event("RoundTime", "eNewRound", "bc")
}
public eNewRound(id)
{
new name[32], pid = read_data(2)
get_user_name(pid, name, 31)
set_hudmessage(0,255,0,0.3,0.53,0,3.0,6.0,0.5,0.15,3)
show_hudmessage(id, "HP: %s", pev(pid, pev_health))
}




请帮小弟><表情



My name is killer200~~~~~~~~~~~~
献花 x0 回到顶端 [楼 主] From:香港 | Posted:2012-11-18 08:15 |
不能正视你 会员卡
数位造型
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x1 鲜花 x10
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

试用这个吧
我找了1个插件修改过的
我修改了没有指令(自动开启)
这个是显示队友的HP

如果你想修改只显示自己
又或者是自己和敌人的
我再帮你修改

#include <amxmodx>
new friend[33]
public set_team(id){
 friend[id] = read_data(2)

public hide_status(id){
 set_hudmessage(0,0,0,0.0,0.0,0, 0.0, 0.01, 0.0, 0.0, 4)
 show_hudmessage(id,"")
}
public show_status(id){
 new name[32],pid = read_data(2)
 get_user_name(pid,name,31)
 if (friend[id] == 1 ){ /* friend */
 set_hudmessage(0,50,255,0.03,0.90,1, 0.01, 3.0, 0.01, 0.01, 4) /* blue */
 show_hudmessage(id,"队友(%s)血量:%d",name,get_user_health(pid)) /* wpnname[7] - trunk weapon_ */
 }
 else {
 set_hudmessage(255,50,0,0.03,0.90,1, 0.01, 3.0, 0.01, 0.01, 4) /* red */
 show_hudmessage(id,"敌人(%s)血量:%d",name,get_user_health(pid)) /* wpnname[7] - trunk weapon_ */
 }
 return PLUGIN_CONTINUE
}
public plugin_init(){
 register_plugin("aim info","0.9.2","default")
 register_event("StatusValue","set_team","be","1=1")
 register_event("StatusValue","show_status","be","1=2","2!0")
 register_event("StatusValue","hide_status","be","1=1","2=0")
 return PLUGIN_CONTINUE
}


本帖包含附件
zip show_hp.zip   (2022-06-09 14:20 / 3 KB)   下载次数:1


[ 此文章被你的人在2012-11-19 18:20重新编辑 ]


献花 x0 回到顶端 [1 楼] From:美国ATT用户 | Posted:2012-11-19 18:02 |
killer200
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x6
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 你的人 于 2012-11-19 18:02 发表的 : 到引言文
试用这个吧
我找了1个插件修改过的
我修改了没有指令(自动开启)
这个是显示队友的HP
如果你想修改只显示自己
.......



我是想像ZP一样,在左/右下角显示血量


My name is killer200~~~~~~~~~~~~
献花 x0 回到顶端 [2 楼] From:香港 | Posted:2012-11-19 19:51 |
killer200
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x6
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

还有!!须要长期显示血量啊!!!


My name is killer200~~~~~~~~~~~~
献花 x0 回到顶端 [3 楼] From:香港 | Posted:2012-11-19 19:57 |
不能正视你 会员卡
数位造型
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x1 鲜花 x10
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 killer200 于 2012-11-19 19:57 发表的 : 到引言文
还有!!须要长期显示血量啊!!!


没玩过ZP
大多玩普通模式= =
你可以给我图片吗?
不知是怎样


献花 x0 回到顶端 [4 楼] From:美国ATT用户 | Posted:2012-11-19 20:06 |
killer200
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x6
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

图 1.



下面是引用 你的人 于 2012-11-19 20:06 发表的 : 到引言文
 

没玩过ZP
大多玩普通模式= =
你可以给我图片吗?
不知是怎样


My name is killer200~~~~~~~~~~~~
献花 x0 回到顶端 [5 楼] From:香港 | Posted:2012-11-20 18:24 |
andyt0621
个人文章 个人相簿 个人日记 个人地图
小有名气
级别: 小有名气 该用户目前不上站
推文 x24 鲜花 x167
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

复制程式
// Client joins the game
public client_putinserver(id)
{
       if (!is_user_bot(id))
       {
              // Set the custom HUD display task
              set_task(1.0, "ShowHUD", id, _, _, "b")
       }
}
// Show HUD Task
public ShowHUD(id)
{
       ... ...
       //your code
}
以上摘录于ZP

楼主的Code只能在New Round时出现一阵子的 =.=


献花 x0 回到顶端 [6 楼] From:香港网上行 | Posted:2012-11-20 20:21 |
killer200
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x0 鲜花 x6
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

...我看完后还不太明白


My name is killer200~~~~~~~~~~~~
献花 x0 回到顶端 [7 楼] From:香港 | Posted:2012-11-21 17:28 |
不能正视你 会员卡
数位造型
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x1 鲜花 x10
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 killer200 于 2012-11-21 17:28 发表的 : 到引言文
...我看完后还不太明白



我另外找来这个
试一试用

客户端指令
say /health
- 显示玩家HP 


有源码


OP指令
health_on <0|1>
0=插件关闭
1=插件开启 
health_time (秒)
- 显示血量时间(秒) 预设600秒(10分钟)
health_color <0|1|2>
- 显示血量颜色 预设2
0=白色 
1=自定 (须使用health_custom 指令)
// ZP生命值显示颜色(R:0 G:0 B:255) (即是health_custom 0 0 255)
2=随机
health_custom <RRR GGG BBB> //预设(0 255 0, 设定时必须用"0 255 0" 开引号) 
显示RGB颜色
RRR= 红色代码(0-255)
GGG=绿色代码(0-255) 
BBB=蓝色代码(0-255) 
health_effects <0|1|2>
显示文字效果
0=没有效果 
1= 打印效果
2=闪烁效果
health_always <0|1>
- 是否经常显示hp
0=只显示1次(倒数后结束) 
1=经常显示hp(重新开局都会显示)


本帖包含附件
zip health_display.zip   (2022-06-09 14:20 / 7 KB)   下载次数:0


[ 此文章被你的人在2012-11-22 12:48重新编辑 ]


献花 x0 回到顶端 [8 楼] From:美国ATT用户 | Posted:2012-11-22 09:30 |
观众甲
个人头像
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖
小有名气
级别: 小有名气 该用户目前不上站
推文 x318 鲜花 x963
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

复制程式
#include <amxmodx>
#include <fun>

public plugin_init()
{
   register_plugin("123", "1.0", "123")
}

public client_putinserver(id)
{
   check(id+2222)
}

public check(id)
{
   id -= 2222
   set_hudmessage(0,255,0,0.3,0.53,0,3.0,6.0,0.5,0.15,3)
   show_hudmessage(id, "HP: %d", get_user_health(id))
   set_task(0.4, "check", id+2222)
}
有错告知


献花 x0 回到顶端 [9 楼] From:美国 | Posted:2012-11-22 15:23 |

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