廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 1548 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
thinn
數位造型
個人文章 個人相簿 個人日記 個人地圖
路人甲
級別: 路人甲 該用戶目前不上站
推文 x0 鮮花 x5
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6] 僵尸狂暴插件sam有点问题请求帮助!
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <fun>
#define fm_get_user_button(%1) pev(%1, pev_button)

new const g_sound_pressure[] = "zombie_plague/zombi_pressure.wav"  
new zmkillcount[33]                                  
new onrage[33]                  
new cvar_spendhp, cvar_rageduration, cvar_xspeed  
public plugin_precache()
{
precache_sound(g_sound_pressure)
return PLUGIN_CONTINUE
}




public plugin_init()
{
register_plugin("[ZP]Zombie-Rage", "1.0", "ding ding")
cvar_spendhp = register_cvar("zp_rage_spendhp", "1000")    
cvar_rageduration = register_cvar("zp_rageduration", "30")    
cvar_xspeed = register_cvar("zp_xspeed", "2.5")          
register_forward(FM_PlayerPreThink, "fw_playerprethink")
register_event("RoundTime", "roundstart", "bc")
register_event("SendAudio", "roundstart", "a", "1=0")
}

public roundstart()      
{
for ( new i = 0; i < 33; i++ )
{
if( onrage == 1 )
endrage(i)
zmkillcount = 0
}
return PLUGIN_HANDLED
}

public zp_user_infected_post(id, infector)
{
if (zp_get_user_zombie(infector))
zmkillcount[infector] += 1          
return PLUGIN_CONTINUE
}

public fw_playerprethink(id)
{
if (onrage[id] ==1)          
{                          
set_user_maxspeed(id, (pev(id, pev_maxspeed) * 2.5 * get_pcvar_num(cvar_xspeed)))   return FMRES_HANDLED
}
else if (!is_user_alive(id))
return FMRES_IGNORED
else if (!zp_get_user_zombie(id))
return FMRES_IGNORED
else
{
new button = fm_get_user_button(id)                  
if (button & IN_USE && (zmkillcount[id] >= 3) && pev(id, pev_health) > get_pcvar_num(cvar_spendhp) )
{  
onrage[id] = 1        
engfunc(EngFunc_EmitSound, id, CHAN_VOICE, g_sound_pressure, 1.0, ATTN_NORM, 0, PITCH_NORM)
set_pev(id, pev_health, (pev(id, pev_health)*1.0 - get_pcvar_num(cvar_spendhp)))
set_task(get_pcvar_num(cvar_rageduration)*1.0, "endrage", id)    
return FMRES_HANDLED
}
}
return FMRES_IGNORED
}

public endrage(id)        
{
onrage[id] = 0
return PLUGIN_HANDLED
}



獻花 x0 回到頂端 [樓 主] From:四川 | Posted:2009-06-06 00:27 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.013804 second(s),query:15 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言