|
#include <amxmodx>
#include <cstrike>
#include <amxmisc>
#include <fun>
#define PLUGIN_NAME "buyhp"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "M4"
public plugin_init()
{
register_plugin(PLUGIN_NAME ,PLUGIN_VERSION, PLUGIN_AUTHOR);
register_clcmd("say_team /hp","amx_hp")
register_clcmd("say /hp","amx_hp")
register_cvar("amx_hp_cost","16000")
register_cvar("amx_hp_number","900")
}
public plugin_precache()
{
precache_sound("warcraft3/death_wpx.wav")
}
public amx_hp(id)
{
new Cost = get_cvar_num("amx_hp_cost")
new money = cs_get_user_money(id)
new life = get_user_health(id)
new heal_hp = get_cvar_num("amx_hp_number")
if(!is_user_alive(id)) {
client_print(id,print_chat,"你死了不能买血")
}
if(money<Cost) {
client_print(id,print_chat,"连%d元钱都没钱的乞丐" ,Cost)
}
else {
cs_set_user_money(id, money-Cost)
set_user_health(id, life + heal_hp)
set_hudmessage(0, 255, 255, -1.0, -1.0, 0, 6.0, 3.0)
show_hudmessage(id, "大量多HP都卖给你啦!好好享受")
}
emit_sound(id,CHAN_ITEM, "chickenrun/death_wpx.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
}
音乐文件放进warcraft3文件夹里面 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|