廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 2461 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
mr.wai
個人文章 個人相簿 個人日記 個人地圖
路人甲
級別: 路人甲 該用戶目前不上站
推文 x0 鮮花 x0
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][插件] 有沒有大大可以解決問題(sma)
這個sma檔是數位柚某位大大寫的 但我改了生命就不能完成轉換amxx檔 有何解決方法?


#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <zombieplague>
#define SUPPORT_BOT_TO_USE //支援BOT使用.(在最前面加上 // 即取消對BOT的技援)
#define STAND_IN_WALL  //Hunter可以暫時停在牆壁上.(在最前面加上 // 即取消此技援)
#define STR_T 32
#define MAX_PLAYERS 32
new const zclass_name[] = { "Hunter" } // name
new const zclass_info[] = { "擅長長跳和爬牆" } // description
new const zclass_model[] = { "zombie_hunter" } // model
new const zclass_clawmodel[] = { "v_hunter_hands.mdl" } // claw model
const zclass_health = 1800 // health
const zclass_speed = 250 // speed
const Float:zclass_gravity = 0.8 // gravity
const Float:zclass_knockback = 2.0 // knockback
new g_zclass_hunter
new cvar_speed, cvar_jump_force, cvar_jump_height
new Float:hunter_jump[33], Float:hunter_sound_time[33], Float:g_wallorigin[33][3]
new bool:hunter_sound[33], bool:take_damage[33]
new const HunterAttack[][] = {"zombie_plague/Hunter_Warn_1.wav","zombie_plague/Hunter_Warn_2.wav"}
new HunterAttackSound[33]
public plugin_init()
{
 register_plugin("[ZP] Class:Hunter Zombie","1.0","MyChat數位男女會員:a7811311622")
 cvar_speed = register_cvar("zp_hunter_climb_speed", "250")  //爬牆的速度
 cvar_jump_force = register_cvar("zp_hunter_jump_force", "500")  //長跳的前進速度
 cvar_jump_height = register_cvar("zp_hunter_jump_height", "300") //長跳的跳躍高度
 register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
 RegisterHam(Ham_Touch, "player", "cheese_player_touch", 1)
 RegisterHam(Ham_Player_PreThink, "player", "cheese_player_prethink", 1)
}
public plugin_precache()
{
 for (new i = 0; i < sizeof HunterAttack; i++)
  precache_sound(HunterAttack)
 g_zclass_hunter = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public zp_user_infected_post(id, infector)
{
 if (zp_get_user_zombie_class(id) == g_zclass_hunter)
 {
  hunter_sound[id] = false
  take_damage[id] = false
  client_print(id, print_chat, "[ZP] Hunter可使用長跳且靠近牆壁時離地後再前進或後退即可爬牆.")
 }
}
public cheese_player_touch(id, world)
{
 if(!is_user_alive(id))
  return HAM_IGNORED
 
 new classname[STR_T]
 pev(world, pev_classname, classname, (STR_T-1))
 
 if(equal(classname, "worldspawn") || equal(classname, "func_wall") || equal(classname, "func_breakable"))
  pev(id, pev_origin, g_wallorigin[id])
 
 return HAM_IGNORED
}
public client_damage(attacker,victim)
{
 static Float:origin[3]
 pev(victim, pev_origin, origin)
 if((zp_get_user_zombie_class(victim) == g_zclass_hunter) && zp_get_user_zombie(victim) && !zp_get_user_zombie(attacker))
 {
  if(get_distance_f(origin, g_wallorigin[victim]) <= 25.0 && !(pev(victim,pev_flags) & FL_ONGROUND))
  {
   take_damage[victim] = true
   set_task(1.0, "return_speed", victim)
  }
 }
}
public return_speed(id)
{
 take_damage[id] = false
 remove_task(id)
}
public fw_PlayerPreThink(id)
{
 if (!is_user_alive(id) || zp_get_user_nemesis(id) || zp_get_user_survivor(id))
  return PLUGIN_CONTINUE
 if (!zp_get_user_zombie(id) || (zp_get_user_zombie_class(id) != g_zclass_hunter))
  return PLUGIN_CONTINUE
 static Float:origin[3], Float:velocity[3], force, height, button, oldbutton
 pev(id, pev_origin, origin)
 button = pev(id, pev_button)
 oldbutton = pev(id, pev_oldbuttons)
 force = get_pcvar_num(cvar_jump_force)
 height = get_pcvar_num(cvar_jump_height)
 HunterAttackSound[id] = random_num(0, sizeof HunterAttack - 1)
 if((button & IN_JUMP) && (button & IN_DUCK) && !((oldbutton & IN_JUMP) && (oldbutton & IN_DUCK)))
 {
  if((pev(id, pev_flags) & FL_ONGROUND) && fm_get_speed(id) >= 40)
  {
   if (hunter_sound[id] && get_gametime() - hunter_sound_time[id] >= 1.0)
    hunter_sound[id] = false
   if(!hunter_sound[id])
   {
    hunter_sound_time[id] = get_gametime()
    hunter_sound[id] = true
    engfunc(EngFunc_EmitSound, id, CHAN_VOICE, HunterAttack[HunterAttackSound[id]], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
   }
   if (get_gametime() - hunter_jump[id] < 0.0)
    return PLUGIN_CONTINUE
   hunter_jump[id] = get_gametime()
   velocity_by_aim(id, force, velocity)
   velocity[2] = float(height)
   set_pev(id, pev_velocity, velocity)
  }
  if(!(pev(id, pev_flags) & FL_ONGROUND) && get_distance_f(origin, g_wallorigin[id]) <= 50.0 && !take_damage[id])
  {
   if (hunter_sound[id] && get_gametime() - hunter_sound_time[id] >= 1.0)
    hunter_sound[id] = false
   if(!hunter_sound[id])
   {
    hunter_sound_time[id] = get_gametime()
    hunter_sound[id] = true
    engfunc(EngFunc_EmitSound, id, CHAN_VOICE, HunterAttack[HunterAttackSound[id]], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
   }
   if (get_gametime() - hunter_jump[id] < 0.25)
    return PLUGIN_CONTINUE
   hunter_jump[id] = get_gametime()
   velocity_by_aim(id, force, velocity)
   velocity[2] = float(height)
   set_pev(id, pev_velocity, velocity)
  }
 }
 #if defined SUPPORT_BOT_TO_USE
 if (is_user_bot(id))
 {
  new target, body
  get_user_aiming(id, target, body)
  if ((1 <= target <= 32) && is_user_alive(target) && !zp_get_user_zombie(target))
  {
   if((pev(id, pev_flags) & FL_ONGROUND) && fm_get_speed(id) >= 40)
   {
    if (hunter_sound[id] && get_gametime() - hunter_sound_time[id] >= 1.0)
     hunter_sound[id] = false
    if(!hunter_sound[id])
    {
     hunter_sound_time[id] = get_gametime()
     hunter_sound[id] = true
     engfunc(EngFunc_EmitSound, id, CHAN_VOICE, HunterAttack[HunterAttackSound[id]], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
    }
    if (get_gametime() - hunter_jump[id] < 0.0)
     return PLUGIN_CONTINUE
    hunter_jump[id] = get_gametime()
    velocity_by_aim(id, force, velocity)
    velocity[2] = float(height)
    set_pev(id, pev_velocity, velocity)
   }
   if(!(pev(id, pev_flags) & FL_ONGROUND) && get_distance_f(origin, g_wallorigin[id]) <= 50.0 && !take_damage[id])
   {
    if (hunter_sound[id] && get_gametime() - hunter_sound_time[id] >= 1.0)
     hunter_sound[id] = false
    if(!hunter_sound[id] && fm_get_speed(id) >= 40)
    {
     hunter_sound_time[id] = get_gametime()
     hunter_sound[id] = true
     engfunc(EngFunc_EmitSound, id, CHAN_VOICE, HunterAttack[HunterAttackSound[id]], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
    }
    if (get_gametime() - hunter_jump[id] < 0.5)
     return PLUGIN_CONTINUE
    hunter_jump[id] = get_gametime()
    velocity_by_aim(id, force, velocity)
    velocity[2] = float(height)
    set_pev(id, pev_velocity, velocity)
   }
  }
  return PLUGIN_CONTINUE
 }
 #endif
 return PLUGIN_CONTINUE
}
public cheese_player_prethink(id)
{
 if(!is_user_alive(id) || !zp_get_user_zombie(id))
  return HAM_IGNORED
 if(zp_is_nemesis_round() || zp_get_user_zombie_class(id) != g_zclass_hunter)
  return HAM_IGNORED
 
 static Float:origin[3], Float:velocity[3], button
 pev(id, pev_origin, origin)
 button = pev(id, pev_button)
 #if defined STAND_IN_WALL
 if(get_distance_f(origin, g_wallorigin[id]) <= 25.0 && !(pev(id,pev_flags) & FL_ONGROUND))
  if(!(button & IN_JUMP) && !((button & IN_JUMP) && (button & IN_DUCK)))
   set_pev(id, pev_velocity, Float:{0.0,0.0,0.0})
 #endif
 if((button & IN_FORWARD) && !((button & IN_FORWARD) && (button & IN_JUMP)) && !((button & IN_JUMP) && (button & IN_DUCK)))
 {
  if(get_distance_f(origin, g_wallorigin[id]) <= 25.0 && !(pev(id,pev_flags) & FL_ONGROUND))
  {
   if(take_damage[id])
    velocity_by_aim(id, get_pcvar_num(cvar_speed)/10, velocity)
   else
    velocity_by_aim(id, get_pcvar_num(cvar_speed), velocity)
   fm_set_user_velocity(id, velocity)
  }
 }
 else if((button & IN_BACK) && !((button & IN_BACK) && (button & IN_JUMP)) && !((button & IN_JUMP) && (button & IN_DUCK)))
 {
  if(get_distance_f(origin, g_wallorigin[id]) <= 25.0 && !(pev(id,pev_flags) & FL_ONGROUND))
  {
   if(take_damage[id])
    velocity_by_aim(id, -get_pcvar_num(cvar_speed)/10, velocity)
   else
    velocity_by_aim(id, -get_pcvar_num(cvar_speed), velocity)
   fm_set_user_velocity(id, velocity)
  }
 }
 #if defined SUPPORT_BOT_TO_USE
 if (is_user_bot(id))
 {
  if(get_distance_f(origin, g_wallorigin[id]) > 25.0)
   return HAM_IGNORED
  new target, body
  get_user_aiming(id, target, body) //檢查是否正在瞄準某個目標
  if ((1 <= target <= 32) && is_user_alive(target) && !zp_get_user_zombie(target)) //檢查是否是有效的目標
  {
   new iOrigin1[3], iOrigin2[3]
   get_user_origin(id, iOrigin1)
   get_user_origin(target, iOrigin2)
   
   if (pev(id,pev_flags) & FL_ONGROUND)
   {
    if (iOrigin2[2] - iOrigin1[2] >= 60)
     fm_set_user_jump_velocity(id, 300)
   }
   else
   {
    if(iOrigin2[2] > iOrigin1[2] && iOrigin2[2] - iOrigin1[2] >= 30)
    {
     if(take_damage[id])
      velocity_by_aim(id, get_pcvar_num(cvar_speed)/10, velocity)
     else
      velocity_by_aim(id, get_pcvar_num(cvar_speed), velocity)
     fm_set_user_velocity(id, velocity)
    }
    else if (iOrigin2[2] < iOrigin1[2]  && iOrigin1[2] - iOrigin2[2] >= 30)
    {
     if(take_damage[id])
      velocity_by_aim(id, -get_pcvar_num(cvar_speed)/10, velocity)
     else
      velocity_by_aim(id, -get_pcvar_num(cvar_speed), velocity)
     fm_set_user_velocity(id, velocity)
    }
   }
  }
 }
 #endif
 return HAM_IGNORED
}
stock fm_set_user_jump_velocity(index, jump_height)
{
 static Float:velocity[3]
 pev(index, pev_velocity, velocity)
 velocity[2] = float(jump_height)
 set_pev(index, pev_velocity, velocity)
 
 return 1;
}
#if defined SUPPORT_BOT_TO_USE
new Debug
public client_putinserver(id)

 if(Debug == 1)return
 new classname[32]
 pev(id,pev_classname,classname,31)
 if(!equal(classname,"player"))
 {
  Debug=1
  set_task(0.0,"_Debug",id)
 }
}
public _Debug(id)
{
 RegisterHamFromEntity(Ham_Touch,id,"cheese_player_touch")
 RegisterHamFromEntity(Ham_Player_PreThink,id,"cheese_player_prethink", 1)
}
#endif


[ 此文章被mr.wai在2010-08-19 21:44重新編輯 ]



獻花 x0 回到頂端 [樓 主] From:未知地址 | Posted:2010-08-19 21:38 |
t7950225 手機
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x5 鮮花 x45
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

你有用EmEditor 3.28改SMA的嗎 因為這個插件我也有下載 改完血也正常轉


知者不言,言者不知
獻花 x0 回到頂端 [1 樓] From:台灣中華電信 | Posted:2010-08-19 21:45 |
mr.wai
個人文章 個人相簿 個人日記 個人地圖
路人甲
級別: 路人甲 該用戶目前不上站
推文 x0 鮮花 x0
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

沒有 請問你可不可以幫我改800血 謝謝你表情


獻花 x0 回到頂端 [2 樓] From:未知地址 | Posted:2010-08-19 21:47 |
t7950225 手機
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x5 鮮花 x45
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

可以 等等私信給你(怕有人不勞而獲)


知者不言,言者不知
獻花 x0 回到頂端 [3 樓] From:台灣中華電信 | Posted:2010-08-19 22:09 |

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