VIP每秒恢复5HP/护甲[死亡服用]
#include <amxmodx>
#include <fun>
#include <cstrike>
#define PLUGIN_NAME "Set Vip HP"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "lovehuai"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
set_task(1.0,"run_check",422,"",0,"b")
}
public run_check(){
if (get_cvar_num("gg_replinishhealth")==0) return PLUGIN_CONTINUE
new players
new i, numofplayers, id
get_players(players, numofplayers)
for (i=0; i<numofplayers; i++){
id=players
if (!is_user_alive(id)) continue
SetHp(id)
}
return PLUGIN_CONTINUE
}
public SetHp(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_C)
{
new armor= (get_user_armor(id)) +5
new health = (get_user_health (id)) +5
if ( armor > 100) {
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
}
else {
cs_set_user_armor(id, armor, CS_ARMOR_VESTHELM)
}
if ( health > 100) {
set_user_health (id,100)
}
else {
set_user_health (id,health)
}
}
} 我的正常。。。 本帖最后由 visa567 于 2009-8-15 12:01 编辑
编译错误
每秒要做32次的巡環....較吃資源... 好东西,支持 new players头疼... 用的 什么版本?
1.811.76C??? 7# visa567
最近天天打.死亡服插件.先拿下试测一下先.谢了LZ.楼主还是个女的哦.头像.更要顶上去 用的 什么版本?
1.811.76C???
visa567 发表于 2009-8-16 13:21 http://www.dt-club.net/forum/images/common/back.gif
你用1.81试试
我的啥版本我也不清楚
我的编辑器里貌似是1.81 跟 1.76C的混合产物 顶一个:victory:
页:
[1]
2