a7810236
|
分享:
▼
x0
|
[1.6] 高手幫修正隱形喪屍的BUG
高手幫修正隱形喪屍的BUG 這隻一出生就是隱形"30" 但是一旦被冷凍彈 冰到後 他就完全現形了.. 變成沒用的隱形喪失= ="
請求哪位高手會改原碼 看一下BUG出在哪吧!
/*=============================================================================== / / / [ZP] Class : Ghost Zombie / ( Another Zombie ) / by The_Thing + oN. 繁化 / / / Description : / / This is another zombie class only this zombie will be invisble like ghost. / Zombie can be noticed with his blue glow, of course You can change glow to lower color. / / / / Cvars : / / zp_ghost_glow "255" - This is blue color, you can set it lower. / / / / Changelog : / / 10/11/2008 - v1.0 - First test / / */ #include <amxmodx> #include <fakemeta> #include <zombieplague> new g_zclass_ghost, g_glow new bool:g_AreGhost[33] new const zclass_name[] = { "隱形喪屍" } new const zclass_info[] = { "具有隱形能力" } new const zclass_model[] = { "aluea" } new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } const zclass_health = 1300 const zclass_speed = 230 const Float:zclass_gravity = 0.7 const Float:zclass_knockback = 1.75
public plugin_init() { g_glow = register_cvar("zp_ghost_glow", "30") } public plugin_precache() { register_plugin("[ZP] Class : Ghost Zombie", "1.0", "The_Thing+oN.繁化") g_zclass_ghost = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) } public client_putinserver(id) { g_AreGhost[id] = false fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 255) } public client_disconnect(id) { g_AreGhost[id] = false } public ghost_zombie(player) { if (!get_pcvar_num(g_glow) || !is_user_alive(player) || !zp_get_user_zombie(player)) { fm_set_rendering(player, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 255) g_AreGhost[player] = false return FMRES_IGNORED } if (zp_get_user_zombie_class(player) != g_zclass_ghost) { g_AreGhost[player] = true return PLUGIN_CONTINUE } if (get_pcvar_num(g_glow)) { fm_set_rendering(player, kRenderFxGlowShell, 0, 0, get_pcvar_num(g_glow), kRenderTransAlpha, 5) } return PLUGIN_CONTINUE } public zp_user_infected_post(player, infector) { if (zp_get_user_zombie_class(player) == g_zclass_ghost) { fm_set_rendering(player, kRenderFxGlowShell, 0, 0, get_pcvar_num(g_glow), kRenderTransAlpha, 5) } } stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) { new Float:RenderColor[3]; RenderColor[0] = float(r); RenderColor[1] = float(g); RenderColor[2] = float(b); set_pev(entity, pev_renderfx, fx); set_pev(entity, pev_rendercolor, RenderColor); set_pev(entity, pev_rendermode, render); set_pev(entity, pev_renderamt, float(amount)); return 1; }
[ 此文章被a7810236在2010-05-10 22:08重新編輯 ]
|