bueno la awp de rayo lo probe en zombie plague 4.2 Jamas use la vercion 4.3
Comenzemos
Creamos un Bool
Ahora agregamos los Sounds Sera esto y Luego en plugin_precacheObio el sound va en donde estan todo los sounds.
Vamos a Client_putinserver Y agregamos Esto
Vamos a fw_takedamage( y agregamos estoSi no le anda le tira error como 26 errores Borran una "}" Por que no me acuerdo como hera . Ahora vamos al final del zp para agregar el efecto y ponemos esto .
Ahora vamos a Crear los Sprinte Vamos Debajo delos Include y Agregamos estas 2 cosas
y luego asemos un new para agregar los sprinte
Ahora VAmos a public plugin_precache() y agregamos esto
Creo que Esto es todo Cual quier cosa que me olvide digame
De donde quite esto del Zombie apocalypse 1.0.4 :B para que no dijan que robo codes
NO UTILIZAR FORMAS MAL HECHAS.
Comenzemos
Creamos un Bool
Código PHP:
// Includes
#include <fakemeta>
#include <hamsandwich>
#include <engine>
#include <fun>
new bool: awp_rayo[33] // Bool que usaremos
Código PHP:
new const sound_thunder_awp[][] = { "zombie_plague/thunder1.wav", "zombie_plague/thunder2.wav" }
Código PHP:
for (i = 0; i < sizeof sound_thunder_awp; i++)
engfunc(EngFunc_PrecacheSound, sound_thunder_awp[i])
Vamos a Client_putinserver Y agregamos Esto
Código PHP:
awp_rayo[id] = false
Código PHP:
if( get_user_weapon( attacker ) == CSW_AWP && awp_rayo[ attacker ] )
rayo_effect( victim );
}
}
Código PHP:
// Thunder AWP
thunder_player(victim)
{
// Only effect alive zombies
if (!is_user_alive(victim) || !g_zombie[victim] || g_nodamage[victim])
return;
// Nemesis cvar?
if (g_nemesis[victim] && !get_pcvar_num(cvar_thundernemawp))
return;
// Get player origin
static Float:originF[3]
pev(victim, pev_origin, originF)
// Make thunder
ThunderEF(originF)
// Emit sound
engfunc(EngFunc_EmitSound, 0, CHAN_ITEM, sound_thunder_awp[random_num(0, sizeof sound_thunder_awp - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
// Give a glow to the victim
fm_set_rendering(victim, kRenderFxGlowShell, 255, 255, 0, kRenderNormal, 1)
// Restore health to the victim
set_user_health(victim, get_user_health(victim) - get_pcvar_num(cvar_thunderdamageawp))
// Finish and give the normal glow
set_task(1.0, "remove_thunder", victim)
}
ThunderEF(const Float:originF[3])
{
// Thunder 1
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(0) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]-25) // z
engfunc(EngFunc_WriteCoord, originF[0]+150) // x axis
engfunc(EngFunc_WriteCoord, originF[1]+150) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+800) // z axis
write_short(g_thunder1Spr) // sprite
write_byte(1) // startframe
write_byte(5) // flamerate
write_byte(2) // life
write_byte(20) // width
write_byte(30) // noise
write_byte(255) // red
write_byte(255) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(200) // speed
message_end()
// Thunder 2
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(0) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]-25) // z
engfunc(EngFunc_WriteCoord, originF[0]+150) // x axis
engfunc(EngFunc_WriteCoord, originF[1]+150) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+800) // z axis
write_short(g_thunder2Spr) // sprite
write_byte(1) // startframe
write_byte(5) // flamerate
write_byte(2) // life
write_byte(20) // width
write_byte(30) // noise
write_byte(255) // red
write_byte(255) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(200) // speed
message_end()
}
public remove_thunder(victim)
{
// Remove glow
#if defined HANDLE_MODELS_ON_SEPARATE_ENT
if (g_nemesis[victim] && get_pcvar_num(cvar_nemglow) && !g_armageddonround)
fm_set_rendering(g_ent_playermodel[victim], kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 1)
else
fm_set_rendering(g_ent_playermodel[victim])
#else
if (g_nemesis[victim] && get_pcvar_num(cvar_nemglow) && !g_armageddonround)
fm_set_rendering(victim, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 1)
else
fm_set_rendering(victim)
#endif
}
Ahora vamos a Crear los Sprinte Vamos Debajo delos Include y Agregamos estas 2 cosas
Código PHP:
new const sprite_awp_thunder[] = { "sprites/lgtning.spr" }
new const sprite_awp_thunder2[] = { "sprites/steam1.spr" }
y luego asemos un new para agregar los sprinte
Código PHP:
new g_thunder2Spr, g_thunder1Spr
Ahora VAmos a public plugin_precache() y agregamos esto
Código PHP:
g_thunder2Spr = engfunc(EngFunc_PrecacheModel, sprite_awp_thunder2)
g_thunder1Spr = engfunc(EngFunc_PrecacheModel, sprite_awp_thunder)
//Luego las Cvar asemos esto
new cvar_thunderdamageawp, cvar_thundernemawp
//y en plugin_init
// CVar Especial awp
cvar_thunderdamageawp = register_cvar("za_thunder_damage_awp", "100")
cvar_thundernemawp = register_cvar("za_thunder_nemesis_awp", "1")
Creo que Esto es todo Cual quier cosa que me olvide digame
De donde quite esto del Zombie apocalypse 1.0.4 :B para que no dijan que robo codes
NO UTILIZAR FORMAS MAL HECHAS.