|
- #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[32]
- 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)
- }
- }
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|