引用 | 編輯
[NiGhT]-妖
2014-10-08 07:02 |
2樓
▲ ▼ |
#include <amxmodx>
#include <fakemeta> public plugin_init() { register_plugin("heary", "0.4", "clester993@gmail.com") } public plugin_precache() { precache_sound("player/heartbeat1.wav") } public playsound(id) { static health; health = get_user_health(id); if (health <= 20) { engfunc(EngFunc_EmitSound, id, CHAN_WEAPON, "player/heartbeat1.wav", 1.0, 0.4, 0, PITCH_NORM) } } 寫錯了什麼? x0 |
引用 | 編輯
弒血
2014-10-08 17:48 |
3樓
▲ ▼ |
下面是引用 [NiGhT]-妖 於 2014-10-08 07:02 發表的 : x0 |
引用 | 編輯
[NiGhT]-妖
2014-10-08 18:13 |
4樓
▲ |
#include <amxmodx>
#include <fakemeta> public plugin_init() { register_plugin("heary", "0.4", "clester993@gmail.com") register_message(get_user_msgid("Health"), "message_Health") } public plugin_precache() { precache_sound("player/heartbeat1.wav") } public message_Health(msg_id, msg_dest, msg_entity) { new Float:fHealth pev(msg_id, pev_health, fHealth) if (Health < 20) playsound(msg_id) } public playsound(msg_id) { engfunc(EngFunc_EmitSound, msg_id, CHAN_WEAPON, "player/heartbeat1.wav", 1.0, 0.4, 0, PITCH_NORM) } x0 |