广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 2482 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为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.079043 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言