|
发表于 2004-12-25 22:31:41
|
显示全部楼层
|阅读模式
来自 中国–河北–衡水–深州市
本人把买血插件增强了一下,在混战服务器很受欢迎哦~大家用用看~
/* AMX Mod script.
*
* (c) 2003, Potter
* This file is provided as is (no warranties).
*/
#include <amxmod>
#include <fun>
public plugin_init(){
register_plugin("BuyHealth","0.9","default")
register_cvar("amx_healthprice","1500")
register_clcmd("amx_buyhealth","buyHealth",0,"amx_buyhealth")
}
public buyHealth(id){
new health=get_user_health(id)
new money=get_user_money(id)
new price=get_cvar_num("amx_healthprice")
if (is_user_alive(id)==1 && money<1500) {
new name[32]
get_user_name(id,name,31)
client_print(id,print_chat,"[医院信息] %s 这么穷也想补血,拉倒吧!(补血请按 ‘L’ 键 1500$补满血)",name)
return PLUGIN_HANDLED
}
if (is_user_alive(id)==1 && health==100) {
new name[32]
get_user_name(id,name,31)
client_print(id,print_chat,"[医院信息] %s 不受伤来医院干什么?捐精啊??(补血请按 ‘L’ 键 1500$补满血)",name)
return PLUGIN_HANDLED
}
if (is_user_alive(id)==0) {
new name[32]
get_user_name(id,name,31)
client_print(id,print_chat,"[医院信息] %s 你已经在医院领到死亡证明了,还想补血?我看还是给你烧点纸好了!",name)
return PLUGIN_HANDLED
}
if (is_user_alive(id)==1 && health<100 && money>=price) {
set_user_money(id,money-price)
set_user_health(id,100)
new name[32]
get_user_name(id,name,31)
client_print(0,print_chat,"[医院信息] %s 用了1500$做了个手术全好了,又恢复了活力,幸好没伤到小弟弟。",name)
}
return PLUGIN_HANDLED
}
public client_connect(id){
client_cmd(id,"bind l amx_buyhealth")
return PLUGIN_CONTINUE
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|