建造地基6.5 點改喪屍回血

Home Home
引用 | 編輯 Mickeymouse.
2011-08-19 14:54
樓主
推文 x0
如題,請大大教我

獻花 x0
引用 | 編輯 觀眾甲
2011-08-20 02:00
1樓
  
你想改喪屍回血?
我也想改喪屍回血
别光一句話就想人幫你,誠意呢?

獻花 x0
引用 | 編輯 冷場館女僕長
2011-08-21 09:48
2樓
  
Mickeymouse.大大,有禮貌些可以嗎? 表情

獻花 x0
引用 | 編輯 絕影華
2011-10-22 13:15
3樓
  
下面是引用 上帝的右手^^ 於 2011-08-20 02:00 發表的 : 到引言文
你想改喪屍回血?
我也想改喪屍回血
别光一句話就想人幫你,誠意呢?


他跟本就連基本的禮貌都沒有啦= =

下面是引用 Mickeymouse. 於 2011-08-20 20:40 發表的 : 到引言文
100雅幣,ok?

雅幣我有很多  多100少100有分別?

以為雅幣可以解決一砌問題?

獻花 x0
引用 | 編輯 文♂
2011-10-23 13:25
4樓
  
複製程式
public NeedRecovery(id)
{
       if (!is_user_alive(id) || !zp_get_user_zombie(id))
              return PLUGIN_CONTINUE;
       
       if (cumulative[id] >= 1)
              return PLUGIN_CONTINUE;
       
       new max_health
       max_health = zp_get_zombie_health(id)
       
       if (get_user_health(id) < max_health)
       {
              cumulative[id] += 1
              
              new param[2]
              param[0] = id
              
              if (cumulative[id] == 1)
              {
                     param[1] = 0
                     set_task(get_pcvar_float(g_Time), "RecoveryRate", id, param, 2, "b")
              }
              else
              {
                     param[1] = 1
                     set_task(get_pcvar_float(g_Time), "RecoveryRate", Task_ID, param, 2)
              }
       }
       
       return PLUGIN_CONTINUE;
}

public RecoveryRate(param[2])
{
       new id = param[0]
       new deduct_times = param[1]
       
       if (!is_user_alive(id) || !zp_get_user_zombie(id))
              return PLUGIN_CONTINUE;
       
       new health = get_user_health(id)

       new max_health
       max_health = zp_get_zombie_health(id)
       
       new need_health = max_health - health
       
       if (need_health <= get_pcvar_num(g_Amount))
       {
              engfunc(EngFunc_EmitSound, id, CHAN_VOICE, "mychat/memberid_604597/post_in_mychat.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

              set_user_health(id, max_health)
              remove_task(id)
              remove_task(Task_ID)
              cumulative[id] = 0
       }
       else
       {
              set_user_health(id, health + get_pcvar_num(g_Amount))

              if (deduct_times == 1)
                     cumulative[id] = max(cumulative[id] - 1, 0)
       }
       
       return PLUGIN_CONTINUE;
}

public client_PreThink(id)
{
       if (!is_user_alive(id) || !zp_get_user_zombie(id))
              return PLUGIN_CONTINUE;
       
       if (get_gametime() - get_attack_time[id] < 0.5)
       {
              if (task_exists(id)) remove_task(id)
              if (task_exists(Task_ID)) remove_task(Task_ID)
              cumulative[id] = 0
              
              return PLUGIN_CONTINUE;
       }
       
       new speed = fm_get_speed(id)

       if (speed > floatround(240 * 0.1))
       {
              if (task_exists(id)) remove_task(id)
              if (task_exists(Task_ID)) remove_task(Task_ID)
              cumulative[id] = 0
              
              return PLUGIN_CONTINUE;
       }
       
       if (!task_exists(id))
              cumulative[id] = 0
       
       new health = get_user_health(id);
       
       if (health >= 1)
       {
              new max_health
              max_health = zp_get_zombie_health(id)
              
              if (health < max_health && cumulative[id] == 0)
                     NeedRecovery(id)
       }
       
       return PLUGIN_CONTINUE;
}

我的方法就是這了表情
話說 可是樓主不是會寫插件的嗎?表情

獻花 x0